1 | (function(modules) {
|
2 |
|
3 | var installedModules = {};
|
4 |
|
5 |
|
6 | function __webpack_require__(moduleId) {
|
7 |
|
8 |
|
9 | if(installedModules[moduleId])
|
10 | return installedModules[moduleId].exports;
|
11 |
|
12 |
|
13 | var module = installedModules[moduleId] = {
|
14 | exports: {},
|
15 | id: moduleId,
|
16 | loaded: false
|
17 | };
|
18 |
|
19 |
|
20 | modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
21 |
|
22 |
|
23 | module.loaded = true;
|
24 |
|
25 |
|
26 | return module.exports;
|
27 | }
|
28 |
|
29 |
|
30 |
|
31 | __webpack_require__.m = modules;
|
32 |
|
33 |
|
34 | __webpack_require__.c = installedModules;
|
35 |
|
36 |
|
37 | __webpack_require__.p = "";
|
38 |
|
39 |
|
40 | return __webpack_require__(0);
|
41 | })
|
42 |
|
43 | ({
|
44 |
|
45 | 0:
|
46 | function(module, exports, __webpack_require__) {
|
47 |
|
48 | module.exports = __webpack_require__(263);
|
49 |
|
50 |
|
51 | },
|
52 |
|
53 | 263:
|
54 | function(module, exports, __webpack_require__) {
|
55 |
|
56 |
|
57 | var jsCommon = window.jsCommon;
|
58 | var powerbi = window.powerbi;
|
59 | var powerbitests = window.powerbitests;
|
60 | var InJs = window.InJs;
|
61 | var debug = window.debug;
|
62 | var jasmine = window.jasmine;
|
63 | var Microsoft = window.Microsoft;
|
64 |
|
65 |
|
66 | window.jsCommon = window.jsCommon || {};
|
67 | window.powerbi = window.powerbi || {};
|
68 | window.debug = window.debug || {};
|
69 | window.InJs = window.InJs || {};
|
70 |
|
71 | __webpack_require__(264);
|
72 |
|
73 |
|
74 |
|
75 | },
|
76 |
|
77 | 264:
|
78 | function(module, exports, __webpack_require__) {
|
79 |
|
80 |
|
81 | var jsCommon = window.jsCommon;
|
82 | var powerbi = window.powerbi;
|
83 | var powerbitests = window.powerbitests;
|
84 | var InJs = window.InJs;
|
85 | var debug = window.debug;
|
86 | var jasmine = window.jasmine;
|
87 | var Microsoft = window.Microsoft;
|
88 |
|
89 | __webpack_require__(265);
|
90 |
|
91 |
|
92 |
|
93 | __webpack_require__(266);
|
94 | __webpack_require__(267);
|
95 | __webpack_require__(268);
|
96 | __webpack_require__(269);
|
97 | __webpack_require__(270);
|
98 | __webpack_require__(271);
|
99 | __webpack_require__(272);
|
100 | __webpack_require__(273);
|
101 | __webpack_require__(274);
|
102 | __webpack_require__(275);
|
103 | __webpack_require__(276);
|
104 | __webpack_require__(277);
|
105 | __webpack_require__(278);
|
106 | __webpack_require__(279);
|
107 | __webpack_require__(280);
|
108 | __webpack_require__(281);
|
109 | __webpack_require__(282);
|
110 | __webpack_require__(283);
|
111 | __webpack_require__(284);
|
112 | __webpack_require__(285);
|
113 | __webpack_require__(286);
|
114 | __webpack_require__(287);
|
115 | __webpack_require__(288);
|
116 | __webpack_require__(289);
|
117 | __webpack_require__(290);
|
118 | __webpack_require__(291);
|
119 | __webpack_require__(292);
|
120 | __webpack_require__(293);
|
121 | __webpack_require__(294);
|
122 | __webpack_require__(295);
|
123 | __webpack_require__(296);
|
124 | __webpack_require__(297);
|
125 | __webpack_require__(298);
|
126 | __webpack_require__(288);
|
127 | __webpack_require__(299);
|
128 | __webpack_require__(300);
|
129 | __webpack_require__(301);
|
130 | __webpack_require__(302);
|
131 |
|
132 |
|
133 |
|
134 | },
|
135 |
|
136 | 265:
|
137 | function(module, exports) {
|
138 |
|
139 |
|
140 | var jsCommon = window.jsCommon;
|
141 | var powerbi = window.powerbi;
|
142 | var powerbitests = window.powerbitests;
|
143 | var InJs = window.InJs;
|
144 | var debug = window.debug;
|
145 | var jasmine = window.jasmine;
|
146 | var Microsoft = window.Microsoft;
|
147 |
|
148 | |
149 |
|
150 |
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 |
|
163 |
|
164 |
|
165 |
|
166 |
|
167 |
|
168 |
|
169 |
|
170 |
|
171 |
|
172 |
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 |
|
179 | },
|
180 |
|
181 | 266:
|
182 | function(module, exports) {
|
183 |
|
184 |
|
185 | var jsCommon = window.jsCommon;
|
186 | var powerbi = window.powerbi;
|
187 | var powerbitests = window.powerbitests;
|
188 | var InJs = window.InJs;
|
189 | var debug = window.debug;
|
190 | var jasmine = window.jasmine;
|
191 | var Microsoft = window.Microsoft;
|
192 |
|
193 | |
194 |
|
195 |
|
196 |
|
197 |
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
|
207 |
|
208 |
|
209 |
|
210 |
|
211 |
|
212 |
|
213 |
|
214 |
|
215 |
|
216 |
|
217 |
|
218 |
|
219 | var jsCommon;
|
220 | (function (jsCommon) {
|
221 | |
222 |
|
223 |
|
224 | var DOMConstants;
|
225 | (function (DOMConstants) {
|
226 | |
227 |
|
228 |
|
229 | DOMConstants.escKeyCode = 27;
|
230 | DOMConstants.enterKeyCode = 13;
|
231 | DOMConstants.tabKeyCode = 9;
|
232 | DOMConstants.upArrowKeyCode = 38;
|
233 | DOMConstants.downArrowKeyCode = 40;
|
234 | DOMConstants.leftArrowKeyCode = 37;
|
235 | DOMConstants.rightArrowKeyCode = 39;
|
236 | DOMConstants.homeKeyCode = 36;
|
237 | DOMConstants.endKeyCode = 35;
|
238 | DOMConstants.backSpaceKeyCode = 8;
|
239 | DOMConstants.deleteKeyCode = 46;
|
240 | DOMConstants.spaceKeyCode = 32;
|
241 | DOMConstants.shiftKeyCode = 16;
|
242 | DOMConstants.ctrlKeyCode = 17;
|
243 | DOMConstants.altKeyCode = 18;
|
244 | DOMConstants.aKeyCode = 65;
|
245 | DOMConstants.cKeyCode = 67;
|
246 | DOMConstants.sKeyCode = 83;
|
247 | DOMConstants.vKeyCode = 86;
|
248 | DOMConstants.wKeyCode = 87;
|
249 | DOMConstants.xKeyCode = 88;
|
250 | DOMConstants.yKeyCode = 89;
|
251 | DOMConstants.zKeyCode = 90;
|
252 | |
253 |
|
254 |
|
255 | DOMConstants.DocumentBody = 'body';
|
256 | DOMConstants.Anchor = 'a';
|
257 | DOMConstants.EditableTextElements = ':text, textarea';
|
258 | DOMConstants.EditableNumericElements = '[type="number"]';
|
259 | |
260 |
|
261 |
|
262 | DOMConstants.disabledAttributeOrValue = 'disabled';
|
263 | DOMConstants.readonlyAttributeOrValue = 'readonly';
|
264 | DOMConstants.idAttribute = 'id';
|
265 | DOMConstants.styleAttribute = 'style';
|
266 | DOMConstants.hrefAttribute = 'href';
|
267 | DOMConstants.targetAttribute = 'target';
|
268 | DOMConstants.blankValue = '_blank';
|
269 | DOMConstants.selfValue = '_self';
|
270 | DOMConstants.classAttribute = 'class';
|
271 | DOMConstants.titleAttribute = 'title';
|
272 | DOMConstants.srcAttribute = 'src';
|
273 | |
274 |
|
275 |
|
276 | DOMConstants.contextmenuEventName = 'contextmenu';
|
277 | DOMConstants.blurEventName = 'blur';
|
278 | DOMConstants.keyUpEventName = 'keyup';
|
279 | DOMConstants.inputEventName = 'input';
|
280 | DOMConstants.changeEventName = 'change';
|
281 | DOMConstants.cutEventName = 'cut';
|
282 | DOMConstants.keyDownEventName = 'keydown';
|
283 | DOMConstants.mouseMoveEventName = 'mousemove';
|
284 | DOMConstants.mouseDownEventName = 'mousedown';
|
285 | DOMConstants.mouseEnterEventName = 'mouseenter';
|
286 | DOMConstants.mouseLeaveEventName = 'mouseleave';
|
287 | DOMConstants.mouseOverEventName = 'mouseover';
|
288 | DOMConstants.mouseOutEventName = 'mouseout';
|
289 | DOMConstants.mouseClickEventName = 'click';
|
290 | DOMConstants.pasteEventName = 'paste';
|
291 | DOMConstants.scrollEventName = 'scroll';
|
292 | DOMConstants.dropEventName = 'drop';
|
293 | DOMConstants.focusEventName = 'focus';
|
294 | DOMConstants.focusInEventName = 'focusin';
|
295 | DOMConstants.focusOutEventName = 'focusout';
|
296 | DOMConstants.selectEventName = 'select';
|
297 | DOMConstants.messageEventName = 'message';
|
298 | DOMConstants.loadEventName = 'load';
|
299 | DOMConstants.beforeUnload = 'beforeunload';
|
300 | |
301 |
|
302 |
|
303 | DOMConstants.inputAndSelectEventNames = 'input, select';
|
304 | })(DOMConstants = jsCommon.DOMConstants || (jsCommon.DOMConstants = {}));
|
305 | })(jsCommon || (jsCommon = {}));
|
306 |
|
307 |
|
308 |
|
309 | },
|
310 |
|
311 | 267:
|
312 | function(module, exports) {
|
313 |
|
314 |
|
315 | var jsCommon = window.jsCommon;
|
316 | var powerbi = window.powerbi;
|
317 | var powerbitests = window.powerbitests;
|
318 | var InJs = window.InJs;
|
319 | var debug = window.debug;
|
320 | var jasmine = window.jasmine;
|
321 | var Microsoft = window.Microsoft;
|
322 |
|
323 | |
324 |
|
325 |
|
326 |
|
327 |
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 |
|
334 |
|
335 |
|
336 |
|
337 |
|
338 |
|
339 |
|
340 |
|
341 |
|
342 |
|
343 |
|
344 |
|
345 |
|
346 |
|
347 |
|
348 |
|
349 | var powerbi;
|
350 | (function (powerbi) {
|
351 | powerbi.RS_AccessDeniedDueToRLSGroup = 'rsAccessDeniedDueToRLSGroup';
|
352 | powerbi.RS_CannotRetrieveModel = 'rsCannotRetrieveModel';
|
353 | (function (PowerBIErrorResourceType) {
|
354 | PowerBIErrorResourceType[PowerBIErrorResourceType["ResourceCodeReference"] = 0] = "ResourceCodeReference";
|
355 | PowerBIErrorResourceType[PowerBIErrorResourceType["EmbeddedString"] = 1] = "EmbeddedString";
|
356 | })(powerbi.PowerBIErrorResourceType || (powerbi.PowerBIErrorResourceType = {}));
|
357 | var PowerBIErrorResourceType = powerbi.PowerBIErrorResourceType;
|
358 | var ServiceErrorToClientError = (function () {
|
359 | function ServiceErrorToClientError(serviceError) {
|
360 | this.m_serviceError = serviceError;
|
361 | }
|
362 | Object.defineProperty(ServiceErrorToClientError.prototype, "code", {
|
363 | get: function () {
|
364 | return ServiceErrorToClientError.codeName;
|
365 | },
|
366 | enumerable: true,
|
367 | configurable: true
|
368 | });
|
369 | Object.defineProperty(ServiceErrorToClientError.prototype, "ignorable", {
|
370 | get: function () {
|
371 | return false;
|
372 | },
|
373 | enumerable: true,
|
374 | configurable: true
|
375 | });
|
376 | Object.defineProperty(ServiceErrorToClientError.prototype, "requestId", {
|
377 | get: function () {
|
378 | return this.httpRequestId;
|
379 | },
|
380 | set: function (value) {
|
381 | this.httpRequestId = value;
|
382 | },
|
383 | enumerable: true,
|
384 | configurable: true
|
385 | });
|
386 | ServiceErrorToClientError.prototype.getDetails = function (resourceProvider) {
|
387 | var errorDetails;
|
388 | if (this.m_serviceError.statusCode === 6 ) {
|
389 | errorDetails = PowerBIErrorDetailHelper.GetDetailsFromTransformError(resourceProvider, this.m_serviceError);
|
390 | }
|
391 | else {
|
392 | errorDetails = PowerBIErrorDetailHelper.GetDetailsFromServerError(resourceProvider, this.m_serviceError);
|
393 | }
|
394 | PowerBIErrorDetailHelper.addAdditionalInfo(errorDetails, this.m_serviceError.errorDetails, resourceProvider);
|
395 | PowerBIErrorDetailHelper.addDebugErrorInfo(errorDetails, this.code, this.m_serviceError.message || null, this.m_serviceError.stackTrace || null);
|
396 | return errorDetails;
|
397 | };
|
398 | ServiceErrorToClientError.codeName = 'ServiceErrorToClientError';
|
399 | return ServiceErrorToClientError;
|
400 | }());
|
401 | powerbi.ServiceErrorToClientError = ServiceErrorToClientError;
|
402 | var PowerBIErrorDetailHelper = (function () {
|
403 | function PowerBIErrorDetailHelper() {
|
404 | }
|
405 | PowerBIErrorDetailHelper.addAdditionalInfo = function (errorDetails, pbiErrorDetails, localize) {
|
406 | if (pbiErrorDetails) {
|
407 | for (var i = 0; i < pbiErrorDetails.length; i++) {
|
408 | var element = pbiErrorDetails[i];
|
409 | var localizedCode = localize.getOptional(PowerBIErrorDetailHelper.serverErrorPrefix + element.code);
|
410 | var additionErrorInfoKeyValuePair = {
|
411 | errorInfoKey: localizedCode ? localizedCode : element.code,
|
412 | errorInfoValue: element.detail.type === PowerBIErrorResourceType.ResourceCodeReference ? localize.get(PowerBIErrorDetailHelper.serverErrorPrefix + element.detail.value) : element.detail.value
|
413 | };
|
414 | errorDetails.displayableErrorInfo.push(additionErrorInfoKeyValuePair);
|
415 | }
|
416 | }
|
417 | return errorDetails;
|
418 | };
|
419 | PowerBIErrorDetailHelper.addDebugErrorInfo = function (errorDetails, errorCode, message, stackTrace) {
|
420 | errorDetails.debugErrorInfo = errorDetails.debugErrorInfo || [];
|
421 | if (errorCode) {
|
422 | errorDetails.debugErrorInfo.push({ errorInfoKey: powerbi.ClientErrorStrings.ClientErrorCode, errorInfoValue: errorCode, });
|
423 | }
|
424 | if (message) {
|
425 | errorDetails.debugErrorInfo.push({ errorInfoKey: powerbi.ClientErrorStrings.ErrorDetails, errorInfoValue: message, });
|
426 | }
|
427 | if (stackTrace) {
|
428 | errorDetails.debugErrorInfo.push({ errorInfoKey: powerbi.ClientErrorStrings.StackTrace, errorInfoValue: stackTrace, });
|
429 | }
|
430 | return errorDetails;
|
431 | };
|
432 | PowerBIErrorDetailHelper.GetDetailsFromTransformError = function (localize, serviceError) {
|
433 | var message = localize.get('ServiceError_CannotLoadVisual');
|
434 | var key = localize.get('ServiceError_CannotLoadVisual');
|
435 | var val = serviceError.message;
|
436 | var additionalInfo = [];
|
437 | additionalInfo.push({ errorInfoKey: key, errorInfoValue: val, });
|
438 | var errorDetails = {
|
439 | message: message,
|
440 | displayableErrorInfo: additionalInfo,
|
441 | };
|
442 | return errorDetails;
|
443 | };
|
444 | PowerBIErrorDetailHelper.GetDetailsFromServerError = function (localize, serviceError) {
|
445 |
|
446 | var message = "";
|
447 | var key = "";
|
448 | var val = "";
|
449 | var errorCodeHandled = false;
|
450 | switch (serviceError.errorCode) {
|
451 | case powerbi.RS_AccessDeniedDueToRLSGroup:
|
452 | message = localize.get('ServiceError_ModelCannotLoad');
|
453 | key = localize.get('ServiceError_ModelFetchingFailureKey');
|
454 | val = localize.get('DsrError_NoPermissionDueToRLSGroupMessage');
|
455 | errorCodeHandled = true;
|
456 | break;
|
457 | case powerbi.RS_CannotRetrieveModel:
|
458 | message = localize.get('ServiceError_ModelCannotLoad');
|
459 | key = localize.get('ServiceError_ModelFetchingFailureKey');
|
460 | val = localize.get('DsrError_CanNotRetrieveModelMessage');
|
461 | errorCodeHandled = true;
|
462 | break;
|
463 | }
|
464 | if (!errorCodeHandled) {
|
465 | switch (serviceError.statusCode) {
|
466 | case 2 :
|
467 | message = localize.get('ServiceError_ModelCannotLoad');
|
468 | key = localize.get('ServiceError_ModelConvertFailureKey');
|
469 | val = localize.get('ServiceError_ModelConvertFailureValue');
|
470 | break;
|
471 | case 3 :
|
472 | message = localize.get('ServiceError_ModelCannotLoad');
|
473 | key = localize.get('ServiceError_ModelCreationFailureKey');
|
474 | val = localize.get('ServiceError_ModelCreationFailureValue');
|
475 | break;
|
476 | case 1 :
|
477 | message = localize.get('ServiceError_ModelCannotLoad');
|
478 | key = localize.get('ServiceError_ModelFetchingFailureKey');
|
479 | val = localize.get('ServiceError_ModelFetchingFailureValue');
|
480 | break;
|
481 | case 4 :
|
482 | message = localize.get('ServiceError_CannotLoadVisual');
|
483 | key = localize.get('ServiceError_ExecuteSemanticQueryErrorKey');
|
484 | val = localize.get('ServiceError_ExecuteSemanticQueryErrorValue');
|
485 | break;
|
486 | case 5 :
|
487 | message = localize.get('ServiceError_CannotLoadVisual');
|
488 | key = localize.get('ServiceError_ExecuteSemanticQueryInvalidStreamFormatKey');
|
489 | val = localize.get('ServiceError_ExecuteSemanticQueryInvalidStreamFormatValue');
|
490 | break;
|
491 | case 0 :
|
492 | default:
|
493 | message = localize.get('ServiceError_GeneralError');
|
494 | key = localize.get('ServiceError_GeneralErrorKey');
|
495 | val = localize.get('ServiceError_GeneralErrorValue');
|
496 | break;
|
497 | }
|
498 | }
|
499 | var additionalInfo = [];
|
500 | additionalInfo.push({ errorInfoKey: key, errorInfoValue: val, });
|
501 | var errorDetails = {
|
502 | message: message,
|
503 | displayableErrorInfo: additionalInfo,
|
504 | };
|
505 | return errorDetails;
|
506 | };
|
507 | PowerBIErrorDetailHelper.serverErrorPrefix = "ServerError_";
|
508 | return PowerBIErrorDetailHelper;
|
509 | }());
|
510 | powerbi.PowerBIErrorDetailHelper = PowerBIErrorDetailHelper;
|
511 | })(powerbi || (powerbi = {}));
|
512 |
|
513 |
|
514 |
|
515 | },
|
516 |
|
517 | 268:
|
518 | function(module, exports) {
|
519 |
|
520 |
|
521 | var jsCommon = window.jsCommon;
|
522 | var powerbi = window.powerbi;
|
523 | var powerbitests = window.powerbitests;
|
524 | var InJs = window.InJs;
|
525 | var debug = window.debug;
|
526 | var jasmine = window.jasmine;
|
527 | var Microsoft = window.Microsoft;
|
528 |
|
529 | |
530 |
|
531 |
|
532 |
|
533 |
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
539 |
|
540 |
|
541 |
|
542 |
|
543 |
|
544 |
|
545 |
|
546 |
|
547 |
|
548 |
|
549 |
|
550 |
|
551 |
|
552 |
|
553 |
|
554 |
|
555 | var powerbi;
|
556 | (function (powerbi) {
|
557 | })(powerbi || (powerbi = {}));
|
558 |
|
559 |
|
560 |
|
561 | },
|
562 |
|
563 | 269:
|
564 | function(module, exports) {
|
565 |
|
566 |
|
567 | var jsCommon = window.jsCommon;
|
568 | var powerbi = window.powerbi;
|
569 | var powerbitests = window.powerbitests;
|
570 | var InJs = window.InJs;
|
571 | var debug = window.debug;
|
572 | var jasmine = window.jasmine;
|
573 | var Microsoft = window.Microsoft;
|
574 |
|
575 | |
576 |
|
577 |
|
578 |
|
579 |
|
580 |
|
581 |
|
582 |
|
583 |
|
584 |
|
585 |
|
586 |
|
587 |
|
588 |
|
589 |
|
590 |
|
591 |
|
592 |
|
593 |
|
594 |
|
595 |
|
596 |
|
597 |
|
598 |
|
599 |
|
600 |
|
601 | var powerbi;
|
602 | (function (powerbi) {
|
603 | powerbi.CategoryTypes = {
|
604 | Address: "Address",
|
605 | City: "City",
|
606 | Continent: "Continent",
|
607 | CountryRegion: "Country",
|
608 | County: "County",
|
609 | Longitude: "Longitude",
|
610 | Latitude: "Latitude",
|
611 | Place: "Place",
|
612 | PostalCode: "PostalCode",
|
613 | StateOrProvince: "StateOrProvince"
|
614 | };
|
615 | function createGeoTaggingAnalyzerService(getLocalized) {
|
616 | return new GeoTaggingAnalyzerService(getLocalized);
|
617 | }
|
618 | powerbi.createGeoTaggingAnalyzerService = createGeoTaggingAnalyzerService;
|
619 | var EnglishBackup = {
|
620 | GeotaggingString_Continent: "continent",
|
621 | GeotaggingString_Continents: "continents",
|
622 | GeotaggingString_Country: "country",
|
623 | GeotaggingString_Countries: "countries",
|
624 | GeotaggingString_State: "state",
|
625 | GeotaggingString_States: "states",
|
626 | GeotaggingString_City: "city",
|
627 | GeotaggingString_Cities: "cities",
|
628 | GeotaggingString_Town: "town",
|
629 | GeotaggingString_Towns: "towns",
|
630 | GeotaggingString_Province: "province",
|
631 | GeotaggingString_Provinces: "provinces",
|
632 | GeotaggingString_County: "county",
|
633 | GeotaggingString_Counties: "counties",
|
634 | GeotaggingString_Village: "village",
|
635 | GeotaggingString_Villages: "villages",
|
636 | GeotaggingString_Post: "post",
|
637 | GeotaggingString_Zip: "zip",
|
638 | GeotaggingString_Code: "code",
|
639 | GeotaggingString_Place: "place",
|
640 | GeotaggingString_Places: "places",
|
641 | GeotaggingString_Address: "address",
|
642 | GeotaggingString_Addresses: "addresses",
|
643 | GeotaggingString_Street: "street",
|
644 | GeotaggingString_Streets: "streets",
|
645 | GeotaggingString_Longitude: "longitude",
|
646 | GeotaggingString_Longitude_Short: "lon",
|
647 | GeotaggingString_Longitude_Short2: "long",
|
648 | GeotaggingString_Latitude: "latitude",
|
649 | GeotaggingString_Latitude_Short: "lat",
|
650 | GeotaggingString_PostalCode: "postal code",
|
651 | GeotaggingString_PostalCodes: "postal codes",
|
652 | GeotaggingString_ZipCode: "zip code",
|
653 | GeotaggingString_ZipCodes: "zip codes",
|
654 | GeotaggingString_Territory: "territory",
|
655 | GeotaggingString_Territories: "territories",
|
656 | GeotaggingString_VRMBackCompat_CountryRegion: "CountryRegion",
|
657 | GeotaggingString_VRMBackCompat_StateOrProvince: "StateOrProvince",
|
658 | };
|
659 | var GeoTaggingAnalyzerService = (function () {
|
660 | function GeoTaggingAnalyzerService(getLocalized) {
|
661 | this.GeotaggingString_VRMBackCompat_CountryRegion = "CountryRegion";
|
662 | this.GeotaggingString_VRMBackCompat_StateOrProvince = "StateOrProvince";
|
663 | this.GeotaggingString_Continent = getLocalized("GeotaggingString_Continent").toLowerCase();
|
664 | this.GeotaggingString_Continents = getLocalized("GeotaggingString_Continents").toLowerCase();
|
665 | this.GeotaggingString_Country = getLocalized("GeotaggingString_Country").toLowerCase();
|
666 | this.GeotaggingString_Countries = getLocalized("GeotaggingString_Countries").toLowerCase();
|
667 | this.GeotaggingString_State = getLocalized("GeotaggingString_State").toLowerCase();
|
668 | this.GeotaggingString_States = getLocalized("GeotaggingString_States").toLowerCase();
|
669 | this.GeotaggingString_City = getLocalized("GeotaggingString_City").toLowerCase();
|
670 | this.GeotaggingString_Cities = getLocalized("GeotaggingString_Cities").toLowerCase();
|
671 | this.GeotaggingString_Town = getLocalized("GeotaggingString_Town").toLowerCase();
|
672 | this.GeotaggingString_Towns = getLocalized("GeotaggingString_Towns").toLowerCase();
|
673 | this.GeotaggingString_Province = getLocalized("GeotaggingString_Province").toLowerCase();
|
674 | this.GeotaggingString_Provinces = getLocalized("GeotaggingString_Provinces").toLowerCase();
|
675 | this.GeotaggingString_County = getLocalized("GeotaggingString_County").toLowerCase();
|
676 | this.GeotaggingString_Counties = getLocalized("GeotaggingString_Counties").toLowerCase();
|
677 | this.GeotaggingString_Village = getLocalized("GeotaggingString_Village").toLowerCase();
|
678 | this.GeotaggingString_Villages = getLocalized("GeotaggingString_Villages").toLowerCase();
|
679 | this.GeotaggingString_Post = getLocalized("GeotaggingString_Post").toLowerCase();
|
680 | this.GeotaggingString_Zip = getLocalized("GeotaggingString_Zip").toLowerCase();
|
681 | this.GeotaggingString_Code = getLocalized("GeotaggingString_Code").toLowerCase();
|
682 | this.GeotaggingString_Place = getLocalized("GeotaggingString_Place").toLowerCase();
|
683 | this.GeotaggingString_Places = getLocalized("GeotaggingString_Places").toLowerCase();
|
684 | this.GeotaggingString_Address = getLocalized("GeotaggingString_Address").toLowerCase();
|
685 | this.GeotaggingString_Addresses = getLocalized("GeotaggingString_Addresses").toLowerCase();
|
686 | this.GeotaggingString_Street = getLocalized("GeotaggingString_Street").toLowerCase();
|
687 | this.GeotaggingString_Streets = getLocalized("GeotaggingString_Streets").toLowerCase();
|
688 | this.GeotaggingString_Longitude = getLocalized("GeotaggingString_Longitude").toLowerCase();
|
689 | this.GeotaggingString_Longitude_Short = getLocalized("GeotaggingString_Longitude_Short").toLowerCase();
|
690 | this.GeotaggingString_Longitude_Short2 = getLocalized("GeotaggingString_Longitude_Short2").toLowerCase();
|
691 | this.GeotaggingString_Latitude = getLocalized("GeotaggingString_Latitude").toLowerCase();
|
692 | this.GeotaggingString_Latitude_Short = getLocalized("GeotaggingString_Latitude_Short").toLowerCase();
|
693 | this.GeotaggingString_PostalCode = getLocalized("GeotaggingString_PostalCode").toLowerCase();
|
694 | this.GeotaggingString_PostalCodes = getLocalized("GeotaggingString_PostalCodes").toLowerCase();
|
695 | this.GeotaggingString_ZipCode = getLocalized("GeotaggingString_ZipCode").toLowerCase();
|
696 | this.GeotaggingString_ZipCodes = getLocalized("GeotaggingString_ZipCodes").toLowerCase();
|
697 | this.GeotaggingString_Territory = getLocalized("GeotaggingString_Territory").toLowerCase();
|
698 | this.GeotaggingString_Territories = getLocalized("GeotaggingString_Territories").toLowerCase();
|
699 | }
|
700 | GeoTaggingAnalyzerService.prototype.isLongitudeOrLatitude = function (fieldRefName) {
|
701 | return this.isLongitude(fieldRefName) ||
|
702 | this.isLatitude(fieldRefName);
|
703 | };
|
704 | GeoTaggingAnalyzerService.prototype.isGeographic = function (fieldRefName) {
|
705 | return this.isLongitudeOrLatitude(fieldRefName) ||
|
706 | this.isGeocodable(fieldRefName);
|
707 | };
|
708 | GeoTaggingAnalyzerService.prototype.isGeocodable = function (fieldRefName) {
|
709 | return this.isAddress(fieldRefName) ||
|
710 | this.isCity(fieldRefName) ||
|
711 | this.isContinent(fieldRefName) ||
|
712 | this.isCountry(fieldRefName) ||
|
713 | this.isCounty(fieldRefName) ||
|
714 | this.isStateOrProvince(fieldRefName) ||
|
715 | this.isPlace(fieldRefName) ||
|
716 | this.isPostalCode(fieldRefName) ||
|
717 | this.isTerritory(fieldRefName);
|
718 | };
|
719 | GeoTaggingAnalyzerService.prototype.isGeoshapable = function (fieldRefName) {
|
720 | return this.isCity(fieldRefName) ||
|
721 | this.isCountry(fieldRefName) ||
|
722 | this.isCounty(fieldRefName) ||
|
723 | this.isStateOrProvince(fieldRefName) ||
|
724 | this.isPostalCode(fieldRefName) ||
|
725 | this.isTerritory(fieldRefName) ||
|
726 | this.isGeoshapableEnglish(fieldRefName);
|
727 | };
|
728 | GeoTaggingAnalyzerService.prototype.isGeoshapableEnglish = function (fieldRefName) {
|
729 | return this.isEnglishCity(fieldRefName) ||
|
730 | this.isEnglishCountry(fieldRefName) ||
|
731 | this.isEnglishCounty(fieldRefName) ||
|
732 | this.isEnglishStateOrProvince(fieldRefName) ||
|
733 | this.isEnglishPostalCode(fieldRefName) ||
|
734 | this.isEnglishTerritory(fieldRefName);
|
735 | };
|
736 | GeoTaggingAnalyzerService.prototype.isAddress = function (fieldRefName) {
|
737 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
738 | this.GeotaggingString_Address,
|
739 | this.GeotaggingString_Addresses,
|
740 | this.GeotaggingString_Street,
|
741 | this.GeotaggingString_Streets
|
742 | ]);
|
743 | };
|
744 | GeoTaggingAnalyzerService.prototype.isPlace = function (fieldRefName) {
|
745 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
746 | this.GeotaggingString_Place,
|
747 | this.GeotaggingString_Places
|
748 | ]);
|
749 | };
|
750 | GeoTaggingAnalyzerService.prototype.isCity = function (fieldRefName) {
|
751 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
752 | this.GeotaggingString_City,
|
753 | this.GeotaggingString_Cities,
|
754 | this.GeotaggingString_Town,
|
755 | this.GeotaggingString_Towns,
|
756 | this.GeotaggingString_Village,
|
757 | this.GeotaggingString_Villages
|
758 | ]);
|
759 | };
|
760 | GeoTaggingAnalyzerService.prototype.isStateOrProvince = function (fieldRefName) {
|
761 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
762 | this.GeotaggingString_State,
|
763 | this.GeotaggingString_States,
|
764 | this.GeotaggingString_Province,
|
765 | this.GeotaggingString_Provinces,
|
766 | this.GeotaggingString_VRMBackCompat_StateOrProvince,
|
767 | ]);
|
768 | };
|
769 | GeoTaggingAnalyzerService.prototype.isCountry = function (fieldRefName) {
|
770 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
771 | this.GeotaggingString_Country,
|
772 | this.GeotaggingString_Countries,
|
773 | this.GeotaggingString_VRMBackCompat_CountryRegion
|
774 | ]);
|
775 | };
|
776 | GeoTaggingAnalyzerService.prototype.isCounty = function (fieldRefName) {
|
777 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
778 | this.GeotaggingString_County,
|
779 | this.GeotaggingString_Counties
|
780 | ]);
|
781 | };
|
782 | GeoTaggingAnalyzerService.prototype.isContinent = function (fieldRefName) {
|
783 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
784 | this.GeotaggingString_Continent,
|
785 | this.GeotaggingString_Continents
|
786 | ]);
|
787 | };
|
788 | GeoTaggingAnalyzerService.prototype.isPostalCode = function (fieldRefName) {
|
789 | var result = (GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
790 | this.GeotaggingString_Post,
|
791 | this.GeotaggingString_Zip])
|
792 | && GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Code])) ||
|
793 | GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
794 | this.GeotaggingString_PostalCode,
|
795 | this.GeotaggingString_PostalCodes,
|
796 | this.GeotaggingString_ZipCode,
|
797 | this.GeotaggingString_ZipCodes
|
798 | ]);
|
799 |
|
800 | if (!result) {
|
801 | var whiteSpaceRegex = /\s+/;
|
802 | var fieldNameWithoutWhitespace = fieldRefName.replace(whiteSpaceRegex, "");
|
803 | result = GeoTaggingAnalyzerService.hasMatches(fieldNameWithoutWhitespace, [
|
804 | this.GeotaggingString_PostalCode.replace(whiteSpaceRegex, ''),
|
805 | this.GeotaggingString_PostalCodes.replace(whiteSpaceRegex, ''),
|
806 | this.GeotaggingString_ZipCode.replace(whiteSpaceRegex, ''),
|
807 | this.GeotaggingString_ZipCodes.replace(whiteSpaceRegex, '')
|
808 | ]);
|
809 | }
|
810 | return result;
|
811 | };
|
812 | GeoTaggingAnalyzerService.prototype.isLongitude = function (fieldRefName) {
|
813 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Longitude])
|
814 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Longitude_Short], true )
|
815 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Longitude_Short2], true );
|
816 | };
|
817 | GeoTaggingAnalyzerService.prototype.isLatitude = function (fieldRefName) {
|
818 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Latitude])
|
819 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Latitude_Short], true );
|
820 | };
|
821 | GeoTaggingAnalyzerService.prototype.isTerritory = function (fieldRefName) {
|
822 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
823 | this.GeotaggingString_Territory,
|
824 | this.GeotaggingString_Territories
|
825 | ]);
|
826 | };
|
827 | GeoTaggingAnalyzerService.hasMatches = function (fieldName, possibleMatches, useStrict) {
|
828 | var nonWordRegex = /\W/;
|
829 | var value = fieldName.toLowerCase();
|
830 | for (var i = 0, len = possibleMatches.length; i < len; i++) {
|
831 | var possibleMatch = possibleMatches[i].toLowerCase();
|
832 | if (!useStrict) {
|
833 | if (value.indexOf(possibleMatch) > -1)
|
834 | return true;
|
835 | }
|
836 | else {
|
837 | var indexofpossibleMatch = value.indexOf(possibleMatch);
|
838 | if (indexofpossibleMatch > -1) {
|
839 | var wordEndFlag = void 0, wordBeginFlag = void 0;
|
840 | wordEndFlag = wordBeginFlag = true;
|
841 | if (indexofpossibleMatch - 1 > 0)
|
842 | wordBeginFlag = nonWordRegex.test(value[indexofpossibleMatch - 1]);
|
843 | if (indexofpossibleMatch + possibleMatch.length < value.length)
|
844 | wordEndFlag = nonWordRegex.test(value[indexofpossibleMatch + possibleMatch.length]);
|
845 | if (wordBeginFlag && wordEndFlag)
|
846 | return true;
|
847 | }
|
848 | }
|
849 | }
|
850 | return false;
|
851 | };
|
852 | GeoTaggingAnalyzerService.prototype.getFieldType = function (fieldName) {
|
853 | if (fieldName == null)
|
854 | return undefined;
|
855 | if (this.isLatitude(fieldName))
|
856 | return powerbi.CategoryTypes.Latitude;
|
857 | if (this.isLongitude(fieldName))
|
858 | return powerbi.CategoryTypes.Longitude;
|
859 | if (this.isPostalCode(fieldName))
|
860 | return powerbi.CategoryTypes.PostalCode;
|
861 | if (this.isAddress(fieldName))
|
862 | return powerbi.CategoryTypes.Address;
|
863 | if (this.isPlace(fieldName))
|
864 | return powerbi.CategoryTypes.Place;
|
865 | if (this.isCity(fieldName))
|
866 | return powerbi.CategoryTypes.City;
|
867 | if (this.isCountry(fieldName))
|
868 | return powerbi.CategoryTypes.CountryRegion;
|
869 | if (this.isCounty(fieldName))
|
870 | return powerbi.CategoryTypes.County;
|
871 | if (this.isStateOrProvince(fieldName))
|
872 | return powerbi.CategoryTypes.StateOrProvince;
|
873 | if (this.isContinent(fieldName))
|
874 | return powerbi.CategoryTypes.Continent;
|
875 | return this.getEnglishFieldType(fieldName);
|
876 | };
|
877 | GeoTaggingAnalyzerService.prototype.isEnglishAddress = function (fieldRefName) {
|
878 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
879 | EnglishBackup.GeotaggingString_Address,
|
880 | EnglishBackup.GeotaggingString_Addresses,
|
881 | EnglishBackup.GeotaggingString_Street,
|
882 | EnglishBackup.GeotaggingString_Streets
|
883 | ]);
|
884 | };
|
885 | GeoTaggingAnalyzerService.prototype.isEnglishPlace = function (fieldRefName) {
|
886 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
887 | EnglishBackup.GeotaggingString_Place,
|
888 | EnglishBackup.GeotaggingString_Places
|
889 | ]);
|
890 | };
|
891 | GeoTaggingAnalyzerService.prototype.isEnglishCity = function (fieldRefName) {
|
892 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
893 | EnglishBackup.GeotaggingString_City,
|
894 | EnglishBackup.GeotaggingString_Cities,
|
895 | EnglishBackup.GeotaggingString_Town,
|
896 | EnglishBackup.GeotaggingString_Towns,
|
897 | EnglishBackup.GeotaggingString_Village,
|
898 | EnglishBackup.GeotaggingString_Villages
|
899 | ]);
|
900 | };
|
901 | GeoTaggingAnalyzerService.prototype.isEnglishStateOrProvince = function (fieldRefName) {
|
902 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
903 | EnglishBackup.GeotaggingString_State,
|
904 | EnglishBackup.GeotaggingString_States,
|
905 | EnglishBackup.GeotaggingString_Province,
|
906 | EnglishBackup.GeotaggingString_Provinces,
|
907 | EnglishBackup.GeotaggingString_VRMBackCompat_StateOrProvince,
|
908 | ]);
|
909 | };
|
910 | GeoTaggingAnalyzerService.prototype.isEnglishCountry = function (fieldRefName) {
|
911 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
912 | EnglishBackup.GeotaggingString_Country,
|
913 | EnglishBackup.GeotaggingString_Countries,
|
914 | EnglishBackup.GeotaggingString_VRMBackCompat_CountryRegion
|
915 | ]);
|
916 | };
|
917 | GeoTaggingAnalyzerService.prototype.isEnglishCounty = function (fieldRefName) {
|
918 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
919 | EnglishBackup.GeotaggingString_County,
|
920 | EnglishBackup.GeotaggingString_Counties
|
921 | ]);
|
922 | };
|
923 | GeoTaggingAnalyzerService.prototype.isEnglishContinent = function (fieldRefName) {
|
924 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
925 | EnglishBackup.GeotaggingString_Continent,
|
926 | EnglishBackup.GeotaggingString_Continents
|
927 | ]);
|
928 | };
|
929 | GeoTaggingAnalyzerService.prototype.isEnglishPostalCode = function (fieldRefName) {
|
930 | var result = (GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
931 | EnglishBackup.GeotaggingString_Post,
|
932 | EnglishBackup.GeotaggingString_Zip])
|
933 | && GeoTaggingAnalyzerService.hasMatches(fieldRefName, [this.GeotaggingString_Code])) ||
|
934 | GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
935 | EnglishBackup.GeotaggingString_PostalCode,
|
936 | EnglishBackup.GeotaggingString_PostalCodes,
|
937 | EnglishBackup.GeotaggingString_ZipCode,
|
938 | EnglishBackup.GeotaggingString_ZipCodes
|
939 | ]);
|
940 |
|
941 | if (!result) {
|
942 | var whiteSpaceRegexPattern = new RegExp('\s');
|
943 | result = GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
944 | EnglishBackup.GeotaggingString_PostalCode.replace(whiteSpaceRegexPattern, ''),
|
945 | EnglishBackup.GeotaggingString_PostalCodes.replace(whiteSpaceRegexPattern, ''),
|
946 | EnglishBackup.GeotaggingString_ZipCode.replace(whiteSpaceRegexPattern, ''),
|
947 | EnglishBackup.GeotaggingString_ZipCodes.replace(whiteSpaceRegexPattern, '')
|
948 | ]);
|
949 | }
|
950 | return result;
|
951 | };
|
952 | GeoTaggingAnalyzerService.prototype.isEnglishLongitude = function (fieldRefName) {
|
953 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [EnglishBackup.GeotaggingString_Longitude])
|
954 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [EnglishBackup.GeotaggingString_Longitude_Short], true )
|
955 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [EnglishBackup.GeotaggingString_Longitude_Short2], true );
|
956 | };
|
957 | GeoTaggingAnalyzerService.prototype.isEnglishLatitude = function (fieldRefName) {
|
958 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [EnglishBackup.GeotaggingString_Latitude])
|
959 | || GeoTaggingAnalyzerService.hasMatches(fieldRefName, [EnglishBackup.GeotaggingString_Latitude_Short], true );
|
960 | };
|
961 | GeoTaggingAnalyzerService.prototype.isEnglishTerritory = function (fieldRefName) {
|
962 | return GeoTaggingAnalyzerService.hasMatches(fieldRefName, [
|
963 | EnglishBackup.GeotaggingString_Territory,
|
964 | EnglishBackup.GeotaggingString_Territories
|
965 | ]);
|
966 | };
|
967 | GeoTaggingAnalyzerService.prototype.getEnglishFieldType = function (fieldName) {
|
968 | if (fieldName == null)
|
969 | return undefined;
|
970 | if (this.isEnglishLatitude(fieldName))
|
971 | return powerbi.CategoryTypes.Latitude;
|
972 | if (this.isEnglishLongitude(fieldName))
|
973 | return powerbi.CategoryTypes.Longitude;
|
974 | if (this.isEnglishPostalCode(fieldName))
|
975 | return powerbi.CategoryTypes.PostalCode;
|
976 | if (this.isEnglishAddress(fieldName))
|
977 | return powerbi.CategoryTypes.Address;
|
978 | if (this.isEnglishPlace(fieldName))
|
979 | return powerbi.CategoryTypes.Place;
|
980 | if (this.isEnglishCity(fieldName))
|
981 | return powerbi.CategoryTypes.City;
|
982 | if (this.isEnglishCountry(fieldName))
|
983 | return powerbi.CategoryTypes.CountryRegion;
|
984 | if (this.isEnglishCounty(fieldName))
|
985 | return powerbi.CategoryTypes.County;
|
986 | if (this.isEnglishStateOrProvince(fieldName))
|
987 | return powerbi.CategoryTypes.StateOrProvince;
|
988 | if (this.isEnglishContinent(fieldName))
|
989 | return powerbi.CategoryTypes.Continent;
|
990 | return undefined;
|
991 | };
|
992 | return GeoTaggingAnalyzerService;
|
993 | }());
|
994 | powerbi.GeoTaggingAnalyzerService = GeoTaggingAnalyzerService;
|
995 | })(powerbi || (powerbi = {}));
|
996 |
|
997 |
|
998 |
|
999 | },
|
1000 |
|
1001 | 270:
|
1002 | function(module, exports, __webpack_require__) {
|
1003 |
|
1004 |
|
1005 | var jsCommon = window.jsCommon;
|
1006 | var powerbi = window.powerbi;
|
1007 | var powerbitests = window.powerbitests;
|
1008 | var InJs = window.InJs;
|
1009 | var debug = window.debug;
|
1010 | var jasmine = window.jasmine;
|
1011 | var Microsoft = window.Microsoft;
|
1012 |
|
1013 | |
1014 |
|
1015 |
|
1016 |
|
1017 |
|
1018 |
|
1019 |
|
1020 |
|
1021 |
|
1022 |
|
1023 |
|
1024 |
|
1025 |
|
1026 |
|
1027 |
|
1028 |
|
1029 |
|
1030 |
|
1031 |
|
1032 |
|
1033 |
|
1034 |
|
1035 |
|
1036 |
|
1037 |
|
1038 | if (false)
|
1039 | var DEBUG = true;
|
1040 |
|
1041 |
|
1042 |
|
1043 | },
|
1044 |
|
1045 | 271:
|
1046 | function(module, exports) {
|
1047 |
|
1048 |
|
1049 | var jsCommon = window.jsCommon;
|
1050 | var powerbi = window.powerbi;
|
1051 | var powerbitests = window.powerbitests;
|
1052 | var InJs = window.InJs;
|
1053 | var debug = window.debug;
|
1054 | var jasmine = window.jasmine;
|
1055 | var Microsoft = window.Microsoft;
|
1056 |
|
1057 | |
1058 |
|
1059 |
|
1060 |
|
1061 |
|
1062 |
|
1063 |
|
1064 |
|
1065 |
|
1066 |
|
1067 |
|
1068 |
|
1069 |
|
1070 |
|
1071 |
|
1072 |
|
1073 |
|
1074 |
|
1075 |
|
1076 |
|
1077 |
|
1078 |
|
1079 |
|
1080 |
|
1081 |
|
1082 |
|
1083 | var powerbi;
|
1084 | (function (powerbi) {
|
1085 | |
1086 |
|
1087 |
|
1088 | var ClientErrorStrings;
|
1089 | (function (ClientErrorStrings) {
|
1090 | ClientErrorStrings.ClientErrorCode = 'Client Error Code';
|
1091 | ClientErrorStrings.ErrorCode = 'Error Code';
|
1092 | ClientErrorStrings.ErrorDetails = 'Error Details';
|
1093 | ClientErrorStrings.HttpRequestId = 'HTTP Request Id';
|
1094 | ClientErrorStrings.JobId = 'Job Id';
|
1095 | ClientErrorStrings.ODataErrorMessage = 'OData Error Message';
|
1096 | ClientErrorStrings.StackTrace = 'Stack Trace';
|
1097 | })(ClientErrorStrings = powerbi.ClientErrorStrings || (powerbi.ClientErrorStrings = {}));
|
1098 | |
1099 |
|
1100 |
|
1101 | var UnknownClientError = (function () {
|
1102 | function UnknownClientError(code) {
|
1103 | debug.assertValue(code, 'code');
|
1104 | this.errorCode = code;
|
1105 | }
|
1106 | Object.defineProperty(UnknownClientError.prototype, "code", {
|
1107 | get: function () {
|
1108 | return this.errorCode;
|
1109 | },
|
1110 | enumerable: true,
|
1111 | configurable: true
|
1112 | });
|
1113 | Object.defineProperty(UnknownClientError.prototype, "ignorable", {
|
1114 | get: function () {
|
1115 | return false;
|
1116 | },
|
1117 | enumerable: true,
|
1118 | configurable: true
|
1119 | });
|
1120 | UnknownClientError.prototype.getDetails = function (resourceProvider) {
|
1121 | var details = {
|
1122 | message: resourceProvider.get('ClientError_UnknownClientErrorValue'),
|
1123 | displayableErrorInfo: [{ errorInfoKey: resourceProvider.get('ClientError_UnknownClientErrorKey'), errorInfoValue: resourceProvider.get('ClientError_UnknownClientErrorValue'), }],
|
1124 | debugErrorInfo: [{ errorInfoKey: ClientErrorStrings.ClientErrorCode, errorInfoValue: this.code, }],
|
1125 | };
|
1126 | return details;
|
1127 | };
|
1128 | return UnknownClientError;
|
1129 | }());
|
1130 | powerbi.UnknownClientError = UnknownClientError;
|
1131 | var HttpClientError = (function () {
|
1132 | function HttpClientError(httpStatusCode, requestId) {
|
1133 | debug.assertValue(httpStatusCode, 'httpStatusCode');
|
1134 | debug.assertValue(requestId, 'requestId');
|
1135 | this.httpStatusCode = httpStatusCode;
|
1136 | this.httpRequestId = requestId;
|
1137 | }
|
1138 | Object.defineProperty(HttpClientError.prototype, "code", {
|
1139 | get: function () {
|
1140 | return 'HttpClientError';
|
1141 | },
|
1142 | enumerable: true,
|
1143 | configurable: true
|
1144 | });
|
1145 | Object.defineProperty(HttpClientError.prototype, "ignorable", {
|
1146 | get: function () {
|
1147 | return false;
|
1148 | },
|
1149 | enumerable: true,
|
1150 | configurable: true
|
1151 | });
|
1152 | Object.defineProperty(HttpClientError.prototype, "requestId", {
|
1153 | get: function () {
|
1154 | return this.httpRequestId;
|
1155 | },
|
1156 | enumerable: true,
|
1157 | configurable: true
|
1158 | });
|
1159 | HttpClientError.prototype.getDetails = function (resourceProvider) {
|
1160 |
|
1161 | var details = {
|
1162 | message: null,
|
1163 | displayableErrorInfo: [
|
1164 | { errorInfoKey: resourceProvider.get('DsrError_Key'), errorInfoValue: resourceProvider.get('DsrError_UnknownErrorValue') },
|
1165 | { errorInfoKey: resourceProvider.get('ClientError_HttpResponseStatusCodeKey'), errorInfoValue: this.httpStatusCode.toString() }],
|
1166 | debugErrorInfo: [
|
1167 | { errorInfoKey: ClientErrorStrings.HttpRequestId, errorInfoValue: this.httpRequestId },
|
1168 | { errorInfoKey: ClientErrorStrings.ClientErrorCode, errorInfoValue: this.code }
|
1169 | ],
|
1170 | };
|
1171 | return details;
|
1172 | };
|
1173 | return HttpClientError;
|
1174 | }());
|
1175 | powerbi.HttpClientError = HttpClientError;
|
1176 | var IgnorableClientError = (function () {
|
1177 | function IgnorableClientError() {
|
1178 | }
|
1179 | Object.defineProperty(IgnorableClientError.prototype, "code", {
|
1180 | get: function () {
|
1181 | return 'IgnorableClientError';
|
1182 | },
|
1183 | enumerable: true,
|
1184 | configurable: true
|
1185 | });
|
1186 | Object.defineProperty(IgnorableClientError.prototype, "ignorable", {
|
1187 | get: function () {
|
1188 | return true;
|
1189 | },
|
1190 | enumerable: true,
|
1191 | configurable: true
|
1192 | });
|
1193 | IgnorableClientError.prototype.getDetails = function (resourceProvider) {
|
1194 | var details = {
|
1195 | message: '',
|
1196 | displayableErrorInfo: [],
|
1197 | };
|
1198 | return details;
|
1199 | };
|
1200 | return IgnorableClientError;
|
1201 | }());
|
1202 | powerbi.IgnorableClientError = IgnorableClientError;
|
1203 | })(powerbi || (powerbi = {}));
|
1204 |
|
1205 |
|
1206 |
|
1207 | },
|
1208 |
|
1209 | 272:
|
1210 | function(module, exports) {
|
1211 |
|
1212 |
|
1213 | var jsCommon = window.jsCommon;
|
1214 | var powerbi = window.powerbi;
|
1215 | var powerbitests = window.powerbitests;
|
1216 | var InJs = window.InJs;
|
1217 | var debug = window.debug;
|
1218 | var jasmine = window.jasmine;
|
1219 | var Microsoft = window.Microsoft;
|
1220 |
|
1221 | |
1222 |
|
1223 |
|
1224 |
|
1225 |
|
1226 |
|
1227 |
|
1228 |
|
1229 |
|
1230 |
|
1231 |
|
1232 |
|
1233 |
|
1234 |
|
1235 |
|
1236 |
|
1237 |
|
1238 |
|
1239 |
|
1240 |
|
1241 |
|
1242 |
|
1243 |
|
1244 |
|
1245 |
|
1246 |
|
1247 | var jsCommon;
|
1248 | (function (jsCommon) {
|
1249 | var ArrayExtensions;
|
1250 | (function (ArrayExtensions) {
|
1251 | |
1252 |
|
1253 |
|
1254 | function intersect(target, other) {
|
1255 | var result = [];
|
1256 | for (var i = target.length - 1; i >= 0; --i) {
|
1257 | if (other.indexOf(target[i]) !== -1) {
|
1258 | result.push(target[i]);
|
1259 | }
|
1260 | }
|
1261 | return result;
|
1262 | }
|
1263 | ArrayExtensions.intersect = intersect;
|
1264 | |
1265 |
|
1266 |
|
1267 | function diff(target, other) {
|
1268 | var result = [];
|
1269 | for (var i = target.length - 1; i >= 0; --i) {
|
1270 | var value = target[i];
|
1271 | if (other.indexOf(value) === -1) {
|
1272 | result.push(value);
|
1273 | }
|
1274 | }
|
1275 | return result;
|
1276 | }
|
1277 | ArrayExtensions.diff = diff;
|
1278 | |
1279 |
|
1280 |
|
1281 | function distinct(source) {
|
1282 | var result = [];
|
1283 | for (var i = 0, len = source.length; i < len; i++) {
|
1284 | var value = source[i];
|
1285 | if (result.indexOf(value) === -1) {
|
1286 | result.push(value);
|
1287 | }
|
1288 | }
|
1289 | return result;
|
1290 | }
|
1291 | ArrayExtensions.distinct = distinct;
|
1292 | |
1293 |
|
1294 |
|
1295 |
|
1296 | function union(target, source) {
|
1297 | for (var i = 0, len = source.length; i < len; ++i) {
|
1298 | unionSingle(target, source[i]);
|
1299 | }
|
1300 | }
|
1301 | ArrayExtensions.union = union;
|
1302 | |
1303 |
|
1304 |
|
1305 | function unionSingle(target, value) {
|
1306 | if (target.indexOf(value) < 0) {
|
1307 | target.push(value);
|
1308 | }
|
1309 | }
|
1310 | ArrayExtensions.unionSingle = unionSingle;
|
1311 | |
1312 |
|
1313 |
|
1314 |
|
1315 | function range(source, startIndex, endIndex) {
|
1316 | debug.assert(startIndex >= 0 && startIndex < source.length, 'startIndex is out of range.');
|
1317 | debug.assert(endIndex >= 0 && endIndex < source.length, 'endIndex is out of range.');
|
1318 | var result = [];
|
1319 | for (var i = startIndex; i <= endIndex; ++i) {
|
1320 | result.push(source[i]);
|
1321 | }
|
1322 | return result;
|
1323 | }
|
1324 | ArrayExtensions.range = range;
|
1325 | |
1326 |
|
1327 |
|
1328 | function take(source, count) {
|
1329 | debug.assert(count >= 0, 'Count is negative.');
|
1330 | debug.assert(count <= source.length, 'Count is too large.');
|
1331 | var result = [];
|
1332 | for (var i = 0; i < count; ++i) {
|
1333 | result.push(source[i]);
|
1334 | }
|
1335 | return result;
|
1336 | }
|
1337 | ArrayExtensions.take = take;
|
1338 | function copy(source) {
|
1339 | debug.assertValue(source, 'source');
|
1340 | return take(source, source.length);
|
1341 | }
|
1342 | ArrayExtensions.copy = copy;
|
1343 | |
1344 |
|
1345 |
|
1346 | function sequenceEqual(left, right, comparison) {
|
1347 | debug.assertValue(comparison, 'comparison');
|
1348 |
|
1349 | if (!left) {
|
1350 | left = null;
|
1351 | }
|
1352 | if (!right) {
|
1353 | right = null;
|
1354 | }
|
1355 | if (left === right) {
|
1356 | return true;
|
1357 | }
|
1358 | if (!!left !== !!right) {
|
1359 | return false;
|
1360 | }
|
1361 | var len = left.length;
|
1362 | if (len !== right.length) {
|
1363 | return false;
|
1364 | }
|
1365 | var i = 0;
|
1366 | while (i < len && comparison(left[i], right[i])) {
|
1367 | ++i;
|
1368 | }
|
1369 | return i === len;
|
1370 | }
|
1371 | ArrayExtensions.sequenceEqual = sequenceEqual;
|
1372 | |
1373 |
|
1374 |
|
1375 |
|
1376 | function emptyToNull(array) {
|
1377 | if (array && array.length === 0) {
|
1378 | return null;
|
1379 | }
|
1380 | return array;
|
1381 | }
|
1382 | ArrayExtensions.emptyToNull = emptyToNull;
|
1383 | function indexOf(array, predicate) {
|
1384 | debug.assertValue(array, 'array');
|
1385 | debug.assertValue(predicate, 'predicate');
|
1386 | for (var i = 0, len = array.length; i < len; ++i) {
|
1387 | if (predicate(array[i])) {
|
1388 | return i;
|
1389 | }
|
1390 | }
|
1391 | return -1;
|
1392 | }
|
1393 | ArrayExtensions.indexOf = indexOf;
|
1394 | |
1395 |
|
1396 |
|
1397 | function rotate(array, offset) {
|
1398 | if (offset === 0)
|
1399 | return array.slice();
|
1400 | var rotated = array.slice(offset);
|
1401 | Array.prototype.push.apply(rotated, array.slice(0, offset));
|
1402 | return rotated;
|
1403 | }
|
1404 | ArrayExtensions.rotate = rotate;
|
1405 | function createWithId() {
|
1406 | return extendWithId([]);
|
1407 | }
|
1408 | ArrayExtensions.createWithId = createWithId;
|
1409 | function extendWithId(array) {
|
1410 | debug.assertValue(array, 'array');
|
1411 | var extended = array;
|
1412 | extended.withId = withId;
|
1413 | return extended;
|
1414 | }
|
1415 | ArrayExtensions.extendWithId = extendWithId;
|
1416 | |
1417 |
|
1418 |
|
1419 | function findWithId(array, id) {
|
1420 | for (var i = 0, len = array.length; i < len; i++) {
|
1421 | var item = array[i];
|
1422 | if (item.id === id)
|
1423 | return item;
|
1424 | }
|
1425 | }
|
1426 | ArrayExtensions.findWithId = findWithId;
|
1427 | function withId(id) {
|
1428 | return ArrayExtensions.findWithId(this, id);
|
1429 | }
|
1430 | function createWithName() {
|
1431 | return extendWithName([]);
|
1432 | }
|
1433 | ArrayExtensions.createWithName = createWithName;
|
1434 | function extendWithName(array) {
|
1435 | debug.assertValue(array, 'array');
|
1436 | var extended = array;
|
1437 | extended.withName = withName;
|
1438 | return extended;
|
1439 | }
|
1440 | ArrayExtensions.extendWithName = extendWithName;
|
1441 | function findItemWithName(array, name) {
|
1442 | var index = indexWithName(array, name);
|
1443 | if (index >= 0)
|
1444 | return array[index];
|
1445 | }
|
1446 | ArrayExtensions.findItemWithName = findItemWithName;
|
1447 | function indexWithName(array, name) {
|
1448 | for (var i = 0, len = array.length; i < len; i++) {
|
1449 | var item = array[i];
|
1450 | if (item.name === name)
|
1451 | return i;
|
1452 | }
|
1453 | return -1;
|
1454 | }
|
1455 | ArrayExtensions.indexWithName = indexWithName;
|
1456 | |
1457 |
|
1458 |
|
1459 |
|
1460 | function insertSorted(list, value) {
|
1461 | debug.assertValue(list, 'list');
|
1462 | debug.assertValue(value, 'value');
|
1463 | var len = list.length;
|
1464 |
|
1465 | for (var i = len - 1; i >= 0; i--) {
|
1466 | var diff_1 = list[i] - value;
|
1467 | if (diff_1 === 0)
|
1468 | return false;
|
1469 | if (diff_1 > 0)
|
1470 | continue;
|
1471 |
|
1472 | list.splice(i + 1, 0, value);
|
1473 | return true;
|
1474 | }
|
1475 | list.unshift(value);
|
1476 | return true;
|
1477 | }
|
1478 | ArrayExtensions.insertSorted = insertSorted;
|
1479 | |
1480 |
|
1481 |
|
1482 |
|
1483 | function removeFirst(list, value) {
|
1484 | var index = list.indexOf(value);
|
1485 | if (index < 0)
|
1486 | return false;
|
1487 | list.splice(index, 1);
|
1488 | return true;
|
1489 | }
|
1490 | ArrayExtensions.removeFirst = removeFirst;
|
1491 | |
1492 |
|
1493 |
|
1494 | function withName(name) {
|
1495 | var array = this;
|
1496 | return findItemWithName(array, name);
|
1497 | }
|
1498 | |
1499 |
|
1500 |
|
1501 | function clear(array) {
|
1502 | if (!array)
|
1503 | return;
|
1504 | while (array.length > 0)
|
1505 | array.pop();
|
1506 | }
|
1507 | ArrayExtensions.clear = clear;
|
1508 | function isUndefinedOrEmpty(array) {
|
1509 | if (!array || array.length === 0) {
|
1510 | return true;
|
1511 | }
|
1512 | return false;
|
1513 | }
|
1514 | ArrayExtensions.isUndefinedOrEmpty = isUndefinedOrEmpty;
|
1515 | function swap(array, firstIndex, secondIndex) {
|
1516 | var temp = array[firstIndex];
|
1517 | array[firstIndex] = array[secondIndex];
|
1518 | array[secondIndex] = temp;
|
1519 | }
|
1520 | ArrayExtensions.swap = swap;
|
1521 | function isInArray(array, lookupItem, compareCallback) {
|
1522 | return _.any(array, function (item) { return compareCallback(item, lookupItem); });
|
1523 | }
|
1524 | ArrayExtensions.isInArray = isInArray;
|
1525 |
|
1526 | function isArrayOrInheritedArray(obj) {
|
1527 | debug.assertValue(obj, 'obj');
|
1528 | var nextPrototype = obj;
|
1529 | while (nextPrototype != null) {
|
1530 | if (_.isArray(nextPrototype))
|
1531 | return true;
|
1532 | nextPrototype = Object.getPrototypeOf(nextPrototype);
|
1533 | }
|
1534 | return false;
|
1535 | }
|
1536 | ArrayExtensions.isArrayOrInheritedArray = isArrayOrInheritedArray;
|
1537 | |
1538 |
|
1539 |
|
1540 | function isSorted(values, compareFunction) {
|
1541 | debug.assertValue(values, 'values');
|
1542 | debug.assertValue(compareFunction, 'compareFunction');
|
1543 | var ilen = values.length;
|
1544 | if (ilen >= 2) {
|
1545 | for (var i = 1; i < ilen; i++) {
|
1546 | if (compareFunction(values[i - 1], values[i]) > 0) {
|
1547 | return false;
|
1548 | }
|
1549 | }
|
1550 | }
|
1551 | return true;
|
1552 | }
|
1553 | ArrayExtensions.isSorted = isSorted;
|
1554 | |
1555 |
|
1556 |
|
1557 |
|
1558 | function isSortedNumeric(values, descendingOrder) {
|
1559 | debug.assertValue(values, 'values');
|
1560 | debug.assertAnyValue(descendingOrder, 'descendingOrder');
|
1561 | var compareFunction = descendingOrder ?
|
1562 | function (a, b) { return b - a; } :
|
1563 | function (a, b) { return a - b; };
|
1564 | return isSorted(values, compareFunction);
|
1565 | }
|
1566 | ArrayExtensions.isSortedNumeric = isSortedNumeric;
|
1567 | })(ArrayExtensions = jsCommon.ArrayExtensions || (jsCommon.ArrayExtensions = {}));
|
1568 | })(jsCommon || (jsCommon = {}));
|
1569 |
|
1570 |
|
1571 |
|
1572 | },
|
1573 |
|
1574 | 273:
|
1575 | function(module, exports) {
|
1576 |
|
1577 |
|
1578 | var jsCommon = window.jsCommon;
|
1579 | var powerbi = window.powerbi;
|
1580 | var powerbitests = window.powerbitests;
|
1581 | var InJs = window.InJs;
|
1582 | var debug = window.debug;
|
1583 | var jasmine = window.jasmine;
|
1584 | var Microsoft = window.Microsoft;
|
1585 |
|
1586 | |
1587 |
|
1588 |
|
1589 |
|
1590 |
|
1591 |
|
1592 |
|
1593 |
|
1594 |
|
1595 |
|
1596 |
|
1597 |
|
1598 |
|
1599 |
|
1600 |
|
1601 |
|
1602 |
|
1603 |
|
1604 |
|
1605 |
|
1606 |
|
1607 |
|
1608 |
|
1609 |
|
1610 |
|
1611 |
|
1612 | var InJs;
|
1613 | (function (InJs) {
|
1614 | var DomFactory;
|
1615 | (function (DomFactory) {
|
1616 | function div() {
|
1617 | return $('<div/>');
|
1618 | }
|
1619 | DomFactory.div = div;
|
1620 | function span() {
|
1621 | return $('<span/>');
|
1622 | }
|
1623 | DomFactory.span = span;
|
1624 | function checkbox() {
|
1625 | return $('<input type="checkbox"/>');
|
1626 | }
|
1627 | DomFactory.checkbox = checkbox;
|
1628 | function ul() {
|
1629 | return $('<ul/>');
|
1630 | }
|
1631 | DomFactory.ul = ul;
|
1632 | function li() {
|
1633 | return $('<li/>');
|
1634 | }
|
1635 | DomFactory.li = li;
|
1636 | function button() {
|
1637 | return $('<input type="button"/>');
|
1638 | }
|
1639 | DomFactory.button = button;
|
1640 | function select() {
|
1641 | return $('<select/>');
|
1642 | }
|
1643 | DomFactory.select = select;
|
1644 | function textBox() {
|
1645 | return $('<input type="text"/>');
|
1646 | }
|
1647 | DomFactory.textBox = textBox;
|
1648 | function img() {
|
1649 | return $('<img/>');
|
1650 | }
|
1651 | DomFactory.img = img;
|
1652 | function iframe() {
|
1653 | return $('<iframe/>');
|
1654 | }
|
1655 | DomFactory.iframe = iframe;
|
1656 | })(DomFactory = InJs.DomFactory || (InJs.DomFactory = {}));
|
1657 | })(InJs || (InJs = {}));
|
1658 |
|
1659 |
|
1660 |
|
1661 | },
|
1662 |
|
1663 | 274:
|
1664 | function(module, exports) {
|
1665 |
|
1666 |
|
1667 | var jsCommon = window.jsCommon;
|
1668 | var powerbi = window.powerbi;
|
1669 | var powerbitests = window.powerbitests;
|
1670 | var InJs = window.InJs;
|
1671 | var debug = window.debug;
|
1672 | var jasmine = window.jasmine;
|
1673 | var Microsoft = window.Microsoft;
|
1674 |
|
1675 | |
1676 |
|
1677 |
|
1678 |
|
1679 |
|
1680 |
|
1681 |
|
1682 |
|
1683 |
|
1684 |
|
1685 |
|
1686 |
|
1687 |
|
1688 |
|
1689 |
|
1690 |
|
1691 |
|
1692 |
|
1693 |
|
1694 |
|
1695 |
|
1696 |
|
1697 |
|
1698 |
|
1699 |
|
1700 |
|
1701 | var powerbi;
|
1702 | (function (powerbi) {
|
1703 | |
1704 |
|
1705 |
|
1706 |
|
1707 | var Double;
|
1708 | (function (Double) {
|
1709 |
|
1710 | Double.MIN_VALUE = -Number.MAX_VALUE;
|
1711 | Double.MAX_VALUE = Number.MAX_VALUE;
|
1712 | Double.MIN_EXP = -308;
|
1713 | Double.MAX_EXP = 308;
|
1714 | Double.EPSILON = 1E-323;
|
1715 | Double.DEFAULT_PRECISION = 0.0001;
|
1716 | Double.DEFAULT_PRECISION_IN_DECIMAL_DIGITS = 12;
|
1717 | Double.LOG_E_10 = Math.log(10);
|
1718 | Double.POSITIVE_POWERS = [
|
1719 | 1E0, 1E1, 1E2, 1E3, 1E4, 1E5, 1E6, 1E7, 1E8, 1E9, 1E10, 1E11, 1E12, 1E13, 1E14, 1E15, 1E16, 1E17, 1E18, 1E19, 1E20, 1E21, 1E22, 1E23, 1E24, 1E25, 1E26, 1E27, 1E28, 1E29, 1E30, 1E31, 1E32, 1E33, 1E34, 1E35, 1E36, 1E37, 1E38, 1E39, 1E40, 1E41, 1E42, 1E43, 1E44, 1E45, 1E46, 1E47, 1E48, 1E49, 1E50, 1E51, 1E52, 1E53, 1E54, 1E55, 1E56, 1E57, 1E58, 1E59, 1E60, 1E61, 1E62, 1E63, 1E64, 1E65, 1E66, 1E67, 1E68, 1E69, 1E70, 1E71, 1E72, 1E73, 1E74, 1E75, 1E76, 1E77, 1E78, 1E79, 1E80, 1E81, 1E82, 1E83, 1E84, 1E85, 1E86, 1E87, 1E88, 1E89, 1E90, 1E91, 1E92, 1E93, 1E94, 1E95, 1E96, 1E97, 1E98, 1E99,
|
1720 | 1E100, 1E101, 1E102, 1E103, 1E104, 1E105, 1E106, 1E107, 1E108, 1E109, 1E110, 1E111, 1E112, 1E113, 1E114, 1E115, 1E116, 1E117, 1E118, 1E119, 1E120, 1E121, 1E122, 1E123, 1E124, 1E125, 1E126, 1E127, 1E128, 1E129, 1E130, 1E131, 1E132, 1E133, 1E134, 1E135, 1E136, 1E137, 1E138, 1E139, 1E140, 1E141, 1E142, 1E143, 1E144, 1E145, 1E146, 1E147, 1E148, 1E149, 1E150, 1E151, 1E152, 1E153, 1E154, 1E155, 1E156, 1E157, 1E158, 1E159, 1E160, 1E161, 1E162, 1E163, 1E164, 1E165, 1E166, 1E167, 1E168, 1E169, 1E170, 1E171, 1E172, 1E173, 1E174, 1E175, 1E176, 1E177, 1E178, 1E179, 1E180, 1E181, 1E182, 1E183, 1E184, 1E185, 1E186, 1E187, 1E188, 1E189, 1E190, 1E191, 1E192, 1E193, 1E194, 1E195, 1E196, 1E197, 1E198, 1E199,
|
1721 | 1E200, 1E201, 1E202, 1E203, 1E204, 1E205, 1E206, 1E207, 1E208, 1E209, 1E210, 1E211, 1E212, 1E213, 1E214, 1E215, 1E216, 1E217, 1E218, 1E219, 1E220, 1E221, 1E222, 1E223, 1E224, 1E225, 1E226, 1E227, 1E228, 1E229, 1E230, 1E231, 1E232, 1E233, 1E234, 1E235, 1E236, 1E237, 1E238, 1E239, 1E240, 1E241, 1E242, 1E243, 1E244, 1E245, 1E246, 1E247, 1E248, 1E249, 1E250, 1E251, 1E252, 1E253, 1E254, 1E255, 1E256, 1E257, 1E258, 1E259, 1E260, 1E261, 1E262, 1E263, 1E264, 1E265, 1E266, 1E267, 1E268, 1E269, 1E270, 1E271, 1E272, 1E273, 1E274, 1E275, 1E276, 1E277, 1E278, 1E279, 1E280, 1E281, 1E282, 1E283, 1E284, 1E285, 1E286, 1E287, 1E288, 1E289, 1E290, 1E291, 1E292, 1E293, 1E294, 1E295, 1E296, 1E297, 1E298, 1E299,
|
1722 | 1E300, 1E301, 1E302, 1E303, 1E304, 1E305, 1E306, 1E307, 1E308];
|
1723 | Double.NEGATIVE_POWERS = [
|
1724 | 1E0, 1E-1, 1E-2, 1E-3, 1E-4, 1E-5, 1E-6, 1E-7, 1E-8, 1E-9, 1E-10, 1E-11, 1E-12, 1E-13, 1E-14, 1E-15, 1E-16, 1E-17, 1E-18, 1E-19, 1E-20, 1E-21, 1E-22, 1E-23, 1E-24, 1E-25, 1E-26, 1E-27, 1E-28, 1E-29, 1E-30, 1E-31, 1E-32, 1E-33, 1E-34, 1E-35, 1E-36, 1E-37, 1E-38, 1E-39, 1E-40, 1E-41, 1E-42, 1E-43, 1E-44, 1E-45, 1E-46, 1E-47, 1E-48, 1E-49, 1E-50, 1E-51, 1E-52, 1E-53, 1E-54, 1E-55, 1E-56, 1E-57, 1E-58, 1E-59, 1E-60, 1E-61, 1E-62, 1E-63, 1E-64, 1E-65, 1E-66, 1E-67, 1E-68, 1E-69, 1E-70, 1E-71, 1E-72, 1E-73, 1E-74, 1E-75, 1E-76, 1E-77, 1E-78, 1E-79, 1E-80, 1E-81, 1E-82, 1E-83, 1E-84, 1E-85, 1E-86, 1E-87, 1E-88, 1E-89, 1E-90, 1E-91, 1E-92, 1E-93, 1E-94, 1E-95, 1E-96, 1E-97, 1E-98, 1E-99,
|
1725 | 1E-100, 1E-101, 1E-102, 1E-103, 1E-104, 1E-105, 1E-106, 1E-107, 1E-108, 1E-109, 1E-110, 1E-111, 1E-112, 1E-113, 1E-114, 1E-115, 1E-116, 1E-117, 1E-118, 1E-119, 1E-120, 1E-121, 1E-122, 1E-123, 1E-124, 1E-125, 1E-126, 1E-127, 1E-128, 1E-129, 1E-130, 1E-131, 1E-132, 1E-133, 1E-134, 1E-135, 1E-136, 1E-137, 1E-138, 1E-139, 1E-140, 1E-141, 1E-142, 1E-143, 1E-144, 1E-145, 1E-146, 1E-147, 1E-148, 1E-149, 1E-150, 1E-151, 1E-152, 1E-153, 1E-154, 1E-155, 1E-156, 1E-157, 1E-158, 1E-159, 1E-160, 1E-161, 1E-162, 1E-163, 1E-164, 1E-165, 1E-166, 1E-167, 1E-168, 1E-169, 1E-170, 1E-171, 1E-172, 1E-173, 1E-174, 1E-175, 1E-176, 1E-177, 1E-178, 1E-179, 1E-180, 1E-181, 1E-182, 1E-183, 1E-184, 1E-185, 1E-186, 1E-187, 1E-188, 1E-189, 1E-190, 1E-191, 1E-192, 1E-193, 1E-194, 1E-195, 1E-196, 1E-197, 1E-198, 1E-199,
|
1726 | 1E-200, 1E-201, 1E-202, 1E-203, 1E-204, 1E-205, 1E-206, 1E-207, 1E-208, 1E-209, 1E-210, 1E-211, 1E-212, 1E-213, 1E-214, 1E-215, 1E-216, 1E-217, 1E-218, 1E-219, 1E-220, 1E-221, 1E-222, 1E-223, 1E-224, 1E-225, 1E-226, 1E-227, 1E-228, 1E-229, 1E-230, 1E-231, 1E-232, 1E-233, 1E-234, 1E-235, 1E-236, 1E-237, 1E-238, 1E-239, 1E-240, 1E-241, 1E-242, 1E-243, 1E-244, 1E-245, 1E-246, 1E-247, 1E-248, 1E-249, 1E-250, 1E-251, 1E-252, 1E-253, 1E-254, 1E-255, 1E-256, 1E-257, 1E-258, 1E-259, 1E-260, 1E-261, 1E-262, 1E-263, 1E-264, 1E-265, 1E-266, 1E-267, 1E-268, 1E-269, 1E-270, 1E-271, 1E-272, 1E-273, 1E-274, 1E-275, 1E-276, 1E-277, 1E-278, 1E-279, 1E-280, 1E-281, 1E-282, 1E-283, 1E-284, 1E-285, 1E-286, 1E-287, 1E-288, 1E-289, 1E-290, 1E-291, 1E-292, 1E-293, 1E-294, 1E-295, 1E-296, 1E-297, 1E-298, 1E-299,
|
1727 | 1E-300, 1E-301, 1E-302, 1E-303, 1E-304, 1E-305, 1E-306, 1E-307, 1E-308, 1E-309, 1E-310, 1E-311, 1E-312, 1E-313, 1E-314, 1E-315, 1E-316, 1E-317, 1E-318, 1E-319, 1E-320, 1E-321, 1E-322, 1E-323, 1E-324];
|
1728 | |
1729 |
|
1730 |
|
1731 |
|
1732 |
|
1733 | function pow10(exp) {
|
1734 | debug.assertValue(exp, "exp");
|
1735 |
|
1736 | if (exp >= 0) {
|
1737 | if (exp < Double.POSITIVE_POWERS.length) {
|
1738 | return Double.POSITIVE_POWERS[exp];
|
1739 | }
|
1740 | else {
|
1741 | return Infinity;
|
1742 | }
|
1743 | }
|
1744 |
|
1745 | exp = -exp;
|
1746 | if (exp > 0 && exp < Double.NEGATIVE_POWERS.length) {
|
1747 | return Double.NEGATIVE_POWERS[exp];
|
1748 | }
|
1749 | else {
|
1750 | return 0;
|
1751 | }
|
1752 | }
|
1753 | Double.pow10 = pow10;
|
1754 | |
1755 |
|
1756 |
|
1757 |
|
1758 |
|
1759 | function log10(val) {
|
1760 | debug.assert(val >= 0, "val");
|
1761 |
|
1762 | if (val > 1 && val < 1E16) {
|
1763 | if (val < 1E8) {
|
1764 | if (val < 1E4) {
|
1765 | if (val < 1E2) {
|
1766 | if (val < 1E1) {
|
1767 | return 0;
|
1768 | }
|
1769 | else {
|
1770 | return 1;
|
1771 | }
|
1772 | }
|
1773 | else {
|
1774 | if (val < 1E3) {
|
1775 | return 2;
|
1776 | }
|
1777 | else {
|
1778 | return 3;
|
1779 | }
|
1780 | }
|
1781 | }
|
1782 | else {
|
1783 | if (val < 1E6) {
|
1784 | if (val < 1E5) {
|
1785 | return 4;
|
1786 | }
|
1787 | else {
|
1788 | return 5;
|
1789 | }
|
1790 | }
|
1791 | else {
|
1792 | if (val < 1E7) {
|
1793 | return 6;
|
1794 | }
|
1795 | else {
|
1796 | return 7;
|
1797 | }
|
1798 | }
|
1799 | }
|
1800 | }
|
1801 | else {
|
1802 | if (val < 1E12) {
|
1803 | if (val < 1E10) {
|
1804 | if (val < 1E9) {
|
1805 | return 8;
|
1806 | }
|
1807 | else {
|
1808 | return 9;
|
1809 | }
|
1810 | }
|
1811 | else {
|
1812 | if (val < 1E11) {
|
1813 | return 10;
|
1814 | }
|
1815 | else {
|
1816 | return 11;
|
1817 | }
|
1818 | }
|
1819 | }
|
1820 | else {
|
1821 | if (val < 1E14) {
|
1822 | if (val < 1E13) {
|
1823 | return 12;
|
1824 | }
|
1825 | else {
|
1826 | return 13;
|
1827 | }
|
1828 | }
|
1829 | else {
|
1830 | if (val < 1E15) {
|
1831 | return 14;
|
1832 | }
|
1833 | else {
|
1834 | return 15;
|
1835 | }
|
1836 | }
|
1837 | }
|
1838 | }
|
1839 | }
|
1840 | if (val > 1E-16 && val < 1) {
|
1841 | if (val < 1E-8) {
|
1842 | if (val < 1E-12) {
|
1843 | if (val < 1E-14) {
|
1844 | if (val < 1E-15) {
|
1845 | return -16;
|
1846 | }
|
1847 | else {
|
1848 | return -15;
|
1849 | }
|
1850 | }
|
1851 | else {
|
1852 | if (val < 1E-13) {
|
1853 | return -14;
|
1854 | }
|
1855 | else {
|
1856 | return -13;
|
1857 | }
|
1858 | }
|
1859 | }
|
1860 | else {
|
1861 | if (val < 1E-10) {
|
1862 | if (val < 1E-11) {
|
1863 | return -12;
|
1864 | }
|
1865 | else {
|
1866 | return -11;
|
1867 | }
|
1868 | }
|
1869 | else {
|
1870 | if (val < 1E-9) {
|
1871 | return -10;
|
1872 | }
|
1873 | else {
|
1874 | return -9;
|
1875 | }
|
1876 | }
|
1877 | }
|
1878 | }
|
1879 | else {
|
1880 | if (val < 1E-4) {
|
1881 | if (val < 1E-6) {
|
1882 | if (val < 1E-7) {
|
1883 | return -8;
|
1884 | }
|
1885 | else {
|
1886 | return -7;
|
1887 | }
|
1888 | }
|
1889 | else {
|
1890 | if (val < 1E-5) {
|
1891 | return -6;
|
1892 | }
|
1893 | else {
|
1894 | return -5;
|
1895 | }
|
1896 | }
|
1897 | }
|
1898 | else {
|
1899 | if (val < 1E-2) {
|
1900 | if (val < 1E-3) {
|
1901 | return -4;
|
1902 | }
|
1903 | else {
|
1904 | return -3;
|
1905 | }
|
1906 | }
|
1907 | else {
|
1908 | if (val < 1E-1) {
|
1909 | return -2;
|
1910 | }
|
1911 | else {
|
1912 | return -1;
|
1913 | }
|
1914 | }
|
1915 | }
|
1916 | }
|
1917 | }
|
1918 |
|
1919 |
|
1920 | var log10 = Math.log(val) / Double.LOG_E_10;
|
1921 | return Double.floorWithPrecision(log10);
|
1922 | }
|
1923 | Double.log10 = log10;
|
1924 | |
1925 |
|
1926 |
|
1927 |
|
1928 |
|
1929 |
|
1930 | function getPrecision(x, decimalDigits) {
|
1931 | if (decimalDigits === undefined) {
|
1932 | decimalDigits = Double.DEFAULT_PRECISION_IN_DECIMAL_DIGITS;
|
1933 | }
|
1934 | else {
|
1935 | debug.assert(decimalDigits >= 0, "decimalDigits");
|
1936 | }
|
1937 | if (!x) {
|
1938 | return undefined;
|
1939 | }
|
1940 | var exp = Double.log10(Math.abs(x));
|
1941 | if (exp < Double.MIN_EXP) {
|
1942 | return 0;
|
1943 | }
|
1944 | var precisionExp = Math.max(exp - decimalDigits, -Double.NEGATIVE_POWERS.length + 1);
|
1945 | return Double.pow10(precisionExp);
|
1946 | }
|
1947 | Double.getPrecision = getPrecision;
|
1948 | |
1949 |
|
1950 |
|
1951 |
|
1952 |
|
1953 |
|
1954 | function equalWithPrecision(x, y, precision) {
|
1955 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
1956 | debug.assert(precision >= 0, "precision");
|
1957 | return x === y || Math.abs(x - y) < precision;
|
1958 | }
|
1959 | Double.equalWithPrecision = equalWithPrecision;
|
1960 | |
1961 |
|
1962 |
|
1963 |
|
1964 |
|
1965 |
|
1966 |
|
1967 | function lessWithPrecision(x, y, precision) {
|
1968 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
1969 | debug.assert(precision >= 0, "precision");
|
1970 | return x < y && Math.abs(x - y) > precision;
|
1971 | }
|
1972 | Double.lessWithPrecision = lessWithPrecision;
|
1973 | |
1974 |
|
1975 |
|
1976 |
|
1977 |
|
1978 |
|
1979 |
|
1980 | function lessOrEqualWithPrecision(x, y, precision) {
|
1981 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
1982 | debug.assert(precision >= 0, "precision");
|
1983 | return x < y || Math.abs(x - y) < precision;
|
1984 | }
|
1985 | Double.lessOrEqualWithPrecision = lessOrEqualWithPrecision;
|
1986 | |
1987 |
|
1988 |
|
1989 |
|
1990 |
|
1991 |
|
1992 |
|
1993 | function greaterWithPrecision(x, y, precision) {
|
1994 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
1995 | debug.assert(precision >= 0, "precision");
|
1996 | return x > y && Math.abs(x - y) > precision;
|
1997 | }
|
1998 | Double.greaterWithPrecision = greaterWithPrecision;
|
1999 | |
2000 |
|
2001 |
|
2002 |
|
2003 |
|
2004 |
|
2005 |
|
2006 | function greaterOrEqualWithPrecision(x, y, precision) {
|
2007 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2008 | debug.assert(precision >= 0, "precision");
|
2009 | return x > y || Math.abs(x - y) < precision;
|
2010 | }
|
2011 | Double.greaterOrEqualWithPrecision = greaterOrEqualWithPrecision;
|
2012 | |
2013 |
|
2014 |
|
2015 |
|
2016 |
|
2017 | function floorWithPrecision(x, precision) {
|
2018 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2019 | debug.assert(precision >= 0, "precision");
|
2020 | var roundX = Math.round(x);
|
2021 | if (Math.abs(x - roundX) < precision) {
|
2022 | return roundX;
|
2023 | }
|
2024 | else {
|
2025 | return Math.floor(x);
|
2026 | }
|
2027 | }
|
2028 | Double.floorWithPrecision = floorWithPrecision;
|
2029 | |
2030 |
|
2031 |
|
2032 |
|
2033 |
|
2034 | function ceilWithPrecision(x, precision) {
|
2035 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2036 | debug.assert(precision >= 0, "precision");
|
2037 | var roundX = Math.round(x);
|
2038 | if (Math.abs(x - roundX) < precision) {
|
2039 | return roundX;
|
2040 | }
|
2041 | else {
|
2042 | return Math.ceil(x);
|
2043 | }
|
2044 | }
|
2045 | Double.ceilWithPrecision = ceilWithPrecision;
|
2046 | |
2047 |
|
2048 |
|
2049 |
|
2050 |
|
2051 |
|
2052 | function floorToPrecision(x, precision) {
|
2053 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2054 | debug.assert(precision >= 0, "precision");
|
2055 | if (precision === 0 || x === 0) {
|
2056 | return x;
|
2057 | }
|
2058 |
|
2059 | return Math.floor(x / precision) * precision;
|
2060 | }
|
2061 | Double.floorToPrecision = floorToPrecision;
|
2062 | |
2063 |
|
2064 |
|
2065 |
|
2066 |
|
2067 |
|
2068 | function ceilToPrecision(x, precision) {
|
2069 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2070 | debug.assert(precision >= 0, "precision");
|
2071 | if (precision === 0 || x === 0) {
|
2072 | return x;
|
2073 | }
|
2074 |
|
2075 | return Math.ceil(x / precision) * precision;
|
2076 | }
|
2077 | Double.ceilToPrecision = ceilToPrecision;
|
2078 | |
2079 |
|
2080 |
|
2081 |
|
2082 |
|
2083 |
|
2084 | function roundToPrecision(x, precision) {
|
2085 | precision = applyDefault(precision, Double.DEFAULT_PRECISION);
|
2086 | debug.assert(precision >= 0, "precision");
|
2087 | if (precision === 0 || x === 0) {
|
2088 | return x;
|
2089 | }
|
2090 |
|
2091 | var result = Math.round(x / precision) * precision;
|
2092 | var decimalDigits = Math.round(Double.log10(Math.abs(x)) - Double.log10(precision)) + 1;
|
2093 | if (decimalDigits > 0 && decimalDigits < 16) {
|
2094 | result = parseFloat(result.toPrecision(decimalDigits));
|
2095 | }
|
2096 | return result;
|
2097 | }
|
2098 | Double.roundToPrecision = roundToPrecision;
|
2099 | |
2100 |
|
2101 |
|
2102 |
|
2103 |
|
2104 |
|
2105 | function ensureInRange(x, min, max) {
|
2106 | debug.assert(min <= max, "min must be less or equal to max");
|
2107 | if (x === undefined || x === null) {
|
2108 | return x;
|
2109 | }
|
2110 | if (x < min) {
|
2111 | return min;
|
2112 | }
|
2113 | if (x > max) {
|
2114 | return max;
|
2115 | }
|
2116 | return x;
|
2117 | }
|
2118 | Double.ensureInRange = ensureInRange;
|
2119 | |
2120 |
|
2121 |
|
2122 |
|
2123 | function round(x) {
|
2124 | debug.assert(x >= 0, "x must be greater or equal to 0");
|
2125 | return (0.5 + x) << 0;
|
2126 | }
|
2127 | Double.round = round;
|
2128 | |
2129 |
|
2130 |
|
2131 |
|
2132 |
|
2133 |
|
2134 |
|
2135 | function project(value, fromMin, fromSize, toMin, toSize) {
|
2136 | if (fromSize === 0 || toSize === 0) {
|
2137 | if (fromMin <= value && value <= fromMin + fromSize) {
|
2138 | return toMin;
|
2139 | }
|
2140 | else {
|
2141 | return NaN;
|
2142 | }
|
2143 | }
|
2144 | var relativeX = (value - fromMin) / fromSize;
|
2145 | var projectedX = toMin + relativeX * toSize;
|
2146 | return projectedX;
|
2147 | }
|
2148 | Double.project = project;
|
2149 | |
2150 |
|
2151 |
|
2152 |
|
2153 | function removeDecimalNoise(value) {
|
2154 | return roundToPrecision(value, getPrecision(value));
|
2155 | }
|
2156 | Double.removeDecimalNoise = removeDecimalNoise;
|
2157 | |
2158 |
|
2159 |
|
2160 |
|
2161 | function isInteger(value) {
|
2162 | return value !== null && value % 1 === 0;
|
2163 | }
|
2164 | Double.isInteger = isInteger;
|
2165 | |
2166 |
|
2167 |
|
2168 |
|
2169 |
|
2170 |
|
2171 |
|
2172 |
|
2173 | function toIncrement(value, increment) {
|
2174 | return Math.round(value / increment) * increment;
|
2175 | }
|
2176 | Double.toIncrement = toIncrement;
|
2177 | })(Double = powerbi.Double || (powerbi.Double = {}));
|
2178 | function applyDefault(value, defaultValue) {
|
2179 | return value !== undefined ? value : defaultValue;
|
2180 | }
|
2181 | })(powerbi || (powerbi = {}));
|
2182 |
|
2183 |
|
2184 |
|
2185 | },
|
2186 |
|
2187 | 275:
|
2188 | function(module, exports) {
|
2189 |
|
2190 |
|
2191 | var jsCommon = window.jsCommon;
|
2192 | var powerbi = window.powerbi;
|
2193 | var powerbitests = window.powerbitests;
|
2194 | var InJs = window.InJs;
|
2195 | var debug = window.debug;
|
2196 | var jasmine = window.jasmine;
|
2197 | var Microsoft = window.Microsoft;
|
2198 |
|
2199 | |
2200 |
|
2201 |
|
2202 |
|
2203 |
|
2204 |
|
2205 |
|
2206 |
|
2207 |
|
2208 |
|
2209 |
|
2210 |
|
2211 |
|
2212 |
|
2213 |
|
2214 |
|
2215 |
|
2216 |
|
2217 |
|
2218 |
|
2219 |
|
2220 |
|
2221 |
|
2222 |
|
2223 |
|
2224 |
|
2225 | var jsCommon;
|
2226 | (function (jsCommon) {
|
2227 | var Double = powerbi.Double;
|
2228 | var Color;
|
2229 | (function (Color) {
|
2230 | function rotate(rgbString, rotateFactor) {
|
2231 | if (rotateFactor === 0)
|
2232 | return rgbString;
|
2233 | var originalRgb = parseColorString(rgbString);
|
2234 | var originalHsv = rgbToHsv(originalRgb);
|
2235 | var rotatedHsv = rotateHsv(originalHsv, rotateFactor);
|
2236 | var rotatedRgb = hsvToRgb(rotatedHsv);
|
2237 | return hexString(rotatedRgb);
|
2238 | }
|
2239 | Color.rotate = rotate;
|
2240 | function normalizeToHexString(color) {
|
2241 | var rgb = parseColorString(color);
|
2242 | return hexString(rgb);
|
2243 | }
|
2244 | Color.normalizeToHexString = normalizeToHexString;
|
2245 | function parseColorString(color) {
|
2246 | debug.assertValue(color, 'color');
|
2247 | if (color.indexOf('#') >= 0) {
|
2248 | if (color.length === 7) {
|
2249 |
|
2250 | var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(color);
|
2251 | if (result == null || result.length < 4)
|
2252 | return;
|
2253 | return {
|
2254 | R: parseInt(result[1], 16),
|
2255 | G: parseInt(result[2], 16),
|
2256 | B: parseInt(result[3], 16),
|
2257 | };
|
2258 | }
|
2259 | else if (color.length === 4) {
|
2260 |
|
2261 | var result = /^#?([a-f\d])([a-f\d])([a-f\d])$/i.exec(color);
|
2262 | if (result == null || result.length < 4)
|
2263 | return;
|
2264 | return {
|
2265 | R: parseInt(result[1] + result[1], 16),
|
2266 | G: parseInt(result[2] + result[2], 16),
|
2267 | B: parseInt(result[3] + result[3], 16),
|
2268 | };
|
2269 | }
|
2270 | }
|
2271 | else if (color.indexOf('rgb(') >= 0) {
|
2272 |
|
2273 | var result = /^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/.exec(color);
|
2274 | if (result == null || result.length < 4)
|
2275 | return;
|
2276 | return {
|
2277 | R: parseInt(result[1], 10),
|
2278 | G: parseInt(result[2], 10),
|
2279 | B: parseInt(result[3], 10),
|
2280 | };
|
2281 | }
|
2282 | else if (color.indexOf('rgba(') >= 0) {
|
2283 |
|
2284 | var result = /^rgba\((\d+),\s*(\d+),\s*(\d+),\s*(\d*(?:\.\d+)?)\)$/.exec(color);
|
2285 | if (result == null || result.length < 5)
|
2286 | return;
|
2287 | return {
|
2288 | R: parseInt(result[1], 10),
|
2289 | G: parseInt(result[2], 10),
|
2290 | B: parseInt(result[3], 10),
|
2291 | A: parseFloat(result[4]),
|
2292 | };
|
2293 | }
|
2294 | }
|
2295 | Color.parseColorString = parseColorString;
|
2296 | function rgbToHsv(rgbColor) {
|
2297 | var s, h;
|
2298 | var r = rgbColor.R / 255, g = rgbColor.G / 255, b = rgbColor.B / 255;
|
2299 | var min = Math.min(r, Math.min(g, b));
|
2300 | var max = Math.max(r, Math.max(g, b));
|
2301 | var v = max;
|
2302 | var delta = max - min;
|
2303 | if (max === 0 || delta === 0) {
|
2304 |
|
2305 |
|
2306 |
|
2307 | s = 0;
|
2308 | h = 0;
|
2309 | }
|
2310 | else {
|
2311 | s = delta / max;
|
2312 | if (r === max) {
|
2313 |
|
2314 | h = (g - b) / delta;
|
2315 | }
|
2316 | else if (g === max) {
|
2317 |
|
2318 | h = 2 + (b - r) / delta;
|
2319 | }
|
2320 | else {
|
2321 |
|
2322 | h = 4 + (r - g) / delta;
|
2323 | }
|
2324 | }
|
2325 |
|
2326 |
|
2327 |
|
2328 | h /= 6;
|
2329 | if (h < 0) {
|
2330 | h += 1;
|
2331 | }
|
2332 | return {
|
2333 | H: h,
|
2334 | S: s,
|
2335 | V: v,
|
2336 | };
|
2337 | }
|
2338 | function hsvToRgb(hsvColor) {
|
2339 | var r, g, b;
|
2340 | var h = hsvColor.H, s = hsvColor.S, v = hsvColor.V;
|
2341 | if (s === 0) {
|
2342 |
|
2343 |
|
2344 | r = v;
|
2345 | g = v;
|
2346 | b = v;
|
2347 | }
|
2348 | else {
|
2349 | var p = void 0, q = void 0, t = void 0, fractionalSector = void 0, sectorNumber = void 0, sectorPos = void 0;
|
2350 |
|
2351 |
|
2352 | sectorPos = h * 6;
|
2353 | sectorNumber = Math.floor(sectorPos);
|
2354 |
|
2355 |
|
2356 |
|
2357 | fractionalSector = sectorPos - sectorNumber;
|
2358 |
|
2359 |
|
2360 | p = v * (1.0 - s);
|
2361 | q = v * (1.0 - (s * fractionalSector));
|
2362 | t = v * (1.0 - (s * (1 - fractionalSector)));
|
2363 |
|
2364 |
|
2365 | switch (sectorNumber) {
|
2366 | case 0:
|
2367 | r = v;
|
2368 | g = t;
|
2369 | b = p;
|
2370 | break;
|
2371 | case 1:
|
2372 | r = q;
|
2373 | g = v;
|
2374 | b = p;
|
2375 | break;
|
2376 | case 2:
|
2377 | r = p;
|
2378 | g = v;
|
2379 | b = t;
|
2380 | break;
|
2381 | case 3:
|
2382 | r = p;
|
2383 | g = q;
|
2384 | b = v;
|
2385 | break;
|
2386 | case 4:
|
2387 | r = t;
|
2388 | g = p;
|
2389 | b = v;
|
2390 | break;
|
2391 | case 5:
|
2392 | r = v;
|
2393 | g = p;
|
2394 | b = q;
|
2395 | break;
|
2396 | }
|
2397 | }
|
2398 | return {
|
2399 | R: Math.floor(r * 255),
|
2400 | G: Math.floor(g * 255),
|
2401 | B: Math.floor(b * 255),
|
2402 | };
|
2403 | }
|
2404 | function rotateHsv(hsvColor, rotateFactor) {
|
2405 | var newH = hsvColor.H + rotateFactor;
|
2406 | return {
|
2407 | H: newH > 1 ? newH - 1 : newH,
|
2408 | S: hsvColor.S,
|
2409 | V: hsvColor.V,
|
2410 | };
|
2411 | }
|
2412 | function darken(color, diff) {
|
2413 | var flooredNumber = Math.floor(diff);
|
2414 | return {
|
2415 | R: Math.max(0, color.R - flooredNumber),
|
2416 | G: Math.max(0, color.G - flooredNumber),
|
2417 | B: Math.max(0, color.B - flooredNumber),
|
2418 | };
|
2419 | }
|
2420 | Color.darken = darken;
|
2421 | function rgbString(color) {
|
2422 | if (color.A == null)
|
2423 | return "rgb(" + color.R + "," + color.G + "," + color.B + ")";
|
2424 | return "rgba(" + color.R + "," + color.G + "," + color.B + "," + color.A + ")";
|
2425 | }
|
2426 | Color.rgbString = rgbString;
|
2427 | function hexString(color) {
|
2428 | return "#" + componentToHex(color.R) + componentToHex(color.G) + componentToHex(color.B);
|
2429 | }
|
2430 | Color.hexString = hexString;
|
2431 | |
2432 |
|
2433 |
|
2434 |
|
2435 |
|
2436 |
|
2437 |
|
2438 | function hexBlend(foreColor, opacity, backColor) {
|
2439 | return hexString(rgbBlend(parseColorString(foreColor), opacity, parseColorString(backColor)));
|
2440 | }
|
2441 | Color.hexBlend = hexBlend;
|
2442 | |
2443 |
|
2444 |
|
2445 |
|
2446 |
|
2447 |
|
2448 |
|
2449 | function rgbBlend(foreColor, opacity, backColor) {
|
2450 |
|
2451 | opacity = Double.ensureInRange(opacity, 0, 1);
|
2452 | return {
|
2453 | R: channelBlend(foreColor.R, opacity, backColor.R),
|
2454 | G: channelBlend(foreColor.G, opacity, backColor.G),
|
2455 | B: channelBlend(foreColor.B, opacity, backColor.B)
|
2456 | };
|
2457 | }
|
2458 | Color.rgbBlend = rgbBlend;
|
2459 | |
2460 |
|
2461 |
|
2462 |
|
2463 |
|
2464 |
|
2465 |
|
2466 | function channelBlend(foreChannel, opacity, backChannel) {
|
2467 | opacity = Double.ensureInRange(opacity, 0, 1);
|
2468 | foreChannel = Double.ensureInRange(foreChannel, 0, 255);
|
2469 | backChannel = Double.ensureInRange(backChannel, 0, 255);
|
2470 | return Math.round((opacity * foreChannel) +
|
2471 | ((1 - opacity) * backChannel));
|
2472 | }
|
2473 | Color.channelBlend = channelBlend;
|
2474 | function componentToHex(hexComponent) {
|
2475 | var clamped = Double.ensureInRange(hexComponent, 0, 255);
|
2476 | var hex = clamped.toString(16).toUpperCase();
|
2477 | return hex.length === 1 ? "0" + hex : hex;
|
2478 | }
|
2479 | })(Color = jsCommon.Color || (jsCommon.Color = {}));
|
2480 | })(jsCommon || (jsCommon = {}));
|
2481 |
|
2482 |
|
2483 |
|
2484 | },
|
2485 |
|
2486 | 276:
|
2487 | function(module, exports) {
|
2488 |
|
2489 |
|
2490 | var jsCommon = window.jsCommon;
|
2491 | var powerbi = window.powerbi;
|
2492 | var powerbitests = window.powerbitests;
|
2493 | var InJs = window.InJs;
|
2494 | var debug = window.debug;
|
2495 | var jasmine = window.jasmine;
|
2496 | var Microsoft = window.Microsoft;
|
2497 |
|
2498 | |
2499 |
|
2500 |
|
2501 |
|
2502 |
|
2503 |
|
2504 |
|
2505 |
|
2506 |
|
2507 |
|
2508 |
|
2509 |
|
2510 |
|
2511 |
|
2512 |
|
2513 |
|
2514 |
|
2515 |
|
2516 |
|
2517 |
|
2518 |
|
2519 |
|
2520 |
|
2521 |
|
2522 |
|
2523 |
|
2524 | var jsCommon;
|
2525 | (function (jsCommon) {
|
2526 | |
2527 |
|
2528 |
|
2529 | var CssConstants;
|
2530 | (function (CssConstants) {
|
2531 | function createClassAndSelector(className) {
|
2532 | return {
|
2533 | class: className,
|
2534 | selector: '.' + className,
|
2535 | };
|
2536 | }
|
2537 | CssConstants.createClassAndSelector = createClassAndSelector;
|
2538 | CssConstants.styleAttribute = 'style';
|
2539 | CssConstants.pixelUnits = 'px';
|
2540 | CssConstants.heightProperty = 'height';
|
2541 | CssConstants.widthProperty = 'width';
|
2542 | CssConstants.topProperty = 'top';
|
2543 | CssConstants.bottomProperty = 'bottom';
|
2544 | CssConstants.leftProperty = 'left';
|
2545 | CssConstants.rightProperty = 'right';
|
2546 | CssConstants.marginTopProperty = 'margin-top';
|
2547 | CssConstants.marginLeftProperty = 'margin-left';
|
2548 | CssConstants.displayProperty = 'display';
|
2549 | CssConstants.backgroundProperty = 'background';
|
2550 | CssConstants.backgroundColorProperty = 'background-color';
|
2551 | CssConstants.backgroundRepeatProperty = 'background-repeat';
|
2552 | CssConstants.backgroundSizeProperty = 'background-size';
|
2553 | CssConstants.backgroundImageProperty = 'background-image';
|
2554 | CssConstants.textShadowProperty = 'text-shadow';
|
2555 | CssConstants.textAlignProperty = 'text-align';
|
2556 | CssConstants.borderTopWidthProperty = 'border-top-width';
|
2557 | CssConstants.borderBottomWidthProperty = 'border-bottom-width';
|
2558 | CssConstants.borderLeftWidthProperty = 'border-left-width';
|
2559 | CssConstants.borderRightWidthProperty = 'border-right-width';
|
2560 | CssConstants.fontSizeProperty = 'font-size';
|
2561 | CssConstants.fontWeightProperty = 'font-weight';
|
2562 | CssConstants.colorProperty = 'color';
|
2563 | CssConstants.opacityProperty = 'opacity';
|
2564 | CssConstants.paddingLeftProperty = 'padding-left';
|
2565 | CssConstants.paddingRightProperty = 'padding-right';
|
2566 | CssConstants.positionProperty = 'position';
|
2567 | CssConstants.maxWidthProperty = 'max-width';
|
2568 | CssConstants.minWidthProperty = 'min-width';
|
2569 | CssConstants.overflowProperty = 'overflow';
|
2570 | CssConstants.overflowXProperty = 'overflow-x';
|
2571 | CssConstants.overflowYProperty = 'overflow-y';
|
2572 | CssConstants.transformProperty = 'transform';
|
2573 | CssConstants.webkitTransformProperty = '-webkit-transform';
|
2574 | CssConstants.cursorProperty = 'cursor';
|
2575 | CssConstants.visibilityProperty = 'visibility';
|
2576 | CssConstants.absoluteValue = 'absolute';
|
2577 | CssConstants.zeroPixelValue = '0px';
|
2578 | CssConstants.autoValue = 'auto';
|
2579 | CssConstants.hiddenValue = 'hidden';
|
2580 | CssConstants.noneValue = 'none';
|
2581 | CssConstants.blockValue = 'block';
|
2582 | CssConstants.inlineBlockValue = 'inline-block';
|
2583 | CssConstants.transparentValue = 'transparent';
|
2584 | CssConstants.boldValue = 'bold';
|
2585 | CssConstants.visibleValue = 'visible';
|
2586 | CssConstants.tableRowValue = 'table-row';
|
2587 | CssConstants.coverValue = 'cover';
|
2588 | CssConstants.pointerValue = 'pointer';
|
2589 | CssConstants.scrollValue = 'scroll';
|
2590 | })(CssConstants = jsCommon.CssConstants || (jsCommon.CssConstants = {}));
|
2591 | })(jsCommon || (jsCommon = {}));
|
2592 |
|
2593 |
|
2594 |
|
2595 | },
|
2596 |
|
2597 | 277:
|
2598 | function(module, exports) {
|
2599 |
|
2600 |
|
2601 | var jsCommon = window.jsCommon;
|
2602 | var powerbi = window.powerbi;
|
2603 | var powerbitests = window.powerbitests;
|
2604 | var InJs = window.InJs;
|
2605 | var debug = window.debug;
|
2606 | var jasmine = window.jasmine;
|
2607 | var Microsoft = window.Microsoft;
|
2608 |
|
2609 | |
2610 |
|
2611 |
|
2612 |
|
2613 |
|
2614 |
|
2615 |
|
2616 |
|
2617 |
|
2618 |
|
2619 |
|
2620 |
|
2621 |
|
2622 |
|
2623 |
|
2624 |
|
2625 |
|
2626 |
|
2627 |
|
2628 |
|
2629 |
|
2630 |
|
2631 |
|
2632 |
|
2633 |
|
2634 | |
2635 |
|
2636 |
|
2637 |
|
2638 |
|
2639 |
|
2640 |
|
2641 | var debug;
|
2642 | (function (debug) {
|
2643 | |
2644 |
|
2645 |
|
2646 | function assert(condition, message) {
|
2647 | if (condition !== true) {
|
2648 | assertFail(message || ('condition: ' + condition));
|
2649 | }
|
2650 | }
|
2651 | debug.assert = assert;
|
2652 | |
2653 |
|
2654 |
|
2655 | function assertValue(value, message) {
|
2656 | if (value === null || value === undefined) {
|
2657 | assertFail(message || ('condition: ' + value));
|
2658 | }
|
2659 | }
|
2660 | debug.assertValue = assertValue;
|
2661 | |
2662 |
|
2663 |
|
2664 | function assertNonEmpty(value, message) {
|
2665 | if (!(value != null && value.length > 0)) {
|
2666 | assertFail(message || ('condition: ' + value));
|
2667 | }
|
2668 | }
|
2669 | debug.assertNonEmpty = assertNonEmpty;
|
2670 | |
2671 |
|
2672 |
|
2673 |
|
2674 | function assertAnyValue(value, message) {
|
2675 | }
|
2676 | debug.assertAnyValue = assertAnyValue;
|
2677 | function assertFail(message) {
|
2678 | (debug.assertFailFunction || alert)('Debug Assert failed: ' + message);
|
2679 | }
|
2680 | debug.assertFail = assertFail;
|
2681 | })(debug || (debug = {}));
|
2682 |
|
2683 |
|
2684 |
|
2685 |
|
2686 | },
|
2687 |
|
2688 | 278:
|
2689 | function(module, exports) {
|
2690 |
|
2691 |
|
2692 | var jsCommon = window.jsCommon;
|
2693 | var powerbi = window.powerbi;
|
2694 | var powerbitests = window.powerbitests;
|
2695 | var InJs = window.InJs;
|
2696 | var debug = window.debug;
|
2697 | var jasmine = window.jasmine;
|
2698 | var Microsoft = window.Microsoft;
|
2699 |
|
2700 | |
2701 |
|
2702 |
|
2703 |
|
2704 |
|
2705 |
|
2706 |
|
2707 |
|
2708 |
|
2709 |
|
2710 |
|
2711 |
|
2712 |
|
2713 |
|
2714 |
|
2715 |
|
2716 |
|
2717 |
|
2718 |
|
2719 |
|
2720 |
|
2721 |
|
2722 |
|
2723 |
|
2724 |
|
2725 |
|
2726 | var jsCommon;
|
2727 | (function (jsCommon) {
|
2728 | var Errors;
|
2729 | (function (Errors) {
|
2730 | function infoNavAppAlreadyPresent() {
|
2731 | return {
|
2732 | name: 'infoNavAppAlreadyPresent',
|
2733 | message: 'Cannot initialize embedded scenario when the InfoNav App is already present in this context',
|
2734 | stack: getExceptionStackTrace()
|
2735 | };
|
2736 | }
|
2737 | Errors.infoNavAppAlreadyPresent = infoNavAppAlreadyPresent;
|
2738 | function invalidOperation(message) {
|
2739 | return {
|
2740 | name: 'invalidOperation',
|
2741 | message: message,
|
2742 | stack: getExceptionStackTrace()
|
2743 | };
|
2744 | }
|
2745 | Errors.invalidOperation = invalidOperation;
|
2746 | function argument(argumentName, message) {
|
2747 | return {
|
2748 | name: 'invalidArgumentError',
|
2749 | argument: argumentName,
|
2750 | message: message,
|
2751 | stack: getExceptionStackTrace()
|
2752 | };
|
2753 | }
|
2754 | Errors.argument = argument;
|
2755 | function argumentNull(argumentName) {
|
2756 | return {
|
2757 | name: 'argumentNull',
|
2758 | argument: argumentName,
|
2759 | message: 'Argument was null',
|
2760 | stack: getExceptionStackTrace()
|
2761 | };
|
2762 | }
|
2763 | Errors.argumentNull = argumentNull;
|
2764 | function argumentUndefined(argumentName) {
|
2765 | return {
|
2766 | name: 'argumentUndefined',
|
2767 | argument: argumentName,
|
2768 | message: 'Argument was undefined',
|
2769 | stack: getExceptionStackTrace()
|
2770 | };
|
2771 | }
|
2772 | Errors.argumentUndefined = argumentUndefined;
|
2773 | function argumentOutOfRange(argumentName) {
|
2774 | return {
|
2775 | name: 'argumentOutOfRange',
|
2776 | argument: argumentName,
|
2777 | message: 'Argument was out of range',
|
2778 | stack: getExceptionStackTrace()
|
2779 | };
|
2780 | }
|
2781 | Errors.argumentOutOfRange = argumentOutOfRange;
|
2782 | function pureVirtualMethodException(className, methodName) {
|
2783 | return {
|
2784 | name: 'pureVirtualMethodException',
|
2785 | message: 'This method must be overriden by the derived class:' + className + '.' + methodName,
|
2786 | stack: getExceptionStackTrace()
|
2787 | };
|
2788 | }
|
2789 | Errors.pureVirtualMethodException = pureVirtualMethodException;
|
2790 | function notImplementedException(message) {
|
2791 | return {
|
2792 | name: 'notImplementedException',
|
2793 | message: message,
|
2794 | stack: getExceptionStackTrace()
|
2795 | };
|
2796 | }
|
2797 | Errors.notImplementedException = notImplementedException;
|
2798 | function getExceptionStackTrace() {
|
2799 | return getStackTrace( 2);
|
2800 | }
|
2801 | })(Errors = jsCommon.Errors || (jsCommon.Errors = {}));
|
2802 | |
2803 |
|
2804 |
|
2805 |
|
2806 |
|
2807 |
|
2808 |
|
2809 |
|
2810 | function getStackTrace(leadingFramesToRemove) {
|
2811 | if (leadingFramesToRemove === void 0) { leadingFramesToRemove = 1; }
|
2812 | var stackTrace, stackSegments;
|
2813 | try {
|
2814 |
|
2815 | throw new Error();
|
2816 | }
|
2817 | catch (error) {
|
2818 | stackTrace = error.stack;
|
2819 | if (stackTrace != null) {
|
2820 | stackSegments = stackTrace.split('\n');
|
2821 | stackSegments.splice(1, leadingFramesToRemove);
|
2822 |
|
2823 | stackTrace = stackSegments.join('\n');
|
2824 | }
|
2825 | }
|
2826 | return stackTrace;
|
2827 | }
|
2828 | jsCommon.getStackTrace = getStackTrace;
|
2829 | })(jsCommon || (jsCommon = {}));
|
2830 |
|
2831 |
|
2832 |
|
2833 | },
|
2834 |
|
2835 | 279:
|
2836 | function(module, exports) {
|
2837 |
|
2838 |
|
2839 | var jsCommon = window.jsCommon;
|
2840 | var powerbi = window.powerbi;
|
2841 | var powerbitests = window.powerbitests;
|
2842 | var InJs = window.InJs;
|
2843 | var debug = window.debug;
|
2844 | var jasmine = window.jasmine;
|
2845 | var Microsoft = window.Microsoft;
|
2846 |
|
2847 | |
2848 |
|
2849 |
|
2850 |
|
2851 |
|
2852 |
|
2853 |
|
2854 |
|
2855 |
|
2856 |
|
2857 |
|
2858 |
|
2859 |
|
2860 |
|
2861 |
|
2862 |
|
2863 |
|
2864 |
|
2865 |
|
2866 |
|
2867 |
|
2868 |
|
2869 |
|
2870 |
|
2871 |
|
2872 | $.fn.multiline = function (text) {
|
2873 | this.text(text);
|
2874 | this.html(this.html().replace(/\n/g, '<br/>'));
|
2875 | return this;
|
2876 | };
|
2877 | $.fn.togglePanelControl = function () {
|
2878 | return this.each(function () {
|
2879 | $(this).addClass("ui-accordion ui-accordion-icons ui-widget ui-helper-reset")
|
2880 | .find(".accordionHeader")
|
2881 | .addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-top ui-corner-bottom")
|
2882 | .hover(function () {
|
2883 | $(this).toggleClass("ui-state-hover");
|
2884 | })
|
2885 | .prepend('<span class="ui-icon ui-icon-triangle-1-e"></span>')
|
2886 | .click(function () {
|
2887 | $(this)
|
2888 | .toggleClass("ui-accordion-header-active ui-state-active ui-state-default ui-corner-bottom")
|
2889 | .find("> .ui-icon").toggleClass("ui-icon-triangle-1-e ui-icon-triangle-1-s").end()
|
2890 | .next().slideToggle();
|
2891 | return false;
|
2892 | })
|
2893 | .next()
|
2894 | .addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom")
|
2895 | .hide();
|
2896 | });
|
2897 | };
|
2898 |
|
2899 | var jsCommon;
|
2900 | (function (jsCommon) {
|
2901 | var JQueryConstants;
|
2902 | (function (JQueryConstants) {
|
2903 | JQueryConstants.VisibleSelector = ':visible';
|
2904 | })(JQueryConstants = jsCommon.JQueryConstants || (jsCommon.JQueryConstants = {}));
|
2905 | })(jsCommon || (jsCommon = {}));
|
2906 |
|
2907 |
|
2908 |
|
2909 | },
|
2910 |
|
2911 | 280:
|
2912 | function(module, exports) {
|
2913 |
|
2914 |
|
2915 | var jsCommon = window.jsCommon;
|
2916 | var powerbi = window.powerbi;
|
2917 | var powerbitests = window.powerbitests;
|
2918 | var InJs = window.InJs;
|
2919 | var debug = window.debug;
|
2920 | var jasmine = window.jasmine;
|
2921 | var Microsoft = window.Microsoft;
|
2922 |
|
2923 | |
2924 |
|
2925 |
|
2926 |
|
2927 |
|
2928 |
|
2929 |
|
2930 |
|
2931 |
|
2932 |
|
2933 |
|
2934 |
|
2935 |
|
2936 |
|
2937 |
|
2938 |
|
2939 |
|
2940 |
|
2941 |
|
2942 |
|
2943 |
|
2944 |
|
2945 |
|
2946 |
|
2947 |
|
2948 |
|
2949 | var jsCommon;
|
2950 | (function (jsCommon) {
|
2951 | |
2952 |
|
2953 |
|
2954 | var Lazy = (function () {
|
2955 | function Lazy(factoryMethod) {
|
2956 | jsCommon.Utility.throwIfNullOrUndefined(factoryMethod, this, 'constructor', 'factoryMethod');
|
2957 | this.factoryMethod = factoryMethod;
|
2958 | }
|
2959 | Lazy.prototype.getValue = function () {
|
2960 | if (this.factoryMethod !== null) {
|
2961 | this.value = this.factoryMethod();
|
2962 |
|
2963 | this.factoryMethod = null;
|
2964 | }
|
2965 | return this.value;
|
2966 | };
|
2967 | return Lazy;
|
2968 | }());
|
2969 | jsCommon.Lazy = Lazy;
|
2970 | })(jsCommon || (jsCommon = {}));
|
2971 |
|
2972 |
|
2973 |
|
2974 | },
|
2975 |
|
2976 | 281:
|
2977 | function(module, exports) {
|
2978 |
|
2979 |
|
2980 | var jsCommon = window.jsCommon;
|
2981 | var powerbi = window.powerbi;
|
2982 | var powerbitests = window.powerbitests;
|
2983 | var InJs = window.InJs;
|
2984 | var debug = window.debug;
|
2985 | var jasmine = window.jasmine;
|
2986 | var Microsoft = window.Microsoft;
|
2987 |
|
2988 | |
2989 |
|
2990 |
|
2991 |
|
2992 |
|
2993 |
|
2994 |
|
2995 |
|
2996 |
|
2997 |
|
2998 |
|
2999 |
|
3000 |
|
3001 |
|
3002 |
|
3003 |
|
3004 |
|
3005 |
|
3006 |
|
3007 |
|
3008 |
|
3009 |
|
3010 |
|
3011 |
|
3012 |
|
3013 |
|
3014 | var powerbi;
|
3015 | (function (powerbi) {
|
3016 | var Prototype;
|
3017 | (function (Prototype) {
|
3018 | |
3019 |
|
3020 |
|
3021 | function inherit(obj, extension) {
|
3022 | debug.assertValue(obj, 'obj');
|
3023 | function wrapCtor() { }
|
3024 | ;
|
3025 | wrapCtor.prototype = obj;
|
3026 | var inherited = new wrapCtor();
|
3027 | if (extension)
|
3028 | extension(inherited);
|
3029 | return inherited;
|
3030 | }
|
3031 | Prototype.inherit = inherit;
|
3032 | |
3033 |
|
3034 |
|
3035 |
|
3036 | function inheritSingle(obj) {
|
3037 | debug.assertValue(obj, 'obj');
|
3038 | var proto = Object.getPrototypeOf(obj);
|
3039 | if (proto === Object.prototype || proto === Array.prototype)
|
3040 | obj = inherit(obj);
|
3041 | return obj;
|
3042 | }
|
3043 | Prototype.inheritSingle = inheritSingle;
|
3044 | |
3045 |
|
3046 |
|
3047 |
|
3048 |
|
3049 | function overrideArray(prototype, override) {
|
3050 | if (!prototype)
|
3051 | return;
|
3052 | var overwritten;
|
3053 | for (var i = 0, len = prototype.length; i < len; i++) {
|
3054 | var value = override(prototype[i]);
|
3055 | if (value) {
|
3056 | if (!overwritten)
|
3057 | overwritten = inherit(prototype);
|
3058 | overwritten[i] = value;
|
3059 | }
|
3060 | }
|
3061 | return overwritten;
|
3062 | }
|
3063 | Prototype.overrideArray = overrideArray;
|
3064 | })(Prototype = powerbi.Prototype || (powerbi.Prototype = {}));
|
3065 | })(powerbi || (powerbi = {}));
|
3066 |
|
3067 |
|
3068 |
|
3069 | },
|
3070 |
|
3071 | 282:
|
3072 | function(module, exports) {
|
3073 |
|
3074 |
|
3075 | var jsCommon = window.jsCommon;
|
3076 | var powerbi = window.powerbi;
|
3077 | var powerbitests = window.powerbitests;
|
3078 | var InJs = window.InJs;
|
3079 | var debug = window.debug;
|
3080 | var jasmine = window.jasmine;
|
3081 | var Microsoft = window.Microsoft;
|
3082 |
|
3083 | |
3084 |
|
3085 |
|
3086 |
|
3087 |
|
3088 |
|
3089 |
|
3090 |
|
3091 |
|
3092 |
|
3093 |
|
3094 |
|
3095 |
|
3096 |
|
3097 |
|
3098 |
|
3099 |
|
3100 |
|
3101 |
|
3102 |
|
3103 |
|
3104 |
|
3105 |
|
3106 |
|
3107 |
|
3108 |
|
3109 |
|
3110 |
|
3111 |
|
3112 | },
|
3113 |
|
3114 | 283:
|
3115 | function(module, exports) {
|
3116 |
|
3117 |
|
3118 | var jsCommon = window.jsCommon;
|
3119 | var powerbi = window.powerbi;
|
3120 | var powerbitests = window.powerbitests;
|
3121 | var InJs = window.InJs;
|
3122 | var debug = window.debug;
|
3123 | var jasmine = window.jasmine;
|
3124 | var Microsoft = window.Microsoft;
|
3125 |
|
3126 | |
3127 |
|
3128 |
|
3129 |
|
3130 |
|
3131 |
|
3132 |
|
3133 |
|
3134 |
|
3135 |
|
3136 |
|
3137 |
|
3138 |
|
3139 |
|
3140 |
|
3141 |
|
3142 |
|
3143 |
|
3144 |
|
3145 |
|
3146 |
|
3147 |
|
3148 |
|
3149 |
|
3150 |
|
3151 |
|
3152 |
|
3153 |
|
3154 |
|
3155 | },
|
3156 |
|
3157 | 284:
|
3158 | function(module, exports) {
|
3159 |
|
3160 |
|
3161 | var jsCommon = window.jsCommon;
|
3162 | var powerbi = window.powerbi;
|
3163 | var powerbitests = window.powerbitests;
|
3164 | var InJs = window.InJs;
|
3165 | var debug = window.debug;
|
3166 | var jasmine = window.jasmine;
|
3167 | var Microsoft = window.Microsoft;
|
3168 |
|
3169 | |
3170 |
|
3171 |
|
3172 |
|
3173 |
|
3174 |
|
3175 |
|
3176 |
|
3177 |
|
3178 |
|
3179 |
|
3180 |
|
3181 |
|
3182 |
|
3183 |
|
3184 |
|
3185 |
|
3186 |
|
3187 |
|
3188 |
|
3189 |
|
3190 |
|
3191 |
|
3192 |
|
3193 |
|
3194 |
|
3195 | var jsCommon;
|
3196 | (function (jsCommon) {
|
3197 | var Formatting;
|
3198 | (function (Formatting) {
|
3199 | var regexCache;
|
3200 | |
3201 |
|
3202 |
|
3203 | function findDateFormat(value, format, cultureName) {
|
3204 | switch (format) {
|
3205 | case "m":
|
3206 |
|
3207 | format = "M";
|
3208 | break;
|
3209 | case "O":
|
3210 | case "o":
|
3211 |
|
3212 | format = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'0000'";
|
3213 | break;
|
3214 | case "R":
|
3215 | case "r":
|
3216 |
|
3217 | value = new Date(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate(), value.getUTCHours(), value.getUTCMinutes(), value.getUTCSeconds(), value.getUTCMilliseconds());
|
3218 | format = "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'";
|
3219 | break;
|
3220 | case "s":
|
3221 |
|
3222 | format = "S";
|
3223 | break;
|
3224 | case "u":
|
3225 |
|
3226 | value = new Date(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate(), value.getUTCHours(), value.getUTCMinutes(), value.getUTCSeconds(), value.getUTCMilliseconds());
|
3227 | format = "yyyy'-'MM'-'dd HH':'mm':'ss'Z'";
|
3228 | break;
|
3229 | case "U":
|
3230 |
|
3231 | value = new Date(value.getUTCFullYear(), value.getUTCMonth(), value.getUTCDate(), value.getUTCHours(), value.getUTCMinutes(), value.getUTCSeconds(), value.getUTCMilliseconds());
|
3232 | format = "F";
|
3233 | break;
|
3234 | case "y":
|
3235 | case "Y":
|
3236 |
|
3237 | switch (cultureName) {
|
3238 | case "default":
|
3239 | case "en":
|
3240 | case "en-US":
|
3241 | format = "MMMM, yyyy";
|
3242 | break;
|
3243 | default:
|
3244 | format = "Y";
|
3245 | }
|
3246 | break;
|
3247 | }
|
3248 | return { value: value, format: format };
|
3249 | }
|
3250 | Formatting.findDateFormat = findDateFormat;
|
3251 | |
3252 |
|
3253 |
|
3254 | function fixDateTimeFormat(format) {
|
3255 |
|
3256 |
|
3257 | format = format.replace(/%K/g, "zzz");
|
3258 | format = format.replace(/K/g, "zzz");
|
3259 | format = format.replace(/fffffff/g, "fff0000");
|
3260 | format = format.replace(/ffffff/g, "fff000");
|
3261 | format = format.replace(/fffff/g, "fff00");
|
3262 | format = format.replace(/ffff/g, "fff0");
|
3263 |
|
3264 |
|
3265 | format = format.replace(/yyyyy/g, "0yyyy");
|
3266 |
|
3267 |
|
3268 | format = format.replace(/(^y|^)yyy(^y|$)/g, "yyyy");
|
3269 | if (!regexCache) {
|
3270 |
|
3271 |
|
3272 |
|
3273 |
|
3274 |
|
3275 |
|
3276 | regexCache = ["d", "f", "F", "g", "h", "H", "K", "m", "M", "s", "t", "y", "z", ":", "/"].map(function (s) {
|
3277 | return { r: new RegExp("\%" + s + "(?!" + s + ")", "g"), s: s };
|
3278 | });
|
3279 | }
|
3280 | if (format.indexOf("%") !== -1 && format.length > 2) {
|
3281 | for (var i = 0; i < regexCache.length; i++) {
|
3282 | format = format.replace(regexCache[i].r, regexCache[i].s);
|
3283 | }
|
3284 | }
|
3285 | return format;
|
3286 | }
|
3287 | Formatting.fixDateTimeFormat = fixDateTimeFormat;
|
3288 | })(Formatting = jsCommon.Formatting || (jsCommon.Formatting = {}));
|
3289 | })(jsCommon || (jsCommon = {}));
|
3290 |
|
3291 |
|
3292 |
|
3293 | },
|
3294 |
|
3295 | 285:
|
3296 | function(module, exports) {
|
3297 |
|
3298 |
|
3299 | var jsCommon = window.jsCommon;
|
3300 | var powerbi = window.powerbi;
|
3301 | var powerbitests = window.powerbitests;
|
3302 | var InJs = window.InJs;
|
3303 | var debug = window.debug;
|
3304 | var jasmine = window.jasmine;
|
3305 | var Microsoft = window.Microsoft;
|
3306 |
|
3307 | |
3308 |
|
3309 |
|
3310 |
|
3311 |
|
3312 |
|
3313 |
|
3314 |
|
3315 |
|
3316 |
|
3317 |
|
3318 |
|
3319 |
|
3320 |
|
3321 |
|
3322 |
|
3323 |
|
3324 |
|
3325 |
|
3326 |
|
3327 |
|
3328 |
|
3329 |
|
3330 |
|
3331 |
|
3332 |
|
3333 | var jsCommon;
|
3334 | (function (jsCommon) {
|
3335 | var doc = document, headElement = doc.head, firstScriptInHeadElement = headElement.getElementsByTagName('script')[0], linkElement = doc.createElement('link'), scriptElement = doc.createElement('script'), styleSheetLoaded = [], javaScriptFilesLoaded = [], javaScriptFilesLoading = [];
|
3336 | linkElement.setAttribute('rel', 'stylesheet');
|
3337 | function requires(dependency, to) {
|
3338 | if (to === void 0) { to = $.noop; }
|
3339 | loadStyleSheets(dependency.cssFiles || []);
|
3340 | var scriptsToRun = dependency.javaScriptFilesWithCallback || [];
|
3341 | if (dependency.javaScriptFiles) {
|
3342 | for (var i = 0, len = dependency.javaScriptFiles.length; i < len; ++i) {
|
3343 | scriptsToRun.push({ javascriptFile: dependency.javaScriptFiles[i] });
|
3344 | }
|
3345 | }
|
3346 | loadJavaScriptFiles(scriptsToRun, to);
|
3347 | }
|
3348 | jsCommon.requires = requires;
|
3349 | |
3350 |
|
3351 |
|
3352 | function loadStyleSheets(hrefList) {
|
3353 | hrefList.forEach(function (href) {
|
3354 | if (styleSheetLoaded.indexOf(href) === -1) {
|
3355 | styleSheetLoaded.push(href);
|
3356 | loadStyleSheet(href);
|
3357 | }
|
3358 | });
|
3359 | }
|
3360 | function loadJavaScriptFiles(scripts, callback) {
|
3361 | var loadingCount = scripts.length, parsingCount = loadingCount, sourceCodeList = [];
|
3362 | function parseIfLoadingComplete() {
|
3363 | if (!--loadingCount) {
|
3364 | parseJavaScriptSourceCodes(scripts, sourceCodeList);
|
3365 | }
|
3366 | }
|
3367 | function makeCallbackIfParsingComplete() {
|
3368 | if (!--parsingCount) {
|
3369 | callback();
|
3370 | }
|
3371 | }
|
3372 | scripts.forEach(function (script, index) {
|
3373 | var file = script.javascriptFile;
|
3374 | if (javaScriptFilesLoaded.indexOf(file) === -1) {
|
3375 | if (file in javaScriptFilesLoading) {
|
3376 | javaScriptFilesLoading[file].push(function () {
|
3377 | parseIfLoadingComplete();
|
3378 | makeCallbackIfParsingComplete();
|
3379 | });
|
3380 | }
|
3381 | else {
|
3382 | javaScriptFilesLoading[file] = [function () {
|
3383 | makeCallbackIfParsingComplete();
|
3384 | }];
|
3385 | if (isExternalUrl(file)) {
|
3386 | sourceCodeList[index] = script;
|
3387 | parseIfLoadingComplete();
|
3388 | }
|
3389 | else {
|
3390 | loadJavaScriptSourceCode(file, function (sourceCode) {
|
3391 | sourceCodeList[index] = { javascriptFile: sourceCode };
|
3392 | parseIfLoadingComplete();
|
3393 | });
|
3394 | }
|
3395 | }
|
3396 | }
|
3397 | else {
|
3398 | parseIfLoadingComplete();
|
3399 | makeCallbackIfParsingComplete();
|
3400 | }
|
3401 | });
|
3402 | }
|
3403 | function loadStyleSheet(href) {
|
3404 | var link = linkElement.cloneNode();
|
3405 | link.href = href;
|
3406 | if (firstScriptInHeadElement) {
|
3407 | headElement.insertBefore(link, firstScriptInHeadElement);
|
3408 | }
|
3409 | else {
|
3410 | headElement.appendChild(link);
|
3411 | }
|
3412 | }
|
3413 | function loadJavaScriptSourceCode(src, onload) {
|
3414 | webGet(src, function () {
|
3415 | onload(this.responseText);
|
3416 | });
|
3417 | }
|
3418 | function parseJavaScript(script, onComplete) {
|
3419 | if (onComplete === void 0) { onComplete = $.noop; }
|
3420 | if (!script) {
|
3421 | onComplete();
|
3422 | return;
|
3423 | }
|
3424 | var sourceCodeOrFileName = script.javascriptFile;
|
3425 | var targetCallback = onComplete;
|
3426 | if (script.onLoadCallback) {
|
3427 | var promiseAsCallback = function () {
|
3428 | script.onLoadCallback().then(onComplete);
|
3429 | };
|
3430 | targetCallback = promiseAsCallback;
|
3431 | }
|
3432 | isExternalUrl(sourceCodeOrFileName)
|
3433 | ? loadExternalJavaScriptFile(sourceCodeOrFileName, targetCallback)
|
3434 | : parseInternalJavaScriptCode(sourceCodeOrFileName, targetCallback);
|
3435 | }
|
3436 | function parseInternalJavaScriptCode(sourceCode, onComplete) {
|
3437 | if (onComplete === void 0) { onComplete = $.noop; }
|
3438 | var script;
|
3439 | if (sourceCode) {
|
3440 | script = scriptElement.cloneNode();
|
3441 | script.setAttribute('type', 'text/javascript');
|
3442 | script.innerHTML = sourceCode;
|
3443 | headElement.appendChild(script);
|
3444 | }
|
3445 | setTimeout(onComplete, 0);
|
3446 | }
|
3447 | function loadExternalJavaScriptFile(src, onload) {
|
3448 | var script;
|
3449 | if (src) {
|
3450 | script = scriptElement.cloneNode();
|
3451 | script.setAttribute('src', src);
|
3452 | script.setAttribute('charset', 'utf-8');
|
3453 | script.onload = onload;
|
3454 | headElement.appendChild(script);
|
3455 | }
|
3456 | }
|
3457 | function parseJavaScriptSourceCodes(scripts, sourceCodeList) {
|
3458 | asyncLoop(sourceCodeList, parseJavaScript, function () {
|
3459 | scripts.forEach(function (script) {
|
3460 | var file = script.javascriptFile;
|
3461 | var listeners = javaScriptFilesLoading[file];
|
3462 | if (listeners) {
|
3463 | listeners.forEach(function (listener) {
|
3464 | listener();
|
3465 | });
|
3466 | }
|
3467 | delete javaScriptFilesLoading[file];
|
3468 | if (javaScriptFilesLoaded.indexOf(file) === -1) {
|
3469 | javaScriptFilesLoaded.push(file);
|
3470 | }
|
3471 | });
|
3472 | });
|
3473 | }
|
3474 | function webGet(src, onload, onerror) {
|
3475 | var xhr = new XMLHttpRequest();
|
3476 | try {
|
3477 | xhr.open('GET', src, true);
|
3478 | xhr.onload = onload;
|
3479 | xhr.onerror = onerror;
|
3480 | xhr.send(null);
|
3481 | }
|
3482 | catch (e) {
|
3483 | }
|
3484 | }
|
3485 | function isExternalUrl(url) {
|
3486 | var origin = location.protocol + '//' + location.host + '/';
|
3487 | return /^http[s]?:\/\/.+/i.test(url) && url.indexOf(origin) !== 0;
|
3488 | }
|
3489 | function _() {
|
3490 | var args = [];
|
3491 | for (var _i = 0; _i < arguments.length; _i++) {
|
3492 | args[_i - 0] = arguments[_i];
|
3493 | }
|
3494 | }
|
3495 | function asyncSteps() {
|
3496 | var args = [];
|
3497 | for (var _i = 0; _i < arguments.length; _i++) {
|
3498 | args[_i - 0] = arguments[_i];
|
3499 | }
|
3500 | if (args.length === 0) {
|
3501 | return;
|
3502 | }
|
3503 | var steps = [], i = args.length;
|
3504 | while (i--) {
|
3505 | (function (j) {
|
3506 | steps[j] = function () {
|
3507 | args[j](steps[j + 1] || _);
|
3508 | };
|
3509 | })(i);
|
3510 | }
|
3511 | steps[0]();
|
3512 | }
|
3513 | function asyncLoop(enumerable, func, callback) {
|
3514 | var steps = [], i = 0, len = enumerable.length;
|
3515 | for (; i < len - 1; i++) {
|
3516 | (function (i) {
|
3517 | steps[i] = function (next) {
|
3518 | func(enumerable[i], next);
|
3519 | };
|
3520 | }(i));
|
3521 | }
|
3522 | steps[len - 1] = function (next) {
|
3523 | func(enumerable[len - 1], callback);
|
3524 | };
|
3525 | asyncSteps.apply(null, steps);
|
3526 | }
|
3527 | })(jsCommon || (jsCommon = {}));
|
3528 |
|
3529 |
|
3530 |
|
3531 | },
|
3532 |
|
3533 | 286:
|
3534 | function(module, exports) {
|
3535 |
|
3536 |
|
3537 | var jsCommon = window.jsCommon;
|
3538 | var powerbi = window.powerbi;
|
3539 | var powerbitests = window.powerbitests;
|
3540 | var InJs = window.InJs;
|
3541 | var debug = window.debug;
|
3542 | var jasmine = window.jasmine;
|
3543 | var Microsoft = window.Microsoft;
|
3544 |
|
3545 | |
3546 |
|
3547 |
|
3548 |
|
3549 |
|
3550 |
|
3551 |
|
3552 |
|
3553 |
|
3554 |
|
3555 |
|
3556 |
|
3557 |
|
3558 |
|
3559 |
|
3560 |
|
3561 |
|
3562 |
|
3563 |
|
3564 |
|
3565 |
|
3566 |
|
3567 |
|
3568 |
|
3569 |
|
3570 |
|
3571 | var powerbi;
|
3572 | (function (powerbi) {
|
3573 | function createJQueryPromiseFactory() {
|
3574 | return new JQueryPromiseFactory();
|
3575 | }
|
3576 | powerbi.createJQueryPromiseFactory = createJQueryPromiseFactory;
|
3577 | |
3578 |
|
3579 |
|
3580 |
|
3581 | var JQueryPromiseFactory = (function () {
|
3582 | function JQueryPromiseFactory() {
|
3583 | }
|
3584 | JQueryPromiseFactory.prototype.defer = function () {
|
3585 | return new JQueryDeferredWrapper($.Deferred());
|
3586 | };
|
3587 | JQueryPromiseFactory.prototype.reject = function (reason) {
|
3588 | var deferred = this.defer();
|
3589 | deferred.reject(reason);
|
3590 | return deferred.promise;
|
3591 | };
|
3592 | JQueryPromiseFactory.prototype.resolve = function (value) {
|
3593 | var deferred = this.defer();
|
3594 | deferred.resolve(value);
|
3595 | return deferred.promise;
|
3596 | };
|
3597 | JQueryPromiseFactory.prototype.all = function (promises) {
|
3598 | var unwrappedPromises = jQuery.map(promises, function (value) {
|
3599 | return value && value.promise ? value.promise : value;
|
3600 | });
|
3601 | return new JQueryPromiseWrapper($.when.apply($, unwrappedPromises));
|
3602 | };
|
3603 | JQueryPromiseFactory.prototype.allSettled = function (promises) {
|
3604 | var deferred = this.defer();
|
3605 | var promiseCount = promises.length;
|
3606 | if (promiseCount > 0) {
|
3607 | var resolvedCount_1 = 0;
|
3608 | var results_1 = [];
|
3609 | var _loop_1 = function(i) {
|
3610 | promises[i].then(function (result) {
|
3611 | results_1[i] = {
|
3612 | value: result,
|
3613 | type: 0
|
3614 | };
|
3615 | }).catch(function (result) {
|
3616 | results_1[i] = {
|
3617 | value: result,
|
3618 | type: 1
|
3619 | };
|
3620 | }).finally(function () {
|
3621 | resolvedCount_1++;
|
3622 | if (resolvedCount_1 === promiseCount) {
|
3623 | deferred.resolve(results_1);
|
3624 | }
|
3625 | });
|
3626 | };
|
3627 | for (var i = 0; i < promiseCount; i++) {
|
3628 | _loop_1(i);
|
3629 | }
|
3630 | }
|
3631 | else {
|
3632 | deferred.resolve([]);
|
3633 | }
|
3634 | return deferred.promise;
|
3635 | };
|
3636 | JQueryPromiseFactory.prototype.when = function (value) {
|
3637 | var unwrappedPromise = value && value.promise ? value.promise : value;
|
3638 | return new JQueryPromiseWrapper($.when(unwrappedPromise));
|
3639 | };
|
3640 | return JQueryPromiseFactory;
|
3641 | }());
|
3642 | |
3643 |
|
3644 |
|
3645 | var JQueryDeferredWrapper = (function () {
|
3646 | function JQueryDeferredWrapper(deferred) {
|
3647 | debug.assertValue(deferred, 'deferred');
|
3648 | this.deferred = deferred;
|
3649 | this.promise = new JQueryPromiseWrapper(deferred.promise());
|
3650 | }
|
3651 | JQueryDeferredWrapper.prototype.resolve = function (value) {
|
3652 | this.deferred.resolve(value);
|
3653 | };
|
3654 | JQueryDeferredWrapper.prototype.reject = function (reason) {
|
3655 | this.deferred.reject(reason);
|
3656 | };
|
3657 | return JQueryDeferredWrapper;
|
3658 | }());
|
3659 | |
3660 |
|
3661 |
|
3662 | var JQueryPromiseWrapper = (function () {
|
3663 | function JQueryPromiseWrapper(promise) {
|
3664 | debug.assertValue(promise, 'promise');
|
3665 | this.promise = promise;
|
3666 | }
|
3667 | JQueryPromiseWrapper.prototype.then = function (a, b) {
|
3668 | return new JQueryPromiseWrapper(this.promise.then(JQueryPromiseWrapper.wrapCallback(a), JQueryPromiseWrapper.wrapCallback(b)));
|
3669 | };
|
3670 | JQueryPromiseWrapper.prototype.catch = function (callback) {
|
3671 | return this.then(null, callback);
|
3672 | };
|
3673 | JQueryPromiseWrapper.prototype.finally = function (callback) {
|
3674 | this.promise.always(JQueryPromiseWrapper.wrapCallback(callback));
|
3675 | return this;
|
3676 | };
|
3677 | |
3678 |
|
3679 |
|
3680 | JQueryPromiseWrapper.wrapCallback = function (callback) {
|
3681 | if (callback)
|
3682 | return function (arg) {
|
3683 | var value = callback(arg);
|
3684 |
|
3685 | if (value instanceof JQueryPromiseWrapper)
|
3686 | return value.promise;
|
3687 | return value;
|
3688 | };
|
3689 | return callback;
|
3690 | };
|
3691 | return JQueryPromiseWrapper;
|
3692 | }());
|
3693 | })(powerbi || (powerbi = {}));
|
3694 |
|
3695 |
|
3696 |
|
3697 | },
|
3698 |
|
3699 | 287:
|
3700 | function(module, exports) {
|
3701 |
|
3702 |
|
3703 | var jsCommon = window.jsCommon;
|
3704 | var powerbi = window.powerbi;
|
3705 | var powerbitests = window.powerbitests;
|
3706 | var InJs = window.InJs;
|
3707 | var debug = window.debug;
|
3708 | var jasmine = window.jasmine;
|
3709 | var Microsoft = window.Microsoft;
|
3710 |
|
3711 | |
3712 |
|
3713 |
|
3714 |
|
3715 |
|
3716 |
|
3717 |
|
3718 |
|
3719 |
|
3720 |
|
3721 |
|
3722 |
|
3723 |
|
3724 |
|
3725 |
|
3726 |
|
3727 |
|
3728 |
|
3729 |
|
3730 |
|
3731 |
|
3732 |
|
3733 |
|
3734 |
|
3735 |
|
3736 |
|
3737 | var powerbi;
|
3738 | (function (powerbi) {
|
3739 | var LocalStorageService = (function () {
|
3740 | function LocalStorageService() {
|
3741 | }
|
3742 | LocalStorageService.prototype.getData = function (key) {
|
3743 | try {
|
3744 | if (localStorage) {
|
3745 | var value = localStorage[key];
|
3746 | if (value) {
|
3747 | return JSON.parse(value);
|
3748 | }
|
3749 | }
|
3750 | }
|
3751 | catch (exception) { }
|
3752 | return null;
|
3753 | };
|
3754 | LocalStorageService.prototype.setData = function (key, data) {
|
3755 | try {
|
3756 | if (localStorage) {
|
3757 | localStorage[key] = JSON.stringify(data);
|
3758 | }
|
3759 | }
|
3760 | catch (e) { }
|
3761 | };
|
3762 | return LocalStorageService;
|
3763 | }());
|
3764 | var EphemeralStorageService = (function () {
|
3765 | function EphemeralStorageService(clearCacheInterval) {
|
3766 | this.cache = {};
|
3767 | this.clearCacheInterval = (clearCacheInterval != null)
|
3768 | ? clearCacheInterval
|
3769 | : EphemeralStorageService.defaultClearCacheInterval;
|
3770 | this.clearCache();
|
3771 | }
|
3772 | EphemeralStorageService.prototype.getData = function (key) {
|
3773 | return this.cache[key];
|
3774 | };
|
3775 | EphemeralStorageService.prototype.setData = function (key, data) {
|
3776 | var _this = this;
|
3777 | this.cache[key] = data;
|
3778 | if (this.clearCacheTimerId == null) {
|
3779 | this.clearCacheTimerId = setTimeout(function () { return _this.clearCache(); }, this.clearCacheInterval);
|
3780 | }
|
3781 | };
|
3782 | EphemeralStorageService.prototype.clearCache = function () {
|
3783 | this.cache = {};
|
3784 | this.clearCacheTimerId = undefined;
|
3785 | };
|
3786 | EphemeralStorageService.defaultClearCacheInterval = (1000 * 60 * 60 * 24);
|
3787 | return EphemeralStorageService;
|
3788 | }());
|
3789 | powerbi.EphemeralStorageService = EphemeralStorageService;
|
3790 | powerbi.localStorageService = new LocalStorageService();
|
3791 | powerbi.ephemeralStorageService = new EphemeralStorageService();
|
3792 | })(powerbi || (powerbi = {}));
|
3793 |
|
3794 |
|
3795 |
|
3796 | },
|
3797 |
|
3798 | 288:
|
3799 | function(module, exports) {
|
3800 |
|
3801 |
|
3802 | var jsCommon = window.jsCommon;
|
3803 | var powerbi = window.powerbi;
|
3804 | var powerbitests = window.powerbitests;
|
3805 | var InJs = window.InJs;
|
3806 | var debug = window.debug;
|
3807 | var jasmine = window.jasmine;
|
3808 | var Microsoft = window.Microsoft;
|
3809 |
|
3810 | |
3811 |
|
3812 |
|
3813 |
|
3814 |
|
3815 |
|
3816 |
|
3817 |
|
3818 |
|
3819 |
|
3820 |
|
3821 |
|
3822 |
|
3823 |
|
3824 |
|
3825 |
|
3826 |
|
3827 |
|
3828 |
|
3829 |
|
3830 |
|
3831 |
|
3832 |
|
3833 |
|
3834 |
|
3835 |
|
3836 | var jsCommon;
|
3837 | (function (jsCommon) {
|
3838 | var WordBreaker;
|
3839 | (function (WordBreaker) {
|
3840 | var SPACE = ' ';
|
3841 | var BREAKERS_REGEX = /[\s\n]+/g;
|
3842 | function search(index, content, backward) {
|
3843 | if (backward) {
|
3844 | for (var i = index - 1; i > -1; i--) {
|
3845 | if (hasBreakers(content[i]))
|
3846 | return i + 1;
|
3847 | }
|
3848 | }
|
3849 | else {
|
3850 | for (var i = index, ilen = content.length; i < ilen; i++) {
|
3851 | if (hasBreakers(content[i]))
|
3852 | return i;
|
3853 | }
|
3854 | }
|
3855 | return backward ? 0 : content.length;
|
3856 | }
|
3857 | |
3858 |
|
3859 |
|
3860 |
|
3861 |
|
3862 | function find(index, content) {
|
3863 | debug.assert(index >= 0 && index <= content.length, 'index within content string bounds');
|
3864 | var result = { start: 0, end: 0 };
|
3865 | if (content.length === 0)
|
3866 | return result;
|
3867 | result.start = search(index, content, true);
|
3868 | result.end = search(index, content, false);
|
3869 | return result;
|
3870 | }
|
3871 | WordBreaker.find = find;
|
3872 | |
3873 |
|
3874 |
|
3875 |
|
3876 | function hasBreakers(content) {
|
3877 | BREAKERS_REGEX.lastIndex = 0;
|
3878 | return BREAKERS_REGEX.test(content);
|
3879 | }
|
3880 | WordBreaker.hasBreakers = hasBreakers;
|
3881 | |
3882 |
|
3883 |
|
3884 |
|
3885 |
|
3886 | function wordCount(content) {
|
3887 | var count = 1;
|
3888 | BREAKERS_REGEX.lastIndex = 0;
|
3889 | BREAKERS_REGEX.exec(content);
|
3890 | while (BREAKERS_REGEX.lastIndex !== 0) {
|
3891 | count++;
|
3892 | BREAKERS_REGEX.exec(content);
|
3893 | }
|
3894 | return count;
|
3895 | }
|
3896 | WordBreaker.wordCount = wordCount;
|
3897 | function getMaxWordWidth(content, textWidthMeasurer, properties) {
|
3898 | var words = split(content);
|
3899 | var maxWidth = 0;
|
3900 | for (var _i = 0, words_1 = words; _i < words_1.length; _i++) {
|
3901 | var w = words_1[_i];
|
3902 | properties.text = w;
|
3903 | maxWidth = Math.max(maxWidth, textWidthMeasurer(properties));
|
3904 | }
|
3905 | return maxWidth;
|
3906 | }
|
3907 | WordBreaker.getMaxWordWidth = getMaxWordWidth;
|
3908 | function split(content) {
|
3909 | return content.split(BREAKERS_REGEX);
|
3910 | }
|
3911 | function getWidth(content, properties, textWidthMeasurer) {
|
3912 | properties.text = content;
|
3913 | return textWidthMeasurer(properties);
|
3914 | }
|
3915 | function truncate(content, properties, truncator, maxWidth) {
|
3916 | properties.text = content;
|
3917 | return truncator(properties, maxWidth);
|
3918 | }
|
3919 | |
3920 |
|
3921 |
|
3922 |
|
3923 |
|
3924 |
|
3925 |
|
3926 |
|
3927 |
|
3928 |
|
3929 |
|
3930 |
|
3931 | function splitByWidth(content, properties, textWidthMeasurer, maxWidth, maxNumLines, truncator) {
|
3932 |
|
3933 | truncator = truncator ? truncator : function (properties, maxWidth) { return properties.text; };
|
3934 | var result = [];
|
3935 | var words = split(content);
|
3936 | var usedWidth = 0;
|
3937 | var wordsInLine = [];
|
3938 | for (var _i = 0, words_2 = words; _i < words_2.length; _i++) {
|
3939 | var word = words_2[_i];
|
3940 |
|
3941 | if ((maxNumLines > 0) && (result.length >= maxNumLines - 1)) {
|
3942 | wordsInLine.push(word);
|
3943 | continue;
|
3944 | }
|
3945 |
|
3946 |
|
3947 | var wordWidth = wordsInLine.length === 0
|
3948 | ? getWidth(word, properties, textWidthMeasurer)
|
3949 | : getWidth(SPACE + word, properties, textWidthMeasurer);
|
3950 |
|
3951 |
|
3952 | if (usedWidth + wordWidth > maxWidth) {
|
3953 |
|
3954 | if (wordsInLine.length === 0) {
|
3955 | result.push(truncate(word, properties, truncator, maxWidth));
|
3956 | usedWidth = 0;
|
3957 | wordsInLine = [];
|
3958 | continue;
|
3959 | }
|
3960 | result.push(truncate(wordsInLine.join(SPACE), properties, truncator, maxWidth));
|
3961 | usedWidth = 0;
|
3962 | wordsInLine = [];
|
3963 | }
|
3964 |
|
3965 | wordsInLine.push(word);
|
3966 | usedWidth += wordWidth;
|
3967 | }
|
3968 |
|
3969 | if (!_.isEmpty(wordsInLine)) {
|
3970 | result.push(truncate(wordsInLine.join(SPACE), properties, truncator, maxWidth));
|
3971 | }
|
3972 | return result;
|
3973 | }
|
3974 | WordBreaker.splitByWidth = splitByWidth;
|
3975 | })(WordBreaker = jsCommon.WordBreaker || (jsCommon.WordBreaker = {}));
|
3976 | })(jsCommon || (jsCommon = {}));
|
3977 |
|
3978 |
|
3979 |
|
3980 | },
|
3981 |
|
3982 | 289:
|
3983 | function(module, exports) {
|
3984 |
|
3985 |
|
3986 | var jsCommon = window.jsCommon;
|
3987 | var powerbi = window.powerbi;
|
3988 | var powerbitests = window.powerbitests;
|
3989 | var InJs = window.InJs;
|
3990 | var debug = window.debug;
|
3991 | var jasmine = window.jasmine;
|
3992 | var Microsoft = window.Microsoft;
|
3993 |
|
3994 | |
3995 |
|
3996 |
|
3997 |
|
3998 |
|
3999 |
|
4000 |
|
4001 |
|
4002 |
|
4003 |
|
4004 |
|
4005 |
|
4006 |
|
4007 |
|
4008 |
|
4009 |
|
4010 |
|
4011 |
|
4012 |
|
4013 |
|
4014 |
|
4015 |
|
4016 |
|
4017 |
|
4018 |
|
4019 |
|
4020 | var powerbi;
|
4021 | (function (powerbi) {
|
4022 | var TextMeasurementService;
|
4023 | (function (TextMeasurementService) {
|
4024 | var ellipsis = '…';
|
4025 | var OverflowingText = jsCommon.CssConstants.createClassAndSelector('overflowingText');
|
4026 | var spanElement;
|
4027 | var svgTextElement;
|
4028 | var canvasCtx;
|
4029 | var fallbackFontFamily;
|
4030 | |
4031 |
|
4032 |
|
4033 | function ensureDOM() {
|
4034 | if (spanElement)
|
4035 | return;
|
4036 | spanElement = $('<span/>');
|
4037 | $('body').append(spanElement);
|
4038 |
|
4039 | svgTextElement = d3.select($('body').get(0))
|
4040 | .append('svg')
|
4041 | .style({
|
4042 | 'height': '0px',
|
4043 | 'width': '0px',
|
4044 | 'position': 'absolute'
|
4045 | })
|
4046 | .append('text');
|
4047 | canvasCtx = $('<canvas/>').get(0).getContext("2d");
|
4048 | fallbackFontFamily = window.getComputedStyle(svgTextElement.node()).fontFamily;
|
4049 | }
|
4050 | |
4051 |
|
4052 |
|
4053 | function removeSpanElement() {
|
4054 | if (spanElement && spanElement.remove) {
|
4055 | spanElement.remove();
|
4056 | }
|
4057 | spanElement = null;
|
4058 | }
|
4059 | TextMeasurementService.removeSpanElement = removeSpanElement;
|
4060 | |
4061 |
|
4062 |
|
4063 |
|
4064 |
|
4065 | function measureSvgTextWidth(textProperties, text) {
|
4066 | debug.assertValue(textProperties, 'textProperties');
|
4067 | debug.assert(_.isEmpty(textProperties.fontSize) || textProperties.fontSize.indexOf("px") !== -1, "TextProperties' text size should be in px.");
|
4068 | ensureDOM();
|
4069 | canvasCtx.font =
|
4070 | (textProperties.fontStyle || "") + " " +
|
4071 | (textProperties.fontVariant || "") + " " +
|
4072 | (textProperties.fontWeight || "") + " " +
|
4073 | textProperties.fontSize + " " +
|
4074 | (textProperties.fontFamily || fallbackFontFamily);
|
4075 | return canvasCtx.measureText(text || textProperties.text).width;
|
4076 | }
|
4077 | TextMeasurementService.measureSvgTextWidth = measureSvgTextWidth;
|
4078 | |
4079 |
|
4080 |
|
4081 |
|
4082 |
|
4083 | function measureSvgTextRect(textProperties, text) {
|
4084 | debug.assertValue(textProperties, 'textProperties');
|
4085 | debug.assert(_.isEmpty(textProperties.fontSize) || textProperties.fontSize.indexOf("px") !== -1, "TextProperties' text size should be in px.");
|
4086 | ensureDOM();
|
4087 | svgTextElement.style(null);
|
4088 | svgTextElement
|
4089 | .text(text || textProperties.text)
|
4090 | .attr({
|
4091 | 'visibility': 'hidden',
|
4092 | 'font-family': textProperties.fontFamily || fallbackFontFamily,
|
4093 | 'font-variant': textProperties.fontVariant,
|
4094 | 'font-size': textProperties.fontSize,
|
4095 | 'font-weight': textProperties.fontWeight,
|
4096 | 'font-style': textProperties.fontStyle,
|
4097 | 'white-space': textProperties.whiteSpace || 'nowrap'
|
4098 | });
|
4099 |
|
4100 |
|
4101 | return svgTextElement.node().getBBox();
|
4102 | }
|
4103 | TextMeasurementService.measureSvgTextRect = measureSvgTextRect;
|
4104 | |
4105 |
|
4106 |
|
4107 |
|
4108 |
|
4109 | function measureSvgTextHeight(textProperties, text) {
|
4110 | return measureSvgTextRect(textProperties, text).height;
|
4111 | }
|
4112 | TextMeasurementService.measureSvgTextHeight = measureSvgTextHeight;
|
4113 | |
4114 |
|
4115 |
|
4116 |
|
4117 |
|
4118 | function estimateSvgTextRect(textProperties) {
|
4119 | debug.assertValue(textProperties, 'textProperties');
|
4120 | debug.assert(_.isEmpty(textProperties.fontSize) || textProperties.fontSize.indexOf("px") !== -1, "TextProperties' text size should be in px.");
|
4121 | var propertiesKey = textProperties.fontFamily + textProperties.fontSize;
|
4122 | var rect = powerbi.ephemeralStorageService.getData(propertiesKey);
|
4123 | if (rect == null) {
|
4124 |
|
4125 |
|
4126 | var estimatedTextProperties = {
|
4127 | fontFamily: textProperties.fontFamily,
|
4128 | fontSize: textProperties.fontSize,
|
4129 | text: "M",
|
4130 | };
|
4131 | rect = TextMeasurementService.measureSvgTextRect(estimatedTextProperties);
|
4132 |
|
4133 |
|
4134 | if (rect.height > 0)
|
4135 | powerbi.ephemeralStorageService.setData(propertiesKey, rect);
|
4136 | }
|
4137 | return rect;
|
4138 | }
|
4139 | |
4140 |
|
4141 |
|
4142 |
|
4143 | function estimateSvgTextBaselineDelta(textProperties) {
|
4144 | var rect = estimateSvgTextRect(textProperties);
|
4145 | return rect.y + rect.height;
|
4146 | }
|
4147 | TextMeasurementService.estimateSvgTextBaselineDelta = estimateSvgTextBaselineDelta;
|
4148 | |
4149 |
|
4150 |
|
4151 |
|
4152 | function estimateSvgTextHeight(textProperties, tightFightForNumeric) {
|
4153 | if (tightFightForNumeric === void 0) { tightFightForNumeric = false; }
|
4154 | var height = estimateSvgTextRect(textProperties).height;
|
4155 |
|
4156 | if (tightFightForNumeric)
|
4157 | height *= 0.7;
|
4158 | return height;
|
4159 | }
|
4160 | TextMeasurementService.estimateSvgTextHeight = estimateSvgTextHeight;
|
4161 | |
4162 |
|
4163 |
|
4164 |
|
4165 | function measureSvgTextElementWidth(svgElement) {
|
4166 | debug.assertValue(svgElement, 'svgElement');
|
4167 | return measureSvgTextWidth(getSvgMeasurementProperties(svgElement));
|
4168 | }
|
4169 | TextMeasurementService.measureSvgTextElementWidth = measureSvgTextElementWidth;
|
4170 | |
4171 |
|
4172 |
|
4173 |
|
4174 | function getMeasurementProperties(element) {
|
4175 | debug.assertValue(element, 'element');
|
4176 | return {
|
4177 | text: element.val() || element.text(),
|
4178 | fontFamily: element.css('font-family'),
|
4179 | fontSize: element.css('font-size'),
|
4180 | fontWeight: element.css('font-weight'),
|
4181 | fontStyle: element.css('font-style'),
|
4182 | fontVariant: element.css('font-variant'),
|
4183 | whiteSpace: element.css('white-space')
|
4184 | };
|
4185 | }
|
4186 | TextMeasurementService.getMeasurementProperties = getMeasurementProperties;
|
4187 | |
4188 |
|
4189 |
|
4190 |
|
4191 | function getSvgMeasurementProperties(svgElement) {
|
4192 | debug.assertValue(svgElement, 'svgElement');
|
4193 | var style = window.getComputedStyle(svgElement, null);
|
4194 | return {
|
4195 | text: svgElement.textContent,
|
4196 | fontFamily: style.fontFamily,
|
4197 | fontSize: style.fontSize,
|
4198 | fontWeight: style.fontWeight,
|
4199 | fontStyle: style.fontStyle,
|
4200 | fontVariant: style.fontVariant,
|
4201 | whiteSpace: style.whiteSpace
|
4202 | };
|
4203 | }
|
4204 | TextMeasurementService.getSvgMeasurementProperties = getSvgMeasurementProperties;
|
4205 | |
4206 |
|
4207 |
|
4208 |
|
4209 | function getDivElementWidth(element) {
|
4210 | debug.assert(element.is('div'), 'Given element is not a div type. Cannot get width');
|
4211 | return getComputedStyle(element[0]).width;
|
4212 | }
|
4213 | TextMeasurementService.getDivElementWidth = getDivElementWidth;
|
4214 | |
4215 |
|
4216 |
|
4217 |
|
4218 |
|
4219 | function getTailoredTextOrDefault(textProperties, maxWidth) {
|
4220 | debug.assertValue(textProperties, 'properties');
|
4221 | debug.assertValue(textProperties.text, 'properties.text');
|
4222 | debug.assert(_.isEmpty(textProperties.fontSize) || textProperties.fontSize.indexOf("px") !== -1, "TextProperties' text size should be in px.");
|
4223 | ensureDOM();
|
4224 | var strLength = textProperties.text.length;
|
4225 | if (strLength === 0)
|
4226 | return textProperties.text;
|
4227 | var width = measureSvgTextWidth(textProperties);
|
4228 | if (width < maxWidth)
|
4229 | return textProperties.text;
|
4230 |
|
4231 | var copiedTextProperties = powerbi.Prototype.inherit(textProperties);
|
4232 |
|
4233 |
|
4234 |
|
4235 | var text = copiedTextProperties.text = ellipsis + copiedTextProperties.text;
|
4236 | var min = 1;
|
4237 | var max = text.length;
|
4238 | var i = ellipsis.length;
|
4239 | while (min <= max) {
|
4240 |
|
4241 | i = (min + max) / 2 | 0;
|
4242 | copiedTextProperties.text = text.substr(0, i);
|
4243 | width = measureSvgTextWidth(copiedTextProperties);
|
4244 | if (maxWidth > width)
|
4245 | min = i + 1;
|
4246 | else if (maxWidth < width)
|
4247 | max = i - 1;
|
4248 | else
|
4249 | break;
|
4250 | }
|
4251 |
|
4252 |
|
4253 |
|
4254 |
|
4255 | copiedTextProperties.text = text.substr(0, i);
|
4256 | width = measureSvgTextWidth(copiedTextProperties);
|
4257 | if (width > maxWidth)
|
4258 | i--;
|
4259 | return text.substr(ellipsis.length, i - ellipsis.length) + ellipsis;
|
4260 | }
|
4261 | TextMeasurementService.getTailoredTextOrDefault = getTailoredTextOrDefault;
|
4262 | |
4263 |
|
4264 |
|
4265 |
|
4266 |
|
4267 | function svgEllipsis(textElement, maxWidth) {
|
4268 | debug.assertValue(textElement, 'textElement');
|
4269 | var properties = getSvgMeasurementProperties(textElement);
|
4270 | var originalText = properties.text;
|
4271 | var tailoredText = getTailoredTextOrDefault(properties, maxWidth);
|
4272 | if (originalText !== tailoredText) {
|
4273 | textElement.textContent = tailoredText;
|
4274 | }
|
4275 | }
|
4276 | TextMeasurementService.svgEllipsis = svgEllipsis;
|
4277 | |
4278 |
|
4279 |
|
4280 |
|
4281 |
|
4282 |
|
4283 |
|
4284 |
|
4285 | function wordBreak(textElement, maxWidth, maxHeight, linePadding) {
|
4286 | if (linePadding === void 0) { linePadding = 0; }
|
4287 | debug.assertValue(textElement, 'textElement');
|
4288 | var properties = getSvgMeasurementProperties(textElement);
|
4289 | var height = estimateSvgTextHeight(properties) + linePadding;
|
4290 | var maxNumLines = Math.max(1, Math.floor(maxHeight / height));
|
4291 | var node = d3.select(textElement);
|
4292 |
|
4293 | var firstDY = node.attr('y');
|
4294 |
|
4295 | var labelText = textElement.textContent;
|
4296 | textElement.textContent = null;
|
4297 |
|
4298 | var words = jsCommon.WordBreaker.splitByWidth(labelText, properties, measureSvgTextWidth, maxWidth, maxNumLines);
|
4299 | for (var i = 0, ilen = words.length; i < ilen; i++) {
|
4300 | properties.text = words[i];
|
4301 | node
|
4302 | .append('tspan')
|
4303 | .attr({
|
4304 | 'x': 0,
|
4305 | 'dy': i === 0 ? firstDY : height,
|
4306 | })
|
4307 | .text(getTailoredTextOrDefault(properties, maxWidth));
|
4308 | }
|
4309 | }
|
4310 | TextMeasurementService.wordBreak = wordBreak;
|
4311 | |
4312 |
|
4313 |
|
4314 |
|
4315 |
|
4316 |
|
4317 |
|
4318 |
|
4319 | function wordBreakOverflowingText(textElement, maxWidth, maxHeight, linePadding) {
|
4320 | if (linePadding === void 0) { linePadding = 0; }
|
4321 | debug.assertValue(textElement, 'textElement');
|
4322 | var properties = getSvgMeasurementProperties(textElement);
|
4323 | var height = estimateSvgTextHeight(properties) + linePadding;
|
4324 | var maxNumLines = Math.max(1, Math.floor(maxHeight / height));
|
4325 |
|
4326 | var labelText = textElement.textContent;
|
4327 | textElement.textContent = null;
|
4328 |
|
4329 | var words = jsCommon.WordBreaker.splitByWidth(labelText, properties, measureSvgTextWidth, maxWidth, maxNumLines);
|
4330 | var spanItem = d3.select(textElement)
|
4331 | .selectAll(OverflowingText.selector)
|
4332 | .data(words, function (d) { return $.inArray(d, words); });
|
4333 | spanItem
|
4334 | .enter()
|
4335 | .append("span")
|
4336 | .classed(OverflowingText.class, true)
|
4337 | .text(function (d) { return d; })
|
4338 | .style("width", jsCommon.PixelConverter.toString(maxWidth));
|
4339 | }
|
4340 | TextMeasurementService.wordBreakOverflowingText = wordBreakOverflowingText;
|
4341 | })(TextMeasurementService = powerbi.TextMeasurementService || (powerbi.TextMeasurementService = {}));
|
4342 | })(powerbi || (powerbi = {}));
|
4343 |
|
4344 |
|
4345 |
|
4346 | },
|
4347 |
|
4348 | 290:
|
4349 | function(module, exports) {
|
4350 |
|
4351 |
|
4352 | var jsCommon = window.jsCommon;
|
4353 | var powerbi = window.powerbi;
|
4354 | var powerbitests = window.powerbitests;
|
4355 | var InJs = window.InJs;
|
4356 | var debug = window.debug;
|
4357 | var jasmine = window.jasmine;
|
4358 | var Microsoft = window.Microsoft;
|
4359 |
|
4360 | |
4361 |
|
4362 |
|
4363 |
|
4364 |
|
4365 |
|
4366 |
|
4367 |
|
4368 |
|
4369 |
|
4370 |
|
4371 |
|
4372 |
|
4373 |
|
4374 |
|
4375 |
|
4376 |
|
4377 |
|
4378 |
|
4379 |
|
4380 |
|
4381 |
|
4382 |
|
4383 |
|
4384 |
|
4385 |
|
4386 | var jsCommon;
|
4387 | (function (jsCommon) {
|
4388 | var DOMConstants = jsCommon.DOMConstants;
|
4389 | var KeyUtils;
|
4390 | (function (KeyUtils) {
|
4391 | function isArrowKey(keyCode) {
|
4392 | return keyCode === DOMConstants.downArrowKeyCode
|
4393 | || keyCode === DOMConstants.upArrowKeyCode
|
4394 | || keyCode === DOMConstants.leftArrowKeyCode
|
4395 | || keyCode === DOMConstants.rightArrowKeyCode;
|
4396 | }
|
4397 | KeyUtils.isArrowKey = isArrowKey;
|
4398 | function isCtrlDefaultKey(keyCode) {
|
4399 | return keyCode === DOMConstants.aKeyCode
|
4400 | || keyCode === DOMConstants.cKeyCode
|
4401 | || keyCode === DOMConstants.xKeyCode
|
4402 | || keyCode === DOMConstants.vKeyCode;
|
4403 | }
|
4404 | KeyUtils.isCtrlDefaultKey = isCtrlDefaultKey;
|
4405 | function isNudgeModifierKey(keyCode) {
|
4406 | return keyCode === DOMConstants.shiftKeyCode;
|
4407 | }
|
4408 | KeyUtils.isNudgeModifierKey = isNudgeModifierKey;
|
4409 | })(KeyUtils = jsCommon.KeyUtils || (jsCommon.KeyUtils = {}));
|
4410 | })(jsCommon || (jsCommon = {}));
|
4411 |
|
4412 |
|
4413 |
|
4414 | },
|
4415 |
|
4416 | 291:
|
4417 | function(module, exports) {
|
4418 |
|
4419 |
|
4420 | var jsCommon = window.jsCommon;
|
4421 | var powerbi = window.powerbi;
|
4422 | var powerbitests = window.powerbitests;
|
4423 | var InJs = window.InJs;
|
4424 | var debug = window.debug;
|
4425 | var jasmine = window.jasmine;
|
4426 | var Microsoft = window.Microsoft;
|
4427 |
|
4428 | |
4429 |
|
4430 |
|
4431 |
|
4432 |
|
4433 |
|
4434 |
|
4435 |
|
4436 |
|
4437 |
|
4438 |
|
4439 |
|
4440 |
|
4441 |
|
4442 |
|
4443 |
|
4444 |
|
4445 |
|
4446 |
|
4447 |
|
4448 |
|
4449 |
|
4450 |
|
4451 |
|
4452 |
|
4453 |
|
4454 | var jsCommon;
|
4455 | (function (jsCommon) {
|
4456 | |
4457 |
|
4458 |
|
4459 | var ThrottleUtility = (function () {
|
4460 | function ThrottleUtility(delay) {
|
4461 | this.timerFactory = jsCommon.TimerPromiseFactory.instance;
|
4462 | this.delay = 0;
|
4463 | if (delay) {
|
4464 | this.delay = delay;
|
4465 | }
|
4466 | }
|
4467 | ThrottleUtility.prototype.run = function (fn) {
|
4468 | var _this = this;
|
4469 | if (!this.fn) {
|
4470 | this.fn = fn;
|
4471 | this.timerFactory.create(this.delay).done(function () { return _this.timerComplete(_this.fn); });
|
4472 | }
|
4473 | else {
|
4474 | this.fn = fn;
|
4475 | }
|
4476 | };
|
4477 | |
4478 |
|
4479 |
|
4480 | ThrottleUtility.prototype.timerComplete = function (fn) {
|
4481 |
|
4482 | fn();
|
4483 |
|
4484 | this.fn = null;
|
4485 | };
|
4486 | return ThrottleUtility;
|
4487 | }());
|
4488 | jsCommon.ThrottleUtility = ThrottleUtility;
|
4489 | })(jsCommon || (jsCommon = {}));
|
4490 |
|
4491 |
|
4492 |
|
4493 | },
|
4494 |
|
4495 | 292:
|
4496 | function(module, exports) {
|
4497 |
|
4498 |
|
4499 | var jsCommon = window.jsCommon;
|
4500 | var powerbi = window.powerbi;
|
4501 | var powerbitests = window.powerbitests;
|
4502 | var InJs = window.InJs;
|
4503 | var debug = window.debug;
|
4504 | var jasmine = window.jasmine;
|
4505 | var Microsoft = window.Microsoft;
|
4506 |
|
4507 | |
4508 |
|
4509 |
|
4510 |
|
4511 |
|
4512 |
|
4513 |
|
4514 |
|
4515 |
|
4516 |
|
4517 |
|
4518 |
|
4519 |
|
4520 |
|
4521 |
|
4522 |
|
4523 |
|
4524 |
|
4525 |
|
4526 |
|
4527 |
|
4528 |
|
4529 |
|
4530 |
|
4531 |
|
4532 |
|
4533 | var jsCommon;
|
4534 | (function (jsCommon) {
|
4535 | |
4536 |
|
4537 |
|
4538 | var TimerPromiseFactory = (function () {
|
4539 | function TimerPromiseFactory() {
|
4540 | }
|
4541 | |
4542 |
|
4543 |
|
4544 | TimerPromiseFactory.prototype.create = function (delayInMs) {
|
4545 | debug.assertValue(delayInMs, 'delayInMs');
|
4546 | debug.assert(delayInMs >= 0, 'delayInMs must be a positive value.');
|
4547 | var deferred = $.Deferred();
|
4548 | window.setTimeout(function () { return deferred.resolve(); }, delayInMs);
|
4549 | return deferred;
|
4550 | };
|
4551 | TimerPromiseFactory.instance = new TimerPromiseFactory();
|
4552 | return TimerPromiseFactory;
|
4553 | }());
|
4554 | jsCommon.TimerPromiseFactory = TimerPromiseFactory;
|
4555 | })(jsCommon || (jsCommon = {}));
|
4556 |
|
4557 |
|
4558 |
|
4559 | },
|
4560 |
|
4561 | 293:
|
4562 | function(module, exports) {
|
4563 |
|
4564 |
|
4565 | var jsCommon = window.jsCommon;
|
4566 | var powerbi = window.powerbi;
|
4567 | var powerbitests = window.powerbitests;
|
4568 | var InJs = window.InJs;
|
4569 | var debug = window.debug;
|
4570 | var jasmine = window.jasmine;
|
4571 | var Microsoft = window.Microsoft;
|
4572 |
|
4573 | |
4574 |
|
4575 |
|
4576 |
|
4577 |
|
4578 |
|
4579 |
|
4580 |
|
4581 |
|
4582 |
|
4583 |
|
4584 |
|
4585 |
|
4586 |
|
4587 |
|
4588 |
|
4589 |
|
4590 |
|
4591 |
|
4592 |
|
4593 |
|
4594 |
|
4595 |
|
4596 |
|
4597 |
|
4598 |
|
4599 | var jsCommon;
|
4600 | (function (jsCommon) {
|
4601 | |
4602 |
|
4603 |
|
4604 | (function (HttpStatusCode) {
|
4605 | HttpStatusCode[HttpStatusCode["OK"] = 200] = "OK";
|
4606 | HttpStatusCode[HttpStatusCode["BadRequest"] = 400] = "BadRequest";
|
4607 | HttpStatusCode[HttpStatusCode["Unauthorized"] = 401] = "Unauthorized";
|
4608 | HttpStatusCode[HttpStatusCode["Forbidden"] = 403] = "Forbidden";
|
4609 | HttpStatusCode[HttpStatusCode["RequestEntityTooLarge"] = 413] = "RequestEntityTooLarge";
|
4610 | })(jsCommon.HttpStatusCode || (jsCommon.HttpStatusCode = {}));
|
4611 | var HttpStatusCode = jsCommon.HttpStatusCode;
|
4612 | |
4613 |
|
4614 |
|
4615 | var HttpConstants;
|
4616 | (function (HttpConstants) {
|
4617 | HttpConstants.ApplicationOctetStream = 'application/octet-stream';
|
4618 | HttpConstants.MultiPartFormData = 'multipart/form-data';
|
4619 | })(HttpConstants = jsCommon.HttpConstants || (jsCommon.HttpConstants = {}));
|
4620 | |
4621 |
|
4622 |
|
4623 | var StringExtensions;
|
4624 | (function (StringExtensions) {
|
4625 | var HtmlTagRegex = new RegExp('[<>]', 'g');
|
4626 | function format() {
|
4627 | var args = [];
|
4628 | for (var _i = 0; _i < arguments.length; _i++) {
|
4629 | args[_i - 0] = arguments[_i];
|
4630 | }
|
4631 | var s = args[0];
|
4632 | if (isNullOrUndefinedOrWhiteSpaceString(s))
|
4633 | return s;
|
4634 | for (var i = 0; i < args.length - 1; i++) {
|
4635 | var reg = new RegExp("\\{" + i + "\\}", "gm");
|
4636 | s = s.replace(reg, args[i + 1]);
|
4637 | }
|
4638 | return s;
|
4639 | }
|
4640 | StringExtensions.format = format;
|
4641 | |
4642 |
|
4643 |
|
4644 | function equalIgnoreCase(a, b) {
|
4645 | return StringExtensions.normalizeCase(a) === StringExtensions.normalizeCase(b);
|
4646 | }
|
4647 | StringExtensions.equalIgnoreCase = equalIgnoreCase;
|
4648 | function startsWithIgnoreCase(a, b) {
|
4649 | var normalizedSearchString = StringExtensions.normalizeCase(b);
|
4650 | return StringExtensions.normalizeCase(a).indexOf(normalizedSearchString) === 0;
|
4651 | }
|
4652 | StringExtensions.startsWithIgnoreCase = startsWithIgnoreCase;
|
4653 | function startsWith(a, b) {
|
4654 | return a.indexOf(b) === 0;
|
4655 | }
|
4656 | StringExtensions.startsWith = startsWith;
|
4657 |
|
4658 | function contains(source, substring) {
|
4659 | if (source == null)
|
4660 | return false;
|
4661 | return source.indexOf(substring) !== -1;
|
4662 | }
|
4663 | StringExtensions.contains = contains;
|
4664 |
|
4665 | function containsIgnoreCase(source, substring) {
|
4666 | if (source == null)
|
4667 | return false;
|
4668 | return contains(normalizeCase(source), normalizeCase(substring));
|
4669 | }
|
4670 | StringExtensions.containsIgnoreCase = containsIgnoreCase;
|
4671 | |
4672 |
|
4673 |
|
4674 |
|
4675 | function normalizeCase(value) {
|
4676 | Utility.throwIfNullOrUndefined(value, StringExtensions, 'normalizeCase', 'value');
|
4677 | return value.toUpperCase();
|
4678 | }
|
4679 | StringExtensions.normalizeCase = normalizeCase;
|
4680 | |
4681 |
|
4682 |
|
4683 |
|
4684 |
|
4685 | function isNullOrEmpty(value) {
|
4686 | return (value == null) || (value.length === 0);
|
4687 | }
|
4688 | StringExtensions.isNullOrEmpty = isNullOrEmpty;
|
4689 | |
4690 |
|
4691 |
|
4692 |
|
4693 |
|
4694 | function isNullOrUndefinedOrWhiteSpaceString(str) {
|
4695 | return StringExtensions.isNullOrEmpty(str) || StringExtensions.isNullOrEmpty(str.trim());
|
4696 | }
|
4697 | StringExtensions.isNullOrUndefinedOrWhiteSpaceString = isNullOrUndefinedOrWhiteSpaceString;
|
4698 | |
4699 |
|
4700 |
|
4701 | function containsWhitespace(str) {
|
4702 | Utility.throwIfNullOrUndefined(str, this, 'containsWhitespace', 'str');
|
4703 | var expr = /\s/;
|
4704 | return expr.test(str);
|
4705 | }
|
4706 | StringExtensions.containsWhitespace = containsWhitespace;
|
4707 | |
4708 |
|
4709 |
|
4710 | function isWhitespace(str) {
|
4711 | Utility.throwIfNullOrUndefined(str, this, 'isWhitespace', 'str');
|
4712 | return str.trim() === '';
|
4713 | }
|
4714 | StringExtensions.isWhitespace = isWhitespace;
|
4715 | |
4716 |
|
4717 |
|
4718 | function trimTrailingWhitespace(str) {
|
4719 | Utility.throwIfNullOrUndefined(str, this, 'trimTrailingWhitespace', 'str');
|
4720 | return str.replace(/\s+$/, '');
|
4721 | }
|
4722 | StringExtensions.trimTrailingWhitespace = trimTrailingWhitespace;
|
4723 | |
4724 |
|
4725 |
|
4726 | function trimWhitespace(str) {
|
4727 | Utility.throwIfNullOrUndefined(str, this, 'trimWhitespace', 'str');
|
4728 | return str.replace(/^\s+/, '').replace(/\s+$/, '');
|
4729 | }
|
4730 | StringExtensions.trimWhitespace = trimWhitespace;
|
4731 | |
4732 |
|
4733 |
|
4734 | function getLengthDifference(left, right) {
|
4735 | Utility.throwIfNullOrUndefined(left, this, 'getLengthDifference', 'left');
|
4736 | Utility.throwIfNullOrUndefined(right, this, 'getLengthDifference', 'right');
|
4737 | return Math.abs(left.length - right.length);
|
4738 | }
|
4739 | StringExtensions.getLengthDifference = getLengthDifference;
|
4740 | |
4741 |
|
4742 |
|
4743 |
|
4744 |
|
4745 | function repeat(char, count) {
|
4746 | var result = "";
|
4747 | for (var i = 0; i < count; i++) {
|
4748 | result += char;
|
4749 | }
|
4750 | return result;
|
4751 | }
|
4752 | StringExtensions.repeat = repeat;
|
4753 | |
4754 |
|
4755 |
|
4756 |
|
4757 |
|
4758 |
|
4759 | function replaceAll(text, textToFind, textToReplace) {
|
4760 | if (!textToFind)
|
4761 | return text;
|
4762 | var pattern = escapeStringForRegex(textToFind);
|
4763 | return text.replace(new RegExp(pattern, 'gi'), textToReplace);
|
4764 | }
|
4765 | StringExtensions.replaceAll = replaceAll;
|
4766 | function ensureUniqueNames(names) {
|
4767 | debug.assertValue(names, 'names');
|
4768 | var usedNames = {};
|
4769 |
|
4770 |
|
4771 | for (var _i = 0, names_1 = names; _i < names_1.length; _i++) {
|
4772 | var name_1 = names_1[_i];
|
4773 | usedNames[name_1] = false;
|
4774 | }
|
4775 | var uniqueNames = [];
|
4776 |
|
4777 | for (var _a = 0, names_2 = names; _a < names_2.length; _a++) {
|
4778 | var name_2 = names_2[_a];
|
4779 | var uniqueName = name_2;
|
4780 |
|
4781 | if (usedNames[uniqueName]) {
|
4782 | var counter = 0;
|
4783 |
|
4784 | while (usedNames[uniqueName] !== undefined) {
|
4785 | uniqueName = name_2 + "." + (++counter);
|
4786 | }
|
4787 | }
|
4788 | uniqueNames.push(uniqueName);
|
4789 | usedNames[uniqueName] = true;
|
4790 | }
|
4791 | return uniqueNames;
|
4792 | }
|
4793 | StringExtensions.ensureUniqueNames = ensureUniqueNames;
|
4794 | |
4795 |
|
4796 |
|
4797 | function findUniqueName(usedNames, baseName) {
|
4798 | debug.assertValue(usedNames, 'usedNames');
|
4799 | debug.assertValue(baseName, 'baseName');
|
4800 |
|
4801 | var i = 0, uniqueName = baseName;
|
4802 | while (usedNames[uniqueName]) {
|
4803 | uniqueName = baseName + (++i);
|
4804 | }
|
4805 | return uniqueName;
|
4806 | }
|
4807 | StringExtensions.findUniqueName = findUniqueName;
|
4808 | function constructCommaSeparatedList(list, resourceProvider, maxValue) {
|
4809 | if (!list || list.length === 0)
|
4810 | return '';
|
4811 | if (maxValue === null || maxValue === undefined)
|
4812 | maxValue = Number.MAX_VALUE;
|
4813 | var length = Math.min(maxValue, list.length);
|
4814 | var replacedList = [];
|
4815 |
|
4816 | for (var j = 0; j < 2; j++) {
|
4817 | var targetValue = '{' + j + '}';
|
4818 | var replaceValue = '_|_<' + j + '>_|_';
|
4819 | for (var i = 0; i < length; i++) {
|
4820 | if (list[i].indexOf(targetValue) > -1) {
|
4821 | list[i] = list[i].replace(targetValue, replaceValue);
|
4822 | replacedList.push({ targetValue: targetValue, replaceValue: replaceValue });
|
4823 | }
|
4824 | }
|
4825 | }
|
4826 | var commaSeparatedList = '';
|
4827 | for (var i = 0; i < length; i++) {
|
4828 | if (i === 0)
|
4829 | commaSeparatedList = list[i];
|
4830 | else
|
4831 | commaSeparatedList = StringExtensions.format(resourceProvider.get('FilterRestatement_Comma'), commaSeparatedList, list[i]);
|
4832 | }
|
4833 | for (var i = 0; i < replacedList.length; i++) {
|
4834 | commaSeparatedList = commaSeparatedList.replace(replacedList[i].replaceValue, replacedList[i].targetValue);
|
4835 | }
|
4836 | return commaSeparatedList;
|
4837 | }
|
4838 | StringExtensions.constructCommaSeparatedList = constructCommaSeparatedList;
|
4839 | function escapeStringForRegex(s) {
|
4840 | return s.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1');
|
4841 | }
|
4842 | StringExtensions.escapeStringForRegex = escapeStringForRegex;
|
4843 | |
4844 |
|
4845 |
|
4846 | function normalizeFileName(fileName) {
|
4847 | debug.assertValue(fileName, 'fileName');
|
4848 | return fileName.replace(/[\<\>\:"\/\\\|\?*]/g, '');
|
4849 | }
|
4850 | StringExtensions.normalizeFileName = normalizeFileName;
|
4851 | |
4852 |
|
4853 |
|
4854 |
|
4855 | function stringifyAsPrettyJSON(object) {
|
4856 |
|
4857 | return JSON.stringify(object );
|
4858 | }
|
4859 | StringExtensions.stringifyAsPrettyJSON = stringifyAsPrettyJSON;
|
4860 | |
4861 |
|
4862 |
|
4863 |
|
4864 | function deriveClsCompliantName(input, fallback) {
|
4865 | debug.assertValue(input, 'input');
|
4866 | var result = input.replace(/^[^A-Za-z]*/g, '').replace(/[ :\.\/\\\-\u00a0\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000]/g, '_').replace(/[\W]/g, '');
|
4867 | return result.length > 0 ? result : fallback;
|
4868 | }
|
4869 | StringExtensions.deriveClsCompliantName = deriveClsCompliantName;
|
4870 |
|
4871 | function stripTagDelimiters(s) {
|
4872 | return s.replace(HtmlTagRegex, '');
|
4873 | }
|
4874 | StringExtensions.stripTagDelimiters = stripTagDelimiters;
|
4875 | })(StringExtensions = jsCommon.StringExtensions || (jsCommon.StringExtensions = {}));
|
4876 | |
4877 |
|
4878 |
|
4879 | var Utility = (function () {
|
4880 | function Utility() {
|
4881 | }
|
4882 | |
4883 |
|
4884 |
|
4885 |
|
4886 |
|
4887 |
|
4888 |
|
4889 | Utility.throwIfNullOrUndefined = function (value, context, methodName, parameterName) {
|
4890 | if (value === null) {
|
4891 | Utility.throwException(jsCommon.Errors.argumentNull(Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4892 | }
|
4893 | else if (typeof (value) === Utility.Undefined) {
|
4894 | Utility.throwException(jsCommon.Errors.argumentUndefined(Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4895 | }
|
4896 | };
|
4897 | |
4898 |
|
4899 |
|
4900 |
|
4901 |
|
4902 |
|
4903 |
|
4904 | Utility.throwIfNullOrEmpty = function (value, context, methodName, parameterName) {
|
4905 | Utility.throwIfNullOrUndefined(value, context, methodName, parameterName);
|
4906 | if (!value.length) {
|
4907 | Utility.throwException(jsCommon.Errors.argumentOutOfRange(Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4908 | }
|
4909 | };
|
4910 | |
4911 |
|
4912 |
|
4913 |
|
4914 |
|
4915 |
|
4916 |
|
4917 | Utility.throwIfNullOrEmptyString = function (value, context, methodName, parameterName) {
|
4918 | Utility.throwIfNullOrUndefined(value, context, methodName, parameterName);
|
4919 | if (value.length < 1) {
|
4920 | Utility.throwException(jsCommon.Errors.argumentOutOfRange(Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4921 | }
|
4922 | };
|
4923 | |
4924 |
|
4925 |
|
4926 |
|
4927 |
|
4928 |
|
4929 |
|
4930 | Utility.throwIfNullEmptyOrWhitespaceString = function (value, context, methodName, parameterName) {
|
4931 | Utility.throwIfNullOrUndefined(value, context, methodName, parameterName);
|
4932 | if (StringExtensions.isNullOrUndefinedOrWhiteSpaceString(value)) {
|
4933 | Utility.throwException(jsCommon.Errors.argumentOutOfRange(Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4934 | }
|
4935 | };
|
4936 | |
4937 |
|
4938 |
|
4939 |
|
4940 |
|
4941 |
|
4942 |
|
4943 | Utility.throwIfNotTrue = function (condition, context, methodName, parameterName) {
|
4944 | if (!condition) {
|
4945 | Utility.throwException(jsCommon.Errors.argument(parameterName, Utility.getComponentName(context) + methodName + '.' + parameterName));
|
4946 | }
|
4947 | };
|
4948 | |
4949 |
|
4950 |
|
4951 |
|
4952 | Utility.isString = function (value) {
|
4953 | return ((typeof value) === 'string');
|
4954 | };
|
4955 | |
4956 |
|
4957 |
|
4958 |
|
4959 | Utility.isBoolean = function (value) {
|
4960 | return ((typeof value) === 'boolean');
|
4961 | };
|
4962 | |
4963 |
|
4964 |
|
4965 |
|
4966 | Utility.isNumber = function (value) {
|
4967 | return ((typeof value) === 'number');
|
4968 | };
|
4969 | |
4970 |
|
4971 |
|
4972 |
|
4973 | Utility.isDate = function (value) {
|
4974 | return Utility.isObject(value) && (value instanceof Date);
|
4975 | };
|
4976 | |
4977 |
|
4978 |
|
4979 |
|
4980 | Utility.isObject = function (value) {
|
4981 | return (value != null) && ((typeof value) === 'object');
|
4982 | };
|
4983 | |
4984 |
|
4985 |
|
4986 |
|
4987 | Utility.isNullOrUndefined = function (value) {
|
4988 | return (value === null) || (typeof (value) === Utility.Undefined);
|
4989 | };
|
4990 | |
4991 |
|
4992 |
|
4993 |
|
4994 |
|
4995 |
|
4996 | Utility.valueOrDefault = function (value, defaultValue) {
|
4997 | if (value != null)
|
4998 | return value;
|
4999 | return defaultValue;
|
5000 | };
|
5001 | |
5002 |
|
5003 |
|
5004 |
|
5005 |
|
5006 |
|
5007 | Utility.urlCombine = function (baseUrl, path) {
|
5008 | Utility.throwIfNullOrUndefined(baseUrl, null, "urlCombine", "baseUrl");
|
5009 | Utility.throwIfNullOrUndefined(path, null, "urlCombine", "path");
|
5010 |
|
5011 | if (StringExtensions.isNullOrUndefinedOrWhiteSpaceString(path)) {
|
5012 | return baseUrl;
|
5013 | }
|
5014 | if (StringExtensions.isNullOrUndefinedOrWhiteSpaceString(baseUrl)) {
|
5015 | return path;
|
5016 | }
|
5017 | var finalUrl = baseUrl;
|
5018 | if (finalUrl.charAt(finalUrl.length - 1) === '/') {
|
5019 | if (path.charAt(0) === '/')
|
5020 | path = path.slice(1);
|
5021 | }
|
5022 | else {
|
5023 | if (path.charAt(0) !== '/')
|
5024 | path = '/' + path;
|
5025 | }
|
5026 | return finalUrl + path;
|
5027 | };
|
5028 | Utility.getAbsoluteUri = function (path) {
|
5029 | Utility.throwIfNullOrUndefined(path, null, "getAbsoluteUri", "path");
|
5030 | var url = path;
|
5031 |
|
5032 | if (url && url.indexOf('http') === -1) {
|
5033 | url = Utility.urlCombine(clusterUri, url);
|
5034 | }
|
5035 | return url;
|
5036 | };
|
5037 | Utility.getStaticResourceUri = function (path) {
|
5038 | Utility.throwIfNullOrUndefined(path, null, "getStaticResourceUri", "path");
|
5039 | var url = path;
|
5040 |
|
5041 | if (url && url.indexOf('http') === -1) {
|
5042 | url = jsCommon.Utility.urlCombine(Utility.staticContentLocation, url);
|
5043 | }
|
5044 | return url;
|
5045 | };
|
5046 | Utility.getComponentName = function (context) {
|
5047 | return !context ? '' : (typeof context).toString() + '.';
|
5048 | };
|
5049 | Utility.throwException = function (e) {
|
5050 | jsCommon.Trace.error(StringExtensions.format("Throwing exception: {0}", JSON.stringify(e)),
|
5051 | e.stack != null ? false : true);
|
5052 | throw e;
|
5053 | };
|
5054 | Utility.createClassSelector = function (className) {
|
5055 | Utility.throwIfNullOrEmptyString(className, null, 'CreateClassSelector', 'className');
|
5056 | return '.' + className;
|
5057 | };
|
5058 | Utility.createIdSelector = function (id) {
|
5059 | Utility.throwIfNullOrEmptyString(id, null, 'CreateIdSelector', 'id');
|
5060 | return '#' + id;
|
5061 | };
|
5062 | |
5063 |
|
5064 |
|
5065 |
|
5066 | Utility.generateGuid = function () {
|
5067 | var guid = "", idx = 0;
|
5068 | for (idx = 0; idx < 32; idx += 1) {
|
5069 | var guidDigitsItem = Math.random() * 16 | 0;
|
5070 | switch (idx) {
|
5071 | case 8:
|
5072 | case 12:
|
5073 | case 16:
|
5074 | case 20:
|
5075 | guid += "-";
|
5076 | break;
|
5077 | }
|
5078 | guid += guidDigitsItem.toString(16);
|
5079 | }
|
5080 | return guid;
|
5081 | };
|
5082 | |
5083 |
|
5084 |
|
5085 | Utility.getCookieValue = function (key) {
|
5086 |
|
5087 |
|
5088 | var keyValuePairs = document.cookie.split(';');
|
5089 | for (var i = 0; i < keyValuePairs.length; i++) {
|
5090 | var keyValue = keyValuePairs[i];
|
5091 | var split = keyValue.split('=');
|
5092 | if (split.length > 0 && split[0].trim() === key) {
|
5093 | return keyValue.substr(keyValue.indexOf('=') + 1);
|
5094 | }
|
5095 | }
|
5096 | return null;
|
5097 | };
|
5098 | |
5099 |
|
5100 |
|
5101 |
|
5102 |
|
5103 | Utility.getDomainForUrl = function (url) {
|
5104 | var hrefObject = Utility.getHrefObjectFromUrl(url);
|
5105 | return hrefObject.prop('protocol') + '//' + hrefObject.prop('hostname');
|
5106 | };
|
5107 | |
5108 |
|
5109 |
|
5110 |
|
5111 |
|
5112 | Utility.getHostNameForUrl = function (url) {
|
5113 | var hrefObject = Utility.getHrefObjectFromUrl(url);
|
5114 | return Utility.urlCombine(hrefObject.prop('hostname'), hrefObject.prop('pathname'));
|
5115 | };
|
5116 | |
5117 |
|
5118 |
|
5119 |
|
5120 |
|
5121 | Utility.getUrlWithoutQueryString = function (url) {
|
5122 | var hrefObject = Utility.getHrefObjectFromUrl(url);
|
5123 | return hrefObject.prop('protocol') + '//' + Utility.urlCombine(hrefObject.prop('host'), hrefObject.prop('pathname'));
|
5124 | };
|
5125 | |
5126 |
|
5127 |
|
5128 |
|
5129 |
|
5130 | Utility.getProtocolFromUrl = function (url) {
|
5131 | return Utility.getHrefObjectFromUrl(url).prop('protocol').replace(':', '');
|
5132 | };
|
5133 | |
5134 |
|
5135 |
|
5136 |
|
5137 |
|
5138 | Utility.getHrefObjectFromUrl = function (url) {
|
5139 | var aObject = $('<a>');
|
5140 | aObject = aObject.prop('href', url);
|
5141 | return aObject;
|
5142 | };
|
5143 | |
5144 |
|
5145 |
|
5146 |
|
5147 |
|
5148 | Utility.convertWcfToJsDictionary = function (wcfDictionary) {
|
5149 |
|
5150 |
|
5151 |
|
5152 |
|
5153 | var result = {};
|
5154 | for (var i = 0; i < wcfDictionary.length; i++) {
|
5155 | var keyValuePair = wcfDictionary[i];
|
5156 | result[keyValuePair['Key']] = keyValuePair['Value'];
|
5157 | }
|
5158 | return result;
|
5159 | };
|
5160 | Utility.getDateFromWcfJsonString = function (jsonDate, fromUtcMilliseconds) {
|
5161 | if (StringExtensions.isNullOrEmpty(jsonDate)) {
|
5162 | return null;
|
5163 | }
|
5164 | var begIndex = jsonDate.indexOf('(');
|
5165 | var endIndex = jsonDate.indexOf(')');
|
5166 | if (begIndex !== -1 && endIndex !== -1) {
|
5167 | var milliseconds = parseInt(jsonDate.substring(begIndex + 1, endIndex), 10);
|
5168 | if (fromUtcMilliseconds) {
|
5169 | return new Date(milliseconds);
|
5170 | }
|
5171 | else {
|
5172 | var retValue = new Date(0);
|
5173 | retValue.setUTCMilliseconds(milliseconds);
|
5174 | return retValue;
|
5175 | }
|
5176 | }
|
5177 | return null;
|
5178 | };
|
5179 | |
5180 |
|
5181 |
|
5182 |
|
5183 |
|
5184 | Utility.getOuterHtml = function (content) {
|
5185 | return $('<div>').append(content).html();
|
5186 | };
|
5187 | |
5188 |
|
5189 |
|
5190 |
|
5191 |
|
5192 |
|
5193 | Utility.compareInt = function (a, b) {
|
5194 | return a - b;
|
5195 | };
|
5196 | |
5197 |
|
5198 |
|
5199 |
|
5200 |
|
5201 | Utility.getIndexOfMinValue = function (a) {
|
5202 | var retValue = 0;
|
5203 | var currentMinValue = a[0];
|
5204 | for (var i = 0; i < a.length; i++) {
|
5205 | if (a[i] < currentMinValue) {
|
5206 | currentMinValue = a[i];
|
5207 | retValue = i;
|
5208 | }
|
5209 | }
|
5210 | return retValue;
|
5211 | };
|
5212 | |
5213 |
|
5214 |
|
5215 |
|
5216 |
|
5217 | Utility.extractUrlFromCssBackgroundImage = function (input) {
|
5218 | return input.replace(/"/g, "").replace(/url\(|\)$/ig, "");
|
5219 | };
|
5220 | |
5221 |
|
5222 |
|
5223 | Utility.isValidImageDataUrl = function (url) {
|
5224 | var regex = new RegExp('data:(image\/(png|jpg|jpeg|gif|svg))');
|
5225 | return regex.test(url);
|
5226 | };
|
5227 | Utility.isLocalUrl = function (url) {
|
5228 | return _.startsWith(url, "data:") || _.startsWith(url, "blob:");
|
5229 | };
|
5230 | |
5231 |
|
5232 |
|
5233 |
|
5234 |
|
5235 | Utility.saveAsFile = function (content, fileName) {
|
5236 | var contentBlob = new Blob([content], { type: HttpConstants.ApplicationOctetStream });
|
5237 | var url = window['webkitURL'] || URL;
|
5238 | var urlLink = url.createObjectURL(contentBlob);
|
5239 | var fileNameLink = fileName || urlLink;
|
5240 |
|
5241 | if (window.navigator.msSaveOrOpenBlob) {
|
5242 | window.navigator.msSaveOrOpenBlob(contentBlob, fileNameLink);
|
5243 | return;
|
5244 | }
|
5245 |
|
5246 |
|
5247 |
|
5248 | var hyperlink = document.createElement('a');
|
5249 | hyperlink.href = urlLink;
|
5250 | hyperlink.target = '_blank';
|
5251 | hyperlink['download'] = fileNameLink;
|
5252 | document.body.appendChild(hyperlink);
|
5253 | hyperlink.click();
|
5254 | document.body.removeChild(hyperlink);
|
5255 | };
|
5256 | |
5257 |
|
5258 |
|
5259 |
|
5260 |
|
5261 | Utility.getType = function (obj) {
|
5262 | Utility.throwIfNullEmptyOrWhitespaceString(obj.__type, this, 'getType', 'obj');
|
5263 | var parts = obj.__type.split(":");
|
5264 | if (parts.length !== 2) {
|
5265 | jsCommon.Errors.argument("obj.__type", "Type String not in expected format [Type]#[Namespace]: " + obj.__type);
|
5266 | }
|
5267 | if (parts[1] !== Utility.TypeNamespace) {
|
5268 | jsCommon.Errors.argument("obj.__type", "Type Namespace not expected: " + parts[1]);
|
5269 | }
|
5270 | return parts[0];
|
5271 | };
|
5272 | |
5273 |
|
5274 |
|
5275 |
|
5276 |
|
5277 |
|
5278 | Utility.isEventSupported = function (eventName, element) {
|
5279 | eventName = 'on' + eventName;
|
5280 | var isSupported = (eventName in element);
|
5281 | if (!isSupported) {
|
5282 |
|
5283 | if (!element.setAttribute) {
|
5284 | element = document.createElement('div');
|
5285 | }
|
5286 | if (element.setAttribute && element.removeAttribute) {
|
5287 | element.setAttribute(eventName, '');
|
5288 | isSupported = typeof element[eventName] === 'function';
|
5289 |
|
5290 | if (typeof element[eventName] !== 'undefined') {
|
5291 | element[eventName] = null;
|
5292 | }
|
5293 | element.removeAttribute(eventName);
|
5294 | }
|
5295 | }
|
5296 | element = null;
|
5297 | return isSupported;
|
5298 | };
|
5299 | Utility.toPixel = function (pixelAmount) {
|
5300 | Utility.throwIfNullOrUndefined(pixelAmount, this, "toPixel", "pixelAmount");
|
5301 | return pixelAmount.toString() + jsCommon.CssConstants.pixelUnits;
|
5302 | };
|
5303 | Utility.getPropertyCount = function (object) {
|
5304 | Utility.throwIfNullOrUndefined(object, this, "getPropertyCount", "object");
|
5305 | return Object.getOwnPropertyNames(object).length;
|
5306 | };
|
5307 | |
5308 |
|
5309 |
|
5310 |
|
5311 |
|
5312 | Utility.getFileExtension = function (filePath) {
|
5313 | if (filePath) {
|
5314 | var index = filePath.lastIndexOf('.');
|
5315 | if (index >= 0)
|
5316 | return filePath.substr(index + 1);
|
5317 | }
|
5318 | return '';
|
5319 | };
|
5320 | |
5321 |
|
5322 |
|
5323 |
|
5324 |
|
5325 | Utility.extractFileNameFromPath = function (filePath) {
|
5326 | return filePath.replace(/^.*[\\\/]/, '');
|
5327 | };
|
5328 | |
5329 |
|
5330 |
|
5331 |
|
5332 |
|
5333 |
|
5334 |
|
5335 | Utility.canUseClipboard = function () {
|
5336 | return (typeof MSApp === "undefined");
|
5337 | };
|
5338 | Utility.is64BitOperatingSystem = function () {
|
5339 | return navigator.userAgent.indexOf("WOW64") !== -1 ||
|
5340 | navigator.userAgent.indexOf("Win64") !== -1;
|
5341 | };
|
5342 | Utility.parseNumber = function (value, defaultValue) {
|
5343 | if (value === null)
|
5344 | return null;
|
5345 | if (value === undefined)
|
5346 | return defaultValue;
|
5347 | var result = Number(value);
|
5348 | if (isFinite(result))
|
5349 | return result;
|
5350 | if (isNaN(result) && !(typeof value === "number" || value === "NaN"))
|
5351 | return defaultValue;
|
5352 | return result;
|
5353 | };
|
5354 | Utility.getURLParamValue = function (name) {
|
5355 | var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
|
5356 | if (results == null) {
|
5357 | return null;
|
5358 | }
|
5359 | else {
|
5360 | return results[1] || 0;
|
5361 | }
|
5362 | };
|
5363 | |
5364 |
|
5365 |
|
5366 |
|
5367 |
|
5368 |
|
5369 |
|
5370 | Utility.getLocalTimeZoneString = function () {
|
5371 | var timeSummer = new Date(Date.UTC(2005, 6, 30, 0, 0, 0, 0));
|
5372 | var summerOffset = -1 * timeSummer.getTimezoneOffset();
|
5373 | var timeWinter = new Date(Date.UTC(2005, 12, 30, 0, 0, 0, 0));
|
5374 | var winterOffset = -1 * timeWinter.getTimezoneOffset();
|
5375 | var localTimeZoneString;
|
5376 | if (-720 === summerOffset && -720 === winterOffset) {
|
5377 | localTimeZoneString = 'Dateline Standard Time';
|
5378 | }
|
5379 | else if (-660 === summerOffset && -660 === winterOffset) {
|
5380 | localTimeZoneString = 'UTC-11';
|
5381 | }
|
5382 | else if (-660 === summerOffset && -660 === winterOffset) {
|
5383 | localTimeZoneString = 'Samoa Standard Time';
|
5384 | }
|
5385 | else if (-600 === summerOffset && -600 === winterOffset) {
|
5386 | localTimeZoneString = 'Hawaiian Standard Time';
|
5387 | }
|
5388 | else if (-480 === summerOffset && -540 === winterOffset) {
|
5389 | localTimeZoneString = 'Alaskan Standard Time';
|
5390 | }
|
5391 | else if (-420 === summerOffset && -480 === winterOffset) {
|
5392 | localTimeZoneString = 'Pacific Standard Time';
|
5393 | }
|
5394 | else if (-420 === summerOffset && -420 === winterOffset) {
|
5395 | localTimeZoneString = 'US Mountain Standard Time';
|
5396 | }
|
5397 | else if (-360 === summerOffset && -420 === winterOffset) {
|
5398 | localTimeZoneString = 'Mountain Standard Time';
|
5399 | }
|
5400 | else if (-360 === summerOffset && -360 === winterOffset) {
|
5401 | localTimeZoneString = 'Central America Standard Time';
|
5402 | }
|
5403 | else if (-300 === summerOffset && -360 === winterOffset) {
|
5404 | localTimeZoneString = 'Central Standard Time';
|
5405 | }
|
5406 | else if (-300 === summerOffset && -300 === winterOffset) {
|
5407 | localTimeZoneString = 'SA Pacific Standard Time';
|
5408 | }
|
5409 | else if (-240 === summerOffset && -300 === winterOffset) {
|
5410 | localTimeZoneString = 'Eastern Standard Time';
|
5411 | }
|
5412 | else if (-270 === summerOffset && -270 === winterOffset) {
|
5413 | localTimeZoneString = 'Venezuela Standard Time';
|
5414 | }
|
5415 | else if (-240 === summerOffset && -240 === winterOffset) {
|
5416 | localTimeZoneString = 'SA Western Standard Time';
|
5417 | }
|
5418 | else if (-240 === summerOffset && -180 === winterOffset) {
|
5419 | localTimeZoneString = 'Central Brazilian Standard Time';
|
5420 | }
|
5421 | else if (-180 === summerOffset && -240 === winterOffset) {
|
5422 | localTimeZoneString = 'Atlantic Standard Time';
|
5423 | }
|
5424 | else if (-180 === summerOffset && -180 === winterOffset) {
|
5425 | localTimeZoneString = 'Montevideo Standard Time';
|
5426 | }
|
5427 | else if (-180 === summerOffset && -120 === winterOffset) {
|
5428 | localTimeZoneString = 'E. South America Standard Time';
|
5429 | }
|
5430 | else if (-150 === summerOffset && -210 === winterOffset) {
|
5431 | localTimeZoneString = 'Mid-Atlantic Standard Time';
|
5432 | }
|
5433 | else if (-120 === summerOffset && -120 === winterOffset) {
|
5434 | localTimeZoneString = 'SA Eastern Standard Time';
|
5435 | }
|
5436 | else if (0 === summerOffset && 0 === winterOffset) {
|
5437 | localTimeZoneString = 'UTC';
|
5438 | }
|
5439 | else if (60 === summerOffset && 0 === winterOffset) {
|
5440 | localTimeZoneString = 'GMT Standard Time';
|
5441 | }
|
5442 | else if (60 === summerOffset && 120 === winterOffset) {
|
5443 | localTimeZoneString = 'Namibia Standard Time';
|
5444 | }
|
5445 | else if (120 === summerOffset && 60 === winterOffset) {
|
5446 | localTimeZoneString = 'Romance Standard Time';
|
5447 | }
|
5448 | else if (120 === summerOffset && 120 === winterOffset) {
|
5449 | localTimeZoneString = 'South Africa Standard Time';
|
5450 | }
|
5451 | else if (180 === summerOffset && 120 === winterOffset) {
|
5452 | localTimeZoneString = 'GTB Standard Time';
|
5453 | }
|
5454 | else if (180 === summerOffset && 180 === winterOffset) {
|
5455 | localTimeZoneString = 'E. Africa Standard Time';
|
5456 | }
|
5457 | else if (240 === summerOffset && 180 === winterOffset) {
|
5458 | localTimeZoneString = 'Russian Standard Time';
|
5459 | }
|
5460 | else if (240 === summerOffset && 240 === winterOffset) {
|
5461 | localTimeZoneString = 'Arabian Standard Time';
|
5462 | }
|
5463 | else if (270 === summerOffset && 210 === winterOffset) {
|
5464 | localTimeZoneString = 'Iran Standard Time';
|
5465 | }
|
5466 | else if (270 === summerOffset && 270 === winterOffset) {
|
5467 | localTimeZoneString = 'Afghanistan Standard Time';
|
5468 | }
|
5469 | else if (300 === summerOffset && 240 === winterOffset) {
|
5470 | localTimeZoneString = 'Pakistan Standard Time';
|
5471 | }
|
5472 | else if (300 === summerOffset && 300 === winterOffset) {
|
5473 | localTimeZoneString = 'West Asia Standard Time';
|
5474 | }
|
5475 | else if (330 === summerOffset && 330 === winterOffset) {
|
5476 | localTimeZoneString = 'India Standard Time';
|
5477 | }
|
5478 | else if (345 === summerOffset && 345 === winterOffset) {
|
5479 | localTimeZoneString = 'Nepal Standard Time';
|
5480 | }
|
5481 | else if (360 === summerOffset && 300 === winterOffset) {
|
5482 | localTimeZoneString = 'N. Central Asia Standard Time';
|
5483 | }
|
5484 | else if (360 === summerOffset && 360 === winterOffset) {
|
5485 | localTimeZoneString = 'Central Asia Standard Time';
|
5486 | }
|
5487 | else if (390 === summerOffset && 390 === winterOffset) {
|
5488 | localTimeZoneString = 'Myanmar Standard Time';
|
5489 | }
|
5490 | else if (420 === summerOffset && 360 === winterOffset) {
|
5491 | localTimeZoneString = 'North Asia Standard Time';
|
5492 | }
|
5493 | else if (420 === summerOffset && 420 === winterOffset) {
|
5494 | localTimeZoneString = 'SE Asia Standard Time';
|
5495 | }
|
5496 | else if (480 === summerOffset && 420 === winterOffset) {
|
5497 | localTimeZoneString = 'North Asia East Standard Time';
|
5498 | }
|
5499 | else if (480 === summerOffset && 480 === winterOffset) {
|
5500 | localTimeZoneString = 'China Standard Time';
|
5501 | }
|
5502 | else if (540 === summerOffset && 480 === winterOffset) {
|
5503 | localTimeZoneString = 'Yakutsk Standard Time';
|
5504 | }
|
5505 | else if (540 === summerOffset && 540 === winterOffset) {
|
5506 | localTimeZoneString = 'Tokyo Standard Time';
|
5507 | }
|
5508 | else if (570 === summerOffset && 570 === winterOffset) {
|
5509 | localTimeZoneString = 'Cen. Australia Standard Time';
|
5510 | }
|
5511 | else if (600 === summerOffset && 600 === winterOffset) {
|
5512 | localTimeZoneString = 'E. Australia Standard Time';
|
5513 | }
|
5514 | else if (600 === summerOffset && 660 === winterOffset) {
|
5515 | localTimeZoneString = 'AUS Eastern Standard Time';
|
5516 | }
|
5517 | else if (660 === summerOffset && 600 === winterOffset) {
|
5518 | localTimeZoneString = 'Tasmania Standard Time';
|
5519 | }
|
5520 | else if (660 === summerOffset && 660 === winterOffset) {
|
5521 | localTimeZoneString = 'West Pacific Standard Time';
|
5522 | }
|
5523 | else if (690 === summerOffset && 690 === winterOffset) {
|
5524 | localTimeZoneString = 'Central Pacific Standard Time';
|
5525 | }
|
5526 | else if (720 === summerOffset && 660 === winterOffset) {
|
5527 | localTimeZoneString = 'Magadan Standard Time';
|
5528 | }
|
5529 | else if (720 === summerOffset && 720 === winterOffset) {
|
5530 | localTimeZoneString = 'Fiji Standard Time';
|
5531 | }
|
5532 | else if (720 === summerOffset && 780 === winterOffset) {
|
5533 | localTimeZoneString = 'New Zealand Standard Time';
|
5534 | }
|
5535 | else if (780 === summerOffset && 780 === winterOffset) {
|
5536 | localTimeZoneString = 'Tonga Standard Time';
|
5537 | }
|
5538 | else {
|
5539 | localTimeZoneString = 'UTC';
|
5540 | }
|
5541 | return localTimeZoneString;
|
5542 | };
|
5543 | Utility.TypeNamespace = 'http://schemas.microsoft.com/sqlbi/2013/01/NLRuntimeService';
|
5544 | Utility.JsonContentType = 'application/json';
|
5545 | Utility.JpegContentType = 'image/jpeg';
|
5546 | Utility.XJavascriptContentType = 'application/x-javascript';
|
5547 | Utility.JsonDataType = 'json';
|
5548 | Utility.BlobDataType = 'blob';
|
5549 | Utility.HttpGetMethod = 'GET';
|
5550 | Utility.HttpPostMethod = 'POST';
|
5551 | Utility.HttpPutMethod = 'PUT';
|
5552 | Utility.HttpDeleteMethod = 'DELETE';
|
5553 | Utility.HttpContentTypeHeader = 'Content-Type';
|
5554 | Utility.HttpAcceptHeader = 'Accept';
|
5555 | Utility.Undefined = 'undefined';
|
5556 | Utility.staticContentLocation = window.location.protocol + '//' + window.location.host;
|
5557 | return Utility;
|
5558 | }());
|
5559 | jsCommon.Utility = Utility;
|
5560 | var VersionUtility = (function () {
|
5561 | function VersionUtility() {
|
5562 | }
|
5563 | |
5564 |
|
5565 |
|
5566 |
|
5567 |
|
5568 |
|
5569 | VersionUtility.compareVersions = function (versionA, versionB) {
|
5570 | var a = versionA.split('.').map(parseFloat);
|
5571 | var b = versionB.split('.').map(parseFloat);
|
5572 | var versionParts = Math.max(a.length, b.length);
|
5573 | for (var i = 0; i < versionParts; i++) {
|
5574 | var partA = a[i] || 0;
|
5575 | var partB = b[i] || 0;
|
5576 | if (partA > partB)
|
5577 | return 1;
|
5578 | if (partA < partB)
|
5579 | return -1;
|
5580 | }
|
5581 | return 0;
|
5582 | };
|
5583 | return VersionUtility;
|
5584 | }());
|
5585 | jsCommon.VersionUtility = VersionUtility;
|
5586 | var PerformanceUtil;
|
5587 | (function (PerformanceUtil) {
|
5588 | var PerfMarker = (function () {
|
5589 | function PerfMarker(name) {
|
5590 | this._name = name;
|
5591 | this._start = PerfMarker.begin(name);
|
5592 | }
|
5593 | PerfMarker.begin = function (name) {
|
5594 | if (window.performance === undefined || performance.mark === undefined)
|
5595 | return;
|
5596 | if (console.time) {
|
5597 | console.time(name);
|
5598 | }
|
5599 | name = 'Begin ' + name;
|
5600 | performance.mark(name);
|
5601 | return name;
|
5602 | };
|
5603 | PerfMarker.prototype.end = function () {
|
5604 | if (window.performance === undefined || performance.mark === undefined || performance.measure === undefined)
|
5605 | return;
|
5606 | var name = this._name;
|
5607 | var end = 'End ' + name;
|
5608 | performance.mark(end);
|
5609 | performance.measure(name, this._start, end);
|
5610 | if (console.timeEnd) {
|
5611 | console.timeEnd(name);
|
5612 | }
|
5613 | };
|
5614 | return PerfMarker;
|
5615 | }());
|
5616 | PerformanceUtil.PerfMarker = PerfMarker;
|
5617 | function create(name) {
|
5618 | return new PerfMarker(name);
|
5619 | }
|
5620 | PerformanceUtil.create = create;
|
5621 | })(PerformanceUtil = jsCommon.PerformanceUtil || (jsCommon.PerformanceUtil = {}));
|
5622 | var DeferUtility;
|
5623 | (function (DeferUtility) {
|
5624 | |
5625 |
|
5626 |
|
5627 |
|
5628 |
|
5629 |
|
5630 | function deferUntilNextFrame(callback) {
|
5631 | var isWaiting, args, context;
|
5632 | if (!window.requestAnimationFrame) {
|
5633 | window.requestAnimationFrame = function (func) { return setTimeout(func, 1000 / 50); };
|
5634 | }
|
5635 | return function () {
|
5636 | if (!isWaiting) {
|
5637 | isWaiting = true;
|
5638 | args = arguments;
|
5639 | context = this;
|
5640 | window.requestAnimationFrame(function () {
|
5641 | isWaiting = false;
|
5642 | callback.apply(context, args);
|
5643 | });
|
5644 | }
|
5645 | };
|
5646 | }
|
5647 | DeferUtility.deferUntilNextFrame = deferUntilNextFrame;
|
5648 | })(DeferUtility = jsCommon.DeferUtility || (jsCommon.DeferUtility = {}));
|
5649 | })(jsCommon || (jsCommon = {}));
|
5650 |
|
5651 |
|
5652 |
|
5653 | },
|
5654 |
|
5655 | 294:
|
5656 | function(module, exports) {
|
5657 |
|
5658 |
|
5659 | var jsCommon = window.jsCommon;
|
5660 | var powerbi = window.powerbi;
|
5661 | var powerbitests = window.powerbitests;
|
5662 | var InJs = window.InJs;
|
5663 | var debug = window.debug;
|
5664 | var jasmine = window.jasmine;
|
5665 | var Microsoft = window.Microsoft;
|
5666 |
|
5667 | |
5668 |
|
5669 |
|
5670 |
|
5671 |
|
5672 |
|
5673 |
|
5674 |
|
5675 |
|
5676 |
|
5677 |
|
5678 |
|
5679 |
|
5680 |
|
5681 |
|
5682 |
|
5683 |
|
5684 |
|
5685 |
|
5686 |
|
5687 |
|
5688 |
|
5689 |
|
5690 |
|
5691 |
|
5692 |
|
5693 | var jsCommon;
|
5694 | (function (jsCommon) {
|
5695 | var TraceItem = (function () {
|
5696 | function TraceItem(text, type, sessionId, requestId) {
|
5697 | this.text = text;
|
5698 | this.type = type;
|
5699 | this.sessionId = sessionId;
|
5700 | this.requestId = requestId;
|
5701 | this.timeStamp = new Date();
|
5702 | }
|
5703 | TraceItem.prototype.toString = function () {
|
5704 | var resultString = '';
|
5705 | resultString += (jsCommon.StringExtensions.format('{0} ({1}): {2}', TraceItem.traceTypeStrings[this.type], this.timeStamp.toUTCString(), this.text));
|
5706 | if (this.requestId)
|
5707 | resultString += ('\n(Request id: ' + this.requestId + ')');
|
5708 | return resultString;
|
5709 | };
|
5710 | TraceItem.traceTypeStrings = [
|
5711 | 'INFORMATION',
|
5712 | 'VERBOSE',
|
5713 | 'WARNING',
|
5714 | 'ERROR',
|
5715 | 'EXPECTEDERROR',
|
5716 | 'UNEXPECTEDERROR',
|
5717 | 'FATAL',
|
5718 | ];
|
5719 | return TraceItem;
|
5720 | }());
|
5721 | jsCommon.TraceItem = TraceItem;
|
5722 | })(jsCommon || (jsCommon = {}));
|
5723 |
|
5724 |
|
5725 |
|
5726 | },
|
5727 |
|
5728 | 295:
|
5729 | function(module, exports) {
|
5730 |
|
5731 |
|
5732 | var jsCommon = window.jsCommon;
|
5733 | var powerbi = window.powerbi;
|
5734 | var powerbitests = window.powerbitests;
|
5735 | var InJs = window.InJs;
|
5736 | var debug = window.debug;
|
5737 | var jasmine = window.jasmine;
|
5738 | var Microsoft = window.Microsoft;
|
5739 |
|
5740 | |
5741 |
|
5742 |
|
5743 |
|
5744 |
|
5745 |
|
5746 |
|
5747 |
|
5748 |
|
5749 |
|
5750 |
|
5751 |
|
5752 |
|
5753 |
|
5754 |
|
5755 |
|
5756 |
|
5757 |
|
5758 |
|
5759 |
|
5760 |
|
5761 |
|
5762 |
|
5763 |
|
5764 |
|
5765 |
|
5766 | var jsCommon;
|
5767 | (function (jsCommon) {
|
5768 | var UrlUtils;
|
5769 | (function (UrlUtils) {
|
5770 | var urlRegex = /http[s]?:\/\/(\S)+/gi;
|
5771 | function isValidUrl(value) {
|
5772 | if (jsCommon.StringExtensions.isNullOrEmpty(value))
|
5773 | return false;
|
5774 | var match = jsCommon.RegExpExtensions.run(urlRegex, value);
|
5775 | if (!!match && match.index === 0)
|
5776 | return true;
|
5777 | return false;
|
5778 | }
|
5779 | UrlUtils.isValidUrl = isValidUrl;
|
5780 | |
5781 |
|
5782 |
|
5783 |
|
5784 | function isValidImageUrl(url) {
|
5785 |
|
5786 |
|
5787 | return isValidUrl(url);
|
5788 | }
|
5789 | UrlUtils.isValidImageUrl = isValidImageUrl;
|
5790 | function findAllValidUrls(text) {
|
5791 | if (jsCommon.StringExtensions.isNullOrEmpty(text))
|
5792 | return [];
|
5793 |
|
5794 |
|
5795 | var urlRanges = [];
|
5796 | var matches;
|
5797 | var start = 0;
|
5798 | while ((matches = jsCommon.RegExpExtensions.run(urlRegex, text, start)) !== null) {
|
5799 | var url = matches[0];
|
5800 | var end = matches.index + url.length;
|
5801 | urlRanges.push({
|
5802 | start: matches.index,
|
5803 | end: end,
|
5804 | text: url,
|
5805 | });
|
5806 | start = end;
|
5807 | }
|
5808 | return urlRanges;
|
5809 | }
|
5810 | UrlUtils.findAllValidUrls = findAllValidUrls;
|
5811 | function getBase64ContentFromDataUri(uri) {
|
5812 | if (uri.indexOf('data:') !== 0)
|
5813 | throw new Error("Expected data uri");
|
5814 |
|
5815 | var base64Token = ";base64,";
|
5816 | var indexBase64TokenStart = uri.indexOf(base64Token);
|
5817 | if (indexBase64TokenStart < 0)
|
5818 | throw new Error("Expected base 64 content in data url");
|
5819 | var indexBase64Start = indexBase64TokenStart + base64Token.length;
|
5820 | return uri.substr(indexBase64Start, uri.length - indexBase64Start);
|
5821 | }
|
5822 | UrlUtils.getBase64ContentFromDataUri = getBase64ContentFromDataUri;
|
5823 | })(UrlUtils = jsCommon.UrlUtils || (jsCommon.UrlUtils = {}));
|
5824 | })(jsCommon || (jsCommon = {}));
|
5825 |
|
5826 |
|
5827 |
|
5828 | },
|
5829 |
|
5830 | 296:
|
5831 | function(module, exports) {
|
5832 |
|
5833 |
|
5834 | var jsCommon = window.jsCommon;
|
5835 | var powerbi = window.powerbi;
|
5836 | var powerbitests = window.powerbitests;
|
5837 | var InJs = window.InJs;
|
5838 | var debug = window.debug;
|
5839 | var jasmine = window.jasmine;
|
5840 | var Microsoft = window.Microsoft;
|
5841 |
|
5842 | |
5843 |
|
5844 |
|
5845 |
|
5846 |
|
5847 |
|
5848 |
|
5849 |
|
5850 |
|
5851 |
|
5852 |
|
5853 |
|
5854 |
|
5855 |
|
5856 |
|
5857 |
|
5858 |
|
5859 |
|
5860 |
|
5861 |
|
5862 |
|
5863 |
|
5864 |
|
5865 |
|
5866 |
|
5867 |
|
5868 | var jsCommon;
|
5869 | (function (jsCommon) {
|
5870 | var BrowserUtils;
|
5871 | (function (BrowserUtils) {
|
5872 | function isChrome() {
|
5873 | var vendorName = window.navigator.vendor || "";
|
5874 | var userAgent = window.navigator.userAgent.toLowerCase();
|
5875 | return vendorName.toLowerCase().indexOf('google') > -1 &&
|
5876 | userAgent.indexOf('chrome') > -1 &&
|
5877 | userAgent.indexOf('edge') === -1 &&
|
5878 | userAgent.indexOf('opr') === -1;
|
5879 | }
|
5880 | BrowserUtils.isChrome = isChrome;
|
5881 | function isInternetExplorerOrEdge() {
|
5882 | var userAgent = window.navigator.userAgent.toLowerCase();
|
5883 | return userAgent.indexOf('msie') > -1
|
5884 | || userAgent.indexOf('trident') > -1
|
5885 | || userAgent.indexOf('edge') > -1;
|
5886 | }
|
5887 | BrowserUtils.isInternetExplorerOrEdge = isInternetExplorerOrEdge;
|
5888 | |
5889 |
|
5890 |
|
5891 |
|
5892 | function getInternetExplorerVersion() {
|
5893 | var retValue = 0;
|
5894 | if (navigator.appName === 'Microsoft Internet Explorer' || window.navigator.userAgent.indexOf('MSIE') >= 0) {
|
5895 | var re = new RegExp('MSIE ([0-9]{1,}[\\.0-9]{0,})');
|
5896 | var result = re.exec(window.navigator.userAgent);
|
5897 | if (result) {
|
5898 | retValue = parseFloat(result[1]);
|
5899 | }
|
5900 | }
|
5901 | return retValue;
|
5902 | }
|
5903 | BrowserUtils.getInternetExplorerVersion = getInternetExplorerVersion;
|
5904 | function isFirefox() {
|
5905 | return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
5906 | }
|
5907 | BrowserUtils.isFirefox = isFirefox;
|
5908 | })(BrowserUtils = jsCommon.BrowserUtils || (jsCommon.BrowserUtils = {}));
|
5909 | })(jsCommon || (jsCommon = {}));
|
5910 |
|
5911 |
|
5912 |
|
5913 | },
|
5914 |
|
5915 | 297:
|
5916 | function(module, exports) {
|
5917 |
|
5918 |
|
5919 | var jsCommon = window.jsCommon;
|
5920 | var powerbi = window.powerbi;
|
5921 | var powerbitests = window.powerbitests;
|
5922 | var InJs = window.InJs;
|
5923 | var debug = window.debug;
|
5924 | var jasmine = window.jasmine;
|
5925 | var Microsoft = window.Microsoft;
|
5926 |
|
5927 | |
5928 |
|
5929 |
|
5930 |
|
5931 |
|
5932 |
|
5933 |
|
5934 |
|
5935 |
|
5936 |
|
5937 |
|
5938 |
|
5939 |
|
5940 |
|
5941 |
|
5942 |
|
5943 |
|
5944 |
|
5945 |
|
5946 |
|
5947 |
|
5948 |
|
5949 |
|
5950 |
|
5951 |
|
5952 |
|
5953 | var jsCommon;
|
5954 | (function (jsCommon) {
|
5955 | |
5956 |
|
5957 |
|
5958 | var EnumExtensions;
|
5959 | (function (EnumExtensions) {
|
5960 | |
5961 |
|
5962 |
|
5963 | function hasFlag(value, flag) {
|
5964 | debug.assert(!!flag, 'flag must be specified and nonzero.');
|
5965 | return (value & flag) === flag;
|
5966 | }
|
5967 | EnumExtensions.hasFlag = hasFlag;
|
5968 | |
5969 |
|
5970 |
|
5971 | function setFlag(value, flag) {
|
5972 | debug.assert(!!flag, "flag must be specified and nonzero.");
|
5973 | return value |= flag;
|
5974 | }
|
5975 | EnumExtensions.setFlag = setFlag;
|
5976 | |
5977 |
|
5978 |
|
5979 | function resetFlag(value, flag) {
|
5980 | debug.assert(!!flag, "flag must be specified and nonzero.");
|
5981 | return value &= ~flag;
|
5982 | }
|
5983 | EnumExtensions.resetFlag = resetFlag;
|
5984 | |
5985 |
|
5986 |
|
5987 | function toString(enumType, value) {
|
5988 | return enumType[value];
|
5989 | }
|
5990 | EnumExtensions.toString = toString;
|
5991 | })(EnumExtensions = jsCommon.EnumExtensions || (jsCommon.EnumExtensions = {}));
|
5992 | |
5993 |
|
5994 |
|
5995 | var StringExtensions;
|
5996 | (function (StringExtensions) {
|
5997 | |
5998 |
|
5999 |
|
6000 | function endsWith(str, suffix) {
|
6001 | debug.assertValue(str, 'str');
|
6002 | debug.assertValue(suffix, 'suffix');
|
6003 | return str.indexOf(suffix, str.length - suffix.length) !== -1;
|
6004 | }
|
6005 | StringExtensions.endsWith = endsWith;
|
6006 | })(StringExtensions = jsCommon.StringExtensions || (jsCommon.StringExtensions = {}));
|
6007 | var LogicExtensions;
|
6008 | (function (LogicExtensions) {
|
6009 | function XOR(a, b) {
|
6010 | return (a || b) && !(a && b);
|
6011 | }
|
6012 | LogicExtensions.XOR = XOR;
|
6013 | })(LogicExtensions = jsCommon.LogicExtensions || (jsCommon.LogicExtensions = {}));
|
6014 | var JsonComparer;
|
6015 | (function (JsonComparer) {
|
6016 | |
6017 |
|
6018 |
|
6019 | function equals(x, y) {
|
6020 | if (x === y)
|
6021 | return true;
|
6022 | return JSON.stringify(x) === JSON.stringify(y);
|
6023 | }
|
6024 | JsonComparer.equals = equals;
|
6025 | })(JsonComparer = jsCommon.JsonComparer || (jsCommon.JsonComparer = {}));
|
6026 | |
6027 |
|
6028 |
|
6029 |
|
6030 | var TextSizeDefaults;
|
6031 | (function (TextSizeDefaults) {
|
6032 | |
6033 |
|
6034 |
|
6035 |
|
6036 | TextSizeDefaults.TextSizeMin = 8;
|
6037 | |
6038 |
|
6039 |
|
6040 |
|
6041 | TextSizeDefaults.TextSizeMax = 40;
|
6042 | var TextSizeRange = TextSizeDefaults.TextSizeMax - TextSizeDefaults.TextSizeMin;
|
6043 | |
6044 |
|
6045 |
|
6046 |
|
6047 | function getScale(textSize) {
|
6048 | return (textSize - TextSizeDefaults.TextSizeMin) / TextSizeRange;
|
6049 | }
|
6050 | TextSizeDefaults.getScale = getScale;
|
6051 | })(TextSizeDefaults = jsCommon.TextSizeDefaults || (jsCommon.TextSizeDefaults = {}));
|
6052 | var PixelConverter;
|
6053 | (function (PixelConverter) {
|
6054 | var PxPtRatio = 4 / 3;
|
6055 | var PixelString = 'px';
|
6056 | |
6057 |
|
6058 |
|
6059 | function toString(px) {
|
6060 | return px + PixelString;
|
6061 | }
|
6062 | PixelConverter.toString = toString;
|
6063 | |
6064 |
|
6065 |
|
6066 |
|
6067 |
|
6068 | function fromPoint(pt) {
|
6069 | return toString(fromPointToPixel(pt));
|
6070 | }
|
6071 | PixelConverter.fromPoint = fromPoint;
|
6072 | |
6073 |
|
6074 |
|
6075 |
|
6076 |
|
6077 | function fromPointToPixel(pt) {
|
6078 | return (PxPtRatio * pt);
|
6079 | }
|
6080 | PixelConverter.fromPointToPixel = fromPointToPixel;
|
6081 | |
6082 |
|
6083 |
|
6084 |
|
6085 | function toPoint(px) {
|
6086 | return px / PxPtRatio;
|
6087 | }
|
6088 | PixelConverter.toPoint = toPoint;
|
6089 | })(PixelConverter = jsCommon.PixelConverter || (jsCommon.PixelConverter = {}));
|
6090 | var RegExpExtensions;
|
6091 | (function (RegExpExtensions) {
|
6092 | |
6093 |
|
6094 |
|
6095 |
|
6096 |
|
6097 |
|
6098 |
|
6099 |
|
6100 |
|
6101 | function run(regex, value, start) {
|
6102 | debug.assertValue(regex, 'regex');
|
6103 | regex.lastIndex = start || 0;
|
6104 | return regex.exec(value);
|
6105 | }
|
6106 | RegExpExtensions.run = run;
|
6107 | })(RegExpExtensions = jsCommon.RegExpExtensions || (jsCommon.RegExpExtensions = {}));
|
6108 | })(jsCommon || (jsCommon = {}));
|
6109 |
|
6110 |
|
6111 |
|
6112 | },
|
6113 |
|
6114 | 298:
|
6115 | function(module, exports) {
|
6116 |
|
6117 |
|
6118 | var jsCommon = window.jsCommon;
|
6119 | var powerbi = window.powerbi;
|
6120 | var powerbitests = window.powerbitests;
|
6121 | var InJs = window.InJs;
|
6122 | var debug = window.debug;
|
6123 | var jasmine = window.jasmine;
|
6124 | var Microsoft = window.Microsoft;
|
6125 |
|
6126 | |
6127 |
|
6128 |
|
6129 |
|
6130 |
|
6131 |
|
6132 |
|
6133 |
|
6134 |
|
6135 |
|
6136 |
|
6137 |
|
6138 |
|
6139 |
|
6140 |
|
6141 |
|
6142 |
|
6143 |
|
6144 |
|
6145 |
|
6146 |
|
6147 |
|
6148 |
|
6149 |
|
6150 |
|
6151 |
|
6152 | var powerbi;
|
6153 | (function (powerbi) {
|
6154 | var visuals;
|
6155 | (function (visuals) {
|
6156 | var utility;
|
6157 | (function (utility) {
|
6158 | var StyleUtils;
|
6159 | (function (StyleUtils) {
|
6160 | function getRotateAngleFromElement(element) {
|
6161 | var rawElemStyle = element.get(0).style;
|
6162 | var transformString = rawElemStyle.transform || rawElemStyle.webkitTransform;
|
6163 | if (transformString) {
|
6164 | var transform = transformString.match(/rotate\((-?\d+(?:\.\d*)?)deg\)/);
|
6165 | if (transform) {
|
6166 | return parseFloat(transform[1]);
|
6167 | }
|
6168 | }
|
6169 | return 0;
|
6170 | }
|
6171 | StyleUtils.getRotateAngleFromElement = getRotateAngleFromElement;
|
6172 | function getTranslateTransformFromElement(element) {
|
6173 | var rawElemStyle = element.get(0).style;
|
6174 |
|
6175 |
|
6176 |
|
6177 | var transformString = rawElemStyle.transform || rawElemStyle.webkitTransform;
|
6178 | var retValue = { x: 0, y: 0 };
|
6179 | if (transformString && transformString.length > 0) {
|
6180 | var transform = transformString.match(/translate\((-?\d+(?:\.\d*)?)px, (-?\d+(?:\.\d*)?)px\)/);
|
6181 | if (transform) {
|
6182 | retValue.x = parseFloat(transform[1]);
|
6183 | retValue.y = parseFloat(transform[2]);
|
6184 | }
|
6185 | }
|
6186 | return retValue;
|
6187 | }
|
6188 | StyleUtils.getTranslateTransformFromElement = getTranslateTransformFromElement;
|
6189 | function getPadding(element) {
|
6190 | if (!element)
|
6191 | return;
|
6192 | return {
|
6193 | left: parseFloat(element.css('padding-left')) || 0,
|
6194 | right: parseFloat(element.css('padding-right')) || 0,
|
6195 | top: parseFloat(element.css('padding-top')) || 0,
|
6196 | bottom: parseFloat(element.css('padding-bottom')) || 0,
|
6197 | };
|
6198 | }
|
6199 | StyleUtils.getPadding = getPadding;
|
6200 | })(StyleUtils = utility.StyleUtils || (utility.StyleUtils = {}));
|
6201 | })(utility = visuals.utility || (visuals.utility = {}));
|
6202 | })(visuals = powerbi.visuals || (powerbi.visuals = {}));
|
6203 | })(powerbi || (powerbi = {}));
|
6204 |
|
6205 |
|
6206 |
|
6207 | },
|
6208 |
|
6209 | 299:
|
6210 | function(module, exports, __webpack_require__) {
|
6211 |
|
6212 |
|
6213 | var jsCommon = window.jsCommon;
|
6214 | var powerbi = window.powerbi;
|
6215 | var powerbitests = window.powerbitests;
|
6216 | var InJs = window.InJs;
|
6217 | var debug = window.debug;
|
6218 | var jasmine = window.jasmine;
|
6219 | var Microsoft = window.Microsoft;
|
6220 |
|
6221 | |
6222 |
|
6223 |
|
6224 |
|
6225 |
|
6226 |
|
6227 |
|
6228 |
|
6229 |
|
6230 |
|
6231 |
|
6232 |
|
6233 |
|
6234 |
|
6235 |
|
6236 |
|
6237 |
|
6238 |
|
6239 |
|
6240 |
|
6241 |
|
6242 |
|
6243 |
|
6244 |
|
6245 |
|
6246 |
|
6247 | var jsCommon;
|
6248 | (function (jsCommon) {
|
6249 | var ConsoleTracer = (function () {
|
6250 | function ConsoleTracer() {
|
6251 | }
|
6252 | ConsoleTracer.prototype.logTrace = function (trace) {
|
6253 | if (true) {
|
6254 | switch (trace.type) {
|
6255 | case jsCommon.TraceType.Information:
|
6256 | console.info(trace.toString());
|
6257 | break;
|
6258 | case jsCommon.TraceType.UnexpectedError:
|
6259 | case jsCommon.TraceType.Error:
|
6260 | case jsCommon.TraceType.Fatal:
|
6261 | console.error(trace.toString());
|
6262 | break;
|
6263 | case jsCommon.TraceType.ExpectedError:
|
6264 | case jsCommon.TraceType.Warning:
|
6265 | console.warn(trace.toString());
|
6266 | break;
|
6267 | case jsCommon.TraceType.Verbose:
|
6268 | console.log(trace.toString());
|
6269 | break;
|
6270 | default:
|
6271 | console.log(trace.toString());
|
6272 | break;
|
6273 | }
|
6274 | }
|
6275 | };
|
6276 | return ConsoleTracer;
|
6277 | }());
|
6278 | jsCommon.ConsoleTracer = ConsoleTracer;
|
6279 | var Trace;
|
6280 | (function (Trace) {
|
6281 | var traceMaxCount = 1000;
|
6282 | var traces = new Array(traceMaxCount);
|
6283 | var lastTraceIndex = -1;
|
6284 | var defaultListener = new ConsoleTracer();
|
6285 | var listeners = new Array(defaultListener);
|
6286 | |
6287 |
|
6288 |
|
6289 | function warning(text, requestId) {
|
6290 | debug.assertValue(text, 'text');
|
6291 | logTraceInternal(new jsCommon.TraceItem(text, jsCommon.TraceType.Warning, requestId));
|
6292 | }
|
6293 | Trace.warning = warning;
|
6294 | |
6295 |
|
6296 |
|
6297 | function error(text, includeStackTrace, requestId) {
|
6298 | debug.assertValue(text, 'text');
|
6299 | if (includeStackTrace)
|
6300 | text = jsCommon.StringExtensions.format("{0}.\nStack:\n{1}", text, jsCommon.getStackTrace());
|
6301 | logTraceInternal(new jsCommon.TraceItem(text, jsCommon.TraceType.Error, requestId));
|
6302 | }
|
6303 | Trace.error = error;
|
6304 | |
6305 |
|
6306 |
|
6307 | function verbose(text, requestId) {
|
6308 | debug.assertValue(text, 'text');
|
6309 | logTraceInternal(new jsCommon.TraceItem(text, jsCommon.TraceType.Verbose, requestId));
|
6310 | }
|
6311 | Trace.verbose = verbose;
|
6312 | function addListener(listener) {
|
6313 | debug.assertValue(listener, 'listener');
|
6314 | listeners.push(listener);
|
6315 | }
|
6316 | Trace.addListener = addListener;
|
6317 | function removeListener(listener) {
|
6318 | debug.assertValue(listener, 'listener');
|
6319 | var index = listeners.indexOf(listener);
|
6320 | if (index >= 0)
|
6321 | listeners.splice(index, 1);
|
6322 | }
|
6323 | Trace.removeListener = removeListener;
|
6324 | function resetListeners() {
|
6325 | listeners = new Array(defaultListener);
|
6326 | }
|
6327 | Trace.resetListeners = resetListeners;
|
6328 | function reset() {
|
6329 | lastTraceIndex = -1;
|
6330 | }
|
6331 | Trace.reset = reset;
|
6332 | function getTraces() {
|
6333 | if (lastTraceIndex < 0)
|
6334 | return;
|
6335 | var result = new Array(lastTraceIndex + 1);
|
6336 | for (var i = 0; i <= lastTraceIndex; i++)
|
6337 | result[i] = traces[i];
|
6338 | return result;
|
6339 | }
|
6340 | Trace.getTraces = getTraces;
|
6341 | |
6342 |
|
6343 |
|
6344 | function disableDefaultListener() {
|
6345 | removeListener(defaultListener);
|
6346 | }
|
6347 | Trace.disableDefaultListener = disableDefaultListener;
|
6348 | function enableDefaultListener() {
|
6349 | addListener(defaultListener);
|
6350 | }
|
6351 | Trace.enableDefaultListener = enableDefaultListener;
|
6352 | function logTraceInternal(trace) {
|
6353 | if ((lastTraceIndex + 1) >= traceMaxCount)
|
6354 | reset();
|
6355 | traces[++lastTraceIndex] = trace;
|
6356 | for (var i = 0, len = listeners.length; i < len; i++)
|
6357 | listeners[i].logTrace(trace);
|
6358 | }
|
6359 | })(Trace = jsCommon.Trace || (jsCommon.Trace = {}));
|
6360 | })(jsCommon || (jsCommon = {}));
|
6361 |
|
6362 |
|
6363 |
|
6364 | },
|
6365 |
|
6366 | 300:
|
6367 | function(module, exports) {
|
6368 |
|
6369 |
|
6370 | var jsCommon = window.jsCommon;
|
6371 | var powerbi = window.powerbi;
|
6372 | var powerbitests = window.powerbitests;
|
6373 | var InJs = window.InJs;
|
6374 | var debug = window.debug;
|
6375 | var jasmine = window.jasmine;
|
6376 | var Microsoft = window.Microsoft;
|
6377 |
|
6378 | |
6379 |
|
6380 |
|
6381 |
|
6382 |
|
6383 |
|
6384 |
|
6385 |
|
6386 |
|
6387 |
|
6388 |
|
6389 |
|
6390 |
|
6391 |
|
6392 |
|
6393 |
|
6394 |
|
6395 |
|
6396 |
|
6397 |
|
6398 |
|
6399 |
|
6400 |
|
6401 |
|
6402 |
|
6403 |
|
6404 | var jsCommon;
|
6405 | (function (jsCommon) {
|
6406 | |
6407 |
|
6408 |
|
6409 | (function (TraceType) {
|
6410 | TraceType[TraceType["Information"] = 0] = "Information";
|
6411 | TraceType[TraceType["Verbose"] = 1] = "Verbose";
|
6412 | TraceType[TraceType["Warning"] = 2] = "Warning";
|
6413 | TraceType[TraceType["Error"] = 3] = "Error";
|
6414 | TraceType[TraceType["ExpectedError"] = 4] = "ExpectedError";
|
6415 | TraceType[TraceType["UnexpectedError"] = 5] = "UnexpectedError";
|
6416 | TraceType[TraceType["Fatal"] = 6] = "Fatal";
|
6417 | })(jsCommon.TraceType || (jsCommon.TraceType = {}));
|
6418 | var TraceType = jsCommon.TraceType;
|
6419 | })(jsCommon || (jsCommon = {}));
|
6420 |
|
6421 |
|
6422 |
|
6423 | },
|
6424 |
|
6425 | 301:
|
6426 | function(module, exports) {
|
6427 |
|
6428 |
|
6429 | var jsCommon = window.jsCommon;
|
6430 | var powerbi = window.powerbi;
|
6431 | var powerbitests = window.powerbitests;
|
6432 | var InJs = window.InJs;
|
6433 | var debug = window.debug;
|
6434 | var jasmine = window.jasmine;
|
6435 | var Microsoft = window.Microsoft;
|
6436 |
|
6437 | |
6438 |
|
6439 |
|
6440 |
|
6441 |
|
6442 |
|
6443 |
|
6444 |
|
6445 |
|
6446 |
|
6447 |
|
6448 |
|
6449 |
|
6450 |
|
6451 |
|
6452 |
|
6453 |
|
6454 |
|
6455 |
|
6456 |
|
6457 |
|
6458 |
|
6459 |
|
6460 |
|
6461 |
|
6462 |
|
6463 | var jsCommon;
|
6464 | (function (jsCommon) {
|
6465 | |
6466 |
|
6467 |
|
6468 | var MSMapcontrol = 'https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0&s=1&onscriptload=globalMapControlLoaded';
|
6469 | |
6470 |
|
6471 |
|
6472 | var MSMapcontrolLoaded = false;
|
6473 | var WaitForMSMapLoad = null;
|
6474 | var PowerViewPackage = {
|
6475 | javaScriptFiles: [
|
6476 | powerbi.build + '/externals/pv/webclient.js'
|
6477 | ],
|
6478 | cssFiles: [
|
6479 | powerbi.build + '/externals/pv/Styles/_all.css'
|
6480 | ],
|
6481 | javaScriptFilesWithCallback: [
|
6482 | { javascriptFile: MSMapcontrol, onLoadCallback: waitForMapControlLoaded }
|
6483 | ]
|
6484 | };
|
6485 | function ensurePowerView(action) {
|
6486 | if (action === void 0) { action = _.noop; }
|
6487 | jsCommon.requires(PowerViewPackage, action);
|
6488 | }
|
6489 | jsCommon.ensurePowerView = ensurePowerView;
|
6490 | var MapPackage = {
|
6491 | javaScriptFilesWithCallback: [
|
6492 | { javascriptFile: MSMapcontrol, onLoadCallback: waitForMapControlLoaded }
|
6493 | ]
|
6494 | };
|
6495 | function ensureMap(locale, action) {
|
6496 | var mapPackageWithLocale = powerbi.Prototype.inherit(MapPackage);
|
6497 | if (!_.isEmpty(locale)) {
|
6498 | var localeSplit = locale.split('-', 2);
|
6499 | mapPackageWithLocale.javaScriptFilesWithCallback[0].javascriptFile = MSMapcontrol.concat('&mkt=' + locale + '&ur=' + (localeSplit.length > 1 ? localeSplit[1] : locale));
|
6500 | }
|
6501 | jsCommon.requires(mapPackageWithLocale, action);
|
6502 | }
|
6503 | jsCommon.ensureMap = ensureMap;
|
6504 | function mapControlLoaded() {
|
6505 | MSMapcontrolLoaded = true;
|
6506 | if (WaitForMSMapLoad) {
|
6507 | WaitForMSMapLoad.resolve();
|
6508 | WaitForMSMapLoad = undefined;
|
6509 | }
|
6510 | }
|
6511 | jsCommon.mapControlLoaded = mapControlLoaded;
|
6512 | function waitForMapControlLoaded() {
|
6513 | var task;
|
6514 | if (!MSMapcontrolLoaded) {
|
6515 | task = WaitForMSMapLoad = $.Deferred();
|
6516 | }
|
6517 | else {
|
6518 | task = $.Deferred();
|
6519 | task.resolve();
|
6520 | }
|
6521 | return task.promise();
|
6522 | }
|
6523 | jsCommon.waitForMapControlLoaded = waitForMapControlLoaded;
|
6524 | })(jsCommon || (jsCommon = {}));
|
6525 |
|
6526 | globalMapControlLoaded = function () {
|
6527 |
|
6528 | jsCommon.mapControlLoaded();
|
6529 | };
|
6530 |
|
6531 |
|
6532 |
|
6533 |
|
6534 | },
|
6535 |
|
6536 | 302:
|
6537 | function(module, exports) {
|
6538 |
|
6539 |
|
6540 | var jsCommon = window.jsCommon;
|
6541 | var powerbi = window.powerbi;
|
6542 | var powerbitests = window.powerbitests;
|
6543 | var InJs = window.InJs;
|
6544 | var debug = window.debug;
|
6545 | var jasmine = window.jasmine;
|
6546 | var Microsoft = window.Microsoft;
|
6547 |
|
6548 | |
6549 |
|
6550 |
|
6551 |
|
6552 |
|
6553 |
|
6554 |
|
6555 |
|
6556 |
|
6557 |
|
6558 |
|
6559 |
|
6560 |
|
6561 |
|
6562 |
|
6563 |
|
6564 |
|
6565 |
|
6566 |
|
6567 |
|
6568 |
|
6569 |
|
6570 |
|
6571 |
|
6572 |
|
6573 |
|
6574 | var InJs;
|
6575 | (function (InJs) {
|
6576 | |
6577 |
|
6578 |
|
6579 | (function (TraceType) {
|
6580 | TraceType[TraceType["information"] = 0] = "information";
|
6581 | TraceType[TraceType["verbose"] = 1] = "verbose";
|
6582 | TraceType[TraceType["warning"] = 2] = "warning";
|
6583 | TraceType[TraceType["error"] = 3] = "error";
|
6584 | TraceType[TraceType["expectedError"] = 4] = "expectedError";
|
6585 | TraceType[TraceType["unexpectedError"] = 5] = "unexpectedError";
|
6586 | TraceType[TraceType["fatal"] = 6] = "fatal";
|
6587 | })(InJs.TraceType || (InJs.TraceType = {}));
|
6588 | var TraceType = InJs.TraceType;
|
6589 | })(InJs || (InJs = {}));
|
6590 |
|
6591 |
|
6592 |
|
6593 | }
|
6594 |
|
6595 | });
|
6596 |
|
\ | No newline at end of file |