igniteui-react-inputs
Version:
Ignite UI React input components.
1,567 lines (1,566 loc) • 56.8 kB
JavaScript
/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { Base, runOn, delegateCombine, delegateRemove, markType, INotifyPropertyChanged_$type, PropertyChangedEventArgs, enumGetBox, fromEn } from "igniteui-react-core";
import { List$1 } from "igniteui-react-core";
import { IMultiSliderTrackThumbVisual_$type } from "./IMultiSliderTrackThumbVisual";
import { IMultiSliderTrackRangeVisual_$type } from "./IMultiSliderTrackRangeVisual";
import { IMultiSliderTrackThumbCalloutVisual_$type } from "./IMultiSliderTrackThumbCalloutVisual";
import { RenderingContext } from "igniteui-react-core";
import { DefaultMultiSliderTrackBarVisual } from "./DefaultMultiSliderTrackBarVisual";
import { FontInfo } from "igniteui-react-core";
import { Rect } from "igniteui-react-core";
import { TranslateTransform } from "igniteui-react-core";
import { CanvasViewRenderer } from "igniteui-react-core";
import { CanvasGestureDOMEventProxy } from "igniteui-react-core";
import { FontUtil } from "igniteui-react-core";
import { Size } from "igniteui-react-core";
import { DefaultMultiSliderTrackThumbVisual } from "./DefaultMultiSliderTrackThumbVisual";
import { MultiSliderTrackThumbRange } from "./MultiSliderTrackThumbRange";
import { NotImplementedException } from "igniteui-react-core";
import { DefaultMultiSliderTrackThumbCalloutVisual } from "./DefaultMultiSliderTrackThumbCalloutVisual";
import { truncate, isNaN_ } from "igniteui-react-core";
import { ISliderTrackOwner_$type } from "./ISliderTrackOwner";
import { MultiSliderThumbCollection } from "./MultiSliderThumbCollection";
import { MultiSliderHitInfo } from "./MultiSliderHitInfo";
import { MultiSliderOrientation_$type } from "./MultiSliderOrientation";
import { MultiSliderResolvingToolTipValueEventArgs } from "./MultiSliderResolvingToolTipValueEventArgs";
import { MultiSliderThumbValueChangingEventArgs } from "./MultiSliderThumbValueChangingEventArgs";
import { MultiSliderYValueChangingEventArgs } from "./MultiSliderYValueChangingEventArgs";
import { Thickness } from "igniteui-react-core";
/**
* @hidden
*/
export let MultiSliderView = /*@__PURE__*/ (() => {
class MultiSliderView extends Base {
constructor(a) {
super();
this.n = false;
this.r = null;
this.q = null;
this.b = null;
this.p = null;
this.g = null;
this.u = null;
this.v = null;
this.l = null;
this.t = 0;
this.o = false;
this.x = 0;
this.w = 0;
this.j = null;
this.a = null;
this.i = null;
this.y = -1;
this.s = 10;
this.h = 0;
this.z = -1;
this.m = true;
this.g = a;
this.r = new List$1(IMultiSliderTrackThumbVisual_$type, 0);
this.q = new List$1(IMultiSliderTrackRangeVisual_$type, 0);
this.b = new DefaultMultiSliderTrackBarVisual();
this.p = new List$1(IMultiSliderTrackThumbCalloutVisual_$type, 0);
this.j = this.k();
this.ap();
}
at() {
this.m = true;
this.ap();
if (this.a != null) {
this.a.at(this.u.rootWrapper, "");
}
if (this.z == -1) {
this.z = this.u.setTimeout(runOn(this, this.an), 200);
}
}
au() {
this.m = false;
if (this.a != null && this.u != null) {
this.a.bh(this.u.rootWrapper, "");
}
if (this.z != -1) {
window.clearTimeout(this.z);
this.z = -1;
}
}
aq() {
if (!this.n) {
if (this.u != null) {
this.n = true;
this.u.setTimeout(runOn(this, this.a6), 0);
}
}
}
ak() {
this.a6();
}
a6() {
if (!this.n) {
return;
}
this.n = false;
this.g.d8();
this.a0();
}
a0() {
if (this.l == null) {
return;
}
let a = this.g.e0.width;
let b = this.g.e0.height;
let c = Math.round(a * this.t);
let d = Math.round(b * this.t);
if (this.x != c || this.w != d) {
this.v.setAttribute("width", c.toString());
this.v.setAttribute("height", d.toString());
this.v.setStyleProperty("width", a.toString() + "px");
this.v.setStyleProperty("height", b.toString() + "px");
this.x = truncate(Math.round(c));
this.w = truncate(Math.round(d));
}
if (this.l.d && this.t != 1) {
this.l.aa();
this.l.ab(this.t, this.t);
}
this.l.l(this.g.e0.left, this.g.e0.top, this.g.e0.width, this.g.e0.height);
for (let e = 0; e < this.r.count; e++) {
this.a4(this.r._inner[e].allPaths, this.r._inner[e].translateX, this.r._inner[e].translateY);
}
for (let f = 0; f < this.q.count; f++) {
this.a4(this.q._inner[f].allPaths, this.q._inner[f].translateX, this.q._inner[f].translateY);
}
this.a4(this.b.allPaths, this.b.translateX, this.b.translateY);
for (let g = 0; g < this.p.count; g++) {
this.a4(this.p._inner[g].allPaths, this.p._inner[g].translateX, this.p._inner[g].translateY);
this.a5(this.p._inner[g].calloutText, this.p._inner[g].textTranslateX, this.p._inner[g].textTranslateY);
}
this.a1(this.b.allPaths);
for (let h = 0; h < this.q.count; h++) {
this.a1(this.q._inner[h].allPaths);
}
for (let i = 0; i < this.r.count; i++) {
this.a1(this.r._inner[i].allPaths);
}
if (this.l.d && this.t != 1) {
this.l.z();
}
}
a2(a) {
if (a.j != null) {
this.l.aa();
}
this.l.k(a.j);
this.l.x(a);
if (a.j != null) {
this.l.z();
}
}
a1(a) {
for (let b = 0; b < a.count; b++) {
let c = a.item(b);
if (c.j != null) {
this.l.aa();
}
this.l.k(c.j);
this.l.t(c);
if (c.j != null) {
this.l.z();
}
}
}
a5(a, b, c) {
if (a.j == null) {
a.j = new TranslateTransform();
}
let d = a.j;
d.j = b;
d.k = c;
}
a4(a, b, c) {
for (let d = 0; d < a.count; d++) {
let e = a.item(d);
if (e.j == null) {
e.j = new TranslateTransform();
}
let f = e.j;
f.j = b;
f.k = c;
}
}
ap() {
let a = this.g.bh;
let b = this.g.a9;
if (!isNaN_(a) && a != 0) {
return;
}
if (window.devicePixelRatio != undefined && window.devicePixelRatio != b) {
this.g.a9 = window.devicePixelRatio;
}
}
ax(a) {
if (a == null) {
let b = this.u;
this.v = null;
this.u = null;
this.l = null;
this.ab();
if (this.z != -1) {
if (b != null) {
b.clearTimeout(this.z);
}
else {
window.clearTimeout(this.z);
}
this.z = -1;
}
return;
}
this.t = (isNaN_(this.g.bh) ? this.g.a9 : this.g.bh);
let c = a;
this.u = c;
this.u.rootWrapper.setStyleProperty("min-height", (this.g.bm + 5) + "px");
this.u.rootWrapper.setStyleProperty("min-width", (this.g.bo + 5) + "px");
this.u.rootWrapper.addClass("ui-MultiSlider-container");
let d = this.t;
let e = Math.round(c.rootWrapper.width());
let f = Math.round(c.rootWrapper.height());
let g = e * d;
let h = f * d;
this.u.rootWrapper.setStyleProperty("position", "relative");
let i = this.u.createElement("canvas");
i.setStyleProperty("position", "absolute");
this.u.append(i);
this.x = truncate(Math.round(g));
this.w = truncate(Math.round(h));
i.setAttribute("width", g.toString());
i.setAttribute("height", h.toString());
i.setStyleProperty("width", e.toString() + "px");
i.setStyleProperty("height", f.toString() + "px");
this.v = i;
let j = this.u.get2DCanvasContext(this.v);
this.l = new RenderingContext(new CanvasViewRenderer(), j);
this.l.ae(this.j);
this.ab();
this.a = new CanvasGestureDOMEventProxy(this.u.rootWrapper, this.u, false);
this.a.bl = this.g.e0;
let k = this.a;
k.onContactStarted = delegateCombine(k.onContactStarted, runOn(this, this.aj));
let l = this.a;
l.onContactMoved = delegateCombine(l.onContactMoved, runOn(this, this.ai));
let m = this.a;
m.onContactCompleted = delegateCombine(m.onContactCompleted, runOn(this, this.ah));
this.a.ao = (n) => this.g.ey.containsPoint(n);
this.g.ds(0, 0, e, f);
this.s = FontUtil.getCurrentFontHeight(this.u, this.j);
this.g.trackDirty();
this.z = this.u.setTimeout(runOn(this, this.an), 200);
}
ah(a, b) {
this.g.dh(a, b);
}
ai(a, b) {
this.g.di(a);
}
aj(a, b) {
this.g.af(a, b);
}
ab() {
if (this.a != null) {
let a = this.a;
a.onContactStarted = delegateRemove(a.onContactStarted, runOn(this, this.aj));
let b = this.a;
b.onContactMoved = delegateRemove(b.onContactMoved, runOn(this, this.ai));
let c = this.a;
c.onContactCompleted = delegateRemove(c.onContactCompleted, runOn(this, this.ah));
this.a.ao = null;
this.a.av();
}
}
ay() {
}
ar() {
this.as(true);
}
as(a) {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.ap();
let b = Math.round(this.u.rootWrapper.width());
let c = Math.round(this.u.rootWrapper.height());
let d = b != this.g.e0.width || c != this.g.e0.height;
if (a || d) {
this.g.ds(0, 0, b, c);
if (this.a != null) {
this.a.bl = this.g.e0;
}
}
}
am() {
}
k() {
return ((() => {
let $ret = new FontInfo();
$ret.q = "Verdana";
$ret.f = 10;
return $ret;
})());
}
a7(a, b, c) {
if (a.al != b) {
a.al = b;
}
if (this.i != c) {
this.i = c;
this.j = this.i;
this.s = FontUtil.getCurrentFontHeight(this.u, this.j);
this.l.ae(this.i);
this.g.trackDirty();
}
}
ae() {
if (this.h != 4) {
this.h = 4;
this.u.rootWrapper.setStyleProperty("cursor", "move");
}
}
ag() {
if (this.h != 3) {
this.h = 3;
this.u.rootWrapper.setStyleProperty("cursor", "ns-resize");
}
}
ad() {
if (this.h != 0) {
this.h = 0;
this.u.rootWrapper.setStyleProperty("cursor", "inherit");
}
}
af() {
if (this.h != 1) {
this.h = 1;
this.u.rootWrapper.setStyleProperty("cursor", "ew-resize");
}
}
ac() {
if (this.h != 2) {
this.h = 2;
this.u.rootWrapper.setStyleProperty("cursor", "move");
}
}
a8(a) {
let b = this.s;
let c = this.l.g(a.al);
return new Size(1, c, b);
}
aw() {
this.t = this.g.a9;
this.aq();
}
a3() {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.u.rootWrapper.show();
}
ao() {
if (this.u == null || this.u.rootWrapper == null) {
return;
}
this.u.rootWrapper.hide();
}
an() {
this.z = -1;
if (this.u == null) {
return;
}
if (!this.m) {
return;
}
this.as(false);
this.z = this.u.setTimeout(runOn(this, this.an), 200);
}
av() {
}
f(a) {
return a.c;
}
az(a) {
if (a.c != null) {
this.r.remove(a.c);
a.c = null;
}
if (a.b != null) {
this.p.remove(a.b);
a.b = null;
}
}
e(a, b) {
let c = new DefaultMultiSliderTrackThumbVisual();
this.r.insert(b, c);
return c;
}
c(a) {
throw new NotImplementedException(0);
}
d(a) {
if (a.b == null) {
a.b = new DefaultMultiSliderTrackThumbCalloutVisual();
this.p.add(a.b);
return a.b;
}
return a.b;
}
al(a) {
for (let b = 0; b < this.p.count; b++) {
a(this.p._inner[b]);
}
}
}
MultiSliderView.$t = /*@__PURE__*/ markType(MultiSliderView, 'MultiSliderView');
return MultiSliderView;
})();
/**
* @hidden
*/
export let MultiSlider = /*@__PURE__*/ (() => {
class MultiSlider extends Base {
get thumbs() {
return this.g;
}
get ah() {
return this.ag;
}
onDetachedFromUI() {
this.k.au();
}
onAttachedToUI() {
this.k.at();
}
get bg() {
return this.as;
}
set bg(a) {
let b = this.as;
this.as = a;
if (b != this.as) {
this.dl("Min", b, this.as);
}
}
get bf() {
return this.ar;
}
set bf(a) {
let b = this.ar;
this.ar = a;
if (b != this.ar) {
this.dl("Max", b, this.ar);
}
}
get bl() {
return this.aw;
}
set bl(a) {
let b = this.aw;
this.aw = a;
if (b != this.aw) {
this.dl("Step", b, this.aw);
}
}
get bu() {
return this.a2;
}
set bu(a) {
let b = this.a2;
this.a2 = a;
if (b != this.a2) {
this.dl("YMax", b, this.a2);
}
}
get bv() {
return this.a3;
}
set bv(a) {
let b = this.a3;
this.a3 = a;
if (b != this.a3) {
this.dl("YMin", b, this.a3);
}
}
get bx() {
return this.a5;
}
set bx(a) {
let b = this.a5;
this.a5 = a;
if (b != this.a5) {
this.dl("YStep", b, this.a5);
}
}
get bh() {
return this.at;
}
set bh(a) {
let b = this.at;
this.at = a;
if (b != this.at) {
this.dl("PixelScalingRatio", b, this.at);
}
}
get a9() {
return this.ai;
}
set a9(a) {
let b = this.ai;
this.ai = a;
if (b != this.ai) {
this.dl("ActualPixelScalingRatio", b, this.ai);
}
}
ds(a, b, c, d) {
this.e0 = new Rect(0, a, b, c, d);
if (this.e == 0) {
let e = Math.max(0, this.e0.width - (this.bk + this.be));
this.ey = new Rect(0, this.e0.left + this.bk, this.e0.top, e, this.e0.height);
let f = Math.max(0, this.ey.width - (this.bq + this.bp));
this.ez = new Rect(0, this.ey.left + this.bq, this.ey.top, f, this.ey.height);
}
else if (this.e == 2) {
let g = Math.max(0, this.e0.width - (this.bk + this.be));
this.ey = new Rect(0, this.e0.left + this.bk, this.e0.top, g, this.e0.height);
let h = Math.max(0, this.ey.width - (this.bq + this.bp));
let i = Math.max(0, this.ey.height - (this.bz + this.by));
this.ez = new Rect(0, this.ey.left + this.bq, this.ey.top + this.bz, h, i);
}
else {
this.ey = new Rect(0, this.e0.left, this.e0.top + this.bk, this.e0.width, this.e0.height - (this.bk + this.be));
this.ez = new Rect(0, this.ey.left, this.ey.top + this.bq, this.ey.width, this.ey.height - (this.bq + this.bp));
}
this.trackDirty();
}
d8() {
if (!this.s) {
return;
}
this.s = false;
let a = this.k.b;
for (let b = 0; b < this.thumbs.count; b++) {
this.d5(this.k.f(this.thumbs._inner[b]), this.thumbs._inner[b]);
}
for (let c = 0; c < this.ah.count; c++) {
this.d3(this.k.c(this.ah._inner[c]), this.ah._inner[c]);
}
this.d0(a);
}
get e1() {
return this.ex;
}
set e1(a) {
let b = this.ex;
this.ex = a;
if (Rect.l_op_Inequality(b, this.ex)) {
this.dl("WindowRect", b, this.ex);
}
}
get b0() {
return this.a8;
}
set b0(a) {
let b = this.a8;
this.a8 = a;
if (b != this.a8) {
this.dl("YValue", b, this.a8);
}
}
get bw() {
return this.a4;
}
set bw(a) {
let b = this.a4;
this.a4 = a;
if (b != this.a4) {
this.dl("YPosition", b, this.a4);
}
}
get ba() {
return this.aj;
}
set ba(a) {
let b = this.aj;
this.aj = a;
if (b != this.aj) {
this.dl("ActualYPosition", b, this.aj);
}
}
dh(a, b) {
let c = null;
if (this.a != null && this.a.c != 3) {
if (this.a.c == 0) {
c = this.a.a;
}
this.k.ay();
}
if (c != null) {
if (this.thumbValueChanging != null) {
this.thumbValueChanging(this, ((() => {
let $ret = new MultiSliderThumbValueChangingEventArgs();
$ret.b = c.s;
$ret.a = c;
return $ret;
})()));
}
if (this.thumbValueChanged != null) {
this.thumbValueChanged(this, ((() => {
let $ret = new MultiSliderThumbValueChangingEventArgs();
$ret.b = c.s;
$ret.a = c;
return $ret;
})()));
}
if (this.e == 2) {
if (this.yValueChanging != null) {
this.yValueChanging(this, ((() => {
let $ret = new MultiSliderYValueChangingEventArgs();
$ret.a = c.s;
return $ret;
})()));
}
if (this.yValueChanged != null) {
this.yValueChanged(this, ((() => {
let $ret = new MultiSliderYValueChangingEventArgs();
$ret.a = c.s;
return $ret;
})()));
}
}
}
this.b = this.c(a, b);
this.a = ((() => {
let $ret = new MultiSliderHitInfo();
$ret.c = 3;
return $ret;
})());
this.c5();
}
c5() {
this.k.al((a) => a.isVisible = false);
this.k.aq();
}
dj(a, b) {
this.b = this.c(a, false);
}
af(a, b) {
this.b = this.c(a, b);
if (this.b == null || this.b.c == 3) {
return false;
}
if (this.ad(this.b)) {
this.dy(a, this.b);
this.k.am();
return true;
}
if (this.y(this.b)) {
return this.ae(a, this.b);
}
return false;
}
ae(a, b) {
if (b == null) {
return false;
}
switch (b.c) {
case 2: return false;
}
return false;
}
dy(a, b) {
this.a = b;
this.ew = a;
this.ev = a;
}
ad(a) {
if (a == null) {
return false;
}
switch (a.c) {
case 0:
case 1: return true;
}
return false;
}
y(a) {
if (a == null) {
return false;
}
switch (a.c) {
case 2: return false;
}
return false;
}
di(a) {
this.b = this.c(a, false);
if (this.a != null && this.a.c != 3) {
if (this.e == 0) {
this.dd(a);
}
else if (this.e == 2) {
this.dq(a);
}
else {
this.dr(a);
}
}
else {
this.c6();
}
}
dq(a) {
let b = a.x - this.ev.x;
let c = a.y - this.ev.y;
this.ev = a;
b = b / this.ez.width;
c = c / this.ez.height;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.bi(c);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.bi(c);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
}
bi(a) {
if (this.bw + a > 1) {
a = 1 - this.bw;
}
if (this.bw + a < 0) {
a = -this.bw;
}
this.bw += a;
return a;
}
c6() {
if (this.b != null && this.b.c == 1) {
this.k.ae();
}
else if (this.b != null && this.b.c == 0) {
if (this.e == 1) {
this.k.ag();
}
else if (this.e == 2) {
this.k.ac();
}
else {
this.k.af();
}
}
else {
this.k.ad();
}
}
dr(a) {
let b = a.y - this.ev.y;
b = b / this.ez.height;
this.ev = a;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
}
d6(a) {
let b;
let c;
if (this.e == 0 || this.e == 2) {
b = a.p;
c = a.p * this.ez.width + this.ez.left;
if (this.t) {
let d = b;
if (this.resolvingToolTipValue != null) {
let e = ((() => {
let $ret = new MultiSliderResolvingToolTipValueEventArgs();
$ret.position = b;
$ret.value = d;
return $ret;
})());
this.resolvingToolTipValue(this, e);
d = e.value;
}
this.dx(a, c, d);
}
}
else {
b = a.p;
c = a.p * this.ez.height + this.ez.top;
if (this.t) {
let f = b;
if (this.resolvingToolTipValue != null) {
let g = ((() => {
let $ret = new MultiSliderResolvingToolTipValueEventArgs();
$ret.position = b;
$ret.value = f;
return $ret;
})());
this.resolvingToolTipValue(this, g);
f = g.value;
}
this.dx(a, c, f);
}
}
}
dx(a, b, c) {
let d = this.k.d(a);
d.isVisible = true;
let e = "";
if (c != null) {
e = c.toString();
}
this.k.a7(d.calloutText, e, this.o());
let f = this.k.a8(d.calloutText);
let g = this.e3();
f = new Size(1, f.width + g.left + g.right, f.height + g.top + g.bottom);
let h = a.p * this.ez.width + this.ez.left;
let i = a.p * this.ez.width + this.ez.left;
let j = 0;
let k = 0;
if ((this.e0.right - h) <= f.width) {
j = h - f.width;
}
else {
j = h;
}
if (j < i) {
k = this.ez.top;
}
else {
k = this.ez.bottom - f.height;
}
d.width = f.width;
d.height = f.height;
d.translateX = j;
d.translateY = k;
d.textTranslateX = j + g.left;
d.textTranslateY = k + g.top;
}
e3() {
return this.e2;
}
o() {
if (this.p != null) {
return this.p;
}
return this.n;
}
dd(a) {
let b = a.x - this.ev.x;
this.ev = a;
b = b / this.ez.width;
if (this.a == null) {
return;
}
switch (this.a.c) {
case 0:
this.a.a.r(b);
this.d6(this.a.a);
this.c7();
break;
case 1:
this.a.b.o(b);
this.d6(this.a.b.f);
this.d6(this.a.b.e);
this.c7();
break;
}
}
df(a) {
this.b = this.c(a, false);
}
dg(a) {
this.b = this.c(a, false);
}
c(a, b) {
for (let c = 0; c < this.thumbs.count; c++) {
let d = this.thumbs._inner[c];
if (this.w(a, d, this.k.f(d), b)) {
return ((() => {
let $ret = new MultiSliderHitInfo();
$ret.a = d;
$ret.c = 0;
return $ret;
})());
}
}
for (let e = 0; e < this.ah.count; e++) {
let f = this.ah._inner[e];
if (this.v(a, f, this.k.c(f))) {
return ((() => {
let $ret = new MultiSliderHitInfo();
$ret.b = f;
$ret.c = 1;
return $ret;
})());
}
}
if (this.u(a)) {
return ((() => {
let $ret = new MultiSliderHitInfo();
$ret.c = 2;
return $ret;
})());
}
return ((() => {
let $ret = new MultiSliderHitInfo();
$ret.c = 3;
return $ret;
})());
}
u(a) {
if (this.e == 0) {
if (a.y > this.ez.bottom && a.x >= this.ez.left && a.x <= this.ez.right && a.y <= this.ey.bottom) {
return true;
}
}
else if (this.e == 2) {
if (a.y > this.ez.bottom && a.x >= this.ez.left && a.x <= this.ez.right && a.y <= this.ey.bottom) {
return true;
}
}
else {
if (a.x > this.ez.right && a.y >= this.ez.top && a.y <= this.ez.bottom && a.x <= this.ey.right) {
return true;
}
}
return false;
}
v(a, b, c) {
if (this.e == 0) {
let d = (b.n) * this.ez.width + this.ez.left;
let e = d - c.width / 2;
let f = d + c.width / 2;
if (a.y >= this.ey.top && a.y <= this.ey.bottom && a.x >= e && a.x <= f) {
return true;
}
}
else {
let g = (b.n) * this.ez.height + this.ez.top;
let h = g - c.height / 2;
let i = g + c.height / 2;
if (a.x >= this.ey.left && a.x <= this.ey.right && a.y >= h && a.y <= i) {
return true;
}
}
return false;
}
w(a, b, c, d) {
let e = 40;
if (this.e == 0) {
let f = b.p * this.ez.width + this.ez.left;
let g = this.ez.top + this.ez.height / 2;
let h = new Rect(0, f - c.width / 2, g - c.height / 2, c.width, c.height);
if (d) {
if (h.width < e) {
h.inflate((e - h.width) / 2, 0);
}
if (h.height < e) {
h.inflate(0, (e - h.height) / 2);
}
}
if (h.containsPoint(a)) {
return true;
}
}
else if (this.e == 2) {
let i = b.p * this.ez.width + this.ez.left;
let j = this.ez.top + (this.ba * this.ez.height);
let k = new Rect(0, i - c.width / 2, j - c.height / 2, c.width, c.height);
if (d) {
if (k.width < e) {
k.inflate((e - k.width) / 2, 0);
}
if (k.height < e) {
k.inflate(0, (e - k.height) / 2);
}
}
if (k.containsPoint(a)) {
return true;
}
}
else {
let l = b.p * this.ez.height + this.ez.top;
let m = this.ez.left + this.ez.width / 2;
let n = new Rect(0, m - c.width / 2, l - c.height / 2, c.width, c.height);
if (d) {
if (n.width < e) {
n.inflate((e - n.width) / 2, 0);
}
if (n.height < e) {
n.inflate(0, (e - n.height) / 2);
}
}
if (n.containsPoint(a)) {
return true;
}
}
return false;
}
d3(a, b) {
if (this.e == 0) {
a.orientation = this.e;
a.width = Math.max(15, this.ez.width * b.r);
a.height = this.bb;
a.translateX = (this.ez.left + this.ez.width * b.n);
a.translateY = this.ez.bottom + this.bb / 2;
}
else if (this.e == 2) {
a.orientation = this.e;
a.width = Math.max(15, this.ez.width * b.r);
a.height = this.bb;
a.translateX = (this.ez.left + this.ez.width * b.n);
a.translateY = this.ez.bottom + this.bb / 2;
}
else {
a.orientation = this.e;
a.height = Math.max(15, this.ez.height * b.r);
a.width = this.bb;
a.translateY = (this.ez.top + this.ez.height * b.n);
a.translateX = this.ez.right + this.bb / 2;
}
}
d0(a) {
if (this.e == 0) {
a.height = this.bb;
a.width = this.ez.width;
a.translateX = this.ez.left + this.ez.width / 2;
a.translateY = ((this.ey.top + this.ey.bottom) / 2);
}
else if (this.e == 2) {
a.height = this.bb;
a.width = this.ez.width;
a.translateX = this.ez.left + this.ez.width / 2;
a.translateY = this.ez.top + (this.ba * this.ez.height);
}
else {
a.width = this.bb;
a.height = this.ez.height;
a.translateY = this.ez.top + this.ez.height / 2;
a.translateX = ((this.ey.left + this.ey.right) / 2);
}
}
d5(a, b) {
if (this.e == 0) {
a.orientation = this.e;
a.translateX = this.ez.left + this.ez.width * b.p;
a.translateY = this.ez.top + this.ez.height / 2;
}
else if (this.e == 2) {
a.orientation = this.e;
a.translateX = this.ez.left + this.ez.width * b.p;
a.translateY = this.ez.top + this.ez.height * this.ba;
}
else {
a.orientation = this.e;
a.translateY = this.ez.top + this.ez.height * b.p;
a.translateX = this.ez.left + this.ez.width / 2;
}
}
get bk() {
return this.av;
}
set bk(a) {
let b = this.av;
this.av = a;
if (b != this.av) {
this.dl("StartInset", b, this.av);
}
}
get be() {
return this.ap;
}
set be(a) {
let b = this.ap;
this.ap = a;
if (b != this.ap) {
this.dl("EndInset", b, this.ap);
}
}
get bq() {
return this.a1;
}
set bq(a) {
let b = this.a1;
this.a1 = a;
if (b != this.a1) {
this.dl("TrackStartInset", b, this.a1);
}
}
get bp() {
return this.a0;
}
set bp(a) {
let b = this.a0;
this.a0 = a;
if (b != this.a0) {
this.dl("TrackEndInset", b, this.a0);
}
}
get bz() {
return this.a7;
}
set bz(a) {
let b = this.a7;
this.a7 = a;
if (b != this.a7) {
this.dl("YTrackStartInset", b, this.a7);
}
}
get by() {
return this.a6;
}
set by(a) {
let b = this.a6;
this.a6 = a;
if (b != this.a6) {
this.dl("YTrackEndInset", b, this.a6);
}
}
get bb() {
return this.ak;
}
set bb(a) {
let b = this.ak;
this.ak = a;
if (b != this.ak) {
this.dl("BarExtent", b, this.ak);
}
}
get e() {
return this.d;
}
set e(a) {
let b = this.d;
this.d = a;
if (b != this.d) {
this.dl("Orientation", enumGetBox(MultiSliderOrientation_$type, b), enumGetBox(MultiSliderOrientation_$type, this.d));
}
}
get es() {
return this.eh;
}
set es(a) {
let b = this.eh;
this.eh = a;
if (b != this.eh) {
this.dl("ThumbBrush", b, this.eh);
}
}
get bn() {
return this.ay;
}
set bn(a) {
let b = this.ay;
this.ay = a;
if (b != this.ay) {
this.dl("ThumbStrokeThickness", b, this.ay);
}
}
get et() {
return this.ei;
}
set et(a) {
let b = this.ei;
this.ei = a;
if (b != this.ei) {
this.dl("ThumbOutline", b, this.ei);
}
}
get bo() {
return this.az;
}
set bo(a) {
let b = this.az;
this.az = a;
if (b != this.az) {
this.dl("ThumbWidth", b, this.az);
}
}
get bm() {
return this.ax;
}
set bm(a) {
let b = this.ax;
this.ax = a;
if (b != this.ax) {
this.dl("ThumbHeight", b, this.ax);
}
}
destroy() {
this.provideContainer(null);
}
get ek() {
return this.d9;
}
set ek(a) {
let b = this.d9;
this.d9 = a;
if (b != this.d9) {
this.dl("BarBrush", b, this.d9);
}
}
get el() {
return this.ea;
}
set el(a) {
let b = this.ea;
this.ea = a;
if (b != this.ea) {
this.dl("BarOutline", b, this.ea);
}
}
get bc() {
return this.al;
}
set bc(a) {
let b = this.al;
this.al = a;
if (b != this.al) {
this.dl("BarStrokeThickness", b, this.al);
}
}
get ep() {
return this.ee;
}
set ep(a) {
let b = this.ee;
this.ee = a;
if (b != this.ee) {
this.dl("RangeThumbBrush", b, this.ee);
}
}
get eq() {
return this.ef;
}
set eq(a) {
let b = this.ef;
this.ef = a;
if (b != this.ef) {
this.dl("RangeThumbOutline", b, this.ef);
}
}
get bj() {
return this.au;
}
set bj(a) {
let b = this.au;
this.au = a;
if (b != this.au) {
this.dl("RangeThumbStrokeThickness", b, this.au);
}
}
get er() {
return this.eg;
}
set er(a) {
let b = this.eg;
this.eg = a;
if (b != this.eg) {
this.dl("RangeThumbRidgesBrush", b, this.eg);
}
}
get eu() {
return this.ej;
}
set eu(a) {
let b = this.ej;
this.ej = a;
if (b != this.ej) {
this.dl("ThumbRidgesBrush", b, this.ej);
}
}
get em() {
return this.eb;
}
set em(a) {
let b = this.eb;
this.eb = a;
if (b != this.eb) {
this.dl("CalloutBrush", b, this.eb);
}
}
get eo() {
return this.ed;
}
set eo(a) {
let b = this.ed;
this.ed = a;
if (b != this.ed) {
this.dl("CalloutTextColor", b, this.ed);
}
}
get en() {
return this.ec;
}
set en(a) {
let b = this.ec;
this.ec = a;
if (b != this.ec) {
this.dl("CalloutOutline", b, this.ec);
}
}
get bd() {
return this.am;
}
set bd(a) {
let b = this.am;
this.am = a;
if (b != this.am) {
this.dl("CalloutStrokeThickness", b, this.am);
}
}
get ac() {
return false;
}
get aa() {
return false;
}
get z() {
return false;
}
get ab() {
return false;
}
dl(a, b, c) {
this.du(a, b, c);
if (this.propertyChanged != null) {
this.propertyChanged(this, new PropertyChangedEventArgs(a));
}
}
du(a, b, c) {
switch (a) {
case "PixelScalingRatio":
this.a9 = this.bh;
break;
case "ActualPixelScalingRatio":
if (this.k != null) {
this.k.aw();
}
break;
case "YPosition":
{
this.q = true;
this.ba = this.br(b, c);
this.trackDirty();
if (!this.r) {
this.b0 = this.bt(this.ba);
}
this.q = false;
}
break;
case "YValue":
{
this.r = true;
if (!this.q) {
this.bw = this.bs(this.b0);
this.ba = this.br(this.bw, this.bw);
this.trackDirty();
}
this.dt(this, b, c);
this.r = false;
}
break;
case "Orientation":
this.dk();
this.trackDirty();
break;
case "TrackStartInset":
case "TrackEndInset":
case "StartInset":
case "EndInset":
this.de();
this.trackDirty();
break;
case "Min":
case "Max":
this.dm();
this.trackDirty();
break;
case "ThumbBrush":
case "ThumbOutline":
case "ThumbRidgesBrush":
case "ThumbStrokeThickness":
this.d7();
this.k.aq();
break;
case "ThumbWidth":
case "ThumbHeight":
for (let d = 0; d < this.thumbs.count; d++) {
let e = this.thumbs._inner[d];
let f = this.k.f(e);
f.width = this.bo;
f.height = this.bm;
}
this.trackDirty();
break;
case "RangeThumbBrush":
case "RangeThumbOutline":
case "RangeThumbRidgesBrush":
case "RangeThumbStrokeThickness":
this.d4();
this.k.aq();
break;
case "BarBrush":
case "BarOutline":
case "BarStrokeThickness":
this.d1();
this.k.aq();
break;
case "CalloutBrush":
case "CalloutOutline":
case "CalloutTextColor":
case "CalloutStrokeThickness":
this.d2();
this.k.aq();
break;
}
}
d1() {
let a = this.k.b;
if (this.ek == null) {
a.barBox._fill = a.getBarBoxDefaultBrush();
}
else {
a.barBox._fill = this.ek;
}
if (this.el == null) {
a.barBox._stroke = a.getBarBoxDefaultOutline();
}
else {
a.barBox._stroke = this.el;
}
if (isNaN_(this.bc)) {
a.barBox.ad = a.getBarBoxDefaultStrokeThickness();
}
else {
a.barBox.ad = this.bc;
}
}
d2() {
for (let a = 0; a < this.thumbs.count; a++) {
let b = this.k.d(this.thumbs._inner[a]);
if (this.em == null) {
b.calloutBox._fill = b.getCalloutBoxDefaultBrush();
}
else {
b.calloutBox._fill = this.em;
}
if (this.en == null) {
b.calloutBox._stroke = b.getCalloutBoxDefaultStroke();
}
else {
b.calloutBox._stroke = this.en;
}
if (this.eo == null) {
b.calloutText.ao = b.getCalloutTextDefaultBrush();
}
else {
b.calloutText.ao = this.eo;
}
if (isNaN_(this.bd)) {
b.calloutBox.ad = b.getCalloutBoxDefaultStrokeThickness();
}
else {
b.calloutBox.ad = this.bd;
}
}
}
d7() {
for (let a = 0; a < this.thumbs.count; a++) {
let b = this.k.f(this.thumbs._inner[a]);
if (this.es == null) {
b.thumbBox._fill = b.getThumbBoxDefaultBrush();
}
else {
b.thumbBox._fill = this.es;
}
if (this.et == null) {
b.thumbBox._stroke = b.getThumbBoxDefaultStroke();
}
else {
b.thumbBox._stroke = this.et;
}
if (this.eu == null) {
b.thumbRidges._stroke = b.getThumbRidgesDefaultStroke();
}
else {
b.thumbRidges._stroke = this.eu;
}
if (isNaN_(this.bn)) {
b.thumbBox.ad = b.getThumbBoxDefaultStrokeThickness();
}
else {
b.thumbBox.ad = this.bn;
}
}
}
d4() {
for (let a = 0; a < this.ah.count; a++) {
let b = this.k.c(this.ah._inner[a]);
if (this.ep == null) {
b.thumbBox._fill = b.getThumbBoxDefaultBrush();
}
else {
b.thumbBox._fill = this.ep;
}
if (this.eq == null) {
b.thumbBox._stroke = b.getThumbBoxDefaultStroke();
}
else {
b.thumbBox._stroke = this.eq;
}
if (this.er == null) {
b.thumbRidges._stroke = b.getThumbRidgesDefaultStroke();
}
else {
b.thumbRidges._stroke = this.er;
}
if (isNaN_(this.bj)) {
b.thumbBox.ad = b.getThumbBoxDefaultStrokeThickness();
}
else {
b.thumbBox.ad = this.bj;
}
}
}
dm() {
}
de() {
if (this.e0.isEmpty) {
return;
}
this.ds(this.e0.left, this.e0.top, this.e0.width, this.e0.height);
}
dk() {