/** * @name com/ibm/vipr/VIPR * @version 2.12.4463-patch.30 * @license * Licensed Materials - Property of IBM * * (C) Copyright IBM Corp. 2021 * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define("com/ibm/vipr/property/IEnumValue",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getName:function(){},getCaption:function(){},getDescription:function(){}})})),define("com/ibm/vipr/rs/v1/IRSEnumValue",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{name:t.readOnlyProperty,caption:t.readOnlyProperty,description:t.readOnlyProperty,getName:function(){},getCaption:function(){},getDescription:function(){},toString:function(){}}),n})),define("com/ibm/vipr/internal/property/EnumValue",["barejs!decl","../../property/IEnumValue","com/ibm/vipr/rs/v1/IRSEnumValue"],(function(e,t,n){"use strict";function r(t,n,r){e.defineProperties(this,{name:{enumerable:!0,value:t},caption:{enumerable:!0,value:n},description:{enumerable:!0,value:r||""===r?r:null}})}return e.declareClass(r,t,n,{fromHost:function(n){return n instanceof r?n:e.hasInterface(n,t)?new r(n.getName(),n.getCaption(),n.getDescription()):null},fromRSv1:function(t){return t instanceof r?t:e.hasInterface(t,n)?new r(t.getName(),t.getCaption(),t.getDescription()):null}},{name:null,caption:null,description:null,getName:function(){return this.name},getCaption:function(){return this.caption},getDescription:function(){return this.description},toString:function(){return this.name},valueOf:function(){return this.name},equals:function(n){return this===n||(n instanceof r||e.hasInterface(n,t))&&this.name===n.getName()&&this.caption===n.getCaption()&&this.description===n.getDescription()}})})),define("com/ibm/vipr/property/IVizProperty",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getDef:function(){},isActive:function(){},on:function(e,t){},getType:function(){},getName:function(){},getCaption:function(){},getDescription:function(){},getAliases:function(){},getTags:function(){},getVisibility:function(){},isDeprecated:function(){},getAffectedBy:function(){}})})),define("com/ibm/vipr/property/IVizValueProperty",["barejs!decl","./IVizProperty"],(function(e,t){"use strict";function n(){}return e.declareInterface(n,t,{getValue:function(){},setValue:function(e){},isDirty:function(){},getAllowNull:function(){},getDefaultValue:function(){},isServiceWritable:function(){},getRequiresData:function(){}}),e.defineProperty(n,"Default",{enumerable:!0,value:e.freeze({})})})),define("com/ibm/vipr/property/IVizBooleanProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{})})),define("com/ibm/vipr/property/IVizColorProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{})})),define("com/ibm/vipr/property/IVizEnumProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getPossibleValues:function(){},isDynamic:function(){}})})),define("com/ibm/vipr/property/IVizGroupProperty",["barejs!decl","./IVizProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getProperties:function(){},forEach:function(e){}})})),define("com/ibm/vipr/property/IVizLengthProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getAllowNegative:function(){}})})),define("com/ibm/vipr/property/IVizNumberProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getMinValue:function(){},getMaxValue:function(){}})})),define("com/ibm/vipr/property/IVizProperties",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{tree:t,configuration:t,excluded:t,has:function(e){},get:function(e){},on:function(e,t){},initHostProperty:function(e,t,n){},forEach:function(e){},getGroup:function(e){},getBoolean:function(e){},getColor:function(e){},getEnum:function(e){},getNumber:function(e){},getString:function(e){},getPalette:function(e){}})})),define("com/ibm/vipr/property/IVizStringProperty",["barejs!decl","./IVizValueProperty"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{})})),define("com/ibm/vipr/property/FontStyle",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Normal="normal",this.Italic="italic"}),{parse:function(e){if(!e)return null;switch(String(e).toLowerCase()){case"normal":return this.Normal;case"oblique":case"italic":return this.Italic;default:return null}},toRS:function(e){return this.hasValue(e)?e:null},fromRS:function(e){return this.hasValue(e)?e:null},toCssString:function(e){switch(e){case"normal":case"italic":return e;default:return""}}})})),define("com/ibm/vipr/property/FontWeight",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Thin=100,this.ExtraLight=200,this.Light=300,this.Normal=400,this.Medium=500,this.SemiBold=600,this.Bold=700,this.ExtraBold=800,this.Heavy=900}),{parse:function(e){if(!e)return null;switch(String(e).toLowerCase()){case"100":return this.Thin;case"200":return this.ExtraLight;case"300":return this.Light;case"400":case"normal":return this.Normal;case"500":return this.Medium;case"600":return this.SemiBold;case"700":case"bold":return this.Bold;case"800":return this.ExtraBold;case"900":return this.Heavy;default:return null}},toRS:function(e){return this.hasValue(e)?e:null},fromRS:function(e){return this.hasValue(e)?e:null},fromValue:function(e){switch(e){case 100:return this.Thin;case 200:return this.ExtraLight;case 300:return this.Light;case 400:return this.Normal;case 500:return this.Medium;case 600:return this.SemiBold;case 700:return this.Bold;case 800:return this.ExtraBold;case 900:return this.Heavy;default:return null}},toCssString:function(e){switch(e){case 400:return"normal";case 700:return"bold";case 100:case 200:case 300:case 500:case 600:case 800:case 900:return String(e);default:return""}}})})),define("com/ibm/vipr/property/LengthUnit",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Em="em",this.Percentage="%",this.Centimeter="cm",this.Millimeter="mm",this.Inch="in",this.Pica="pc",this.Point="pt",this.Pixel="px"}),{parse:function(e){if("string"!=typeof e)return null;switch(e.toLowerCase()){case"em":return this.Em;case"%":return this.Percentage;case"cm":return this.Centimeter;case"mm":return this.Millimeter;case"in":return this.Inch;case"pc":return this.Pica;case"pt":return this.Point;case"px":return this.Pixel;default:return null}}})})),define("com/ibm/vipr/property/PropertyActiveEventArgs",["barejs!decl","barejs!EventArgs"],(function(e,t){"use strict";return e.declareClass((function(n,r){t.call(this),e.defineProperties(this,{property:{enumerable:!0,value:n},oldValue:{enumerable:!0,value:!!r}})}),t,{property:null,oldValue:null})})),define("com/ibm/vipr/property/PropertyType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Group="group",this.Boolean="boolean",this.Color="color",this.Enum="enum",this.Font="font",this.Length="length",this.Number="number",this.String="string",this.Palette="palette"}))})),define("com/ibm/vipr/property/PropertyValueEventArgs",["barejs!decl","barejs!EventArgs"],(function(e,t){"use strict";return e.declareClass((function(n,r){t.call(this),e.defineProperties(this,{property:{enumerable:!0,value:n},oldValue:{enumerable:!0,value:r}})}),t,{property:null,oldValue:null})})),define("com/ibm/vipr/property/PropertyVisibility",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Listed="listed",this.Configuration="configuration",this.Excluded="excluded"}))})),define("com/ibm/vipr/internal/util/StringUtil",["exports","barejs!decl"],(function(e,t){"use strict";var n=/\{\{|\}\}|\{(\d+)\}/g;t.defineObject(e,{EMPTY:{enumerable:!0,value:""},normalize:function(e){return null==e?"":String(e)},equals:function(e,t){return e===t},format:function(e){if(null==e)return"";var t=Array.prototype.slice.call(arguments,1);return String(e).replace(n,(function(e,n){if(n){if(n in t)return String(t[n]);throw new RangeError("No replacement for {"+n+"}, it is out of bounds ("+t.length+")")}return e.charAt(0)}))},mapJoin:function(t,n,r){if("function"!=typeof r)throw new TypeError("_resolver must be a function");var i=+(t||t.length)||0;if(i<1)return"";if(i<2)return e.normalize(r(t.get(0)));for(var a="",o=!0,s=0;s0&&(a+=n);var l=e.normalize(r(t.get(s)));l&&(o=!1,a+=l)}return o?"":a}},"StringUtil")})),define("com/ibm/vipr/property/IFont",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getFamily:function(){},getSize:function(){},getStyle:function(){},getWeight:function(){}})})),define("com/ibm/vipr/rs/v1/IRSFont",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{family:t.readOnlyProperty,size:t.readOnlyProperty,style:t.readOnlyProperty,weight:t.readOnlyProperty,getFamily:function(){},getSize:function(){},getRSStyle:function(){},getRSWeight:function(){},toString:function(){}}),n})),define("com/ibm/vipr/property/ILength",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getValue:function(){},getUnit:function(){}})})),define("com/ibm/vipr/rs/v1/IRSLength",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{value:t.readOnlyProperty,unit:t.readOnlyProperty,getValue:function(){},getRSUnit:function(){},toString:function(){}}),n})),define("com/ibm/vipr/internal/util/NumberUtil",["exports","barejs!decl"],(function(e,t){"use strict";t.defineObject(e,{parseNumber:function(e){var t=arguments.length>1;if(null==e)return t?arguments[1]:null;var n=+e;if(n!=n){if(!t)throw new Error("Failed to parse "+e+" to number");return arguments[1]}return n},toString:function(e){return null==e?"":String(e)},clamp:function(e,t,n){return+(tn?n:t)}},"NumberUtil")})),define("com/ibm/vipr/util/Length",["barejs!decl","../property/LengthUnit","../property/ILength","com/ibm/vipr/rs/v1/IRSLength","../internal/util/NumberUtil"],(function(e,t,n,r,i){"use strict";var a=/^([\-\+]?(?:\d+(?:(?!\r?\n)[\s,]\d+)*(?:\.\d+)?|\.\d+))(?:$|(?!\d|\.))(%|[a-zA-Z]+)?$/;function o(n,r){if("number"!=typeof n)throw new TypeError("_value must be a number");if(!t.hasValue(r))throw new TypeError("Invalid length unit: "+r);e.defineProperties(this,{value:{enumerable:!0,value:n},unit:{enumerable:!0,value:r}})}return e.declareClass(o,n,r,{fromHost:function(e){return!e||e instanceof o?e||null:new o(e.getValue(),e.getUnit())},fromRSv1:function(e){return!e||e instanceof o?e||null:new o(e.getValue(),t.parse(e.getRSUnit()))},fromObject:function(e){return e&&"object"==typeof e&&"value"in e&&"unit"in e&&t.hasValue(e.unit)&&"number"==typeof e.value?new o(e.value,e.unit):null},parse:function(e){if(!e)return null;var n=a.exec(e);if(n){var r=i.parseNumber(n[1],null),s=t.parse(n[2]);if(null!==r&&(s||!n[2]))return new o(r,s||t.Pixel)}return null}},{value:null,unit:null,getValue:function(){return this.value},getUnit:function(){return this.unit},getRSUnit:function(){return this.unit},toString:function(){return i.toString(this.value)+this.unit},equals:function(e){return this===e||e instanceof o&&e.value===this.value&&e.unit===this.unit}})})),define("com/ibm/vipr/util/Font",["barejs!decl","../internal/util/StringUtil","../property/FontStyle","../property/FontWeight","../property/IFont","com/ibm/vipr/rs/v1/IRSFont","./Length"],(function(e,t,n,r,i,a,o){"use strict";var s=/\s+/g,l=/\s*,\s*/,u=/\s*;\s*/;function c(t,i,a,s){if(null!==t&&!Array.isArray(t))throw new TypeError("Font family must be an Array of String");if(!(null===i||i instanceof o))throw new TypeError("Font size must be a Length instance");if(null!==a&&!n.hasValue(a))throw new TypeError("Invalid FontStyle");if(null!==s&&!r.hasValue(s))throw new TypeError("Invalid FontWeight");e.defineProperties(this,{family:{enumerable:!0,value:t},size:{enumerable:!0,value:i},style:{enumerable:!0,value:a},weight:{enumerable:!0,value:s}})}function f(e){var t=null,n=0;if(e&&(n=(t=String(e).trim()).length)>1){var r=t.charAt(0);"'"!==r&&'"'!==r||r!==t.charAt(n-1)||(n=(t=t.substring(1,n-1)).length)}return n>0?t:null}function d(e){var t=e?e.length:0;if(t<1)return null;var i,a=null,l=null,u=null,f=0;s.lastIndex=0;for(var d,p=0,h=0;hr&&(t.length=r)}return t},parseFamily:function(e){var t=null;if(e){var n=String(e).split(l),r=n.length;t=new Array(r);for(var i=0,a=0;ai&&(t.length=i)}return t||(t=[]),t},familyEqual:function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r0&&(t+=", "),a&&(t+='"'),t+=i,a&&(t+='"')}return t},toCssString:function(e){var n=[],r=c.familyToString(e.getFamily());return r.length>0&&n.push(t.format("font-family: {0};",r)),(r=c.sizeToString(e.getSize())).length>0&&n.push(t.format("font-size: {0};",r)),(r=c.styleToString(e.getStyle())).length>0&&n.push(t.format("font-style: {0};",r)),(r=c.weightToString(e.getWeight())).length>0&&n.push(t.format("font-weight: {0};",r)),n.join(" ")},sizeToString:function(e){return e?e.toString():""},styleToString:function(e){return e?n.toCssString(e):""},weightToString:function(e){return e?r.toCssString(e):""},fromHost:function(e){return!e||e instanceof c?e||null:c.create(c.normalizeFamily(e.getFamily()),e.getSize(),e.getStyle(),e.getWeight())},fromRSv1:function(e){return!e||e instanceof c?e||null:c.create(c.normalizeFamily(e.getFamily()),o.fromRSv1(e.getSize()),n.parse(e.getRSStyle()),r.fromValue(e.getRSWeight()))},parse:function(e){if(!e||"string"!=typeof e)return null;for(var t=null,i=null,a=null,s=null,l=e.trim().split(u),f=0,p=l.length;f0?(g="font",v=h):m>0&&(g=h.substring(0,m),v=h.substring(m+1).trim()),null!==g&&null!==v)switch(g){case"font":var b=d(v);b&&(t=b.family,i=b.size,a=b.style,s=b.weight);break;case"font-size":i=o.parse(v);break;case"font-family":t=c.parseFamily(v);break;case"font-style":a=n.parse(v);break;case"font-weight":s=r.parse(v)}}return c.create(t,i,a,s)}},{family:null,size:null,style:null,weight:null,getFamily:function(){return this.family},getSize:function(){return this.size},getStyle:function(){return this.style},getWeight:function(){return this.weight},getRSStyle:function(){return this.style},getRSWeight:function(){return this.weight},toString:function(){var e;return this.style!==n.Normal&&this.weight!==r.Normal||this.style===n.Normal&&this.weight===r.Normal?(e="",this.style===n.Normal?e+="normal":(this.style&&(e+=this.style),this.weight&&(e.length>0&&(e+=" "),e+=r.toCssString(this.weight))),this.size&&(e.length>0&&(e+=" "),e+=this.size.toString()),this.family&&(e.length>0&&(e+=" "),e+=c.familyToString(this.family))):e=c.toCssString(this),e},equals:function(e){return e===this||e instanceof c&&c.familyEqual(this.family,e.family)&&(this.size===e.size||!!this.size&&this.size.equals(e.size))&&this.style===e.style&&this.weight===e.weight}})})),define("com/ibm/vipr/property/property",["exports","../internal/property/EnumValue","./IVizBooleanProperty","./IVizColorProperty","./IVizEnumProperty","./IVizGroupProperty","./IVizLengthProperty","./IVizNumberProperty","./IVizProperties","./IVizProperty","./IVizStringProperty","./IVizValueProperty","./FontStyle","./FontWeight","./LengthUnit","./PropertyActiveEventArgs","./PropertyType","./PropertyValueEventArgs","./PropertyVisibility","../util/Font","../util/Length"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b,y,I){"use strict";e.EnumValue=t,e.IVizBooleanProperty=n,e.IVizColorProperty=r,e.IVizEnumProperty=i,e.IVizGroupProperty=a,e.IVizLengthProperty=o,e.IVizNumberProperty=s,e.IVizProperties=l,e.IVizProperty=u,e.IVizStringProperty=c,e.IVizValueProperty=f,e.FontStyle=d,e.FontWeight=p,e.LengthUnit=h,e.PropertyActiveEventArgs=m,e.PropertyType=g,e.PropertyValueEventArgs=v,e.PropertyVisibility=b,e.Font=y,e.Length=I})),define("com/ibm/vipr/api/EncodingType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Cat="cat",this.Cont="cont",this.Custom="custom"}),{parse:function(e){if(!e)return null;switch(e.toLowerCase()){case"cat":return this.Cat;case"cont":return this.Cont;case"custom":return this.Custom;default:return null}}})})),define("com/ibm/vipr/api/IHittable",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getHittableType:function(){}})})),define("com/ibm/vipr/api/IAxisItem",["barejs!decl","./IHittable"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getType:function(){},getSlot:function(){},getTuple:function(){},getValue:function(){}})})),define("com/ibm/vipr/api/IBounds",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getLeft:function(){},getTop:function(){},getRight:function(){},getBottom:function(){},getWidth:function(){},getHeight:function(){}})})),define("com/ibm/vipr/api/ICapability",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getSlot:function(){},getName:function(){},getAttributes:function(){}})})),define("com/ibm/vipr/api/IPaletteResolver",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{})})),define("com/ibm/vipr/api/ICatPalette",["barejs!decl","./IPaletteResolver"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getColor:function(e,t,n){}})})),define("com/ibm/vipr/api/IColor",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getRed:function(){},getGreen:function(){},getBlue:function(){},getAlpha:function(){}})})),define("com/ibm/vipr/api/IColorStop",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{color:t,at:t,value:t})})),define("com/ibm/vipr/api/IContPalette",["barejs!decl","./IPaletteResolver"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getColorStops:function(e,t){}})})),define("com/ibm/vipr/api/IContStops",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{stops:t,interpolate:t})})),define("com/ibm/vipr/api/IPoint",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{x:e.readOnlyProperty,y:e.readOnlyProperty,getX:function(){},getY:function(){}})})),define("com/ibm/vipr/api/ICoordinate",["barejs!decl","./IPoint"],(function(e,t){"use strict";return e.declareInterface((function(){}),t)})),define("com/ibm/vipr/api/ICustomCatPalette",["barejs!decl","./IPaletteResolver"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getColor:function(e,t,n){}})})),define("com/ibm/vipr/api/ICustomContPalette",["barejs!decl","./IPaletteResolver"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getColorStops:function(e){}})})),define("com/ibm/vipr/api/ICustomDataSet",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getName:function(){},getItems:function(){},getDecorationVersion:function(){},updateDecorations:function(){}})})),define("com/ibm/vipr/api/IEncoding",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getType:function(){},getChannel:function(){},getSlot:function(){},getRef:function(){},getCaption:function(){}})})),define("com/ibm/vipr/api/IHostAPI",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{request:function(e){},requestRender:function(){},notify:function(e){},setCustomData:function(e,t){}})})),define("com/ibm/vipr/api/IInteractivity",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{startInteractivity:function(e){},canTranslate:function(){},translate:function(e){},canZoom:function(){},zoom:function(e,t){},canZoomIn:function(){},canZoomOut:function(){},canReset:function(){},reset:function(){},cancelInteractivity:function(e){},endInteractivity:function(e){}})})),define("com/ibm/vipr/api/INls",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{has:function(e){},get:function(e){}})})),define("com/ibm/vipr/api/IRegion",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getName:function(){},getSlots:function(){},getBounds:function(){}})})),define("com/ibm/vipr/api/IRenderHandle",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{format:t,status:t,supportsPause:t,supportsAbort:t,supportsComplete:t,onprogress:e.readWriteProperty,then:function(e,t){},catch:function(e){}})})),define("com/ibm/vipr/api/IRenderInterrupt",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{supportsPause:t,supportsAbort:t,supportsComplete:t,pause:function(e){},resume:function(e){},complete:function(e){},abort:function(e){}})})),define("com/ibm/vipr/api/IRenderParameters",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{format:e.readOnlyProperty,width:e.readOnlyProperty,height:e.readOnlyProperty,getFormat:function(){},getWidth:function(){},getHeight:function(){}})})),define("com/ibm/vipr/api/IVIPR",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{register:function(e,t){},unregister:function(e){},isRegistered:function(e){},bundleIds:e.readOnlyProperty,load:function(e){},unload:function(e){},loadAll:function(){},newViz:function(e,t,n,r,i){},addAppender:function(e){},removeAppender:function(e){}})})),define("com/ibm/vipr/api/IVizBundle",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{id:t,manifest:t,vizDef:t,userData:t,getId:function(){},getLocation:function(){},getManifest:function(){},getVizDef:function(){},getUserData:function(){},getUserConfig:function(){},create:function(e,t,n){},processData:function(e,t,n){},compileData:function(e,t){},loadResource:function(e,t){},getLocale:function(){},getNls:function(){},extendVizDef:function(e,t,n,r){}})})),define("com/ibm/vipr/api/IVizService",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{vizBundle:t,vizDef:t,serviceDescription:t,domNode:t,userData:t,truncate:e.readWriteProperty,renderTimeout:e.readWriteProperty,properties:t,destroy:function(){},destroyAsync:function(){},setData:function(e,t){},setProperty:function(e,t){},render:function(e,t,n){},getCapabilities:function(){},getEncodings:function(){},getInteractivity:function(){},getVisCoordinate:function(e,t){},getClientPoint:function(e){},getRegionAtPoint:function(e,t){},getItemsAtPoint:function(e,t){},getAxisItemsAtPoint:function(e,t){},getItemsInPolygon:function(e){},getState:function(){},setState:function(e){}})})),define("com/ibm/vipr/api/IVizServiceRequest",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getId:function(){},getName:function(){},getVersion:function(){},getPayload:function(){},isAborted:function(){},isCompleted:function(){},isFailed:function(){},isActive:function(){},reply:function(e){},complete:function(e){},fail:function(e){}})})),define("com/ibm/vipr/api/PaletteType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Cat="cat",this.Cont="cont",this.CustomCont="customcont",this.CustomCat="customcat"}))})),define("com/ibm/vipr/api/RenderStatus",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Pending="pending",this.Rendering="rendering",this.Animating="animating",this.Blocked="blocked",this.Paused="paused",this.Complete="complete",this.Failed="failed",this.Aborted="aborted",this.Timeout="timeout"}))})),define("com/ibm/vipr/api/RenderMessage",["barejs!decl","../internal/util/NumberUtil","./RenderStatus"],(function(e,t,n){"use strict";function r(e){return null==e?null:"string"==typeof e?e:String(e)}function i(n,i,a,o,s,l){e.defineProperties(this,{status:{enumerable:!0,value:n},progress:{enumerable:!0,value:t.clamp(0,+i,1)},id:{enumerable:!0,value:r(a)},message:{enumerable:!0,value:r(o)},data:{enumerable:!0,value:void 0===s?null:s},obsolete:{enumerable:!0,value:!!l}})}return e.declareClass(i,{status:null,progress:null,id:null,message:null,data:null,obsolete:null,completed:{enumerable:!0,get:function(){return"complete"===this.status}},failed:{enumerable:!0,get:function(){return"failed"===this.status||"timeout"===this.status}},makeObsolete:function(){var e=!1!==arguments[0];return this.obsolete===e?this:new i(this.status,this.progress,this.id,this.message,this.name,e)},toString:function(){return this.message},valueOf:function(){return this.id}})})),define("com/ibm/vipr/api/ResourceType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Css="text/css",this.Html="text/html",this.Java="application/java",this.JavaScript="text/javascript",this.Json="application/json",this.Nls="text/x.nls",this.Svg="image/svg+xml",this.Text="text/plain",this.Xml="text/xml",this.Raw="application/octet-stream"}),{parse:function(e){if(!e)return null;switch(e.toLowerCase()){case"css":case"text/css":return this.Css;case"html":case"text/html":return this.Html;case"java":case"application/java":return this.Java;case"js":case"javascript":case"text/javascript":return this.JavaScript;case"json":case"application/json":return this.Json;case"nls":case"i18n":case"text/x.nls":return this.Nls;case"svg":case"image/svg+xml":return this.Svg;case"txt":case"text":case"text/plain":return this.Text;case"xml":case"text/xml":return this.Xml;case"raw":case"application/octet-stream":return this.Raw;default:return null}}})})),define("com/ibm/vipr/api/Severity",["barejs!decl"],(function(e){"use strict";var t=/^(?:error|warn|info)$/;return e.declareEnum((function(){this.Error="error",this.Warning="warn",this.Info="info"}),{hasValue:function(e){return"string"==typeof e&&t.test(e)}})})),define("com/ibm/vipr/api/ICustomData",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getType:function(){},getId:function(){},getPayload:function(){}})})),define("com/ibm/vipr/data/IDecorated",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{hasDecoration:function(e){},getDecoration:function(e){}})})),define("com/ibm/vipr/api/ICustomDataDecorated",["barejs!decl","./ICustomData","../data/IDecorated"],(function(e,t,n){"use strict";return e.declareInterface((function(){}),t,n,{getCustomSet:function(){},setDecoration:function(e,t){},removeDecoration:function(e){},clearDecorations:function(){}})})),define("com/ibm/vipr/api/api",["exports","../property/property","./EncodingType","./IAxisItem","./IBounds","./ICapability","./ICatPalette","./IColor","./IColorStop","./IContPalette","./IContStops","./ICoordinate","./ICustomCatPalette","./ICustomContPalette","./ICustomDataSet","./IEncoding","./IHostAPI","./IInteractivity","./INls","./IPoint","./IRegion","./IRenderHandle","./IRenderInterrupt","./IRenderParameters","./IVIPR","./IVizBundle","./IVizService","./IVizServiceRequest","./PaletteType","./RenderMessage","./RenderStatus","./ResourceType","./Severity","./ICustomData","./ICustomDataDecorated"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b,y,I,_,w,C,S,P,D,R,T,V,A,E,x,j,z){"use strict";e.EncodingType=n,e.IAxisItem=r,e.IBounds=i,e.ICapability=a,e.ICatPalette=o,e.IColor=s,e.IColorStop=l,e.IContPalette=u,e.IContStops=c,e.ICoordinate=f,e.ICustomCatPalette=d,e.ICustomContPalette=p,e.ICustomDataSet=h,e.ICustomData=j,e.ICustomDataDecorated=z,e.IDataRequestHandler=g,e.IEncoding=m,e.IHostAPI=g,e.IInteractivity=v,e.INls=b,e.IPoint=y,e.IRegion=I,e.IRenderHandle=_,e.IRenderInterrupt=w,e.IRenderParameters=C,e.IVIPR=S,e.IVizBundle=P,e.IVizService=D,e.IVizServiceRequest=R,e.PaletteType=T,e.RenderMessage=V,e.RenderStatus=A,e.ResourceType=E,e.Severity=x,e.IVizBooleanProperty=t.IVizBooleanProperty,e.IVizColorProperty=t.IVizColorProperty,e.IVizEnumProperty=t.IVizEnumProperty,e.IVizGroupProperty=t.IVizGroupProperty,e.IVizNumberProperty=t.IVizNumberProperty,e.IVizProperties=t.IVizProperties,e.IVizStringProperty=t.IVizStringProperty,e.IVizValueProperty=t.IVizValueProperty,e.PropertyActiveEventArgs=t.PropertyActiveEventArgs,e.PropertyValueEventArgs=t.PropertyValueEventArgs})),define("com/ibm/vipr/data/DataItemType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Cat="cat",this.Cont="cont"}),{parse:function(e){if(!e)return null;switch(e.toLowerCase()){case"cat":return this.Cat;case"cont":return this.Cont;default:return null}}})})),define("com/ibm/vipr/data/FormatKind",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Data="data",this.Label="label"}),{validate:function(e){switch(e){case"data":case"label":return e;default:throw new TypeError("Invalid FormatKind: "+e)}}})})),define("com/ibm/vipr/data/IDataItem",["barejs!decl","./IDecorated","./DataItemType"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getType:function(){}})})),define("com/ibm/vipr/data/ICatDataItem",["barejs!decl","./IDataItem"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getItemClassSetCount:function(){},getItemClassSet:function(e){},getTupleCount:function(){},getDataWindowStart:function(){},getDataWindowEnd:function(){},getTuple:function(e){}})})),define("com/ibm/vipr/data/IValue",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getValueType:function(){},getCaption:function(e){},getValue:function(){}})})),define("com/ibm/vipr/data/IContDataItem",["barejs!decl","./IDataItem"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getItemClass:function(){},getFormatter:function(e){},getDomain:function(e,t){}})})),define("com/ibm/vipr/data/IDataPoint",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getTupleIndex:function(e){},getValue:function(e){}})})),define("com/ibm/vipr/data/IDataPointIterator",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{nextValue:function(){}})})),define("com/ibm/vipr/data/IDataSet",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getDataItemCount:function(){},getDataItem:function(e){},getDataPointIterator:function(){}})})),define("com/ibm/vipr/data/IDataSetMapping",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getDataItemsFor:function(e){}})})),define("com/ibm/vipr/data/ITemporalAttributes",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{hasYear:function(){},hasMonth:function(){},hasDay:function(){},hasHour:function(){},hasMinute:function(){},hasSecond:function(){},hasFraction:function(){}})})),define("com/ibm/vipr/data/ITemporalDataItem",["barejs!decl","./ICatDataItem"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getTemporalAttributes:function(){},getFormatter:function(e){}})})),define("com/ibm/vipr/data/ITuple",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getItemClassSetIndex:function(){},getItem:function(e){}})})),define("com/ibm/vipr/data/ITemporalTuple",["barejs!decl","./ITuple"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getValue:function(){}})})),define("com/ibm/vipr/data/IFormatter",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{format:function(e){}})})),define("com/ibm/vipr/data/IItem",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getCaption:function(e){},getUniqueName:function(){}})})),define("com/ibm/vipr/data/IItemClass",["barejs!decl","./IDecorated"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getCaption:function(e){},getSubCaption:function(e){},getUniqueName:function(){}})})),define("com/ibm/vipr/data/IItemClassSet",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getItemClassCount:function(){},getItemClass:function(e){}})})),define("com/ibm/vipr/data/IReferenceDataItem",["barejs!decl","./ICatDataItem"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{})})),define("com/ibm/vipr/data/IReferenceTuple",["barejs!decl","./ITuple"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getReference:function(){}})})),define("com/ibm/vipr/data/ISlotMapping",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getDataSetMapping:function(e){}})})),define("com/ibm/vipr/data/IGeoAttributes",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{hasCaption:function(){},hasLatitude:function(){},hasLongitude:function(){},hasFeatureId:function(){}})})),define("com/ibm/vipr/data/IGeoDataItem",["barejs!decl","./ICatDataItem"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getGeoAttributes:function(){}})})),define("com/ibm/vipr/data/IGeoTuple",["barejs!decl","./ITuple"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getLatitude:function(){},getLongitude:function(){},getFeatureId:function(){}})})),define("com/ibm/vipr/data/IContDomain",["barejs!decl"],(function(e){"use strict";var t=e.readOnlyProperty;return e.declareInterface((function(){}),{min:t,max:t,explicit:t})})),define("com/ibm/vipr/data/IVIPRData",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getDataSetAt:function(e){},getDecorationsVersion:function(){}})})),define("com/ibm/vipr/data/ValueType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Missing="missing",this.Numeric="numeric",this.Text="text",this.Error="error"}))})),define("com/ibm/vipr/data/data",["exports","./DataItemType","./FormatKind","./ICatDataItem","./IValue","./IContDataItem","./IDataPoint","./IDataPointIterator","./IDataSet","./IDataSetMapping","./ITemporalAttributes","./ITemporalDataItem","./ITemporalTuple","./IDecorated","./IDataItem","./IFormatter","./IItem","./IItemClass","./IItemClassSet","./IReferenceDataItem","./IReferenceTuple","./ISlotMapping","./ITuple","./IGeoAttributes","./IGeoDataItem","./IGeoTuple","./IContDomain","./IVIPRData","./ValueType"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b,y,I,_,w,C,S,P,D,R,T){"use strict";e.DataItemType=t,e.FormatKind=n,e.ICatDataItem=r,e.IValue=i,e.IContDataItem=a,e.IDataPoint=o,e.IDataPointIterator=s,e.IDataSet=l,e.IDataSetMapping=u,e.ITemporalAttributes=c,e.ITemporalDataItem=f,e.ITemporalTuple=d,e.IDecorated=p,e.IDataItem=h,e.IFormatter=m,e.IItem=g,e.IItemClass=v,e.IItemClassSet=b,e.IReferenceDataItem=y,e.IReferenceTuple=I,e.ISlotMapping=_,e.ITuple=w,e.IGeoAttributes=C,e.IGeoDataItem=S,e.IGeoTuple=P,e.IContDomain=D,e.IVIPRData=R,e.ValueType=T})),define("com/ibm/vipr/info/IInfo",["barejs!decl","../api/IHittable"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getInfoType:function(){},getSource:function(){}})})),define("com/ibm/vipr/info/ISlottedInfo",["barejs!decl","./IInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getSlotRef:function(){}})})),define("com/ibm/vipr/info/IDataItemInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getDataItemInfoType:function(){},getCaption:function(e){},getSubCaption:function(e){},combineCaptions:function(e){}})})),define("com/ibm/vipr/info/ICatDataItemInfo",["barejs!decl","./IDataItemInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getStart:function(){},getEnd:function(){},getTupleCount:function(){},getItemClassSetInfos:function(){},getTupleInfos:function(){},getTupleInfo:function(e){}})})),define("com/ibm/vipr/info/IContDataItemInfo",["barejs!decl","./IDataItemInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getItemClassInfo:function(){},getFormatter:function(e){},getDomainInfo:function(e){},calcDomain:function(e){}})})),define("com/ibm/vipr/info/ICustomInfo",["barejs!decl","./IInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getId:function(){},getType:function(){},getPayload:function(){},equals:function(e){}})})),define("com/ibm/vipr/info/ICustomInfoDecorated",["barejs!decl","./ICustomInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{hasDecoration:function(e){},getDecoration:function(e,t){},setDecoration:function(e,t){}})})),define("com/ibm/vipr/info/IDataPointInfo",["barejs!decl","./IInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getKey:function(e){},getRowInfo:function(){},allInfo:function(e){},getInfo:function(e,t){}})})),define("com/ibm/vipr/info/IDataSetInfo",["barejs!decl","./IInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getMapping:function(){},getDataSetDef:function(){},getName:function(){},getCaption:function(){},getDataItemInfos:function(){},getDataPointInfos:function(){},getSlotInfo:function(e){},getSlotInfos:function(){},hasValues:function(){}})})),define("com/ibm/vipr/info/IDatumInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getDataItemInfoType:function(){},getCaption:function(e){}})})),define("com/ibm/vipr/info/ITupleInfo",["barejs!decl","./IDatumInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getSubType:function(){},getIndex:function(){},getItemClassSetInfo:function(){},getItemClassInfos:function(){},getItemInfos:function(){},getKey:function(e){},getDataItemInfo:function(){}})})),define("com/ibm/vipr/info/ITemporalTupleInfo",["barejs!decl","./ITupleInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getValue:function(){}})})),define("com/ibm/vipr/info/IGeoTupleInfo",["barejs!decl","./ITupleInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getLatitude:function(){},getLongitude:function(){},getFeatureId:function(){}})})),define("com/ibm/vipr/info/IItemClassInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getCaption:function(e){},getSubCaption:function(e){},combineCaptions:function(e){},getUniqueName:function(){},toString:function(){}})})),define("com/ibm/vipr/info/IItemClassSetInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getItemClassInfos:function(){},getCaption:function(e){},getSubCaption:function(e){},combineCaptions:function(e){},toString:function(){}})})),define("com/ibm/vipr/info/IItemInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getCaption:function(e){},getUniqueName:function(){},toString:function(){}})})),define("com/ibm/vipr/info/InfoType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.VIPRData="viprdata",this.DataSet="dataset",this.Slot="slot",this.DataItem="dataitem",this.ItemClassSet="itemclassset",this.ItemClass="itemclass",this.Tuple="tuple",this.Item="item",this.DataPoint="datapoint",this.Value="value",this.CustomData="customdata"}))})),define("com/ibm/vipr/info/IReferenceTupleInfo",["barejs!decl","./ITupleInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getReference:function(){}})})),define("com/ibm/vipr/info/ISlotInfo",["barejs!decl","./ISlottedInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getSlotType:function(){},getName:function(){},isMapped:function(){},getDataItemCount:function(){},getDataItemInfos:function(){},getDataItemInfo:function(e){}})})),define("com/ibm/vipr/info/IValueInfo",["barejs!decl","./IDatumInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getValueInfoType:function(){},getValue:function(){},getDataItemInfo:function(){}})})),define("com/ibm/vipr/info/IVIPRDataInfo",["barejs!decl","./IInfo"],(function(e,t){"use strict";return e.declareInterface((function(){}),t,{getMapping:function(){},getDataSetInfos:function(){},getDataSetInfo:function(e){},getDecorationsVersion:function(){},empty:function(){},filterDecorations:function(e){}})})),define("com/ibm/vipr/info/info",["exports","./ICatDataItemInfo","./IContDataItemInfo","./ICustomInfo","./ICustomInfoDecorated","./IDataItemInfo","./IDataPointInfo","./IDataSetInfo","./ITemporalTupleInfo","./IDatumInfo","./IGeoTupleInfo","./IInfo","./IItemClassInfo","./IItemClassSetInfo","./IItemInfo","./InfoType","./IReferenceTupleInfo","./ISlotInfo","./ISlottedInfo","./ITupleInfo","./IValueInfo","./IVIPRDataInfo"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b,y,I,_){"use strict";e.ICatDataItemInfo=t,e.IContDataItemInfo=n,e.ICustomInfo=r,e.ICustomInfoDecorated=i,e.IDataItemInfo=a,e.IDataPointInfo=o,e.IDataSetInfo=s,e.ITemporalTupleInfo=l,e.IDatumInfo=u,e.IGeoTupleInfo=c,e.IInfo=f,e.IItemClassInfo=d,e.IItemClassSetInfo=p,e.IItemInfo=h,e.InfoType=m,e.IReferenceTupleInfo=g,e.ISlotInfo=v,e.ISlottedInfo=b,e.ITupleInfo=y,e.IValueInfo=I,e.IVIPRDataInfo=_})),define("com/ibm/vipr/rs/v1/IRSColor",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{r:t.readOnlyProperty,g:t.readOnlyProperty,b:t.readOnlyProperty,a:t.readOnlyProperty,getRed:function(){},getGreen:function(){},getBlue:function(){},getAlpha:function(){},toString:function(){}}),n})),define("com/ibm/vipr/util/Color",["barejs!decl","../internal/util/NumberUtil","../api/IColor","com/ibm/vipr/rs/v1/IRSColor"],(function(e,t,n,r){"use strict";var i=/^\s*#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\s*$/,a=/^\s*rgba?\s*\(\s*(\d+\%?)\s*,\s*(\d+\%?)\s*,\s*(\d+\%?)\s*(?:,\s*(\d+(?:\.\d+)?\%?)\s*)?\)\s*$/,o=/^\s*hsla?\s*\(\s*([+\-]?(?=\d|\.\d+)\d*(?:\.\d+)?)(deg|g?rad|turn)?\s*,\s*((?=\d|\.\d+)\d*(?:\.\d+)?\%?)\s*,\s*((?=\d|\.\d+)\d*(?:\.\d+)?\%?)\s*(?:,\s*((?=\d|\.\d+)\d*(?:\.\d+)?\%?)\s*)?\)\s*$/;function s(e){var t=+e||0;return t<0?0:t>1?1:t}function l(e){var t=Math.floor(e)||0;return t<0?0:t>255?255:t}function u(e){return l(Math.floor(255*e))}function c(e){var n=e.indexOf("%",e.length-1)>=0,r=t.parseNumber(n?e.substring(0,e.length-1):e,0);return n&&(r/=100),s(r)}function f(e){return e.indexOf("%",e.length-1)>=0?u(c(e)):l(t.parseNumber(e,0))}function d(e,t,n){return e<<16|t<<8|n}function p(e,t,n,r){var i=(r+e/30)%12;return n-t*Math.max(Math.min(i-3,9-i,1),-1)}function h(e,t,n){var r=t*Math.min(n,1-n);return u(p(e,r,n,0))<<16|u(p(e,r,n,8))<<8|u(p(e,r,n,4))}function m(t,n){void 0===n&&(n=1),e.defineProperties(this,{_argb:{value:t|u(n)<<24},a:{enumerable:!0,value:n}})}function g(e,t,n){var r=arguments[3];return r=void 0===r?1:s(r),new m(d(l(e),l(t),l(n)),r)}function v(e,t,n){var r=arguments[3];return r=void 0===r?1:s(r),(e<0||e>=360)&&(e%=360)<0&&(e+=360),new m(h(e,t,n),r)}return e.declareClass(m,n,r,{fromHost:function(e){return!e||e instanceof m?e||null:g(e.getRed(),e.getGreen(),e.getBlue(),e.getAlpha())},fromRSv1:function(e){return!e||e instanceof m?e||null:g(e.getRed(),e.getGreen(),e.getBlue(),e.getAlpha())},rgb:g,rgba:g,hsl:v,hsla:v,fromString:function(e){if(!e||!e.length)return null;try{var t=m.Named.valueOf(e.toLowerCase());if(t)return t}catch(e){}var n;if(n=i.exec(e)){var r=n[1],l=0,u=255;switch(r.length){case 8:u=parseInt(r.substring(6,8),16);case 6:l=parseInt(r.substring(0,6),16);break;case 4:u=parseInt(r.substring(3,4),16),u|=u<<4;case 3:l=(3840&(l=parseInt(r.substring(0,3),16)))<<8|(240&l)<<4|15&l,l|=l<<4}return new m(l,s(u/255))}if(n=a.exec(e))return g(f(n[1]),f(n[2]),f(n[3]),n[4]?c(n[4]):1);if(n=o.exec(e)){var d=parseFloat(n[1]);switch(n[2]||"deg"){case"deg":break;case"rad":d=180*d/Math.PI;break;case"grad":d=360*d/400;break;case"turn":d*=360;break;default:throw new Error("Unhandled unit: "+n[2])}return v(d,c(n[3]),c(n[4]),n[5]?c(n[5]):1)}return null},fromObject:function(e){return e&&"object"==typeof e&&"r"in e&&"g"in e&&"b"in e?g(e.r,e.g,e.b,e.a):null},toObject:function(t){if(!t||!e.hasInterface(t,n))throw new TypeError("Color is invalid");return{r:t.getRed(),g:t.getGreen(),b:t.getBlue(),a:t.getAlpha()}},interpolate:function(t,r,i){if(!(t&&r&&e.hasInterface(t,n)&&e.hasInterface(r,n)))throw new TypeError("One of the colors is invalid");if(i<=0||t.equals(r))return t;if(i>=1)return r;var a=r.getRed()-t.getRed(),o=r.getGreen()-t.getGreen(),s=r.getBlue()-t.getBlue(),l=r.getAlpha()-t.getAlpha();return g(Math.round(t.getRed()+a*i),Math.round(t.getGreen()+o*i),Math.round(t.getBlue()+s*i),t.getAlpha()+l*i)}},{_argb:null,a:null,r:{enumerable:!0,get:"getRed"},g:{enumerable:!0,get:"getGreen"},b:{enumerable:!0,get:"getBlue"},equals:function(t){return t===this||!!t&&(t instanceof m?this._argb===t._argb&&this.a===t.a:!!e.hasInterface(t,n)&&(this.getRed()===t.getRed()&&this.getGreen()===t.getGreen()&&this.getBlue()===t.getBlue()&&this.a===t.getAlpha()))},getRed:function(){return this._argb>>>16&255},getGreen:function(){return this._argb>>>8&255},getBlue:function(){return 255&this._argb},getAlpha:function(){return this.a},toString:function(){if(0===this._argb)return"transparent";if(255==(this._argb>>>24&255)){var e=(16777215&this._argb).toString(16);return"#00000".substring(0,7-e.length)+e}return"rgba("+this.getRed()+", "+this.getGreen()+", "+this.getBlue()+", "+this.a+")"}}),e.defineProperty(m,"Named",{enumerable:!0,value:e.declareEnum((function(){this.transparent=new m(0,0),this.black=new m(0),this.navy=new m(128),this.darkblue=new m(139),this.mediumblue=new m(205),this.blue=new m(255),this.darkgreen=new m(25600),this.green=new m(32768),this.teal=new m(32896),this.darkcyan=new m(35723),this.deepskyblue=new m(49151),this.darkturquoise=new m(52945),this.mediumspringgreen=new m(64154),this.lime=new m(65280),this.springgreen=new m(65407),this.aqua=new m(65535),this.cyan=new m(65535),this.midnightblue=new m(1644912),this.dodgerblue=new m(2003199),this.lightseagreen=new m(2142890),this.forestgreen=new m(2263842),this.seagreen=new m(3050327),this.darkslategray=new m(3100495),this.darkslategrey=new m(3100495),this.limegreen=new m(3329330),this.mediumseagreen=new m(3978097),this.turquoise=new m(4251856),this.royalblue=new m(4286945),this.steelblue=new m(4620980),this.darkslateblue=new m(4734347),this.mediumturquoise=new m(4772300),this.indigo=new m(4915330),this.darkolivegreen=new m(5597999),this.cadetblue=new m(6266528),this.cornflowerblue=new m(6591981),this.mediumaquamarine=new m(6737322),this.dimgray=new m(6908265),this.dimgrey=new m(6908265),this.slateblue=new m(6970061),this.olivedrab=new m(7048739),this.slategray=new m(7372944),this.slategrey=new m(7372944),this.lightslategray=new m(7833753),this.lightslategrey=new m(7833753),this.mediumslateblue=new m(8087790),this.lawngreen=new m(8190976),this.chartreuse=new m(8388352),this.aquamarine=new m(8388564),this.maroon=new m(8388608),this.purple=new m(8388736),this.olive=new m(8421376),this.gray=new m(8421504),this.grey=new m(8421504),this.skyblue=new m(8900331),this.lightskyblue=new m(8900346),this.blueviolet=new m(9055202),this.darkred=new m(9109504),this.darkmagenta=new m(9109643),this.saddlebrown=new m(9127187),this.darkseagreen=new m(9419919),this.lightgreen=new m(9498256),this.mediumpurple=new m(9662680),this.darkviolet=new m(9699539),this.palegreen=new m(10025880),this.darkorchid=new m(10040012),this.yellowgreen=new m(10145074),this.sienna=new m(10506797),this.brown=new m(10824234),this.darkgray=new m(11119017),this.darkgrey=new m(11119017),this.lightblue=new m(11393254),this.greenyellow=new m(11403055),this.paleturquoise=new m(11529966),this.lightsteelblue=new m(11584734),this.powderblue=new m(11591910),this.firebrick=new m(11674146),this.darkgoldenrod=new m(12092939),this.mediumorchid=new m(12211667),this.rosybrown=new m(12357519),this.darkkhaki=new m(12433259),this.silver=new m(12632256),this.mediumvioletred=new m(13047173),this.indianred=new m(13458524),this.peru=new m(13468991),this.chocolate=new m(13789470),this.tan=new m(13808780),this.lightgray=new m(13882323),this.lightgrey=new m(13882323),this.palevioletred=new m(14184595),this.thistle=new m(14204888),this.orchid=new m(14315734),this.goldenrod=new m(14329120),this.crimson=new m(14423100),this.gainsboro=new m(14474460),this.plum=new m(14524637),this.burlywood=new m(14596231),this.lightcyan=new m(14745599),this.lavender=new m(15132410),this.darksalmon=new m(15308410),this.violet=new m(15631086),this.palegoldenrod=new m(15657130),this.lightcoral=new m(15761536),this.khaki=new m(15787660),this.aliceblue=new m(15792383),this.honeydew=new m(15794160),this.azure=new m(15794175),this.sandybrown=new m(16032864),this.wheat=new m(16113331),this.beige=new m(16119260),this.whitesmoke=new m(16119285),this.mintcream=new m(16121850),this.ghostwhite=new m(16316671),this.salmon=new m(16416882),this.antiquewhite=new m(16444375),this.linen=new m(16445670),this.lightgoldenrodyellow=new m(16448210),this.oldlace=new m(16643558),this.red=new m(16711680),this.fuchsia=new m(16711935),this.magenta=new m(16711935),this.deeppink=new m(16716947),this.orangered=new m(16729344),this.tomato=new m(16737095),this.hotpink=new m(16738740),this.coral=new m(16744272),this.darkorange=new m(16747520),this.lightsalmon=new m(16752762),this.orange=new m(16753920),this.lightpink=new m(16758465),this.pink=new m(16761035),this.gold=new m(16766720),this.peachpuff=new m(16767673),this.navajowhite=new m(16768685),this.moccasin=new m(16770229),this.bisque=new m(16770244),this.mistyrose=new m(16770273),this.blanchedalmond=new m(16772045),this.papayawhip=new m(16773077),this.lavenderblush=new m(16773365),this.seashell=new m(16774638),this.cornsilk=new m(16775388),this.lemonchiffon=new m(16775885),this.floralwhite=new m(16775920),this.snow=new m(16775930),this.yellow=new m(16776960),this.lightyellow=new m(16777184),this.ivory=new m(16777200),this.white=new m(16777215)}))}),m})),define("com/ibm/vipr/util/PaletteBase",["barejs!decl","../api/IColor","../api/IPaletteResolver","./Color"],(function(e,t,n,r){"use strict";var i=/\s*;\s*/;return e.abstractClass((function(t){e.defineProperty(this,"source",{enumerable:!0,value:t})}),n,{split:function(e){return"string"!=typeof e?null:e.trim().split(i)},mapColor:function(n,i){var a=null;if(!(a="string"==typeof n?r.fromString(n):n instanceof r||e.hasInterface(n,t)?r.fromHost(n):r.fromObject(n)))throw new Error('Invalid Color "'+n+'" at index '+i);return a}},{source:null,getSource:function(){return this.source},toString:function(){return this.source?this.source:this._serialize()},_serialize:function(){}})})),define("com/ibm/vipr/util/CatPaletteBase",["barejs!decl","./PaletteBase"],(function(e,t){"use strict";function n(n){var r=n?Array.from(n,t.mapColor,t):new Array(0);if(r.length<1)throw new Error("A Categorical Palette requires at least 1 color");return e.freeze(r)}return e.declareClass((function(r){t.call(this,"string"==typeof r?r:null),e.defineProperty(this,"colors",{enumerable:!0,value:n("string"==typeof r?t.split(r):r)})}),t,{colors:null,_getColorAt:function(e){var t=e%this.colors.length;return t<0&&(t+=this.colors.length),this.colors[t]},getColors:function(){return this.colors},_serialize:function(){return this.colors.join(";")}})})),define("com/ibm/vipr/util/CatPaletteResolver",["barejs!decl","barejs!WeakMap","../api/ICatPalette","./CatPaletteBase"],(function(e,t,n,r){"use strict";var i=new t;return e.declareClass((function(t,n){r.call(this,t),e.defineProperty(this,"defaultIndex",{enumerable:!0,value:Math.floor(n)||0})}),r,n,{defaultIndex:null,getSingleColor:function(e){return this._getColorAt(this.defaultIndex+(+e||0))},getColor:function(e,t,n){if(!(e&&t&&t.mapped))return this.getDefaultColor(null);var r;if(n<0)r=e.getIndex();else{var a=e.getItemInfos();if(n>=a.length)return this.getDefaultColor(null);r=function(e,t,n){var r=i.get(e);r||i.set(e,r=[]);var a=r[n];if(!a){a=r[n]=[];for(var o=e.tuples,s=0,l=o.length;sv))throw new Error("Offset "+f+" of stop definition "+JSON.stringify(u)+" at index "+_+" is out of range ( "+g+"-"+v+" ).");null!==f?(y=!0,d=n.createRelative(c,f)):null!==p?(b=!0,d=n.createAbsolute(c,p)):(I=!0,d=n.createImplicit(c)),m[_]=d}if(b&&y)throw new Error("Mixing absolute and relative stops is not supported");if(I){if(u=m[l-1],b){if(null===(v=u.value))throw new Error("The last value of an absolute palette cannot be implicit")}else null===u.at&&(m[l-1]=n.createRelative(u.color,v));var w=0,C=-1;if(u=m[0],b){if(null==(g=u.value))throw new Error("The first value of an absolute palette cannot be implicit")}else null===u.at?m[0]=n.createRelative(u.color,g):g=u.at;for(_=1;_0&&null===e[0].at}function f(e){var t=0;return e.length>0&&null!==e[0].value&&(t=e[0].value,t=(e[e.length-1].value-t)/2+t),t}function d(e,t){if(c(e))return e;var r=e.length,i=new Array(Math.floor(r/2)+1);i.length=0;for(var a=0;a=0&&i.push(o):s<=0&&i.push(n.createRelative(o.color,s+1))}return i}return e.declareClass(l,{stops:null,interpolate:null,toString:function(){return this.stops.join(";")}}),e.declareClass((function(t,n,i,a){var o=arguments.length<2&&"string"==typeof t;r.call(this,o?t:null);var l=t,p=n,h=i,m=a;if(o){p=null;var g=s.exec(t);if(l=g[2],g[1])switch(g[1]){case"interpolate":h=!0;break;case"discrete":h=!1;break;default:throw new Error("Invalid interpolation")}if(g[3]){if(g[4])switch(g[4]){case"equalize":m=!0;break;case"exact":m=!1;break;default:throw new Error("Invalid equalization")}p=g[5]}}if("string"==typeof l&&(l=r.split(l)),"string"==typeof p&&(p=r.split(p)),l=u(l,!1),p=u(p,!0),e.defineProperties(this,{linear:{enumerable:!0,value:l},divergent:{enumerable:!0,value:p},_lowStops:{enumerable:!0,value:l.length>0?l:d(p,!1)},_highStops:{enumerable:!0,value:l.length>0?l:d(p,!0)},interpolate:{enumerable:!0,value:!1!==h},equalize:{enumerable:!0,value:!c(p)&&!1!==m},midPoint:{enumerable:!0,value:f(p)}}),this.linear.length<1&&this.divergent.length<1)throw new Error("A Continuous Palette requires either linear or divergent stops")}),r,{linear:null,divergent:null,_lowStops:null,_highStops:null,midPoint:null,interpolate:null,equalize:null,_getStopsFor:function(e){var t=0,r=0,i=!1;e&&(t=e.min,r=e.max,i=this.divergent.length>0&&tthis.midPoint);var a,o=i?this.divergent:tp&&(p=d));for(var h=0;h0&&(e=e+"|"+this.divergent.join(";")),e}})})),define("com/ibm/vipr/util/ContPaletteResolver",["barejs!decl","../api/IContPalette","./ContPaletteBase"],(function(e,t,n){"use strict";return e.declareClass((function(e,t,r,i){n.apply(this,arguments)}),n,t,{getColorStops:function(e,t){return this._getStopsFor(t)}})})),define("com/ibm/vipr/util/CustomContPaletteResolver",["barejs!decl","../api/ICustomContPalette","./ContPaletteBase"],(function(e,t,n){"use strict";return e.declareClass((function(e,t,r,i){n.apply(this,arguments)}),n,t,{getColorStops:function(e){return this._getStopsFor(e)}})})),define("com/ibm/vipr/api/IPreRenderCallback",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{preRender:function(e,t){}})})),define("com/ibm/vipr/api/IPreRenderNotification",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{complete:function(){},error:function(e){}})})),define("com/ibm/vipr/rs/v1/IRSRenderNotification",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{timeout:t.readOnlyProperty,complete:function(e,t,n){},fail:function(e,t,n){},abort:function(e,t,n){},error:function(e){},animating:function(){},pause:function(){},resume:function(){},progress:function(e,t,n,r){},keepAlive:function(){},getTimeout:function(){}}),n})),define("com/ibm/vipr/rs/v1/IRSRenderParameters",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{format:t.readOnlyProperty,width:t.readOnlyProperty,height:t.readOnlyProperty,getFormat:function(){},getWidth:function(){},getHeight:function(){}}),n})),define("com/ibm/vipr/internal/util/RenderParameters",["barejs!decl","com/ibm/vipr/rs/v1/IRSRenderParameters"],(function(e,t){"use strict";function n(n){"string"==typeof n?e.defineProperties(this,{format:{enumerable:!0,value:n},width:{enumerable:!0,value:arguments[1]},height:{enumerable:!0,value:arguments[2]}}):e.hasInterface(n,t)&&e.defineProperties(this,{format:{enumerable:!0,get:n.getFormat.bind(n)},width:{enumerable:!0,get:n.getWidth.bind(n)},height:{enumerable:!0,get:n.getHeight.bind(n)}})}return e.declareClass(n,t,{fromHost:function(e){return e?new n(e):null}},{width:null,height:null,format:null,getWidth:function(){return this.width},getHeight:function(){return this.height},getFormat:function(){return this.format},get:function(e){return this.hasOwnProperty(e)?this[e]:null},has:function(e){return this.hasOwnProperty(e)}})})),define("com/ibm/vipr/internal/util/Deferred",["barejs!decl","barejs!Promise"],(function(e,t){"use strict";return e.declareClass((function(){var n=this;e.defineProperty(n,"_promise",{value:new t((function(t,r){e.defineProperties(n,{_resolve:{writable:!0,value:t},_reject:{writable:!0,value:r}})}))})}),{resolve:function(e){return t.resolve(e)},reject:function(e){return t.reject(e)},execute:function(e){return new t(e)},all:function(e){return t.all(e)}},{_promise:null,_resolve:null,_reject:null,complete:function(e){return this._resolve&&(this._resolve(e),this._resolve=this._reject=null),this._promise},fail:function(e){return this._reject&&(this._reject(e),this._resolve=this._reject=null),this._promise},getPromise:function(){return this._promise},join:function(){return this._promise}})})),define("com/ibm/vipr/internal/util/Timer",["barejs!decl","barejs!Destroyable"],(function(e,t){"use strict";function n(e){return Math.max(0,Math.floor(e)||0)}function r(e){if(null==e)return null;if("function"!=typeof e)throw new TypeError(e+" is not a function.");return e}function i(i,a,o){t.call(this),e.defineProperties(this,{_tid:{writable:!0,value:null},_time:{writable:!0,value:n(a)},_tick:{writable:!0,value:r(i)},_auto:{value:!!o}})}return e.declareClass(i,t,{run:function(e,t){return new i(e,t,!0).start()}},{_tid:null,_time:null,_tick:null,_auto:null,destroy:function(){this.stop(),this._tick=null,t.prototype.destroy.call(this)},time:{enumerable:!0,get:function(){return this._time},set:function(e){this._time=n(e)}},tick:{enumerable:!0,get:function(){return this._tick},set:function(e){this._tick=r(e)}},active:{enumerable:!0,get:function(){return null!==this._tid}},start:function(){var e=this,r=arguments[0];if(r="number"!=typeof r?this.time:n(r),null!==e._tid&&(clearTimeout(e._tid),e._tid=null),t.isDestroyed(this))throw new Error("Timer has been destroyed");return e._tid=setTimeout((function(){e._tid=null;var t=e._tick;e._auto&&e.destroy(),t&&t()}),r),e},stop:function(){return null!==this._tid&&(clearTimeout(this._tid),this._tid=null),this}})})),define("com/ibm/vipr/util/RenderQueue",["barejs!decl","barejs!NMap","barejs!WeakMap","../api/IRenderHandle","../api/IPreRenderCallback","../api/IPreRenderNotification","../api/RenderMessage","../api/RenderStatus","../api/IRenderInterrupt","com/ibm/vipr/rs/v1/IRSRenderNotification","../internal/util/RenderParameters","../internal/util/Deferred","../internal/util/Timer"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d){"use strict";var p=new n,h=/^(?:complete|failed|aborted|timeout)$/,m=/^(?:rendering|animating|paused)$/;function g(){f.call(this)}function v(e,t,n){t?e.complete(n):e.fail(n)}function b(t,n,r,a){p.set(this,n),e.defineProperties(this,{format:{enumerable:!0,value:t},status:{enumerable:!0,writable:!0,value:s.Pending},_progress:{writable:!0,value:null},_promise:{value:r},_preRender:{value:e.asFunctional(a,i)}})}function y(t,n){e.defineProperties(this,{_renderParams:{value:t||new c("client")},_status:{writable:!0,value:s.Pending},_pauseStatus:{writable:!0,value:null},_handles:{value:[]},_handleDfds:{value:[]},_timer:{writable:!0,value:null},_interrupt:{writable:!0,value:null},_progress:{writable:!0,value:0},_linked:{writable:!0,value:null},_notify:{writable:!0,value:this.as(u)},_onSettle:{writable:!0,value:n},_destroyError:{writable:!0,value:null},_abortRequested:{writable:!0,value:!1}})}return e.declareClass(g,f,a,{complete:function(){f.prototype.complete.call(this,null)},error:function(e){this.fail(e)}}),e.declareClass(b,r,{format:null,status:null,_progress:null,_promise:null,_preRender:null,supportsPause:{enumerable:!0,get:function(){var e=p.get(this);return!(!e||!e.supportsPause)}},supportsComplete:{enumerable:!0,get:function(){var e=p.get(this);return!(!e||!e.supportsComplete)}},supportsAbort:{enumerable:!0,get:function(){var e=p.get(this);return!(!e||!e.supportsAbort)}},onprogress:{enumerable:!0,get:function(){return this._progress},set:function(e){if(null!=e&&"function"!=typeof e)throw new TypeError("onprogress callback must be null or a function.");this._progress=e||null}},then:function(e,t){return this._promise.then(e,t)},catch:function(e){return this._promise.catch(e)},pause:function(){var e=p.get(this);return!!e&&e.requestPause()},resume:function(){var e=p.get(this);return!!e&&e.requestResume()},complete:function(){var e=p.get(this);return!!e&&e.requestComplete()},abort:function(){var e=p.get(this);return!!e&&e.requestAbort()},emitProgress:function(e){this._progress&&this._progress(e,this)},invokePreRender:function(){var e=null;return this._preRender&&(e=new g,this._preRender.preRender(e,this)),e&&e.getPromise()}}),e.declareClass(y,u,{_status:null,_pauseStatus:null,_handles:null,_handleDfds:null,_timer:null,_interrupt:null,_progress:null,_linked:null,_notify:null,_onSettle:null,_destroyError:null,_abortRequested:null,timeout:{enumerable:!0,get:"getTimeout"},destroy:function(e){var t=3e3;return this._destroyError=e,this._timer&&(t=Math.max(500,this._timer.time/5),this._timer.destroy(),this._timer=null),this._interrupt?(this._abortRequested||(this.requestAbort(),this._abortRequested=!1),this._timer=new d(this._timeout.bind(this),t),this._timer.start()):this.abort("destroy",e.message,e),this._handles[this._handles.length-1]},add:function(e,t){var n=new f,r=new b(this._renderParams.format,this,n.getPromise(),t);if(e)try{r.onprogress=e}catch(e){r.status=s.Failed,n.fail(new o(r.status,1,"error",e.message,e)),n=null}return n&&(this._handles.push(r),this._handleDfds.push(n)),r},execute:function(e,t,n,r){r>0&&(this._timer=new d(this._timeout.bind(this),r));var i=this._handles,o=this.startRender.bind(this,t,n),l=this.error.bind(this);function u(){for(var e=[],t=0,n=i.length;t0?e.length>1?f.all(e).then(o,l):e[0].then(o,l):o()}if(this._setStatus(s.Blocked),e)try{e(this._renderParams,Object.create(a.prototype,{complete:{enumerable:!0,value:u},error:{enumerable:!0,value:this.error.bind(this)}}))}catch(e){this.error(e)}else u()},startRender:function(t,n){if(this._status!==s.Failed&&this._status!==s.Aborted)try{if(this._status!==s.Blocked)throw new Error("Internal error: cannot render from status "+this._status);this._timer&&this._timer.start(),this._setStatus(s.Rendering);var r=t(this._renderParams,this._notify,n)||null;if(r&&!e.hasInterface(r,l))throw new TypeError("Invalid interrupt api returned by renderer");this._interrupt=r}catch(e){this.error(e)}},link:function(t){if(this._linked)throw new Error("Cannot link to two different handles.");if(!(t instanceof b||e.hasInterface(t,r)))throw new TypeError;var n=t.status;h.test(n)||(t.onprogress=this._handleProgress.bind(this),n!==s.Pending&&n!==s.Blocked&&this._setStatus(n));var i=this._finish.bind(this);t.then(i,i),this._linked=t},complete:function(e,t,n){this._checkId(e)&&this._finish(new o(s.Complete,1,e,t,n))},fail:function(e,t,n){this._checkId(e)&&this._finish(new o(s.Failed,1,e,t,n))},abort:function(e,t,n){this._checkId(e)&&this._finish(this._destroyError&&!this._abortRequested?new o(s.Aborted,0,"destroy",this._destroyError.message,this._destroyError):new o(s.Aborted,0,e,t,n))},error:function(e){var t=null,n=null;if("string"==typeof e)t=e;else if(e){var r=Object(e);if(!("name"in r)||!("message"in r))throw new TypeError("Invalid _error provided");t=e.message,n=e}this._finish(new o(s.Failed,1,"error",t,n))},animating:function(){this._status===s.Rendering&&this._setStatus(s.Animating)},pause:function(){this._status!==s.Rendering&&this._status!==s.Animating||(this._timer&&this._timer.stop(),this._pauseStatus=this._status,this._setStatus(s.Paused))},resume:function(){this._status===s.Paused&&(this._setStatus(this._pauseStatus),this._pauseStatus=null,this._timer&&this._timer.start())},progress:function(e,t,n,r){this._handleProgress(new o(this._status,e,t,n,r))},keepAlive:function(){this._handleProgress(null)},getTimeout:function(){return this._timer.time},supportsPause:{enumerable:!0,get:function(){return this._linked?this._linked.supportsPause:m.test(this._status)&&!(!this._interrupt||!this._interrupt.supportsPause)}},supportsAbort:{enumerable:!0,get:function(){return this._linked?this._linked.supportsAbort:this._status===s.Pending||m.test(this._status)&&!(!this._interrupt||!this._interrupt.supportsAbort)}},supportsComplete:{enumerable:!0,get:function(){return this._linked?this._linked.supportsComplete:m.test(this._status)&&!(!this._interrupt||!this._interrupt.supportsComplete)}},requestAbort:function(){if(this._linked)return this._linked.abort();var e=this.supportsAbort;return e&&(this._abortRequested=!0,this._status===s.Pending?(this.abort(),e=!0):e=!!this._interrupt.abort(this._notify)),e},requestPause:function(){return this._linked?this._linked.pause():this._status===s.Paused||this.supportsPause&&!!this._interrupt.pause(this._notify)},requestResume:function(){return this._linked?this._linked.resume(this._notify):this._status===s.Rendering||this._status===s.Animating||this.supportsPause&&!!this._interrupt.resume(this._notify)},requestComplete:function(){return this._linked?this._linked.complete(this._notify):this._status===s.Complete||this.supportsComplete&&!!this._interrupt.complete(this._notify)},_checkId:function(e){var t=null===e||"object"!=typeof e||!("then"in e);return t||this.error(new Error("RenderingService attempted to complete a render with a Promise")),t},_setStatus:function(e){if(this._status!==e){this._status=e;var t=this._handles.length-1,n=null;if(h.test(e)||e===s.Blocked||(n=new o(e,this._progress,"status",null,e)),t>=0){var r;if(t>0)for(var i=n&&n.makeObsolete(!0),a=0;a=0){if(t>0)for(var n=e.makeObsolete(!0),r=0;r=0){if(n>0)for(var i=e.makeObsolete(!0),a=0;a0&&(a=!!r.test(e)||!i.test(e)&&(void 0===n?null:n)),null!==a||t||(a=null!=n&&n),a}},{_parseImpl:function(e,t){switch(typeof e){case"boolean":return e;case"string":return a.parse(e,this.allowNull,t)}return t},_clone:function(e,t,n,r,i,o){return new a(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,o,this.serviceWritable,this.requiresData)}})})),define("com/ibm/vipr/vizdef/CapabilityDef",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(t){e.defineProperty(this,"decorations",{enumerable:!0,value:t})}),{decorations:null,getDecoration:function(e){for(var t=0,n=this.decorations.length;t0&&((r=i.fromString(e))||(r=void 0===n?null:n)),t||null!==r||(r=null==n?i.Named.black:n),r}},{_parseImpl:function(t,r){return"string"==typeof t?o.parse(t,this.allowNull,r):t instanceof i||e.hasInterface(t,n)?i.fromHost(t):i.fromObject(t)||r},_clone:function(e,t,n,r,i,a){return new o(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,a,this.serviceWritable,this.requiresData)}})})),define("com/ibm/vipr/vizdef/DataSetDef",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(t,n,r,i,a,o,s,l,u){e.defineProperties(this,{index:{enumerable:!0,value:t},slots:{enumerable:!0,value:n},name:{enumerable:!0,value:r},optional:{enumerable:!0,value:i},suppressMissing:{enumerable:!0,value:a},needsSorted:{enumerable:!0,value:o},requiresValues:{enumerable:!0,value:s},uniqueDataPoints:{enumerable:!0,value:l},caption:{enumerable:!0,value:u||r}})}),{slots:null,optional:null,suppressMissing:null,needsSorted:null,requiresValues:null,uniqueDataPoints:null,caption:null,hasSlot:function(e){return this.slots.some((function(t){return t.name===e}))},getSlot:function(e){return this.slots.find((function(t){return t.name===e}))||null}})})),define("com/ibm/vipr/vizdef/DecorationDef",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(t,n,r,i,a,o){return e.defineProperties(this,{name:{enumerable:!0,value:t},type:{enumerable:!0,value:n},target:{enumerable:!0,value:r},targetSlot:{enumerable:!0,value:i},referenceSlot:{enumerable:!0,value:a},deprecated:{enumerable:!0,value:o}})}),{name:null,type:null,target:null,targetSlot:null,referenceSlot:null,deprecated:null})})),define("com/ibm/vipr/vizdef/DefaultMapping",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.None="none",this.Rows="rows"}))})),define("com/ibm/vipr/vizdef/EnumPropertyDef",["barejs!decl","../internal/property/EnumValue","../property/PropertyType","./ValuePropertyDef"],(function(e,t,n,r){"use strict";function i(e){return e instanceof t}function a(a,o,s,l,u,c,f,d,p,h,m,g,v,b){if(!Array.isArray(v)||!v.every(i))throw new TypeError("_possibleValues must be an Array of EnumValue");if(null!==h&&(!(h instanceof t)||v.indexOf(h)<0))throw new TypeError("Invalid defaultValue: "+h);r.call(this,n.Enum,a,o,s,l,u,c,f,d,p,h,m,g),e.defineProperties(this,{possibleValues:{enumerable:!0,value:v},dynamic:{enumerable:!0,value:b}}),this._validate()}return e.declareClass(a,r,{parse:function(e,t,n,r){var i=Array.isArray(n)?n.length:0;if(i<1&&!t)throw new TypeError("PossibleValues must have at least 1 value");if(null!=e)for(var a=0;a=0?e:"string"==typeof e?a.parse(e,this.allowNull,this.possibleValues,n):n},_clone:function(e,t,n,r,i,o){return new a(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,o,this.serviceWritable,this.requiresData,this.possibleValues,this.dynamic)},_nullDefault:function(){(!this.dynamic||this.possibleValues.length>0)&&r.prototype._nullDefault.call(this)}})})),define("com/ibm/vipr/vizdef/FieldRole",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Explanatory="explanatory",this.Group="group",this.Other="other",this.Reference="reference",this.Repeat="repeat",this.Response="response",this.Weight="weight"}))})),define("com/ibm/vipr/vizdef/FontPropertyDef",["barejs!decl","./ValuePropertyDef","../property/PropertyType","../util/Font","../util/Length","../property/LengthUnit"],(function(e,t,n,r,i,a){"use strict";var o=new r(null,new i(1,a.Em),null,null);function s(e,r,i,a,o,s,l,u,c,f,d,p){t.call(this,n.Font,e,r,i,a,o,s,l,u,c,f,d,p),this._validate()}return e.declareClass(s,t,{parse:function(e,t,n){var i=null;return e&&(i=r.parse(e)),t||null!==i||(i=null==n?o:n),i}},{_parseImpl:function(e,t){var n=null;return e instanceof r?n=e:"string"==typeof e&&(n=s.parse(e,this.allowNull,t)),n||(n=t),n},_clone:function(e,t,n,r,i,a){return new s(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,a,this.serviceWritable,this.requiresData)}})})),define("com/ibm/vipr/vizdef/SlotType",["barejs!decl","../data/DataItemType"],(function(e,t){"use strict";return e.declareEnum((function(){this.Cat=t.Cat,this.Cont=t.Cont,this.Any="any"}))})),define("com/ibm/vipr/vizdef/SlotSubType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.None="none",this.GeoSpatial="geospatial",this.Temporal="temporal",this.Reference="reference"}))})),define("com/ibm/vipr/vizdef/SlotDef",["barejs!decl","./Aggregation","./DefaultMapping","./FieldRole","./SlotType","./SlotSubType"],(function(e,t,n,r,i,a){"use strict";var o=e.freeze(new Array(0));function s(e,t,n,r,i){if(!r){var a=n+" cannot be null";throw i&&(a+=", "+i),new TypeError(a)}if("string"!=typeof r||!e.hasValue(r))throw new TypeError(n+" is not a valid "+t+": "+r)}function l(l,u,c,f,d,p,h,m,g,v,b,y,I,_,w){if(s(i,"SlotType","_type",l),s(a,"SlotSubType","_subType",u,"use SlotSubType.None instead"),s(t,"Aggregation","_aggregation",b,"use Aggregation.Auto for Cont or Any slots, and Aggregation.None for Cat slots"),s(r,"FieldRole","_role",I,"use FieldRole.Other instead"),s(n,"DefaultMapping","_defaultMapping",_,"use DefaultMapping.None instead"),l===i.Cat&&b!==t.None)throw new TypeError("_aggregation must be Aggregation.None for Cat slots");var C=Math.trunc(v)||0;e.defineProperties(this,{type:{enumerable:!0,value:l},subType:{enumerable:!0,value:u},subTypeOptional:{enumerable:!0,value:!!c},name:{enumerable:!0,value:f},optional:{enumerable:!0,value:!!d},caption:{enumerable:!0,value:p},description:{enumerable:!0,value:h||null},multiDataItem:{enumerable:!0,value:!!m},channels:{enumerable:!0,value:g||o},maxLevels:{enumerable:!0,value:v<1?-1:C},aggregation:{enumerable:!0,value:b},suppressMissing:{enumerable:!0,value:!!y},role:{enumerable:!0,value:I},defaultMapping:{enumerable:!0,value:_},hidden:{enumerable:!0,value:!!w}})}return e.declareClass(l,{type:null,subType:null,subTypeOptional:null,name:null,optional:null,caption:null,description:null,channels:null,multiDataItem:null,maxLevels:null,aggregation:null,suppressMissing:null,role:null,defaultMapping:null,hidden:null,override:function(e){if(e.isEmpty())return this;var n=e.getType(this.type);if(n!==this.type&&this.type!==i.Cat)throw new Error("Only the type of Any slots can be overridden");var r=e.getOptional(this.optional);if(r!==this.optional&&!this.optional)throw new Error("Cannot make a mandatory slot optional");var a=e.getAggregation(this.aggregation);if(a!==this.aggregation){if(n===i.Cat)throw new Error("Cannot set an aggregation for a Cat slot");if(a===t.None)throw new Error("Cannot override aggregation to be None")}return new l(n,this.subType,this.subTypeOptional,this.name,r,e.getCaption(this.caption),e.getDescription(this.description),this.multiDataItem,this.channels,this.maxLevels,a,e.getSuppressMissing(this.suppressMissing),e.getRole(this.role),e.getDefaultMapping(this.defaultMapping),e.getHidden(this.hidden))},isValues:{get:function(){return this.type!==i.Cat}},singleMember:{get:function(){return this.type===i.Cont&&!this.multiDataItem}},toString:function(){return this.name}})})),define("com/ibm/vipr/vizdef/GeoSpatialPart",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Latitude="latitude",this.Longitude="longitude",this.FeatureId="featureid",this.Caption="caption"}))})),define("com/ibm/vipr/vizdef/GeoSegmentDef",["barejs!decl","./SlotDef","./Aggregation","./SlotType","./SlotSubType","./GeoSpatialPart"],(function(e,t,n,r,i,a){"use strict";function o(n,r,a,o,s,l,u,c,f,d,p,h,m,g){t.call(this,n,i.GeoSpatial,!1,r,a,o,s,l,u,c,f,d,p,h,m),e.defineProperty(this,"part",{enumerable:!0,value:g})}return e.declareClass(o,t,{create:function(e,t,i,s,l,u,c,f,d,p){var h=r.Cat;p!==a.Longitude&&p!==a.Latitude||(h=r.Cont);var m=p===a.Caption?-1:1,g=h!==r.Cont&&s;return new o(h,e+"."+p,l,u,c,!1,null,m,f||(h===r.Cat?n.None:n.Auto),g,d,t,i,p)}},{part:null,override:function(e){if(e.isEmpty())return this;var t=e.getOptional(this.optional);if(t!==this.optional&&!this.optional)throw new Error("Cannot make a mandatory slot optional");var n=e.getAggregation(this.aggregation);if(n!==this.aggregation)throw new Error("Changing a segment aggregation is not allowed");return new o(this.type,this.name,t,e.getCaption(this.caption),e.getDescription(this.description),this.multiDataItem,this.channels,this.maxLevels,n,e.getSuppressMissing(this.suppressMissing),e.getRole(this.role),e.getDefaultMapping(this.defaultMapping),e.getHidden(this.hidden),this.part)}})})),define("com/ibm/vipr/vizdef/SlotRef",["barejs!decl","./SlotDef","./SlotSubType"],(function(e,t,n){"use strict";function r(n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v){t.call(this,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g),e.defineProperties(this,{dataSetIndex:{enumerable:!0,value:+v||0},_reference:{writable:!0,value:null}})}return e.declareClass(r,{create:function(e,t,n){return new r(e.type,e.subType,e.subTypeOptional,e.name,t,e.caption,e.description,e.multiDataItem,e.channels,e.maxLevels,e.aggregation,e.suppressMissing,e.role,e.defaultMapping,e.hidden,n)}},{type:null,subType:null,subTypeOptional:null,name:null,optional:null,caption:null,description:null,channels:null,multiDataItem:null,maxLevels:null,aggregation:null,suppressMissing:null,role:null,defaultMapping:null,hidden:null,dataSetIndex:null,reference:{enumerable:!0,get:"getReference"},_reference:null,getReference:function(){return this._reference},setReference:function(e){if(this.subType!==n.Reference)throw new Error("Reference can only be set on slots with SlotSubType.Reference");if(this._reference)throw new Error("Reference can only be set once");if(!(e instanceof r))throw new TypeError("Setting a null reference is not allowed");if(e===this)throw new Error("A slot cannot reference itself");if(e.type!==this.type)throw new Error("A "+this.type+" slot can only reference a slot of the same type");if(this.name===e.name)throw new Error("Slot "+this.name+" cannot reference a slot with the same name");this._reference=e},toString:function(){return this.name}})})),define("com/ibm/vipr/vizdef/GeoSegmentRef",["barejs!decl","./SlotRef","./SlotSubType"],(function(e,t,n){"use strict";function r(r,i,a,o,s,l,u,c,f,d,p,h,m,g,v){t.call(this,r,n.GeoSpatial,!1,i,a,o,s,l,u,c,f,d,p,h,m,v),e.defineProperty(this,"part",{enumerable:!0,value:g})}return e.declareClass(r,t,{create:function(e,t){return new r(e.type,e.name,e.optional,e.caption,e.description,e.multiDataItem,e.channels,e.maxLevels,e.aggregation,e.suppressMissing,e.role,e.defaultMapping,e.hidden,e.part,t)},defsToRefs:function(e,t){var n=[],i=+(e&&e.length)||0;if(i>0){n=new Array(i);for(var a=0;athis.maxValue&&(n=this.maxValue)),n},_clone:function(e,t,n,r,i,o){return new a(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,o,this.serviceWritable,this.requiresData,this.minValue,this.maxValue)},_validate:function(){if(t.prototype._validate.call(this),null!==this.minValue&&null!==this.maxValue&&this.maxValuethis.maxValue)throw new Error("defaultValue "+this.defaultValue+" is out of bounds, it is above maxValue "+this.maxValue)}}})})),define("com/ibm/vipr/vizdef/SlotGroupDef",["barejs!decl","./SlotType","./SlotSubType","./FieldRole"],(function(e,t,n,r){"use strict";return e.declareClass((function(t,n,r){e.defineProperties(this,{caption:{enumerable:!0,value:t},description:{enumerable:!0,value:n},slots:{enumerable:!0,value:r}})}),{caption:null,description:null,slots:null,toString:function(){return this.caption}})})),define("com/ibm/vipr/vizdef/StringPropertyDef",["barejs!decl","./ValuePropertyDef","../property/PropertyType"],(function(e,t,n){"use strict";function r(e,r,i,a,o,s,l,u,c,f,d,p){t.call(this,n.String,e,r,i,a,o,s,l,u,c,f,d,p),this._validate()}return e.declareClass(r,t,{parse:function(e,t,n){return"string"==typeof e?e:null!=n||t?n:""}},{_parseImpl:function(e,t){return r.parse(null===e?null:String(e),this.allowNull,t)},_clone:function(e,t,n,i,a,o){return new r(this.name,e,t,n,i,a,this.deprecated,this.affectedBy,this.allowNull,o,this.serviceWritable,this.requiresData)}})})),define("com/ibm/vipr/vizdef/PalettePropertyDef",["barejs!decl","./ValuePropertyDef","../api/PaletteType","../property/PropertyType","../util/CatPaletteResolver","../util/ContPaletteResolver","../util/CustomCatPaletteResolver","../util/CustomContPaletteResolver","../api/ICatPalette","../api/IContPalette","../api/ICustomCatPalette","../api/ICustomContPalette"],(function(e,t,n,r,i,a,o,s,l,u,c,f){"use strict";function d(n,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b){t.call(this,r.Palette,n,i,a,o,s,l,u,c,f,d,p,h),e.defineProperties(this,{slot:{enumerable:!0,value:m},paletteType:{enumerable:!0,value:g},min:{enumerable:!0,value:v},max:{enumerable:!0,value:b}})}return e.declareClass(d,t,{parse:function(e,t,r,l){if(t)switch(e){case n.Cat:return new i(t);case n.CustomCat:return new o(t);case n.Cont:return new a(t);case n.CustomCont:return new s(t);default:throw new Error("Unsupported PaletteType: "+e)}else if(!r){if(!l)throw new Error("Invalid fallback resolver provided");return l}return null}},{slot:null,paletteType:null,min:null,max:null,_parseImpl:function(t,r){switch(this.paletteType){case n.Cat:if(e.hasInterface(t,l))return t;break;case n.Cont:if(e.hasInterface(t,u))return t;break;case n.CustomCat:if(e.hasInterface(t,c))return t;break;case n.CustomCont:if(e.hasInterface(t,f))return t;break;default:throw new Error("Unsupported PaletteType: "+this.paletteType)}try{if("string"==typeof t)return d.parse(this.paletteType,t,this.allowNull,r)}catch(e){}return r},_clone:function(e,t,n,r,i,a){return new d(this.name,e,t,n,r,i,this.deprecated,this.affectedBy,this.allowNull,a,this.serviceWritable,this.requiresData,this.slot,this.paletteType,this.min,this.max)}})})),define("com/ibm/vipr/vizdef/TemporalAttributeDef",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(t,n){return e.defineProperties(this,{level:{enumerable:!0,value:t},optional:{enumerable:!0,value:n}})}),{level:null,optional:null})})),define("com/ibm/vipr/vizdef/TemporalLevel",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Year="year",this.Month="month",this.Day="day",this.Hour="hour",this.Minute="minute",this.Second="second",this.Fraction="fraction"}))})),define("com/ibm/vipr/vizdef/TemporalSlotDef",["barejs!decl","./SlotDef","./SlotSubType","./SlotType"],(function(e,t,n,r){"use strict";function i(i,a,o,s,l,u,c,f,d,p,h,m,g,v){t.call(this,r.Cat,n.Temporal,i,a,o,s,l,u,c,f,d,p,h,m,v),e.defineProperty(this,"attributes",{enumerable:!0,value:g})}return e.declareClass(i,t,{attributes:null,override:function(e,n){var r=t.prototype.override.call(this,e);return new i(r.subTypeOptional,r.name,r.optional,r.caption,r.description,r.multiDataItem,r.channels,r.maxLevels,r.aggregation,r.suppressMissing,r.role,r.defaultMapping,n,r.hidden)}})})),define("com/ibm/vipr/vizdef/TemporalSlotRef",["barejs!decl","./SlotRef","./SlotSubType","./SlotType"],(function(e,t,n,r){"use strict";function i(i,a,o,s,l,u,c,f,d,p,h,m,g,v,b){t.call(this,r.Cat,n.Temporal,i,a,o,s,l,u,c,f,d,p,h,m,v,b),e.defineProperty(this,"attributes",{enumerable:!0,value:g})}return e.declareClass(i,t,{create:function(e,t,n){return new i(e.subTypeOptional,e.name,t,e.caption,e.description,e.multiDataItem,e.channels,e.maxLevels,e.aggregation,e.suppressMissing,e.role,e.defaultMapping,e.attributes,e.hidden,n)}},{attributes:null})})),define("com/ibm/vipr/internal/vizdef/PropertyOverride",["barejs!decl"],(function(e){"use strict";var t=void 0;function n(e){return null==e?t:String(e)}function r(t,n,r,i){e.defineProperties(this,{caption:{enumerable:!0,value:t},description:{enumerable:!0,value:n},defaultValue:{enumerable:!0,value:r},aliases:{enumerable:!0,value:i}})}return e.declareClass(r,{DEFAULT_CAPTION:{enumerable:!0,value:t},DEFAULT_DESCRIPTION:{enumerable:!0,value:t},DEFAULT_VALUE:{enumerable:!0,value:t},DEFAULT_ALIASES:{enumerable:!0,value:t},create:function(i){var a=null;return i&&(a=new r("caption"in i?n(i.caption):t,"description"in i?n(i.description):t,"defaultValue"in i?i.defaultValue:t,"aliases"in i?i.aliases:t)),!a||a.isEmpty()?r.Empty:e.freeze(a)},merge:function(e,t){var n=!t||t.isEmpty();return!e||e.isEmpty()?n?r.Empty:t:n?e:new r(t.getCaption(e.caption),t.getDescription(e.description),t.getDefaultValue(e.defaultValue),t.getAliases(e.aliases))}},{caption:null,description:null,defaultValue:null,getCaption:function(e){return this.caption===t?e:this.caption},getDescription:function(e){return this.description===t?e:this.description},getDefaultValue:function(e){return this.defaultValue===t?e:this.defaultValue},getAliases:function(e){return this.aliases===t?e:function(e,t){if(!t||0===t.length||t===e)return e;for(var n=e?e.slice(0):[],r=0,i=t.length;r0&&s.push(new i(d.caption,d.description,e.freeze(p)))}return s}(u,a,f=[],o),h=function(e,t){for(var r,i,a,o=0,s=[],l=[],u=0;u0&&s.push(new n(o++,h,c.name,c.optional,c.suppressMissing,c.needsSorted,c.requiresValues,c.uniqueDataPoints,c.caption))}for(r=0,i=l.length;r0&&(u=e.freeze(function e(t,n,r){for(var i=t?t.slice(0):[],a=0;a0&&(c=e.freeze(function(e,t,n){for(var r=e?e.slice(0):[],i=0,a=t.length;i0){o.updating=!0;try{s.forEach((function(e,t){var n=o.properties.get(t);n instanceof h&&!n.def.deprecated&&n.setValue(e)}))}finally{o.updating=!1}}}return t.valuesEqual(r,this._value)||this.setParsedValue(r,i),this._value},setParsedValue:function(e,n){var r=this._value;this._value=e,this._rsPeek=n,this._locked||(this._rsValue=n),t.isDestroyed(this)||this.emit("value",new s(this.toHost(),r))},isDirtyForHost:function(){return this._rsPeek!==this._renValue},isDirtyForRS:function(){return this._rsValue!==this._renValue},_evaluate:function(){var e=this._deprecated;if(!e.updating){var t=e.api.evaluate(e.rsProperties,this._rsPeek);e.updating=!0,this.setValue(t),e.updating=!1}},_parse:function(e,t){return this.def.parse(e,t)},_markRendered:function(e){e&&(this._renValue=this._rsValue),this._rsValue=this._rsPeek},lock:function(){this._locked=!0},isLocked:function(){return this._locked},unlock:function(e){this._locked&&(this._markRendered(e),this._locked=!1)}})})),define("com/ibm/vipr/internal/property/BooleanProperty",["barejs!decl","../../property/IVizBooleanProperty","com/ibm/vipr/rs/v1/IRSBooleanProperty","./ValueProperty"],(function(e,t,n,r){"use strict";function i(e){r.RSValueProperty.call(this,e)}function a(e,t){r.VizValueProperty.call(this,e,t)}return e.declareClass(i,r.RSValueProperty,n),e.declareClass(a,r.VizValueProperty,t),e.declareClass((function(t,n,o){r.call(this,t,n,o,(function(e){return e})),e.defineProperties(this,{_rs:{value:new i(this)},_host:{value:new a(this,t)}})}),r,{_rs:null,_host:null,toHost:function(){return this._host},toRS:function(){return this._rs}})})),define("com/ibm/vipr/rs/v1/IRSColorProperty",["barejs","./IRSValueProperty"],(function(e,t){"use strict";function n(){}return e.decl.declareInterface(n,t),n})),define("com/ibm/vipr/internal/property/ColorProperty",["barejs!decl","../../property/IVizColorProperty","com/ibm/vipr/rs/v1/IRSColorProperty","../../util/Color","./ValueProperty"],(function(e,t,n,r,i){"use strict";function a(e){i.RSValueProperty.call(this,e)}function o(e,t){i.VizValueProperty.call(this,e,t)}return e.declareClass(a,i.RSValueProperty,n),e.declareClass(o,i.VizValueProperty,t),e.declareClass((function(t,n,r){i.call(this,t,n,r,(function(e){return e})),e.defineProperties(this,{_rs:{value:new a(this)},_host:{value:new o(this,t)}})}),i,{_rs:null,_host:null,toHost:function(){return this._host},toRS:function(){return this._rs}})})),define("com/ibm/vipr/rs/v1/IRSEnumProperty",["barejs","./IRSValueProperty"],(function(e,t){"use strict";function n(){}return e.decl.declareInterface(n,t,{getPossibleValues:function(){},setPossibleValues:function(e,t){}}),n})),define("com/ibm/vipr/internal/property/EnumProperty",["barejs!decl","barejs!NSet","barejs!WeakMap","../../property/IVizEnumProperty","../../property/PropertyValueEventArgs","com/ibm/vipr/rs/v1/IRSEnumProperty","../../vizdef/EnumPropertyDef","./EnumValue","./ValueProperty"],(function(e,t,n,r,i,a,o,s,l){"use strict";var u=new n;function c(e){l.RSValueProperty.call(this,e),u.set(this,e)}function f(e,t){l.VizValueProperty.call(this,e,t),u.set(this,e)}return e.declareClass(c,l.RSValueProperty,a,{getPossibleValues:function(){return u.get(this).getPossibleValuesForRS()},peekPossibleValues:function(){return u.get(this).getPossibleValuesForHost()},setPossibleValues:function(t,n){return u.get(this).setPossibleValues(e.freeze(t?Array.from(t,s.fromRSv1,s):new Array(0)),n)}}),e.declareClass(f,l.VizValueProperty,r,{defaultValue:{enumerable:!0,get:"getDefaultValue"},possibleValues:{enumerable:!0,get:"getPossibleValues"},dynamic:{enumerable:!0,get:"isDynamic"},getDefaultValue:function(){return u.get(this).getDefaultValue()},getPossibleValues:function(){return u.get(this).getPossibleValuesForHost()},isDynamic:function(){return this.def.dynamic}}),e.declareClass((function(t,n,r){l.call(this,t,n,r,(function(e){return e?e.name:null})),e.defineProperties(this,{_rs:{value:new c(this)},_host:{value:new f(this,t)},_defaultValue:{writable:!0,value:t.defaultValue},_possibleValues:{writable:!0,value:t.possibleValues},_rsPossibleValues:{writable:!0,value:t.possibleValues},_renPossibleValues:{writable:!0,value:null}})}),l,{_rs:null,_host:null,_defaultValue:null,_possibleValues:null,_rsPossibleValues:null,_renPossibleValues:null,toHost:function(){return this._host},toRS:function(){return this._rs},getDefaultValue:function(){return this._defaultValue},getPossibleValuesForHost:function(){return this._possibleValues},getPossibleValuesForRS:function(){return this._rsPossibleValues},setPossibleValues:function(e,n){if(!this.def.dynamic)throw new Error("setPossibleValues is not allowed on "+this.def.name+", the enum property is not dynamic");var r=Array.isArray(e)?e.length:0;if(r<1&&!this.def.allowNull)throw new Error("Cannot set empty possibleValues on "+this.def.name+", allowNull is false");for(var a=new t,o=0;oa)throw new Error("Invalid item level: "+n);return!i||!i.getSlotRef()||this._slotName&&this._slotName!==i.getSlotRef().name?this.getColor(null):t.fromHost(this._resolver.getColor(i,i.getDataItem(this._dataContext),o))||r.FALLBACK_COLOR},getColor:function(e){var n=e||null;if(n){var i=n.get(this._slotName);if(i)return this.getTupleColor(i.asCat(),-1)}return t.fromHost(this._resolver.getDefaultColor?this._resolver.getDefaultColor(e):this._resolver.getColor(null))||r.FALLBACK_COLOR}})})),define("com/ibm/vipr/rs/v1/IRSDataContext",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t),t})),define("com/ibm/vipr/api/HittableType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Data="data"}),{parse:function(e){if(!e)return null;switch(e.toLowerCase()){case"data":return this.Data;default:return null}}})})),define("com/ibm/vipr/internal/data/DataObject",["barejs!decl","../../api/HittableType","../../info/IInfo"],(function(e,t,n){"use strict";return e.abstractClass((function(t){e.defineProperty(this,"source",{value:t||null})}),n,{toInfo:function(e){return e.slice(0)}},{source:null,getSource:function(){return this.source},getHittableType:function(){return t.Data}})})),define("com/ibm/vipr/internal/data/CustomInfo",["barejs!decl","../../info/ICustomInfo","../../info/InfoType","./DataObject"],(function(e,t,n,r){"use strict";return e.declareClass((function(t){r.call(this,null),e.defineProperty(this,"payload",{enumerable:!0,value:t})}),r,t,{infoType:{value:n.CustomData},id:{enumerable:!0,get:"getId"},type:{enumerable:!0,get:"getType"},payload:null,getInfoType:function(){return n.CustomData},getPayload:function(){return this.payload},getId:function(){return this.payload.id},getType:function(){return this.payload.type},equals:function(e){return this.infoType===e.infoType&&this.id===e.id&&this.type===e.type&&(this.payload===e.payload||!(!this.payload||"function"!=typeof this.payload.equals||!this.payload.equals(e.payload)))}})})),define("com/ibm/vipr/internal/data/DataContext",["barejs!decl","barejs!WeakMap","com/ibm/vipr/rs/v1/IRSDataContext"],(function(e,t,n){"use strict";function r(){e.defineProperties(this,{_owner:{value:new t},_reference:{value:new t}})}function i(e){return e&&e.as?e.as(r):null}return e.declareClass(r,n,{getOwner:function(e,t){var n=i(e);return n?n.getOwner(t):null},getReference:function(e,t){var n=i(e);return n?n.getReference(t):null}},{_owner:null,_reference:null,getOwner:function(e){return this._owner.get(e)||null},setOwner:function(e,t){e&&this._owner.set(e,t)},getReference:function(e){return this._reference.get(e)||null},setReference:function(e,t){e&&this._reference.set(e,t)}}),e.defineProperty(r,"vipr",{enumerable:!0,value:new r})})),define("com/ibm/vipr/rs/v1/IRSHittable",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t,{getRSHittableType:function(){}}),t})),define("com/ibm/vipr/rs/v1/data/IRSDataNode",["barejs","../IRSHittable"],(function(e,t){"use strict";function n(){}return e.decl.declareInterface(n,t),n})),define("com/ibm/vipr/rs/v1/data/IRenderingServiceData",["barejs","./IRSDataNode"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{dataSets:n.readOnlyProperty,decorationsVersion:n.readOnlyProperty,getDataSets:function(){},getDataSet:function(e){},getDecorationsVersion:function(){}}),r})),define("com/ibm/vipr/api/IVizServiceNotification",["barejs!decl"],(function(e){"use strict";return e.declareInterface((function(){}),{getLevel:function(){},getId:function(){},getType:function(){},getDescription:function(){},getLocalizedMessage:function(){},getPayload:function(){}})})),define("com/ibm/vipr/internal/VizServiceNotification",["barejs!decl","../api/IVizServiceNotification"],(function(e,t){"use strict";return e.declareClass((function(t,n,r,i,a,o){e.defineProperties(this,{level:{enumerable:!0,value:t},type:{enumerable:!0,value:n},id:{enumerable:!0,value:r},description:{enumerable:!0,value:i},localizedMessage:{enumerable:!0,value:a},payload:{enumerable:!0,value:o}})}),t,{id:null,type:null,level:null,description:null,localizedMessage:null,payload:null,getLevel:function(){return this.level},getId:function(){return this.id},getType:function(){return this.type},getDescription:function(){return this.description},getLocalizedMessage:function(){return this.localizedMessage},getPayload:function(){return this.payload},toString:function(){return this.description}})})),define("com/ibm/vipr/internal/data/SliceResult",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(e,t){this.dataItems=e,this.slices=t}),{dataItems:null,slices:null})})),define("com/ibm/vipr/truncation/Truncation",["barejs!decl"],(function(e){"use strict";return e.declareClass((function(t,n){e.defineProperties(this,{type:{enumerable:!0,value:t},message:{enumerable:!0,value:n}})}),{type:null,message:null,toString:function(){return this.message}})})),define("com/ibm/vipr/truncation/TruncationType",["barejs!decl"],(function(e){"use strict";return e.declareEnum((function(){this.Limit="limit",this.Unaggregated="unaggregated"}))})),define("com/ibm/vipr/truncation/LimitTruncation",["barejs!decl","./Truncation","./TruncationType"],(function(e,t,n){"use strict";return e.declareClass((function(r,i,a,o,s,l){t.call(this,n.Limit,r),e.defineProperties(this,{capability:{enumerable:!0,value:i},limit:{enumerable:!0,value:a},full:{enumerable:!0,value:o},slotRef:{enumerable:!0,value:s},dataItem:{enumerable:!0,value:l},next:{enumerable:!0,writable:!0,value:null}})}),t,{capability:null,limit:null,full:null,slotRef:null,dataItem:null,next:null,slotDef:{get:function(){return this.slotRef}}})})),define("com/ibm/vipr/truncation/UnaggregatedTruncation",["barejs!decl","./Truncation","./TruncationType"],(function(e,t,n){"use strict";return e.declareClass((function(e){t.call(this,n.Unaggregated,e)}),t,{})})),define("com/ibm/vipr/truncation/TruncationInfo",["barejs!decl"],(function(e){"use strict";var t=0;return e.declareClass((function(n,r){e.defineProperties(this,{id:{enumerable:!0,value:String(t++)},message:{enumerable:!0,value:n},truncations:{enumerable:!0,value:r}})}),{id:null,message:null,truncations:null,toString:function(){return this.message}})})),define("com/ibm/vipr/internal/data/TruncationFactory",["barejs!decl","../../truncation/LimitTruncation","../../truncation/UnaggregatedTruncation","../../truncation/TruncationInfo","../util/StringUtil"],(function(e,t,n,r,i){"use strict";return e.declareClass((function(t){e.defineProperties(this,{_truncations:{value:[]},_nls:{value:t}})}),{_truncations:null,_nls:null,addSlot:function(e,t,n,r,i){if(!r||!i)throw new Error("_slotRef and _dataItem are mandatory");this._addLimit(e,t,n,r,i)},addData:function(e,t,n){this._addLimit(e,t,n,null,null)},addUnaggregated:function(){this._findUnaggregated()||this._truncations.push(new n(this._nls.get("duplicate_truncation")))},create:function(){return this._truncations.length<1?null:new r(this._nls.get("data_truncation"),e.freeze(this._truncations))},_findLimit:function(e){for(var n=0,r=this._truncations.length;ns.full)this._truncations[this._truncations.indexOf(s)]=l,l.next=s;else{for(var u=s.next;u&&r0;if(t&&this._decoFilter.clear(),e&&(e.forEach((function(e){"string"==typeof e&&this._decoFilter.add(e)}),this),!t&&this._decoFilter.size>0&&(t=!0)),t){++this._version;for(var n=0;nd&&(d=c.length),p[m]=c}a=new Array(d);for(var v=0;v=t.length};return e.done||(e.value=t[n]),e}})}))})),define("com/ibm/vipr/rs/v1/data/IRSDataPoint",["barejs","./IRSDecorated"],(function(e,t){"use strict";function n(){}return e.decl.declareInterface(n,t,{getDataSet:function(e){},getKey:function(e){},all:function(e){},get:function(e,t){}}),n})),define("com/ibm/vipr/rs/v1/RSHittableType",["barejs"],(function(e){"use strict";const t=e.decl.declareEnum((function(){this.Data="data"}),{parse:function(e){if(null===e)return null;switch(e.toLowerCase()){case"data":return t.Data;default:return null}}});return t})),define("com/ibm/vipr/internal/data/Decorated",["barejs!decl","./DataObject","com/ibm/vipr/rs/v1/RSHittableType","com/ibm/vipr/rs/v1/data/IRSDecorated"],(function(e,t,n,r){"use strict";return e.abstractClass((function(n,r){t.call(this,n),e.defineProperty(this,"_decoFilter",{value:r})}),t,r,{_decoFilter:null,hasDecoration:function(e){return!this._decoFilter.has(e)&&!(!this.source||!this.source.hasDecoration(e))},getDecoration:function(e,t){return this.hasDecoration(e)?this.source.getDecoration(e):t},getRSHittableType:function(){return n.Data}})})),define("com/ibm/vipr/rs/v1/data/IRSSlot",["barejs","./IRSDataNode"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{type:n.readOnlyProperty,name:n.readOnlyProperty,channels:n.readOnlyProperty,mapped:n.readOnlyProperty,dataItems:n.readOnlyProperty,dataItemCount:n.readOnlyProperty,getRSType:function(){},getName:function(){},getChannels:function(){},isMapped:function(){},getDataItems:function(){},getDataItemCount:function(){},getDataItem:function(e){}}),r})),define("com/ibm/vipr/internal/data/Slot",["barejs!decl","../../info/InfoType","../../info/ISlotInfo","com/ibm/vipr/rs/v1/data/IRSSlot"],(function(e,t,n,r){"use strict";function i(t,n,r,i){e.defineProperties(this,{slotRef:{value:t},mapped:{enumerable:!0,value:n},dataItems:{enumerable:!0,value:r},forViz:{value:!!i}})}return e.declareClass(i,r,n,{infoType:{value:t.Slot},slotRef:null,mapped:null,dataItems:null,forViz:null,name:{enumerable:!0,get:"getName"},type:{enumerable:!0,get:"getRSType"},channels:{enumerable:!0,get:"getChannels"},dataItemCount:{enumerable:!0,get:"getDataItemCount"},getInfoType:function(){return t.Slot},getRSType:function(){return this.slotRef.type},getName:function(){return this.slotRef.name},getChannels:function(){return this.slotRef.channels},isMapped:function(){return this.mapped},getDataItems:function(){return this.dataItems},getDataItemCount:function(){return this.dataItems.length},getDataItem:function(e){return(e=arguments.length<1?0:Math.floor(e))>=0&&e0&&(a+=n);var l=i(e[s].getCaption(t));l&&(o=!1,a+=l)}return o?"":a},joinSubCaptions:function(e,t,n){var r=e.length;if(r<2)return r<1?"":i(e[0].getSubCaption(t));for(var a="",o=!0,s=0;s0&&(a+=n);var l=i(e[s].getSubCaption(t));l&&(o=!1,a+=l)}return o?"":a},joinCombinedCaptions:function(e,t,n){var r=e.length;if(r<2)return r<1?"":i(e[0].combineCaptions(t));for(var a="",o=!0,s=0;s0&&(a+=n);var l=i(e[s].combineCaptions(t));l&&(o=!1,a+=l)}return o?"":a}},"formatting")})),define("com/ibm/vipr/internal/data/Slotted",["barejs!decl","../../info/ISlottedInfo","../../vizdef/SlotRef","./Decorated"],(function(e,t,n,r){"use strict";return e.abstractClass((function(t,i,a){r.call(this,t,i),e.defineProperty(this,"slotRef",{value:a instanceof n?a:null})}),r,t,{slotRef:null,getSlotRef:function(){return this.slotRef},slotDef:{get:"getSlotRef"}})})),define("com/ibm/vipr/internal/data/Tuple",["barejs!decl","../../info/InfoType","../../info/ITupleInfo","com/ibm/vipr/rs/v1/data/RSDataItemType","com/ibm/vipr/rs/v1/data/IRSTuple","../util/formatting","./DataContext","./Slotted"],(function(e,t,n,r,i,a,o,s){"use strict";var l=String.fromCharCode(215);function u(t,n,r,i,a,o){s.call(this,t,n,r),e.defineProperties(this,{index:{enumerable:!0,value:i},itemClassSet:{enumerable:!0,value:a},items:{enumerable:!0,value:o},_key:{writable:!0,value:null},_keyS:{writable:!0,value:null}})}return e.declareClass(u,s,i,n,{joinKey:function(e){return e.join(l)}},{infoType:{value:t.Tuple},type:{enumerable:!0,value:r.Cat},subType:null,index:null,itemClassSet:null,items:null,_key:null,_keyS:null,itemClasses:{enumerable:!0,get:"getItemClasses"},dataItem:{get:"getDataItemInfo"},key:{enumerable:!0,get:function(){return this.getKey(!0)}},getRSType:function(){return r.Cat},getDataItem:function(e){return o.getOwner(e,this)},asCat:function(){return this},asCont:function(){return null},getSubType:function(){return this.subType},getIndex:function(){return this.index},getItemClassSet:function(){return this.itemClassSet},getItemClasses:function(){return this.itemClassSet&&this.itemClassSet.itemClasses},getItemClassCount:function(){return this.itemClassSet?this.itemClassSet.getItemClassCount():0},getItemClass:function(e){return this.itemClassSet?this.itemClassSet.getItemClass(e):null},getItems:function(){return this.items},getItemCount:function(){return this.items.length},getItem:function(e){return(e=Math.floor(e))>=0&&e1&&t&&r.sort(),n=u.joinKey(r),t?this._keyS=n:this._key=n}return n},getCaption:function(e){return a.joinCaptions(this.items,e," | ")},getInfoType:function(){return t.Tuple},getDataItemInfoType:function(){return r.Cat},getItemClassSetInfo:function(){return this.itemClassSet},getItemClassInfos:function(){return this.itemClassSet.getItemClassInfos()},getItemInfos:function(){return u.toInfo(this.items)},getDataItemInfo:function(){return o.vipr.getOwner(this)},addKeyParts:function(e){if(this.source)for(var t=0,n=this.items.length;t0&&r.push("["+this.offset+"]"),n=s.joinKey(r),t?this._keyS=n:this._key=n}return n},all:function(e){var t,n,r=e instanceof o?e:null,i=null;if(!r&&e){var a="string"==typeof e?e:e.name;if(a)for(t=0,n=this._slots.length;!r&&t=n.dataItems.length?null:this.datum(n.dataItems[r])},getInfoType:function(){return t.DataPoint},getRowInfo:function(){if(this.index<0)return null;for(var e=this.dataItems,t=e.length;t>0&&e[t-1]&&!e[t-1].source;)--t;for(var n=new Array(t),r=0;rthis._max;(t||ethis._max)&&(this._max=e)},_aggregate:function(){if("sum"===this.type||"average"===this.type){var e=this._vPos,t=this._vNeg;"average"===this.type&&(this._cNeg>1&&(t/=this._cNeg),this._cPos>1&&(e/=this._cPos)),this._cNeg>0&&this._fit(t),this._cPos>0&&this._fit(e)}}}),e.declareClass(a,{buildOffsets:function(e,t){for(var n=e.length,r=new Array(n+(t?1:0)),i=1,a=0;a=0&&y.push(m);for("fit"!==o&&y.length>0?(I=a.buildOffsets(y,!0),_=y.length,w=a.createFixed(I[_]),v=new i("fit","aggregate")):v=new i(o,s),d=0,p=this._dataPoints.length;d=C&&(C=p.colIndex+1));for(var T=0,V=R.length;T=0;for(u=0,d=v.length;u=0&&((b=p.end-p.start)>1?(o>0&&b>o&&(v===A.dataItems&&(v=v.slice(0)),p=p.clone(this._decoFilter,A.slotRef,p.colIndex,o),D=!0,v[u]=p,i.addSlot(a,o,b,A.slotRef,p),b=o),E||I.push(p),A.forViz&&(S*=b),E&&S>0&&(P*=b)):b<1&&(S=0,P=1),E&&_.push(p)),y&&(p.type===n.Cont&&w.push(p),p.colIndex>=C&&(C=p.colIndex+1));v!==A.dataItems&&(A=A.clone(v),R===this.slotInfos&&(R=R.slice(0)),R[T]=A)}_.length>0&&t.length<1&&t.push.apply(t,_);var x=I.length;for(d=(s=this.dataItems).length,u=0;u1?I.push(p):b<1&&(S=0));var j=c.buildOffsets(I),z=I.length,N=c.buildOffsets(_),O=_.length,L=null,M=0,F=new Array(P),k=this.dataPoints,q=k.length,B=new Array(P);o=m(a=h(r,null));var H,G,U,W,X,$=!1,K=y||this.dataSetDef.uniqueDataPoints,J=!1;if((1===P||this._emptied)&&!(y||D||this._overflow)){for(H=0;HS&&(o=S),y&&S>o&&(i.addData(a,o,S),$=!0),H=0;H0&&(Q=!1,J||(i.addUnaggregated(),J=!0)),u=0;Q&&u=0&&X=0&&X=0;--u)p=_[u],X=0,(b=N[u])>1?(X=Math.floor(W/b),W%=b):b>0&&(X=W,W=0),re[p.colIndex]=p.tuples[X];for(G=F[H],Y=0,U=0;Y=0;--u)p=I[u],X=0,(b=j[u])>1?(X=Math.floor(U/b),U%=b):b>0&&(X=U,U=0),re[p.colIndex]=p.tuples[X];var ie=ne.length;ne.push.apply(ne,re),G[Y]=new l(null,this._decoFilter,s,R,-1,Y,ne,ie,0)}}}for(U=-1,H=0;H0)for(Y=0;Y=0&&e=this.start&&e0&&(l=Math.min(s+r,l)),i=l-s;var u=new Array(i);for(o=0;o0&&(n.startsWith("(")&&n.endsWith(")")||(n="("+n+")"),t.length>0&&(t+=" "),t+=n),t},clone:function(e,t){return new l(this.source,e,t,this.index)},applyContext:function(e,t){t&&e.setOwner(this,t)}})})),define("com/ibm/vipr/rs/v1/data/IRSItemClassSet",["barejs","./IRSDataNode","./IRSSubCaptioned"],(function(e,t,n){"use strict";const r=e.decl;function i(){}return r.declareInterface(i,t,n,{itemClasses:r.readOnlyProperty,getItemClasses:function(){},getItemClassCount:function(){},getItemClass:function(e){}}),i})),define("com/ibm/vipr/internal/data/ItemClassSet",["barejs!decl","../../info/InfoType","../../info/IItemClassSetInfo","com/ibm/vipr/rs/v1/RSHittableType","com/ibm/vipr/rs/v1/data/IRSItemClassSet","../../vizdef/SlotRef","../util/formatting","./DataObject"],(function(e,t,n,r,i,a,o,s){"use strict";function l(t,n,r){s.call(this,t),e.defineProperties(this,{slotRef:{writable:!0,value:n instanceof a?n:null},itemClasses:{enumerable:!0,value:r}})}return e.declareClass(l,s,i,n,{create:function(e){var t=new Array(1);return t[0]=e,new l(null,e.slotRef,t)}},{infoType:{value:t.ItemClassSet},slotRef:{enumerable:!0,get:"getSlotRef"},itemClasses:null,getInfoType:function(){return t.ItemClassSet},getRSHittableType:function(){return r.Data},getItemClasses:function(){return this.itemClasses},getCaption:function(e){return o.joinCaptions(this.itemClasses,e," - ")},getSubCaption:function(e){return o.joinSubCaptions(this.itemClasses,e," - ")},combineCaptions:function(e){return o.joinCombinedCaptions(this.itemClasses,e," - ")},getItemClassCount:function(){return this.itemClasses.length},getItemClass:function(e){return(e=Math.floor(e))>=0&&e1?u:-1,p,h,m,v,I)},virtual:function(e,t,n){var r=new Array(1),i=new Array(1),a=new Array(1),u=new Array(1);this._init(null);var c=new l(e,t,n.get("virtual_item"));return r[0]=c,i[0]=new s(e,t,c,n.get("virtual_item")),a[0]=new o(null,t,r),u[0]=this._createTuple(null,e,t,0,a[0],i),this._createDataItem(null,e,t,-1,!1,-1,1,0,1,a,u)},_init:function(e){},_createTuple:function(e,t,n,i,a,o){return new r(e,t,n,i,a,o)},_createDataItem:function(e,t,r,i,a,o,s,l,u,c,f){return new n(e,t,r,i,a,o,s,l,u,c,f)}})})),define("com/ibm/vipr/rs/v1/data/IRSContDataItem",["barejs","./IRSDataItem"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{itemClass:n.readOnlyProperty,getItemClass:function(){},getFormatter:function(e){},getDomain:function(e){}}),r})),define("com/ibm/vipr/internal/data/ContDataItem",["barejs!decl","../../data/DataItemType","../../data/FormatKind","../../info/InfoType","../../info/IContDataItemInfo","com/ibm/vipr/rs/v1/data/IRSContDataItem","../util/Capability","../util/ContDomain","../util/formatting","./DataItem","./ItemClassSet"],(function(e,t,n,r,i,a,o,s,l,u,c){"use strict";function f(t,n,r,i,a,o,s,l){u.call(this,t,n,r,i,a,o),e.defineProperties(this,{itemClassSet:{enumerable:!0,value:c.create(s)},itemClass:{enumerable:!0,value:s},_domain:{value:l},_mfData:{writable:!0,value:null},_mfLabel:{writable:!0,value:null}})}return e.declareClass(f,u,a,i,{infoType:{value:r.DataItem},type:{enumerable:!0,value:t.Cont},itemClassSet:null,itemClass:null,_domain:null,_mfData:null,_mfLabel:null,getRSType:function(){return t.Cont},asCat:function(){return null},asCont:function(){return this},getItemClass:function(){return this.itemClass},getCaption:function(e){return this.itemClass.getCaption(e)},getSubCaption:function(e){return this.itemClass.getSubCaption(e)},combineCaptions:function(e){return this.itemClass.combineCaptions(e)},getFormatter:function(e){return l.getHost(this.source,n.validate(e))||l.getDefault(e)},getDomain:function(e){return this.getDomainInfo(o.fromRSv1(e))},getDataItemInfoType:function(){return t.Cont},getDomainInfo:function(e){var t=e||null,n=null;return this.source&&(n=s.fromHost(this.source.getDomain(t))),!n&&this._domain&&(n=this._domain.resolve(this,t)),n||(n=s.EMPTY),n},getItemClassInfo:function(){return this.itemClass},calcDomain:function(e){return this._domain.resolve(this,e||null)},clone:function(e,t,n,r){return new f(this.source,e,t,this.sourceIndex,this.mapped,n,this.itemClass.clone(e,t),r||this._domain)},missingCaption:function(e){var t=e===n.Data?this._mfData:this._mfLabel;return t||(t=this.getFormatter(e),e===n.Data?this._mfData=t:this._mfLabel=t),t.format(null)},applyContext:function(e,t){u.prototype.applyContext.call(this,e,t),this.itemClassSet.applyContext(e,this)}})})),define("com/ibm/vipr/internal/data/ContDataItemFactory",["barejs!decl","./ContDataItem","./ItemClass","./VirtualItemClass"],(function(e,t,n,r){"use strict";return e.declareClass((function(){}),{create:function(e,t,i,a,o,s,l,u){var c=e.getItemClass(),f=c?new n(c,t,i,0):new r(t,i,u.get("virtual_value"));return this._createDataItem(e,t,i,a,o,s,f,l)},_createDataItem:function(e,n,r,i,a,o,s,l){return new t(e,n,r,i,a,o,s,l)}})})),define("com/ibm/vipr/rs/v1/data/IRSTemporalAttributes",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{year:t.readOnlyProperty,month:t.readOnlyProperty,day:t.readOnlyProperty,hour:t.readOnlyProperty,minute:t.readOnlyProperty,second:t.readOnlyProperty,fraction:t.readOnlyProperty,date:t.readOnlyProperty,time:t.readOnlyProperty,hasYear:function(){},hasMonth:function(){},hasDay:function(){},hasHour:function(){},hasMinute:function(){},hasSecond:function(){},hasFraction:function(){},hasDate:function(){},hasTime:function(){}}),n})),define("com/ibm/vipr/internal/data/TemporalAttributes",["barejs!decl","com/ibm/vipr/rs/v1/data/IRSTemporalAttributes"],(function(e,t){"use strict";function n(t,n,r,i,a,o,s){e.defineProperties(this,{year:{enumerable:!0,value:!!t},month:{enumerable:!0,value:!!n},day:{enumerable:!0,value:!!r},hour:{enumerable:!0,value:!!i},minute:{enumerable:!0,value:!!a},second:{enumerable:!0,value:!!o},fraction:{enumerable:!0,value:!!s}})}return e.declareClass(n,t,{create:function(e){return e&&"object"==typeof e?new n(e.hasYear(),e.hasMonth(),e.hasDay(),e.hasHour(),e.hasMinute(),e.hasSecond(),e.hasFraction()):new n}},{year:null,month:null,day:null,hour:null,minute:null,second:null,fraction:null,date:{enumerable:!0,get:"hasDate"},time:{enumerable:!0,get:"hasTime"},hasYear:function(){return this.year},hasMonth:function(){return this.month},hasDay:function(){return this.day},hasHour:function(){return this.hour},hasMinute:function(){return this.minute},hasSecond:function(){return this.second},hasFraction:function(){return this.fraction},hasDate:function(){return this.year||this.month||this.day},hasTime:function(){return this.hour||this.minute||this.second}})})),define("com/ibm/vipr/rs/v1/data/IRSTemporalDataItem",["barejs","./IRSCatDataItem"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{attributes:n.readOnlyProperty,getTemporalAttributes:function(){},getFormatter:function(e){}}),r})),define("com/ibm/vipr/internal/data/TemporalDataItem",["barejs!decl","./CatDataItem","../util/formatting","com/ibm/vipr/rs/v1/data/IRSTemporalDataItem"],(function(e,t,n,r){"use strict";function i(n,r,i,a,o,s,l,u,c,f,d,p){t.call(this,n,r,i,a,o,s,l,u,c,f,d),e.defineProperty(this,"attributes",{enumerable:!0,value:p||null})}return e.declareClass(i,t,r,{attributes:null,getTemporalAttributes:function(){return this.attributes},getFormatter:function(e){return n.getHost(this.source,n.validateKind(e))||n.createDateTime(e,this.attributes)},_createClone:function(e,t,n,r,a,o,s,l,u,c,f){return new i(e,t,n,r,a,o,s,l,u,c,f,this.attributes)}})})),define("com/ibm/vipr/rs/v1/data/IRSTemporalTuple",["barejs","./IRSTuple"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{value:n.readOnlyProperty,getValue:function(){}}),r})),define("com/ibm/vipr/internal/data/TemporalTuple",["barejs!decl","../../info/ITemporalTupleInfo","com/ibm/vipr/rs/v1/data/IRSTemporalTuple","./Tuple"],(function(e,t,n,r){"use strict";function i(t,n,i,a,o,s,l){r.call(this,t,n,i,a,o,s),e.defineProperty(this,"value",{enumerable:!0,value:l})}return e.declareClass(i,r,t,n,{subType:"temporal",value:null,getValue:function(){return this.value},clone:function(e,t){return new i(this.source,e,t.getSlotRef(),this.index,t,this._cloneItems(e,t),this.value)},addKeyParts:function(e){r.prototype.addKeyParts.call(this,e),null!==this.value&&e.push("date:"+ +this.value)}})})),define("com/ibm/vipr/internal/data/TemporalDataItemFactory",["barejs!decl","./CatDataItemFactory","./TemporalAttributes","./TemporalDataItem","./TemporalTuple"],(function(e,t,n,r,i){"use strict";return e.declareClass((function(){}),t,{_createTuple:function(e,t,n,r,a,o){return new i(e,t,n,r,a,o,"getValue"in e?function(e){if(null!=e){if(e instanceof Date)return e;if("number"==typeof e)return new Date(e)}return null}(e.getValue()):null)},_createDataItem:function(e,t,i,a,o,s,l,u,c,f,d){var p=n.create("getTemporalAttributes"in e?e.getTemporalAttributes():null);return new r(e,t,i,a,o,s,l,u,c,f,d,p)}})})),define("com/ibm/vipr/rs/v1/data/IRSGeoAttributes",["barejs"],(function(e){"use strict";const t=e.decl;function n(){}return t.declareInterface(n,{caption:t.readOnlyProperty,latitude:t.readOnlyProperty,longitude:t.readOnlyProperty,featureId:t.readOnlyProperty,hasCaption:function(){},hasLatitude:function(){},hasLongitude:function(){},hasFeatureId:function(){}}),n})),define("com/ibm/vipr/internal/data/GeoAttributes",["barejs!decl","com/ibm/vipr/rs/v1/data/IRSGeoAttributes"],(function(e,t){"use strict";function n(t,n,r,i){e.defineProperties(this,{caption:{enumerable:!0,value:!!t},latitude:{enumerable:!0,value:!!n},longitude:{enumerable:!0,value:!!r},featureId:{enumerable:!0,value:!!i}})}return e.declareClass(n,t,{create:function(e){return e&&"object"==typeof e?new n(e.hasYear(),e.hasCaption(),e.hasLatitude(),e.hasLongitude(),e.hasFeatureId()):new n}},{caption:null,latitude:null,longitude:null,featureId:null,hasCaption:function(){return this.caption},hasLatitude:function(){return this.latitude},hasLongitude:function(){return this.longitude},hasFeatureId:function(){return this.featureId}})})),define("com/ibm/vipr/rs/v1/data/IRSGeoDataItem",["barejs","./IRSCatDataItem"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{attributes:n.readOnlyProperty,getGeoAttributes:function(){}}),r})),define("com/ibm/vipr/internal/data/GeoDataItem",["barejs!decl","./CatDataItem","com/ibm/vipr/rs/v1/data/IRSGeoDataItem"],(function(e,t,n){"use strict";function r(n,r,i,a,o,s,l,u,c,f,d,p){t.call(this,n,r,i,a,o,s,l,u,c,f,d),e.defineProperty(this,"attributes",{enumerable:!0,value:p||null})}return e.declareClass(r,t,n,{attributes:null,getGeoAttributes:function(){return this.attributes},_createClone:function(e,t,n,i,a,o,s,l,u,c,f){return new r(e,t,n,i,a,o,s,l,u,c,f,this.attributes)}})})),define("com/ibm/vipr/rs/v1/data/IRSGeoTuple",["barejs","./IRSTuple"],(function(e,t){"use strict";const n=e.decl;function r(){}return n.declareInterface(r,t,{latitude:n.readOnlyProperty,longitude:n.readOnlyProperty,featureId:n.readOnlyProperty,getLatitude:function(){},getLongitude:function(){},getFeatureId:function(){}}),r})),define("com/ibm/vipr/internal/data/GeoTuple",["barejs!decl","../../info/IGeoTupleInfo","com/ibm/vipr/rs/v1/data/IRSGeoTuple","./Tuple"],(function(e,t,n,r){"use strict";function i(e,t,n,i,a,o,s,l,u){r.call(this,e,t,n,i,a,o),this.latitude=s,this.longitude=l,this.featureId=u}return e.declareClass(i,r,t,n,{subType:"geospatial",latitude:null,longitude:null,featureId:null,getLatitude:function(){return this.latitude},getLongitude:function(){return this.longitude},getFeatureId:function(){return this.featureId},addKeyParts:function(e){r.prototype.addKeyParts.call(this,e),null!==this.featureId&&e.push("feat:"+this.featureId),null!==this.latitude&&e.push("lat:"+this.latitude),null!==this.longitude&&e.push("long:"+this.longitude)},clone:function(e,t){return new i(this.source,e,t.getSlotRef(),this.index,t,this._cloneItems(e,t),this.latitude,this.longitude,this.featureId)}})})),define("com/ibm/vipr/internal/data/GeoDataItemFactory",["barejs!decl","./CatDataItemFactory","./GeoAttributes","./GeoDataItem","./GeoTuple"],(function(e,t,n,r,i){"use strict";function a(e){if(null==e)return null;var t=+e;return t!=t?null:t}return e.declareClass((function(){}),t,{_createTuple:function(e,t,n,r,i,o){return this._createGeoTuple(e,t,n,r,i,o,"getLatitude"in e?a(e.getLatitude()):null,"getLongitude"in e?a(e.getLongitude()):null,"getFeatureId"in e?"string"==typeof(s=e.getFeatureId())?s:s?String(s):null:null);var s},_createGeoTuple:function(e,t,n,r,a,o,s,l,u){return new i(e,t,n,r,a,o,s,l,u)},_createDataItem:function(e,t,i,a,o,s,l,u,c,f,d){var p=null;if(e)if("getGeoAttributes"in e){var h=e.getGeoAttributes();p=new n(h.hasCaption(),h.hasLatitude(),h.hasLongitude(),h.hasFeatureId())}else{var m=!1;l>0&&(m=d[0].getItemCount()>0),p=new n(m,!1,!1,!1)}else p=this._createGeoAttributes();return new r(e,t,i,a,o,s,l,u,c,f,d,p)},_createGeoAttributes:function(){throw new Error("GeoDataItemFactory must receive a valid IGeoDataItem")}})})),define("com/ibm/vipr/internal/data/GeoSegmentDataItemFactory",["barejs!decl","../../data/FormatKind","../../data/ValueType","../../data/ICatDataItem","../../vizdef/GeoSpatialPart","./ItemClassSet","./GeoAttributes","./GeoDataItemFactory"],(function(e,t,n,r,i,a,o,s){"use strict";var l=e.freeze(new Array(0));function u(e){var t=null;return e&&e.getValueType()===n.Numeric&&null!==(t=e.getValue())&&(t=void 0===t?null:+t)!=t&&(t=null),t}return e.declareClass((function(t,n,r,i){s.call(this),e.defineProperties(this,{index:{enumerable:!0,value:t},_decoFilter:{value:n},slotRef:{enumerable:!0,value:r},mapping:{enumerable:!0,value:i},_dataItem:{writable:!0,value:null},_geoAttributes:{writable:!0,value:null}})}),s,r,{index:null,_decoFilter:null,slotRef:null,mapping:null,_dataItem:null,_geoAttributes:null,create:function(e,n,r){for(var s=[],c=[],f=null,d=null,p=null,h=null,m=null,g=0,v=this.slotRef.segments.length;g0?i[0]:null})}return e.declareClass(r,t,n,{_di:null,itemClassSets:{enumerable:!0,get:"getItemClassSets"},tuples:{enumerable:!0,get:"getTuples"},start:{enumerable:!0,get:"getStart"},end:{enumerable:!0,get:"getEnd"},tupleCount:{enumerable:!0,get:"getTupleCount"},getDataSet:function(e){return this._di.getDataSet(e)},asCat:function(){return this._di},asCont:function(){return null},getCaption:function(e){return this._di.getCaption(e)},getSubCaption:function(e){return this._di.getSubCaption(e)},combineCaptions:function(e){return this._di.combineCaptions(e)},hasDecoration:function(e){return this._di.hasDecoration(e)},getDecoration:function(e,t){return this._di.getDecoration(e,t)},getStart:function(){return this._di.start},getEnd:function(){return this._di.end},getTupleCount:function(){return this._di.tupleCount},getItemClassSets:function(){return this._di.itemClassSets},getItemClassSetCount:function(){return this._di.getItemClassSetCount()},getItemClassSet:function(e){return this._di.getItemClassSet(e)},getTuple:function(e){return this._di.getTuple(e)},getTuples:function(){return this._di.tuples},toString:function(){return this._di.toString()},clone:function(e){return new r(this.slotRef,this.mapped,e,this.forViz)}})})),define("com/ibm/vipr/internal/data/SingleContSlot",["barejs!decl","./Slot","../util/ContDomain","../util/formatting","com/ibm/vipr/rs/v1/data/IRSContDataItem"],(function(e,t,n,r,i){"use strict";function a(n,r,i,a,o){t.call(this,n,r,i,a,o),e.defineProperty(this,"_di",{value:i.length>0?i[0]:null})}return e.declareClass(a,t,i,{_di:null,itemClass:{enumerable:!0,get:"getItemClass"},getDataSet:function(e){return this._di.getDataSet(e)},asCat:function(){return null},asCont:function(){return this._di},getCaption:function(e){return this._di.getCaption(e)},getSubCaption:function(e){return this._di.getSubCaption(e)},combineCaptions:function(e){return this._di.combineCaptions(e)},hasDecoration:function(e){return this._di.hasDecoration(e)},getDecoration:function(e,t){return this._di.getDecoration(e,t)},getItemClass:function(){return this._di.getItemClass()},getFormatter:function(e){return this._di?this._di.getFormatter(e):r.getDefault(e)},getDomain:function(e){return this._di?this._di.getDomain(e):n.EMPTY},toString:function(){return this._di?this._di.toString():""},clone:function(e){return new a(this.slotRef,this.mapped,e,this.forViz)}})})),define("com/ibm/vipr/internal/data/DataSetFactory",["barejs!decl","barejs!NMap","../../vizdef/SlotType","../util/StringUtil","./DataSet","./CatDataItemFactory","./ContDataItemFactory","./TemporalDataItemFactory","./GeoDataItemFactory","./GeoSegmentDataItemFactory","./ReferenceDataItemFactory","./DataPoint","./DomainResolver","./Slot","./SingleCatSlot","./SingleContSlot","./Value"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g){"use strict";var v=new o,b=new a,y=new s,I=new l,_=new c;function w(e,t,n){var r=null==e?-1:Math.trunc(e);if(r<0||Number.isNaN(e))return-1;if(r>=n.length)throw new RangeError("Invalid DataItem index: "+e);var i=n[r];if(!i)throw new Error("Cannot map to null DataItem at index: "+r);if("any"!==t&&t!==i.getType())throw new Error("Cannot map a "+i.getType()+" dataItem to a "+t+" slot");return r}function C(e,t){return"geospatial"===e&&"getGeoAttributes"in t||"temporal"===e&&"getTemporalAttributes"in t}function S(e,t){switch(function(e,t){for(var n=null,r=0,i=e&&e.length;r0;if(d){u=new Array(f);for(var g=0;g=0&&((c=v).colIndex>=0&&"cat"===c.type&&c.end-c.start>1))&&(v=v.clone(e,t,v.colIndex<0?v.colIndex:a.length)).colIndex>=0&&a.push(v),u[g]=v}}else u=new Array(t.type===n.Cat?1:0),t.type===n.Cat&&(u[0]=b.virtual(e,t,l));var y=p;return t.multiDataItem||(t.type===n.Cat?y=h:t.type===n.Cont&&(y=m)),new y(t,d,u,s)}function D(e,t,n){var r=e[t];r||(r=e[t]=[]),r.push(n)}function R(e,t){return e.ordinal===t.ordinal?e.offset-t.offset:e.ordinal1)throw new Error("Multiple DataItems mapped to slot "+f.name+", which is not allowed");if(b<1&&p>0){for(var y=new Array(p),I=new Array(p),_=null,C=!1,S=-1,P=0;P1)throw new Error("Only one dataItem may be mapped to segment "+R.name);g&&b>0&&(v=w(g[0],R.type,r)),v>=0?(y[P]=v,I[P]=r[v],D(a,v,R),h<1&&(h=1),"caption"===R.part?S=v:C=!0):(R.optional||_||(_=R),y[P]=I[P]=null)}if(m=new Array(h),h>0){if(_&&(C||!f.subTypeOptional))throw new Error("Cannot leave segment "+_.name+" unmapped, it is not optional");if(C)m[0]=v=r.length,r.push(new u(v,i,f,y,I));else{if(!f.subTypeOptional)throw new Error("Slot "+f.name+" requires at least one non-caption segment to be mapped");m[0]=S}}}else{if(m=new Array(b),g)for(var T=0;T=0&&(m[h++]=v,D(a,v,f));h1?b*=A:A<1&&(b=0))):"cont"===T&&(m||(m=new d(M,L,h)),C=v.create(C,s,E,V,k,I.length,m,l)),C.colIndex>=0&&I.push(C)}M[V]=C}for(V=y;V=0&&I.push(C);b<0&&(b=0);for(var q=b>0?1:0,B=0;B=0&&((A=C.end-C.start)>1&&q>0&&H.forViz?q*=A:A<1&&(q=0))}z=M.length;for(var G,U,W,X=(I=function(e,t){for(var n,r,i,a=new Array(e.length),o=0,s=0,l=t.length;s=0&&a.indexOf(i)<0&&(a[o++]=i)}if(o<(r=e.length))for(n=0;n=y)G=_[V].resolveTuple(te,Q);else if(null!==(C=M[V]))if("cat"===C.type){if((U=te.getTupleIndex(V))=C.end)throw new RangeError(r.format("Invalid tuple index {0} for DataItem {1}, must be between {2} and {3}",U,C,C.start,C.end));G=C.getTuple(U)}else G=new g(te.getValue(V),s,C.slotRef,C);$[V]=G}for(V=0;V0&&W>0&&(ne+=U*W)),K[ee+C.colIndex]=G;var re=J.get(ne);W=re?re.offset+1:0,!Z&&(ne>q||W>0)&&(Z=!0),re=new f(te,s,M,h,Q,ne,K,ee,W),J.set(ne,re),L[Q]=re}return!n.needsSorted&&n.suppressMissing||L.sort(R),new i(a,s,e,h,M,L,o,Z,!1,null)}})})),define("com/ibm/vipr/internal/data/VIPRDataFactory",["barejs!decl","barejs!NSet","./DataSetFactory","./VIPRData"],(function(e,t,n,r){"use strict";var i=new n;return e.declareClass((function(){}),{process:function(n,a,o,s,l){if(!("getDataSetAt"in n))throw new TypeError("The supplied data does not meet the IVIPRData interface");for(var u=s.source?s.source.dataSets:s.dataSets,c=u.length,f=new Array(c),d=new t,p=0;p1&&_>0){--C,c=(l=w[0]).color,"at"in l&&null!==l.at?d=g+(f=n.clamp(0,l.at,1))*_:(f=0,d=l.value),b=p=d,S[0]=i.create(c,f,d),c=(l=w[C]).color,"at"in l&&null!==l.at?d=1===(f=n.clamp(0,l.at,1))?v:f*_+g:(f=1,d=l.value),y=d,S[C]=i.create(c,f,d),u=Math.abs(y-b)||0,I=b===g&&y===v;for(var P=1;Py)throw new Error("Stops are out of order, this is not supported.");S[P]=i.create(c,f,d)}}else S.length=2,(c=(l=C>0?w[0]:null)?l.color:null)||(c=o),S[0]=i.create(c,0,b),S[1]=i.create(c,1,y);return I?(h=a,m=S):(h=new t(b,y),m=function(e,t,n){for(var a=[],o=Math.abs(n-t)||0,s=null,l=1,u=0,c=0,f=e.length;c0&&l<0&&p>0&&s&&a.push(i.create(r.interpolate(s.color,d.color,(t-u)/(d.value-u)),0,t)),p>=0&&p<=1&&a.push(i.create(d.color,p,d.value)),c>0&&l<1&&p>1&&s&&a.push(i.create(r.interpolate(s.color,d.color,(n-u)/(d.value-u)),1,n)),s=d,l=p,u=d.value}return a}(S,g,v)),new s(S,h,m,e.interpolate)}},{stops:null,domain:null,aligned:null,interpolate:null,getStops:function(){return this.stops},getDomain:function(){return this.domain},getAligned:function(){return this.aligned},mustInterpolate:function(){return this.interpolate},getColor:function(e){for(var t=+e||0,n=this.stops,i=null,a=null,s=(n?n.length:0)-1;s>=0&&!(t>=(i=n[s]).value);--s)a=i;if(!(s<0)&&a&&this.interpolate&&i.value!==t){var l=Math.abs(a.value-i.value)||0,u=l&&(t-i.value)/l;return r.interpolate(i.color,a.color,u)}return i?i.color:o}})})),define("com/ibm/vipr/internal/property/ContPaletteProxy",["barejs!decl","com/ibm/vipr/rs/v1/IRSContPalette","../data/VIPRDataApi","./PaletteProxy","./RSContStops","../util/ContDomain"],(function(e,t,n,r,i,a){"use strict";return e.declareClass((function(t,n){r.call(this,t,n),e.defineProperties(this,{_lastDomain:{writable:!0,value:null},_lastStops:{writable:!0,value:null}})}),r,t,{_lastDomain:null,_lastStops:null,getColorStops:function(e,t){var r;if(r=t?a.fromRSv1(t):e?a.fromRSv1(e.getDomain()):a.EMPTY,null===this._lastDomain||!this._lastDomain.equals(r)){var o=this._resolver.getColorStops(n.dataToInfo(e),r);this._lastStops=i.fromHost(o,r),this._lastDomain=r}return this._lastStops}})})),define("com/ibm/vipr/internal/property/CustomCatPaletteProxy",["barejs!decl","../../util/Color","com/ibm/vipr/rs/v1/IRSCustomCatPalette","../data/VIPRDataApi","./PaletteProxy"],(function(e,t,n,r,i){"use strict";return e.declareClass((function(e,t){i.call(this,e,t)}),i,n,{getColor:function(e,n,a){return t.fromHost(this._resolver.getColor(e,n,r.dataToInfo(a)))||i.FALLBACK_COLOR}})})),define("com/ibm/vipr/internal/property/CustomContPaletteProxy",["barejs!decl","com/ibm/vipr/rs/v1/IRSCustomContPalette","./PaletteProxy","./RSContStops","../util/ContDomain"],(function(e,t,n,r,i){"use strict";return e.declareClass((function(e,t){n.call(this,e,t)}),n,t,{getColorStops:function(e){var t=i.fromRSv1(e),n=this._resolver.getColorStops(t);return r.fromHost(n,t)}})})),define("com/ibm/vipr/internal/property/PaletteProperty",["barejs!decl","barejs!WeakMap","../../api/PaletteType","../../property/IVizPaletteProperty","com/ibm/vipr/rs/v1/IRSPaletteProperty","com/ibm/vipr/rs/v1/IRSCatPaletteProperty","com/ibm/vipr/rs/v1/IRSContPaletteProperty","com/ibm/vipr/rs/v1/IRSCustomCatPaletteProperty","com/ibm/vipr/rs/v1/IRSCustomContPaletteProperty","./CatPaletteProxy","./ContPaletteProxy","./CustomCatPaletteProxy","./CustomContPaletteProxy","./ValueProperty"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p){"use strict";var h=new t;function m(e){p.RSValueProperty.call(this,e),h.set(this,e)}function g(e){m.call(this,e)}function v(e){m.call(this,e)}function b(e){m.call(this,e)}function y(e){m.call(this,e)}function I(e,t){p.VizValueProperty.call(this,e,t)}return e.declareClass(m,p.RSValueProperty,i,{paletteType:{enumerable:!0,get:"getPaletteType"},slot:{enumerable:!0,get:"getSlot"},getPaletteType:function(){return h.get(this).def.paletteType},getSlot:function(){var e=h.get(this).def;return e.slot&&e.slot.name}}),e.declareClass(g,m,a,{getTupleColor:function(e,t){return h.get(this)._rs.getValue().getTupleColor(e,t)},getColor:function(e){return h.get(this)._rs.getValue().getColor(e)}}),e.declareClass(v,m,o,{getColorStops:function(e,t){return h.get(this)._rs.getValue().getColorStops(e,t)}}),e.declareClass(b,m,s,{getColor:function(e,t,n){return h.get(this)._rs.getValue().getColor(e,t,n)}}),e.declareClass(y,m,l,{getColorStops:function(e){return h.get(this)._rs.getValue().getColorStops(e)}}),e.declareClass(I,p.VizValueProperty,r,{paletteType:{enumerable:!0,get:"getPaletteType"},slot:{enumerable:!0,get:"getSlot"},getPaletteType:function(){return this.def.paletteType},getSlot:function(){return this.def.slot}}),e.declareClass((function(t,r,i,a){var o;switch(p.call(this,t,r,i,function(e,t,r){return function(i){if(null===i)return null;switch(e){case n.Cat:return new u(t,i,r?r.name:null);case n.Cont:return new c(t,i);case n.CustomCat:return new f(t,i);case n.CustomCont:return new d(t,i);default:throw new Error("Unknown palette type")}}}(t.paletteType,a,t.slot)),t.paletteType){case n.Cat:o=new g(this);break;case n.Cont:o=new v(this);break;case n.CustomCat:o=new b(this);break;case n.CustomCont:o=new y(this);break;default:throw new Error("Unsupported palette type: "+t.paletteType)}e.defineProperties(this,{_rs:{value:o},_host:{value:new I(this,t)}})}),p,{_rs:null,_host:null,toHost:function(){return this._host},toRS:function(){return this._rs}})})),define("com/ibm/vipr/rs/v1/IRSProperties",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t,{get:function(e){},getBoolean:function(e){},getColor:function(e){},getEnum:function(e){},getFont:function(e){},getLength:function(e){},getNumber:function(e){},getString:function(e){},getCatPalette:function(e){},getContPalette:function(e){},getCustomCatPalette:function(e){},getCustomContPalette:function(e){}}),t})),define("com/ibm/vipr/internal/property/Properties",["barejs!decl","barejs!EventArgs","barejs!Evented","barejs!NMap","barejs!WeakMap","./BooleanProperty","./ColorProperty","./EnumProperty","./FontProperty","./GroupProperty","./LengthProperty","./NumberProperty","./StringProperty","./PaletteProperty","./ValueProperty","../../api/PaletteType","../../property/IVizProperties","../../property/PropertyVisibility","com/ibm/vipr/rs/v1/IRSProperties"],(function(e,t,n,r,i,a,o,s,l,u,c,f,d,p,h,m,g,v,b){"use strict";var y=new i,I=function(){function n(n,r,i){t.call(this),e.defineProperties(this,{change:{enumerable:!0,value:n},property:{enumerable:!0,value:r},previous:{enumerable:!0,value:i}})}return e.declareClass(n,t,{change:null,property:null,previous:null}),function(e,t){var r=y.get(e).on("active",(function(r){t(new n("active",r.property,r.oldValue),e)})),i=y.get(e).on("value",(function(r){t(new n("value",r.property,r.oldValue),e)}));return i.own(r),i}}();function _(e,t,n,r){var i=null;switch(e.type){case"boolean":i=new a(e,t,n);break;case"color":i=new o(e,t,n);break;case"enum":i=new s(e,t,n);break;case"font":i=new l(e,t,n);break;case"length":i=new c(e,t,n);break;case"number":i=new f(e,t,n);break;case"string":i=new d(e,t,n);break;case"palette":i=new p(e,t,n,r);break;default:throw new Error("Unhandled PropertyType: "+e.type)}return i}function w(e,t,n,r,i,a,o,s){for(var l=0,c=t.length;l=0;--s)o[s].toRS().abort(n);e._queue.destroy(n).then((function(){e._interactivity&&e._interactivity.update(null),e._renderer&&(e._renderer.destroy(),delete e._renderer),delete e._hostApi,t.prototype.destroy.call(e),r(null)}))})),e._destroyPromise},getRenderSurface:function(){return this.surface},setData:function(e,t){var n,r=null==e?null:Object(e);if(r&&!u.isProcessed(r)&&(r=this.vizBundle.processData(e,t,this.vizDef)),u.isSliced(r))n=u.toRS(r);else{var i=null;this.truncate&&(i=this._lastCapabilities||this.getCapabilities());var a=u.slice(r,null,i,this._hostApi,this.vizBundle.getNls());n=u.toRS(a.slices[0])}return this._data=u.initDataContext(this._dataContext,n),this._renderer.setData(n),this._lastCapabilities=null,this._renderedDecoVer=-1,r},setProperty:function(e,t){var n=this.properties.get(e);return n&&(n.value=t),n},render:function(e,t,n){var i=r.fromHost(e);return this._queue.add(i,t,n)},_beforeRender:function(t,n){var r=this._renderer.getBlockingRequests()||null,i=null;function a(e,t,r){if(!r.isActive()){var a=i.indexOf(r);a<0||(i.splice(a,1),i.length<1&&n.complete())}}if(r&&!Array.isArray(r))throw new TypeError("Renderer getBlockingRequests did not return a valid value");var o=0;if(r){o=r.length,i=[];for(var s=0;s0?t:0);a&&(r=m.fromRSv1(a))}return r},getClientPoint:function(e){var t=this.surface.getBoundingClientRect();return new i(e.getX()+t.left,e.y+t.top)},getItemsAtPoint:function(e,t){var n=x(e);return V(this._renderer.getItemsAtPoint(n.vis,n.viewPort,t>0?t:0))},getAxisItemsAtPoint:function(e,t){var n=x(e);return function(e){for(var t,n=e&&e.length||0,r=new Array(n),i=0,a=0;i0?t:0))},getItemsInPolygon:function(e){var t=e&&e.length||0;if(t<2)return[];for(var n,r=new Array(t),i=new Array(t),a=0;a=0&&this._requests.splice(t,1)}}.bind(this));return this._requests.push(r),r.toRS()},notify:function(e,t,n,r,i,a){if(!_.hasValue(e))throw new TypeError("Invalid Severity: "+e);if("string"!=typeof t)throw new TypeError("Invalid type: "+t);if("string"!=typeof n)throw new TypeError("Invalid id: "+n);var o=this._hostApi,s="undefined"!=typeof console;if(o){var l=new C(e,t,n,void 0===r?null:r,void 0===i?null:i,void 0===a?null:a);try{o.notify(l)}catch(e){}}else s&&console[e](t,r,a)},error:function(e,t,n,r,i){this.notify(_.Error,e,t,n,r,i)},warn:function(e,t,n,r,i){this.notify(_.Warning,e,t,n,r,i)},info:function(e,t,n,r,i){this.notify(_.Info,e,t,n,r,i)},setCustomData:function(e,t){var n=this._hostApi,r=new l(e,t);return n&&n.setCustomData&&n.setCustomData(r.name,r.items),r}})})),define("com/ibm/vipr/rs/v1/IRSDeprecatedProperty",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t,{evaluate:function(e,t){},setValue:function(e,t,n){}}),t})),define("com/ibm/vipr/rs/v1/IRSPropertyApi",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t,{deprecated:function(e){},parser:function(e){}}),t})),define("com/ibm/vipr/internal/property/PropertyApi",["barejs!decl","com/ibm/vipr/rs/v1/IRSDeprecatedProperty","com/ibm/vipr/rs/v1/IRSPropertyApi","com/ibm/vipr/rs/v1/IRSPropertyParser"],(function(e,t,n,r){"use strict";return e.declareClass((function(t){if(t&&!e.hasInterface(t,n))throw new TypeError("Provided api does not comply with IRSPropertyApi");e.defineProperty(this,"_api",{value:t})}),{_api:null,deprecated:function(n){var r=null;if(this._api&&(r=this._api.deprecated(n))&&!e.hasInterface(r,t))throw new TypeError("Invalid IRSDeprecatedProperty");return r},parser:function(t){var n=null;if(this._api&&(n=this._api.parser(t)||n)&&"function"!=typeof n&&!e.hasInterface(n,r))throw new TypeError("Invalid IRSPropertyParser");return n}})})),define("com/ibm/vipr/rs/v1/IRenderingService",["barejs"],(function(e){"use strict";function t(){}return e.decl.declareInterface(t,{getPropertyApi:function(){},init:function(e,t){},destroy:function(){},setData:function(e){},setProperty:function(e,t){},getBlockingRequests:function(){},render:function(e,t,n){},getEncodings:function(){},getCapabilities:function(){},getInteractivity:function(){},getState:function(){},setState:function(e){},getVisCoordinate:function(e,t){},getItemsAtPoint:function(e,t,n){},getAxisItemsAtPoint:function(e,t,n){},getItemsInPolygon:function(e,t){},getRegionAtPoint:function(e,t){}}),t})),define("com/ibm/vipr/internal/VizBundle",["barejs!decl","barejs!NMap","barejs!NSet","./VizService","./data/VIPRDataApi","./property/PropertyApi","../api/IVizBundle","../api/ResourceType","../internal/util/Deferred","../internal/util/StringUtil","../vizdef/VisualizationDef","com/ibm/vipr/rs/v1/IRenderingService"],(function(e,t,n,r,i,a,o,s,l,u,c,f){"use strict";var d=new n;function p(e,t,n){return t.length<1?l.resolve(n):l.all(t.map((function(t){return e.loadResource(t.resource,t.type)}))).then((function(e){for(var r=0;r=0&&(n=n.substr(t+r.length+1)),t=n.match(/\s*(?:at\s+|@)([^\r\n]+)/)}return e.defineProperty(this,"location",{value:t&&t[1]||""}).location}}})})),define("com/ibm/vipr/internal/util/log",["barejs!decl","../../api/IAppender","../../api/LogLevel","./LogMessage"],(function(e,t,n,r){"use strict";var i=[],a=Array.prototype.slice,o=Array.prototype.join,s=function(){var r=n.warn;function i(){}return e.declareClass(i,t,{level:{enumerable:!0,get:function(){return r},set:function(e){return r=n.parse(e,!0,!0)}},accept:function(e,t){return"undefined"!=typeof console&&e<=r},log:function(e){var t=console[e.level.name]||console.log;console.group&&console.group(e.context),t.call(console,"stack"in e?e.message+"\n\tat "+e.location:e.message),console.group&&console.groupEnd()}}),new i}();return e.defineObject((function e(t,n,s){var l=e,u=i.length;function c(e,t,n,r){var i=e;if(t){if((t=Math.floor(t)+1)in s)switch(i=s[t],n){case"*":i=JSON.stringify(i,null,isNaN(r)?r:+r);break;case"+":i=o.call(i,r);break;default:i=String(i)}}else i=i.charAt(0);return i}if(u>0){var f=new Date;"function"==typeof t&&(l=t,t=n,n=s,s=arguments[3]);for(var d=null,p=0;pr&&o.apiVersion<=1&&(r=o.apiVersion,t=o)}return t}})})),define("com/ibm/vipr/internal/util/loading/css",["exports","barejs!decl","barejs!Promise"],(function(e,t,n){"use strict";function r(e){return document.querySelector('link[type="text/css"][href="'+e+'"]')}t.defineObject(e,{loadCss:function(e){return new n((function(t,n){if("undefined"==typeof document)return n(new Error("There is no document, cannot load css"));var i=r(e);i||((i=document.createElement("link")).setAttribute("rel","stylesheet"),i.setAttribute("type","text/css"),i.setAttribute("href",e),(document.head||document.getElementsByTagName("head")[0]).appendChild(i)),t(e)}))},unloadCss:function(e){var t=r(e);t&&t.parentNode&&t.parentNode.removeChild(t)}},"css")})),define("com/ibm/vipr/internal/util/loading/url",["exports","barejs!decl"],(function(e,t){"use strict";var n=/^(?:\.\/(?!\.{1,2}\/)|\/)?(?:\.\.(?:\/|$))*(?:(?!\.{1,2})[^\/\r\n]+(?:\/|$))*$/,r=/^(blob:|file:\/\/|(?:(?:[^\r\n:]+:)?\/\/(?:\[[0-9a-f:]+\]|[^\r\n\/:\[\]\?\#]+)?|\[[0-9a-f:]+\]|[0-9]{1,3}(?:\.[0-9]{1,3}){3}|localhost|[^\r\n:\/\?#]+(?=:[0-9]+))(?::[0-9]+)?(?=$|[\/\?#])|)([^\r\n\?#]*)([?#][^\r\n]*|)$/i,i=/^\.\.?(?:$|\/)/,a=/^\/|\.[cCmM]?[jJ][sS]$/,o=new Array(16);function s(e,t){if(n.test(e)&&(t||e.lastIndexOf("./",0)<0))return e;var r=0;o.length=0;var i,a=0;do{i=e.indexOf("/",a);var s=e.substring(a,i<0?e.length:i);s.length<1?(0===a||i<0)&&o.push(""):".."===s?(0===r&&1===o.length&&"."===o[0]&&o.pop(),--r<0?o.push(s):o.pop()):"."===s?0===a&&t&&o.push(s):(++r,o.push(s)),a=i<0?e.length:i+1}while(i>=0);var l=o.join("/");return o.length=0,l}o.length=0,t.defineObject(e,{depth:function(e){var t=e?r.exec(e):null;return t?function(e){var t=0,n=e.length,r=0,i=0;0===e.lastIndexOf("/",0)&&++r;do{switch((i=e.indexOf("/",r))<0&&(i=n),i-r){case 0:i===n&&r>1&&++t;break;case 1:"."!==e.charAt(r)&&++t;break;case 2:"."===e.charAt(r)&&"."===e.charAt(r+1)?--t:++t;break;default:++t}r=i+1}while(r=0&&null!==i;){var l=i.lastIndexOf("/"),u=0;if(!n)for(var c=l+1;c0?i.substring(0,l):l+1=0||!0===arguments[1]&&i.test(e))return!1;var t=r.exec(e);return!(t[1]||t[3]||a.test(t[2]))},stripQuery:function(e){return e.replace(r,"$1$2")},getPath:function(e){var t=e?r.exec(e):null;return t&&t[2]}},"url")})),define("com/ibm/vipr/internal/util/loading/xhr",["exports","barejs!decl","barejs!Promise"],(function(e,t,n){"use strict";var r=/(?:^text\/(?:ht|x)ml|application\/xml|\w+\/\w+\+xml)(?:;|$)/i,i=function(){return new XMLHttpRequest},a=t.declareEnum((function(){this.Unsent=0,this.Opened=1,this.HeadersReceived=2,this.Loading=3,this.Done=4})),o=t.declareEnum((function(){this.Auto="",this.ArrayBuffer="arraybuffer",this.Blob="blob",this.Document="document",this.Json="json",this.Text="text"}));function s(e){return e>=200&&e<300||304===e||1223===e||!e}function l(e,t){if("response"in e&&e.responseType===t)return e.response;var n=e.getResponseHeader("Content-Type"),i=t===o.Document?e.responseXML:e.responseText;switch(t){case"arraybuffer":case"blob":throw new Error("xhr cannot handle "+t);case"":case"text":null===i&&(i="");break;case"document":null===i||r.test(n)||(i=null);break;case"json":if(null!==i)try{i=JSON.parse(i)}catch(e){i=null}break;default:throw new Error("Internal error: getResponseObject does not handle responseType "+t)}return i}function u(e,n,r,i){t.defineProperties(this,{_xhr:{value:e},state:{enumerable:!0,value:n},response:{enumerable:!0,value:r},error:{enumerable:!0,value:i}})}function c(e,t){for(var n in t)t.hasOwnProperty(n)&&e.setRequestHeader(n,t[n])}function f(e,n,r,i,a){t.defineProperties(this,{method:{enumerable:!0,value:e},url:{enumerable:!0,value:n},options:{enumerable:!0,value:r},_xhr:{value:i},_promise:{value:a}})}function d(e){var t,r,d,p=e;arguments.length>1&&(t=p,p=arguments[1],arguments.length>2&&(r=p,p=arguments[2]));var h=new n((function(e,n){switch(typeof p){case"object":null!==p&&(t||(t=p.method),r||(r=p.url));break;case"string":r=p,p=null;break;case"undefined":p=null;break;default:throw new TypeError("Invalid options: "+p)}if("string"!=typeof t)throw new TypeError("A method is required, for example GET");if("string"!=typeof r)throw new TypeError("A url is required.");var f,h,m="",g=o.Auto;if(p&&(p.preventCache&&(m="?&".charAt(r.indexOf("?")+1)+"cb="+Date.now()),"user"in p&&(f=p.user),"password"in p&&(h=p.password),"responseType"in p&&(g=p.responseType,!o.hasValue(g))))throw new TypeError("Invalid or unsupported ResponseType: "+g);function v(){d&&(d.onreadystatechange&&(d.onreadystatechange=null),d.onload&&(d.onload=null),d.onerror&&(d.onerror=null),d.onabort&&(d.onabort=null),d.ontimeout&&(d.ontimeout=null),d=null)}function b(t){if(d){if(s(d.status))try{e(new u(d,"load",l(d,g),null))}catch(e){n(new u(d,"error",null,e))}else n(new u(d,"error",null,new Error(d.statusText)));v()}}function y(e){d&&(n(new u(d,"abort",null,new Error("Request aborted"))),v())}if("onload"in(d=i())&&"onerror"in d?(d.onload=b,d.onerror=function(e){d&&(n(new u(d,"error",null,new Error(d.statusText))),v())}):d.onreadystatechange=function(e){d.readyState===a.Done?b():d.readyState===a.Unsent&&y()},"onabort"in d&&(d.onabort=y),"ontimeout"in d&&(d.ontimeout=function(e){d&&(n(new u(d,"timeout",null,new Error("Connection timeout"))),v())}),d.open(t,r+m,!0,f,h),p&&(d.withCredentials=!!p.withCredentials,"headers"in p&&c(d,Object(p.headers)),"timeout"in p&&(d.timeout=p.timeout)),"responseType"in d&&g!==d.responseType)try{d.responseType=g}catch(e){}p&&"data"in p?d.send(p.data):d.send()}));return new f(t,r,p,d,h)}t.declareClass(u,{_xhr:null,state:null,response:null,error:null,status:{enumerable:!0,get:function(){return this._xhr.status}},statusText:{enumerable:!0,get:function(){return this._xhr.statusText}},responseText:{get:function(){return this._xhr.responseText}},responseXML:{get:function(){return this._xhr.responseXML}},getResponseHeader:function(e){return this._xhr.getResponseHeader(e)}}),t.declareClass(f,n,{method:null,url:null,options:null,_xhr:null,_promise:null,readyState:{enumerable:!0,get:function(){return this._xhr.readyState}},then:function(e,t){return this._promise.then(e,t)},catch:function(e){return this._promise.catch(e)},abort:function(){this._xhr.abort()}}),t.defineObject(e,{ReadyState:{enumerable:!0,value:a},ResponseType:{enumerable:!0,value:o},factory:{get:function(){return i},set:function(e){if("function"!=typeof e)throw new TypeError("The factory method must be a function");i=e}},request:d,get:d.bind(null,"GET")},"xhr")})),define("com/ibm/vipr/internal/util/VIPRNls",["barejs!decl","../../api/INls"],(function(e,t){"use strict";var n=/^\$nls\.([^\s]+)/,r=Object.prototype.hasOwnProperty;return e.declareClass((function(){e.defineProperty(this,"_bundles",{value:[]})}),t,{_bundles:null,addBundle:function(e){e&&this._bundles.indexOf(e)<0&&this._bundles.push(e)},resolve:function(e){if(null==e)return null;var t=this;return String(e).replace(n,(function(e,n){var r=t.get(n);return null!==r?r:n}))},has:function(e){for(var t=this._bundles.length-1;t>=0;--t)if(r.call(this._bundles[t],e))return!0;return!1},get:function(e){for(var t=this._bundles.length-1;t>=0;--t){var n=this._bundles[t];if(r.call(n,e))return n[e]}return null}})})),define("com/ibm/vipr/internal/util/ResourceLoader",["barejs!decl","barejs!NMap","barejs!Promise","barejs!WeakMap","../../api/ResourceType","../manifest/Manifest","./loading/css","./loading/url","./loading/xhr","./StringUtil","./VIPRNls","./XmlParser"],(function(e,t,n,r,i,a,o,s,l,u,c,f){"use strict";var d=/\.(\w+)$/,p=/(?:^|\/)css!/i,h=/\s*;\s*/g,m=/^(?:i18n$|text$|barejs$|com\/ibm\/vipr\/rs\/)/,g=e.freeze(["scriptType","urlArgs","useXhr","waitSeconds","xhtml"]),v=n.resolve(null),b=e.freeze({responseType:l.ResponseType.Document}),y=e.freeze({virtual_item:"",virtual_value:""}),I=null,_=Function.prototype.call.bind(Object.prototype.hasOwnProperty);"undefined"!=typeof navigator&&(I=navigator.languages&&navigator.languages[0]||navigator.language||navigator.userLanguage||null),I||(I="en-US");var w="undefined"!=typeof requirejs&&requirejs.s&&requirejs.s.contexts||null,C=new r;function S(){}function P(e){var t=null;if(e)for(var n=(t=e.trim().split(h)).length-1;n>=0;--n){var r=t[n];r.length>0?t[n]=r:t.splice(n,1)}return t}function D(e,t,r){if(!t||t.length<1)return e||v;function i(e){for(var i=t.length,a=new Array(i),o=0;o=0){var a=e.substr("vipr/css!".length);return o.loadCss(t.require.toUrl(a)).then((function(){t.defined[e]=a}))}return new n((function(n,a){function o(n){t.require.undef(e),a(n)}t.require([e],(function(e){try{n(r?r.call(i,e):e)}catch(e){o(e)}}),o)}))},isLoaded:function(e){return _(this._context.defined,e)},once:function(e){return this.isLoaded(e)?n.resolve(this._context.defined[e]):this.load.apply(this,arguments)},unload:function(e){p.test(e)&&o.unloadCss(this._context.require.toUrl(e.substring(e.indexOf("!")+1))),this._context.require.undef(e)},toUrl:function(e){return this._context.require.toUrl(e)}}),e.declareClass(d,c,{_parent:null,configure:function(e){this._context.configure(e)},unloadAll:function(){for(var e=Object.keys(this._context.defined),t=e.length-1;t>=0;--t)this.unload(e[t])}}),e.declareClass(h,c,{createContext:function(e,t,n,r){var a,o,s=i+e+"["+t+"]",l=R(s);if(!(l||(require.config((a={context:s,locale:t},o=this._context.config,g.forEach((function(e){_(o,e)&&(a[e]=o[e])})),a)),l=R(s))))throw new Error("ResourceLoader failed to create requirejs context "+s);if(!_(l.config.paths,n)){var u={};u[n]=r,l.configure({paths:u})}var c=C.get(l);return c||(c=new d(t,l,this)),c}}),new h}();function A(t,n,r){e.defineProperties(this,{_pattern:{value:t},_handler:{value:n||null},_handlerContext:{value:r||null}})}e.declareClass(A,{_pattern:null,_handler:null,_handlerContext:null,resolve:function(e){return this._pattern?u.format(this._pattern,e):e},load:function(e,t){return t.load(this.resolve(e),this._handler,this._handlerContext)}});var E=new A("vipr/css!{0}"),x=new A(null),j=new A("text!{0}",JSON.parse,JSON),z=new A("i18n!{0}"),N=new A("text!{0}"),O=new A("text!{0}",f.fromString,f);return e.declareClass((function(n,r){var a;e.defineProperties(this,{location:{enumerable:!0,value:s.normalize(n)},bundleId:{enumerable:!0,value:r},_manifestPromise:{writable:!0,value:null},_manifestAmd:{writable:!0,value:null},_manifest:{writable:!0,value:null},_moduleFormat:{writable:!0,value:null},_rootAmd:{writable:!0,value:null},_rootUrl:{writable:!0,value:null},_contextName:{writable:!0,value:null},_contexts:{value:new t},_resolvers:{value:(a=new t,a.set(i.Css,E),a.set(i.Html,N),a.set(i.JavaScript,x),a.set(i.Json,j),a.set(i.Nls,z),a.set(i.Svg,N),a.set(i.Text,N),a.set(i.Xml,O),a.set(i.Raw,x),a)}})}),{getDefaultLocale:function(){return V.locale}},{location:null,bundleId:null,_manifestPromise:null,_manifestAmd:null,_manifest:null,_moduleFormat:null,_rootAmd:null,_rootUrl:null,_contextName:null,_contexts:null,_resolvers:null,_configurePlugin:function(e){var t=i.parse(e.type);if(!t)throw new TypeError("Invalid type: "+e.type);var n=e.path;n.indexOf("{0}")<0&&(n+="{0}"),this._resolvers.set(t,new A(n))},getLocation:function(){return this.location},loadManifest:function(e){if(this._manifestPromise)return this._manifestPromise;var t,n=s.join(this.location,e);return s.maybeModuleId(n,!0)?(this._manifestAmd=n,t=O.load(n,V)):t=l.get(n,b).then((function(e){return e.response})),t=t.then(function(e){if(!e)throw new Error("Failed to load manifest");var t;try{t=a.fromXmlDocument(e)}catch(e){throw new Error("Invalid manifest file")}if(this._manifest=t,this._moduleFormat=t.getModuleFormat()||"amd","amd"!==this._moduleFormat)throw"esm"===this._moduleFormat?new Error("ES Modules are not supported by this version of VIPR"):new TypeError("Invalid module format: "+this._moduleFormat+", expected amd or esm");var n=s.maybeModuleId(this.location,!0);return this._rootUrl=n?s.stripQuery(V.toUrl(this.location)):this.location,t.getAmdPath()?this._rootAmd=t.getAmdPath():n&&(this._rootAmd=this.location),this._rootAmd||(this._rootAmd=s.getPath(this.location),0===this._rootAmd.lastIndexOf("/",0)&&(this._rootAmd=this._rootAmd.substring(1,this._rootAmd.length))),this._contextName=t.getContext()||t.getSymbolicName()||this.bundleId,t.plugins.forEach(this._configurePlugin,this),t}.bind(this)),this._manifestPromise=t,t.catch(function(){this.unload()}.bind(this)),t},load:function(e,t,r){if(!this._manifest)return n.reject(new Error("ResourceLoader is not initialized, cannot load"));var a,o=s.join(this._rootAmd,e);if(t){if(!(a=i.parse(t)))return n.reject(new Error("Unknown resource type: "+t))}else{var l=d.exec(o);if(l&&(a=i.parse(l[1])),!a)return n.reject(new Error("Type cannot be inferred"))}var u=this._resolvers.get(a);return u?this._resolveContext(r).then(u.load.bind(u,o)):n.reject(new Error("No loader for type: "+(t||a)))},unload:function(){this._manifestPromise=null,this._manifest=null,this._manifestAmd&&(V.unload(this._manifestAmd),V.unload(O.resolve(this._manifestAmd)),this._manifestAmd=null),this._contexts.size>0&&(this._contexts.forEach((function(e){e.then((function(e){e.unloadAll()}))}),this),this._contexts.clear()),this._moduleFormat=null,this._rootUrl=null,this._rootAmd=null},createBundleNls:function(e){var t=new c,n=t.addBundle.bind(t);n(y);var r=z.load("com/ibm/vipr/nls/"+e+"/VIPR",V).then(n),a=P(this._manifest.getNls());if(a&&a.length>0){r=r.then(this._resolveContext.bind(this,e));var o=this._resolvers.get(i.Nls),l=this._rootAmd;r=D(r,a,(function(e,t){return o.load(s.join(l,e),t).then(n)}))}return r.then((function(){return t}))},_resolveContext:function(e){var t=this._contexts.get(e);if(!t){var n=this._rootAmd,r=this._rootUrl,i=V.createContext(this._contextName,e,n,r);t=D(v,P(this._manifest.getConfig()),(function(e){var t=s.maybeModuleId(e,!1)?s.join(n,e):null,a=s.join(r,e),o=s.parent(a);if(null!==t&&i.isLoaded(t)||i.isLoaded(a))return v;if(null!==t){var l=s.parent(t),u={};l&&o?u[l]=o:u[t]=a,i.configure({paths:u})}return i.load(t||a).then((function(e){if(null!==e&&"object"==typeof e){var t=e;if(_(t,"baseUrl")||_(t,"paths")){t=Object.assign({},t);var n=o;if(_(t,"baseUrl")&&(n=s.join(n,t.baseUrl),delete t.baseUrl),_(t,"paths")){var r=t.paths;for(var a in t.paths={},r)_(r,a)&&(t.paths[a]=s.join(n,r[a]))}}i.configure(t)}}))})),t=(t=D(t,P(this._manifest.getPreload()),(function(e){return i.once(s.join(n,e)).catch(S)}))).then((function(){return i})),this._contexts.set(e,t)}return t}})})),define("com/ibm/vipr/internal/vizdef/SlotOverride",["barejs!decl","../../vizdef/Aggregation","../../vizdef/DefaultMapping","../../vizdef/FieldRole","../../vizdef/SlotType"],(function(e,t,n,r,i){"use strict";var a=void 0;function o(e){return null==e?a:String(e)}function s(t,n,r,i,a,o,s,l,u){e.defineProperties(this,{type:{enumerable:!0,value:t},optional:{enumerable:!0,value:n},caption:{enumerable:!0,value:r},description:{enumerable:!0,value:i},aggregation:{enumerable:!0,value:a},suppressMissing:{enumerable:!0,value:o},role:{enumerable:!0,value:s},defaultMapping:{enumerable:!0,value:l},hidden:{enumerable:!0,value:u}})}return e.declareClass(s,{DEFAULT_TYPE:{enumerable:!0,value:a},DEFAULT_OPTIONAL:{enumerable:!0,value:a},DEFAULT_CAPTION:{enumerable:!0,value:a},DEFAULT_DESCRIPTION:{enumerable:!0,value:a},DEFAULT_AGGREGATION:{enumerable:!0,value:a},DEFAULT_SUPPRESSMISSING:{enumerable:!0,value:a},DEFAULT_ROLE:{enumerable:!0,value:a},DEFAULT_DEFAULTMAPPING:{enumerable:!0,value:a},DEFAULT_HIDDEN:{enumerable:!0,value:a},create:function(l){var u=null;return l&&(u=new s("type"in l&&i.parse(l.type)||a,"optional"in l?!!l.optional:a,"caption"in l?o(l.caption):a,"description"in l?o(l.description):a,"aggregation"in l&&t.parse(l.aggregation)||a,"suppressMissing"in l?!!l.suppressMissing:a,"role"in l&&r.parse(l.role)||a,"defaultMapping"in l&&n.parse(l.defaultMapping)||a,"hidden"in l?!!l.hidden:a)),!u||u.isEmpty()?s.Empty:e.freeze(u)},merge:function(e,t){var n=!t||t.isEmpty();return!e||e.isEmpty()?n?s.Empty:t:n?e:new s(t.getType(e.type),t.getOptional(e.optional),t.getCaption(e.caption),t.getDescription(e.description),t.getAggregation(e.aggregation),t.getSuppressMissing(e.suppressMissing),t.getRole(e.role),t.getDefaultMapping(e.defaultMapping),t.getHidden(e.hidden))}},{type:null,optional:null,caption:null,description:null,aggregation:null,suppressMissing:null,role:null,defaultMapping:null,hidden:null,getType:function(e){return this.type===a?e:this.type},getOptional:function(e){return this.optional===a?e:this.optional},getCaption:function(e){return this.caption===a?e:this.caption},getDescription:function(e){return this.description===a?e:this.description},getAggregation:function(e){return this.aggregation===a?e:this.aggregation},getSuppressMissing:function(e){return this.suppressMissing===a?e:this.suppressMissing},getRole:function(e){return this.role===a?e:this.role},getDefaultMapping:function(e){return this.defaultMapping===a?e:this.defaultMapping},getHidden:function(e){return this.hidden===a?e:this.hidden},isEmpty:function(){return this===s.Empty||this.type===a&&this.optional===a&&this.caption===a&&this.description===a&&this.aggregation===a&&this.suppressMissing===a&&this.role===a&&this.defaultMapping===a&&this.hidden===a}}),e.defineProperty(s,"Empty",{enumerable:!0,value:new s(a,a,a,a,a,a,a,a)})})),define("com/ibm/vipr/internal/vizdef/UserConfig",["barejs!decl","barejs!NMap","../../property/PropertyType","../../property/PropertyVisibility","./PropertyOverride","./SlotOverride"],(function(e,t,n,r,i,a){"use strict";var o=Object.prototype.hasOwnProperty;function s(e){return this.indexOf(e)>=0}function l(e,t,n){return!!e&&(e.indexOf(t)>=0||!!n&&n.some(s,e))}function u(e){return null==e?null:String(e)}function c(e){var t=null;if(e){var n=+e.length||0;t=new Array(n);for(var r=0;r0||this._slotOverrides&&this._slotOverrides.size>0||this._includeProps||this._includeSlots||this._excludeProps&&this._excludeProps.length>0||this._excludeSlots&&this._excludeSlots.length>0)},isSlotListed:function(e){var t=!this._includeSlots||this._includeSlots.includes(e.name),n=this._excludeSlots&&this._excludeSlots.includes(e.name);return t&&!n},getImplicitVisibility:function(){return this._includeProps?r.Excluded:r.Listed},getPropertyVisibility:function(e,t){return e.visibility===r.Configuration?e.visibility:l(this._excludeProps,e.name,e.aliases)?r.Excluded:l(this._includeProps,e.name,e.aliases)?r.Listed:t===r.Listed&&e.deprecated?e.visibility:t},getPropertyOverride:function(e){var t=i.Empty;if(this._propOverrides){for(var n=+(e.aliases&&e.aliases.length)||0,r=0;r1&&(f+=n),f=c.stringAttr(e,"name",f);var d="all"!==u,p=c.boolAttr(e,"uniqueDataPoints",!0);if(!d&&!p)throw new Error('DataSets with iterate="all" must have uniqueDataPoints true (the default)');return new v(n,t.freeze(l),f,s,d,"default"!==u,c.boolAttr(e,"requiresValues",l.some(Z)),p,i.resolve(c.stringAttr(e,"caption",i?i.get("dataset_defaultName"):f)))}function ie(e,n,i,a,o,s){if(!e)return null;var l=c.stringAttr(e,"name",null);if(!l)throw new Error("A property or group must have a name property");var u=e.tagName.toLowerCase();if("property"===u){if(!(u=c.stringAttr(e,"type",null)))throw new Error("Property "+l+" is missing a type");o&&o.warn('Property {0} is using deprecated xml: replace with <{1} name="{0}" ...>',l,u)}if(!x.hasValue(u))throw new Error("Invalid property type: "+u);var d,p=a.resolve(c.stringAttr(e,"caption",l)),h=a.resolve(c.stringAttr(e,"description",null)),m=c.commaSeparatedAttr(e,"alias",f),g=c.commaSeparatedAttr(e,"tags",null),v=n?j.Configuration:j.Listed;if(u===x.Group){var b=c.filterChildElements(e),y=b.length;if(y<1)throw new Error("Empty group: "+l);var _=new Array(y);d=!0;for(var w=!n,z=0;z0)throw new Error("AffectedBy can only be used on deprecated properties");var L=c.boolAttr(e,"allowNull",!1),M=c.stringAttr(e,"defaultValue",null),F=c.boolAttr(e,"writable",!1);if(d&&F)throw new Error("Deprecated property "+l+" cannot be writable, its value must be updated via the deprecated property API");var k=c.boolAttr(e,"requiresData",!1);switch(!n&&d&&(v=j.Excluded),u){case x.Boolean:return new S(l,p,h,m,g,v,d,O,L,S.parse(M,L,null),F,k);case x.Color:return new P(l,p,h,m,g,v,d,O,L,P.parse(M,L,null),F,k);case x.Enum:var q=t.freeze(c.filterChildElementsByTag(e,/^possiblevalue$/i).map((function(e){var n=c.getTextContent(e);return t.freeze(new I(n,a.resolve(c.stringAttr(e,"caption",n)),a.resolve(c.stringAttr(e,"description",null))))}))),B=c.boolAttr(e,"dynamic",!1);return new D(l,p,h,m,g,v,d,O,L,D.parse(M,L||B&&q.length<1,q,null),F,k,q,B);case x.Font:return new R(l,p,h,m,g,v,d,O,L,R.parse(M,L,null),F,k);case x.Length:return new T(l,p,h,m,g,v,d,O,L,T.parse(M,L,null),F,k,c.boolAttr(e,"allowNegative",!1));case x.Number:return new V(l,p,h,m,g,v,d,O,L,V.parse(M,L,null),F,k,V.parse(c.stringAttr(e,"minValue",null),!0,null),V.parse(c.stringAttr(e,"maxValue",null),!0,null));case x.String:return new A(l,p,h,m,g,v,d,O,L,A.parse(M,L,null),F,k);case x.Palette:var H=null,G=c.stringAttr(e,"slot",null),U=c.stringAttr(e,"type",null);if(null!==G){if(!(H=i(G)))throw new Error("Could not resolve slot "+G);if(!U&&"any"===(U=H.type))throw new Error("Cannot omit Palette type for a Slot of type any")}var W=r.valueOf(U,!0);if(!W)throw new Error("Invalid PaletteType: "+U);var Y=s.get(W)||0;s.set(W,Y+1);var Z=function(e){switch(e){case r.Cat:return X;case r.Cont:return K;case r.CustomCat:return $;case r.CustomCont:return J;default:throw new Error("Invalid PaletteType: "+e)}}(W),Q=E.parse(W,M,L,Z[Y%Z.length]);return new E(l,p,h,m,g,v,d,O,L,Q,F,k,H,W,c.numberAttr(e,"min",null),c.numberAttr(e,"max",null));default:throw new Error("vizDefParser does not support type: "+u)}}function ae(e,n){if(!e)return null;var r=t.freeze(c.filterChildElementsByTag(c.findChildElementByTag(e,/^decorations$/i),/^decoration$/i).map((function(e){return function(e,n){if(!e)return null;var r=c.stringAttr(e,"name",null),i=c.stringAttr(e,"type",null),a=null,o=null;if(!i)throw new Error("Decoration "+r+" is missing a type");if(!U.test(i))throw new Error("Decoration "+r+" has an unsupported type: "+i);i=i.toLowerCase();var s=c.commaSeparatedAttr(e,"target",null),l=+(s&&s.length)||0;if(l<1)throw new Error("Decoration "+r+" is missing targets, at least 1 target is required");var u=c.stringAttr(e,"targetSlot",null);if(null!==u&&!(a=n(u)))throw new Error("Decoration "+r+" references non-existing slot: "+u+" in the targetSlot definition");var f=c.stringAttr(e,"referenceSlot",null);if(null!==f&&!(o=n(f)))throw new Error("Decoration "+r+" references non-existing slot: "+f+" in the referenceSlot definition");for(var d=0;d0){if(s.length>0)throw new Error("VizDef has a slot outside of a group node.");s=null}break;case"datasets":l=d(y,/^dataset$/i);break;case"properties":u=c.filterChildElements(y);break;case"configuration":m=c.filterChildElements(y);break;case"capabilities":v=y;break;case"metadata":b=d(y,/^metadataentry$/i)}if(s){for(I=0,_=s.length;I<_;++I)s[I]=te(s[I],r);(o=new Array(1))[0]=new L(r.get("dataset_defaultName"),null,s)}else for(I=0,_=o.length;I<_;++I)o[I]=ne(o[I],r);var C,S=G.resolveSlot.bind(G,o),P=new n,D=[];for(I=0,_=l.length;I<_;++I){if(C=re(l[I],I,S,r,_,D),P.has(C.name))throw new Error("DataSet name must be unique, found duplicate name: "+C.name);P.set(C.name,C),l[I]=C}for(I=0,_=D.length;I<_;++I){var R=D[I];if(!(C=P.get(R.dataSetName)))throw new Error("Could not resolve data set "+R.dataSetName+", data sets must be referenced by name.");var T=C.getSlot(R.slotName);if(!T)throw new Error("Could not resolve referenced slot "+R.slotName+" on data set "+C.name);R.slot.setReference(T)}var V,A=new n;for(I=0,_=u.length;I<_;++I)u[I]=ie(u[I],!1,S,r,i,A);for(I=0,_=m.length;I<_;++I)m[I]=ie(m[I],!0,S,r,i,A);for(v=v?ae(v,S):new g(f),I=0,_=b.length;I<_;++I)b[I]=(V=b[I])?new w(c.stringAttr(V,"name",null),c.stringAttr(V,"value",null)):null;return new G(null,t.freeze(o),function(e){var n,r=e.length;if(r<1)n=f;else if(r<2)n=e[0].slots;else{n=[];for(var i=0;i