UNPKG

devexpress-reporting

Version:

DevExpress Reporting provides the capability to develop a reporting application to create and customize reports.

9 lines (8 loc) 1.28 MB
/** * DevExpress HTML/JS Query Builder (dx-querybuilder.min.js) * Version: 18.1.10 * Build date: 2019-03-10 * Copyright (c) 2012 - 2019 Developer Express Inc. ALL RIGHTS RESERVED * License: https://www.devexpress.com/Support/EULAs/NetComponents.xml */ var DevExpress;!function(a){!function(a){!function(b){function c(){var a=-1;if("Microsoft Internet Explorer"==navigator.appName){var b=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=b.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1))}else if("Netscape"==navigator.appName){var b=new RegExp("Trident/.*rv:([0-9]{1,}[.0-9]{0,})");null!=b.exec(navigator.userAgent)&&(a=parseFloat(RegExp.$1))}return a}ko.bindingHandlers.routeLineDraggable={init:function(b,c){var d=c(),e=$.extend({snap:".dxrd-drag-snap-line",snapTolerance:a.Internal.SnapLinesHelper.snapTolerance},ko.unwrap(d),{start:function(a,b){d.starting()},stop:function(a,b){d.stopped()},drag:function(a,b){var c=b.position.left-b.originalPosition.left,e=b.position.top-b.originalPosition.top;d.forceResize({delta:{dx:c,dy:e}})}});$(b).draggable(e)}},ko.bindingHandlers.updateConnectorArrow={init:function(a,b,d,e,f){var g=c();if(g>-1&&g<=11){var h=f.$data.routePointsSet.subscribe(function(){f.$data.showArrow()&&a.parentNode.insertBefore(a,a)});ko.utils.domNodeDisposal.addDisposeCallback(a.parentNode,function(){return h.dispose()})}}}}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){!function(c){function d(){c.controlsFactory.registerControl("Unknown",{info:c.unknownSerializationsInfo,type:b.ElementViewModel,nonToolboxItem:!0,surfaceType:b.SurfaceElementBase}),c.controlsFactory.registerControl("Connector",{info:[c.name,{propertyName:"location",displayName:"Location",editor:a.JS.Widgets.editorTemplates.objecteditor},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:c.ConnectorSurface,type:c.ConnectorViewModel,elementActionsTypes:[],nonToolboxItem:!1}),c.controlsFactory.registerControl("RoutedConnector",{info:[c.name,{propertyName:"location",displayName:"Location",editor:a.JS.Widgets.editorTemplates.objecteditor},{propertyName:"startPoint",modelName:"@StartPoint",link:!0},{propertyName:"endPoint",modelName:"@EndPoint",link:!0}],surfaceType:c.RoutedConnectorSurface,type:c.RoutedConnectorViewModel,elementActionsTypes:[],nonToolboxItem:!1}),c.controlsFactory.registerControl("ConnectionPoint",{info:c.connectionPointSerializationInfo,surfaceType:c.ConnectionPointSurface,type:c.ConnectionPointViewModel,elementActionsTypes:[],nonToolboxItem:!0}),c.controlsFactory.registerControl("Diagram",{info:c.diagramSerializationsInfo,surfaceType:c.DiagramSurface,popularProperties:["name"],type:c.DiagramViewModel,elementActionsTypes:[],isContainer:!0,nonToolboxItem:!0}),c.controlsFactory.registerControl("DiagramElement",{info:c.diagramElementSerializationInfo,defaultVal:{"@SizeF":"150,50",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:c.DiagramElementSurface,popularProperties:["text"],type:c.DiagramElementViewModel,elementActionsTypes:[],nonToolboxItem:!1}),c.controlsFactory.registerControl("Ellipse",{info:c.diagramElementSerializationInfo,defaultVal:{"@SizeF":"150,50","@Type":"Ellipse",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:c.DiagramElementSurface,popularProperties:["text"],type:c.DiagramElementViewModel,elementActionsTypes:[],nonToolboxItem:!1}),c.controlsFactory.registerControl("Condition",{info:c.diagramElementSerializationInfo,defaultVal:{"@SizeF":"150,50","@Type":"Condition",ConnectingPoints:{Item1:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"1","@PercentOffsetY":"0.5"},Item2:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"1"},Item3:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0.5","@PercentOffsetY":"0"},Item4:{"@ControlType":"ConnectingPoint","@PercentOffsetX":"0","@PercentOffsetY":"0.5"}}},surfaceType:c.DiagramElementSurface,popularProperties:["text"],type:c.DiagramElementViewModel,elementActionsTypes:[],nonToolboxItem:!1}),c.controlsFactory.registerControl("ConnectingPoint",{info:c.connectingPointSerializationInfo,surfaceType:c.ConnectingPointSurface,type:c.ConnectingPointViewModel,elementActionsTypes:[],nonToolboxItem:!0})}c.controlsFactory=new b.Utils.ControlsFactory,c.registerControls=d}(b.Diagram||(b.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},DevExpress;!function(a){!function(a){!function(b){var c=function(c){function d(a,b,d,e,f){c.call(this,a,b,d,e),this.startConnectingPoint=null,this.newConnector=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=function(a){f.update(a)}}return __extends(d,c),d.prototype.startDrag=function(a){if(!(a instanceof b.ConnectingPointSurface))throw new Error("ConnectingPointDragHandler can be applied to the ConnectingPoint only.");this.startConnectingPoint=a;var c=this.startConnectingPoint.parent.getControlModel();this.newConnector=c.parentModel().createChild({"@ControlType":"RoutedConnector"}),this.newConnector.startPoint().connectingPoint(this.startConnectingPoint.getControlModel())},d.prototype.drag=function(a,b){b.position.left+=b.scroll.left,b.position.top+=b.scroll.top;var c=this._getAbsoluteSurfacePosition(b);this.newConnectorSurface.endPoint().rect({top:c.top,left:c.left})},d.prototype.doStopDrag=function(){if(this.selection.dropTarget){var a=this.selection.dropTarget.getControlModel();if(a instanceof b.ConnectingPointViewModel)this.newConnector.endPoint().connectingPoint(a);else if(a instanceof b.DiagramElementViewModel){var c=a.connectingPoints();this.newConnector.endPoint().connectingPoint(c[0])}this.selection.initialize(this.newConnectorSurface)}},Object.defineProperty(d.prototype,"newConnectorSurface",{get:function(){return this.newConnector&&a.Internal.findSurface(this.newConnector)},enumerable:!0,configurable:!0}),d}(a.Internal.DragDropHandler);b.ConnectingPointDragHandler=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(a){function c(b,c,d,e,f){a.call(this,b,c,d,e),this.currentConnectionPoint=null,this.cursor="arrow",this.containment=".dxrd-ghost-container",this.helper=function(a){f.update(a)}}return __extends(c,a),c.prototype.startDrag=function(a){if(!(a instanceof b.ConnectionPointSurface))throw new Error("ConnectionPointDragHandler can be applied to the ConnectionPoint only.");this.currentConnectionPoint=a},c.prototype.drag=function(a,b){b.position.left+=b.scroll.left,b.position.top+=b.scroll.top;var c=this._getAbsoluteSurfacePosition(b);this.currentConnectionPoint.rect({top:c.top,left:c.left})},c.prototype.doStopDrag=function(){if(this.selection.dropTarget){var a=this.selection.dropTarget.getControlModel();if(a instanceof b.ConnectingPointViewModel){var c=this.currentConnectionPoint.parent.getControlModel();this.currentConnectionPoint.getControlModel()===c.startPoint()?c.startPoint().connectingPoint(a):c.endPoint().connectingPoint(a)}else if(a instanceof b.DiagramElementViewModel){var c=this.currentConnectionPoint.parent.getControlModel(),d=a.connectingPoints();this.currentConnectionPoint.getControlModel()===c.startPoint()?c.startPoint().connectingPoint(d[0]):c.endPoint().connectingPoint(d[0])}}},c}(a.Internal.DragDropHandler);b.ConnectionPointDragHandler=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){b.name={propertyName:"name",modelName:"@Name",displayName:"Name",editor:a.Widgets.editorTemplates.text,validationRules:a.Internal.nameValidationRules},b.text={propertyName:"text",modelName:"@Text",displayName:"Text",editor:a.Widgets.editorTemplates.text},b.size={propertyName:"size",modelName:"@Size",defaultVal:"100,50",from:a.Size.fromString,displayName:"Size",editor:a.Widgets.editorTemplates.objecteditor},b.location={propertyName:"location",modelName:"@Location",from:a.Point.fromString,displayName:"Location",editor:a.Widgets.editorTemplates.objecteditor},b.sizeLocation=[b.size,b.location],b.unknownSerializationsInfo=[b.name].concat(b.sizeLocation)}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(a){function c(b,c,d){a.call(this,b,c,d)}return __extends(c,a),c.prototype.getControlFactory=function(){return b.controlsFactory},c}(a.ElementViewModel);b.DiagramElementBaseViewModel=c;var d=function(c){function d(d,e,f){var g=this;c.call(this,$.extend({"@ControlType":"DiagramElement"},d),e,f),this.connectingPoints=a.Utils.deserializeArray(d&&d.ConnectingPoints||[],function(a){return new b.ConnectingPointViewModel(a,g,f)}),void 0===this.text()&&this.text(this.name())}return __extends(d,c),d}(c);b.DiagramElementViewModel=d,b.diagramElementSerializationInfo=[b.size,b.location,b.name,b.text,{propertyName:"type",modelName:"@Type"}]}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(c){function d(d,e,f){var g=this;c.call(this,$.extend({"@ControlType":"ConnectingPoint"},d),e,f),this.side=ko.pureComputed(function(){return g.percentOffsetY()>=g.percentOffsetX()?g.percentOffsetY()>1-g.percentOffsetX()?b.PointSide.South:b.PointSide.West:g.percentOffsetY()>1-g.percentOffsetX()?b.PointSide.East:b.PointSide.North}),this.size=new a.Size(7,7),this.location=new a.Point(0,0),this.location.x=ko.pureComputed(function(){var a=g.parentModel();return a.location.x()+a.size.width()*g.percentOffsetX()}),this.location.y=ko.pureComputed(function(){var a=g.parentModel();return a.location.y()+a.size.height()*g.percentOffsetY()})}return __extends(d,c),d}(b.DiagramElementBaseViewModel);b.ConnectingPointViewModel=c,b.connectingPointSerializationInfo=[{propertyName:"percentOffsetX",modelName:"@PercentOffsetX",defaultVal:.5,from:a.Utils.floatFromModel},{propertyName:"percentOffsetY",modelName:"@PercentOffsetY",defaultVal:.5,from:a.Utils.floatFromModel}]}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(a){function b(c,d,e){a.call(this,c,d,$.extend({},b._unitProperties,e)),this.template="dx-diagram-element",this.selectiontemplate="dx-diagram-element-selection",this.contenttemplate="dx-diagram-element-content",this.margin=ko.observable(0)}return __extends(b,a),b._unitProperties={_height:function(a){return a.size.height},_width:function(a){return a.size.width},_x:function(a){return a.location.x},_y:function(a){return a.location.y}},b}(a.SurfaceElementBase);b.DiagramElementBaseSurface=c;var d=function(a){function b(b,c){a.call(this,b,c,null),this.contenttemplate="dxdd-element-content-with-connecting-points"}return __extends(b,a),b.prototype._getChildrenHolderName=function(){return"connectingPoints"},b}(c);b.DiagramElementSurface=d}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){var b=function(a){function b(c,d){a.call(this,c,d,b._unitProperties),this.template="dxdd-connecting-point",this.selectiontemplate="dxdd-connection-point-selection",this.contenttemplate=""}return __extends(b,a),b._unitProperties={_x:function(a){return ko.pureComputed(function(){return a.location.x()-a.parentModel().location.x()})},_y:function(a){return ko.pureComputed(function(){return a.location.y()-a.parentModel().location.y()})}},b}(a.DiagramElementBaseSurface);a.ConnectingPointSurface=b}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){var b=function(a){function b(b,c,d){var e=this;a.call(this,$.extend(b,{"@ControlType":"ConnectionPoint"}),c,d);var f=this.location.x,g=this.location.y;this.location.x=ko.pureComputed({read:function(){return e.connectingPoint()&&e.connectingPoint().location.x()||f()},write:function(a){e.connectingPoint(null),f(a)}}),this.location.y=ko.pureComputed({read:function(){return e.connectingPoint()&&e.connectingPoint().location.y()||g()},write:function(a){e.connectingPoint(null),g(a)}})}return __extends(b,a),b}(a.DiagramElementBaseViewModel);a.ConnectionPointViewModel=b,a.connectionPointSerializationInfo=[a.location,{propertyName:"connectingPoint",modelName:"@ConnectingPoint",link:!0}]}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(a){function b(c,d){var e=this;a.call(this,c,d,b._unitProperties),this.template="dx-diagram-connection-point",this.selectiontemplate="dx-diagram-connection-point",this.relativeX=ko.pureComputed(function(){return e.rect().left-e.parent.rect().left}),this.relativeY=ko.pureComputed(function(){return e.rect().top-e.parent.rect().top})}return __extends(b,a),b.prototype.container=function(){return this.getRoot()},b._unitProperties={_x:function(a){return a.location.x},_y:function(a){return a.location.y}},b}(a.SurfaceElementBase);b.ConnectionPointSurface=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(c){function d(d,e,f){var g=this;c.call(this,$.extend({"@ControlType":"Connector"},d),e,f),this.startPoint(this.startPoint()||new b.ConnectionPointViewModel({"@Location":"0, 0"},this,f)),this.endPoint(this.endPoint()||new b.ConnectionPointViewModel({"@Location":"150, 75"},this,f)),this.location=new a.Point(0,0),this.location.x=ko.pureComputed({read:function(){return g.getX()},write:function(a){var b=g.startPoint().location.x()<g.endPoint().location.x()?g.startPoint().location.x():g.endPoint().location.x(),c=a-b;g.startPoint().location.x(g.startPoint().location.x()+c),g.endPoint().location.x(g.endPoint().location.x()+c)}}),this.location.y=ko.pureComputed({read:function(){return g.getY()},write:function(a){var b=g.startPoint().location.y()<g.endPoint().location.y()?g.startPoint().location.y():g.endPoint().location.y(),c=a-b;g.startPoint().location.y(g.startPoint().location.y()+c),g.endPoint().location.y(g.endPoint().location.y()+c)}}),this.size=new a.Size(0,0),this.size.width=ko.pureComputed({read:function(){return g.getWidth()},write:function(a){g.startPoint().location.x()<g.endPoint().location.x()?g.endPoint().location.x(g.startPoint().location.x()+a):g.startPoint().location.x(g.endPoint().location.x()+a)}}),this.size.height=ko.pureComputed({read:function(){return g.getHeight()},write:function(a){g.startPoint().location.y()<g.endPoint().location.y()?g.endPoint().location.y(g.startPoint().location.y()+a):g.startPoint().location.y(g.endPoint().location.y()+a)}})}return __extends(d,c),d.prototype.getX=function(){return this.startPoint().location.x()<this.endPoint().location.x()?this.startPoint().location.x():this.endPoint().location.x()},d.prototype.getY=function(){return this.startPoint().location.y()<this.endPoint().location.y()?this.startPoint().location.y():this.endPoint().location.y()},d.prototype.getWidth=function(){return Math.abs(this.startPoint().location.x()-this.endPoint().location.x())||d.MIN_LINE_THICKNESS},d.prototype.getHeight=function(){return Math.abs(this.startPoint().location.y()-this.endPoint().location.y())||d.MIN_LINE_THICKNESS},d.MIN_LINE_THICKNESS=3,d}(b.DiagramElementBaseViewModel);b.ConnectorViewModel=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){var b=function(b){function c(c,d){b.call(this,c,d,null),this.template="dxdd-connector",this.selectiontemplate="dxdd-connector-selection",this.startPoint=ko.pureComputed(function(){return new a.ConnectionPointSurface(c.startPoint(),d)}),this.endPoint=ko.pureComputed(function(){return new a.ConnectionPointSurface(c.endPoint(),d)})}return __extends(c,b),c}(a.DiagramElementBaseSurface);a.ConnectorSurface=b}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(c){function d(e,f,g){var h=this;c.call(this,$.extend({"@ControlType":"RoutedConnector"},e),f,g),this._isUpdating=!1,this._getPower=function(a){for(var b=0;b<10;b++)if(a>=Math.pow(2,b)&&a<Math.pow(2,b+1))return b+1;return 1},this.seriesNumber=ko.observable(1),this.routePoints=ko.observable([]),this.freezeRoute=ko.observable(!1),this._disposables.push(ko.computed(function(){var a=!(1+h.startPoint().location.x()+h.startPoint().location.y()+h.endPoint().location.x()+h.endPoint().location.y());h._isUpdating||h.freezeRoute(a)})),this._disposables.push(ko.computed(function(){if(!h.freezeRoute()){var c=[],e=h._getStartPointSide(),f=h._getEndPointSide(),g=new a.Point(h.startPoint().location.x(),h.startPoint().location.y()),i=new a.Point(h.endPoint().location.x(),h.endPoint().location.y());h.startPoint().connectingPoint()&&(h._fixPoint(g,h.startPoint().connectingPoint().side()),c.push(g)),h.endPoint().connectingPoint()&&h._fixPoint(i,h.endPoint().connectingPoint().side());var j=Math.min(g.x(),i.x()),k=Math.min(g.y(),i.y()),l=Math.abs(g.x()-i.x()),m=Math.abs(g.y()-i.y()),n=h.seriesNumber(),o=h._getRatio(n),p=(n-1)*d.GRID_SIZE;g.y()-i.y()>0?g.x()-i.x()>0?e===b.PointSide.North||e===b.PointSide.East?f===b.PointSide.North||f===b.PointSide.East?(1!==n&&(l+=p,c.push(new a.Point(j+l,k+m))),c.push(new a.Point(j+l,k))):(c.push(new a.Point(j+l,k+m*o)),c.push(new a.Point(j,k+m*o))):f===b.PointSide.South||f===b.PointSide.West?c.push(new a.Point(j,k+m)):(c.push(new a.Point(j+l*o,k+m)),c.push(new a.Point(j+l*o,k))):e===b.PointSide.North||e===b.PointSide.West?f===b.PointSide.North||f===b.PointSide.West?(1!==n&&(j-=p,c.push(new a.Point(j,k+m))),c.push(new a.Point(j,k))):(c.push(new a.Point(j,k+m*o)),c.push(new a.Point(j+l,k+m*o))):f===b.PointSide.South||f===b.PointSide.East?c.push(new a.Point(j+l,k+m)):(c.push(new a.Point(j+l*o,k+m)),c.push(new a.Point(j+l*o,k))):g.x()-i.x()>0?e===b.PointSide.South||e===b.PointSide.East?f===b.PointSide.South||f===b.PointSide.East?(1!==n&&(l+=p,c.push(new a.Point(j+l,k))),c.push(new a.Point(j+l,k+m))):(c.push(new a.Point(j+l,k+m*o)),c.push(new a.Point(j,k+m*o))):f===b.PointSide.North||f===b.PointSide.West?c.push(new a.Point(j,k)):(c.push(new a.Point(j+l*o,k)),c.push(new a.Point(j+l*o,k+m))):e===b.PointSide.South||e===b.PointSide.West?f===b.PointSide.South||f===b.PointSide.West?(1!==n&&(j-=p,c.push(new a.Point(j,k))),c.push(new a.Point(j,k+m))):(c.push(new a.Point(j,k+m*o)),c.push(new a.Point(j+l,k+m*o))):f===b.PointSide.North||f===b.PointSide.East?c.push(new a.Point(j+l,k)):(c.push(new a.Point(j+l*o,k)),c.push(new a.Point(j+l*o,k+m))),h.endPoint().connectingPoint()&&c.push(i),h.routePoints(c)}}))}return __extends(d,c),d.prototype.getX=function(){var a=c.prototype.getX.call(this);return this.routePoints&&this.routePoints().forEach(function(b){b.x()<a&&(a=b.x())}),a},d.prototype.getY=function(){var a=c.prototype.getY.call(this);return this.routePoints&&this.routePoints().forEach(function(b){b.y()<a&&(a=b.y())}),a},d.prototype.getWidth=function(){var a=c.prototype.getWidth.call(this),b=this.getX();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(function(c){c.x()-b>a&&(a=c.x()-b)}),a},d.prototype.getHeight=function(){var a=c.prototype.getHeight.call(this),b=this.getY();return this.routePoints&&[this.startPoint().location,this.endPoint().location].concat(this.routePoints()).forEach(function(c){c.y()-b>a&&(a=c.y()-b)}),Math.round(a)},d.prototype._fixPoint=function(a,c){switch(c){case b.PointSide.North:a.y(a.y()-d.GRID_SIZE);break;case b.PointSide.East:a.x(a.x()+d.GRID_SIZE);break;case b.PointSide.West:a.x(a.x()-d.GRID_SIZE);break;case b.PointSide.South:a.y(a.y()+d.GRID_SIZE)}},d.prototype._getStartPointSide=function(){return this.startPoint().connectingPoint()?this.startPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?b.PointSide.North:b.PointSide.South:this.startPoint().location.x()>this.endPoint().location.x()?b.PointSide.West:b.PointSide.East},d.prototype._getEndPointSide=function(){return this.endPoint().connectingPoint()?this.endPoint().connectingPoint().side():this.startPoint().location.y()!==this.endPoint().location.y()?this.startPoint().location.y()>this.endPoint().location.y()?b.PointSide.South:b.PointSide.North:this.startPoint().location.x()>this.endPoint().location.x()?b.PointSide.East:b.PointSide.West},d.prototype._getRatio=function(a){for(var b=this._getPower(a),c=Math.pow(2,b),d=Math.pow(2,b-1),e=[],f=1;f<d;f++)f%2!=0&&(e.push(c-f),e.push(f));return e.reverse(),(e[a-d]||1)/c},d.prototype.beginUpdate=function(){this._isUpdating=!0},d.prototype.endUpdate=function(){this._isUpdating=!1},d.GRID_SIZE=10,d}(b.ConnectorViewModel);b.RoutedConnectorViewModel=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){var b=function(b){function c(d,e){var f=this;b.call(this,d,e,null),this.template="dxdd-routed-connector",this.selectiontemplate="dxdd-routed-connector-selection",this.showArrow=ko.observable(!1),this.isVisible=ko.observable(!0),this.routePoints=ko.observableArray(),this.routePointsSet=ko.pureComputed(function(){var a=[];return f.routePoints().forEach(function(b){a.push(b.x()+" "+b.y())}),a.join(", ")}),this.routeLineWrappers=ko.pureComputed(function(){for(var a=[],b=1;b<f.routePoints().length;b++)a.push(f._createRouteLineWrapper(f.routePoints()[b-1],f.routePoints()[b],1===b||b===f.routePoints().length-1));return a}),this.connectorID=function(){return f._connectorID},this._connectorID=c._connectorsCount++,this.startPoint=ko.pureComputed(function(){return new a.ConnectionPointSurface(d.startPoint(),e)}),this.endPoint=ko.pureComputed(function(){return new a.ConnectionPointSurface(d.endPoint(),e)}),this._disposables.push(d.routePoints.subscribe(function(a){f._updateRoutePoints()})),this._updateRoutePoints()}return __extends(c,b),c.prototype._createRoutePoint=function(a,b){var c=this;return{x:ko.pureComputed(function(){return c._context.rtl()?Math.round(c.getControlModel().size.width()-(a.x()-b.x())):Math.round(a.x()-b.x())}),y:ko.pureComputed(function(){return Math.round(a.y()-b.y())}),modelPoint:a}},c.prototype._createRouteLineWrapper=function(a,b,c){var d=this;void 0===c&&(c=!1);var e=this,f=Math.abs(a.x.peek()-b.x.peek())<1,g=a.modelPoint.y.peek(),h=a.modelPoint.x.peek();return{position:{top:Math.min(a.y.peek(),b.y.peek())-2,left:Math.min(a.x.peek(),b.x.peek())-2,width:Math.abs(a.x.peek()-b.x.peek())+6,height:Math.abs(a.y.peek()-b.y.peek())+6},isVerticalLine:f,resizeHandler:function(c){e._control.freezeRoute(!0);try{if(e._control.beginUpdate(),f){if(d._context.rtl())var i=h-c.delta.dx;else var i=h+c.delta.dx;a.modelPoint.x(i),b.modelPoint.x(i)}else{var j=g+c.delta.dy;a.modelPoint.y(j),b.modelPoint.y(j)}}finally{e._control.endUpdate()}},resizeStopped:function(){e._control.routePoints.notifySubscribers(e._control.routePoints())},isLocked:ko.observable(c)}},c.prototype._updateRoutePoints=function(){var a=this,b=[],c=this.getControlModel(),d=c.location;b.push(this._createRoutePoint(c.startPoint().location,d)),c.routePoints().forEach(function(c){b.push(a._createRoutePoint(c,d))}),b.push(this._createRoutePoint(c.endPoint().location,d)),this.routePoints(b)},c._connectorsCount=0,c}(a.DiagramElementBaseSurface);a.RoutedConnectorSurface=b}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){!function(c){var d=function(a){function d(c){var d=new b.Utils.ModelSerializer;a.call(this,c,null,d),this.controlType="Diagram",this.controls=ko.observableArray(),this.name("Diagram")}return __extends(d,a),d.prototype.getInfo=function(){return c.diagramSerializationsInfo},d}(c.DiagramElementBaseViewModel);c.DiagramViewModel=d,c.margins={propertyName:"margins",modelName:"@Margins",from:b.Margins.fromString,displayName:"Margins"},c.pageWidth={propertyName:"pageWidth",modelName:"@PageWidth",defaultVal:850,from:b.Utils.floatFromModel,displayName:"Page Width",editor:a.JS.Widgets.editorTemplates.numeric},c.pageHeight={propertyName:"pageHeight",modelName:"@PageHeight",defaultVal:1250,from:b.Utils.floatFromModel,displayName:"Page Height",editor:a.JS.Widgets.editorTemplates.numeric},c.diagramSerializationsInfo=[c.name,c.pageWidth,c.pageHeight,c.margins]}(b.Diagram||(b.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(b){var c=function(b){function c(d,e){void 0===e&&(e=ko.observable(1)),b.call(this,d,{measureUnit:ko.observable("Pixels"),zoom:e,dpi:ko.observable(100)},c._unitProperties),this.measureUnit=ko.observable("Pixels"),this.dpi=ko.observable(100),this.controls=ko.observableArray(),this.allowMultiselect=!1,this.focused=ko.observable(!1),this.selected=ko.observable(!1),this.underCursor=ko.observable(new a.Internal.HoverInfo),this.parent=null,this.templateName="dx-diagram-surface",this.margins={bottom:this._bottom,left:this._left,right:this._right,top:this._top},this.zoom=e,this._context=this,a.Utils.createObservableArrayMapCollection(d.controls,this.controls,this._createSurface)}return __extends(c,b),c.prototype.checkParent=function(a){return!1},c.prototype.getChildrenCollection=function(){return ko.observableArray([])},c._unitProperties={_width:function(a){return a.pageWidth},_height:function(a){return a.pageWidth},pageWidth:function(a){return a.pageWidth},pageHeight:function(a){return a.pageHeight},_bottom:function(a){return a.margins.bottom},_left:function(a){return a.margins.left},_right:function(a){return a.margins.right},_top:function(a){return a.margins.top}},c}(a.SurfaceElementBase);b.DiagramSurface=c}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){!function(c){function d(d,e,f,g){f&&a.JS.Localization.addCultureInfo({messages:f}),c.registerControls();var h=ko.pureComputed(function(){return new c.DiagramViewModel(e())}),i=ko.pureComputed(function(){return new c.DiagramSurface(h())}),j=b.Utils.createDesigner(h,i,c.controlsFactory,c.groups,void 0,void 0,g);j.connectionPointDragHandler=new c.ConnectionPointDragHandler(i,j.selection,j.undoEngine,j.snapHelper,j.dragHelperContent),j.connectingPointDragHandler=new c.ConnectingPointDragHandler(i,j.selection,j.undoEngine,j.snapHelper,j.dragHelperContent),j.isLoading(!1),j.selection.focused(i()),$(d).children().remove(),ko.applyBindings(j,d);var k=b.Internal.updateSurfaceContentSize(j.surfaceSize,d);return $(window).bind("resize",function(){k()}),j.tabPanel.width.subscribe(function(){k()}),k(),j}c.groups={Appearance:[],Behavior:[],Design:[c.name],Layout:[c.location,c.size,c.pageWidth,c.pageHeight]},c.createDiagramDesigner=d}(b.Diagram||(b.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){function b(b,c){var d={start:null,end:null};if(c.leftConnectionPoint.location.x()>b.rightConnectionPoint.location.x()+2*a.RoutedConnectorViewModel.GRID_SIZE)d.start=b.rightConnectionPoint,d.end=c.leftConnectionPoint;else if(b.leftConnectionPoint.location.x()>c.rightConnectionPoint.location.x()+2*a.RoutedConnectorViewModel.GRID_SIZE)d.start=b.leftConnectionPoint,d.end=c.rightConnectionPoint;else{var e=(b.rightConnectionPoint.location.x()+b.rightConnectionPoint.location.x())/2,f=(c.rightConnectionPoint.location.x()+c.rightConnectionPoint.location.x())/2;e>f?(d.start=b.rightConnectionPoint,d.end=c.rightConnectionPoint):(d.start=b.leftConnectionPoint,d.end=c.leftConnectionPoint)}return d}!function(a){a[a.East=0]="East",a[a.South=1]="South",a[a.North=2]="North",a[a.West=3]="West"}(a.PointSide||(a.PointSide={}));a.PointSide;a.determineConnectingPoints=b}(a.Diagram||(a.Diagram={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){!function(b){var c=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectingPointDragHandler);b.ConnectingPointDragHandler=c,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectingPointDragHandler");var d=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectionPointDragHandler);b.ConnectionPointDragHandler=d,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectionPointDragHandler");var e=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectionPointViewModel);b.ConnectionPointViewModel=e,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectionPointViewModel");var f=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectionPointSurface);b.ConnectionPointSurface=f,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectionPointSurface");var g=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectorViewModel);b.ConnectorViewModel=g,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectorViewModel");var h=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectorSurface);b.ConnectorSurface=h,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectorSurface");var i=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.RoutedConnectorViewModel);b.RoutedConnectorViewModel=i,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"RoutedConnectorViewModel");var j=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.RoutedConnectorSurface);b.RoutedConnectorSurface=j,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"RoutedConnectorSurface");var k=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectingPointViewModel);b.ConnectingPointViewModel=k,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectingPointViewModel"),b.connectingPointSerializationInfo=a.Analytics.Diagram.connectingPointSerializationInfo,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"connectingPointSerializationInfo");var l=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.ConnectingPointSurface);b.ConnectingPointSurface=l,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"ConnectingPointSurface");var m=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramElementBaseViewModel);b.DiagramElementBaseViewModel=m,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramElementBaseViewModel");var n=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramElementViewModel);b.DiagramElementViewModel=n,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramElementViewModel"),b.diagramElementSerializationInfo=a.Analytics.Diagram.diagramElementSerializationInfo,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"diagramElementSerializationInfo");var o=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramElementBaseSurface);b.DiagramElementBaseSurface=o,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramElementBaseSurface");var p=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramElementSurface);b.DiagramElementSurface=p,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramElementSurface");var q=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramViewModel);b.DiagramViewModel=q,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramViewModel"),b.margins=a.Analytics.Diagram.margins,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"margins"),b.pageWidth=a.Analytics.Diagram.pageWidth,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"pageWidth"),b.pageHeight=a.Analytics.Diagram.pageHeight,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"pageHeight"),b.diagramSerializationsInfo=a.Analytics.Diagram.diagramSerializationsInfo,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"diagramSerializationsInfo");var r=function(a){function b(){a.apply(this,arguments)}return __extends(b,a),b}(a.Analytics.Diagram.DiagramSurface);b.DiagramSurface=r,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"DiagramSurface"),b.controlsFactory=a.Analytics.Diagram.controlsFactory,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"controlsFactory"),b.registerControls=a.Analytics.Diagram.registerControls,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"registerControls"),b.groups=a.Analytics.Diagram.groups,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"groups"),b.createDiagramDesigner=a.Analytics.Diagram.createDiagramDesigner,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"createDiagramDesigner"),b.name=a.Analytics.Diagram.name,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"name"),b.text=a.Analytics.Diagram.text,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"text"),b.size=a.Analytics.Diagram.size,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"size"),b.location=a.Analytics.Diagram.location,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"location"),b.sizeLocation=a.Analytics.Diagram.sizeLocation,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"sizeLocation"),b.unknownSerializationsInfo=a.Analytics.Diagram.unknownSerializationsInfo,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"unknownSerializationsInfo"),b.PointSide=a.Analytics.Diagram.PointSide,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"PointSide"),b.determineConnectingPoints=a.Analytics.Diagram.determineConnectingPoints,a.Analytics.Internal._defineProperty(a.Designer.Diagram,a.Analytics.Diagram,"determineConnectingPoints")}(b.Diagram||(b.Diagram={}))}(a.Designer||(a.Designer={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){ko.bindingHandlers.dxQueryBuilder={init:function(a,c){var d=$("#dxrd-querybuilder").text(),e=$(a).append(d),f=ko.unwrap(c()),g=ko.unwrap(f.options);return f.designerModel(b.createQueryBuilder(e.children()[0],g.data,g.callbacks,g.localization,g.rtl)),{controlsDescendantBindings:!0}}},ko.bindingHandlers.dxdTableView={init:function(b,c,d,e,f){var g=$("#dxd-tableview").text(),h=$(b).append(g),i=ko.unwrap(c());ko.applyBindings({data:i,rtl:!!f.$root.rtl,noDataText:a.Analytics.Localization.noDataText,isImage:function(a){return"System.Byte[]"===i.schema[a].type},isImageTooLarge:function(a){return"!"===a[0]},getImageTooLargeText:function(a){return"Image too large ("+a.substring(1)+" bytes)"}},h.children()[0]);var j=h.find(".dxd-tableview-titles"),k=h.find(".dxd-tableview-data table");h.find(".dxd-tableview-titles .dxd-tableview-resizable").each(function(a,b){var c=$(b).find(".dxd-tableview-cell-text"),d=h.find(".dxd-tableview-data .dxd-tableview-resizable"+a);a<i.schema.length-1&&$(b).resizable({handles:"e",alsoResize:d.parent(),resize:function(a,b){c.outerWidth(b.size.width),d.outerWidth(b.size.width)}});var e=Math.max(c.width(),d.width());c.width(e),d.width(e)});var l=$(".dxd-tableview-data").dxScrollView("instance");return l&&(l.option("onScroll",function(a){a.scrollOffset.left>=0&&j.offset({left:k.offset().left,top:j.offset().top})}),f.$root.rtl&&l.scrollTo({left:l.scrollWidth(),top:0})),{controlsDescendantBindings:!0}}}}(a.QueryBuilder||(a.QueryBuilder={}))}(DevExpress||(DevExpress={}));var __extends=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},DevExpress;!function(a){!function(b){!function(c){function d(a){var b=$.extend(!0,{},i),c=[];c.push(i.valuesArray.filter(function(b){return b.value===a})[0]),c.push(i.valuesArray.filter(function(a){return"DevExpress.DataAccess.Expression"===a.value})[0]),b.valuesArray=c;var d=$.extend(!0,{},j);return d.valuesArray=c.slice(0,0),d.disabled=!0,[$.extend({disabled:!0},h),b,d].concat(k)}function e(a){return b.Utils.integerValueConverter(a,this.defaultValue)}function f(a){return b.Utils.floatValueConverter(a,this.defaultValue)}function g(a){if(a instanceof Date){var c=function(a){return(a<10?"0":"")+a};return b.Utils.formatUnicorn("#{0}/{1}/{2} {3}:{4}#",c(a.getMonth()+1),c(a.getDate()),a.getFullYear(),c(a.getHours()),c(a.getMinutes()))}return(a||"").toString()}c.dsParameterNameValidationRules=[{type:"custom",validationCallback:function(a){return o.validateName(a.value)},message:a.Analytics.getLocalization("Name is required and should be a valid identifier.","ASPxReportsStringId.ReportDesigner_NameIsRequired_Error")}],c.parameterValueSerializationsInfo={propertyName:"value",displayName:"Value",localizationId:"DevExpress.DataAccess.Parameter.Value",editor:b.Widgets.editorTemplates.text};var h={propertyName:"name",displayName:"Name",localizationId:"DevExpress.DataAccess.Parameter.Name",validationRules:c.dsParameterNameValidationRules,editor:b.Widgets.editorTemplates.text},i={propertyName:"type",displayName:"Type",localizationId:"DevExpress.DataAccess.Parameter.Type",modelName:"@Type",editor:b.Widgets.editorTemplates.combobox,valuesArray:[{value:"System.String",displayValue:"String",localizationId:"UtilsUIStringId.Parameter_Type_String"},{value:"System.DateTime",displayValue:"Date",localizationId:"UtilsUIStringId.Parameter_Type_DateTime"},{value:"System.Int16",displayValue:"Number (16 bit integer)",localizationId:"UtilsUIStringId.Parameter_Type_Int16"},{value:"System.Int32",displayValue:"Number (32 bit integer)",localizationId:"UtilsUIStringId.Parameter_Type_Int32"},{value:"System.Int64",displayValue:"Number (64 bit integer)",localizationId:"UtilsUIStringId.Parameter_Type_Int64"},{value:"System.Single",displayValue:"Number (floating-point)",localizationId:"UtilsUIStringId.Parameter_Type_Float"},{value:"System.Double",displayValue:"Number (double-precision floating-point)",localizationId:"UtilsUIStringId.Parameter_Type_Double"},{value:"System.Decimal",displayValue:"Number (decimal)",localizationId:"UtilsUIStringId.Parameter_Type_Decimal"},{value:"System.Boolean",displayValue:"Boolean",localizationId:"UtilsUIStringId.Parameter_Type_Boolean"},{value:"System.Guid",displayValue:"Guid",localizationId:"UtilsUIStringId.Parameter_Type_Guid"},{value:"DevExpress.DataAccess.Expression",displayValue:"Expression",localizationId:"DataAccessUIStringId.ParametersColumn_Expression"}]},j={propertyName:"resultType",displayName:"Result Type",localizationId:"DataAccessWebStringId.QueryBuilder_ResultType",modelName:"@ResultType",editor:b.Widgets.editorTemplates.combobox,valuesArray:i.valuesArray.filter(function(a){return"DevExpress.DataAccess.Expression"!==a.value})},k=[{propertyName:"_name",modelName:"@Name"},{propertyName:"_value",modelName:"#text"},c.parameterValueSerializationsInfo,{propertyName:"itemType",modelName:"@ItemType"}];c.dsParameterSerializationInfo=[h,i,j].concat(k),c.storedProcParameterSerializationsInfo=d,c.integerValueConverter=e,c.floatValueConverter=f;var l=function(){function a(a,b,c){this.name=a,this.defaultValue=b,this.valueConverter=c}return Object.defineProperty(a.prototype,"specifics",{get:function(){return c.DBColumn.GetSpecific(this.name)},enumerable:!0,configurable:!0}),a}(),m=function(a){var c;try{c=b.Localization.parseDate(a)}catch(a){c=n()}return c},n=function(){var a=new Date;return a.setHours(0,0,0,0),a},o=function(d){function h(b,e,f){var g=this;void 0===f&&(f=c.dsParameterSerializationInfo),d.call(this),this._serializationsInfo=f,this._valueInfo=ko.observable(c.parameterValueSerializationsInfo),this._parametersFunctions=a.QueryBuilder.Widgets.expressionFunctions,this.isValid=ko.observable(!0),e=e||new a.Analytics.Utils.ModelSerializer,e.deserialize(this,$.extend(b,{"@ItemType":"Parameter"})),this.name=ko.pureComputed({read:function(){return g._name()},write:function(a){h.validateName(a)&&g._name(a)}}),this._expressionValue=ko.observable({value:this._value,functions:this._parametersFunctions}),this._disposables.push(this.type.subscribe(function(a){"DevExpress.DataAccess.Expression"===a?g.resultType(g._previousResultType):(g.resultType(null),g._previousResultType=a),g._updateValueInfo(a)})),this._previousResultType="DevExpress.DataAccess.Expression"===this.type.peek()?this.resultType():this.type(),this.value=ko.pureComputed({read:function(){return"DevExpress.DataAccess.Expression"===g.type()?g._expressionValue():g._value()},write:function(a){g._value(a)}}),this._updateValueInfo(this.type.peek())}return __extends(h,d),h.prototype._getTypeValue=function(a){var b=h.typeValues.filter(function(b){return b.name===a});return b.length>0?b[0]:{name:a,defaultValue:null,specifics:"String",disableEditor:!0}},h.prototype._tryConvertValue=function(a,b){if(!h._isValueValid(a))return b.defaultValue;var c=b.valueConverter||function(a){return a},d=c(a);return h._isValueValid(d)?d:b.defaultValue},h._isValueValid=function(a){return void 0!==a&&null!==a&&!isNaN("string"==typeof a?"":a)},h.prototype._updateValueInfo=function(a){var d=this,e=this._getTypeValue(a),f=this._tryConvertValue(this._value(),e),g=this._expressionValue.peek();this._expressionValue(null),this._value(null),this._valueInfo($.extend({},c.parameterValueSerializationsInfo,{editor:b.Internal.getEditorType(e.name),disabled:!0===e.disableEditor,editorOptions:{onFocusOut:function(a){d.isValid(a.component.option("isValid"))}}})),this._expressionValue(g),this._value(f)},Object.defineProperty(h.prototype,"specifics",{get:function(){var a=this,b=h.typeValues.filter(function(b){return b.name===a.type()});return b.length>0?b[0].specifics:"string"},enumerable:!0,configurable:!0}),h.validateName=function(a){return a&&!a.match(/[~`!"№;%\^:\?*\(\)&\-\+={}\[\]\|\\\/,\.<>'\s]/)},h.prototype.getInfo=function(){if(this.type){var a=$.extend(!0,[],this._serializationsInfo);return a.splice(a.indexOf(a.filter(function(a){return"value"===a.propertyName})[0]),1,this._valueInfo()),a}return this._serializationsInfo},h.prototype.isPropertyVisible=function(a){return"resultType"!==a||"DevExpress.DataAccess.Expression"===this.type()},h.typeValues=[new l("System.DateTime",n(),m),new l("System.String",""),new l("System.SByte","0",e),new l("System.Int16","0",e),new l("System.Int32","0",e),new l("System.Int64","0",e),new l("System.Byte","0",e),new l("System.UInt16","0",e),new l("System.UInt32","0",e),new l("System.UInt64","0",e),new l("System.Decimal","0",f),new l("System.Double","0",f),new l("System.Single","0",f),new l("System.Boolean",!1,function(a){return void 0!==a?"true"===String(a).toLowerCase():a}),new l("System.Guid","00000000-0000-0000-0000-000000000000"),new l("DevExpress.DataAccess.Expression","",g),new l("System.Char","")],h}(b.Utils.Disposable);c.DataSourceParameter=o}(b.Data||(b.Data={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){!function(a){a[a.Unknown=0]="Unknown",a[a.Boolean=1]="Boolean",a[a.Byte=2]="Byte",a[a.SByte=3]="SByte",a[a.Char=4]="Char",a[a.Decimal=5]="Decimal",a[a.Double=6]="Double",a[a.Single=7]="Single",a[a.Int32=8]="Int32",a[a.UInt32=9]="UInt32",a[a.Int16=10]="Int16",a[a.UInt16=11]="UInt16",a[a.Int64=12]="Int64",a[a.UInt64=13]="UInt64",a[a.String=14]="String",a[a.DateTime=15]="DateTime",a[a.Guid=16]="Guid",a[a.TimeSpan=17]="TimeSpan",a[a.ByteArray=18]="ByteArray"}(a.DBColumnType||(a.DBColumnType={}));var b=a.DBColumnType,c=function(){function a(a){this.name=a.Name,this.type=a.ColumnType,this.size=a.Size}return a.GetType=function(a){switch(a){case b.Boolean:return"System.Boolean";case b.Byte:return"System.Byte";case b.SByte:return"System.SByte";case b.Char:return"System.Char";case b.Decimal:return"System.Decimal";case b.Double:return"System.Double";case b.Single:return"System.Single";case b.Int32:return"System.Int32";case b.UInt32:return"System.UInt32";case b.Int16:return"System.Int16";case b.UInt16:return"System.UInt16";case b.Int64:return"System.Int64";case b.UInt64:return"System.UInt64";case b.String:return"System.String";case b.DateTime:return"System.DateTime";case b.Guid:return"System.Guid";case b.TimeSpan:return"System.TimeSpan";case b.ByteArray:return"System.Byte[]";default:return"System.Object"}},a.GetSpecific=function(a){switch(a){case"System.Boolean":return"Bool";case"System.Byte":case"System.SByte":case"System.Int16":case"System.UInt16":case"System.Int32":case"System.UInt32":case"System.Int64":case"System.UInt64":return"Integer";case"System.Char":case"System.Guid":case"System.ByteArray":case"System.String":return"String";case"System.Double":case"System.Single":case"System.Decimal":return"Float";case"System.DateTime":case"System.TimeSpan":return"Date";default:return"String"}},a}();a.DBColumn=c}(a.Data||(a.Data={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){var b=function(){function a(a){this.name=a.Name,this.primaryKeyTable=a.PrimaryKeyTable,this.column=a.Columns[0],this.primaryKeyColumn=a.PrimaryKeyTableKeyColumns[0]}return a}();a.DBForeignKey=b}(a.Data||(a.Data={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(a){!function(a){function b(a,b,c){var c=c||[];return a&&a.forEach(function(a){c.push(b(a))}),c}a.deserializeToCollection=b;var c=function(){function c(c){var d=b(c.Tables,function(b){return new a.DBTable(b)});d.sort(function(a,b){return a.name.localeCompare(b.name)});var e=b(c.Views,function(b){return new a.DBTable(b)});e.sort(function(a,b){return a.name.localeCompare(b.name)}),this.tables=d.concat(e),this.procedures=b(c.StoredProcedures,function(b){return new a.DBStoredProcedure(b)})}return c}();a.DBSchema=c}(a.Data||(a.Data={}))}(a.Analytics||(a.Analytics={}))}(DevExpress||(DevExpress={}));var DevExpress;!function(a){!function(b){!function(c){function d(d,e){var f=$.Deferred();return a.QueryBuilder.Utils.RequestWrapper.getDbSchema(d,e).done(function(a){f.resolve(new c.DBSchema(JSON.parse(a.dbSchemaJSON)))}).fail(function(a){b.Utils.ShowMessage(b.Utils.formatUnicorn(b.getLocalization("Schema loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),b.Utils.getErrorMessage(a))),f.reject()}),f}function e(d){var e=$.Deferred();return a.QueryBuilder.Utils.RequestWrapper.getDbStoredProcedures(d).done(function(a){e.resolve(new c.DBSchema(JSON.parse(a.dbSchemaJSON)).procedures)}).fail(function(a){b.Utils.ShowMessage(b.Utils.formatUnicorn(b.getLocalization("Stored procedures loading failed. {0}","DxDesignerStringId.Error_SchemaLoadingFailed"),b.Utils.getErrorMessage(a))),e.reject()}),e}c.getDBSchemaCallback=d,c.getDBStoredProceduresCallback=e;var f=function(a){function d(b,d,e){var f=this;void 0===d&&(d=c.getDBSchemaCallback),void 0===e&&(e=c.getDBStoredProceduresCallback),a.call(this),this._getDBSchemaCallback=d,this._getDBStoredProcedures=e,this._tables={},this.connection=b,this._disposables.push(this.connection.name.subscribe(function(){f._tables={},f._dbSchema=null,f._dbStoredProceduresSchema=null})),this.getItems=function(a){var b=$.Deferred();return a.fullPath?b.resolve([]):f.getDbSchema().done(function(a){b.resolve($.map(a.tables,function(a){return{name:a.name,displayName:a.name,isList:!1,specifics:a.isView?"view":"table",dragData:{noDragable:!1}}}))}),b.promise()}}return __extends(d,a),d.prototype._getDBSchema=function(a){return this._getDBSchemaCallback(this.connection,a)},d.prototype.getDbSchema=function(){return this._dbSchema&&"rejected"!==this._dbSchema.state()||(this._dbSchema=this._getDBSchema()),this._dbSchema},d.prototype.getDbStoredProcedures=function(){return this._dbStoredProceduresSchema&&"rejected"!==this._dbStoredProceduresSchema.state()||(this._dbStoredProceduresSchema=this._getDBStoredProcedures(this.connection)),this._dbStoredProceduresSchema},d.prototype.getDbTable=function(a){var c=this;if(!this._tables[a]){var d=$.Deferred();this._tables[a]=d.promise(),this.getDbSchema().done(function(e){var f=b.Utils.findFirstItemMatchesCon