@progress/telerik-jquery-report-viewer 21.24.130 → 22.24.514

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. package/README.md +1 -1
  2. package/dist/cjs/accessibility.js +218 -0
  3. package/dist/cjs/binder.js +172 -0
  4. package/dist/cjs/command.js +32 -0
  5. package/dist/cjs/commandSet.js +167 -0
  6. package/dist/cjs/controller.js +1207 -0
  7. package/dist/cjs/documentMapArea.js +168 -0
  8. package/dist/cjs/domUtils.js +50 -0
  9. package/dist/cjs/enums.js +52 -0
  10. package/dist/cjs/event-emitter.js +17 -0
  11. package/dist/cjs/events.js +23 -0
  12. package/dist/cjs/globalSettings.js +9 -0
  13. package/dist/cjs/history.js +131 -0
  14. package/dist/cjs/index.js +58 -0
  15. package/dist/cjs/jqueryThrottleDebounce.js +48 -0
  16. package/dist/cjs/kendo-jquery.js +4 -0
  17. package/dist/cjs/mainMenu.js +332 -0
  18. package/dist/cjs/mem-storage.js +44 -0
  19. package/dist/cjs/pagesArea.js +641 -0
  20. package/dist/cjs/parameterValidators.js +167 -0
  21. package/dist/cjs/parameters.js +921 -0
  22. package/dist/cjs/parametersArea.js +502 -0
  23. package/dist/cjs/perspectives.js +138 -0
  24. package/dist/cjs/print.js +166 -0
  25. package/dist/cjs/report-viewer/report-viewer-settings.js +138 -0
  26. package/dist/cjs/reportViewer.js +654 -0
  27. package/dist/cjs/scroll.js +537 -0
  28. package/dist/cjs/search.js +634 -0
  29. package/dist/cjs/sendEmail.js +435 -0
  30. package/dist/cjs/service-client-sentinel.js +52 -0
  31. package/dist/cjs/serviceClient.js +405 -0
  32. package/dist/cjs/sideMenu.js +225 -0
  33. package/dist/cjs/sr.js +164 -0
  34. package/dist/cjs/stringResources.js +11 -0
  35. package/dist/cjs/telerikReportViewer.kendo.js +60196 -0
  36. package/dist/cjs/telerikReportViewer.kendo.min.js +19776 -0
  37. package/dist/cjs/template-cache.js +39 -0
  38. package/dist/cjs/touch.js +86 -0
  39. package/dist/cjs/uiController.js +142 -0
  40. package/dist/cjs/uiFreezeCoordinator.js +281 -0
  41. package/dist/cjs/utils.js +492 -0
  42. package/dist/es/accessibility.js +214 -0
  43. package/dist/es/binder.js +168 -0
  44. package/dist/es/command.js +28 -0
  45. package/dist/es/commandSet.js +163 -0
  46. package/dist/es/controller.js +1203 -0
  47. package/dist/es/documentMapArea.js +164 -0
  48. package/dist/es/domUtils.js +43 -0
  49. package/dist/es/enums.js +41 -0
  50. package/dist/es/event-emitter.js +13 -0
  51. package/dist/es/events.js +19 -0
  52. package/dist/es/globalSettings.js +5 -0
  53. package/dist/es/history.js +127 -0
  54. package/dist/es/index.js +24 -0
  55. package/dist/es/jqueryThrottleDebounce.js +46 -0
  56. package/dist/es/kendo-jquery.js +1 -0
  57. package/dist/es/mainMenu.js +328 -0
  58. package/dist/es/mem-storage.js +40 -0
  59. package/dist/es/pagesArea.js +637 -0
  60. package/dist/es/parameterValidators.js +163 -0
  61. package/dist/es/parameters.js +916 -0
  62. package/dist/es/parametersArea.js +498 -0
  63. package/dist/es/perspectives.js +134 -0
  64. package/dist/es/print.js +162 -0
  65. package/dist/es/report-viewer/report-viewer-settings.js +134 -0
  66. package/dist/es/reportViewer.js +650 -0
  67. package/dist/es/scroll.js +533 -0
  68. package/dist/es/search.js +630 -0
  69. package/dist/es/sendEmail.js +431 -0
  70. package/dist/es/service-client-sentinel.js +48 -0
  71. package/dist/es/serviceClient.js +401 -0
  72. package/dist/es/sideMenu.js +221 -0
  73. package/dist/es/sr.js +162 -0
  74. package/dist/es/stringResources.js +7 -0
  75. package/dist/es/telerikReportViewer.kendo.js +60194 -0
  76. package/dist/es/telerikReportViewer.kendo.min.js +19774 -0
  77. package/dist/es/template-cache.js +35 -0
  78. package/dist/es/touch.js +82 -0
  79. package/dist/es/uiController.js +138 -0
  80. package/dist/es/uiFreezeCoordinator.js +277 -0
  81. package/dist/es/utils.js +447 -0
  82. package/dist/font/font-icons.css +4 -4
  83. package/dist/font/font-icons.min.css +3 -3
  84. package/dist/js/telerikReportViewer.js +8574 -8249
  85. package/dist/js/telerikReportViewer.min.js +1 -17
  86. package/dist/js/telerikReportViewer.stringResources.js +166 -173
  87. package/dist/styles/telerikReportViewer.css +1 -1
  88. package/dist/styles/telerikReportViewer.min.css +1 -1
  89. package/dist/templates/telerikReportViewerTemplate-FA.html +3 -3
  90. package/dist/templates/telerikReportViewerTemplate.html +3 -3
  91. package/package.json +13 -7
  92. /package/dist/font/{ReportingIcons-18.0.24.130.ttf → ReportingIcons-18.1.24.514.ttf} +0 -0
@@ -1,17 +1 @@
1
- /*
2
- * TelerikReporting v18.0.24.130 (https://www.telerik.com/products/reporting.aspx)
3
- * Copyright 2024 Progress Software EAD. All rights reserved.
4
- *
5
- * Telerik Reporting commercial licenses may be obtained at
6
- * https://www.telerik.com/purchase/license-agreement/reporting.aspx
7
- * If you do not own a commercial license, this file shall be governed by the trial license terms.
8
- */
9
- var telerikReportViewer=(()=>{var Yt=Object.defineProperty;var mn=Object.getOwnPropertyDescriptor;var hn=Object.getOwnPropertyNames;var En=Object.prototype.hasOwnProperty;var Xt=(t,e)=>{for(var a in e)Yt(t,a,{get:e[a],enumerable:!0})},bn=(t,e,a,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of hn(e))!En.call(t,n)&&n!==a&&Yt(t,n,{get:()=>e[n],enumerable:!(r=mn(e,n))||r.enumerable});return t};var Pn=t=>bn(Yt({},"__esModule",{value:!0}),t);var ta={};Xt(ta,{Accessibility:()=>pr,Binder:()=>it,CommandSet:()=>Er,DocumentMapAreaPositions:()=>gt,Events:()=>ye,GlobalSettings:()=>et,HistoryManager:()=>Tr,PageModes:()=>De,PagesArea:()=>Gt,ParameterEditorTypes:()=>ot,ParameterEditors:()=>Rr,ParameterTypes:()=>Ue,ParameterValidators:()=>St,ParametersAreaPositions:()=>Ke,PerspectiveManager:()=>Ar,PrintManager:()=>Ut,PrintModes:()=>At,ReportViewer:()=>fn,ReportViewerController:()=>Pr,ScaleModes:()=>he,Scroll:()=>Ir,ServiceClient:()=>Nr,TouchBehavior:()=>Sr,UIController:()=>Mr,UIFreezeCoordinator:()=>_r,ViewModes:()=>Me,domUtils:()=>Vt,parameterEditorsMatch:()=>Xe,utils:()=>Se});var Vt={};Xt(Vt,{getBorderWidth:()=>fr,getMargins:()=>ur,getPadding:()=>cr,scale:()=>dr});var Se={};Xt(Se,{$ajax:()=>$t,adjustTimezone:()=>Jt,areEqual:()=>Ct,areEqualArrays:()=>yt,each:()=>k,escapeHtml:()=>Ne,exceptionTypeNamesMatch:()=>Ot,extend:()=>le,filterUniqueLastOccurance:()=>lr,findElement:()=>Ye,generateGuidString:()=>qt,getColorAlphaValue:()=>sr,getExceptionInstance:()=>pt,isApplicationException:()=>nr,isApplicationExceptionInstance:()=>kt,isArray:()=>Zr,isExceptionOfType:()=>In,isInternalServerError:()=>tr,isInvalidClientException:()=>xt,isRgbColor:()=>en,isSpecialKey:()=>Pt,isSvgSupported:()=>er,isSystemArgumentException:()=>rr,loadScript:()=>or,loadScriptWithCallback:()=>ir,logError:()=>at,ltrim:()=>Jr,parseJSON:()=>Rt,parseToLocalDate:()=>ct,rectangle:()=>Mt,replaceAll:()=>_t,reportSourcesAreEqual:()=>Qt,rtrim:()=>Qe,selector:()=>ar,stringFormat:()=>re,toRgbColor:()=>Qr,trim:()=>Dt,tryParseFloat:()=>Tt,tryParseInt:()=>Fe,unadjustTimezone:()=>Zt});var Tn=/{(\w+?)}/g,qr={DELETE:46,BACKSPACE:8,TAB:9,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36};function Pt(){var t=window.navigator.userAgent.toLowerCase();if(t.indexOf("firefox")>-1){var e=Object.keys(qr),a=e.length;return function(r){for(var n=0;n<a;n++)if(qr[e[n]]==r)return!0}}return function(r){return!1}}function Sn(t,e,a){return{xhr:t,status:e,error:a}}function Mt(t,e,a,r){return{left:t,top:e,width:a,height:r,right:function(){return t+a},bottom:function(){return e+r},union:function(n){var i=Math.min(t,n.left),o=Math.min(e,n.top),c=Math.max(this.right(),n.right())-i,l=Math.max(this.bottom(),n.bottom())-o;return Mt(i,o,c,l)}}}function qt(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,a=t=="x"?e:e&3|8;return a.toString(16)})}function Dt(t,e){return Qe(Jr(t,e),e)}function _t(t,e,a){return t.replace(new RegExp(e,"g"),a)}function Jr(t,e){return e===void 0&&(e="s"),t.replace(new RegExp("^["+e+"]+"),"")}function Qe(t,e){return e===void 0&&(e="s"),t.replace(new RegExp("["+e+"]+$"),"")}function re(t,e){var a=Array.isArray(e);return t.replace(Tn,function(r,n){return e[a?parseInt(n):n]})}function Ne(t){return $("<div>").text(t).html()}function Fe(t){return/^(\-|\+)?([0-9]+)$/.test(t)?Number(t):NaN}function Tt(t){return/^(\-|\+)?([0-9]+(\.[0-9]+)?)$/.test(t)?Number(t):NaN}function ct(t){if(t instanceof Date)return t;var e=/Z|[\+\-]\d\d:?\d\d/i.test(t);return e||(t+="Z"),new Date(t)}function Jt(t){return new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()))}function Zt(t){return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds())}function Ct(t,e){if(t instanceof Date&&e instanceof Date){if(t.getTime()!==e.getTime())return!1}else if(t!==e)return!1;return!0}function Qt(t,e){if(t&&e&&t.report===e.report){var a="";t.parameters&&(a=JSON.stringify(t.parameters));var r="";return e.parameters&&(r=JSON.stringify(e.parameters)),a===r}return!1}function yt(t,e){if(t===null)return e===null;if(e===null||t.length!==e.length)return!1;for(var a=t.length-1;a>=0;a--)if(!Ct(t[a],e[a]))return!1;return!0}function er(){var t=/Version\/(\d+.\d+.\d+) Safari/.exec(navigator.userAgent);if(t&&t.length>1){var e=parseFloat(t[1]);return e>=6}return!0}function tr(t){return t?_t(t," ","").toLowerCase()==="internalservererror":!1}function rr(t){var e="ArgumentException",a=pt(t);return Lt(a,e,"System."+e)}function xt(t){var e="InvalidClientException",a=pt(t);return Lt(a,e,"Telerik.Reporting.Services.Engine."+e)}function nr(t){return kt(pt(t))}function kt(t){var e="DrawingFactoryUnavailableException";return Lt(t,e,"Telerik.Drawing.Contract."+e)}function In(t,e){return Lt(pt(t),e,e)}function Lt(t,e,a){return t&&t.exceptionType&&Ot(t.exceptionType,e,a)}function Ot(t,e,a){return t&&(t===a||t.endsWith(e))}function Rt(t){try{return JSON.parse(t,function(e,a){if(e&&a){var r=e.charAt(0);if(r===r.toUpperCase()){var n=r.toLowerCase()+e.slice(1);this[n]=a}}return a})}catch{return null}}function pt(t){return!t||!t.responseText?!1:Rt(t.responseText)}function le(){var t,e,a,r,n,i=0,o=arguments.length;for(n=o>1?arguments[i++]||{}:{};i<o;i++)if((r=arguments[i])!=null)for(a in r)t=n[a],e=r[a],n!==e&&e!==void 0&&(n[a]=e);return n}function k(t,e){var a,r=0;if(Zr(t))for(a=t.length;r<a&&e.call(t[r],r,t[r])!==!1;r++);else for(r in t)if(e.call(t[r],r,t[r])===!1)break;return t}function ar(){return document.querySelectorAll(arguments[0])}function Zr(t){if(Array.isArray(t))return!0;var e=!!t&&"length"in t&&t.length;return typeof e=="number"}function ir(t,e,a){var r=document.createElement("script");r.src=t,r.onload=function(){e(a)},r.onerror=function(){at(new Error("Failed to load script "+t))},document.head.appendChild(r)}function or(t){var e={dataType:"script",cache:!0,url:t};return $t(e)}function lr(t){function e(a,r,n){return n.lastIndexOf(a)===r}return t.filter(e)}function at(t){var e=window.console;e&&e.error&&e.error(t)}function Ye(t){t.constructor!=Array&&(t=[t]);for(var e=$(t[0]),a=1;a<t.length;a++)e=e.find(t[a]);return e}function Qr(t){if(t&&t.length<6){var e=1,a=t.split("");for(a[0]!=="#"&&(e=0),e;e<a.length;e++)a[e]=a[e]+a[e];t=a.join("")}var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return r?parseInt(r[1],16)+", "+parseInt(r[2],16)+", "+parseInt(r[3],16):null}function en(t){return t?t.indexOf(",")>-1:!1}function sr(t){if(t.toLowerCase()==="transparent")return 0;if(!en(t))return 1;t.indexOf("#")!==-1&&(t=Qr(t));var e=t.split(",").map(function(r){return r.trim()}),a=e.length===4?parseFloat((parseFloat(e[3].replace(/[()]/g,""))/255).toFixed(2)):1;return a}function $t(t){return new Promise(function(e,a){$.ajax(t).done(function(r){return e(r)}).fail(function(r,n,i){a(Sn(r,n,i))})})}function We(t){return parseInt(t,10)||0}function ur(t){var e=$(t);return{left:We(e.css("marginLeft")),right:We(e.css("marginRight")),top:We(e.css("marginTop")),bottom:We(e.css("marginBottom"))}}function cr(t){var e=$(t);return{left:We(e.css("paddingLeft")),right:We(e.css("paddingRight")),top:We(e.css("paddingTop")),bottom:We(e.css("paddingBottom"))}}function fr(t){var e=$(t);return{left:We(e.css("borderLeftWidth")),right:We(e.css("borderRightWidth")),top:We(e.css("borderTopWidth")),bottom:We(e.css("borderBottomWidth"))}}function dr(t,e,a,r,n){e=e||1,a=a||1,r=r||0,n=n||0;var i=re("scale({0}, {1})",[e,a]),o=re("{0} {1}",[r,n]);$(t).css("transform",i).css("transform-origin",o)}var _n={controllerNotInitialized:"Controller is not initialized.",noReportInstance:"No report instance.",missingTemplate:"!obsolete resource!",noReport:"No report.",noReportDocument:"No report document.",missingOrInvalidParameter:`There are missing or invalid parameter values. Please input valid data for the following parameters:
10
- `,invalidParameter:"Please input a valid value.",invalidDateTimeValue:"Please input a valid date.",parameterIsEmpty:"Parameter value cannot be empty.",cannotValidateType:"Cannot validate parameter of type {type}.",loadingFormats:"Loading...",loadingReport:"Loading report...",preparingDownload:"Preparing document to download. Please wait...",preparingPrint:"Preparing document to print. Please wait...",errorLoadingTemplates:"Error loading the report viewer's templates. (templateUrl = '{0}').",errorServiceUrl:"Cannot access the Reporting REST service. (serviceUrl = '{0}'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)",errorServiceVersion:"The version of the Report Viewer '{1}' does not match the version of the Reporting REST Service '{0}'. Please make sure both are running same version.",loadingReportPagesInProgress:"{0} pages loaded so far...",loadedReportPagesComplete:"Done. Total {0} pages loaded.",noPageToDisplay:"No page to display.",errorDeletingReportInstance:"Error deleting report instance: '{0}'.",errorRegisteringViewer:"Error registering the viewer with the service.",noServiceClient:"No serviceClient has been specified for this controller.",errorRegisteringClientInstance:"Error registering client instance.",errorCreatingReportInstance:"Error creating report instance (Report = '{0}').",errorCreatingReportDocument:"Error creating report document (Report = '{0}'; Format = '{1}').",unableToGetReportParameters:"Unable to get report parameters.",errorObtainingAuthenticationToken:"Error obtaining authentication token.",clientExpired:"Click 'Refresh' to restore client session.",promisesChainStopError:"Error shown. Throwing promises chain stop error.",renderingCanceled:"Report processing was canceled.",tryReportPreview:"The report may now be previewed.",parameterEditorSelectNone:"clear selection",parameterEditorSelectAll:"select all",parametersAreaPreviewButton:"Preview",menuNavigateBackwardText:"Navigate Backward",menuNavigateBackwardTitle:"Navigate Backward",menuNavigateForwardText:"Navigate Forward",menuNavigateForwardTitle:"Navigate Forward",menuStopRenderingText:"Stop Rendering",menuStopRenderingTitle:"Stop Rendering",menuRefreshText:"Refresh",menuRefreshTitle:"Refresh",menuFirstPageText:"First Page",menuFirstPageTitle:"First Page",menuLastPageText:"Last Page",menuLastPageTitle:"Last Page",menuPreviousPageTitle:"Previous Page",menuNextPageTitle:"Next Page",menuPageNumberTitle:"Page Number Selector",menuDocumentMapTitle:"Toggle Document Map",menuParametersAreaTitle:"Toggle Parameters Area",menuZoomInTitle:"Zoom In",menuZoomOutTitle:"Zoom Out",menuPageStateTitle:"Toggle FullPage/PageWidth",menuPrintText:"Print...",menuContinuousScrollText:"Toggle Continuous Scrolling",menuSendMailText:"Send an email",menuPrintTitle:"Print",menuContinuousScrollTitle:"Toggle Continuous Scrolling",menuSendMailTitle:"Send an email",menuExportText:"Export",menuExportTitle:"Export",menuPrintPreviewText:"Toggle Print Preview",menuPrintPreviewTitle:"Toggle Print Preview",menuSearchText:"Search",menuSearchTitle:"Toggle Search",menuSideMenuTitle:"Toggle Side Menu",sendEmailFromLabel:"From:",sendEmailToLabel:"To:",sendEmailCCLabel:"CC:",sendEmailSubjectLabel:"Subject:",sendEmailFormatLabel:"Format:",sendEmailSendLabel:"Send",sendEmailCancelLabel:"Cancel",ariaLabelPageNumberSelector:"Page number selector. Showing page {0} of {1}.",ariaLabelPageNumberEditor:"Page number editor",ariaLabelExpandable:"Expandable",ariaLabelSelected:"Selected",ariaLabelParameter:"parameter",ariaLabelErrorMessage:"Error message",ariaLabelParameterInfo:"Contains {0} options",ariaLabelMultiSelect:"Multiselect",ariaLabelMultiValue:"Multivalue",ariaLabelSingleValue:"Single value",ariaLabelParameterDateTime:"DateTime",ariaLabelParameterString:"String",ariaLabelParameterNumerical:"Numerical",ariaLabelParameterBoolean:"Boolean",ariaLabelParametersAreaPreviewButton:"Preview the report",ariaLabelMainMenu:"Main menu",ariaLabelCompactMenu:"Compact menu",ariaLabelSideMenu:"Side menu",ariaLabelDocumentMap:"Document map area",ariaLabelDocumentMapSplitter:"Document map area splitbar.",ariaLabelParametersAreaSplitter:"Parameters area splitbar.",ariaLabelPagesArea:"Report contents area",ariaLabelSearchDialogArea:"Search area",ariaLabelSendEmailDialogArea:"Send email area",ariaLabelSearchDialogStop:"Stop search",ariaLabelSearchDialogOptions:"Search options",ariaLabelSearchDialogNavigateUp:"Navigate up",ariaLabelSearchDialogNavigateDown:"Navigate down",ariaLabelSearchDialogMatchCase:"Match case",ariaLabelSearchDialogMatchWholeWord:"Match whole word",ariaLabelSearchDialogUseRegex:"Use regex",ariaLabelMenuNavigateBackward:"Navigate backward",ariaLabelMenuNavigateForward:"Navigate forward",ariaLabelMenuStopRendering:"Stop rendering",ariaLabelMenuRefresh:"Refresh",ariaLabelMenuFirstPage:"First page",ariaLabelMenuLastPage:"Last page",ariaLabelMenuPreviousPage:"Previous page",ariaLabelMenuNextPage:"Next page",ariaLabelMenuPageNumber:"Page number selector",ariaLabelMenuDocumentMap:"Toggle document map",ariaLabelMenuParametersArea:"Toggle parameters area",ariaLabelMenuZoomIn:"Zoom in",ariaLabelMenuZoomOut:"Zoom out",ariaLabelMenuPageState:"Toggle FullPage/PageWidth",ariaLabelMenuPrint:"Print",ariaLabelMenuContinuousScroll:"Continuous scrolling",ariaLabelMenuSendMail:"Send an email",ariaLabelMenuExport:"Export",ariaLabelMenuPrintPreview:"Toggle print preview",ariaLabelMenuSearch:"Search in report contents",ariaLabelMenuSideMenu:"Toggle side menu",ariaLabelSendEmailFrom:"From email address",ariaLabelSendEmailTo:"Recipient email address",ariaLabelSendEmailCC:"Carbon Copy email address",ariaLabelSendEmailSubject:"Email subject:",ariaLabelSendEmailFormat:"Report format:",ariaLabelSendEmailSend:"Send email",ariaLabelSendEmailCancel:"Cancel sending email",searchDialogTitle:"Search in report contents",searchDialogSearchInProgress:"searching...",searchDialogNoResultsLabel:"No results",searchDialogResultsFormatLabel:"Result {0} of {1}",searchDialogStopTitle:"Stop Search",searchDialogNavigateUpTitle:"Navigate Up",searchDialogNavigateDownTitle:"Navigate Down",searchDialogMatchCaseTitle:"Match Case",searchDialogMatchWholeWordTitle:"Match Whole Word",searchDialogUseRegexTitle:"Use Regex",searchDialogCaptionText:"Find",searchDialogPageText:"page",sendEmailDialogTitle:"Send Email",sendEmailValidationEmailRequired:"Email field is required",sendEmailValidationEmailFormat:"Email format is not valid",sendEmailValidationSingleEmail:"The field accepts a single email address only",sendEmailValidationFormatRequired:"Format field is required",errorSendingDocument:"Error sending report document (Report = '{0}')."};window.telerikReportViewer||={};window.telerikReportViewer.sr||=_n;var tn=tn||{},Cn=(window.telerikReportViewer||{}).sr||{},A=$.extend({},tn,Cn);var Rn={};function pr(t){var e,a=!1,r,n,i={CONFIRM_KEY:13,CONTENT_AREA_KEY:67,DOCUMENT_MAP_AREA_KEY:68,MENU_AREA_KEY:77,PARAMETERS_AREA_KEY:80};if(t=$.extend({},Rn,t),e=t.controller,!e)throw"No controller (telerikReporting.ReportViewerController) has been specified.";e.reportLoadComplete(function(){o();var _=g();_.length>0&&_.focus()}).pageReady(function(_,x){l(x),a=!0}).error(function(_,x){c(),window.setTimeout(o,500)}),e.updateUI(function(_){a&&(d(),V())});function o(){r||(s(),$(document.body).off("keydown",w),$(document.body).on("keydown",w))}function c(){var _=["div.trv-pages-area","div.trv-error-message"],x=Ye(_);x.length!==0&&(x.attr("tabIndex",0),x.focus())}function l(_){if(_){o();var x=r[i.CONTENT_AREA_KEY];U(x)}}function d(){var _=$(".trv-report-pager");if(_.length>0){var x=e.getCurrentPageNumber(),I=e.getPageCount();k(_,function(){var m=$(this);m.attr("aria-label",re(A.ariaLabelPageNumberSelector,[x,I]));var M=m.find("input[data-role=telerik_ReportViewer_PageNumberInput]");M.length>0&&k(M,function(){var G=$(this);G.attr("aria-label",A.ariaLabelPageNumberEditor),G.attr("min","1"),G.attr("max",""+I)})})}}function s(){r={},r[i.DOCUMENT_MAP_AREA_KEY]=v(),r[i.MENU_AREA_KEY]=h(),r[i.CONTENT_AREA_KEY]=g();var _=E();_&&(r[i.PARAMETERS_AREA_KEY]=_,T(_))}function g(){return Ye(["div[data-role=telerik_ReportViewer_PagesArea]"])}function v(){return Ye(["div[data-role=telerik_ReportViewer_DocumentMapArea]","div[data-role=treeview]"])}function h(){return Ye("ul[data-role=telerik_ReportViewer_MainMenu]")}function E(){return Ye(["div[data-role=telerik_ReportViewer_ParametersArea]","div.trv-parameters-area-content"])}function w(_){if(r&&_.altKey&&_.ctrlKey){var x=r[_.which];if(x&&S(x.parent())){var I="k-focus";n&&n.removeClass(I),x.addClass(I),x.focus(),n=x,_.preventDefault()}}}function T(_){if(_.length!==0){var x=_.parent("div[data-role=telerik_ReportViewer_ParametersArea]");S(x)&&k(_.children(),function(){$(this).keydown(function(I){if(I.which==i.CONFIRM_KEY){var m=x.find("button.trv-parameters-area-preview-button");m.focus(),I.preventDefault()}})})}}function S(_){return _&&!(_.hasClass("k-collapsed")||_.hasClass("trv-hidden"))}function U(_){if(_){var x=_.find("div [data-reporting-action]");!x.length>0||k(x,function(){var I=$(this);I.keydown(function(m){m.which==i.CONFIRM_KEY&&I.click()})})}}function V(){var _=r[i.MENU_AREA_KEY];_&&k(_,function(){var x=$(this),I=x.children("li.k-item");k(I,function(){var m=$(this);if(!m.hasClass("trv-report-pager")){var M=m.attr("aria-label"),G=re(". {0}",[A.ariaLabelExpandable]),Y=m.find("ul").length>0&&M.indexOf(G)<0?G:"",N=re(". {0}",[A.ariaLabelSelected]),b=m.hasClass("k-selected")&&M.indexOf(N)<0?N:"",K=M+Y+b;m.attr("aria-label",K),m.hasClass("k-disabled")?m.attr("aria-disabled","true"):m.removeAttr("aria-disabled")}})})}function q(_){i=_,r=void 0}function W(){return i}return{getKeyMap:W,setKeyMap:q}}var et={viewerInstances:[]};var it={bind:function(t){var e=Array.prototype.slice.call(arguments,1);An(t,e);var a=ar('[data-role^="telerik_ReportViewer_"]');k(a,function(){var r=$(this),n=$.fn[r.attr("data-role")];typeof n=="function"&&n.apply(r,e)})}};function An(t,e){var a=e[0].commands,r=e[1],n='[data-command^="telerik_ReportViewer_"]',i="[data-target-report-viewer]"+n;t.on("click",n,o),et.CommandHandlerAttached||($(document.body).on("click",i,c),et.CommandHandlerAttached=!0),k(a,function(l,d){wn(l,d,r,t)});function o(l){var d=$(this).attr("data-command");if(d){var s=d.substring(21),g=a[s];g&&g.enabled()&&g.exec($(this).attr("data-command-parameter")),l.preventDefault()}}function c(l){var d=$(this),s=d.attr("data-command"),g=d.attr("data-target-report-viewer");if(s&&g){var v=s.substring(21),h=$(g).data("telerik_ReportViewer"),E=h.commands[v];E.enabled()&&E.exec($(this).attr("data-command-parameter")),l.preventDefault()}}}function wn(t,e,a,r){if(e){var n='[data-command="telerik_ReportViewer_'+t+'"]',i='[data-target-report-viewer="'+a.selector+'"]'+n,o=r.find(n),c=$(i);$(e).on("enabledChanged",function(l){(e.enabled()?$.fn.removeClass:$.fn.addClass).call(o.parent("li"),"k-disabled"),(e.enabled()?$.fn.removeClass:$.fn.addClass).call(c,a.disabledButtonClass)}).on("checkedChanged",function(l){var d=o.parent("li");(e.checked()?$.fn.addClass:$.fn.removeClass).call(d,Nn(d)),(e.checked()?$.fn.addClass:$.fn.removeClass).call(c,a.checkedButtonClass)})}}function Nn(t){return t.hasClass("trv-menu-toggleable")?"k-selected !k-bg-primary":"k-selected"}function Mn(t,e){var a,r=$(t),n=r.attr("data-command");n&&(a=e.commands[n]),a&&(r.click(function(i){a.enabled()?a.exec($(this).attr("data-command-parameter")):i.preventDefault()}),$(a).on("enabledChanged",function(i){(a.enabled()?$.fn.removeClass:$.fn.addClass).call(r,"disabled")}).on("checkedChanged",function(i){(a.checked()?$.fn.addClass:$.fn.removeClass).call(r,"checked")}))}var gr="telerik_ReportViewer_LinkButton";$.fn[gr]=function(t){return k(this,function(){$.data(this,gr)||$.data(this,gr,new Mn(this,t))})};function Dn(t,e){var a=$(t),r=0,n=e.commands.goToPage;function i(c){(r!==c||!a.is(":focus"))&&(a.val(c),r=c)}e.controller.pageNumberChange(function(c,l){i(l)}),a.change(function(){var c=$(this).val(),l=Fe(c);if(!isNaN(l)){var d=n.exec(l);i(d)}}),a.keydown(function(c){if(c.which==13)return $(this).change(),c.preventDefault()});function o(c){return/^([0-9]+)$/.test(c)}a.keypress(function(c){if(Pt(c.keyCode))return!0;var l=a.val()+String.fromCharCode(c.charCode);return o(l)}).on("paste",function(c){})}var vr="telerik_ReportViewer_PageNumberInput";$.fn[vr]=function(t){return k(this,function(){$.data(this,vr)||$.data(this,vr,new Dn(this,t))})};function yn(t,e){var a=$(t);e.controller.pageCountChange(function(r,n){a.text(n)})}var mr="telerik_ReportViewer_PageCountLabel";$.fn[mr]=function(t){return k(this,function(){$.data(this,mr)||$.data(this,mr,new yn(this,t))})};var Me={INTERACTIVE:"INTERACTIVE",PRINT_PREVIEW:"PRINT_PREVIEW"},At={AUTO_SELECT:"AUTO_SELECT",FORCE_PDF_PLUGIN:"FORCE_PDF_PLUGIN",FORCE_PDF_FILE:"FORCE_PDF_FILE"},De={SINGLE_PAGE:"SINGLE_PAGE",CONTINUOUS_SCROLL:"CONTINUOUS_SCROLL"},he={FIT_PAGE_WIDTH:"FIT_PAGE_WIDTH",FIT_PAGE:"FIT_PAGE",SPECIFIC:"SPECIFIC"},Ue={INTEGER:"System.Int64",FLOAT:"System.Double",STRING:"System.String",DATETIME:"System.DateTime",BOOLEAN:"System.Boolean"},ot={COMBO_BOX:"COMBO_BOX",LIST_VIEW:"LIST_VIEW"},Ke={RIGHT:"RIGHT",LEFT:"LEFT",TOP:"TOP",BOTTOM:"BOTTOM"},gt={RIGHT:"RIGHT",LEFT:"LEFT"};var Ft={};Ft[he.FIT_PAGE]={scaleMode:he.FIT_PAGE_WIDTH};Ft[he.FIT_PAGE_WIDTH]={scaleMode:he.SPECIFIC,scale:1};Ft[he.SPECIFIC]={scaleMode:he.FIT_PAGE};var hr=[.1,.25,.5,.75,1,1.5,2,4,8];function Er(t){var e=t.controller;if(!e)throw"No options.controller.";var a=t.history;if(!a)throw"No options.history.";function r(){var s={};return e.getDocumentMapState(s),!!s.visible}function n(){var s={};return e.getParametersAreaState(s),!!s.visible}function i(){var s={};return e.getSideMenuVisible(s),!!s.visible}function o(){var s={};return e.getSearchDialogState(s),!!s.visible}function c(){var s={};return e.getSendEmailDialogState(s),!!s.visible}return{historyBack:new Pe(function(){a.back()}),historyForward:new Pe(function(){a.forward()}),stopRendering:new Pe(function(){e.stopRendering()}),goToPrevPage:new Pe(function(){e.navigateToPage(e.getCurrentPageNumber()-1)}),goToNextPage:new Pe(function(){e.navigateToPage(e.getCurrentPageNumber()+1)}),goToFirstPage:new Pe(function(){e.navigateToPage(1)}),goToLastPage:new Pe(function(){e.navigateToPage(e.getPageCount())}),goToPage:new Pe(function(s){if(!isNaN(s)){var g=e.getPageCount();return s>g?s=g:s<1&&(s=1),e.navigateToPage(s),s}}),refresh:new Pe(function(){e.refreshReport(!0)}),export:new Pe(function(s){s&&e.exportReport(s)}),print:new Pe(function(){e.printReport()}),pageMode:new Pe(function(){e.setPageMode(e.getPageMode()===De.SINGLE_PAGE?De.CONTINUOUS_SCROLL:De.SINGLE_PAGE)}),togglePrintPreview:new Pe(function(){e.setViewMode(e.getViewMode()===Me.PRINT_PREVIEW?Me.INTERACTIVE:Me.PRINT_PREVIEW)}),toggleDocumentMap:new Pe(function(){e.setDocumentMapVisible({visible:!r()})}),toggleParametersArea:new Pe(function(){e.setParametersAreaVisible({visible:!n()})}),zoom:new Pe(function(s){var g={};g.scale=s,g.scaleMode=he.SPECIFIC,e.scale(g)}),zoomIn:new Pe(function(){l(1)}),zoomOut:new Pe(function(){l(-1)}),toggleSideMenu:new Pe(function(){e.setSideMenuVisible({visible:!i()})}),toggleZoomMode:new Pe(function(s){var g={};e.getScale(g),e.scale(Ft[g.scaleMode])}),toggleSearchDialog:new Pe(function(){e.setSearchDialogVisible({visible:!o()})}),toggleSendEmailDialog:new Pe(function(){e.setSendEmailDialogVisible({visible:!c()})})};function l(s){var g={};e.getScale(g),g.scale=d(g.scale,s),g.scaleMode=he.SPECIFIC,e.scale(g)}function d(s,g){for(var v=-1,h=hr.length,E=0;E<h;E++){var w=hr[E];if(s<w){v=E-.5;break}if(s===w){v=E;break}}return v=v+g,g>=0?v=Math.round(v-.49):v=Math.round(v+.49),v<0?v=0:v>h-1&&(v=h-1),hr[v]}}function Pe(t){var e=!0,a=!1,r={enabled:function(n){if(arguments.length===0)return e;var i=!!n;return e=i,$(this).trigger("enabledChanged"),r},checked:function(n){if(arguments.length===0)return a;var i=!!n;return a=i,$(this).trigger("checkedChanged"),r},exec:t};return r}function xn(){function t(){var e=["AcroPDF.PDF.1","PDF.PdfCtrl.6","PDF.PdfCtrl.5"],a=null;return k(e,function(r,n){try{if(a=new ActiveXObject(n),a)return!1}catch{}}),a}return{hasPdfPlugin:function(){return t()!==null}}}function kn(){function t(){var e=/Firefox[\/\s](\d+\.\d+)/.exec(navigator.userAgent);if(e!==null&&e.length>1){var a=parseFloat(e[1]);if(a>=19)return!1}var r=navigator.mimeTypes["application/pdf"],n=r!==null?r.enabledPlugin:null;if(n){var i=n.description;return i.indexOf("Adobe")!==-1&&(i.indexOf("Version")===-1||parseFloat(i.split("Version")[1])>=6)}return!1}return{hasPdfPlugin:function(){return t()}}}function br(t){function e(){var a=navigator.plugins,r=!1;return k(a,function(n,i){if(a[n].name===t||a[n].name==="Adobe Acrobat")return r=!0,!1}),r}return{hasPdfPlugin:function(){return e()}}}function Ln(){return{hasPdfPlugin:function(){return!1}}}function On(){if(window.navigator){var t=window.navigator.userAgent.toLowerCase();return t.indexOf("msie")>-1||t.indexOf("mozilla")>-1&&t.indexOf("trident")>-1?xn():t.indexOf("firefox")>-1?kn():t.indexOf("edg/")>-1?br("Microsoft Edge PDF Plugin"):t.indexOf("chrome")>-1?br("Chrome PDF Viewer"):t.indexOf("safari")>-1?br("WebKit built-in PDF"):Ln()}return null}var rn=On(),$n=rn?rn.hasPdfPlugin():!1,Ut=function(){var t;function e(c){var l=null;if(t||(t=document.createElement("iframe"),t.style.display="none",t.onload=function(){try{t.contentDocument.execCommand("print",!0,null)}catch(s){at(s)}finally{l&&(window.URL||window.webkitURL).revokeObjectURL(l)}}),r(c)&&a()){t.src=c,document.body.appendChild(t);return}var d=new XMLHttpRequest;d.open("GET",c,!0),d.responseType="arraybuffer",d.onload=function(s){if(this.status===200){var g=new Blob([this.response],{type:"application/pdf"});a()?window.navigator.msSaveOrOpenBlob(g):(l=(window.URL||window.webkitURL).createObjectURL(g),t.src=l,document.body.appendChild(t))}else console.log("Could not retrieve remote PDF document.")},d.send()}function a(){return window.navigator&&window.navigator.msSaveOrOpenBlob}function r(c){var l=window.location,d=document.createElement("a");return d.setAttribute("href",c),d.host==""&&(d.href=d.href),l.hostname===d.hostname&&l.protocol===d.protocol&&l.port===d.port}function n(c){window.open(c,"_self")}var i=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),o=i?n:e;return{print:function(c){o(c)},getDirectPrintState:function(){return $n}}}();var St=function(){var t={};function e(n,i,o,c){var l=[].concat(i).map(function(d){return r(n,o(d),c)});if(n.multivalue){if(i==null||i.length==0){if(n.allowNull)return i;throw A.invalidParameter}return l}return l[0]}function a(n,i){return n.allowNull&&[null,"",void 0].indexOf(i)!=-1}function r(n,i,o){if(n.availableValues){var c=!1;if(k(n.availableValues,function(l,d){return c=o(i,d.value),!c}),!c){if(n.allowNull&&!i)return i;throw A.invalidParameter}}return i}return t[Ue.STRING]={validate:function(n,i){return e(n,i,function(o){if(!o){if(n.allowNull)return null;if(n.allowBlank)return"";throw A.parameterIsEmpty}return o},function(o,c){return o==c})}},t[Ue.FLOAT]={validate:function(n,i){return e(n,i,function(o){var c=Tt(o);if(isNaN(c)){if(a(n,o))return null;throw A.parameterIsEmpty}return c},function(o,c){return Tt(o)==Tt(c)})}},t[Ue.INTEGER]={validate:function(n,i){return e(n,i,function(o){var c=Fe(o);if(isNaN(c)){if(a(n,o))return null;throw A.parameterIsEmpty}return c},function(o,c){return Fe(o)==Tt(c)})}},t[Ue.DATETIME]={validate:function(n,i){return e(n,i,function(o){if(n.allowNull&&(o===null||o===""||o===void 0))return null;if(!isNaN(Date.parse(o)))return n.availableValues?o:ct(o);throw A.invalidDateTimeValue},function(o,c){return o=ct(o),c=ct(c),o.getTime()==c.getTime()})}},t[Ue.BOOLEAN]={validate:function(n,i){return e(n,i,function(o){if(["true","false"].indexOf((""+o).toLowerCase())!=-1)return!!o;if(a(n,o))return null;throw A.parameterIsEmpty},function(o,c){return!!o==!!c})}},{validate:function(n,i){var o=t[n.type];if(!o)throw re(A.cannotValidateType,n);return o.validate(n,i)}}}();var nn={pagePollIntervalMs:500,documentInfoPollIntervalMs:2e3},nn={pagePollIntervalMs:500,documentInfoPollIntervalMs:2e3};function Pr(t){var e={},a,r,n,i,o,c,l,d,s,g,v,h=Me.INTERACTIVE,E=De.CONTINUOUS_SCROLL,w,T=At.AUTO_SELECT,S,U,V=!1,q=St,W=new Le,_;Z(),t=le({},nn,t),t.settings.printMode&&(T=t.settings.printMode());var x=t.serviceClient;if(!x)throw A.noServiceClient;a=t.settings.clientId(),M();function I(f){a=f,G(),t.settings.clientId(a),M()}function m(){a=null,i=null,G(),_=null,t.settings.clientId(null)}function M(){if(!t.settings.keepClientAlive)throw new Error("Required settings.keepClientAlive() is not supplied for ReportViewerController");if(t.settings.keepClientAlive()&&a)return x.getClientsSessionTimeoutSeconds().then(function(f){_=new Fn(x,a,f),_.start()})}function G(){t.settings.keepClientAlive()&&_&&_.stop()}function Y(){return h===Me.PRINT_PREVIEW?"HTML5":"HTML5Interactive"}function N(f,y,B){var X="";if(!f.xhr)throw X=f,J(Oe({responseText:X},null,null,null)),X;var z=f.xhr;xt(z)&&bt();var ne=Oe(z,f.status,tr(f.error)?"":f.error,y);if(J(ne),!B){if(nr(z)){var de=pt(z);if(de)throw de}throw z.responseJSON&&de.exceptionMessage?z.responseJSON.exceptionMessage:A.promisesChainStopError}}function b(){return i||(i=x.registerClient().catch(function(f){N(f,A.errorRegisteringViewer)}).then(function(f){I(f)}).catch(m)),i}function K(){return o||(o=se(l,d).then(function(f){r=f}),o.catch(function(f){o=null})),o}function Z(){n=null,r=null,o=null,R()}function R(){g=v=0}function j(f){var y=f.length;return y===1?f[0]:y>1?re(f[0],Array.prototype.slice.call(f,1)):""}function J(){var f=j(arguments);e.error(f)}function se(f,y){return _e(),x.createReportInstance(a,f,y).catch(function(B){N(B,re(A.errorCreatingReportInstance,[Ne(f)]))})}function pe(f,y,B,X,z){return _e(),Ae(),x.createReportDocument(a,r,f,y,B,X,z).catch(function(ne){N(ne,re(A.errorCreatingReportDocument,[Ne(l),Ne(f)]))})}function ue(f,y){return _e(),Ae(),x.sendDocument(a,r,f,y).catch(function(B){N(B,re(A.errorSendingDocument,[Ne(l)]))})}function fe(f,y,B,X){return!X.isCanceled&&y===r?x.getDocumentInfo(f,y,B).catch(N).then(function(z){return z&&z.documentReady||(z.promise=new Promise(function(ne,de){window.setTimeout(ne,X.documentInfoPollIntervalMs)}).then(function(){return fe(f,y,B,X)})),z}):Promise.reject()}function Ce(f,y,B,X){var z={};function ne(ge){f&&(n=ge,xe(),pn())}function de(ge){z.documentInfoPollIntervalMs=t.pagePollIntervalMs,f&&f.beforeLoadReport(ge)}function xe(){f&&f.beginLoadReport()}function Ze(ge){f&&f.onReportLoadComplete(ge)}function Kr(ge){f&&(v=ge.pageCount,f.reportLoadProgress(ge))}function pn(){_e(),Ae(),Ve(),zr(fe(a,r,n,z))}function zr(ge){ge.then(function(je){je.documentReady?Ze(je):(Kr(je),zr(je.promise))})}function ra(){f&&f.raiseError.apply(this,arguments)}function jr(ge){return new Promise(function(je,na){var Yr=function(){x.getPage(a,r,n,ge).catch(N).then(function(Xr){Xr.pageReady?je(Xr):window.setTimeout(Yr,t.pagePollIntervalMs)})};Yr()})}function gn(ge){f&&f.beginLoadPage(ge)}var zt;function jt(){if(!zt){var ge=Y(),je=vn();de({deviceInfo:je}),zt=b().then(K).then(function(){return pe(ge,je,y,B,X)}).then(ne)}return zt}function vn(){var ge=ie();return ge.ContentOnly=!0,ge.UseSVG=er(),ge}return{beginLoad:function(){jt()},beginGetPage:function(ge){_e(),jt().then(function(){return gn(ge),jr(ge)}).then(function(je){z.documentInfoPollIntervalMs=t.documentInfoPollIntervalMs,f&&f.pageReady(je)})},getPageData:function(ge){return _e(),jt().then(function(){return jr(ge)})},dispose:function(){f=null},cancel:function(){z.isCanceled=!0}}}function ie(){var f={};t.settings.enableAccessibility()&&(f.enableAccessibility=!0,f.contentTabIndex=t.settings.contentTabIndex);var y={};e.getSearchDialogState(y);var B=y.visible,X=t.settings.searchMetadataOnDemand(),z=!X||B;return f.enableSearch=z,f}function Ge(f){var y="InvalidParameterException";return Ot(f,y,"Telerik.Reporting.Services.Engine."+y)?A.missingOrInvalidParameter:""}function Oe(f,y,B,X){var z=Rt(f.responseText),ne="";if(z){var de=Ge(z.exceptionType||z.error);if(de)return de;ne=Ne(z.message);var xe=Ne(z.exceptionMessage||z.error_description);xe&&(ne?ne+=" "+xe:ne=xe)}else ne=Ne(f.responseText);return(X||B)&&(ne&&(ne=" "+ne),ne=Ne(X||B)+ne),xt(f)&&(ne+="<br />"+A.clientExpired),ne}function oe(f){w&&w.beginGetPage(f)}function $e(f,y,B){if(!l){J(A.noReport);return}w&&(w.dispose(),w=null),Z(),w=new Ce(e,!f,y,B),w.beginLoad()}function Ie(f){e.exportStarted(f)}function C(f){e.exportReady(f)}function te(f){e.sendEmailStarted(f)}function ae(f){e.sendEmailReady(f)}function ce(f){e.printStarted(f)}function Te(f){e.printReady(f)}function ve(f){e.showNotification(f)}function ke(f){e.hideNotification(f)}function Re(f){e.setUIState(f)}function ze(){we();var f={ImmediatePrint:!0},y={deviceInfo:f,handled:!1};if(ce(y),!y.handled){Re({operationName:"PrintInProgress",inProgress:!0}),ve({stringResources:"preparingPrint"});var B=Be(),X=B?"inline":"attachment",z="response-content-disposition="+X;L("PDF",f).then(function(ne){var de=x.formatDocumentUrl(ne.clientId,ne.instanceId,ne.documentId,z),xe={url:de,handled:!1};Te(xe),ke(),Re({operationName:"PrintInProgress",inProgress:!1}),xe.handled||Ut.print(de)})}}function Be(){switch(T){case At.FORCE_PDF_FILE:case!1:return!1;case At.FORCE_PDF_PLUGIN:case!0:return!0;default:return Ut.getDirectPrintState()}}function qe(f,y){we(),y||(y=ie());var B={format:f,deviceInfo:y,handled:!1};if(Ie(B),!B.handled){var X="response-content-disposition=attachment";Re({operationName:"ExportInProgress",inProgress:!0}),ve({stringResources:"preparingDownload"}),L(f,B.deviceInfo).then(function(z){var ne=x.formatDocumentUrl(z.clientId,z.instanceId,z.documentId,X),de={url:ne,format:f,handled:!1,windowOpenTarget:"_self"};C(de),ke(),Re({operationName:"ExportInProgress",inProgress:!1}),de.handled||window.open(ne,de.windowOpenTarget)})}}function D(f){we(),f.deviceInfo||(f.deviceInfo=ie());var y={deviceInfo:f.deviceInfo,handled:!1,format:f.format};te(y);var B="response-content-disposition=attachment";y.handled||L(f.format,f.deviceInfo).then(function(X){var z=x.formatDocumentUrl(X.clientId,X.instanceId,X.documentId,B);f.url=z,f.handled=!1,ae(f),delete f.deviceInfo,f.handled||ue(X.documentId,f)})}function L(f,y){return we(),b().then(K).then(function(){return pe(f,y,!0,n)}).then(function(B){return ee(a,r,B,t)})}function ee(f,y,B,X){return new Promise(function(z,ne){var de=function(xe){xe.then(function(Ze){Ze.documentReady?z({clientId:f,instanceId:y,documentId:B}):de(Ze.promise)})};de(fe(f,y,B,X))})}function Ee(f){we(),Ae(),Ve(),rt(),e.refreshReportCore(!1,n,f)}function _e(){if(!a)throw A.controllerNotInitialized}function Ae(){if(!r)throw A.noReportInstance}function Ve(){if(!n)throw A.noReportDocument}function we(){if(!l)throw A.noReport}function dt(f){var y;return f&&f.length&&(y=f[0]),typeof y=="function"?y:null}function H(f,y){var B=dt(y);return B?W.on(f,B):W.trigger(f,y),e}function Le(){var f={};function y(X){var z=f[X];return z||(f[X]=z=new B(X)),z}return{on:function(X,z){y(X).on(z)},trigger:function(X,z){y(X).trigger(z)}};function B(X){var z=[],ne={on:function(de){z.push(de)},trigger:function(de){var xe=[].slice.call(de);xe.unshift(X);for(var Ze=0;Ze<z.length;Ze++)z[Ze].apply(e,xe)}};return ne}}function u(f,y){return b().then(function(){return x.getParameters(a,f,y||d||{}).catch(function(B){N(B,A.unableToGetReportParameters)})})}function p(){return U?Promise.resolve(U):(c||(c=x.getDocumentFormats().catch(N)),c)}function P(){return x.getServiceVersion().catch(N)}function O(f,y){if(f)for(var B=0,X=f.length;B<X;B++){var z=f[B];if(z.id===y)return z.page;var ne=O(z.items,y);if(ne)return ne}return null}function F(f){var y={};return Array.isArray(f)&&f.forEach(function(B){y[B.Key]=B.Value}),y}function Q(f){me(f),e.reportSourceChanged()}function me(f){t.settings.reportSource&&t.settings.reportSource(f)}function be(f){t.settings.pageNumber(f),e.currentPageChanged()}var He={sorting:function(f){Ee(f.Id)},toggleVisibility:function(f){Ee(f.Id)},navigateToReport:function(f){var y=f.Value;rt(),e.setReportSource({report:y.Report,parameters:F(y.ParameterValues)}),e.refreshReport(!1)},navigateToUrl:function(f){var y=f.Value;window.open(y.Url,y.Target)},navigateToBookmark:function(f){var y=f.Value,B=O(S,y);e.navigateToPage(B,{type:"bookmark",id:y})},customAction:function(f){}};function It(f){e.interactiveActionExecuting(f)}function Je(f){var y=f.action,B=He[y.Type];typeof B=="function"&&window.setTimeout(function(){It(f),f.cancel||B(y)},0)}function rt(){e.serverActionStarted()}function nt(f){e.interactiveActionEnter({action:f.action,element:f.element})}function ht(f){e.interactiveActionLeave({action:f.action,element:f.element})}function Et(){return H(e.Events.CLIENT_EXPIRED,arguments)}function bt(){V=!0,e.clientExpired()}function Wt(f){e.toolTipOpening(f)}function Nt(f){return!f.searchToken||f.searchToken===""?Promise.resolve(null):x.getSearchResults(a,r,n,f.searchToken,f.matchCase,f.matchWholeWord,f.useRegex).catch(Kt)}function Kt(f){if(!rr(f.xhr))throw N(f,null,!0),null;var y=Rt(f.xhr.responseText);throw y.exceptionMessage}function dn(f){for(var y=document.querySelector(".trv-pages-area .trv-error-message"),B=document.createElement("ul"),X=0;X<f.length;X++){var z=document.createElement("li");z.classList.add(f[X].name),z.innerText=re("{0} ({1})",[f[X].text,f[X].name]),B.appendChild(z)}y.appendChild(B)}return e.Events={ERROR:"trv.ERROR",EXPORT_STARTED:"trv.EXPORT_STARTED",EXPORT_DOCUMENT_READY:"trv.EXPORT_DOCUMENT_READY",PRINT_STARTED:"trv.PRINT_STARTED",PRINT_DOCUMENT_READY:"trv.PRINT_DOCUMENT_READY",BEFORE_LOAD_PARAMETERS:"trv.BEFORE_LOAD_PARAMETERS",ON_LOADED_REPORT_CHANGE:"trv.ON_LOADED_REPORT_CHANGE",BEFORE_LOAD_REPORT:"trv.BEFORE_LOAD_REPORT",BEGIN_LOAD_REPORT:"trv.BEGIN_LOAD_REPORT",REPORT_LOAD_COMPLETE:"trv.REPORT_LOAD_COMPLETE",REPORT_LOAD_PROGRESS:"trv.REPORT_LOAD_PROGRESS",REPORT_LOAD_FAIL:"trv.REPORT_LOAD_FAIL",BEGIN_LOAD_PAGE:"trv.BEGIN_LOAD_PAGE",PAGE_READY:"trv.PAGE_READY",VIEW_MODE_CHANGED:"trv.VIEW_MODE_CHANGED",PAGE_MODE_CHANGED:"trv.PAGE_MODE_CHANGED",PRINT_MODE_CHANGED:"trv.PRINT_MODE_CHANGED",REPORT_SOURCE_CHANGED:"trv.REPORT_SOURCE_CHANGED",NAVIGATE_TO_PAGE:"trv.NAVIGATE_TO_PAGE",CURRENT_PAGE_CHANGED:"trv.CURRENT_PAGE_CHANGED",GET_DOCUMENT_MAP_STATE:"trv.GET_DOCUMENT_MAP_STATE",SET_DOCUMENT_MAP_VISIBLE:"trv.SET_DOCUMENT_MAP_VISIBLE",GET_PARAMETER_AREA_STATE:"trv.GET_PARAMETER_AREA_STATE",SET_PARAMETER_AREA_VISIBLE:"trv.SET_PARAMETER_AREA_VISIBLE",PAGE_SCALE:"trv.PAGE_SCALE",GET_PAGE_SCALE:"trv.GET_PAGE_SCALE",SERVER_ACTION_STARTED:"trv.SERVER_ACTION_STARTED",SET_TOGGLE_SIDE_MENU:"trv.SET_TOGGLE_SIDE_MENU",GET_TOGGLE_SIDE_MENU:"trv.GET_TOGGLE_SIDE_MENU",UPDATE_UI:"trv.UPDATE_UI",CSS_LOADED:"trv.CSS_LOADED",RELOAD_PARAMETERS:"trv.RELOAD_PARAMETERS",INTERACTIVE_ACTION_EXECUTING:"trv.INTERACTIVE_ACTION_EXECUTING",INTERACTIVE_ACTION_ENTER:"trv.INTERACTIVE_ACTION_ENTER",INTERACTIVE_ACTION_LEAVE:"trv.INTERACTIVE_ACTION_LEAVE",UPDATE_UI_INTERNAL:"trv.UPDATE_UI_INTERNAL",CLIENT_EXPIRED:"trv.CLIENT_EXPIRED",TOOLTIP_OPENING:"trv.TOOLTIP_OPENING",PAGE_NUMBER:"trv.PAGE_NUMBER",PAGE_COUNT:"trv.PAGE_COUNT",GET_SEARCH_DIALOG_STATE:"trv.GET_SEARCH_DIALOG_STATE",SET_SEARCH_DIALOG_VISIBLE:"trv.SET_SEARCH_DIALOG_VISIBLE",SET_SEND_EMAIL_DIALOG_VISIBLE:"trv.SET_SEND_EMAIL_DIALOG_VISIBLE",SEND_EMAIL_STARTED:"trv.SEND_EMAIL_STARTED",SEND_EMAIL_READY:"trv.SEND_EMAIL_READY",SHOW_NOTIFICATION:"trv.SHOW_NOTIFICATION",HIDE_NOTIFICATION:"trv.HIDE_NOTIFICATION",UI_STATE:"trv.UI_STATE",SCROLL_PAGE_READY:"trv.SCROLL_PAGE_READY",UPDATE_SCROLL_PAGE_DIMENSIONS_READY:"trv.UPDATE_SCROLL_PAGE_DIMENSIONS_READY",MISSING_OR_INVALID_PARAMETERS:"trv.MISSING_OR_INVALID_PARAMETERS",RENDERING_STOPPED:"trv.RENDERING_STOPPED"},le(e,{getPageData:function(f){if(w)return w.getPageData(f)},getReportSource:function(){return l===null?null:{report:l,parameters:le({},d)}},setReportSource:function(f){return f===null?(l=d=null,Z(),Q(f),this):(l=f.report,d=f.parameters,Q(f),this)},updateSettings:function(f){t.settings=le({},f,t.settings)},clearReportSource:function(){return l=d=null,Z(),Q(void 0),this},getReportDocumentId:function(){return n},setReportDocumentId:function(f){n=f},setParameters:function(f){d=f},setProcessedParameter:function(f){s=f},getPageCount:function(){return v},getCurrentPageNumber:function(){return g},setCurrentPageNumber:function(f){var y=Fe(f);return y!==g&&(g=y,be(y)),this},getViewMode:function(){return h},setViewMode:function(f){return h!==f&&(h=f,e.viewModeChanged(f),l&&e.refreshReportCore(!1,n)),e},getPageMode:function(){return E},setPageMode:function(f){return E!==f&&(E=f,e.pageModeChanged(f),l&&e.refreshReportCore(!1,n)),e},getPrintMode:function(){return T},setPrintMode:function(f){return T!==f&&(T=f,e.printModeChanged(f)),e},previewReport:function(f,y,B){e.onLoadedReportChange(),e.refreshReportCore(f,y,B)},refreshReportCore:function(f,y,B){$e(f,y,B)},stopRendering:function(){we(),Ae(),Ve(),x.deleteReportDocument(a,r,n).catch(N).then(function(){w&&w.cancel(),R(),e.renderingStopped()})},getReportParameters:function(){var f={};for(var y in s){var B=s[y],X=d[y];B&&B.availableValues?B.multivalue?f[y]=Vn(B,X,y):f[y]=an(B,X,y):f[y]=X}return f},refreshReport:function(f,y,B){if(e.onLoadedReportChange(),V&&(V=!1,m()),!l){J(A.noReport);return}var X=e.loadParameters(null);X.then(function(z){var ne={},de=[],xe=!1;k(z||[],function(){try{var Ze=q.validate(this,this.value);ne[this.id]=Ze}catch{xe=!0,de.push(this);return}}),xe?(J(A.missingOrInvalidParameter),dn(de),e.missingOrInvalidParameters()):(e.setParameters(ne),e.refreshReportCore(f,y,B))}),e.reloadParameters(X)},exportReport:function(f,y){qe(f,y)},sendReport:function(f){D(f)},printReport:function(){ze()},getReportPage:function(f){oe(f)},executeReportAction:function(f){Je(f)},reportActionEnter:function(f){nt(f)},reportActionLeave:function(f){ht(f)},reportToolTipOpening:function(f){Wt(f)},loadParameters:function(f){return l===null?{}:(e.beforeLoadParameters(f===null),u(l,f))},getDocumentFormats:function(){return p()},getServiceVersion:function(){return P()},setAuthenticationToken:function(f){x.setAccessToken(f)},clientId:function(){return a},onReportLoadComplete:function(f){v=f.pageCount,S=f.bookmarkNodes,U=f.renderingExtensions,me(e.getReportSource()),e.reportLoadComplete(f)},raiseError:J,getSearchResults:function(f,y){return Nt(f,y)},on:W.on,showNotification:function(){return H(e.Events.SHOW_NOTIFICATION,arguments)},hideNotification:function(){return H(e.Events.HIDE_NOTIFICATION,arguments)},setUIState:function(){return H(e.Events.UI_STATE,arguments)},error:function(){return H(e.Events.ERROR,arguments)},reloadParameters:function(){return H(e.Events.RELOAD_PARAMETERS,arguments)},exportStarted:function(){return H(e.Events.EXPORT_STARTED,arguments)},exportReady:function(){return H(e.Events.EXPORT_DOCUMENT_READY,arguments)},sendEmailStarted:function(){return H(e.Events.SEND_EMAIL_STARTED,arguments)},sendEmailReady:function(){return H(e.Events.SEND_EMAIL_READY,arguments)},printStarted:function(){return H(e.Events.PRINT_STARTED,arguments)},printReady:function(){return H(e.Events.PRINT_DOCUMENT_READY,arguments)},beforeLoadParameters:function(){return H(e.Events.BEFORE_LOAD_PARAMETERS,arguments)},onLoadedReportChange:function(){return H(e.Events.ON_LOADED_REPORT_CHANGE,arguments)},beforeLoadReport:function(){return H(e.Events.BEFORE_LOAD_REPORT,arguments)},beginLoadReport:function(){return H(e.Events.BEGIN_LOAD_REPORT,arguments)},reportLoadComplete:function(){return H(e.Events.REPORT_LOAD_COMPLETE,arguments)},reportLoadProgress:function(){return H(e.Events.REPORT_LOAD_PROGRESS,arguments)},reportLoadFail:function(){return H(e.Events.REPORT_LOAD_FAIL,arguments)},beginLoadPage:function(){return H(e.Events.BEGIN_LOAD_PAGE,arguments)},pageReady:function(){return H(e.Events.PAGE_READY,arguments)},viewModeChanged:function(){return H(e.Events.VIEW_MODE_CHANGED,arguments)},pageModeChanged:function(){return H(e.Events.PAGE_MODE_CHANGED,arguments)},printModeChanged:function(){return H(e.Events.PRINT_MODE_CHANGED,arguments)},reportSourceChanged:function(){return H(e.Events.REPORT_SOURCE_CHANGED,arguments)},navigateToPage:function(){return H(e.Events.NAVIGATE_TO_PAGE,arguments)},currentPageChanged:function(){return H(e.Events.CURRENT_PAGE_CHANGED,arguments)},getDocumentMapState:function(){return H(e.Events.GET_DOCUMENT_MAP_STATE,arguments)},setDocumentMapVisible:function(){return H(e.Events.SET_DOCUMENT_MAP_VISIBLE,arguments)},getParametersAreaState:function(){return H(e.Events.GET_PARAMETER_AREA_STATE,arguments)},setParametersAreaVisible:function(){return H(e.Events.SET_PARAMETER_AREA_VISIBLE,arguments)},setSideMenuVisible:function(){return H(e.Events.SET_TOGGLE_SIDE_MENU,arguments)},getSideMenuVisible:function(){return H(e.Events.GET_TOGGLE_SIDE_MENU,arguments)},scale:function(){return H(e.Events.PAGE_SCALE,arguments)},getScale:function(){return H(e.Events.GET_PAGE_SCALE,arguments)},serverActionStarted:function(){return H(e.Events.SERVER_ACTION_STARTED,arguments)},cssLoaded:function(){return H(e.Events.CSS_LOADED,arguments)},interactiveActionExecuting:function(){return H(e.Events.INTERACTIVE_ACTION_EXECUTING,arguments)},interactiveActionEnter:function(){return H(e.Events.INTERACTIVE_ACTION_ENTER,arguments)},interactiveActionLeave:function(){return H(e.Events.INTERACTIVE_ACTION_LEAVE,arguments)},updateUI:function(){return H(e.Events.UPDATE_UI,arguments)},updateUIInternal:function(){return H(e.Events.UPDATE_UI_INTERNAL,arguments)},toolTipOpening:function(){return H(e.Events.TOOLTIP_OPENING,arguments)},pageNumberChange:function(){return H(e.Events.PAGE_NUMBER,arguments)},pageCountChange:function(){return H(e.Events.PAGE_COUNT,arguments)},getSearchDialogState:function(){return H(e.Events.GET_SEARCH_DIALOG_STATE,arguments)},getSendEmailDialogState:function(){return H(e.Events.GET_SEND_EMAIL_DIALOG_STATE,arguments)},setSearchDialogVisible:function(){return H(e.Events.SET_SEARCH_DIALOG_VISIBLE,arguments)},setSendEmailDialogVisible:function(){return H(e.Events.SET_SEND_EMAIL_DIALOG_VISIBLE,arguments)},scrollPageReady:function(){return H(e.Events.SCROLL_PAGE_READY,arguments)},updatePageDimensionsReady:function(){return H(e.Events.UPDATE_SCROLL_PAGE_DIMENSIONS_READY,arguments)},missingOrInvalidParameters:function(){return H(e.Events.MISSING_OR_INVALID_PARAMETERS,arguments)},renderingStopped:function(){return H(e.Events.RENDERING_STOPPED,arguments)},clientExpired:Et,dispose:function(){G(),this.keepClientAliveSentinel=null}}),e}function an(t,e,a){try{var r=t.availableValues.find(n=>n.value===e);if(!r)throw new Error(`The available values of parameter ${a} do not contain Value property that equals ${e}`);return{valueMember:e,displayMember:r.name}}catch(n){at(n)}}function Vn(t,e,a){var r=[];for(var n in e)r.push(an(t,e[n],a));return r}function Fn(t,e,a){function r(s){return typeof s=="number"&&isFinite(s)}if(!t)throw A.noServiceClient;var n,i;if(!r(a))throw"sessionTimeoutSeconds must a number and must be finite";a<=120?i=o(a)/2:i=o(a-60);function o(s){return s*1e3}function c(){i<=0||(n=setInterval(function(){t.keepClientAlive(e)},i))}function l(){d(),c()}function d(){n&&(clearInterval(n),n=null)}return{start:c,restart:l,stop:d}}var ye={EXPORT_BEGIN:"EXPORT_BEGIN",EXPORT_END:"EXPORT_END",PRINT_BEGIN:"PRINT_BEGIN",PRINT_END:"PRINT_END",RENDERING_BEGIN:"RENDERING_BEGIN",RENDERING_END:"RENDERING_END",PAGE_READY:"PAGE_READY",ERROR:"ERROR",UPDATE_UI:"UPDATE_UI",INTERACTIVE_ACTION_EXECUTING:"INTERACTIVE_ACTION_EXECUTING",INTERACTIVE_ACTION_ENTER:"INTERACTIVE_ACTION_ENTER",INTERACTIVE_ACTION_LEAVE:"INTERACTIVE_ACTION_LEAVE",VIEWER_TOOLTIP_OPENING:"VIEWER_TOOLTIP_OPENING",SEND_EMAIL_BEGIN:"SEND_EMAIL_BEGIN",SEND_EMAIL_END:"SEND_EMAIL_END"};function Tr(t){var e=t.controller,a=!1;if(!e)throw"No controller (telerikReporting.reportViewerController) has been specified.";var r=t.settings,n=r.history()||{records:[],position:-1};e.onLoadedReportChange(function(){a=!1,d(!0)}).currentPageChanged(function(){l()}).reportLoadComplete(function(E,w){d(!1)}).clientExpired(function(){a=!0;for(var E=n.records,w=0;w<E.length;w++)E[w].reportDocumentId=null});function i(){var E=n.records;return E.length>0?E[n.position]:null}function o(E){var w=n.records,T=n.position;w=Array.prototype.slice.call(w,0,T+1),w.push(E),n.records=w,n.position=w.length-1,c()}function c(){r.history(n)}function l(){var E=i();E&&(E.pageNumber=e.getCurrentPageNumber(),E.viewMode=e.getViewMode(),E.reportDocumentId=e.getReportDocumentId(),c())}function d(E){h();var w=i(),T=e.getReportSource();(!w||!Qt(w.reportSource,T))&&o({reportSource:T,pageNumber:1,temp:E})}function s(E){e.setReportDocumentId(E.reportDocumentId),e.setViewMode(E.viewMode),e.setReportSource(E.reportSource),e.refreshReport(!1,E.reportDocumentId),e.navigateToPage(E.pageNumber)}function g(E){var w=n.position,T=n.records.length,S=w+E;return 0<=S&&S<T}function v(E){var w=n.position,T=n.records.length,S=w+E;S<0?S=0:S>=T&&(S=T-1),S!=w&&(n.position=S,c(),s(i()))}function h(){for(var E=n.records.length-1;E>=0&&n.records[E].temp===!0;){n.records.splice(E,1),n.position>=E&&n.position--;E--}}return{back:function(){v(-1)},forward:function(){v(1)},canMoveBack:function(){return g(-1)},canMoveForward:function(){return g(1)},loadCurrent:function(){var E=i();return E&&s(E),!!E}}}function Sr(t,e){var a,r;n(t);function n(v){if(typeof $.fn.kendoTouch=="function")try{$(v).mousedown(function(){r=!0}).mouseup(function(){r=!1}).kendoTouch({multiTouch:!0,enableSwipe:!0,swipe:function(h){r||d(h)},gesturestart:function(h){r||o(h)},gestureend:function(h){r||void 0},gesturechange:function(h){r||l(h)},doubletap:function(h){r||i(h)},touchstart:function(h){r||g("touchstart")}})}catch(h){throw console.error("Instantiation of Kendo Touch threw an exception",h),h}}function i(v){g("doubletap",v)}function o(v){a=kendo.touchDelta(v.touches[0],v.touches[1]).distance}function c(v){}function l(v){var h=kendo.touchDelta(v.touches[0],v.touches[1]).distance;s({distance:h,lastDistance:a}),a=h}function d(v){g("swipe",v)}function s(v){g("pinch",v)}function g(v,h){var E=e[v];typeof E=="function"&&E(h)}}var Ir={controller:{},$placeholder:null,$pageContainer:null,pageContainer:null,$pageWrapper:null,pageWrapper:null,viewMode:null,loadedPage:{},scrollInProgress:!1,enabled:!1,pageCount:0,additionalTopOffset:130,pageDistance:20,oldScrollTopPosition:0,skeletonTemplate:'<div class="trv-report-page trv-skeleton-page trv-skeleton-{0}" style="{1}" data-page="{0}"><div class="trv-skeleton-wrapper" style="{2}"></div></div>',init:function(e,a){var r=this;r.$placeholder=$("[data-selector='"+a.viewerSelector+"']").find(e),r.$pageContainer=this.$placeholder.find(".trv-page-container"),r.pageContainer=this.$pageContainer[0],r.$pageWrapper=this.$placeholder.find(".trv-page-wrapper"),r.pageWrapper=this.$pageWrapper[0],r.controller=a.controller,r.viewMode=null,r.loadedPage={},r.scrollInProgress=!1,r.enabled=!1,r.pageCount=0,r.controller.scale(function(n,i){r.enabled&&setTimeout(function(){r._loadMorePages(),r._keepCurrentPageInToView()},100)}).onLoadedReportChange(function(n){r.enabled&&(r.disable(),n!=="trv.ON_LOADED_REPORT_CHANGE"&&setTimeout(function(){r.controller.getPageData(1).then(function(i){r.renderPage(i)})}))}).viewModeChanged(function(n){r.enabled&&r.disable()}).interactiveActionExecuting(function(n,i){var o=i.action.Type;r.enabled&&(o==="sorting"||o==="toggleVisibility")&&r.disable()}).updatePageDimensionsReady(function(n,i){r.enabled&&r._currentPageNumber()>0&&r._keepCurrentPageInToView()}).pageCountChange(function(n,i){r.enabled&&r.pageCount!==i&&(r._currentPageNumber()>0&&!r.scrollInProgress&&r._loadMorePages(),i>1&&r._initEvents(),r.pageCount=i)})},isEnabled:function(){return this.enabled},disable:function(){this.$pageWrapper.empty(),this.enabled=!1,this.loadedPage={},this.pageCount=0,this.$placeholder.removeClass("scrollable"),this._unbind()},enable:function(){this.enabled=!0,this.$placeholder.addClass("scrollable"),this._initEvents()},renderPage:function(e){var a=this,r=a.controller.getViewMode(),n=a.$placeholder.find('[data-page="'+e.pageNumber+'"]');a.enabled?(r!==a.viewMode||!n.length?a._updatePageArea(e):a._navigateToPage(e,n),a.viewMode=a.controller.getViewMode()):(a.enabled=!0,a.$placeholder.addClass("scrollable"),r!==a.viewMode||!n.length?a._updatePageArea(e):(a._render(e,!0),this.$pageContainer.scrollTop(3),a._setCurrentPage(e.pageNumber)),a.viewMode=a.controller.getViewMode(),a._loadMorePages())},navigateToElement:function(e,a){var r=this;r.scrollInProgress=!0,r._isSkeletonScreen(null,a)?r.controller.getPageData(a).then(function(n){r._render(n,!1),r.$pageContainer.animate({scrollTop:e},500,function(){r._setCurrentPage(a),setTimeout(function(){r.scrollInProgress=!1},100)})}):r.$pageContainer.animate({scrollTop:e},500,function(){r._setCurrentPage(a),setTimeout(function(){r.scrollInProgress=!1},100)})},_setCurrentPage:function(e){var a=this;e!==a._currentPageNumber()&&a.controller.setCurrentPageNumber(e),a.controller.getPageCount()>1&&(a.$placeholder.find(".k-state-default").removeClass("k-state-default"),a.$placeholder.find('[data-page="'+e+'"]').addClass("k-state-default")),a._loadNextPreviousPage(e)},_updatePageArea:function(e){var a=this,r=0,n=e.pageNumber;a.scrollInProgress=!0,n>1&&a._generateSkeletonScreens(n),a._render(e,!1),a._setCurrentPage(e.pageNumber),setTimeout(function(){r=n>1?a.$placeholder.find('[data-page="'+n+'"]').position().top:0,a.$pageContainer.animate({scrollTop:r},0,function(){a.scrollInProgress=!1})},100)},_navigateToPage:function(e,a){var r=this;r.scrollInProgress=!0;var n=a.position().top,i=r.$placeholder.find(".trv-report-page"),o=e.pageNumber,c=$(i[0]).height();r._isSkeletonScreen(a,o)?r.controller.getPageData(o).then(function(l){r._render(l,!1),r.$pageContainer.animate({scrollTop:n},500,function(){setTimeout(function(){r._setCurrentPage(l.pageNumber),r.scrollInProgress=!1})})}):(r._updatePageContent(e,a),r.$pageContainer.animate({scrollTop:n},500,function(){setTimeout(function(){r._setCurrentPage(e.pageNumber),r.scrollInProgress=!1})}))},_updatePageContent:function(e,a){this._updatePageStyle(e);var r=e.pageNumber,n=$($.parseHTML(e.pageContent)),i=n.find("div.sheet"),o=this.$placeholder.find('[data-page="'+r+'"]');i.css("margin",0),o.append(i).append($('<div class="trv-page-overlay"></div>')),a.replaceWith(o),this.controller.scrollPageReady({page:e,target:o})},_currentPageNumber:function(){return this.controller.getCurrentPageNumber()},_isSkeletonScreen:function(e,a){return e||(e=this.$placeholder.find('[data-page="'+a+'"]')),e.hasClass("trv-skeleton-"+a)},_addSkeletonScreen:function(e,a){var r=this,n=parseInt(a?e+1:e-1),i=r.$placeholder.find('[data-page="'+n+'"]'),o=i.attr("style"),c=i.find("sheet").attr("style"),l=re(r.skeletonTemplate,[e,o,c]);a?r.$pageWrapper.prepend(l):r.$pageWrapper.append(l)},_generateSkeletonScreens:function(e){var a=this,r="",n=this.$placeholder.find('[data-page="1"]'),i=n.attr("style"),o=n.find("sheet").attr("style"),c=a.$placeholder.find(".trv-report-page").last().attr("data-page"),l=c?parseInt(c)+1:1;for(l;l<e;l++)r=r+re(a.skeletonTemplate,[l,i,o]);a.$pageWrapper.append($(r))},_loadMorePages:function(){var e=this,a=e.controller.getPageCount(),r=e.$pageContainer.innerHeight()>e.$pageWrapper.innerHeight();if(a>1)if(r){e.scrollInProgress=!0;var n=parseInt(e.$placeholder.find(".trv-report-page").last().attr("data-page")),i=n+1;i<=a&&e.controller.getPageData(i).then(function(o){e._render(o,!1),e._loadMorePages(),e.scrollInProgress=!1})}else e._loadVisiblePages(),e.scrollInProgress=!1},_loadVisiblePages:function(){var e=this,a=e.$placeholder.find(".trv-report-page");$.each(a,function(r,n){var i=$(n),o=parseInt(i.attr("data-page"));e._scrolledInToView(i)&&e._isSkeletonScreen(i,o)&&e.controller.getPageData(o).then(function(c){e._render(c,!1)})})},_scrolledInToView:function(e){var a=e[0].getBoundingClientRect(),r=e.closest(".trv-pages-area")[0].getBoundingClientRect(),n=r.top,i=r.top+r.height,o=a.top,c=o+e.outerHeight(!0),l=this.additionalTopOffset+n,d=o>0&&o<i,s=c<i&&c>l;return d||s},_render:function(e,a){var r=this,n=e.pageNumber,i=r.$placeholder.find('[data-page="'+n+'"]');if(!(!a&&i&&i.length&&!r._isSkeletonScreen(i,n))){r.loadedPage[n]=e,r._updatePageStyle(e);var o=$($.parseHTML(e.pageContent)),c=o.find("div.sheet"),l=$('<div class="trv-report-page" data-page="'+n+'"></div>');c.css("margin",0),l.append(c).append($('<div class="trv-page-overlay"></div>')),a&&r.$pageWrapper.empty(),r.$pageWrapper.removeData().data("pageNumber",n);var d=r.$placeholder.find(".trv-skeleton-"+n);d.length?d.replaceWith(l):r.$pageWrapper.append(l),r.controller.scrollPageReady({page:e,target:l})}},_updatePageStyle:function(e){var a=this,r=a.loadedPage[a._lastLoadedPage()]||e,n="trv-"+a.controller.clientId()+"-styles",i;$("#"+n).remove(),i=$("<style id="+n+"></style>"),i.append(r.pageStyles),i.appendTo("head")},_lastLoadedPage:function(){var e=this,a;for(var r in e.loadedPage)e.loadedPage.hasOwnProperty(r)&&(a=r);return a},_loadNextPreviousPage:function(e){var a=this,r,n,i,o;e<a.controller.getPageCount()&&(r=e+1,i=a.$placeholder.find('[data-page="'+r+'"]')),e>1&&(n=e-1,o=a.$placeholder.find('[data-page="'+n+'"]')),o&&o.length&&a._isSkeletonScreen(o,n)&&a.controller.getPageData(n).then(function(c){a._render(c,!1)}),i&&i.length&&a._isSkeletonScreen(i,r)&&a.controller.getPageData(r).then(function(c){a._render(c,!1)})},_clickPage:function(e){var a=this,r=a._currentPageNumber(),n=parseInt(e.attr("data-page"));r!==n&&(a._isSkeletonScreen(e,n)?a.controller.getPageData(n).then(function(i){a._render(i,!1,!0),a._setCurrentPage(i.pageNumber)}):a._setCurrentPage(n))},_initEvents:function(){var e=this;e.$pageContainer.off("click",".trv-report-page").on("click",".trv-report-page",function(a){e._clickPage($(a.currentTarget))}),e.$pageContainer.scroll(function(){var a=e.$placeholder.find(".trv-report-page"),r=parseInt((e.$pageContainer.scrollTop()+e.$pageContainer.innerHeight()).toFixed(0));!e.scrollInProgress&&e.oldScrollTopPosition!==r&&(e.oldScrollTopPosition>r?e._scrollUp(a):e._scrollDown(a,r)),e.oldScrollTopPosition=r}),e.$pageContainer.scroll(function(){var a=e.$placeholder.find(".trv-report-page"),r=parseInt((e.$pageContainer.scrollTop()+e.$pageContainer.innerHeight()).toFixed(0));!e.scrollInProgress&&a.length&&e.oldScrollTopPosition!==r&&e._advanceCurrentPage(a)})},_unbind:function(){var t=this;t.$pageContainer.off("click",".trv-report-page"),t.$pageContainer.off("scroll")},_advanceCurrentPage:function(e){var a=this,r=a._findNewCurrentPage(e),n,i=a._currentPageNumber(),o=a._scrolledInToView(a.$placeholder.find('[data-page="'+i+'"]'));r!==-1?(r=$(r),n=parseInt(r.attr("data-page")),i!==n&&!o&&(a._isSkeletonScreen(r,n)?a.controller.getPageData(n).then(function(c){a._render(c,!1,!0),a._setCurrentPage(c.pageNumber)}):a._setCurrentPage(n))):console.log("Page not found - ",r)},_findNewCurrentPage:function(e){var a=this,r=Math.floor(e.length/2),n=a._findPageInViewPort(r,e);return e.length===1?e[0]:n===0?e[r]:n<0&&e.length>1?a._findNewCurrentPage(e.splice(r,Number.MAX_VALUE)):n>0&&e.length>1?a._findNewCurrentPage(e.splice(0,r)):-1},_findPageInViewPort:function(e,a){var r=this.$placeholder.find(a[e]),n=r[0].getBoundingClientRect(),i=r.closest(".trv-pages-area")[0].getBoundingClientRect(),o=i.top,c=i.top+i.height,l=n.top,d=l+r.outerHeight(!0),s=this.additionalTopOffset+o,g=l<=s&&s<d;return g?0:d<s?-1:1},_scrollDown:function(e,a){var r=this;if(a>=r.pageContainer.scrollHeight-5){var n=parseInt($(e[e.length-1]).attr("data-page")),i=n+1;r._currentPageNumber()<i&&i<=r.controller.getPageCount()&&(r._addSkeletonScreen(i,!1),r.controller.getPageData(i).then(function(o){r._render(o,!1)}))}else r._advanceCurrentPage(e),r._loadVisiblePages()},_scrollUp:function(e){var a=this;if(a.$pageContainer.scrollTop()===0){var r=$(e[0]),n=parseInt(r.attr("data-page")),i=n-1;a._currentPageNumber()>i&&i>=1&&(a._addSkeletonScreen(i,!0),a.controller.getPageData(i).then(function(o){a._render(o,!1),a.$pageContainer.scrollTop(3)}))}else a._advanceCurrentPage(e),a._loadVisiblePages()},_keepCurrentPageInToView:function(){var e=this,a=e.$placeholder.find('[data-page="'+e._currentPageNumber()+'"]'),r=a.position().top,n=a.innerHeight(),i=e.$pageContainer.innerHeight(),o;e.scrollInProgress=!0,n<i&&(o=(i-n)/2,r=parseInt(r-o)),e.$pageContainer.animate({scrollTop:r},0,function(){setTimeout(function(){e.scrollInProgress=!1},100)})}};var _r={$placeholder:null,$scrollableContainer:null,itemsInitialState:{},xFrozenAreasBounds:{},yFrozenAreasBounds:{},freezeMaxZIndex:{},zIndex:1,freezeBGColor:{},currentlyfreezedContainer:{vertical:{},horizontal:{}},isInitialize:!1,scaleFactor:null,init:function(t){this.$placeholder=t,this.$scrollableContainer=t.find(".trv-page-container"),this.isInitialize&&this.reset(t),this._attachToScrollEvent(),this.isInitialize=!0},reset:function(t){this.$placeholder=t,this.$scrollableContainer=t.find(".trv-page-container"),this.itemsInitialState={},this.xFrozenAreasBounds={},this.yFrozenAreasBounds={},this.currentlyfreezedContainer={vertical:{},horizontal:{}}},setScaleFactor:function(t){this.scaleFactor=t},_attachToScrollEvent:function(){var t=this;this.$scrollableContainer.scroll(function(){var a=t.$scrollableContainer.find("div[data-sticky-id]");if(a.length)for(var r=a.map(function(d,s){return $(s).attr("data-sticky-id")}).get(),n=r.filter(function(d,s){return s===r.indexOf(d)}),i=t.$scrollableContainer.scrollTop(),o=t.$scrollableContainer.scrollLeft(),c=0;c<n.length;c++){var l=n[c];t.itemsInitialState[l]||t._saveFreezeItemsInitialState(l),t._updateFreezeItemsOnScroll(l,i,o)}})},_saveFreezeItemsInitialState:function(t){var e=$("[data-sticky-direction][data-sticky-id='"+t+"']"),a=$("[data-reporting-action][data-sticky-id='"+t+"']"),r,n;this.itemsInitialState[t]={},this.freezeBGColor[t]=$("[data-id='"+t+"']").attr("data-sticky-bg-color");for(var i=0;i<e.length;i++){var o=$(e[i]),c=o.attr("data-sticky-direction"),l=o.attr("data-id"),d=o.position(),s={top:d.top/this.scaleFactor,left:d.left/this.scaleFactor},g=Mt(s.left,s.top,o.outerWidth(!0)*this.scaleFactor,o.outerHeight(!0)*this.scaleFactor);switch(c){case"Vertical":r=r?r.union(g):g;break;case"Horizontal":n=n?n.union(g):g;break;default:}this._saveFreezeItemInitialState(t,o,l,s)}this.freezeMaxZIndex[t]=a.length?a.css("zIndex"):this.zIndex,this.yFrozenAreasBounds[t]=r,this.xFrozenAreasBounds[t]=n},_saveFreezeItemInitialState:function(t,e,a,r){var n=e.css("background-color"),i=this._hasSetBgColor(n),o={top:r.top,left:r.left,zIndex:e.css("zIndex"),hasBgColor:i};this.itemsInitialState[t][a]=o},_updateFreezeItemsOnScroll:function(t,e,a){var r=$("div[data-id='"+t+"']");if(this._isInScrollVisibleArea(r)){var n=r.closest(".trv-report-page"),i=n.position(),o=parseFloat(n.css("margin-top")),c=parseFloat(n.css("padding-top")),l=parseFloat(n.css("padding-left")),d=parseFloat(n.css("border-top-width")),s=parseFloat(n.css("border-left-width")),g=$("[data-sticky-direction*='Horizontal'][data-sticky-id='"+t+"']"),v=$("[data-sticky-direction*='Vertical'][data-sticky-id='"+t+"']"),h=g.length>0,E=v.length>0,w=r.position(),T=w.top+i.top+o+c+d,S=w.left+l+s,U=e-T,V=a-S;E&&U>0?e<=r.outerHeight()*this.scaleFactor+T-this.yFrozenAreasBounds[t].height&&(this.currentlyfreezedContainer.vertical[t]=!0,this._updateUIElementsPosition(v,"top",U/this.scaleFactor,t)):this.currentlyfreezedContainer.vertical[t]&&(delete this.currentlyfreezedContainer.vertical[t],this._updateUIElementsPosition(v,"top",-1,t)),h&&V>0?a<=r.outerWidth()*this.scaleFactor+S-this.xFrozenAreasBounds[t].width&&(this.currentlyfreezedContainer.horizontal[t]=!0,this._updateUIElementsPosition(g,"left",V/this.scaleFactor,t)):this.currentlyfreezedContainer.horizontal[t]&&(delete this.currentlyfreezedContainer.horizontal[t],this._updateUIElementsPosition(g,"left",-1,t))}else(this.currentlyfreezedContainer.horizontal[t]||this.currentlyfreezedContainer.vertical[t])&&this._resetToDefaultPosition(t)},_resetToDefaultPosition:function(t){var e=$("[data-sticky-direction*='Horizontal'][data-sticky-id='"+t+"']"),a=$("[data-sticky-direction*='Vertical'][data-sticky-id='"+t+"']");this._updateUIElementsPosition(a,"top",-1,t),this._updateUIElementsPosition(e,"left",-1,t),delete this.currentlyfreezedContainer.horizontal[t],delete this.currentlyfreezedContainer.vertical[t]},_updateUIElementsPosition:function(t,e,a,r){for(var n=0;n<t.length;n++){var i=$(t[n]),o=i.attr("data-sticky-direction"),c=o.indexOf(",")>0,l=i.attr("data-id"),d=this.itemsInitialState[r][l],s=d[e],g=d.zIndex,v=d.hasBgColor,h=1,E=this.freezeMaxZIndex[r]?this.freezeMaxZIndex[r]:h;c?h=g!=="auto"?g:E+2:h=g!=="auto"?g+1:E;var w={"z-index":h};a>=0?s=s+a:w["z-index"]=g,v||this._applyBgColorOnScroll(i,c,v,a>=0,r),w[e]=s+"px",i.css(w)}},_applyBgColorOnScroll:function(t,e,a,r,n){if(t.is("img"))return!0;if(e&&this._isFrozen(n)&&!a)return t.css("background-color",this.freezeBGColor[n]),!0;r?t.css("background-color",this.freezeBGColor[n]):t.css("background-color","initial")},_hasSetBgColor:function(t){return sr(t)>0},_isFrozen:function(t){return this.currentlyfreezedContainer.horizontal[t]||this.currentlyfreezedContainer.vertical[t]},_isInScrollVisibleArea:function(t){var e=t.closest(".trv-report-page"),a=t.position();return this._isVisibleVertically(t,e,a)&&this._isVisibleHorizontally(t,e,a)},_isVisibleHorizontally:function(t,e,a){var r=parseFloat(e.css("padding-left")),n=this.$scrollableContainer.scrollLeft(),i=this.$scrollableContainer.width(),o=t.outerWidth(!0)*this.scaleFactor,c=a.left+r;return c>n-o&&c<n+o+i},_isVisibleVertically:function(t,e,a){var r=parseFloat(e.css("padding-top")),n=e.position(),i=this.$scrollableContainer.scrollTop(),o=this.$scrollableContainer.height(),c=t.outerHeight(!0)*this.scaleFactor,l=a.top+r+n.top;return l>i-c&&l<i+c+o}};var Un={};function Gt(t,e,a){e=$.extend({},Un,e,a);var r=e.controller;if(!r)throw"No controller (telerikReportViewer.reportViewerController) has been specified.";var n=$(t),i=n.find(".trv-page-container"),o=i[0],c=n.find(".trv-page-wrapper"),l=c[0],d=n.find(".trv-error-message"),s,g,v=he.SPECIFIC,h=1,E=.1,w=8,T=!0,S,U,V,q,W=!1,_=!1,x='.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}',I="trv-initial-image-styles",m=le({},Ir,{}),M=null;G(),m&&m.init(t,e);function G(){Y(n)}function Y(u){u.attr("aria-label",A[u.attr("aria-label")])}$(window).on("resize",function(u,p){J()&&se()}),j(n);function N(){q&&window.clearTimeout(q)}function b(){var u=Ce(S);u&&te(u,-1)}function K(u,p){u&&u<=p&&ie(u,U)}function Z(u,p){u&&(u=Math.min(u,p),ie(u,U))}function R(){ue(V),V=!1}r.pageModeChanged(function(){r.getPageMode()===De.CONTINUOUS_SCROLL?m.enable():m.disable(),r.refreshReport(!0)}).reportSourceChanged(function(){V=!0,S=null,U=null,T=!1}).beforeLoadParameters(function(u,p){p&&C(A.loadingReport)}).beforeLoadReport(function(){T=!1,S||(S=1),N(),ue(),Ie(!0),C(A.loadingReport)}).beginLoadReport(function(u,p){T=!0,b()}).reportLoadProgress(function(u,p){K(S,p.pageCount),C(re(A.loadingReportPagesInProgress,[p.pageCount]))}).reportLoadComplete(function(u,p){p.pageCount===0?(R(),C(A.noPageToDisplay)):(Z(S,p.pageCount),C(re(A.loadedReportPagesComplete,[p.pageCount])),q=window.setTimeout(C,2e3),Te()),p.containsFrozenContent&&!M&&(M=le({},_r,{}),r.getViewMode()===Me.INTERACTIVE&&M.init(n))}).navigateToPage(function(u,p,P){ie(p,P)}).pageReady(function(u,p){r.getPageMode()===De.SINGLE_PAGE?(m.isEnabled()&&m.disable(),we(p)):m.renderPage(p),_||(_=!0),W&&Le(),r.getViewMode()===Me.INTERACTIVE&&M&&M.init(n),Ie(!1)}).error(function(u,p){Ie(!1),R(),C(p)}).showNotification(function(u,p){C(A[p.stringResources])}).hideNotification(function(u,p){C()}).scale(function(u,p){pe(p)}).getScale(function(u,p){var P=fe(),O=$(P).data("pageScale")||h;p.scale=O,p.scaleMode=v}).serverActionStarted(function(){Ie(!0),C(A.loadingReport)}).scrollPageReady(function(u,p){dt(p)}).missingOrInvalidParameters(function(u,p){e.initialPageAreaImageUrl&&!_&&(R(),H())}).renderingStopped(function(){ue(!0),C(A.renderingCanceled)}),r.setDocumentMapVisible(function(){J()&&setTimeout(function(){se()})}).setParametersAreaVisible(function(){J()&&setTimeout(function(){se()})});function j(u){var p,P;Sr(u,{swipe:function(O){var F=r.getCurrentPageNumber();p&&O.direction==="left"?F<r.getPageCount()&&r.navigateToPage(F+1):P&&O.direction==="right"&&F>1&&r.navigateToPage(F-1)},pinch:function(O){var F=fe(),Q=$(F).data("pageScale")||h,me=O.distance/O.lastDistance;pe({scale:Q*me,scaleMode:he.SPECIFIC})},doubletap:function(O){e.commands.toggleZoomMode.exec()},touchstart:function(O){var F=l;P=F.scrollLeft===0,p=F.scrollWidth-F.offsetWidth===F.scrollLeft}})}function J(){return[he.FIT_PAGE,he.FIT_PAGE_WIDTH].indexOf(v)!==-1}function se(){for(var u=0,p=i.find(".trv-report-page"),P=p.length;u<P;u++){var O=parseInt($(p[u]).attr("data-page"));ce(p[u],v,h,O)}r.updatePageDimensionsReady()}function pe(u){v=u.scaleMode||v;var p=h;"scale"in u&&(p=u.scale),h=Math.max(E,Math.min(w,p)),se()}function ue(u){ve(),g=void 0,u&&c.empty(),C()}function fe(){return Ce(r.getCurrentPageNumber())}function Ce(u){var p,P=i.find(".trv-report-page");return r.getPageMode()===De.SINGLE_PAGE?k(P,function(O,F){return te(F)===u&&(p=F),!p}):$.each(P,function(O,F){var Q=parseInt($(F).attr("data-page"));if(Q===u)return p=F,!1}),p}function ie(u,p){T?Oe(u,p):Ge(u,p)}function Ge(u,p){S=u,U=p}function Oe(u,p){var P=Ce(u);P?(p&&oe(p,u),m.isEnabled()&&!p&&m.navigateToElement(P.offsetTop,u)):(g=p,ae(u))}function oe(u,p){if(u){var P=i.find("[data-"+u.type+"-id="+u.id+"]")[0];if(P){if(e.enableAccessibility){var O=$e($(P));O&&O.focus()}for(var F=i[0],Q=0,me=0;P&&P!==F;){if($(P).is(".trv-page-wrapper")){var be=$(P).data("pageScale");typeof be=="number"&&(Q*=be,me*=be)}Q+=P.offsetTop,me+=P.offsetLeft,P=P.offsetParent}m.isEnabled()&&p?m.navigateToElement(Q,p):(F.scrollTop=Q,F.scrollLeft=me)}else m.isEnabled()&&p&&m.navigateToElement(n.find('[data-page="'+p+'"]')[0].offsetTop,p)}}function $e(u){if(!u||u.length===0)return null;var p=Fe(u.attr("tabindex"));return!isNaN(p)&&p>-1?u:$e(u.next())}function Ie(u){(u?$.fn.addClass:$.fn.removeClass).call(n,"trv-loading")}function C(u){d.text(u),(u?$.fn.addClass:$.fn.removeClass).call(n,"trv-error")}function te(u,p){var P=u.$?u:$(u),O="pageNumber";return p===void 0?P.data(O):(P.data(O,p),u)}function ae(u){Ie(!0),window.setTimeout(r.getReportPage.bind(r,u),1),S=null}function ce(u,p,P,O){var F=$(u),Q=O?F:F.find("div.trv-report-page"),me=Q.find("div.sheet"),be=Q.find("div.trv-skeleton-wrapper"),He=me[0]||be[0],It=be[0];if(He){var Je,rt,nt=F.data("box");if(!nt){var ht=ur(F),Et=fr(Q),bt=cr(Q);nt={padLeft:ht.left+Et.left+bt.left,padRight:ht.right+Et.right+bt.right,padTop:ht.top+Et.top+bt.top,padBottom:ht.bottom+Et.bottom+bt.bottom},F.data("box",nt)}F.data("pageWidth")===void 0?(Je=He.offsetWidth,rt=He.offsetHeight,F.data("pageWidth",Je),F.data("pageHeight",rt)):(Je=F.data("pageWidth"),rt=F.data("pageHeight"));var Wt=rt>Je&&p===he.FIT_PAGE_WIDTH?20:0,Nt=(o.clientWidth-Wt-nt.padLeft-nt.padRight)/Je,Kt=(o.clientHeight-1-nt.padTop-nt.padBottom)/rt;p===he.FIT_PAGE_WIDTH?P=Nt:(!P||p===he.FIT_PAGE)&&(P=Math.min(Nt,Kt)),M&&M.setScaleFactor(P),F.data("pageScale",P),Q.data("pageScale",P),It||dr(me,P,P),Q.css({height:P*rt,width:P*Je})}}function Te(){i.on("click","[data-reporting-action]",ke),i.on("mouseenter","[data-reporting-action]",ze),i.on("mouseleave","[data-reporting-action]",Be),i.on("mouseenter","[data-tooltip-title],[data-tooltip-text]",D),i.on("mouseleave","[data-tooltip-title],[data-tooltip-text]",Ae)}function ve(){i.off("click","[data-reporting-action]",ke),i.off("mouseenter","[data-reporting-action]",ze),i.off("mouseleave","[data-reporting-action]",Be),i.off("mouseenter","[data-tooltip-title],[data-tooltip-text]",D),i.off("mouseleave","[data-tooltip-title],[data-tooltip-text]",Ae)}function ke(u){var p=$(this),P=p.attr("data-reporting-action"),O=qe(P);O&&(S=Re(u,O.Type),r.executeReportAction({element:u.currentTarget,action:O,cancel:!1})),u.stopPropagation()}function Re(u,p){return m.isEnabled()&&(p==="sorting"||p==="toggleVisibility")&&$(u.target).closest(".trv-report-page").attr("data-page")||r.getCurrentPageNumber()}function ze(u){var p=$(this),P=p.attr("data-reporting-action"),O=qe(P);O!==null&&u.currentTarget===this&&r.reportActionEnter({element:u.currentTarget,action:O})}function Be(u){var p=$(this),P=p.attr("data-reporting-action"),O=qe(P);O!==null&&u.currentTarget===this&&r.reportActionLeave({element:u.currentTarget,action:O})}function qe(u){if(s){var p;return k(s,function(){return this.Id===u&&(p=this),p===void 0}),p}return null}function D(u){var p=$(this),P=p.attr("data-tooltip-title"),O=p.attr("data-tooltip-text");if(!(!P&&!O)){var F={element:u.currentTarget,toolTip:{title:P||"",text:O||""},cancel:!1};if(r.reportToolTipOpening(F),!F.cancel){var Q=L(F),me=u.currentTarget.viewportElement,be=_e(p,Q);be.show(p),me&&me.nodeName==="svg"&&Ee(be,u)}}}function L(u){var p=e.templates["trv-pages-area-kendo-tooltip"],P=$(p),O=P.find(".trv-pages-area-kendo-tooltip-title"),F=P.find(".trv-pages-area-kendo-tooltip-text");return O.html(ee(u.toolTip.title)),F.html(ee(u.toolTip.text)),P.clone().wrap("<p>").parent().html()}function ee(u){return u=Ne(u),u=u.replaceAll(`\r
11
- `,"<br>"),u=u.replaceAll(`
12
- `,"<br>"),u}function Ee(u,p){var P=p.pageX,O=p.pageY,F=u.popup.element.closest("[role=region]");F.css({left:P+10,top:O+5})}function _e(u,p){var P=u.data("kendoTooltip");if(!P)try{P=u.kendoTooltip({content:p,autohide:!0,callout:!1}).data("kendoTooltip")}catch(O){throw console.error("Instantiation of Kendo Tooltip threw an exception",O),O}return P}function Ae(u){var p=$(this),P=p.data("kendoTooltip");P&&P.hide()}function Ve(u){var p="trv-"+r.clientId()+"-styles";$("#"+p).remove();var P=$("<style id="+p+"></style>");P.append(u.pageStyles),P.appendTo("head")}function we(u){s=JSON.parse(u.pageActions),Ve(u);var p=u.pageNumber,P=$($.parseHTML(u.pageContent)),O=P.find("div.sheet"),F=$('<div class="trv-report-page" data-page="'+p+'"></div>');O.css("margin",0),F.append(O).append($('<div class="trv-page-overlay"></div>'));var Q=c.empty().removeData().data("pageNumber",p).append(F);r.setCurrentPageNumber(p),r.getViewMode()===Me.INTERACTIVE?(n.removeClass("printpreview"),n.addClass("interactive")):(n.removeClass("interactive"),n.addClass("printpreview")),ce(Q,v,h),i.scrollTop(0),i.scrollLeft(0),oe(g)}function dt(u){var p=JSON.parse(u.page.pageActions);s?s=s.concat(p):s=p,r.getViewMode()===Me.INTERACTIVE?(n.removeClass("printpreview"),n.addClass("interactive")):(n.removeClass("interactive"),n.addClass("printpreview")),ce(u.target,v,h,u.page.pageNumber)}function H(){var u=$("<style id="+I+"></style>");Le(),u.append(re(x,[e.initialPageAreaImageUrl])),u.appendTo("head"),W=!0}function Le(){$("#"+I).remove()}}var Cr="telerik_ReportViewer_PagesArea";$.fn[Cr]=function(t,e){return k(this,function(){$.data(this,Cr)||$.data(this,Cr,new Gt(this,t,e))})};var Xe={MultiSelect:function(t,e){return!!t.availableValues&&t.multivalue&&(!e||!e.multiSelect||e.multiSelect!==ot.COMBO_BOX)},MultiSelectCombo:function(t,e){return!!t.availableValues&&t.multivalue&&e&&e.multiSelect&&e.multiSelect===ot.COMBO_BOX},SingleSelect:function(t,e){return!!t.availableValues&&!t.multivalue&&(!e||!e.singleSelect||e.singleSelect!==ot.COMBO_BOX)},SingleSelectCombo:function(t,e){return!!t.availableValues&&!t.multivalue&&e&&e.singleSelect&&e.singleSelect===ot.COMBO_BOX},MultiValue:function(t){return!!t.multivalue},DateTime:function(t){return t.type===Ue.DATETIME},String:function(t){return t.type===Ue.STRING},Number:function(t){switch(t.type){case Ue.INTEGER:case Ue.FLOAT:return!0;default:return!1}},Boolean:function(t){return t.type===Ue.BOOLEAN},Default:function(t){return!0}},on=function(){var t=`
13
- `;return{formatValue:function(e){var a="";return e&&[].concat(e).forEach(function(r){a.length>0&&(a+=t),a+=r}),a},parseValues:function(e){return(""+e).split(t)}}}();function Gn(t){function e(o){return/^(\-|\+)?([0-9]*)$/.test(o)}function a(o){return Pt(o.keyCode)?!0:e($(t).val()+String.fromCharCode(o.charCode))}function r(o){}function n(o){$(o).on("keypress",a).on("paste",r)}function i(o){$(o).off("keypress",a).off("paste",r)}return n(t),{dispose:function(){i(t)}}}function Bn(t){function e(o){return/^(\-|\+)?([0-9]*(\.[0-9]*)?)$/.test(o)}function a(o){return Pt(o.keyCode)?!0:e($(t).val()+String.fromCharCode(o.charCode))}function r(o){}function n(o){$(o).on("keypress",a).on("paste",r)}function i(o){$(o).off("keypress",a).off("paste",r)}return n(t),{dispose:function(){i(t)}}}function sn(t,e,a){var r=t?$.fn.addClass:$.fn.removeClass;r.call(a,e)}function vt(t,e){sn(!e,"k-disabled",t)}function Hn(t,e){sn(e,"k-selected",t),t.attr("aria-selected",e)}function lt(t,e,a,r,n){r||(r="");var i=re("{0}. {1} {2}. {3}",[a,e,A.ariaLabelParameter,r]);t.attr("aria-label",i),tt(t,n)}var st,Bt=0;function ut(t){if(!st){var e=$("div.trv-parameters-area-content");if(e.length>0){var a=e.attr("tabIndex");a&&(st=Fe(a))}(!st||isNaN(st))&&(st=300)}var r=t.closest(".trv-parameter-value"),n=r.find(".trv-select-all"),i=r.find(".trv-select-none"),o=t.closest(".k-widget"),c=o.find(".k-input"),l=c&&c.length;n&&n.length&&n.attr("tabindex",st+ ++Bt),i&&i.length&&i.attr("tabindex",st+ ++Bt),l?c.attr("tabindex",st+ ++Bt):t.attr("tabindex",st+ ++Bt)}function tt(t,e){var a=re(" {0}:",[A.ariaLabelErrorMessage]),r=t.attr("aria-label");if(r){var n=r.indexOf(a);n>-1&&(r=r.substring(0,n)),e&&e!==""?(t.attr("aria-required",!0),t.attr("aria-invalid",!0),r+=a+e):t.removeAttr("aria-invalid"),t.attr("aria-label",r)}}function ln(t){return kendo.version>="2017.3.1018"||t}var Rr=[{match:Xe.MultiSelect,createEditor:function(t,e){var a=$(t),r=!0;a.html(e.templates["trv-parameter-editor-available-values-multiselect"]);var n=a.find(".trv-list"),i=a.find(".trv-select-all"),o=a.find(".trv-select-none"),c,l,d,s=e.parameterChanged,g;i.text(A[i.text()]),i.click(function(I){I.preventDefault(),r&&_(l.availableValues.map(function(m){return m.value}))}),o.text(A[o.text()]),o.click(function(I){I.preventDefault(),r&&_([])});function v(I){g&&(h(I),E(I))}function h(I){var m=n.find(".trv-listviewitem");k(m,function(){var M=$(this),G=I.filter(M).length>0;M.attr("aria-selected",G)})}function E(I){var m=l.availableValues,M=$.map(I,function(Y){return m[$(Y).index()].value});w();var G=!l.autoRefresh&&!l.childParameters;d=window.setTimeout(function(){yt(l.value,M)||s(l,M),d=null},G?0:1e3)}function w(){d&&window.clearTimeout(d)}function T(){return $(c.element).find(".k-selected")}function S(I){if(r){var m=$(I.target),M=c.select();m.hasClass("k-selected")?M.splice($.inArray(m[0],M),1):M.push(m),c.clearSelection(),c.select(M),c.trigger("change")}}function U(I){v(T())}function V(I){if(r&&I.which===32){var m=c.element.find(".k-focus");m.length>0&&(m.toggleClass("k-selected"),v(T()),I.preventDefault())}}function q(){ut(n),_(l.value),c.element.off().on("touch click",".trv-listviewitem",S),c.element.on("keydown",V),g=!0}function W(){g=!1,c&&(c.element.off("touch click",".trv-listviewitem",S),c.element.off("keydown",V))}function _(I){x(I),v(T())}function x(I){Array.isArray(I)||(I=[I]);var m=n.find(".trv-listviewitem");k(l.availableValues,function(M,G){var Y=!1;k(I,function(N,b){var K=G.value;return b instanceof Date&&(K=ct(G.value)),Y=Ct(b,K),!Y}),Hn($(m[M]),Y)})}return{beginEdit:function(I){W(),l=I;try{c=n.kendoListView({template:kendo.template('<div class="trv-listviewitem" style="cursor: pointer">${name}</div>'),dataSource:{data:l.availableValues},selectable:"MULTIPLE",navigatable:ln(e.enableAccessibility),change:U}).data("kendoListView")}catch(m){throw console.error("Instantiation of Kendo ListView as MultiSelect parameter editor threw an exception",m),m}q()},enable:function(I){r=I,vt(n,r)},clearPendingChange:w,addAccessibility:function(I){var m=re(A.ariaLabelParameterInfo,[I.availableValues.length]);lt(n,A.ariaLabelMultiSelect,I.text,m,I.Error),n.attr("aria-multiselectable","true");var M=n.find(".trv-listviewitem");k(M,function(){$(this).attr("aria-label",this.innerText)})},setAccessibilityErrorState:function(I){tt(n,I.Error)},destroy:function(){c.destroy()}}}},{match:Xe.MultiSelectCombo,createEditor:function(t,e){var a=$(t),r=!0,n=".trv-combo",i="trv-parameter-editor-available-values-multiselect-combo",o=e.parameterChanged,c,l,d,s,g,v=!0,h;a.html(e.templates[i]),c=a.find(n),l=a.find(".trv-select-none"),l&&(l.text(A[l.text()]),l.click(function(W){W.preventDefault(),s.value([]),s.trigger("change")})),d=a.find(".trv-select-all"),d&&(d.text(A[d.text()]),d.click(function(W){if(W.preventDefault(),!!r){var _=$.map(h.availableValues,function(x){return x.value});s.value(_),s.trigger("change")}}));function E(W){w(W)}function w(W){T();var _=!h.autoRefresh&&!h.childParameters;g=window.setTimeout(function(){yt(h.value,W)||o(h,W),g=null},_?0:1e3)}function T(){g&&window.clearTimeout(g)}function S(){return s.value()}function U(){v&&E(S())}function V(){ut(c),s.bind("change",U)}function q(){s&&s.unbind("change",U)}return{beginEdit:function(W){q(),h=W;try{s=c.kendoMultiSelect({itemTemplate:'<div class="trv-editoritem">${name}</div>',dataSource:h.availableValues,dataTextField:"name",dataValueField:"value",value:h.value,filter:"contains",autoClose:!1,open:function(){v=!1},close:function(_){v=!0,U()},autoWidth:!0,clearButton:!1}).data("kendoMultiSelect")}catch(_){throw console.error("Instantiation of Kendo MultiSelect as MultiSelectCombo parameter editor threw an exception",_),_}V(c)},enable:function(W){r=W,s.enable(W)},clearPendingChange:T,addAccessibility:function(W){var _=s.input,x=re(A.ariaLabelParameterInfo,[W.availableValues.length]);lt(_,A.ariaLabelMultiSelect,W.text,x,W.Error);var I=s.items();k(I,function(){$(this).attr("aria-label",this.innerText)})},setAccessibilityErrorState:function(W){tt(c,W.Error)},destroy:function(){s.destroy()}}}},{match:Xe.SingleSelect,createEditor:function(t,e){var a=$(t),r=!0;a.html(e.templates["trv-parameter-editor-available-values"]);var n=a.find(".trv-list"),i=a.find(".trv-select-none"),o,c,l=e.parameterChanged;i&&(i.text(A[i.text()]),i.click(function(T){T.preventDefault(),o.clearSelection(),o.trigger("change")}));function d(T){s(T)}function s(T){var S=c.availableValues,U=$.map(T,function(V){return S[$(V).index()].value});Array.isArray(U)&&(U=U[0]),l(c,U)}function g(){return o.select()}function v(){d(g())}function h(){ut(n),w(c.value),o.bind("change",v)}function E(){o&&o.unbind("change",v)}function w(T){var S=n.find(".trv-listviewitem");k(c.availableValues,function(U,V){var q=V.value;return T instanceof Date&&(q=ct(V.value)),Ct(T,q)?(o.select(S[U]),!1):!0})}return{beginEdit:function(T){E(),c=T;try{o=n.kendoListView({template:'<div class="trv-listviewitem">${name}</div>',dataSource:{data:c.availableValues},selectable:!0,navigatable:ln(e.enableAccessibility)}).data("kendoListView")}catch(S){throw console.error("Instantiation of Kendo ListView as SingleSelect parameter editor threw an exception",S),S}h(n)},enable:function(T){r=T,vt(n,r),r?(o.bind("change",v),n.addClass("k-selectable")):(o.unbind("change",v),n.removeClass("k-selectable"))},addAccessibility:function(T){var S=re(A.ariaLabelParameterInfo,[T.availableValues.length]);lt(n,A.ariaLabelSingleValue,T.text,S,T.Error);var U=n.find(".trv-listviewitem");k(U,function(){$(this).attr("aria-label",this.innerText)})},setAccessibilityErrorState:function(T){tt(n,T.Error)},destroy:function(){o.destroy()}}}},{match:Xe.SingleSelectCombo,createEditor:function(t,e){var a=$(t),r=!0,n=".trv-combo",i="trv-parameter-editor-available-values-combo",o=e.parameterChanged,c,l,d,s;a.html(e.templates[i]),c=a.find(n),l=a.find(".trv-select-none"),l&&(l.text(A[l.text()]),l.click(function(S){S.preventDefault(),d.value(""),d.trigger("change")}));function g(S,U){v(S,U)}function v(S,U){var V=U||"",q;!U&&S>=0&&(q=s.availableValues,V=q[S].value),o(s,V)}function h(){return d.select()}function E(S){g(h(),this.value())}function w(){ut(c),d.bind("change",E)}function T(){d&&d.unbind("change",E)}return{beginEdit:function(S){T(),s=S;try{d=c.kendoComboBox({template:'<div class="trv-editoritem">${name}</div>',dataSource:s.availableValues,dataTextField:"name",dataValueField:"value",value:s.value,filter:"contains",suggest:!0,clearButton:!1}).data("kendoComboBox")}catch(U){throw console.error("Instantiation of Kendo ComboBox as SingleSelectCombo parameter editor threw an exception",U),U}w(c)},enable:function(S){r=S,d.enable(S)},addAccessibility:function(S){var U=d.input,V=re(A.ariaLabelParameterInfo,[S.availableValues.length]);lt(U,A.ariaLabelSingleValue,S.text,V,S.Error);var q=d.items();k(q,function(){$(this).attr("aria-label",this.innerText)})},setAccessibilityErrorState:function(S){tt(c,S.Error)},destroy:function(){d.destroy()}}}},{match:Xe.MultiValue,createEditor:function(t,e){var a=$(t),r;a.html(e.templates["trv-parameter-editor-multivalue"]);var n=a.find("textarea").on("change",function(){e.parameterChanged&&e.parameterChanged(r,on.parseValues(this.value))});function i(o){r.value=o,n.val(on.formatValue(o))}return{beginEdit:function(o){r=o,i(o.value),ut(n)},enable:function(o){vt(n,o),n.prop("disabled",!o)},addAccessibility:function(o){lt(n,A.ariaLabelMultiValue,o.text,null,o.Error)},setAccessibilityErrorState:function(o){tt(n,o.Error)}}}},{match:Xe.DateTime,createEditor:function(t,e){var a=$(t),r;a.html(e.templates["trv-parameter-editor-datetime"]);try{var n=a.find("input[type=datetime]").kendoDatePicker({change:function(){var c=e.parameterChanged;if(c){var l=this.value();l!==null&&(l=Jt(l)),c(r,l)}}}),i=n.data("kendoDatePicker")}catch(c){throw console.error("Instantiation of Kendo DatePicker as DateTime parameter editor threw an exception",c),c}function o(c){r.value=c;var l=null;try{c&&(l=Zt(c))}catch{l=null}i.value(l)}return{beginEdit:function(c){r=c,o(c.value),ut(n)},enable:function(c){i.enable(c),vt(n,c)},addAccessibility:function(c){lt(n,A.ariaLabelParameterDateTime,c.text,null,c.Error),n.attr("aria-live","assertive")},setAccessibilityErrorState:function(c){tt(n,c.Error)},destroy:function(){i.destroy()}}}},{match:Xe.String,createEditor:function(t,e){var a=$(t),r;a.html(e.templates["trv-parameter-editor-text"]);var n=a.find('input[type="text"]').change(function(){e.parameterChanged&&e.parameterChanged(r,n.val())});function i(o){r.value=o,n.val(o)}return{beginEdit:function(o){r=o,i(o.value),ut(n)},enable:function(o){n.prop("disabled",!o),vt(n,o)},addAccessibility:function(o){lt(n,A.ariaLabelParameterString,o.text,null,o.Error),n.attr("aria-live","assertive")},setAccessibilityErrorState:function(o){tt(n,o.Error)}}}},{match:Xe.Number,createEditor:function(t,e){var a=$(t),r,n;a.html(e.templates["trv-parameter-editor-number"]);var i=a.find("input[type=number]").on("change",function(){e.parameterChanged&&e.parameterChanged(r,i.val())});function o(c){r.value=c,i.val(c)}return{beginEdit:function(c){n&&n.dispose(),r=c,i.val(r.value),r.type===Ue.INTEGER?n=Gn(i):n=Bn(i),ut(i)},enable:function(c){i.prop("disabled",!c),vt(i,c)},addAccessibility:function(c){lt(i,A.ariaLabelParameterNumerical,c.text,null,c.Error),i.attr("aria-live","assertive")},setAccessibilityErrorState:function(c){tt(i,c.Error)}}}},{match:Xe.Boolean,createEditor:function(t,e){var a=$(t),r;a.html(e.templates["trv-parameter-editor-boolean"]);var n=a.find("input[type=checkbox]").on("change",function(){e.parameterChanged&&e.parameterChanged(r,this.checked)});function i(o){r.value=o,n[0].checked=o===!0}return{beginEdit:function(o){r=o,i(o.value),ut(n)},enable:function(o){vt(n,o),n.attr("disabled",!o)},addAccessibility:function(o){lt(n,A.ariaLabelParameterBoolean,o.text,null,o.Error),n.attr("aria-live","assertive")},setAccessibilityErrorState:function(o){tt(n,o.Error)}}}},{match:Xe.Default,createEditor:function(t,e){var a=$(t);return a.html('<div class="trv-parameter-editor-generic"></div>'),{beginEdit:function(r){a.find(".trv-parameter-editor-generic").text(r.Error?"(error)":r.value)},enable:function(r){}}}}];function Ar(t,e){var a=t.querySelectorAll?t.querySelectorAll(".trv-menu-small")[0]:!1,r={small:{documentMapVisible:!1,parametersAreaVisible:!1,onDocumentMapVisibleChanged:function(_,x){x.visible&&e.setParametersAreaVisible({visible:!1})},onParameterAreaVisibleChanged:function(_,x){x.visible&&e.setDocumentMapVisible({visible:!1})},onBeforeLoadReport:function(){e.setParametersAreaVisible({visible:!1}),e.setDocumentMapVisible({visible:!1})},onNavigateToPage:function(){e.setParametersAreaVisible({visible:!1}),e.setDocumentMapVisible({visible:!1})}},large:{documentMapVisible:!0,parametersAreaVisible:!0}},n;function i(){n=S(),U(r.large)}function o(_){var x=S();if(x!==n){var I=r[n],m=r[x];n=x,_&&_.call(void 0,I,m),V(m)}}function c(_,x){E("onDocumentMapVisibleChanged",arguments)}function l(_,x){E("onParameterAreaVisibleChanged",arguments)}function d(){E("onBeforeLoadReport",arguments)}function s(){E("onNavigateToPage",arguments)}function g(){E("onReportLoadComplete",arguments)}function v(){o(function(_,x){U(_)})}function h(){o(null)}function E(_,x){var I=r[n],m=I[_];typeof m=="function"&&m.apply(I,x)}function w(){window.addEventListener("resize",v),e.setDocumentMapVisible(c),e.setParametersAreaVisible(l),e.beforeLoadReport(d),e.navigateToPage(s),e.reportLoadComplete(g),e.cssLoaded(h)}function T(){window.removeEventListener("resize",v)}function S(){var _=$(window).width()/parseFloat($("body").css("font-size")),x=40.5;return a&&_<=x?"small":"large"}function U(_){_.documentMapVisible=q(),_.parametersAreaVisible=W()}function V(_){q(_.documentMapVisible),W(_.parametersAreaVisible)}function q(){if(arguments.length===0){var _={};return e.getDocumentMapState(_),_.visible}return e.setDocumentMapVisible({visible:!!arguments[0]}),this}function W(){if(arguments.length===0){var _={};return e.getParametersAreaState(_),_.visible}return e.setParametersAreaVisible({visible:!!arguments[0]}),this}return i(),{attach:w,dispose:T}}var wt="application/json; charset=UTF-8",Wn="application/x-www-form-urlencoded; charset=UTF-8",mt="GET",ft="POST";var wr="DELETE",Kn={};function Nr(t){t=le({},Kn,t);var e=Qe(t.serviceUrl||t.baseUrl,"\\/"),a,r=$t;function n(l){if(!l)throw"Invalid clientID"}function i(l,d){return d=le({},{baseUrl:e},d),re(l,d)}function o(l){return l?{headers:{Authorization:"Bearer "+l}}:{}}function c(){if(!a){var l=t.loginInfo;l&&l.url&&(l.username||l.password)?a=r({url:l.url,type:ft,data:{grant_type:"password",username:l.username,password:l.password},dataType:"json",contentType:Wn}).then(function(d){return d.access_token}):a=Promise.resolve()}return a}return{_urlFromTemplate:i,registerClient:function(l){return c().then(function(d){var s=le(o(d),l,{type:ft,url:i("{baseUrl}/clients"),dataType:"json",data:JSON.stringify({timeStamp:Date.now()})});return r(s)}).then(function(d){if(d.Message)throw d.Message;return d.clientId})},unregisterClient:function(l,d){return n(l),c().then(function(s){var g=le(o(s),d,{type:wr,url:i("{baseUrl}/clients/{clientID}",{clientID:l})});return r(g)})},getParameters:function(l,d,s,g){return n(l),c().then(function(v){var h=le(o(v),g,{type:ft,url:i("{baseUrl}/clients/{clientID}/parameters",{clientID:l}),contentType:wt,dataType:"json",data:JSON.stringify({report:d,parameterValues:s})});return r(h)})},createReportInstance:function(l,d,s,g){return n(l),c().then(function(v){var h=le(o(v),g,{type:ft,url:i("{baseUrl}/clients/{clientID}/instances",{clientID:l}),contentType:wt,dataType:"json",data:JSON.stringify({report:d,parameterValues:s})});return r(h)}).then(function(v){return v.instanceId})},deleteReportInstance:function(l,d,s){return n(l),c().then(function(g){var v=le(o(g),s,{type:wr,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}",{clientID:l,instanceID:d})});return r(v)})},createReportDocument:function(l,d,s,g,v,h,E,w){return n(l),c().then(function(T){g=g||{},g.BasePath=e;var S=le(o(T),w,{type:ft,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents",{clientID:l,instanceID:d}),contentType:wt,dataType:"json",data:JSON.stringify({format:s,deviceInfo:g,useCache:v,baseDocumentID:h,actionID:E})});return r(S)}).then(function(T){return T.documentId})},sendDocument:function(l,d,s,g,v){return n(l),c().then(function(h){var E=le(o(h),v,{type:ft,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/send",{clientID:l,instanceID:d,documentID:s}),contentType:wt,data:JSON.stringify({from:g.from,to:g.to,cc:g.cc,subject:g.subject,body:g.body})});return r(E)})},deleteReportDocument:function(l,d,s,g){return n(l),c().then(function(v){var h=le(o(v),g,{type:wr,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",{clientID:l,instanceID:d,documentID:s})});return r(h)})},getDocumentInfo:function(l,d,s,g){return n(l),c().then(function(v){var h=le(o(v),g,{type:mt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/info",{clientID:l,instanceID:d,documentID:s}),dataType:"json"});return r(h)})},getPage:function(l,d,s,g,v){return n(l),c().then(function(h){var E=le(o(h),v,{type:mt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/pages/{pageNumber}",{clientID:l,instanceID:d,documentID:s,pageNumber:g}),dataType:"json"});return r(E)})},get:function(l){var d={type:mt,url:l};return r(d)},formatDocumentUrl:function(l,d,s,g){var v=i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",{clientID:l,instanceID:d,documentID:s});return g&&(v+="?"+g),v},getDocumentFormats:function(l){return c().then(function(d){var s=le(o(d),l,{type:mt,url:i("{baseUrl}/formats"),dataType:"json"});return r(s)})},getServiceVersion:function(l){return c().then(function(d){var s=le(o(d),l,{type:mt,url:i("{baseUrl}/version"),dataType:"json"});return r(s)})},getResource:function(l,d,s,g,v){return n(l),c().then(function(h){var E=le(o(h),v,{type:mt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/resources/{resourceID}",{clientID:l,instanceID:d,documentID:s,resourceID:g}),dataType:"json"});return r(E)})},getSearchResults:function(l,d,s,g,v,h,E,w){n(l);var T=i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/search",{clientID:l,instanceID:d,documentID:s});return c().then(function(S){var U=le(o(S),w,{type:ft,url:T,contentType:wt,dataType:"json",data:JSON.stringify({searchToken:g,matchCase:v,matchWholeWord:h,useRegularExpressions:E})});return r(U)})},setAccessToken:function(l){a=Promise.resolve(l)},login:c,keepClientAlive:function(l,d){return c().then(function(s){var g=le(o(s),d,{type:ft,url:i("{baseUrl}/clients/keepAlive/{clientID}",{clientID:l})});return r(g)})},getClientsSessionTimeoutSeconds:function(l){return c().then(function(d){var s=le(o(d),l,{type:mt,url:i("{baseUrl}/clients/sessionTimeout")});return r(s)}).then(function(d){return d.clientSessionTimeout})}}}function Mr(t){var e={ExportInProgress:1,PrintInProgress:2,RenderInProgress:4};function a(T){return(o&T)!=0}function r(T,S){S?o|=T:o&=~T}var n=t.controller,i=t.history,o=0,c,l=t.commands;if(!n)throw"No controller (telerikReporting.ReportViewerController) has been specified.";function d(){var T={};return n.getDocumentMapState(T),T}function s(){var T={};return n.getParametersAreaState(T),T}function g(){var T={};return n.getSearchDialogState(T),T}function v(){var T={};return n.getSendEmailDialogState(T),T}function h(){c||(c=!0,window.setTimeout(function(){try{E()}finally{c=!1}},10))}function E(){var T=n.getReportSource(),S=n.getPageCount(),U=n.getCurrentPageNumber(),V=T&&T.report,q=V&&S>0,W=q&&U<S,_=q&&U>1,x=q&&U,I=d(),m=s(),M=g(),G=v(),Y=a(e.RenderInProgress),N=a(e.PrintInProgress),b=a(e.ExportInProgress);l.goToFirstPage.enabled(_),l.goToPrevPage.enabled(_),l.stopRendering.enabled(V&&Y),l.goToLastPage.enabled(W),l.goToNextPage.enabled(W),l.goToPage.enabled(q),l.print.enabled(q&&!Y&&!N),l.export.enabled(q&&!Y&&!b),l.refresh.enabled(V),l.historyBack.enabled(i&&i.canMoveBack()),l.historyForward.enabled(i&&i.canMoveForward()),l.toggleDocumentMap.enabled(V&&I.enabled).checked(I.enabled&&I.visible),l.toggleParametersArea.enabled(V&&m.enabled).checked(m.enabled&&m.visible),l.togglePrintPreview.enabled(q).checked(n.getViewMode()==Me.PRINT_PREVIEW),l.pageMode.enabled(q).checked(n.getPageMode()==De.CONTINUOUS_SCROLL),l.zoom.enabled(x),l.zoomIn.enabled(x),l.zoomOut.enabled(x),l.toggleZoomMode.enabled(x),l.toggleSearchDialog.enabled(q).checked(M.visible),l.toggleSendEmailDialog.enabled(q).checked(G.visible),n.updateUI(null),n.pageNumberChange(U),n.pageCountChange(S)}function w(){var T={};return n.getScale(T),T.scaleMode}n.setParametersAreaVisible(h),n.setDocumentMapVisible(h),n.updateUIInternal(h),n.setSearchDialogVisible(h),n.setSendEmailDialogVisible(h),n.scale(function(T,S){l.toggleZoomMode.checked(S.scaleMode===he.FIT_PAGE||S.scaleMode===he.FIT_PAGE_WIDTH)}),n.currentPageChanged(h),n.beforeLoadReport(function(){r(e.RenderInProgress,!0),h()}),n.reportLoadProgress(h),n.reportLoadComplete(function(){r(e.RenderInProgress,!1),h()}),n.reportSourceChanged(h),n.viewModeChanged(h),n.pageModeChanged(function(){h()}),n.setUIState(function(T,S){r(e[S.operationName],S.inProgress),h()}),n.error(function(){r(e.ExportInProgress,!1),r(e.PrintInProgress,!1),r(e.RenderInProgress,!1),h()}),n.renderingStopped(function(){r(e.RenderInProgress,!1),h()}),h()}var zn={};function yr(t,e,a){e=$.extend({},zn,e,a);var r=e.controller;if(!r)throw"No controller (telerikReporting.reportViewerController) has been specified.";var n=$(t),i,o=e.documentMapVisible!==!1,c=e.enableAccessibility,l=null,d=!1;s();function s(){i=$('<div id="'+e.viewerSelector+'-documentMap"></div>'),i.appendTo(t),_(),x(n)}function g(I){var m=this.dataItem(I.node),M=m.page,G=m.id;r.navigateToPage(M,{type:"bookmark",id:G})}function v(I){c&&window.setTimeout(function(){h(I.node)},100)}function h(I){var m=$(I).find("li");k(m,function(){var M=$(this);M.attr("aria-label",M[0].innerText)})}function E(){w([])}function w(I){var m=I&&!$.isEmptyObject(I),M=i.data("kendoTreeView");if(!M)try{i.kendoTreeView({dataTextField:"text",select:g}),M=i.data("kendoTreeView")}catch(G){throw console.error("Instantiation of Kendo TreeView as Document Map threw an exception",G),G}M.setDataSource(I),c&&T(M),W(m)}function T(I){I.bind("expand",v),I.element.attr("aria-label",A.ariaLabelDocumentMap);var m=I.element.find("ul");k(m,function(){h(this)}),d&&S()}function S(){var I=n.next();e.documentMapAreaPosition===gt.RIGHT&&(I=n.prev()),I.attr("aria-label",A.ariaLabelDocumentMapSplitter)}function U(){var I={};return r.getDocumentMapState(I),I.visible}function V(){n.addClass("trv-loading")}function q(){n.removeClass("trv-loading")}function W(I){var m=et.viewerInstances.find(G=>G.id===e.viewerSelector+"-document-map-splitter").instance,M=n.next();e.documentMapAreaPosition===gt.RIGHT&&(M=n.prev()),m&&((d?$.fn.removeClass:$.fn.addClass).call(M,"trv-hidden"),m.toggle(".trv-document-map",I))}function _(){r.beginLoadReport(function(){V();var I=r.getReportSource().report,m=l!==I||!U();l=I,m&&E()}).reportLoadComplete(function(I,m){m.documentMapAvailable?(d=!0,w(m.documentMapNodes),r.setDocumentMapVisible({enabled:!0,visible:o})):(d=!1,W(d)),q()}).error(function(I,m){q(),E()}).renderingStopped(function(){d=!1,W(!1)}),r.setDocumentMapVisible(function(I,m){o=m.visible,W(o&&d)}).getDocumentMapState(function(I,m){m.enabled=d,m.visible=o})}function x(I){var m=I.find(".trv-document-map-overlay");m&&m.attr("aria-label",A[m.attr("aria-label")])}}var Dr="telerik_ReportViewer_DocumentMapArea";$.fn[Dr]=function(t,e){return k(this,function(){$.data(this,Dr)||$.data(this,Dr,new yr(this,t,e))})};var jn={},un={PARAMETERS_READY:"pa.parametersReady",ERROR:"pa.Error"};function kr(t,e,a){e=$.extend({},jn,e,a);var r={},n=$(r),i={},o=e.controller;if(!o)throw"No controller (telerikReporting.reportViewerController) has been specified.";var c=[].concat(e.parameterEditors,Rr),l,d,s,g=void 0,v=$(t),h=v.find(".trv-parameters-area-content"),E=v.find(".trv-error-message"),w=v.find(".trv-parameters-area-preview-button");w.text(A[w.text()]),w.attr("aria-label",A[w.attr("aria-label")]),w.on("click",function(D){D.preventDefault(),b()&&R()});var T=e.templates["trv-parameter"],S=e.parametersAreaVisible!==!1,U=e.enableAccessibility;V();function V(){q(v)}function q(D){var L=D.find(".trv-parameters-area-preview-button");L&&(L.attr("aria-label",A[L.attr("aria-label")]),L.text(A[L.text()]))}function W(D,L){D.style.display=L?"none":""}function _(){return $(T)}function x(D){var L=_(),ee=L.find(".trv-parameter-value"),Ee=L.find(".trv-parameter-title"),_e=L.find(".trv-parameter-error"),Ae=L.find(".trv-parameter-error-message"),Ve=L.find(".trv-parameter-use-default input"),we=e.parameters&&e.parameters.editors?e.parameters.editors:null,dt=M(D,we),H=Ne(D.text),Le=!D.isVisible;Le&&(H+=" [<b>hidden</b>]"),Ee.html(H).attr("title",H),Ae.text(D.Error),(D.Error?$.fn.show:$.fn.hide).call(_e);var u=dt.createEditor(ee,{templates:e.templates,parameterChanged:function(P,O){var F=document.querySelector(".trv-pages-area .trv-error-message ul li."+P.name);try{O=St.validate(P,O),_e.hide(),F&&W(F,!0),Ce(P,O)}catch(Q){F&&W(F,!1),P.Error=Q,P.value=[],Ae.text(Q),_e.show(),m(!1)}finally{I(P)}},enableAccessibility:U});if(i[D.id]=u,u.beginEdit(D),U&&!Le&&u.addAccessibility(D),Ve.length>0){Ve.on("click",function(){var P=$(this).is(":checked");P?(delete l[D.id],delete s[D.id],ue(D),ae(ke)):(l[D.id]=D.value,s[D.id]=D.value),u.enable(!P),se()});var p=s!==null;p?D.id in s||(Ve.prop("checked",!0),u.enable(!1)):Le&&(Ve.prop("checked",!0),u.enable(!1))}return L}function I(D){var L=i[D.id];!L||!U||L.setAccessibilityErrorState(D)}function m(D){D?(w.prop("disabled",!1),w.removeClass("k-disabled")):(w.prop("disabled",!0),w.addClass("k-disabled"))}function M(D,L){var ee;return k(c,function(){return this&&this.match(D,L)&&(ee=this),!ee}),ee}function G(D){E.text(D),(D?$.fn.addClass:$.fn.removeClass).call(v,"trv-error")}function Y(){(N(d)?$.fn.removeClass:$.fn.addClass).call(v,"preview")}function N(){var D=!0;return k(d,function(){return D=!this.isVisible||this.autoRefresh}),D}function b(){var D=!0;return k(d,function(){return D=!this.Error}),D}function K(){k(i,function(){this.hasOwnProperty("destroy")&&this.destroy()}),i={}}function Z(D){l={},g={},d=D||[],K();var L,ee=$("<div></div>");k(d,function(){try{this.value=St.validate(this,this.value)}catch(Ve){this.Error=this.Error||Ve}var _e=!!this.Error,Ae=!_e;Ae?(l[this.id]=this.value,this.availableValues?g[this.id]={valueMember:this.value,displayMember:this.label,availableValues:this.availableValues,multivalue:this.multivalue}:g[this.id]=this.value):this.Error=A.invalidParameter,(this.isVisible||e.showHiddenParameters)&&(L=x(this),L&&ee.append(L))}),s!==void 0&&(s===null?(s={},k(d,function(){this.isVisible?s[this.id]=this.value:delete l[this.id]})):k(d,function(){this.id in s||delete l[this.id]})),h.empty(),d.length>0&&(h.append(ee.children()),U&&h.attr("aria-label","Parameters area. Contains "+d.length+" parameters.")),Y(d);var Ee=b();m(Ee),j()}function R(){o.setParameters($.extend({},l)),o.previewReport(!1)}function j(){o.setProcessedParameter($.extend({},g))}function J(){for(var D=!0,L=d.length-1;D&&L>=0;L--){var ee=d[L];D=ee.id in l&&(!!ee.autoRefresh||!ee.isVisible)}return D}function se(){r.parametersReady(l)}function pe(){se(),J()&&R()}function ue(D){D.childParameters&&k(D.childParameters,function(L,ee){var Ee=ie(ee);Ee&&ue(Ee),delete l[ee],fe(ee)})}function fe(D){if(i){var L=i[D];L&&typeof L.clearPendingChange=="function"&&L.clearPendingChange()}}function Ce(D,L){if(delete D.Error,D.value=L,l[D.id]=L,s!==void 0?D.id in s&&(l[D.id]=L):l[D.id]=L,ue(D),D.childParameters)ae(pe);else{var ee=b();if(m(ee),ee){var Ee=document.querySelector(".trv-pages-area .trv-error-message");w.is(":visible")&&Ee&&(Ee.textContent=A.tryReportPreview),pe()}}}function ie(D){if(d)for(var L=0;L<d.length;L++){var ee=d[L];if(ee.id===D)return ee}return null}function Ge(D){o.setParametersAreaVisible({visible:D})}function Oe(D){if(!D||D===null)return!1;var L=!1;return k(D,function(){return L=this.isVisible,!L}),L}var oe=0;function $e(){oe++,v.addClass("trv-loading")}function Ie(){oe>0&&--oe===0&&v.removeClass("trv-loading")}var C=!1;function te(D,L){C=Oe(D),C||Re(!1),Z(D),G(""),C&&S&&(Re(!0),U&&ze()),o.updateUIInternal(),typeof L=="function"&&L(),Ie()}function ae(D){ce(o.loadParameters(l),D)}function ce(D,L){$e(),D.then(function(ee){te(ee,L)}).catch(function(ee){Ie(),qe(),v.hasClass("trv-hidden")||G(ee),r.error(ee)})}function Te(D){var L;return D&&D.length&&(L=D[0]),typeof L=="function"?L:null}function ve(D,L){var ee=Te(L);return ee?n.on(D,ee):n.trigger(D,L),o}function ke(){s===null&&(s=$.extend({},l)),se()}function Re(D){var L=window.telerikReportViewer,ee=et.viewerInstances.find(_e=>_e.id===e.viewerSelector+"-parameters-splitter").instance,Ee=v.prev();(e.parametersAreaPosition===Ke.TOP||e.parametersAreaPosition===Ke.LEFT)&&(Ee=v.next()),ee&&((C?$.fn.removeClass:$.fn.addClass).call(Ee,"trv-hidden"),ee.toggle(".trv-parameters-area",D))}function ze(){var D=v.prev(),L=v.find(".trv-parameters-area-content").attr("tabIndex");(e.parametersAreaPosition===Ke.TOP||e.parametersAreaPosition===Ke.LEFT)&&(D=v.next()),D.attr("aria-label",A.ariaLabelParametersAreaSplitter),D.attr("tabIndex",L)}function Be(D,L){G(),h.empty(),ce(L,ke)}o.reloadParameters(Be).beforeLoadReport(function(){oe=0,$e()}).error(Ie).pageReady(Ie),o.getParametersAreaState(function(D,L){var ee=!1;d&&(ee=Oe(d)),L.enabled=ee,L.visible=S}).setParametersAreaVisible(function(D,L){S=L.visible,Re(L.visible&&Oe(d))});function qe(){Z([])}return $.extend(r,{allParametersValid:function(){return b()},clear:function(){qe()},error:function(){return ve(un.ERROR,arguments)},parametersReady:function(){return ve(un.PARAMETERS_READY,arguments)},setParameters:function(D){s=D===null?null:$.extend({},D)}}),r}var xr="telerik_ReportViewer_ParametersArea";$.fn[xr]=function(t,e){return k(this,function(){$.data(this,xr)||$.data(this,xr,new kr(this,t,e))})};var Lr,Ht;function $r(t,e,a){var r=$.extend({},e,a),n=$(t).data("kendoMenu"),i=t.childNodes,o=r.controller,c=r.enableAccessibility;if(!o)throw"No controller (telerikReporting.ReportViewerController) has been specified.";n||l(),o.reportLoadComplete(function(N,b){c||n&&n._oldHoverItem&&n._oldHoverItem.toggleClass("k-focus"),b.renderingExtensions?g(b.renderingExtensions):o.getDocumentFormats().then(g)});function l(){try{n=$(t).kendoMenu().data("kendoMenu")}catch(N){throw console.error("Instantiation of Kendo Menu as Main Menu threw an exception",N),N}n.bind("activate",w),n.bind("deactivate",T),n.element.off("keydown",U),n.element.on("keydown",U),r.enableAccessibility&&d(),G()}function d(){var N=$.find('[data-role="telerik_ReportViewer_MainMenu"]');k(N,function(){var b=$(this),K=b.find("li"),Z=0,R=b.attr("tabIndex");R&&(Z=Fe(R),(!Z||isNaN(Z))&&(Z=0)),s(K,Z);var j=K.find('input[data-role="telerik_ReportViewer_PageNumberInput"]');j.length>0&&j.attr("tabindex",Z)})}function s(N,b){k(N,function(){var K=$(this);K.attr("tabindex",b),K.focus(function(){K.addClass("k-focus")}),K.blur(function(){K.removeClass("k-focus")});var Z=K.children("a");if(Z.length>0){var R=$(Z);R.attr("tabindex",-1),K.attr("title",R.attr("title"))}K.off("keydown"),K.on("keydown",function(j){j.which==kendo.keys.ENTER&&(h(K),Lr=K)})})}function g(N){k($(t).find("ul[data-command-list=export-format-list]"),function(){var b=$(this),K=b.parents("li"),Z=c?K.attr("tabindex"):-1;Z||(Z=1),b.empty(),k(N,function(){var R=this,j=c?re('aria-label="{localizedName}" ',R):" ",J="<li "+j+re('tabindex="'+Z+'"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>',R);n.append(J,K)}),c&&v(K.find("li"))})}function v(N){k(N,function(){var b=$(this);b.off("keydown"),b.on("keydown",function(K){switch(K.which){case kendo.keys.ENTER:h(b);break;case kendo.keys.UP:var Z=b.prev();Z.length>0?Z.focus():b.parents("li").focus();break;case kendo.keys.DOWN:var R=b.next();R.length>0?R.focus():b.parent().children("li").first().focus();break}})})}function h(N){if(M(N))E();else if(N&&N.length>0){var b=N.children("a");b.length>0&&b.click()}}function E(){var N="#trv-main-menu-export-command",b=$("[data-role='telerik_ReportViewer_MainMenu']").data("kendoMenu");b.open(N)}function w(N){var b=$(N.item);S(b)}function T(N){Ht=void 0}function S(N){Lr&&Lr.is(N)&&window.setTimeout(function(){var b=N.find("li");b.length>0&&b[0].focus()},100)}function U(N){switch(N.which){case kendo.keys.ENTER:if(!c){var b=V();b.length>0&&(M(b)&&Ht&&(b=Ht),h(b))}break;case kendo.keys.RIGHT:c?q():_();break;case kendo.keys.LEFT:c?x():I();break;case kendo.keys.DOWN:case kendo.keys.UP:c||(Ht=m())}}function V(){var N,b=document.activeElement;if(b&&b.localName=="li")for(var K=$(i).filter("li.k-item"),Z=0;Z<K.length;Z++){var R=K[Z];if(b===R){N=$(R);break}}else b&&b.localName=="input"?N=$(b).closest("li.k-item"):(N=n.element.children("li.k-item.k-focus"),N.length===0&&(N=n.element.children("li.k-item").first()));return N}function q(){var N=V();if(!(!N||!N.length>0)){var b=N.next();b.css("display")=="none"&&(b=b.next()),!b.length>0&&(b=$(i).filter("li.k-item").first()),b.focus()}}var W;function _(){var N=n.element.children("li.k-item"),b=N.filter(".k-focus");if(kendo.version>="2017.3.913"){W=b;return}if(b.hasClass("k-disabled"))if(!W||b.is(W)){var K=b.next();!K.length>0&&(K=N.first()),b.toggleClass("k-focus"),K.toggleClass("k-focus"),W=K,n._oldHoverItem=K}else W=b;else n._oldHoverItem=b,W=b}function x(){var N=V();if(!(!N||!N.length>0)){var b=N.prev();b.css("display")=="none"&&(b=b.prev()),!b.length>0&&(b=$(i).filter("li.k-item").last()),b.focus()}}function I(){var N=n.element.children("li.k-item.k-focus");W=N}function m(){var N=n.element.find('li.k-item.k-focus [data-command="telerik_ReportViewer_export"]');if(N.length===1)return N.parent("li")}function M(N){if(N.length!==0){var b=N.attr("id");return b=="trv-main-menu-export-command"||b=="trv-side-menu-export-command"}}function G(){var N=Y();N&&k(N,function(){var b=$(this),K=b.children("li.k-item");b.attr("aria-label",A[b.attr("aria-label")]),k(K,function(){var Z=$(this);if(Z.attr("aria-label",A[Z.attr("aria-label")]),Z.hasClass("trv-report-pager"))Z.attr("title",A[Z.attr("title")]);else{var R=Z.find("a");R&&R.attr("title",A[R.attr("title")])}})})}function Y(){return Ye("ul[data-role=telerik_ReportViewer_MainMenu]")}}var Or="telerik_ReportViewer_MainMenu";$.fn[Or]=function(t,e){return k(this,function(){$.data(this,Or)||$.data(this,Or,new $r(this,t,e))})};var Yn={};function Fr(t,e,a){e=$.extend({},Yn,e);var r=e.controller,n=!1,i=!1,o,c,l,d,s,g,v,h,E,w,T,S,U,V,q,W,_=[],x,I,m,M,G,Y=$("[data-selector='"+a.viewerSelector+"']").find(".trv-report-viewer"),N="",b={shadedClassName:"trv-search-dialog-shaded-result",highlightedClassName:"trv-search-dialog-highlighted-result",current:null,elements:[]};if(!r)throw"No controller (telerikReporting.ReportViewerController) has been specified.";r.pageReady(Ie).scrollPageReady(Ie).beginLoadReport(K).viewModeChanged(K),r.setSendEmailDialogVisible(function(u,p){p.visible&&i&&R(!i)}).getSearchDialogState(function(u,p){p.visible=i}).setSearchDialogVisible(function(u,p){Z(p.visible)});function K(){I||(R(!1),m=!1)}function Z(u){if(i=u,u){var p=a.searchMetadataOnDemand;if(p&&!m){I=!0,r.reportLoadComplete(function(){I&&(R(!0),I=!1)}),r.refreshReport(!0);return}}R(u)}function R(u){i=u,u?(m=!0,j(),S.open(),T.value(""),ve(null),Ae(!1,null)):(ee(),S&&S.options.visible&&S.close())}function j(){if(!n){o=$(t),c=o.find(".trv-search-dialog-input-box"),E=o.find(".trv-search-dialog-results-label"),w=o.find(".trv-search-dialog-results-area"),Ge(),Ve(o);try{l=o.find(".trv-search-dialog-search-options").kendoMenu(),s=o.find(".trv-search-dialog-stopsearch-placeholder").kendoMenu(),v=o.find(".trv-search-dialog-navigational-buttons").kendoMenu()}catch(u){throw console.error("Instantiation of Kendo Menu for Search Dialog threw an exception",u),u}d=l.data("kendoMenu"),g=s.data("kendoMenu"),h=v.data("kendoMenu"),d.element.on("keydown",se),g.element.on("keydown",se),h.element.on("keydown",se),J(".trv-search-dialog-search-options");try{T=c.kendoComboBox({dataTextField:"value",dataValueField:"value",dataSource:_,contentElement:"",change:te,ignoreCase:!1,filtering:C,filter:"startswith",delay:1e3,open:function(u){x&&u.preventDefault()},select:fe}).data("kendoComboBox")}catch(u){throw console.error("Instantiation of Kendo ComboBox as search input threw an exception",u),u}try{S=Y.find(".trv-search-window").kendoWindow({title:A.searchDialogTitle,height:390,width:310,minWidth:310,minHeight:390,maxHeight:700,scrollable:!1,close:function(){pe(),N=""},open:function(){ue()},deactivate:function(){r.setSearchDialogVisible({visible:!1})},activate:function(){T.input.focus()}}).data("kendoWindow")}catch(u){throw console.error("Instantiation of Kendo Window for Search dialog threw an exception",u),u}S.wrapper.addClass("trv-search"),ie(),n=!0}}function J(u){for(var p=$(u).find(".k-menu-item"),P=0;P<p.length;P++)$(p[P]).removeClass("k-item")}function se(u){var p=$(u.target).find(".k-focus");if(u.keyCode===13&&p&&p.length>0){var P=p.children("a");P.length>0&&P.click()}}$(window).resize(function(){S&&S.options.visible&&(pe(),ue())});function pe(){var u=S.element.parent(".k-window");G=u.offset()}function ue(){var u=$(window).innerWidth(),p=$(window).innerHeight(),P=S.wrapper,O=P.outerWidth(!0),F=P.outerHeight(!0),Q=10;if(G){var be=G.left,He=G.top,It=be+O,Je=He+F;It>u-Q&&(be=Math.max(Q,u-O-Q),P.css({left:be}),S.setOptions({position:{left:be}})),Je>p-Q&&(He=Math.max(Q,p-F-Q),P.css({top:He}),S.setOptions({position:{top:He}}))}else{var me=Y[0].getBoundingClientRect();P.css({top:me.top+Q,left:me.right-O-Q}),S.setOptions({position:{top:me.top+Q,left:me.right-O-Q}})}}function fe(u){if(window.event||window.event.type){var p=window.event;p.type==="keydown"&&(u.preventDefault(),p.keyCode===40?Ee(1):p.keyCode===38&&Ee(-1))}}var Ce={matchCase:"searchDialog_MatchCase",matchWholeWord:"searchDialog_MatchWholeWord",useRegex:"searchDialog_UseRegex"};function ie(){V={searchDialog_MatchCase:new Le(function(){oe(this)}),searchDialog_MatchWholeWord:new Le(function(){oe(this)}),searchDialog_UseRegex:new Le(function(){oe(this)})},it.bind(l,{controller:r,commands:V},a),U=new Le(function(){Oe()}),it.bind(s,{controller:r,commands:{searchDialog_StopSearch:U}},a),q={searchDialog_NavigateUp:new Le(function(){Ee(-1)}),searchDialog_NavigateDown:new Le(function(){Ee(1)})},it.bind(v,{controller:r,commands:q},a)}function Ge(){try{w.kendoListView({selectable:!0,navigatable:!0,dataSource:{},contentElement:"",template:"<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>"+A.searchDialogPageText+" #:page#</span></div>",change:function(){var u=this.select().index(),p=this.dataSource.view(),P=p[u];D(P),L(u,p.length)}})}catch(u){throw console.error("Instantiation of Kendo ListView as search result area threw an exception",u),u}}function Oe(){$e(!1)}function oe(u){u.checked(!u.checked()),ae()}function $e(u){U.enabled(u)}function Ie(u,p){i&&ze(W)}function C(u){u.preventDefault(),u.filter&&u.filter.value!==N&&(N=u.filter.value,ce(N))}function te(u){var p=u.sender.value();p&&N!==p&&(N=p,ce(N))}function ae(){T&&ce(T.value())}function ce(u){Te(),ke(u),r.getSearchResults({searchToken:u,matchCase:V.searchDialog_MatchCase.checked(),matchWholeWord:V.searchDialog_MatchWholeWord.checked(),useRegex:V.searchDialog_UseRegex.checked()}).then(function(p){ve(p,null)}).catch(function(p){p&&ve(null,p)})}function Te(){E.text(A.searchDialogSearchInProgress),ee(),W=null,$e(!0),Ae(!1,null)}function ve(u,p){$e(!1),p&&Ae(!0,p),Re(u),W=u,u&&u.length>0?(ze(u),qe()):L(-1,0)}function ke(u){if(!(!u||u==="")){var p=_.filter(function(P){return P.value===u});p&&p.length>0||(_.unshift({value:u}),_.length>10&&_.pop(),x=!0,T.dataSource.data(_),T.select(function(P){return P.value===u}),x=!1)}}function Re(u){var p=w.data("kendoListView");u||(u=[]),p.dataSource.data(u)}function ze(u){if(!(!u||u.length===0)){var p=o.parent(),P=p.find(".trv-page-container"),O=P.find("[data-search-id]");k(u,function(){var F=O.filter("[data-search-id="+this.id+"]");F&&(F.addClass(b.shadedClassName),b.elements.push(F))}),Be(M),M=null}}function Be(u){if(u){var p=u.id,P=$(b.elements.filter(function(F){return F.attr("data-search-id")===p})).first();if(P&&(b.current=P[0],b.current)){var O=$("[data-search-id='"+p+"']");O.removeClass(b.shadedClassName),O.addClass(b.highlightedClassName)}}}function qe(){var u=w.data("kendoListView"),p=u.element.children().first();u.select(p),u.trigger("change")}function D(u){u&&(b.current&&(b.current.removeClass(b.highlightedClassName),b.current.addClass(b.shadedClassName)),u.page===r.getCurrentPageNumber()?Be(u):r.getPageMode()!==De.CONTINUOUS_SCROLL?ee():Be(u),M=u,r.navigateToPage(u.page,{type:"search",id:u.id}))}function L(u,p){var P=p===0?A.searchDialogNoResultsLabel:re(A.searchDialogResultsFormatLabel,[u+1,p]);E.text(P);var O=u>0,F=u<p-1;q.searchDialog_NavigateUp.enabled(O),q.searchDialog_NavigateDown.enabled(F)}function ee(){b.elements&&b.elements.length>0&&k(b.elements,function(){this.removeClass(b.shadedClassName)}),b.current&&b.current.removeClass(b.highlightedClassName),b.elements=[],b.current=null}function Ee(u){var p=w.data("kendoListView"),P=p.select();if(!P)P=p.element.children().first(),p.select(P),p.trigger("change");else{var O=p.select().trigger("change").index(),F=p.dataSource.view(),Q=Math.min(F.length-1,Math.max(0,O+u));if(Q!==O){var me=F[Q],be=p.element.find('[data-uid="'+me.uid+'"]');be&&(p.select(be),p.trigger("change"),_e(be[0],p.element[0]))}}}function _e(u,p){if(u.offsetTop-u.clientHeight<p.scrollTop)u.scrollIntoView();else{var P=u.offsetTop+u.offsetHeight,O=p.scrollTop+p.offsetHeight;P>O&&(p.scrollTop=P-p.offsetHeight)}}function Ae(u,p){var P=l.find("i[data-role='telerik_ReportViewer_SearchDialog_Error']");if(!P||P.length===0){console.log(p);return}var O=l.data("kendoMenu").element.find("li").last();u?(P[0].title=p,O.show()):O.hide()}function Ve(u){if(u){var p=u.find(".trv-search-dialog-caption-label"),P=u.find(".trv-search-dialog-search-options"),O=u.find("a[data-command='telerik_ReportViewer_searchDialog_StopSearch']"),F=u.find("a[data-command='telerik_ReportViewer_searchDialog_MatchCase']"),Q=u.find("a[data-command='telerik_ReportViewer_searchDialog_MatchWholeWord']"),me=u.find("a[data-command='telerik_ReportViewer_searchDialog_UseRegex']"),be=u.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateUp']"),He=u.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateDown']");H(u,"aria-label"),H(P,"aria-label"),dt(p),we(O),we(F),we(Q),we(me),we(be),we(He)}}function we(u){H(u,"title"),H(u,"aria-label")}function dt(u){u&&u.text(A[u.text()])}function H(u,p){u&&u.attr(p,A[u.attr(p)])}function Le(u){var p=!0,P=!1,O={enabled:function(F){if(arguments.length===0)return p;var Q=!!F;return p=Q,$(this).trigger("enabledChanged"),O},checked:function(F){if(arguments.length===0)return P;var Q=!!F;return P=Q,$(this).trigger("checkedChanged"),O},exec:u};return O}}var Vr="telerik_ReportViewer_SearchDialog";$.fn[Vr]=function(t,e){return k(this,function(){$.data(this,Vr)||$.data(this,Vr,new Fr(this,t,e))})};var Xn={};function Gr(t,e,a){e=$.extend({},Xn,e);var r=e.controller,n=!1,i=!1,o,c,l=a.viewerSelector,d,s,g,v,h,E,w,T,S,U,V,q=$("[data-selector='"+l+"']").find(".trv-report-viewer");if(!r)throw"No controller (telerikReporting.ReportViewerController) has been specified.";if(!a.sendEmail||!a.sendEmail.enabled){var W=$("[data-selector='"+l+"']").find("a[data-command='telerik_ReportViewer_toggleSendEmailDialog']").closest(".k-item ");W.hide();return}r.beginLoadReport(_).viewModeChanged(_),r.getSendEmailDialogState(function(C,te){te.visible=i}).setSendEmailDialogVisible(function(C,te){x(te.visible)}).setSearchDialogVisible(function(C,te){te.visible&&i&&x(!i)}),r.getDocumentFormats().then(function(C){S=C});function _(){x(!1)}function x(C){i=C,C?(m(),J(a.sendEmail),c.open()):c&&c.options.visible&&c.close()}function I(){return T?T.value():bodyText.val()}function m(){if(!n){o=$(t),d=o.find("[name='from']"),s=o.find("[name='to']"),g=o.find("[name='cc']"),v=o.find("[name='subject']"),E=o.find("[name='format']"),w=o.find("textarea"),M(),K(),Oe(o);try{c=q.find(".trv-send-email-window").kendoWindow({title:A.sendEmailDialogTitle,minWidth:350,minHeight:350,maxHeight:900,modal:!0,close:function(){G(),Ge()},open:function(){Y(),N()},deactivate:function(){r.setSendEmailDialogVisible({visible:!1})},activate:function(){c.wrapper.find(".trv-send-email-fields input[type='email']:visible").first().focus(),setTimeout(function(){R()},250)}}).data("kendoWindow")}catch(C){throw console.error("Instantiation of Kendo Window for Send Email dialog threw an exception",C),C}c.wrapper.addClass("trv-send-email");try{h=E.kendoComboBox({dataTextField:"localizedName",dataValueField:"name",dataSource:S||[],filter:"startswith",dataBound:function(){this.select(0),this.trigger("change")}}).data("kendoComboBox")}catch(C){throw console.error("Instantiation of Kendo ComboBox as document format selector threw an exception",C),C}o.on("keydown",'[name="format_input"]',function(C){var te=9;C.keyCode===te&&T&&setTimeout(function(){T.focus()})});try{T=w.kendoEditor({tools:["bold","italic","underline","strikethrough","justifyLeft","justifyCenter","justifyRight","justifyFull","insertUnorderedList","insertOrderedList","indent","outdent","createLink","unlink","cleanFormatting","formatting","fontName","fontSize","foreColor","backColor","subscript","superscript"]}).data("kendoEditor")}catch(C){throw console.error("Instantiation of Kendo Editor for Email body editor threw an exception",C),C}J(a.sendEmail),n=!0}}$(window).resize(function(){c&&c.options.visible&&(G(),Y(),N())});function M(){o.find(".trv-send-email-field input").each(function(){var C=$(this),te=C.attr("name");C.attr("id",l+"-"+te)}),o.find(".trv-send-email-label label").each(function(){var C=$(this),te=C.attr("for");C.attr("for",l+"-"+te)})}function G(){var C=c.element.parent(".k-window");V=C.offset()}function Y(){var C=c.element.parent(".k-window"),te=$(window).width(),ae=350;te>800&&(ae=720),C.css({width:ae}),c.refresh({width:ae})}function N(){if(!V)c.center();else{var C=10,te=$(window).innerWidth(),ae=$(window).innerHeight(),ce=c.wrapper,Te=ce.outerWidth(!0),ve=ce.outerHeight(!0),ke=V.left,Re=V.top,ze=ke+Te,Be=Re+ve;ze>te-C&&(ke=Math.max(C,te-Te-C),ce.css({left:ke}),c.setOptions({position:{left:ke}})),Be>ae-C&&(Re=Math.max(C,ae-ve-C),ce.css({top:Re}),c.setOptions({position:{top:Re}}))}}var b={Send:"sendEmail_Send",Cancel:"sendEmail_Cancel"};function K(){U={sendEmail_Cancel:new Ie(function(){ie()}),sendEmail_Send:new Ie(function(C){Z()})},it.bind(o.find(".trv-send-email-actions"),{controller:r,commands:U},a)}function Z(C,te){var ae={from:d.val(),to:s.val(),cc:g.val(),subject:v.val(),format:h.value(),body:I(),deviceInfo:{}};j()&&(r.sendReport(ae),ie())}function R(){d.off("blur").on("blur",function(C){se($(this))||fe($(this),!1)}),s.off("blur").on("blur",function(C){se($(this))||fe($(this),!0)}),g.off("blur").on("blur",function(C){$(this).val().length?fe($(this),!0):ue($(this))})}function j(){var C=se(d)||!fe(d,!1),te=se(s)||!fe(s,!0),ae=g.val().length&&!fe(g,!0),ce=h.value().length;return ce||pe(E,"data-required-msg"),!(C||te||ae||!ce)}function J(C){d.val(C&&C.from||""),s.val(C&&C.to||""),g.val(C&&C.cc||""),v.val(C&&C.subject||""),C&&C.format?h.value(C.format):h.select(0),h.trigger("change"),T.value(C&&C.body||"")}function se(C){return C.val().length?(ue(C),!1):(pe(C,"data-required-msg"),!0)}function pe(C,te){var ae=A[C.attr(te)];$('[data-for="'+C.attr("name")+'"]').addClass("-visible").text(ae)}function ue(C){$('[data-for="'+C.attr("name")+'"]').removeClass("-visible")}function fe(C,te){var ae=C.val();if(te){for(var ce=ae.split(/[\s,;]+/),Te=0;Te<ce.length;Te++)if(!Ce(ce[Te].trim(),C))return!1;return!0}else return Ce(ae,C)}function Ce(C,te){var ae=/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;return C.indexOf(",")>-1||C.indexOf(";")>-1?(pe(te,"data-single-email-msg"),!1):ae.test(C)?!0:(pe(te,"data-email-msg"),!1)}function ie(){c.close()}function Ge(){$(".k-invalid-msg").removeClass("-visible")}function Oe(C){if(C){var te=C.find(".trv-replace-string"),ae=C.find("[aria-label]"),ce=C.find("[title]");te.length&&$.each(te,function(Te,ve){oe($(ve))}),ae.length&&$.each(ae,function(Te,ve){$e($(ve),"aria-label")}),ce.length&&$.each(ce,function(Te,ve){$e($(ve),"title")})}}function oe(C){C&&C.text(A[C.text()])}function $e(C,te){C&&C.attr(te,A[C.attr(te)])}function Ie(C){var te=!0,ae=!1,ce={enabled:function(Te){if(arguments.length===0)return te;var ve=!!Te;return te=ve,$(this).trigger("enabledChanged"),ce},checked:function(Te){if(arguments.length===0)return ae;var ve=!!Te;return ae=ve,$(this).trigger("checkedChanged"),ce},exec:C};return ce}}var Ur="telerik_ReportViewer_SendEmail";$.fn[Ur]=function(t,e){return k(this,function(){$.data(this,Ur)||$.data(this,Ur,new Gr(this,t,e))})};function Hr(t,e,a){var r=$.extend({},e,a),n=$(t).data("kendoMenu"),i=r.enableAccessibility,o,c=3,l,d,s=!1,g=r.controller;if(!g)throw"No controller (telerikReporting.ReportViewerController) has been specified.";n||v(t);function v(m){var M=$(m);try{l=M.children("ul").kendoPanelBar().data("kendoPanelBar")}catch(G){throw console.error("Instantiation of Kendo PanelBar as side menu threw an exception",G),G}l.bind("expand",E),l.element.off("keydown",q),l.element.on("keydown",q),U(M),S(M),M.click(function(G){G.target==m&&g.setSideMenuVisible({visible:!s})}),x()}g.setSideMenuVisible(function(m,M){h(),i&&l.element.focus(),s=M.visible,s||l.collapse($("#trv-side-menu-export-command"))}).getSideMenuVisible(function(m,M){M.visible=s});function h(){var m=l.element.parent(),M=m.position().left<0||!m.is(":visible");M?m.show():window.setTimeout(function(){m.hide()},500)}function E(m){var M=$(m.item);l.unbind("expand",E),l.append({text:A.loadingFormats,spriteCssClass:"k-icon k-loading"},M),r.controller.getDocumentFormats().then(w).then(function(){l.expand(M)}).then(function(){l.bind("expand",E)})}function w(m){k($(t).find("ul[data-command-list=export-format-list]"),function(){var M=$(this),G=M.parents("li"),Y=G.attr("tabindex");Y||(Y=c),M.empty(),k(m,function(N){var b=this,K=i?re('aria-label="{localizedName}" ',b):" ",Z="<li "+K+re('tabindex="'+Y+'"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>',b);l.append(Z,G)}),V(G.find("li"),Y),S(G)})}function T(m){o&&o.is(m)&&window.setTimeout(function(){var M=m.find("li");M.length>0&&M[0].focus()},100)}function S(m){k(m.find("li"),function(){var M=$(this).children("ul").length===0;M&&$(this).children("a").click(function(){g.setSideMenuVisible({visible:!s})})})}function U(m){if(m){var M=m.children("ul"),G=m.attr("tabindex"),Y=G||c;V(M,Y)}}function V(m,M){m.attr("tabindex",M);var G=m.find("li");k(G,function(){var Y=$(this);Y.attr("tabindex",M);var N=Y.children("a");if(N.length>0){var b=$(N);b.attr("tabindex",-1)}Y.focus(function(){var K=Y.children("a");K.length>0&&K.addClass("k-focus")}),Y.blur(function(){var K=Y.children("a");K.length>0&&K.removeClass("k-focus")}),Y.off("keydown",W),Y.on("keydown",W)})}function q(m){if(m.which==kendo.keys.ENTER){var M,G=!1,Y=document.activeElement;if(Y&&Y.localName=="li")for(var N=l.element.find("li.k-item"),b=0;b<N.length;b++){var K=N[b];if(Y===K){M=$(K),G=!0;break}}else M=l.select();if(!M||!M.length>0)return;_(M,G)}}function W(m){m.which==kendo.keys.ENTER&&_($(m.target),!1)}function _(m,M){if(!(!m.length>0)){o=m;var G=m.children("ul").length===0;if(!G)M&&(m.hasClass("k-active")?l.collapse(m):l.expand(m));else{var Y=m.find("a");Y.length>0&&Y[0].click()}}}function x(){var m=I();m&&k(m,function(){var M=$(this),G=M.children("li.k-panelbar-header");M.attr("aria-label",A[M.attr("aria-label")]),k(G,function(){var Y=$(this),N=Y.find("a");if(Y.attr("aria-label",A[Y.attr("aria-label")]),N){var b=N.find("span:not(.k-icon)");N.attr("title",A[N.attr("title")]),b&&b.text(A[b.text()])}})})}function I(){return Ye("div[data-role=telerik_ReportViewer_SideMenu] > ul")}}var Br="telerik_ReportViewer_SideMenu";$.fn[Br]=function(t,e){return k(this,function(){$.data(this,Br)||$.data(this,Br,new Hr(this,t,e))})};var cn=et.viewerInstances,qn=function(){var t={};return{load:function(e,a,r){var n=t[e];return n||(t[e]=n=r.get(e).then(function(i){var o={},c=[],l=Qe(a,"\\/")+"/";i=_t(i,"{service}/",l),i=_t(i,"{service}",l);var d=$("<div></div>").html(i);return k(d.find("template"),function(s,g){var v=$(g);o[v.attr("id")]=Dt(v.html(),`
14
- `)}),k(d.find("link"),function(s,g){c.push(Dt(g.outerHTML,`
15
- `))}),c=lr(c),{templates:o,styleSheets:c}})),n}}}();function Jn(){var t={};return{getItem:function(e){return t[e]},setItem:function(e,a){t[e]=a},removeItem:function(e){delete t[e]}}}function Zn(t,e,a){var r={};function n(g){var v=e.getItem(c(g));return v??a[g]}function i(g,v){var h="state",E=n(h),w=typeof E=="string"?JSON.parse(E):{};if(v.length){if(w){var T=v[0];T===void 0?delete w[g]:w[g]=T}return o(h,JSON.stringify(w)),r}else return w[g]}function o(g,v){var h=c(g);if(e.setItem(h,v),e instanceof window.Storage){var E=e.getItem(h),w=document.createEvent("StorageEvent");w.initStorageEvent("telerikReportingStorage",!1,!1,h,E,v,null,e),window.dispatchEvent(w)}}function c(g){return t+"_"+g}function l(g,v){return v.length?(o(g,v[0]),r):n(g)}function d(g,v){return v.length?(o(g,v[0]),r):parseFloat(n(g))}function s(g,v){if(v.length)return o(g,JSON.stringify(v[0])),r;var h=n(g);return typeof h=="string"?JSON.parse(h):null}return le(r,{viewMode:function(){return i("viewMode",arguments)},pageMode:function(){return i("pageMode",arguments)},printMode:function(){return i("printMode",arguments)},scale:function(){return i("scale",arguments)},scaleMode:function(){return i("scaleMode",arguments)},documentMapVisible:function(){return i("documentMapVisible",arguments)},parametersAreaVisible:function(){return i("parametersAreaVisible",arguments)},history:function(){return s("history",arguments)},clientId:function(){return l("clientId",arguments)},reportSource:function(){return i("reportSource",arguments)},pageNumber:function(){return i("pageNumber",arguments)},enableAccessibility:function(){return l("enableAccessibility",arguments)},accessibilityKeyMap:function(){return i("accessibilityKeyMap",arguments)},searchMetadataOnDemand:function(){return l("searchMetadataOnDemand",arguments)},keepClientAlive:function(){return l("keepClientAlive",arguments)}}),r}function Qn(t,e){return{id:null,serviceUrl:null,templateUrl:Qe(t,"\\/")+"/resources/templates/telerikReportViewerTemplate-"+e+".html/",reportSource:null,reportServer:null,authenticationToken:null,sendEmail:null,scale:1,scaleMode:he.FIT_PAGE,viewMode:Me.INTERACTIVE,pageMode:De.CONTINUOUS_SCROLL,parametersAreaPosition:Ke.RIGHT,documentMapAreaPosition:gt.LEFT,parameters:{editors:{multiSelect:ot.LIST_VIEW,singleSelect:ot.LIST_VIEW}},persistSession:!1,parameterEditors:[],disabledButtonClass:null,checkedButtonClass:null,parametersAreaVisible:!0,documentMapVisible:!0,enableAccessibility:!1,searchMetadataOnDemand:!1,initialPageAreaImageUrl:null,keepClientAlive:!0}}function fn(t,e){var a=e.serviceUrl,r="";e.reportServer&&(r=Qe(e.reportServer.url,"\\/"),a=r+"/api/reports");var n=$(t),i={},o=e.id||"#"+n.attr("id"),c,l={},d={},s={},g={},v={},h={},E={},w={},T="";if(e.viewerSelector="reportViewer-"+qt(),n.attr("data-selector",e.viewerSelector),!U(e))return;var S="18.0.24.130";e=le({},Qn(a,S),e),l=new Zn(o,e.persistSession?window.sessionStorage:new Jn,{scale:e.scale,scaleMode:e.scaleMode,printMode:e.printMode?e.printMode:e.directPrint,enableAccessibility:e.enableAccessibility,searchMetadataOnDemand:e.searchMetadataOnDemand,sendEmail:e.sendEmail,parametersAreaPosition:e.parametersAreaPosition,documentMapAreaPosition:e.documentMapAreaPosition,keepClientAlive:e.keepClientAlive}),e.reportServer?(T=Qe(e.reportServer.url,"\\/"),w.serviceUrl=T+"/api/reports",w.loginInfo={url:T+"/Token",username:e.reportServer.username,password:e.reportServer.password}):w.serviceUrl=e.serviceUrl,d=new Nr(w),s=e.controller,s?s.updateSettings(l):s=new Pr({serviceClient:d,settings:l}),v=new Tr({controller:s,settings:l}),h=new Er({controller:s,history:v}),new Mr({controller:s,history:v,commands:h}),E={stringResources:A,refreshReport:function(R){return arguments.length===0&&(R=!0),s.refreshReport(R),E},reportSource:function(R){return R||R===null?(s.setReportSource(R),s.refreshReport(!1),E):s.getReportSource()},clearReportSource:function(){return s.clearReportSource(),E},viewMode:function(R){return R?(s.setViewMode(R),E):s.getViewMode()},pageMode:function(R){return R?(s.setPageMode(R),E):s.getPageMode()},printMode:function(R){return R?(s.setPrintMode(R),E):s.getPrintMode()},scale:function(R){return R?(s.scale(R),E):(R={},s.getScale(R),R)},currentPage:function(){return s.getCurrentPageNumber()},pageCount:function(){return s.getPageCount()},parametersAreaVisible:function(R){s.setParametersAreaVisible({visible:R})},getReportParameters:function(){return s.getReportParameters()},authenticationToken:function(R){return R&&s.setAuthenticationToken(R),E},bind:function(R,j){V(R,j,!0)},unbind:function(R,j){V(R,j,!1)},accessibilityKeyMap:function(R){if(c)return R?(c.setKeyMap(R),E):c.getKeyMap()},commands:h,dispose:function(){s.dispose(),g&&g.dispose()}};function U(R){if(!R)return n.text("The report viewer configuration options are not initialized."),!1;if(R.reportServer){if(!R.reportServer.url)return n.text("The report server URL is not specified."),!1}else if(!R.serviceUrl)return n.text("The serviceUrl is not specified."),!1;return!0}function V(R,j,J){typeof j=="function"?J?$(E).on(R,{sender:E},j):$(E).off(R,j):!j&&!J&&$(E).off(R)}function q(){var R={EXPORT_BEGIN:s.Events.EXPORT_STARTED,EXPORT_END:s.Events.EXPORT_DOCUMENT_READY,PRINT_BEGIN:s.Events.PRINT_STARTED,PRINT_END:s.Events.PRINT_DOCUMENT_READY,RENDERING_BEGIN:s.Events.BEFORE_LOAD_REPORT,RENDERING_END:s.Events.REPORT_LOAD_COMPLETE,PAGE_READY:s.Events.PAGE_READY,ERROR:s.Events.ERROR,UPDATE_UI:s.Events.UPDATE_UI,INTERACTIVE_ACTION_EXECUTING:s.Events.INTERACTIVE_ACTION_EXECUTING,INTERACTIVE_ACTION_ENTER:s.Events.INTERACTIVE_ACTION_ENTER,INTERACTIVE_ACTION_LEAVE:s.Events.INTERACTIVE_ACTION_LEAVE,VIEWER_TOOLTIP_OPENING:s.Events.TOOLTIP_OPENING,SEND_EMAIL_BEGIN:s.Events.SEND_EMAIL_STARTED,SEND_EMAIL_END:s.Events.SEND_EMAIL_READY},j=$(E);for(var J in R){var se=R[J];s.on(se,function(pe,ue){return function(fe,Ce){pe.trigger({type:ue,data:fe.data},Ce)}}(j,J))}}function W(){V(ye.EXPORT_BEGIN,e.exportBegin,!0),V(ye.EXPORT_END,e.exportEnd,!0),V(ye.PRINT_BEGIN,e.printBegin,!0),V(ye.PRINT_END,e.printEnd,!0),V(ye.RENDERING_BEGIN,e.renderingBegin,!0),V(ye.RENDERING_END,e.renderingEnd,!0),V(ye.PAGE_READY,e.pageReady,!0),V(ye.ERROR,e.error,!0),V(ye.UPDATE_UI,e.updateUi,!0),V(ye.INTERACTIVE_ACTION_EXECUTING,e.interactiveActionExecuting,!0),V(ye.INTERACTIVE_ACTION_ENTER,e.interactiveActionEnter,!0),V(ye.INTERACTIVE_ACTION_LEAVE,e.interactiveActionLeave,!0),V(ye.VIEWER_TOOLTIP_OPENING,e.viewerToolTipOpening,!0),V(ye.SEND_EMAIL_BEGIN,e.sendEmailBegin,!0),V(ye.SEND_EMAIL_END,e.sendEmailEnd,!0)}function _(){n.html(i["trv-report-viewer"]),it.bind(n,{controller:s,commands:h,templates:i},e),g=new Ar(t,s),g.attach(),x(),q(),W(),m(),M(e)}function x(){var R={max:"500px",min:"50px",size:"210px",collapsible:!0},j=n.find(".trv-parameters-area"),J=[{}],se={max:"500px",min:"50px",size:"210px",collapsible:!0,collapsed:!0},pe=n.find(".trv-document-map"),ue=[{}],fe="horizontal";e.documentMapAreaPosition===gt.RIGHT?(pe.insertAfter(n.find(".trv-pages-area")),ue.push(se)):ue.unshift(se),(e.parametersAreaPosition===Ke.TOP||e.parametersAreaPosition===Ke.BOTTOM)&&(fe="vertical",j.addClass("-vertical"),R.size="130px"),e.parametersAreaPosition===Ke.LEFT||e.parametersAreaPosition===Ke.TOP?(j.insertBefore(n.find(".trv-document-map-splitter")),J.unshift(R)):J.push(R);try{var Ce=n.find(".trv-document-map-splitter").kendoSplitter({panes:ue,expand:function(oe){I(oe.pane,!0)},collapse:function(oe){I(oe.pane,!1)},resize:function(oe){}}).data("kendoSplitter")}catch(oe){throw console.error("Instantiation of Kendo Splitter as Document Map splitter threw an exception",oe),oe}try{var ie=n.find(".trv-parameters-splitter").kendoSplitter({panes:J,orientation:fe,expand:function(oe){I(oe.pane,!0)},collapse:function(oe){I(oe.pane,!1)},resize:function(oe){}}).data("kendoSplitter")}catch(oe){throw console.error("Instantiation of Kendo Splitter as Parameters area splitter threw an exception",oe),oe}var Ge={id:e.viewerSelector+"-parameters-splitter",instance:ie},Oe={id:e.viewerSelector+"-document-map-splitter",instance:Ce};cn.push(Ge),cn.push(Oe)}function I(R,j){var J=$(R).attr("data-id");switch(J){case"trv-document-map":s.setDocumentMapVisible({visible:j});break;case"trv-parameters-area":s.setParametersAreaVisible({visible:j});break}}function m(){var R=l.viewMode(),j=l.pageMode(),J=l.printMode(),se=l.scale(),pe=l.scaleMode(),ue=l.documentMapVisible(),fe=l.parametersAreaVisible(),Ce=l.accessibilityKeyMap();s.setViewMode(R||e.viewMode),s.setPageMode(j||e.pageMode),s.setPrintMode(J||e.printMode),s.scale({scale:se||e.scale,scaleMode:pe||e.scaleMode}),s.setDocumentMapVisible({visible:ue||e.documentMapVisible}),s.setParametersAreaVisible({visible:fe||e.parametersAreaVisible}),s.printModeChanged(function(){l.printMode(s.getPrintMode())}),s.viewModeChanged(function(){l.viewMode(s.getViewMode())}),s.pageModeChanged(function(){l.pageMode(s.getPageMode())}),s.scale(function(){var ie={};s.getScale(ie),l.scale(ie.scale),l.scaleMode(ie.scaleMode)}),s.setSideMenuVisible(function(ie,Ge){window.setTimeout(function(){(Ge.visible?$.fn.addClass:$.fn.removeClass).call(n,"trv-side-menu-visible")},1)}),s.setDocumentMapVisible(function(){var ie={};s.getDocumentMapState(ie),l.documentMapVisible(ie.visible)}),s.setParametersAreaVisible(function(){var ie={};s.getParametersAreaState(ie),l.parametersAreaVisible(ie.visible)})}function M(R){if(R.enableAccessibility){c=new pr({controller:s,templates:i});var j=R.accessibilityKeyMap;j&&c.setKeyMap(j),l.contentTabIndex=G()}}function G(){var R="div.trv-pages-area";try{var j=n.find(R);if(j.length===0)throw"Selector "+R+" did not return a result.";return parseInt(j.attr("tabindex"))}catch(J){return console&&console.log(J),0}}function Y(){var R=!1;_(),s.reportLoadComplete(function(){e.documentMapVisible===!1&&s.setDocumentMapVisible({visible:!1})});var j=l.reportSource();if(j!==void 0){s.setReportSource(j);var J=l.pageNumber();J!==void 0&&s.navigateToPage(J),R=!0}else e.viewMode&&s.setViewMode(e.viewMode),e.pageMode&&s.setPageMode(e.pageMode),e.reportSource&&(s.setReportSource(e.reportSource),R=!0);typeof e.ready=="function"&&e.ready.call(E),R&&s.refreshReport(!1)}function N(R){if(!R)return Promise.resolve();var j=$("head"),J=j.find("link").map(function(pe,ue){return ue.outerHTML}).toArray(),se=[];return k(R,function(pe,ue){J.indexOf(ue)===-1&&se.push(new Promise(function(fe,Ce){var ie=$(ue);ie.on("load",fe),ie.on("onerror",function(){at("error loading stylesheet "+ue),fe()}),j.append(ie)}))}),Promise.all(se).then(s.cssLoaded)}function b(){return window.Promise}function K(R){if(window.kendo)return Promise.resolve();var j=Qe(a,"\\/")+"/resources/js/telerikReportViewer.kendo-"+R+".min.js/";return or(j).catch(function(J){at("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: "+J.error)})}function Z(R){K(R).then(function(){}).then(function(){E.authenticationToken(e.authenticationToken),s.getServiceVersion().catch(function(j){var J=kt(j)?j.exceptionMessage:re(A.errorServiceUrl,[Ne(a)]);return n.text(J),Promise.reject()}).then(function(j){if(j!==R)return n.text(re(A.errorServiceVersion,[j,R])),Promise.reject();qn.load(e.templateUrl,a,d).catch(function(){return n.text(re(A.errorLoadingTemplates,[Ne(e.templateUrl)])),Promise.reject()}).then(function(J){return i=J.templates,N(J.styleSheets)}).then(Y)})})}return b()?Z(S):ir("https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise",Z,S),E}var Wr="telerik_ReportViewer";$.fn[Wr]=function(t){return this.selector&&!t.selector&&(t.selector=this.selector),k(this,function(){$.data(this,Wr)||$.data(this,Wr,new fn(this,t))})};var ea=[{name:"telerik_ReportViewer_DocumentMapArea",constructor:yr},{name:"telerik_ReportViewer_MainMenu",constructor:$r},{name:"telerik_ReportViewer_PagesArea",constructor:Gt},{name:"telerik_ReportViewer_ParametersArea",constructor:kr},{name:"telerik_ReportViewer_SearchDialog",constructor:Fr},{name:"telerik_ReportViewer_SendEmail",constructor:Gr},{name:"telerik_ReportViewer_SideMenu",constructor:Hr}];ea.forEach(t=>{$.fn[t.name]=function(e,a){return k(this,function(){$.data(this,t.name)||$.data(this,t.name,new t.constructor(this,e,a))})}});return Pn(ta);})();
16
-
17
- /* DO NOT MODIFY OR DELETE THIS LINE! UPGRADE WIZARD CHECKSUM ca7efc798ee3f50b325173cf47674a6e */
1
+ var telerikReportViewer=function(e){"use strict";var t=/{(\w+?)}/g,n={DELETE:46,BACKSPACE:8,TAB:9,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36};function r(){if(window.navigator.userAgent.toLowerCase().indexOf("firefox")>-1){var e=Object.keys(n),t=e.length;return function(r){for(var a=0;a<t;a++)if(n[e[a]]==r)return!0}}return function(e){return!1}}function a(e,t,n,r){return{left:e,top:t,width:n,height:r,right:function(){return e+n},bottom:function(){return t+r},union:function(n){var r=Math.min(e,n.left),i=Math.min(t,n.top);return a(r,i,Math.max(this.right(),n.right())-r,Math.max(this.bottom(),n.bottom())-i)}}}function i(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))}function o(e,t){return c(s(e,t),t)}function l(e,t,n){return e.replace(new RegExp(t,"g"),n)}function s(e,t){return void 0===t&&(t="s"),e.replace(new RegExp("^["+t+"]+"),"")}function c(e,t){return void 0===t&&(t="s"),e.replace(new RegExp("["+t+"]+$"),"")}function u(e,n){var r=Array.isArray(n);return e.replace(t,(function(e,t){return n[r?parseInt(t):t]}))}function d(e){return $("<div>").text(e).html()}function f(e){return/^(\-|\+)?([0-9]+)$/.test(e)?Number(e):NaN}function p(e){return/^(\-|\+)?([0-9]+(\.[0-9]+)?)$/.test(e)?Number(e):NaN}function g(e){return e instanceof Date?e:(/Z|[\+\-]\d\d:?\d\d/i.test(e)||(e+="Z"),new Date(e))}function v(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))}function h(e){return new Date(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function m(e,t){if(e instanceof Date&&t instanceof Date){if(e.getTime()!==t.getTime())return!1}else if(e!==t)return!1;return!0}function E(e,t){if(e&&t&&e.report===t.report){var n="";e.parameters&&(n=JSON.stringify(e.parameters));var r="";return t.parameters&&(r=JSON.stringify(t.parameters)),n===r}return!1}function b(e,t){if(null===e)return null===t;if(null===t)return!1;if(e.length!==t.length)return!1;for(var n=e.length-1;n>=0;n--)if(!m(e[n],t[n]))return!1;return!0}function T(){var e=/Version\/(\d+.\d+.\d+) Safari/.exec(navigator.userAgent);return!(e&&e.length>1)||parseFloat(e[1])>=6}function P(e){return!!e&&"internalservererror"===l(e," ","").toLowerCase()}function I(e){var t="ArgumentException";return w(D(e),t,"System."+t)}function _(e){var t="InvalidClientException";return w(D(e),t,"Telerik.Reporting.Services.Engine."+t)}function C(e){return S(D(e))}function S(e){var t="DrawingFactoryUnavailableException";return w(e,t,"Telerik.Drawing.Contract."+t)}function w(e,t,n){return e&&e.exceptionType&&R(e.exceptionType,t,n)}function R(e,t,n){return e&&(e===n||e.endsWith(t))}function A(e){try{return JSON.parse(e,(function(e,t){if(e&&t){var n=e.charAt(0);if(n===n.toUpperCase())this[n.toLowerCase()+e.slice(1)]=t}return t}))}catch(e){return null}}function D(e){return!(!e||!e.responseText)&&A(e.responseText)}function N(){var e,t,n,r,a=0,i=arguments.length;for(r=i>1&&arguments[a++]||{};a<i;a++)if(null!=(n=arguments[a]))for(t in n)r[t],r!==(e=n[t])&&void 0!==e&&(r[t]=e);return r}function M(e,t){var n,r=0;if(y(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e}function y(e){return!!Array.isArray(e)||"number"==typeof(!!e&&"length"in e&&e.length)}function k(e,t,n){var r=document.createElement("script");r.src=e,r.onload=function(){t(n)},r.onerror=function(){O(new Error("Failed to load script "+e))},document.head.appendChild(r)}function x(e){return B({dataType:"script",cache:!0,url:e})}function L(e){return e.filter((function(e,t,n){return n.lastIndexOf(e)===t}))}function O(e){var t=window.console;t&&t.error&&t.error(e)}function V(e){e.constructor!=Array&&(e=[e]);for(var t=$(e[0]),n=1;n<e.length;n++)t=t.find(e[n]);return t}function U(e){if(e&&e.length<6){var t=1,n=e.split("");for("#"!==n[0]&&(t=0);t<n.length;t++)n[t]=n[t]+n[t];e=n.join("")}var r=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return r?parseInt(r[1],16)+", "+parseInt(r[2],16)+", "+parseInt(r[3],16):null}function G(e){return!!e&&e.indexOf(",")>-1}function F(e){if("transparent"===e.toLowerCase())return 0;if(!G(e))return 1;-1!==e.indexOf("#")&&(e=U(e));var t=e.split(",").map((function(e){return e.trim()}));return 4===t.length?parseFloat((parseFloat(t[3].replace(/[()]/g,""))/255).toFixed(2)):1}function B(e){return new Promise((function(t,n){$.ajax(e).done((function(e){return t(e)})).fail((function(e,t,r){n(function(e,t,n){return{xhr:e,status:t,error:n}}(e,t,r))}))}))}function H(e){return Object.prototype.toString.call(e).slice(8,-1)}var z=Object.freeze({__proto__:null,isSpecialKey:r,rectangle:a,generateGuidString:i,trim:o,replaceAll:l,lTrim:s,rTrim:c,stringFormat:u,escapeHtml:d,tryParseInt:f,tryParseFloat:p,parseToLocalDate:g,adjustTimezone:v,unadjustTimezone:h,areEqual:m,reportSourcesAreEqual:E,areEqualArrays:b,isSvgSupported:T,isInternalServerError:P,isSystemArgumentException:I,isInvalidClientException:_,isApplicationException:C,isApplicationExceptionInstance:S,isExceptionOfType:function(e,t){return w(D(e),t,t)},exceptionTypeNamesMatch:R,parseJSON:A,getExceptionInstance:D,extend:N,each:M,selector:function(){return document.querySelectorAll(arguments[0])},isArray:y,loadScriptWithCallback:k,loadScript:x,filterUniqueLastOccurance:L,logError:O,findElement:V,toRgbColor:U,isRgbColor:G,getColorAlphaValue:F,$ajax:B,type:H,isEqual:function e(t,n){if(t===n)return!0;if(t!=t&&n!=n)return!0;if(t!=t&&n==n||t==t&&n!=n)return!1;const r=H(t);if(r!==H(n))return!1;if("Array"===r){if(t.length!==n.length)return!1;const r=t.length;for(let a=0;a<r;a++)if(!e(t[a],n[a]))return!1;return!0}if("Object"===r){const r=Object.keys(t),a=Object.keys(n);if(r.length!==a.length)return!1;const i=r.length;for(let a=0;a<i;a++){const i=r[a];if(!e(t[i],n[i]))return!1}return!0}return"Date"===r&&t.getTime()===n.getTime()}});function W(e){return parseInt(e,10)||0}function K(e){var t=$(e);return{left:W(t.css("marginLeft")),right:W(t.css("marginRight")),top:W(t.css("marginTop")),bottom:W(t.css("marginBottom"))}}function j(e){var t=$(e);return{left:W(t.css("paddingLeft")),right:W(t.css("paddingRight")),top:W(t.css("paddingTop")),bottom:W(t.css("paddingBottom"))}}function Y(e){var t=$(e);return{left:W(t.css("borderLeftWidth")),right:W(t.css("borderRightWidth")),top:W(t.css("borderTopWidth")),bottom:W(t.css("borderBottomWidth"))}}function X(e,t,n,r,a){r=r||0,a=a||0;var i=u("scale({0}, {1})",[t=t||1,n=n||1]),o=u("{0} {1}",[r,a]);$(e).css("transform",i).css("transform-origin",o)}var q,J=Object.freeze({__proto__:null,getMargins:K,getPadding:j,getBorderWidth:Y,scale:X});window.telerikReportViewer||(window.telerikReportViewer={}),(q=window.telerikReportViewer).sr||(q.sr={controllerNotInitialized:"Controller is not initialized.",noReportInstance:"No report instance.",missingTemplate:"!obsolete resource!",noReport:"No report.",noReportDocument:"No report document.",missingOrInvalidParameter:"There are missing or invalid parameter values. Please input valid data for the following parameters:\n",invalidParameter:"Please input a valid value.",invalidDateTimeValue:"Please input a valid date.",parameterIsEmpty:"Parameter value cannot be empty.",cannotValidateType:"Cannot validate parameter of type {type}.",loadingFormats:"Loading...",loadingReport:"Loading report...",preparingDownload:"Preparing document to download. Please wait...",preparingPrint:"Preparing document to print. Please wait...",errorLoadingTemplates:"Error loading the report viewer's templates. (templateUrl = '{0}').",errorServiceUrl:"Cannot access the Reporting REST service. (serviceUrl = '{0}'). Make sure the service address is correct and enable CORS if needed. (https://enable-cors.org)",errorServiceVersion:"The version of the Report Viewer '{1}' does not match the version of the Reporting REST Service '{0}'. Please make sure both are running same version.",loadingReportPagesInProgress:"{0} pages loaded so far...",loadedReportPagesComplete:"Done. Total {0} pages loaded.",noPageToDisplay:"No page to display.",errorDeletingReportInstance:"Error deleting report instance: '{0}'.",errorRegisteringViewer:"Error registering the viewer with the service.",noServiceClient:"No serviceClient has been specified for this controller.",errorRegisteringClientInstance:"Error registering client instance.",errorCreatingReportInstance:"Error creating report instance (Report = '{0}').",errorCreatingReportDocument:"Error creating report document (Report = '{0}'; Format = '{1}').",unableToGetReportParameters:"Unable to get report parameters.",errorObtainingAuthenticationToken:"Error obtaining authentication token.",clientExpired:"Click 'Refresh' to restore client session.",promisesChainStopError:"Error shown. Throwing promises chain stop error.",renderingCanceled:"Report processing was canceled.",tryReportPreview:"The report may now be previewed.",parameterEditorSelectNone:"clear selection",parameterEditorSelectAll:"select all",parametersAreaPreviewButton:"Preview",menuNavigateBackwardText:"Navigate Backward",menuNavigateBackwardTitle:"Navigate Backward",menuNavigateForwardText:"Navigate Forward",menuNavigateForwardTitle:"Navigate Forward",menuStopRenderingText:"Stop Rendering",menuStopRenderingTitle:"Stop Rendering",menuRefreshText:"Refresh",menuRefreshTitle:"Refresh",menuFirstPageText:"First Page",menuFirstPageTitle:"First Page",menuLastPageText:"Last Page",menuLastPageTitle:"Last Page",menuPreviousPageTitle:"Previous Page",menuNextPageTitle:"Next Page",menuPageNumberTitle:"Page Number Selector",menuDocumentMapTitle:"Toggle Document Map",menuParametersAreaTitle:"Toggle Parameters Area",menuZoomInTitle:"Zoom In",menuZoomOutTitle:"Zoom Out",menuPageStateTitle:"Toggle FullPage/PageWidth",menuPrintText:"Print...",menuContinuousScrollText:"Toggle Continuous Scrolling",menuSendMailText:"Send an email",menuPrintTitle:"Print",menuContinuousScrollTitle:"Toggle Continuous Scrolling",menuSendMailTitle:"Send an email",menuExportText:"Export",menuExportTitle:"Export",menuPrintPreviewText:"Toggle Print Preview",menuPrintPreviewTitle:"Toggle Print Preview",menuSearchText:"Search",menuSearchTitle:"Toggle Search",menuSideMenuTitle:"Toggle Side Menu",sendEmailFromLabel:"From:",sendEmailToLabel:"To:",sendEmailCCLabel:"CC:",sendEmailSubjectLabel:"Subject:",sendEmailFormatLabel:"Format:",sendEmailSendLabel:"Send",sendEmailCancelLabel:"Cancel",ariaLabelPageNumberSelector:"Page number selector. Showing page {0} of {1}.",ariaLabelPageNumberEditor:"Page number editor",ariaLabelExpandable:"Expandable",ariaLabelSelected:"Selected",ariaLabelParameter:"parameter",ariaLabelErrorMessage:"Error message",ariaLabelParameterInfo:"Contains {0} options",ariaLabelMultiSelect:"Multiselect",ariaLabelMultiValue:"Multivalue",ariaLabelSingleValue:"Single value",ariaLabelParameterDateTime:"DateTime",ariaLabelParameterString:"String",ariaLabelParameterNumerical:"Numerical",ariaLabelParameterBoolean:"Boolean",ariaLabelParametersAreaPreviewButton:"Preview the report",ariaLabelMainMenu:"Main menu",ariaLabelCompactMenu:"Compact menu",ariaLabelSideMenu:"Side menu",ariaLabelDocumentMap:"Document map area",ariaLabelDocumentMapSplitter:"Document map area splitbar.",ariaLabelParametersAreaSplitter:"Parameters area splitbar.",ariaLabelPagesArea:"Report contents area",ariaLabelSearchDialogArea:"Search area",ariaLabelSendEmailDialogArea:"Send email area",ariaLabelSearchDialogStop:"Stop search",ariaLabelSearchDialogOptions:"Search options",ariaLabelSearchDialogNavigateUp:"Navigate up",ariaLabelSearchDialogNavigateDown:"Navigate down",ariaLabelSearchDialogMatchCase:"Match case",ariaLabelSearchDialogMatchWholeWord:"Match whole word",ariaLabelSearchDialogUseRegex:"Use regex",ariaLabelMenuNavigateBackward:"Navigate backward",ariaLabelMenuNavigateForward:"Navigate forward",ariaLabelMenuStopRendering:"Stop rendering",ariaLabelMenuRefresh:"Refresh",ariaLabelMenuFirstPage:"First page",ariaLabelMenuLastPage:"Last page",ariaLabelMenuPreviousPage:"Previous page",ariaLabelMenuNextPage:"Next page",ariaLabelMenuPageNumber:"Page number selector",ariaLabelMenuDocumentMap:"Toggle document map",ariaLabelMenuParametersArea:"Toggle parameters area",ariaLabelMenuZoomIn:"Zoom in",ariaLabelMenuZoomOut:"Zoom out",ariaLabelMenuPageState:"Toggle FullPage/PageWidth",ariaLabelMenuPrint:"Print",ariaLabelMenuContinuousScroll:"Continuous scrolling",ariaLabelMenuSendMail:"Send an email",ariaLabelMenuExport:"Export",ariaLabelMenuPrintPreview:"Toggle print preview",ariaLabelMenuSearch:"Search in report contents",ariaLabelMenuSideMenu:"Toggle side menu",ariaLabelSendEmailFrom:"From email address",ariaLabelSendEmailTo:"Recipient email address",ariaLabelSendEmailCC:"Carbon Copy email address",ariaLabelSendEmailSubject:"Email subject:",ariaLabelSendEmailFormat:"Report format:",ariaLabelSendEmailSend:"Send email",ariaLabelSendEmailCancel:"Cancel sending email",searchDialogTitle:"Search in report contents",searchDialogSearchInProgress:"searching...",searchDialogNoResultsLabel:"No results",searchDialogResultsFormatLabel:"Result {0} of {1}",searchDialogStopTitle:"Stop Search",searchDialogNavigateUpTitle:"Navigate Up",searchDialogNavigateDownTitle:"Navigate Down",searchDialogMatchCaseTitle:"Match Case",searchDialogMatchWholeWordTitle:"Match Whole Word",searchDialogUseRegexTitle:"Use Regex",searchDialogCaptionText:"Find",searchDialogPageText:"page",sendEmailDialogTitle:"Send Email",sendEmailValidationEmailRequired:"Email field is required",sendEmailValidationEmailFormat:"Email format is not valid",sendEmailValidationSingleEmail:"The field accepts a single email address only",sendEmailValidationFormatRequired:"Format field is required",errorSendingDocument:"Error sending report document (Report = '{0}')."});var Z=Z||{};const Q=(window.telerikReportViewer||{}).sr||{},ee=$.extend({},Z,Q);var te={};function ne(e){var t,n,r,a=!1,i={CONFIRM_KEY:13,CONTENT_AREA_KEY:67,DOCUMENT_MAP_AREA_KEY:68,MENU_AREA_KEY:77,PARAMETERS_AREA_KEY:80};if(e=$.extend({},te,e),!(t=e.controller))throw"No controller (telerikReporting.ReportViewerController) has been specified.";function o(){n||(!function(){(n={})[i.DOCUMENT_MAP_AREA_KEY]=V(["div[data-role=telerik_ReportViewer_DocumentMapArea]","div[data-role=treeview]"]),n[i.MENU_AREA_KEY]=V("ul[data-role=telerik_ReportViewer_MainMenu]"),n[i.CONTENT_AREA_KEY]=l();var e=V(["div[data-role=telerik_ReportViewer_ParametersArea]","div.trv-parameters-area-content"]);e&&(n[i.PARAMETERS_AREA_KEY]=e,function(e){if(0===e.length)return;var t=e.parent("div[data-role=telerik_ReportViewer_ParametersArea]");if(!c(t))return;M(e.children(),(function(){$(this).keydown((function(e){e.which==i.CONFIRM_KEY&&(t.find("button.trv-parameters-area-preview-button").focus(),e.preventDefault())}))}))}(e))}(),$(document.body).off("keydown",s),$(document.body).on("keydown",s))}function l(){return V(["div[data-role=telerik_ReportViewer_PagesArea]"])}function s(e){if(n&&e.altKey&&e.ctrlKey){var t=n[e.which];if(t&&c(t.parent())){var a="k-focus";r&&r.removeClass(a),t.addClass(a),t.focus(),r=t,e.preventDefault()}}}function c(e){return e&&!(e.hasClass("k-collapsed")||e.hasClass("trv-hidden"))}return t.reportLoadComplete((function(){o();var e=l();e.length>0&&e.focus()})).pageReady((function(e,t){!function(e){if(!e)return;o(),function(e){if(!e)return;var t=e.find("div [data-reporting-action]");if(!t.length>0)return;M(t,(function(){var e=$(this);e.keydown((function(t){t.which==i.CONFIRM_KEY&&e.click()}))}))}(n[i.CONTENT_AREA_KEY])}(t),a=!0})).error((function(e,t){!function(){var e=V(["div.trv-pages-area","div.trv-error-message"]);if(0===e.length)return;e.attr("tabIndex",0),e.focus()}(),window.setTimeout(o,500)})),t.updateUI((function(e){a&&(function(){var e=$(".trv-report-pager");if(e.length>0){var n=t.getCurrentPageNumber(),r=t.getPageCount();M(e,(function(){var e=$(this);e.attr("aria-label",u(ee.ariaLabelPageNumberSelector,[n,r]));var t=e.find("input[data-role=telerik_ReportViewer_PageNumberInput]");t.length>0&&M(t,(function(){var e=$(this);e.attr("aria-label",ee.ariaLabelPageNumberEditor),e.attr("min","1"),e.attr("max",""+r)}))}))}}(),function(){var e=n[i.MENU_AREA_KEY];if(!e)return;M(e,(function(){M($(this).children("li.k-item"),(function(){var e=$(this);if(!e.hasClass("trv-report-pager")){var t=e.attr("aria-label"),n=u(". {0}",[ee.ariaLabelExpandable]),r=e.find("ul").length>0&&t.indexOf(n)<0?n:"",a=u(". {0}",[ee.ariaLabelSelected]),i=e.hasClass("k-selected")&&t.indexOf(a)<0?a:"",o=t+r+i;e.attr("aria-label",o),e.hasClass("k-disabled")?e.attr("aria-disabled","true"):e.removeAttr("aria-disabled")}}))}))}())})),{getKeyMap:function(){return i},setKeyMap:function(e){i=e,n=void 0}}}const re={viewerInstances:[]};var ae={bind:function(e){var t=Array.prototype.slice.call(arguments,1);!function(e,t){var n=t[0].commands,r=t[1],a='[data-command^="telerik_ReportViewer_"]',i="[data-target-report-viewer]"+a;e.on("click",a,o),re.CommandHandlerAttached||($(document.body).on("click",i,l),re.CommandHandlerAttached=!0);function o(e){var t=$(this).attr("data-command");if(t){var r=t.substring(21),a=n[r];a&&a.enabled()&&a.exec($(this).attr("data-command-parameter")),e.preventDefault()}}function l(e){var t=$(this),n=t.attr("data-command"),r=t.attr("data-target-report-viewer");if(n&&r){var a=n.substring(21),i=$(r).data("telerik_ReportViewer").commands[a];i.enabled()&&i.exec($(this).attr("data-command-parameter")),e.preventDefault()}}M(n,(function(t,n){!function(e,t,n,r){if(t){var a='[data-command="telerik_ReportViewer_'+e+'"]',i='[data-target-report-viewer="'+n.selector+'"]'+a,o=r.find(a),l=$(i);$(t).on("enabledChanged",(function(e){(t.enabled()?$.fn.removeClass:$.fn.addClass).call(o.parent("li"),"k-disabled"),(t.enabled()?$.fn.removeClass:$.fn.addClass).call(l,n.disabledButtonClass)})).on("checkedChanged",(function(e){var r=o.parent("li");(t.checked()?$.fn.addClass:$.fn.removeClass).call(r,function(e){return e.hasClass("trv-menu-toggleable")?"k-selected !k-bg-primary":"k-selected"}(r)),(t.checked()?$.fn.addClass:$.fn.removeClass).call(l,n.checkedButtonClass)}))}}(t,n,r,e)}))}(e,t),M(e.find('[data-role^="telerik_ReportViewer_"]'),(function(){var e=$(this),n=$.fn[e.attr("data-role")];"function"==typeof n&&n.apply(e,t)}))}};function ie(e,t){var n,r=$(e),a=r.attr("data-command");a&&(n=t.commands[a]),n&&(r.click((function(e){n.enabled()?n.exec($(this).attr("data-command-parameter")):e.preventDefault()})),$(n).on("enabledChanged",(function(e){(n.enabled()?$.fn.removeClass:$.fn.addClass).call(r,"disabled")})).on("checkedChanged",(function(e){(n.checked()?$.fn.addClass:$.fn.removeClass).call(r,"checked")})))}var oe="telerik_ReportViewer_LinkButton";function le(e,t){var n=$(e),a=0,i=t.commands.goToPage;function o(e){a===e&&n.is(":focus")||(n.val(e),a=e)}t.controller.pageNumberChange((function(e,t){o(t)})),n.change((function(){var e=f($(this).val());isNaN(e)||o(i.exec(e))})),n.keydown((function(e){if(13==e.which)return $(this).change(),e.preventDefault()})),n.keypress((function(e){if(r(e.keyCode))return!0;var t=n.val()+String.fromCharCode(e.charCode);return/^([0-9]+)$/.test(t)})).on("paste",(function(e){}))}$.fn[oe]=function(e){return M(this,(function(){$.data(this,oe)||$.data(this,oe,new ie(this,e))}))};var se="telerik_ReportViewer_PageNumberInput";function ce(e,t){var n=$(e);t.controller.pageCountChange((function(e,t){n.text(t)}))}$.fn[se]=function(e){return M(this,(function(){$.data(this,se)||$.data(this,se,new le(this,e))}))};var ue="telerik_ReportViewer_PageCountLabel";$.fn[ue]=function(e){return M(this,(function(){$.data(this,ue)||$.data(this,ue,new ce(this,e))}))};const de={INTERACTIVE:"INTERACTIVE",PRINT_PREVIEW:"PRINT_PREVIEW"},fe={AUTO_SELECT:"AUTO_SELECT",FORCE_PDF_PLUGIN:"FORCE_PDF_PLUGIN",FORCE_PDF_FILE:"FORCE_PDF_FILE"},pe={SINGLE_PAGE:"SINGLE_PAGE",CONTINUOUS_SCROLL:"CONTINUOUS_SCROLL"},ge={FIT_PAGE_WIDTH:"FIT_PAGE_WIDTH",FIT_PAGE:"FIT_PAGE",SPECIFIC:"SPECIFIC"},ve={INTEGER:"System.Int64",FLOAT:"System.Double",STRING:"System.String",DATETIME:"System.DateTime",BOOLEAN:"System.Boolean"},he={COMBO_BOX:"COMBO_BOX",LIST_VIEW:"LIST_VIEW"},me={RIGHT:"RIGHT",LEFT:"LEFT",TOP:"TOP",BOTTOM:"BOTTOM"},Ee={RIGHT:"RIGHT",LEFT:"LEFT"};function be(e){var t=!0,n=!1,r={enabled:function(e){if(0===arguments.length)return t;var n=Boolean(e);return t=n,$(this).trigger("enabledChanged"),r},checked:function(e){if(0===arguments.length)return n;var t=Boolean(e);return n=t,$(this).trigger("checkedChanged"),r},exec:e};return r}var Te={};Te[ge.FIT_PAGE]={scaleMode:ge.FIT_PAGE_WIDTH},Te[ge.FIT_PAGE_WIDTH]={scaleMode:ge.SPECIFIC,scale:1},Te[ge.SPECIFIC]={scaleMode:ge.FIT_PAGE};var Pe=[.1,.25,.5,.75,1,1.5,2,4,8];function Ie(e){var t=e.controller;if(!t)throw"No options.controller.";var n=e.history;if(!n)throw"No options.history.";return{historyBack:new be((function(){n.back()})),historyForward:new be((function(){n.forward()})),stopRendering:new be((function(){t.stopRendering()})),goToPrevPage:new be((function(){t.navigateToPage(t.getCurrentPageNumber()-1)})),goToNextPage:new be((function(){t.navigateToPage(t.getCurrentPageNumber()+1)})),goToFirstPage:new be((function(){t.navigateToPage(1)})),goToLastPage:new be((function(){t.navigateToPage(t.getPageCount())})),goToPage:new be((function(e){if(!isNaN(e)){var n=t.getPageCount();return e>n?e=n:e<1&&(e=1),t.navigateToPage(e),e}})),refresh:new be((function(){t.refreshReport(!0)})),export:new be((function(e){e&&t.exportReport(e)})),print:new be((function(){t.printReport()})),pageMode:new be((function(){t.setPageMode(t.getPageMode()===pe.SINGLE_PAGE?pe.CONTINUOUS_SCROLL:pe.SINGLE_PAGE)})),togglePrintPreview:new be((function(){t.setViewMode(t.getViewMode()===de.PRINT_PREVIEW?de.INTERACTIVE:de.PRINT_PREVIEW)})),toggleDocumentMap:new be((function(){var e;t.setDocumentMapVisible({visible:(e={},t.getDocumentMapState(e),!Boolean(e.visible))})})),toggleParametersArea:new be((function(){var e;t.setParametersAreaVisible({visible:(e={},t.getParametersAreaState(e),!Boolean(e.visible))})})),zoom:new be((function(e){t.setScale(e)})),zoomIn:new be((function(){r(1)})),zoomOut:new be((function(){r(-1)})),toggleSideMenu:new be((function(){var e;t.setSideMenuVisible({visible:(e={},t.getSideMenuVisible(e),!Boolean(e.visible))})})),toggleZoomMode:new be((function(e){var n=t.getScale(),r=t.getScaleMode();t.setScale(Te[r].scale||n),t.setScaleMode(Te[r].scaleMode)})),toggleSearchDialog:new be((function(){var e;t.setSearchDialogVisible({visible:(e={},t.getSearchDialogState(e),!Boolean(e.visible))})})),toggleSendEmailDialog:new be((function(){var e;t.setSendEmailDialogVisible({visible:(e={},t.getSendEmailDialogState(e),!Boolean(e.visible))})}))};function r(e){t.setScale(function(e,t){for(var n=-1,r=Pe.length,a=0;a<r;a++){var i=Pe[a];if(e<i){n=a-.5;break}if(e===i){n=a;break}}n+=t,n=t>=0?Math.round(n-.49):Math.round(n+.49);n<0?n=0:n>r-1&&(n=r-1);return Pe[n]}(t.getScale(),e))}}function _e(){return{hasPdfPlugin:function(){return null!==(e=null,M(["AcroPDF.PDF.1","PDF.PdfCtrl.6","PDF.PdfCtrl.5"],(function(t,n){try{if(e=new ActiveXObject(n))return!1}catch(e){}})),e);var e}}}function Ce(){return{hasPdfPlugin:function(){return function(){var e=/Firefox[\/\s](\d+\.\d+)/.exec(navigator.userAgent);if(null!==e&&e.length>1&&parseFloat(e[1])>=19)return!1;var t=navigator.mimeTypes["application/pdf"],n=null!==t?t.enabledPlugin:null;if(n){var r=n.description;return-1!==r.indexOf("Adobe")&&(-1===r.indexOf("Version")||parseFloat(r.split("Version")[1])>=6)}return!1}()}}}function Se(e){return{hasPdfPlugin:function(){return t=navigator.plugins,n=!1,M(t,(function(r,a){if(t[r].name===e||"Adobe Acrobat"===t[r].name)return n=!0,!1})),n;var t,n}}}var we=function(){if(window.navigator){var e=window.navigator.userAgent.toLowerCase();return e.indexOf("msie")>-1||e.indexOf("mozilla")>-1&&e.indexOf("trident")>-1?_e():e.indexOf("firefox")>-1?Ce():e.indexOf("edg/")>-1?Se("Microsoft Edge PDF Plugin"):e.indexOf("chrome")>-1?Se("Chrome PDF Viewer"):e.indexOf("safari")>-1?Se("WebKit built-in PDF"):{hasPdfPlugin:function(){return!1}}}return null}(),Re=!!we&&we.hasPdfPlugin(),Ae=function(){var e;function t(){return window.navigator&&window.navigator.msSaveOrOpenBlob}var n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?function(e){window.open(e,"_self")}:function(n){var r=null;if(e||((e=document.createElement("iframe")).style.display="none",e.onload=function(){try{e.contentDocument.execCommand("print",!0,null)}catch(e){O(e)}finally{r&&(window.URL||window.webkitURL).revokeObjectURL(r)}}),function(e){var t=window.location,n=document.createElement("a");n.setAttribute("href",e),""==n.host&&(n.href=n.href);return t.hostname===n.hostname&&t.protocol===n.protocol&&t.port===n.port}(n)&&t())return e.src=n,void document.body.appendChild(e);var a=new XMLHttpRequest;a.open("GET",n,!0),a.responseType="arraybuffer",a.onload=function(n){if(200===this.status){var a=new Blob([this.response],{type:"application/pdf"});t()?window.navigator.msSaveOrOpenBlob(a):(r=(window.URL||window.webkitURL).createObjectURL(a),e.src=r,document.body.appendChild(e))}else console.log("Could not retrieve remote PDF document.")},a.send()};return{print:function(e){n(e)},getDirectPrintState:function(){return Re}}}(),De=function(){var e={};function t(e,t,n,r){var a=[].concat(t).map((function(t){return function(e,t,n){if(e.availableValues){var r=!1;if(M(e.availableValues,(function(e,a){return!(r=n(t,a.value))})),!r){if(e.allowNull&&!t)return t;throw ee.invalidParameter}}return t}(e,n(t),r)}));if(e.multivalue){if(null==t||0==t.length){if(e.allowNull)return t;throw ee.invalidParameter}return a}return a[0]}function n(e,t){return e.allowNull&&-1!=[null,"",void 0].indexOf(t)}return e[ve.STRING]={validate:function(e,n){return t(e,n,(function(t){if(!t){if(e.allowNull)return null;if(e.allowBlank)return"";throw ee.parameterIsEmpty}return t}),(function(e,t){return e==t}))}},e[ve.FLOAT]={validate:function(e,r){return t(e,r,(function(t){var r=p(t);if(isNaN(r)){if(n(e,t))return null;throw ee.parameterIsEmpty}return r}),(function(e,t){return p(e)==p(t)}))}},e[ve.INTEGER]={validate:function(e,r){return t(e,r,(function(t){var r=f(t);if(isNaN(r)){if(n(e,t))return null;throw ee.parameterIsEmpty}return r}),(function(e,t){return f(e)==p(t)}))}},e[ve.DATETIME]={validate:function(e,n){return t(e,n,(function(t){if(e.allowNull&&(null===t||""===t||void 0===t))return null;if(!isNaN(Date.parse(t)))return e.availableValues?t:g(t);throw ee.invalidDateTimeValue}),(function(e,t){return e=g(e),t=g(t),e.getTime()==t.getTime()}))}},e[ve.BOOLEAN]={validate:function(e,r){return t(e,r,(function(t){if(-1!=["true","false"].indexOf((""+t).toLowerCase()))return Boolean(t);if(n(e,t))return null;throw ee.parameterIsEmpty}),(function(e,t){return Boolean(e)==Boolean(t)}))}},{validate:function(t,n){var r=e[t.type];if(!r)throw u(ee.cannotValidateType,t);return r.validate(t,n)}}}();function Ne(e){return 1e3*e}function Me(e,t,n){if(!e)throw ee.noServiceClient;if("number"!=typeof(r=n)||!isFinite(r))throw"sessionTimeoutSeconds must a number and must be finite";var r,a,i;function o(){i<=0||(a=setInterval((function(){e.keepClientAlive(t)}),i))}function l(){a&&(clearInterval(a),a=null)}return i=n<=120?Ne(n)/2:Ne(n-60),{start:o,restart:function(){l(),o()},stop:l}}function ye(){var e=$({});return{on:function(t,n){e.on(t,n)},trigger:function(t,...n){e.trigger(t,...n)}}}var ke={pagePollIntervalMs:500,documentInfoPollIntervalMs:2e3};function xe(e){var t,n,r,a,i,o,l,s,c,p,g,v,h,m,E,b={},S=de.INTERACTIVE,w=pe.CONTINUOUS_SCROLL,y=fe.AUTO_SELECT,k=!1,x=De,$=new ye;z();var L=(e=N({},ke,e)).settings;"function"==typeof L.getPrintMode&&(y=L.getPrintMode());var O=e.serviceClient;if(!O)throw ee.noServiceClient;function V(){t=null,a=null,G(),E=null,L.setClientId(null)}function U(){if("function"!=typeof L.getKeepClientAlive)throw new Error("Required settings.getKeepClientAlive() is not supplied for ReportViewerController");if(L.getKeepClientAlive()&&t)return O.getClientsSessionTimeoutSeconds().then((function(e){(E=new Me(O,t,e)).start()}))}function G(){L.getKeepClientAlive()&&E&&E.stop()}function F(e,t,n){var r="";if(!e.xhr)throw r=e,b.raiseError(q({responseText:r},null,null,null)),r;var a=e.xhr;_(a)&&(k=!0,b.clientExpired());var i=q(a,e.status,P(e.error)?"":e.error,t);if(b.raiseError(i),!n){if(C(a)){var o=D(a);if(o)throw o}throw a.responseJSON&&a.responseJSON.exceptionMessage?a.responseJSON.exceptionMessage:ee.promisesChainStopError}}function B(){return a||(a=O.registerClient().catch((function(e){F(e,ee.errorRegisteringViewer)})).then((function(e){t=e,G(),L.setClientId(t),U()})).catch(V)),a}function H(){var e,r;return i||(i=(e=l,r=s,ne(),O.createReportInstance(t,e,r).catch((function(t){F(t,u(ee.errorCreatingReportInstance,[d(e)]))}))).then((function(e){n=e}))).catch((function(e){i=null})),i}function z(){r=null,n=null,i=null,W()}function W(){p=g=0}function K(e,r,a,i,o){return ne(),re(),O.createReportDocument(t,n,e,r,a,i,o).catch((function(t){F(t,u(ee.errorCreatingReportDocument,[d(l),d(e)]))}))}function j(e,t,r,a){return a.isCanceled||t!==n?Promise.reject():O.getDocumentInfo(e,t,r).catch(F).then((function(n){return n&&n.documentReady||(n.promise=new Promise((function(e,t){window.setTimeout(e,a.documentInfoPollIntervalMs)})).then((function(){return j(e,t,r,a)}))),n}))}function Y(a,i,o,l){var s,c={};function u(e){a&&(r=e,a&&a.beginLoadReport(),ne(),re(),ae(),d(j(t,n,r,c)))}function d(e){e.then((function(e){e.documentReady?function(e){a&&a.onReportLoadComplete(e)}(e):(!function(e){a&&(g=e.pageCount,a.reportLoadProgress(e))}(e),d(e.promise))}))}function f(a){return new Promise((function(i,o){var l=function(){O.getPage(t,n,r,a).catch(F).then((function(t){t.pageReady?i(t):window.setTimeout(l,e.pagePollIntervalMs)}))};l()}))}function p(){if(!s){var t=S===de.PRINT_PREVIEW?"HTML5":"HTML5Interactive",n=function(){var e=X();return e.ContentOnly=!0,e.UseSVG=T(),e}();r={deviceInfo:n},c.documentInfoPollIntervalMs=e.pagePollIntervalMs,a&&a.beforeLoadReport(r),s=B().then(H).then((function(){return K(t,n,i,o,l)})).then(u)}var r;return s}return{beginLoad:function(){p()},beginGetPage:function(t){ne(),p().then((function(){return function(e){a&&a.beginLoadPage(e)}(t),f(t)})).then((function(t){c.documentInfoPollIntervalMs=e.documentInfoPollIntervalMs,a&&a.pageReady(t)}))},getPageData:function(e){return ne(),p().then((function(){return f(e)}))},dispose:function(){a=null},cancel:function(){c.isCanceled=!0}}}function X(){var e={};L.getEnableAccessibility()&&(e.enableAccessibility=!0,e.contentTabIndex=L.contentTabIndex);var t={};b.getSearchDialogState(t);var n=t.visible,r=!L.getSearchMetadataOnDemand()||n;return e.enableSearch=r,e}function q(e,t,n,r){var a,i=A(e.responseText),o="";if(i){var l=R(i.exceptionType||i.error,a="InvalidParameterException","Telerik.Reporting.Services.Engine."+a)?ee.missingOrInvalidParameter:"";if(l)return l;o=d(i.message);var s=d(i.exceptionMessage||i.error_description);s&&(o?o+=" "+s:o=s)}else o=d(e.responseText);return(r||n)&&(o&&(o=" "+o),o=d(r||n)+o),_(e)&&(o+="<br />"+ee.clientExpired),o}function J(){ie();var e={ImmediatePrint:!0},t={deviceInfo:e,handled:!1};if(b.printStarted(t),!t.handled){b.setUIState({operationName:"PrintInProgress",inProgress:!0}),b.showNotification({stringResources:"preparingPrint"});var n="response-content-disposition="+(function(){switch(y){case fe.FORCE_PDF_FILE:case!1:return!1;case fe.FORCE_PDF_PLUGIN:case!0:return!0;default:return Ae.getDirectPrintState()}}()?"inline":"attachment");Q("PDF",e).then((function(e){var t=O.formatDocumentUrl(e.clientId,e.instanceId,e.documentId,n),r={url:t,handled:!1};b.printReady(r),b.hideNotification(),b.setUIState({operationName:"PrintInProgress",inProgress:!1}),r.handled||Ae.print(t)}))}}function Z(e){ie(),e.deviceInfo||(e.deviceInfo=X());var r={deviceInfo:e.deviceInfo,handled:!1,format:e.format};b.sendEmailStarted(r);r.handled||Q(e.format,e.deviceInfo).then((function(r){var a=O.formatDocumentUrl(r.clientId,r.instanceId,r.documentId,"response-content-disposition=attachment");e.url=a,e.handled=!1,b.sendEmailReady(e),delete e.deviceInfo,e.handled||function(e,r){ne(),re(),O.sendDocument(t,n,e,r).catch((function(e){F(e,u(ee.errorSendingDocument,[d(l)]))}))}(r.documentId,e)}))}function Q(a,i){return ie(),B().then(H).then((function(){return K(a,i,!0,r)})).then((function(r){return function(e,t,n,r){return new Promise((function(a,i){var o=function(r){r.then((function(r){r.documentReady?a({clientId:e,instanceId:t,documentId:n}):o(r.promise)}))};o(j(e,t,n,r))}))}(t,n,r,e)}))}function te(e){ie(),re(),ae(),he(),b.refreshReportCore(!1,r,e)}function ne(){if(!t)throw ee.controllerNotInitialized}function re(){if(!n)throw ee.noReportInstance}function ae(){if(!r)throw ee.noReportDocument}function ie(){if(!l)throw ee.noReport}function oe(e,t){return"function"==typeof t[0]?$.on(e,t[0]):$.trigger(e,t),b}function le(e,t){if(e)for(var n=0,r=e.length;n<r;n++){var a=e[n];if(a.id===t)return a.page;var i=le(a.items,t);if(i)return i}return null}function se(e){ce(e),b.reportSourceChanged()}function ce(e){"function"==typeof L.setReportSource&&L.setReportSource(e)}t=L.getClientId(),U();var ue={sorting:function(e){te(e.Id)},toggleVisibility:function(e){te(e.Id)},navigateToReport:function(e){var t,n,r=e.Value;he(),b.setReportSource({report:r.Report,parameters:(t=r.ParameterValues,n={},Array.isArray(t)&&t.forEach((function(e){n[e.Key]=e.Value})),n)}),b.refreshReport(!1)},navigateToUrl:function(e){var t=e.Value;window.open(t.Url,t.Target)},navigateToBookmark:function(e){var t=e.Value,n=le(h,t);b.navigateToPage(n,{type:"bookmark",id:t})},customAction:function(e){}};function ve(e){var t=e.action,n=ue[t.Type];"function"==typeof n&&window.setTimeout((function(){!function(e){b.interactiveActionExecuting(e)}(e),e.cancel||n(t)}),0)}function he(){b.serverActionStarted()}function me(e){if(!I(e.xhr))throw F(e,null,!0),null;throw A(e.xhr.responseText).exceptionMessage}return b.Events={ERROR:"error",EXPORT_STARTED:"exportStarted",EXPORT_DOCUMENT_READY:"exportDocumentReady",PRINT_STARTED:"printStarted",PRINT_DOCUMENT_READY:"printDocumentReady",BEFORE_LOAD_PARAMETERS:"beforeLoadParameters",LOADED_REPORT_CHANGE:"loadedReportChange",BEFORE_LOAD_REPORT:"beforeLoadReport",BEGIN_LOAD_REPORT:"beginLoadReport",REPORT_LOAD_COMPLETE:"reportLoadComplete",REPORT_LOAD_PROGRESS:"reportLoadProgress",REPORT_LOAD_FAIL:"reportLoadFail",BEGIN_LOAD_PAGE:"beginLoadPage",PAGE_READY:"pageReady",VIEW_MODE_CHANGED:"viewModeChanged",PAGE_MODE_CHANGED:"pageModeChanged",PRINT_MODE_CHANGED:"printModeChanged",REPORT_SOURCE_CHANGED:"reportSourceChanged",NAVIGATE_TO_PAGE:"navigateToPage",CURRENT_PAGE_CHANGED:"currentPageChanged",GET_DOCUMENT_MAP_STATE:"trv.GET_DOCUMENT_MAP_STATE",SET_DOCUMENT_MAP_VISIBLE:"trv.SET_DOCUMENT_MAP_VISIBLE",GET_PARAMETER_AREA_STATE:"trv.GET_PARAMETER_AREA_STATE",SET_PARAMETER_AREA_VISIBLE:"trv.SET_PARAMETER_AREA_VISIBLE",SCALE_CHANGED:"scaleChanged",SCALE_MODE_CHANGED:"scaleModeChanged",SERVER_ACTION_STARTED:"serverActionStarted",SET_TOGGLE_SIDE_MENU:"trv.SET_TOGGLE_SIDE_MENU",GET_TOGGLE_SIDE_MENU:"trv.GET_TOGGLE_SIDE_MENU",UPDATE_UI:"trv.UPDATE_UI",CSS_LOADED:"cssLoaded",RELOAD_PARAMETERS:"reloadParameters",INTERACTIVE_ACTION_EXECUTING:"interactiveActionExecuting",INTERACTIVE_ACTION_ENTER:"interactiveActionEnter",INTERACTIVE_ACTION_LEAVE:"interactiveActionLeave",UPDATE_UI_INTERNAL:"trv.UPDATE_UI_INTERNAL",CLIENT_EXPIRED:"clientExpired",TOOLTIP_OPENING:"tooltipOpening",TOOLTIP_CLOSING:"tooltipClosing",PAGE_NUMBER:"trv.PAGE_NUMBER",PAGE_COUNT:"trv.PAGE_COUNT",GET_SEARCH_DIALOG_STATE:"trv.GET_SEARCH_DIALOG_STATE",GET_SEND_EMAIL_DIALOG_STATE:"trv.GET_SEND_EMAIL_DIALOG_STATE",SET_SEARCH_DIALOG_VISIBLE:"trv.SET_SEARCH_DIALOG_VISIBLE",SET_SEND_EMAIL_DIALOG_VISIBLE:"trv.SET_SEND_EMAIL_DIALOG_VISIBLE",SEND_EMAIL_STARTED:"sendEmailStarted",SEND_EMAIL_READY:"sendEmailDocumentReady",SHOW_NOTIFICATION:"trv.SHOW_NOTIFICATION",HIDE_NOTIFICATION:"trv.HIDE_NOTIFICATION",UI_STATE:"trv.UI_STATE",SCROLL_PAGE_READY:"scrollPageReady",UPDATE_SCROLL_PAGE_DIMENSIONS_READY:"trv.UPDATE_SCROLL_PAGE_DIMENSIONS_READY",MISSING_OR_INVALID_PARAMETERS:"missingOrInvalidParameters",RENDERING_STOPPED:"renderingStopped"},N(b,{getPageData:function(e){if(v)return v.getPageData(e)},getReportSource:function(){return null===l?null:{report:l,parameters:N({},s)}},setReportSource:function(e){return null===e?(l=s=null,z(),se(e),this):(l=e.report,s=e.parameters,se(e),this)},updateSettings:function(t){e.settings=N({},t,e.settings)},clearReportSource:function(){return l=s=null,z(),se(void 0),this},getReportDocumentId:function(){return r},setReportDocumentId:function(e){r=e},setParameters:function(e){s=e},setProcessedParameter:function(e){c=e},getPageCount:function(){return g},getCurrentPageNumber:function(){return p},setCurrentPageNumber:function(e){var t,n=f(e);return n!==p&&(p=n,t=n,L.setPageNumber(t),b.currentPageChanged()),this},getScale:function(){return L.getScale()},setScale:function(e){return L.getScale()!==e&&(L.setScale(e),b.scaleChanged(e),b.setScaleMode(ge.SPECIFIC)),b},getScaleMode:function(){return L.getScaleMode()},setScaleMode:function(e){return L.getScaleMode()!==e&&(L.setScaleMode(e),b.scaleModeChanged(e)),b},getViewMode:function(){return S},setViewMode:function(e){return S!==e&&(S=e,b.viewModeChanged(e),l&&b.refreshReportCore(!1,r)),b},getPageMode:function(){return w},setPageMode:function(e){return w!==e&&(w=e,b.pageModeChanged(e),l&&b.refreshReportCore(!1,r)),b},getPrintMode:function(){return y},setPrintMode:function(e){return y!==e&&(y=e,b.printModeChanged(e)),b},previewReport:function(e,t,n){b.loadedReportChange(),b.refreshReportCore(e,t,n)},refreshReportCore:function(e,t,n){!function(e,t,n){l?(v&&(v.dispose(),v=null),z(),(v=new Y(b,!e,t,n)).beginLoad()):b.raiseError(ee.noReport)}(e,t,n)},stopRendering:function(){ie(),re(),ae(),O.deleteReportDocument(t,n,r).catch(F).then((function(){v&&v.cancel(),W(),b.renderingStopped()}))},getReportParameters:function(){var e={};for(var t in c){var n=c[t],r=s[t];n&&n.availableValues?n.multivalue?e[t]=Le(n,r,t):e[t]=$e(n,r,t):e[t]=r}return e},refreshReport:function(e,t,n){if(b.loadedReportChange(),k&&(k=!1,V()),l){var r=b.loadParameters(null);r.then((function(r){var a={},i=[],o=!1;M(r||[],(function(){try{var e=x.validate(this,this.value);a[this.id]=e}catch(e){return o=!0,void i.push(this)}})),o?(b.raiseError(ee.missingOrInvalidParameter),function(e){for(var t=document.querySelector(".trv-pages-area .trv-error-message"),n=document.createElement("ul"),r=0;r<e.length;r++){var a=document.createElement("li");a.classList.add(e[r].name),a.innerText=u("{0} ({1})",[e[r].text,e[r].name]),n.appendChild(a)}t.appendChild(n)}(i),b.missingOrInvalidParameters()):(b.setParameters(a),b.refreshReportCore(e,t,n))})),b.reloadParameters(r)}else b.raiseError(ee.noReport)},exportReport:function(e,t){!function(e,t){ie(),t||(t=X());var n={format:e,deviceInfo:t,handled:!1};b.exportStarted(n),n.handled||(b.setUIState({operationName:"ExportInProgress",inProgress:!0}),b.showNotification({stringResources:"preparingDownload"}),Q(e,n.deviceInfo).then((function(t){var n=O.formatDocumentUrl(t.clientId,t.instanceId,t.documentId,"response-content-disposition=attachment"),r={url:n,format:e,handled:!1,windowOpenTarget:"_self"};b.exportReady(r),b.hideNotification(),b.setUIState({operationName:"ExportInProgress",inProgress:!1}),r.handled||window.open(n,r.windowOpenTarget)})))}(e,t)},sendReport:function(e){Z(e)},printReport:function(){J()},getReportPage:function(e){var t;t=e,v&&v.beginGetPage(t)},executeReportAction:function(e){ve(e)},reportActionEnter:function(e){!function(e){b.interactiveActionEnter({action:e.action,element:e.element})}(e)},reportActionLeave:function(e){!function(e){b.interactiveActionLeave({action:e.action,element:e.element})}(e)},reportToolTipOpening:function(e){!function(e){b.toolTipOpening(e)}(e)},loadParameters:function(e){return null===l?{}:(b.beforeLoadParameters(null===e),function(e,n){return B().then((function(){return O.getParameters(t,e,n||s||{}).catch((function(e){F(e,ee.unableToGetReportParameters)}))}))}(l,e))},getDocumentFormats:function(){return m?Promise.resolve(m):(o||(o=O.getDocumentFormats().catch(F)),o)},getServiceVersion:function(){return O.getServiceVersion().catch(F)},setAuthenticationToken:function(e){O.setAccessToken(e)},clientId:function(){return t},onReportLoadComplete:function(e){g=e.pageCount,h=e.bookmarkNodes,m=e.renderingExtensions,ce(b.getReportSource()),b.reportLoadComplete(e)},raiseError:function(...e){var t=function(e){var t=e.length;return 1===t?e[0]:t>1?u(e[0],Array.prototype.slice.call(e,1)):""}(e);b.error(t)},getSearchResults:function(e,a){return function(e){return e.searchToken&&""!==e.searchToken?O.getSearchResults(t,n,r,e.searchToken,e.matchCase,e.matchWholeWord,e.useRegex).catch(me):Promise.resolve(null)}(e)},on:function(e,t){return $.on(e,t),b},trigger:function(e,t){return $.trigger(e,t),b},showNotification:function(...e){return oe(b.Events.SHOW_NOTIFICATION,e)},hideNotification:function(...e){return oe(b.Events.HIDE_NOTIFICATION,e)},setUIState:function(...e){return oe(b.Events.UI_STATE,e)},error:function(...e){return oe(b.Events.ERROR,e)},reloadParameters:function(...e){return oe(b.Events.RELOAD_PARAMETERS,e)},exportStarted:function(...e){return oe(b.Events.EXPORT_STARTED,e)},exportReady:function(...e){return oe(b.Events.EXPORT_DOCUMENT_READY,e)},sendEmailStarted:function(...e){return oe(b.Events.SEND_EMAIL_STARTED,e)},sendEmailReady:function(...e){return oe(b.Events.SEND_EMAIL_READY,e)},printStarted:function(...e){return oe(b.Events.PRINT_STARTED,e)},printReady:function(...e){return oe(b.Events.PRINT_DOCUMENT_READY,e)},beforeLoadParameters:function(...e){return oe(b.Events.BEFORE_LOAD_PARAMETERS,e)},loadedReportChange:function(...e){return oe(b.Events.LOADED_REPORT_CHANGE,e)},beforeLoadReport:function(...e){return oe(b.Events.BEFORE_LOAD_REPORT,e)},beginLoadReport:function(...e){return oe(b.Events.BEGIN_LOAD_REPORT,e)},reportLoadComplete:function(...e){return oe(b.Events.REPORT_LOAD_COMPLETE,e)},reportLoadProgress:function(...e){return oe(b.Events.REPORT_LOAD_PROGRESS,e)},reportLoadFail:function(...e){return oe(b.Events.REPORT_LOAD_FAIL,e)},beginLoadPage:function(...e){return oe(b.Events.BEGIN_LOAD_PAGE,e)},pageReady:function(...e){return oe(b.Events.PAGE_READY,e)},viewModeChanged:function(...e){return oe(b.Events.VIEW_MODE_CHANGED,e)},pageModeChanged:function(...e){return oe(b.Events.PAGE_MODE_CHANGED,e)},printModeChanged:function(...e){return oe(b.Events.PRINT_MODE_CHANGED,e)},reportSourceChanged:function(...e){return oe(b.Events.REPORT_SOURCE_CHANGED,e)},navigateToPage:function(...e){return oe(b.Events.NAVIGATE_TO_PAGE,e)},currentPageChanged:function(...e){return oe(b.Events.CURRENT_PAGE_CHANGED,e)},getDocumentMapState:function(...e){return oe(b.Events.GET_DOCUMENT_MAP_STATE,e)},setDocumentMapVisible:function(...e){return oe(b.Events.SET_DOCUMENT_MAP_VISIBLE,e)},getParametersAreaState:function(...e){return oe(b.Events.GET_PARAMETER_AREA_STATE,e)},setParametersAreaVisible:function(...e){return oe(b.Events.SET_PARAMETER_AREA_VISIBLE,e)},setSideMenuVisible:function(...e){return oe(b.Events.SET_TOGGLE_SIDE_MENU,e)},getSideMenuVisible:function(...e){return oe(b.Events.GET_TOGGLE_SIDE_MENU,e)},scaleChanged:function(...e){return oe(b.Events.SCALE_CHANGED,e)},scaleModeChanged:function(...e){return oe(b.Events.SCALE_MODE_CHANGED,e)},serverActionStarted:function(...e){return oe(b.Events.SERVER_ACTION_STARTED,e)},cssLoaded:function(...e){return oe(b.Events.CSS_LOADED,e)},interactiveActionExecuting:function(...e){return oe(b.Events.INTERACTIVE_ACTION_EXECUTING,e)},interactiveActionEnter:function(...e){return oe(b.Events.INTERACTIVE_ACTION_ENTER,e)},interactiveActionLeave:function(...e){return oe(b.Events.INTERACTIVE_ACTION_LEAVE,e)},updateUI:function(...e){return oe(b.Events.UPDATE_UI,e)},updateUIInternal:function(...e){return oe(b.Events.UPDATE_UI_INTERNAL,e)},toolTipOpening:function(...e){return oe(b.Events.TOOLTIP_OPENING,e)},pageNumberChange:function(...e){return oe(b.Events.PAGE_NUMBER,e)},pageCountChange:function(...e){return oe(b.Events.PAGE_COUNT,e)},getSearchDialogState:function(...e){return oe(b.Events.GET_SEARCH_DIALOG_STATE,e)},getSendEmailDialogState:function(...e){return oe(b.Events.GET_SEND_EMAIL_DIALOG_STATE,e)},setSearchDialogVisible:function(...e){return oe(b.Events.SET_SEARCH_DIALOG_VISIBLE,e)},setSendEmailDialogVisible:function(...e){return oe(b.Events.SET_SEND_EMAIL_DIALOG_VISIBLE,e)},scrollPageReady:function(...e){return oe(b.Events.SCROLL_PAGE_READY,e)},updatePageDimensionsReady:function(...e){return oe(b.Events.UPDATE_SCROLL_PAGE_DIMENSIONS_READY,e)},missingOrInvalidParameters:function(...e){return oe(b.Events.MISSING_OR_INVALID_PARAMETERS,e)},renderingStopped:function(...e){return oe(b.Events.RENDERING_STOPPED,e)},clientExpired:function(...e){return oe(b.Events.CLIENT_EXPIRED,e)},dispose:function(){G(),this.serviceClientSentinel=null}}),b}function $e(e,t,n){try{var r=e.availableValues.find((e=>e.value===t));if(!r)throw new Error(`The available values of parameter ${n} do not contain Value property that equals ${t}`);return{valueMember:t,displayMember:r.name}}catch(e){O(e)}}function Le(e,t,n){var r=[];for(var a in t)r.push($e(e,t[a],n));return r}const Oe={EXPORT_BEGIN:"EXPORT_BEGIN",EXPORT_END:"EXPORT_END",PRINT_BEGIN:"PRINT_BEGIN",PRINT_END:"PRINT_END",RENDERING_BEGIN:"RENDERING_BEGIN",RENDERING_END:"RENDERING_END",PAGE_READY:"PAGE_READY",ERROR:"ERROR",UPDATE_UI:"UPDATE_UI",INTERACTIVE_ACTION_EXECUTING:"INTERACTIVE_ACTION_EXECUTING",INTERACTIVE_ACTION_ENTER:"INTERACTIVE_ACTION_ENTER",INTERACTIVE_ACTION_LEAVE:"INTERACTIVE_ACTION_LEAVE",VIEWER_TOOLTIP_OPENING:"VIEWER_TOOLTIP_OPENING",SEND_EMAIL_BEGIN:"SEND_EMAIL_BEGIN",SEND_EMAIL_END:"SEND_EMAIL_END"};function Ve(e){var t=e.controller;if(!t)throw"No controller (telerikReporting.reportViewerController) has been specified.";var n=e.settings,r=n.getHistory()||{records:[],position:-1};function a(){var e=r.records;return e.length>0?e[r.position]:null}function i(){n.setHistory(r)}function o(e){!function(){var e=r.records.length-1;for(;e>=0&&!0===r.records[e].temp;)r.records.splice(e,1),r.position>=e&&r.position--,e--}();var n,o,l,s=a(),c=t.getReportSource();s&&E(s.reportSource,c)||(n={reportSource:c,pageNumber:1,temp:e},o=r.records,l=r.position,(o=Array.prototype.slice.call(o,0,l+1)).push(n),r.records=o,r.position=o.length-1,i())}function l(e){t.setReportDocumentId(e.reportDocumentId),t.setViewMode(e.viewMode),t.setReportSource(e.reportSource),t.refreshReport(!1,e.reportDocumentId),t.navigateToPage(e.pageNumber)}function s(e){var t=r.position,n=r.records.length,a=t+e;return 0<=a&&a<n}function c(e){var t=r.position,n=r.records.length,o=t+e;o<0?o=0:o>=n&&(o=n-1),o!=t&&(r.position=o,i(),l(a()))}return t.loadedReportChange((function(){o(!0)})).currentPageChanged((function(){var e;(e=a())&&(e.pageNumber=t.getCurrentPageNumber(),e.viewMode=t.getViewMode(),e.reportDocumentId=t.getReportDocumentId(),i())})).reportLoadComplete((function(e,t){o(!1)})).clientExpired((function(){for(var e=r.records,t=0;t<e.length;t++)e[t].reportDocumentId=null})),{back:function(){c(-1)},forward:function(){c(1)},canMoveBack:function(){return s(-1)},canMoveForward:function(){return s(1)},loadCurrent:function(){var e=a();return e&&l(e),Boolean(e)}}}function Ue(e,t){var n,r;function a(e,n){var r=t[e];"function"==typeof r&&r(n)}!function(e){if("function"==typeof $.fn.kendoTouch)try{$(e).mousedown((function(){r=!0})).mouseup((function(){r=!1})).kendoTouch({multiTouch:!0,enableSwipe:!0,swipe:function(e){r||function(e){a("swipe",e)}(e)},gesturestart:function(e){r||function(e){n=kendo.touchDelta(e.touches[0],e.touches[1]).distance}(e)},gestureend:function(e){},gesturechange:function(e){r||function(e){var t=kendo.touchDelta(e.touches[0],e.touches[1]).distance;(function(e){a("pinch",e)})({distance:t,lastDistance:n}),n=t}(e)},doubletap:function(e){r||function(e){a("doubletap",e)}(e)},touchstart:function(e){r||a("touchstart")}})}catch(e){throw console.error("Instantiation of Kendo Touch threw an exception",e),e}}(e)}var Ge={controller:{},$placeholder:null,$pageContainer:null,pageContainer:null,$pageWrapper:null,pageWrapper:null,viewMode:null,loadedPage:{},scrollInProgress:!1,enabled:!1,pageCount:0,additionalTopOffset:130,pageDistance:20,oldScrollTopPosition:0,skeletonTemplate:'<div class="trv-report-page trv-skeleton-page trv-skeleton-{0}" style="{1}" data-page="{0}"><div class="trv-skeleton-wrapper" style="{2}"></div></div>',init:function(e,t){var n=this;n.$placeholder=$("[data-selector='"+t.viewerSelector+"']").find(e),n.$pageContainer=this.$placeholder.find(".trv-page-container"),n.pageContainer=this.$pageContainer[0],n.$pageWrapper=this.$placeholder.find(".trv-page-wrapper"),n.pageWrapper=this.$pageWrapper[0],n.controller=t.controller,n.viewMode=null,n.loadedPage={},n.scrollInProgress=!1,n.enabled=!1,n.pageCount=0,n.controller.scaleChanged((function(e,t){n.enabled&&setTimeout((function(){n._loadMorePages(),n._keepCurrentPageInToView()}),100)})).loadedReportChange((function(e){n.enabled&&(n.disable(),"loadedReportChange"!==e.type&&setTimeout((function(){n.controller.getPageData(1).then((function(e){n.renderPage(e)}))})))})).viewModeChanged((function(e){n.enabled&&n.disable()})).interactiveActionExecuting((function(e,t){var r=t.action.Type;!n.enabled||"sorting"!==r&&"toggleVisibility"!==r||n.disable()})).updatePageDimensionsReady((function(e,t){n.enabled&&n._currentPageNumber()>0&&n._keepCurrentPageInToView()})).pageCountChange((function(e,t){n.enabled&&n.pageCount!==t&&(n._currentPageNumber()>0&&!n.scrollInProgress&&n._loadMorePages(),t>1&&n._initEvents(),n.pageCount=t)}))},isEnabled:function(){return this.enabled},disable:function(){this.$pageWrapper.empty(),this.enabled=!1,this.loadedPage={},this.pageCount=0,this.$placeholder.removeClass("scrollable"),this._unbind()},enable:function(){this.enabled=!0,this.$placeholder.addClass("scrollable"),this._initEvents()},renderPage:function(e){var t=this,n=t.controller.getViewMode(),r=t.$placeholder.find('[data-page="'+e.pageNumber+'"]');t.enabled?(n===t.viewMode&&r.length?t._navigateToPage(e,r):t._updatePageArea(e),t.viewMode=t.controller.getViewMode()):(t.enabled=!0,t.$placeholder.addClass("scrollable"),n===t.viewMode&&r.length?(t._render(e,!0),this.$pageContainer.scrollTop(3),t._setCurrentPage(e.pageNumber)):t._updatePageArea(e),t.viewMode=t.controller.getViewMode(),t._loadMorePages())},navigateToElement:function(e,t){var n=this;n.scrollInProgress=!0,n._isSkeletonScreen(null,t)?n.controller.getPageData(t).then((function(r){n._render(r,!1),n.$pageContainer.animate({scrollTop:e},500,(function(){n._setCurrentPage(t),setTimeout((function(){n.scrollInProgress=!1}),100)}))})):n.$pageContainer.animate({scrollTop:e},500,(function(){n._setCurrentPage(t),setTimeout((function(){n.scrollInProgress=!1}),100)}))},_setCurrentPage:function(e){var t=this;e!==t._currentPageNumber()&&t.controller.setCurrentPageNumber(e),t.controller.getPageCount()>1&&(t.$placeholder.find(".k-state-default").removeClass("k-state-default"),t.$placeholder.find('[data-page="'+e+'"]').addClass("k-state-default")),t._loadNextPreviousPage(e)},_updatePageArea:function(e){var t=this,n=0,r=e.pageNumber;t.scrollInProgress=!0,r>1&&t._generateSkeletonScreens(r),t._render(e,!1),t._setCurrentPage(e.pageNumber),setTimeout((function(){n=r>1?t.$placeholder.find('[data-page="'+r+'"]').position().top:0,t.$pageContainer.animate({scrollTop:n},0,(function(){t.scrollInProgress=!1}))}),100)},_navigateToPage:function(e,t){var n=this;n.scrollInProgress=!0;var r=t.position().top,a=n.$placeholder.find(".trv-report-page"),i=e.pageNumber;$(a[0]).height(),n._isSkeletonScreen(t,i)?n.controller.getPageData(i).then((function(e){n._render(e,!1),n.$pageContainer.animate({scrollTop:r},500,(function(){setTimeout((function(){n._setCurrentPage(e.pageNumber),n.scrollInProgress=!1}))}))})):(n._updatePageContent(e,t),n.$pageContainer.animate({scrollTop:r},500,(function(){setTimeout((function(){n._setCurrentPage(e.pageNumber),n.scrollInProgress=!1}))})))},_updatePageContent:function(e,t){this._updatePageStyle(e);var n=e.pageNumber,r=$($.parseHTML(e.pageContent)).find("div.sheet"),a=this.$placeholder.find('[data-page="'+n+'"]');r.css("margin",0),a.append(r).append($('<div class="trv-page-overlay"></div>')),t.replaceWith(a),this.controller.scrollPageReady({page:e,target:a})},_currentPageNumber:function(){return this.controller.getCurrentPageNumber()},_isSkeletonScreen:function(e,t){return e||(e=this.$placeholder.find('[data-page="'+t+'"]')),e.hasClass("trv-skeleton-"+t)},_addSkeletonScreen:function(e,t){var n=this,r=t?parseInt(e+1):parseInt(e-1),a=n.$placeholder.find('[data-page="'+r+'"]'),i=a.attr("style"),o=a.find("sheet").attr("style"),l=u(n.skeletonTemplate,[e,i,o]);t?n.$pageWrapper.prepend(l):n.$pageWrapper.append(l)},_generateSkeletonScreens:function(e){for(var t=this,n="",r=this.$placeholder.find('[data-page="1"]'),a=r.attr("style"),i=r.find("sheet").attr("style"),o=t.$placeholder.find(".trv-report-page").last().attr("data-page"),l=o?parseInt(o)+1:1;l<e;l++)n+=u(t.skeletonTemplate,[l,a,i]);t.$pageWrapper.append($(n))},_loadMorePages:function(){var e=this,t=e.controller.getPageCount(),n=e.$pageContainer.innerHeight()>e.$pageWrapper.innerHeight();if(t>1)if(n){e.scrollInProgress=!0;var r=parseInt(e.$placeholder.find(".trv-report-page").last().attr("data-page"))+1;r<=t&&e.controller.getPageData(r).then((function(t){e._render(t,!1),e._loadMorePages(),e.scrollInProgress=!1}))}else e._loadVisiblePages(),e.scrollInProgress=!1},_loadVisiblePages:function(){var e=this,t=e.$placeholder.find(".trv-report-page");$.each(t,(function(t,n){var r=$(n),a=parseInt(r.attr("data-page"));e._scrolledInToView(r)&&e._isSkeletonScreen(r,a)&&e.controller.getPageData(a).then((function(t){e._render(t,!1)}))}))},_scrolledInToView:function(e){var t=e[0].getBoundingClientRect(),n=e.closest(".trv-pages-area")[0].getBoundingClientRect(),r=n.top,a=n.top+n.height,i=t.top,o=i+e.outerHeight(!0),l=this.additionalTopOffset+r;return i>0&&i<a||o<a&&o>l},_render:function(e,t){var n=this,r=e.pageNumber,a=n.$placeholder.find('[data-page="'+r+'"]');if(t||!a||!a.length||n._isSkeletonScreen(a,r)){n.loadedPage[r]=e,n._updatePageStyle(e);var i=$($.parseHTML(e.pageContent)).find("div.sheet"),o=$('<div class="trv-report-page" data-page="'+r+'"></div>');i.css("margin",0),o.append(i).append($('<div class="trv-page-overlay"></div>')),t&&n.$pageWrapper.empty(),n.$pageWrapper.removeData().data("pageNumber",r);var l=n.$placeholder.find(".trv-skeleton-"+r);l.length?l.replaceWith(o):n.$pageWrapper.append(o),n.controller.scrollPageReady({page:e,target:o})}},_updatePageStyle:function(e){var t,n=this,r=n.loadedPage[n._lastLoadedPage()]||e,a="trv-"+n.controller.clientId()+"-styles";$("#"+a).remove(),(t=$("<style id="+a+"></style>")).append(r.pageStyles),t.appendTo("head")},_lastLoadedPage:function(){var e;for(var t in this.loadedPage)this.loadedPage.hasOwnProperty(t)&&(e=t);return e},_loadNextPreviousPage:function(e){var t,n,r,a,i=this;e<i.controller.getPageCount()&&(t=e+1,r=i.$placeholder.find('[data-page="'+t+'"]')),e>1&&(n=e-1,a=i.$placeholder.find('[data-page="'+n+'"]')),a&&a.length&&i._isSkeletonScreen(a,n)&&i.controller.getPageData(n).then((function(e){i._render(e,!1)})),r&&r.length&&i._isSkeletonScreen(r,t)&&i.controller.getPageData(t).then((function(e){i._render(e,!1)}))},_clickPage:function(e){var t=this,n=t._currentPageNumber(),r=parseInt(e.attr("data-page"));n!==r&&(t._isSkeletonScreen(e,r)?t.controller.getPageData(r).then((function(e){t._render(e,!1,!0),t._setCurrentPage(e.pageNumber)})):t._setCurrentPage(r))},_initEvents:function(){var e=this;e.$pageContainer.off("click",".trv-report-page").on("click",".trv-report-page",(function(t){e._clickPage($(t.currentTarget))})),e.$pageContainer.scroll((function(){var t=e.$placeholder.find(".trv-report-page"),n=parseInt((e.$pageContainer.scrollTop()+e.$pageContainer.innerHeight()).toFixed(0));e.scrollInProgress||e.oldScrollTopPosition===n||(e.oldScrollTopPosition>n?e._scrollUp(t):e._scrollDown(t,n)),e.oldScrollTopPosition=n})),e.$pageContainer.scroll((function(){var t=e.$placeholder.find(".trv-report-page"),n=parseInt((e.$pageContainer.scrollTop()+e.$pageContainer.innerHeight()).toFixed(0));!e.scrollInProgress&&t.length&&e.oldScrollTopPosition!==n&&e._advanceCurrentPage(t)}))},_unbind:function(){this.$pageContainer.off("click",".trv-report-page"),this.$pageContainer.off("scroll")},_advanceCurrentPage:function(e){var t,n=this,r=n._findNewCurrentPage(e),a=n._currentPageNumber(),i=n._scrolledInToView(n.$placeholder.find('[data-page="'+a+'"]'));-1!==r?(r=$(r),a===(t=parseInt(r.attr("data-page")))||i||(n._isSkeletonScreen(r,t)?n.controller.getPageData(t).then((function(e){n._render(e,!1,!0),n._setCurrentPage(e.pageNumber)})):n._setCurrentPage(t))):console.log("Page not found - ",r)},_findNewCurrentPage:function(e){var t=this,n=Math.floor(e.length/2),r=t._findPageInViewPort(n,e);return 1===e.length?e[0]:0===r?e[n]:r<0&&e.length>1?t._findNewCurrentPage(e.splice(n,Number.MAX_VALUE)):r>0&&e.length>1?t._findNewCurrentPage(e.splice(0,n)):-1},_findPageInViewPort:function(e,t){var n=this.$placeholder.find(t[e]),r=n[0].getBoundingClientRect(),a=n.closest(".trv-pages-area")[0].getBoundingClientRect(),i=a.top;a.top,a.height;var o=r.top,l=o+n.outerHeight(!0),s=this.additionalTopOffset+i;return o<=s&&s<l?0:l<s?-1:1},_scrollDown:function(e,t){var n=this;if(t>=n.pageContainer.scrollHeight-5){var r=parseInt($(e[e.length-1]).attr("data-page"))+1;n._currentPageNumber()<r&&r<=n.controller.getPageCount()&&(n._addSkeletonScreen(r,!1),n.controller.getPageData(r).then((function(e){n._render(e,!1)})))}else n._advanceCurrentPage(e),n._loadVisiblePages()},_scrollUp:function(e){var t=this;if(0===t.$pageContainer.scrollTop()){var n=$(e[0]),r=parseInt(n.attr("data-page"))-1;t._currentPageNumber()>r&&r>=1&&(t._addSkeletonScreen(r,!0),t.controller.getPageData(r).then((function(e){t._render(e,!1),t.$pageContainer.scrollTop(3)})))}else t._advanceCurrentPage(e),t._loadVisiblePages()},_keepCurrentPageInToView:function(){var e=this,t=e.$placeholder.find('[data-page="'+e._currentPageNumber()+'"]'),n=t.position().top,r=t.innerHeight(),a=e.$pageContainer.innerHeight();e.scrollInProgress=!0,r<a&&(n=parseInt(n-(a-r)/2)),e.$pageContainer.animate({scrollTop:n},0,(function(){setTimeout((function(){e.scrollInProgress=!1}),100)}))}},Fe={$placeholder:null,$scrollableContainer:null,itemsInitialState:{},xFrozenAreasBounds:{},yFrozenAreasBounds:{},freezeMaxZIndex:{},zIndex:1,freezeBGColor:{},currentlyfreezedContainer:{vertical:{},horizontal:{}},isInitialize:!1,scaleFactor:null,init:function(e){this.$placeholder=e,this.$scrollableContainer=e.find(".trv-page-container"),this.isInitialize&&this.reset(e),this._attachToScrollEvent(),this.isInitialize=!0},reset:function(e){this.$placeholder=e,this.$scrollableContainer=e.find(".trv-page-container"),this.itemsInitialState={},this.xFrozenAreasBounds={},this.yFrozenAreasBounds={},this.currentlyfreezedContainer={vertical:{},horizontal:{}}},setScaleFactor:function(e){this.scaleFactor=e},_attachToScrollEvent:function(){var e=this;this.$scrollableContainer.scroll((function(){var t=e.$scrollableContainer.find("div[data-sticky-id]");if(t.length)for(var n=t.map((function(e,t){return $(t).attr("data-sticky-id")})).get(),r=n.filter((function(e,t){return t===n.indexOf(e)})),a=e.$scrollableContainer.scrollTop(),i=e.$scrollableContainer.scrollLeft(),o=0;o<r.length;o++){var l=r[o];e.itemsInitialState[l]||e._saveFreezeItemsInitialState(l),e._updateFreezeItemsOnScroll(l,a,i)}}))},_saveFreezeItemsInitialState:function(e){var t,n,r=$("[data-sticky-direction][data-sticky-id='"+e+"']"),i=$("[data-reporting-action][data-sticky-id='"+e+"']");this.itemsInitialState[e]={},this.freezeBGColor[e]=$("[data-id='"+e+"']").attr("data-sticky-bg-color");for(var o=0;o<r.length;o++){var l=$(r[o]),s=l.attr("data-sticky-direction"),c=l.attr("data-id"),u=l.position(),d={top:u.top/this.scaleFactor,left:u.left/this.scaleFactor},f=a(d.left,d.top,l.outerWidth(!0)*this.scaleFactor,l.outerHeight(!0)*this.scaleFactor);switch(s){case"Vertical":t=t?t.union(f):f;break;case"Horizontal":n=n?n.union(f):f}this._saveFreezeItemInitialState(e,l,c,d)}this.freezeMaxZIndex[e]=i.length?i.css("zIndex"):this.zIndex,this.yFrozenAreasBounds[e]=t,this.xFrozenAreasBounds[e]=n},_saveFreezeItemInitialState:function(e,t,n,r){var a=t.css("background-color"),i=this._hasSetBgColor(a),o={top:r.top,left:r.left,zIndex:t.css("zIndex"),hasBgColor:i};this.itemsInitialState[e][n]=o},_updateFreezeItemsOnScroll:function(e,t,n){var r=$("div[data-id='"+e+"']");if(this._isInScrollVisibleArea(r)){var a=r.closest(".trv-report-page"),i=a.position(),o=parseFloat(a.css("margin-top")),l=parseFloat(a.css("padding-top")),s=parseFloat(a.css("padding-left")),c=parseFloat(a.css("border-top-width")),u=parseFloat(a.css("border-left-width")),d=$("[data-sticky-direction*='Horizontal'][data-sticky-id='"+e+"']"),f=$("[data-sticky-direction*='Vertical'][data-sticky-id='"+e+"']"),p=d.length>0,g=f.length>0,v=r.position(),h=v.top+i.top+o+l+c,m=v.left+s+u,E=t-h,b=n-m;g&&E>0?t<=r.outerHeight()*this.scaleFactor+h-this.yFrozenAreasBounds[e].height&&(this.currentlyfreezedContainer.vertical[e]=!0,this._updateUIElementsPosition(f,"top",E/this.scaleFactor,e)):this.currentlyfreezedContainer.vertical[e]&&(delete this.currentlyfreezedContainer.vertical[e],this._updateUIElementsPosition(f,"top",-1,e)),p&&b>0?n<=r.outerWidth()*this.scaleFactor+m-this.xFrozenAreasBounds[e].width&&(this.currentlyfreezedContainer.horizontal[e]=!0,this._updateUIElementsPosition(d,"left",b/this.scaleFactor,e)):this.currentlyfreezedContainer.horizontal[e]&&(delete this.currentlyfreezedContainer.horizontal[e],this._updateUIElementsPosition(d,"left",-1,e))}else(this.currentlyfreezedContainer.horizontal[e]||this.currentlyfreezedContainer.vertical[e])&&this._resetToDefaultPosition(e)},_resetToDefaultPosition:function(e){var t=$("[data-sticky-direction*='Horizontal'][data-sticky-id='"+e+"']"),n=$("[data-sticky-direction*='Vertical'][data-sticky-id='"+e+"']");this._updateUIElementsPosition(n,"top",-1,e),this._updateUIElementsPosition(t,"left",-1,e),delete this.currentlyfreezedContainer.horizontal[e],delete this.currentlyfreezedContainer.vertical[e]},_updateUIElementsPosition:function(e,t,n,r){for(var a=0;a<e.length;a++){var i=$(e[a]),o=i.attr("data-sticky-direction").indexOf(",")>0,l=i.attr("data-id"),s=this.itemsInitialState[r][l],c=s[t],u=s.zIndex,d=s.hasBgColor,f=1,p=this.freezeMaxZIndex[r]?this.freezeMaxZIndex[r]:f,g={"z-index":f=o?"auto"!==u?u:p+2:"auto"!==u?u+1:p};n>=0?c+=n:g["z-index"]=u,d||this._applyBgColorOnScroll(i,o,d,n>=0,r),g[t]=c+"px",i.css(g)}},_applyBgColorOnScroll:function(e,t,n,r,a){return!!e.is("img")||(t&&this._isFrozen(a)&&!n?(e.css("background-color",this.freezeBGColor[a]),!0):void(r?e.css("background-color",this.freezeBGColor[a]):e.css("background-color","initial")))},_hasSetBgColor:function(e){return F(e)>0},_isFrozen:function(e){return this.currentlyfreezedContainer.horizontal[e]||this.currentlyfreezedContainer.vertical[e]},_isInScrollVisibleArea:function(e){var t=e.closest(".trv-report-page"),n=e.position();return this._isVisibleVertically(e,t,n)&&this._isVisibleHorizontally(e,t,n)},_isVisibleHorizontally:function(e,t,n){var r=parseFloat(t.css("padding-left")),a=this.$scrollableContainer.scrollLeft(),i=this.$scrollableContainer.width(),o=e.outerWidth(!0)*this.scaleFactor,l=n.left+r;return l>a-o&&l<a+o+i},_isVisibleVertically:function(e,t,n){var r=parseFloat(t.css("padding-top")),a=t.position(),i=this.$scrollableContainer.scrollTop(),o=this.$scrollableContainer.height(),l=e.outerHeight(!0)*this.scaleFactor,s=n.top+r+a.top;return s>i-l&&s<i+l+o}},Be={};function He(e,t,n){var r=(t=$.extend({},Be,t,n)).controller;if(!r)throw"No controller (telerikReportViewer.reportViewerController) has been specified.";var a,i,o,l,s,c,p,g,v,h=$(e),m=h.find(".trv-page-container"),E=m[0],b=h.find(".trv-page-wrapper"),T=b[0],P=h.find(".trv-error-message"),I=r.getScaleMode(),_=r.getScale(),C=.1,S=8,w=!0,R=!1,A=!1,D='.trv-page-container {background: #ffffff url("{0}") no-repeat center 50px}',y="trv-initial-image-styles",k=N({},Ge,{}),x=null;function L(){G(s),s=!1}function O(){return-1!==[ge.FIT_PAGE,ge.FIT_PAGE_WIDTH].indexOf(I)}function V(){for(var e=0,t=m.find(".trv-report-page"),n=t.length;e<n;e++){var a=parseInt($(t[e]).attr("data-page"));Z(t[e],I,_,a)}r.updatePageDimensionsReady()}function U({scale:e,scaleMode:t}){_=e||_,I=t||I,_=Math.max(C,Math.min(S,_)),V()}function G(e){m.off("click","[data-reporting-action]",Q),m.off("mouseenter","[data-reporting-action]",te),m.off("mouseleave","[data-reporting-action]",ne),m.off("mouseenter","[data-tooltip-title],[data-tooltip-text]",ae),m.off("mouseleave","[data-tooltip-title],[data-tooltip-text]",oe),i=void 0,e&&b.empty(),q()}function F(e){var t,n=m.find(".trv-report-page");return r.getPageMode()===pe.SINGLE_PAGE?M(n,(function(n,r){return J(r)===e&&(t=r),!t})):$.each(n,(function(n,r){if(parseInt($(r).attr("data-page"))===e)return t=r,!1})),t}function B(e,t){w?function(e,t){var n=F(e);n?(t&&H(t,e),k.isEnabled()&&!t&&k.navigateToElement(n.offsetTop,e)):(i=t,function(e){W(!0),window.setTimeout(r.getReportPage.bind(r,e),1),o=null}(e))}(e,t):function(e,t){o=e,l=t}(e,t)}function H(e,n){if(e){var r=m.find("[data-"+e.type+"-id="+e.id+"]")[0];if(r){if(t.enableAccessibility){var a=z($(r));a&&a.focus()}for(var i=m[0],o=0,l=0;r&&r!==i;){if($(r).is(".trv-page-wrapper")){var s=$(r).data("pageScale");"number"==typeof s&&(o*=s,l*=s)}o+=r.offsetTop,l+=r.offsetLeft,r=r.offsetParent}k.isEnabled()&&n?k.navigateToElement(o,n):(i.scrollTop=o,i.scrollLeft=l)}else k.isEnabled()&&n&&k.navigateToElement(h.find('[data-page="'+n+'"]')[0].offsetTop,n)}}function z(e){if(!e||0===e.length)return null;var t=f(e.attr("tabindex"));return!isNaN(t)&&t>-1?e:z(e.next())}function W(e){(e?$.fn.addClass:$.fn.removeClass).call(h,"trv-loading")}function q(e){P.text(e),(e?$.fn.addClass:$.fn.removeClass).call(h,"trv-error")}function J(e,t){var n=e.$?e:$(e),r="pageNumber";return void 0===t?n.data(r):(n.data(r,t),e)}function Z(e,t,n,r){var a=$(e),i=r?a:a.find("div.trv-report-page"),o=i.find("div.sheet"),l=i.find("div.trv-skeleton-wrapper"),s=o[0]||l[0],c=l[0];if(s){var u,d,f=a.data("box");if(!f){var p=K(a),g=Y(i),v=j(i);f={padLeft:p.left+g.left+v.left,padRight:p.right+g.right+v.right,padTop:p.top+g.top+v.top,padBottom:p.bottom+g.bottom+v.bottom},a.data("box",f)}void 0===a.data("pageWidth")?(u=s.offsetWidth,d=s.offsetHeight,a.data("pageWidth",u),a.data("pageHeight",d)):(u=a.data("pageWidth"),d=a.data("pageHeight"));var h=d>u&&t===ge.FIT_PAGE_WIDTH?20:0,m=(E.clientWidth-h-f.padLeft-f.padRight)/u,b=(E.clientHeight-1-f.padTop-f.padBottom)/d;t===ge.FIT_PAGE_WIDTH?n=m:n&&t!==ge.FIT_PAGE||(n=Math.min(m,b)),x&&x.setScaleFactor(n),a.data("pageScale",n),i.data("pageScale",n),c||X(o,n,n),i.css({height:n*d,width:n*u})}}function Q(e){var t=re($(this).attr("data-reporting-action"));t&&(o=function(e,t){if(k.isEnabled()&&("sorting"===t||"toggleVisibility"===t))return $(e.target).closest(".trv-report-page").attr("data-page")||r.getCurrentPageNumber();return r.getCurrentPageNumber()}(e,t.Type),r.executeReportAction({element:e.currentTarget,action:t,cancel:!1})),e.stopPropagation()}function te(e){var t=re($(this).attr("data-reporting-action"));null!==t&&e.currentTarget===this&&r.reportActionEnter({element:e.currentTarget,action:t})}function ne(e){var t=re($(this).attr("data-reporting-action"));null!==t&&e.currentTarget===this&&r.reportActionLeave({element:e.currentTarget,action:t})}function re(e){var t;return a?(M(a,(function(){return this.Id===e&&(t=this),void 0===t})),t):null}function ae(e){var n=$(this),a=n.attr("data-tooltip-title"),i=n.attr("data-tooltip-text");if(a||i){var o={element:e.currentTarget,toolTip:{title:a||"",text:i||""},cancel:!1};if(r.reportToolTipOpening(o),!o.cancel){var l,s,c,u,d=function(e){var n=t.templates["trv-pages-area-kendo-tooltip"],r=$(n),a=r.find(".trv-pages-area-kendo-tooltip-title"),i=r.find(".trv-pages-area-kendo-tooltip-text");return a.html(ie(e.toolTip.title)),i.html(ie(e.toolTip.text)),r.clone().wrap("<p>").parent().html()}(o),f=e.currentTarget.viewportElement,p=function(e,t){var n=e.data("kendoTooltip");if(!n)try{n=e.kendoTooltip({content:t,autohide:!0,callout:!1}).data("kendoTooltip")}catch(e){throw console.error("Instantiation of Kendo Tooltip threw an exception",e),e}return n}(n,d);p.show(n),f&&"svg"===f.nodeName&&(l=p,c=(s=e).pageX,u=s.pageY,l.popup.element.closest("[role=region]").css({left:c+10,top:u+5}))}}}function ie(e){return e=(e=(e=d(e)).replaceAll("\r\n","<br>")).replaceAll("\n","<br>")}function oe(e){var t=$(this).data("kendoTooltip");t&&t.hide()}function le(){$("#"+y).remove()}(p=h).attr("aria-label",ee[p.attr("aria-label")]),k&&k.init(e,t),$(window).on("resize",(function(e,t){O()&&V()})),Ue(h,{swipe:function(e){var t=r.getCurrentPageNumber();g&&"left"===e.direction?t<r.getPageCount()&&r.navigateToPage(t+1):v&&"right"===e.direction&&t>1&&r.navigateToPage(t-1)},pinch:function(e){var t=F(r.getCurrentPageNumber());U({scale:($(t).data("pageScale")||_)*(e.distance/e.lastDistance),scaleMode:ge.SPECIFIC})},doubletap:function(e){t.commands.toggleZoomMode.exec()},touchstart:function(e){var t=T;v=0===t.scrollLeft,g=t.scrollWidth-t.offsetWidth===t.scrollLeft}}),r.pageModeChanged((function(){r.getPageMode()===pe.CONTINUOUS_SCROLL?k.enable():k.disable(),r.refreshReport(!0)})).reportSourceChanged((function(){s=!0,o=null,l=null,w=!1})).beforeLoadParameters((function(e,t){t&&q(ee.loadingReport)})).beforeLoadReport((function(){w=!1,o||(o=1),c&&window.clearTimeout(c),G(),W(!0),q(ee.loadingReport)})).beginLoadReport((function(e,t){var n;w=!0,(n=F(o))&&J(n,-1)})).reportLoadProgress((function(e,t){var n,r;n=o,r=t.pageCount,n&&n<=r&&B(n,l),q(u(ee.loadingReportPagesInProgress,[t.pageCount]))})).reportLoadComplete((function(e,t){var n,a;0===t.pageCount?(L(),q(ee.noPageToDisplay)):(n=o,a=t.pageCount,n&&B(n=Math.min(n,a),l),q(u(ee.loadedReportPagesComplete,[t.pageCount])),c=window.setTimeout(q,2e3),m.on("click","[data-reporting-action]",Q),m.on("mouseenter","[data-reporting-action]",te),m.on("mouseleave","[data-reporting-action]",ne),m.on("mouseenter","[data-tooltip-title],[data-tooltip-text]",ae),m.on("mouseleave","[data-tooltip-title],[data-tooltip-text]",oe)),t.containsFrozenContent&&!x&&(x=N({},Fe,{}),r.getViewMode()===de.INTERACTIVE&&x.init(h))})).navigateToPage((function(e,t,n){B(t,n)})).pageReady((function(e,t){r.getPageMode()===pe.SINGLE_PAGE?(k.isEnabled()&&k.disable(),function(e){a=JSON.parse(e.pageActions),function(e){var t="trv-"+r.clientId()+"-styles";$("#"+t).remove();var n=$("<style id="+t+"></style>");n.append(e.pageStyles),n.appendTo("head")}(e);var t=e.pageNumber,n=$($.parseHTML(e.pageContent)),o=n.find("div.sheet"),l=$('<div class="trv-report-page" data-page="'+t+'"></div>');o.css("margin",0),l.append(o).append($('<div class="trv-page-overlay"></div>'));var s=b.empty().removeData().data("pageNumber",t).append(l);r.setCurrentPageNumber(t),r.getViewMode()===de.INTERACTIVE?(h.removeClass("printpreview"),h.addClass("interactive")):(h.removeClass("interactive"),h.addClass("printpreview"));Z(s,I,_),m.scrollTop(0),m.scrollLeft(0),H(i)}(t)):k.renderPage(t),A||(A=!0),R&&le(),r.getViewMode()===de.INTERACTIVE&&x&&x.init(h),W(!1)})).error((function(e,t){W(!1),L(),q(t)})).showNotification((function(e,t){q(ee[t.stringResources])})).hideNotification((function(e,t){q()})).scaleChanged((function(e,t){U({scale:t,scaleMode:r.getScaleMode()})})).scaleModeChanged((function(e,t){U({scale:r.getScale(),scaleMode:t})})).serverActionStarted((function(){W(!0),q(ee.loadingReport)})).scrollPageReady((function(e,t){!function(e){var t=JSON.parse(e.page.pageActions);a=a?a.concat(t):t;r.getViewMode()===de.INTERACTIVE?(h.removeClass("printpreview"),h.addClass("interactive")):(h.removeClass("interactive"),h.addClass("printpreview"));Z(e.target,I,_,e.page.pageNumber)}(t)})).missingOrInvalidParameters((function(e,n){var r;t.initialPageAreaImageUrl&&!A&&(L(),r=$("<style id="+y+"></style>"),le(),r.append(u(D,[t.initialPageAreaImageUrl])),r.appendTo("head"),R=!0)})).renderingStopped((function(){G(!0),q(ee.renderingCanceled)})),r.setDocumentMapVisible((function(){O()&&setTimeout((function(){V()}))})).setParametersAreaVisible((function(){O()&&setTimeout((function(){V()}))}))}var ze="telerik_ReportViewer_PagesArea";$.fn[ze]=function(e,t){return M(this,(function(){$.data(this,ze)||$.data(this,ze,new He(this,e,t))}))};var We,Ke={MultiSelect:function(e,t){return Boolean(e.availableValues)&&e.multivalue&&(!t||!t.multiSelect||t.multiSelect!==he.COMBO_BOX)},MultiSelectCombo:function(e,t){return Boolean(e.availableValues)&&e.multivalue&&t&&t.multiSelect&&t.multiSelect===he.COMBO_BOX},SingleSelect:function(e,t){return Boolean(e.availableValues)&&!e.multivalue&&(!t||!t.singleSelect||t.singleSelect!==he.COMBO_BOX)},SingleSelectCombo:function(e,t){return Boolean(e.availableValues)&&!e.multivalue&&t&&t.singleSelect&&t.singleSelect===he.COMBO_BOX},MultiValue:function(e){return Boolean(e.multivalue)},DateTime:function(e){return e.type===ve.DATETIME},String:function(e){return e.type===ve.STRING},Number:function(e){switch(e.type){case ve.INTEGER:case ve.FLOAT:return!0;default:return!1}},Boolean:function(e){return e.type===ve.BOOLEAN},Default:function(e){return!0}},je={formatValue:function(e){var t="";return e&&[].concat(e).forEach((function(e){t.length>0&&(t+="\n"),t+=e})),t},parseValues:function(e){return(""+e).split("\n")}};function Ye(e){function t(t){return!!r(t.keyCode)||(n=$(e).val()+String.fromCharCode(t.charCode),/^(\-|\+)?([0-9]*)$/.test(n));var n}function n(e){}return $(e).on("keypress",t).on("paste",n),{dispose:function(){!function(e){$(e).off("keypress",t).off("paste",n)}(e)}}}function Xe(e){function t(t){return!!r(t.keyCode)||(n=$(e).val()+String.fromCharCode(t.charCode),/^(\-|\+)?([0-9]*(\.[0-9]*)?)$/.test(n));var n}function n(e){}return $(e).on("keypress",t).on("paste",n),{dispose:function(){!function(e){$(e).off("keypress",t).off("paste",n)}(e)}}}function qe(e,t,n){(e?$.fn.addClass:$.fn.removeClass).call(n,t)}function Je(e,t){qe(!t,"k-disabled",e)}function Ze(e,t,n,r,a){r||(r="");var i=u("{0}. {1} {2}. {3}",[n,t,ee.ariaLabelParameter,r]);e.attr("aria-label",i),tt(e,a)}var Qe=0;function et(e){if(!We){var t=$("div.trv-parameters-area-content");if(t.length>0){var n=t.attr("tabIndex");n&&(We=f(n))}We&&!isNaN(We)||(We=300)}var r=e.closest(".trv-parameter-value"),a=r.find(".trv-select-all"),i=r.find(".trv-select-none"),o=e.closest(".k-widget").find(".k-input"),l=o&&o.length;a&&a.length&&a.attr("tabindex",We+ ++Qe),i&&i.length&&i.attr("tabindex",We+ ++Qe),l?o.attr("tabindex",We+ ++Qe):e.attr("tabindex",We+ ++Qe)}function tt(e,t){var n=u(" {0}:",[ee.ariaLabelErrorMessage]),r=e.attr("aria-label");if(r){var a=r.indexOf(n);a>-1&&(r=r.substring(0,a)),t&&""!==t?(e.attr("aria-required",!0),e.attr("aria-invalid",!0),r+=n+t):e.removeAttr("aria-invalid"),e.attr("aria-label",r)}}function nt(e){return kendo.version>="2017.3.1018"||e}var rt=[{match:Ke.MultiSelect,createEditor:function(e,t){var n=$(e),r=!0;n.html(t.templates["trv-parameter-editor-available-values-multiselect"]);var a,i,o,l,s=n.find(".trv-list"),c=n.find(".trv-select-all"),d=n.find(".trv-select-none"),f=t.parameterChanged;function p(e){l&&(function(e){M(s.find(".trv-listviewitem"),(function(){var t=$(this),n=e.filter(t).length>0;t.attr("aria-selected",n)}))}(e),function(e){var t=i.availableValues,n=$.map(e,(function(e){return t[$(e).index()].value}));v();var r=!i.autoRefresh&&!i.childParameters;o=window.setTimeout((function(){b(i.value,n)||f(i,n),o=null}),r?0:1e3)}(e))}function v(){o&&window.clearTimeout(o)}function h(){return $(a.element).find(".k-selected")}function E(e){if(r){var t=$(e.target),n=a.select();t.hasClass("k-selected")?n.splice($.inArray(t[0],n),1):n.push(t),a.clearSelection(),a.select(n),a.trigger("change")}}function T(e){p(h())}function P(e){if(r&&32===e.which){var t=a.element.find(".k-focus");t.length>0&&(t.toggleClass("k-selected"),p(h()),e.preventDefault())}}function I(e){!function(e){Array.isArray(e)||(e=[e]);var t=s.find(".trv-listviewitem");M(i.availableValues,(function(n,r){var a,i,o=!1;M(e,(function(e,t){var n=r.value;return t instanceof Date&&(n=g(r.value)),!(o=m(t,n))})),a=$(t[n]),qe(i=o,"k-selected",a),a.attr("aria-selected",i)}))}(e),p(h())}return c.text(ee[c.text()]),c.click((function(e){e.preventDefault(),r&&I(i.availableValues.map((function(e){return e.value})))})),d.text(ee[d.text()]),d.click((function(e){e.preventDefault(),r&&I([])})),{beginEdit:function(e){l=!1,a&&(a.element.off("touch click",".trv-listviewitem",E),a.element.off("keydown",P)),i=e;try{a=s.kendoListView({template:kendo.template('<div class="trv-listviewitem" style="cursor: pointer">${name}</div>'),dataSource:{data:i.availableValues},selectable:"MULTIPLE",navigatable:nt(t.enableAccessibility),change:T}).data("kendoListView")}catch(e){throw console.error("Instantiation of Kendo ListView as MultiSelect parameter editor threw an exception",e),e}et(s),I(i.value),a.element.off().on("touch click",".trv-listviewitem",E),a.element.on("keydown",P),l=!0},enable:function(e){Je(s,r=e)},clearPendingChange:v,addAccessibility:function(e){var t=u(ee.ariaLabelParameterInfo,[e.availableValues.length]);Ze(s,ee.ariaLabelMultiSelect,e.text,t,e.Error),s.attr("aria-multiselectable","true"),M(s.find(".trv-listviewitem"),(function(){$(this).attr("aria-label",this.innerText)}))},setAccessibilityErrorState:function(e){tt(s,e.Error)},destroy:function(){a.destroy()}}}},{match:Ke.MultiSelectCombo,createEditor:function(e,t){var n,r,a,i,o,l,s=$(e),c=!0,d=t.parameterChanged,f=!0;function p(e){!function(e){g();var t=!l.autoRefresh&&!l.childParameters;o=window.setTimeout((function(){b(l.value,e)||d(l,e),o=null}),t?0:1e3)}(e)}function g(){o&&window.clearTimeout(o)}function v(){f&&p(i.value())}return s.html(t.templates["trv-parameter-editor-available-values-multiselect-combo"]),n=s.find(".trv-combo"),(r=s.find(".trv-select-none"))&&(r.text(ee[r.text()]),r.click((function(e){e.preventDefault(),i.value([]),i.trigger("change")}))),(a=s.find(".trv-select-all"))&&(a.text(ee[a.text()]),a.click((function(e){if(e.preventDefault(),c){var t=$.map(l.availableValues,(function(e){return e.value}));i.value(t),i.trigger("change")}}))),{beginEdit:function(e){i&&i.unbind("change",v),l=e;try{i=n.kendoMultiSelect({itemTemplate:'<div class="trv-editoritem">${name}</div>',dataSource:l.availableValues,dataTextField:"name",dataValueField:"value",value:l.value,filter:"contains",autoClose:!1,open:function(){f=!1},close:function(e){f=!0,v()},autoWidth:!0,clearButton:!1}).data("kendoMultiSelect")}catch(e){throw console.error("Instantiation of Kendo MultiSelect as MultiSelectCombo parameter editor threw an exception",e),e}et(n),i.bind("change",v)},enable:function(e){c=e,i.enable(e)},clearPendingChange:g,addAccessibility:function(e){var t=i.input,n=u(ee.ariaLabelParameterInfo,[e.availableValues.length]);Ze(t,ee.ariaLabelMultiSelect,e.text,n,e.Error),M(i.items(),(function(){$(this).attr("aria-label",this.innerText)}))},setAccessibilityErrorState:function(e){tt(n,e.Error)},destroy:function(){i.destroy()}}}},{match:Ke.SingleSelect,createEditor:function(e,t){var n=$(e),r=!0;n.html(t.templates["trv-parameter-editor-available-values"]);var a,i,o=n.find(".trv-list"),l=n.find(".trv-select-none"),s=t.parameterChanged;function c(e){!function(e){var t=i.availableValues,n=$.map(e,(function(e){return t[$(e).index()].value}));Array.isArray(n)&&(n=n[0]);s(i,n)}(e)}function d(){c(a.select())}function f(){var e,t;et(o),e=i.value,t=o.find(".trv-listviewitem"),M(i.availableValues,(function(n,r){var i=r.value;return e instanceof Date&&(i=g(r.value)),!m(e,i)||(a.select(t[n]),!1)})),a.bind("change",d)}return l&&(l.text(ee[l.text()]),l.click((function(e){e.preventDefault(),a.clearSelection(),a.trigger("change")}))),{beginEdit:function(e){a&&a.unbind("change",d),i=e;try{a=o.kendoListView({template:'<div class="trv-listviewitem">${name}</div>',dataSource:{data:i.availableValues},selectable:!0,navigatable:nt(t.enableAccessibility)}).data("kendoListView")}catch(e){throw console.error("Instantiation of Kendo ListView as SingleSelect parameter editor threw an exception",e),e}f()},enable:function(e){Je(o,r=e),r?(a.bind("change",d),o.addClass("k-selectable")):(a.unbind("change",d),o.removeClass("k-selectable"))},addAccessibility:function(e){var t=u(ee.ariaLabelParameterInfo,[e.availableValues.length]);Ze(o,ee.ariaLabelSingleValue,e.text,t,e.Error),M(o.find(".trv-listviewitem"),(function(){$(this).attr("aria-label",this.innerText)}))},setAccessibilityErrorState:function(e){tt(o,e.Error)},destroy:function(){a.destroy()}}}},{match:Ke.SingleSelectCombo,createEditor:function(e,t){var n,r,a,i,o=$(e),l=t.parameterChanged;function s(e,t){!function(e,t){var n=t||"";!t&&e>=0&&(n=i.availableValues[e].value);l(i,n)}(e,t)}function c(e){s(a.select(),this.value())}return o.html(t.templates["trv-parameter-editor-available-values-combo"]),n=o.find(".trv-combo"),(r=o.find(".trv-select-none"))&&(r.text(ee[r.text()]),r.click((function(e){e.preventDefault(),a.value(""),a.trigger("change")}))),{beginEdit:function(e){a&&a.unbind("change",c),i=e;try{a=n.kendoComboBox({template:'<div class="trv-editoritem">${name}</div>',dataSource:i.availableValues,dataTextField:"name",dataValueField:"value",value:i.value,filter:"contains",suggest:!0,clearButton:!1}).data("kendoComboBox")}catch(e){throw console.error("Instantiation of Kendo ComboBox as SingleSelectCombo parameter editor threw an exception",e),e}et(n),a.bind("change",c)},enable:function(e){a.enable(e)},addAccessibility:function(e){var t=a.input,n=u(ee.ariaLabelParameterInfo,[e.availableValues.length]);Ze(t,ee.ariaLabelSingleValue,e.text,n,e.Error),M(a.items(),(function(){$(this).attr("aria-label",this.innerText)}))},setAccessibilityErrorState:function(e){tt(n,e.Error)},destroy:function(){a.destroy()}}}},{match:Ke.MultiValue,createEditor:function(e,t){var n,r=$(e);r.html(t.templates["trv-parameter-editor-multivalue"]);var a=r.find("textarea").on("change",(function(){t.parameterChanged&&t.parameterChanged(n,je.parseValues(this.value))}));return{beginEdit:function(e){var t;n=e,t=e.value,n.value=t,a.val(je.formatValue(t)),et(a)},enable:function(e){Je(a,e),a.prop("disabled",!e)},addAccessibility:function(e){Ze(a,ee.ariaLabelMultiValue,e.text,null,e.Error)},setAccessibilityErrorState:function(e){tt(a,e.Error)}}}},{match:Ke.DateTime,createEditor:function(e,t){var n,r=$(e);r.html(t.templates["trv-parameter-editor-datetime"]);try{var a=r.find("input[type=datetime]").kendoDatePicker({change:function(){var e=t.parameterChanged;if(e){var r=this.value();null!==r&&(r=v(r)),e(n,r)}}}),i=a.data("kendoDatePicker")}catch(e){throw console.error("Instantiation of Kendo DatePicker as DateTime parameter editor threw an exception",e),e}return{beginEdit:function(e){n=e,function(e){n.value=e;var t=null;try{e&&(t=h(e))}catch(e){t=null}i.value(t)}(e.value),et(a)},enable:function(e){i.enable(e),Je(a,e)},addAccessibility:function(e){Ze(a,ee.ariaLabelParameterDateTime,e.text,null,e.Error),a.attr("aria-live","assertive")},setAccessibilityErrorState:function(e){tt(a,e.Error)},destroy:function(){i.destroy()}}}},{match:Ke.String,createEditor:function(e,t){var n,r=$(e);r.html(t.templates["trv-parameter-editor-text"]);var a=r.find('input[type="text"]').change((function(){t.parameterChanged&&t.parameterChanged(n,a.val())}));return{beginEdit:function(e){var t;n=e,t=e.value,n.value=t,a.val(t),et(a)},enable:function(e){a.prop("disabled",!e),Je(a,e)},addAccessibility:function(e){Ze(a,ee.ariaLabelParameterString,e.text,null,e.Error),a.attr("aria-live","assertive")},setAccessibilityErrorState:function(e){tt(a,e.Error)}}}},{match:Ke.Number,createEditor:function(e,t){var n,r,a=$(e);a.html(t.templates["trv-parameter-editor-number"]);var i=a.find("input[type=number]").on("change",(function(){t.parameterChanged&&t.parameterChanged(n,i.val())}));return{beginEdit:function(e){r&&r.dispose(),n=e,i.val(n.value),r=n.type===ve.INTEGER?Ye(i):Xe(i),et(i)},enable:function(e){i.prop("disabled",!e),Je(i,e)},addAccessibility:function(e){Ze(i,ee.ariaLabelParameterNumerical,e.text,null,e.Error),i.attr("aria-live","assertive")},setAccessibilityErrorState:function(e){tt(i,e.Error)}}}},{match:Ke.Boolean,createEditor:function(e,t){var n,r=$(e);r.html(t.templates["trv-parameter-editor-boolean"]);var a=r.find("input[type=checkbox]").on("change",(function(){t.parameterChanged&&t.parameterChanged(n,this.checked)}));return{beginEdit:function(e){var t;n=e,t=e.value,n.value=t,a[0].checked=!0===t,et(a)},enable:function(e){Je(a,e),a.attr("disabled",!e)},addAccessibility:function(e){Ze(a,ee.ariaLabelParameterBoolean,e.text,null,e.Error),a.attr("aria-live","assertive")},setAccessibilityErrorState:function(e){tt(a,e.Error)}}}},{match:Ke.Default,createEditor:function(e,t){var n=$(e);return n.html('<div class="trv-parameter-editor-generic"></div>'),{beginEdit:function(e){n.find(".trv-parameter-editor-generic").text(e.Error?"(error)":e.value)},enable:function(e){}}}}];function at(e,t){var n,r=!!e.querySelectorAll&&e.querySelectorAll(".trv-menu-small")[0],a={small:{documentMapVisible:!1,parametersAreaVisible:!1,onDocumentMapVisibleChanged:function(e,n){n.visible&&t.setParametersAreaVisible({visible:!1})},onParameterAreaVisibleChanged:function(e,n){n.visible&&t.setDocumentMapVisible({visible:!1})},onBeforeLoadReport:function(){t.setParametersAreaVisible({visible:!1}),t.setDocumentMapVisible({visible:!1})},onNavigateToPage:function(){t.setParametersAreaVisible({visible:!1}),t.setDocumentMapVisible({visible:!1})}},large:{documentMapVisible:!0,parametersAreaVisible:!0}};function i(e){var t,r=g();if(r!==n){var i=a[n],o=a[r];n=r,e&&e.call(void 0,i,o),h((t=o).documentMapVisible),m(t.parametersAreaVisible)}}function o(e,t){p("onDocumentMapVisibleChanged",arguments)}function l(e,t){p("onParameterAreaVisibleChanged",arguments)}function s(){p("onBeforeLoadReport",arguments)}function c(){p("onNavigateToPage",arguments)}function u(){p("onReportLoadComplete",arguments)}function d(){i((function(e,t){v(e)}))}function f(){i(null)}function p(e,t){var r=a[n],i=r[e];"function"==typeof i&&i.apply(r,t)}function g(){var e=$(window).width()/parseFloat($("body").css("font-size"));return r&&e<=40.5?"small":"large"}function v(e){e.documentMapVisible=h(),e.parametersAreaVisible=m()}function h(){if(0===arguments.length){var e={};return t.getDocumentMapState(e),e.visible}return t.setDocumentMapVisible({visible:Boolean(arguments[0])}),this}function m(){if(0===arguments.length){var e={};return t.getParametersAreaState(e),e.visible}return t.setParametersAreaVisible({visible:Boolean(arguments[0])}),this}return n=g(),v(a.large),{attach:function(){window.addEventListener("resize",d),t.setDocumentMapVisible(o),t.setParametersAreaVisible(l),t.beforeLoadReport(s),t.navigateToPage(c),t.reportLoadComplete(u),t.cssLoaded(f)},dispose:function(){window.removeEventListener("resize",d)}}}var it="application/json; charset=UTF-8",ot="application/x-www-form-urlencoded; charset=UTF-8",lt="GET",st="POST",ct="DELETE",ut={};function dt(e){var t,n=c((e=N({},ut,e)).serviceUrl||e.baseUrl,"\\/"),r=B;function a(e){if(!e)throw"Invalid clientID"}function i(e,t){return u(e,t=N({},{baseUrl:n},t))}function o(e){return e?{headers:{Authorization:"Bearer "+e}}:{}}function l(){if(!t){var n=e.loginInfo;t=n&&n.url&&(n.username||n.password)?r({url:n.url,type:st,data:{grant_type:"password",username:n.username,password:n.password},dataType:"json",contentType:ot}).then((function(e){return e.access_token})):Promise.resolve()}return t}return{_urlFromTemplate:i,registerClient:function(e){return l().then((function(t){var n=N(o(t),e,{type:st,url:i("{baseUrl}/clients"),dataType:"json",data:JSON.stringify({timeStamp:Date.now()})});return r(n)})).then((function(e){if(e.Message)throw e.Message;return e.clientId}))},unregisterClient:function(e,t){return a(e),l().then((function(n){var a=N(o(n),t,{type:ct,url:i("{baseUrl}/clients/{clientID}",{clientID:e})});return r(a)}))},getParameters:function(e,t,n,s){return a(e),l().then((function(a){var l=N(o(a),s,{type:st,url:i("{baseUrl}/clients/{clientID}/parameters",{clientID:e}),contentType:it,dataType:"json",data:JSON.stringify({report:t,parameterValues:n})});return r(l)}))},createReportInstance:function(e,t,n,s){return a(e),l().then((function(a){var l=N(o(a),s,{type:st,url:i("{baseUrl}/clients/{clientID}/instances",{clientID:e}),contentType:it,dataType:"json",data:JSON.stringify({report:t,parameterValues:n})});return r(l)})).then((function(e){return e.instanceId}))},deleteReportInstance:function(e,t,n){return a(e),l().then((function(a){var l=N(o(a),n,{type:ct,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}",{clientID:e,instanceID:t})});return r(l)}))},createReportDocument:function(e,t,s,c,u,d,f,p){return a(e),l().then((function(a){(c=c||{}).BasePath=n;var l=N(o(a),p,{type:st,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents",{clientID:e,instanceID:t}),contentType:it,dataType:"json",data:JSON.stringify({format:s,deviceInfo:c,useCache:u,baseDocumentID:d,actionID:f})});return r(l)})).then((function(e){return e.documentId}))},sendDocument:function(e,t,n,s,c){return a(e),l().then((function(a){var l=N(o(a),c,{type:st,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/send",{clientID:e,instanceID:t,documentID:n}),contentType:it,data:JSON.stringify({from:s.from,to:s.to,cc:s.cc,subject:s.subject,body:s.body})});return r(l)}))},deleteReportDocument:function(e,t,n,s){return a(e),l().then((function(a){var l=N(o(a),s,{type:ct,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",{clientID:e,instanceID:t,documentID:n})});return r(l)}))},getDocumentInfo:function(e,t,n,s){return a(e),l().then((function(a){var l=N(o(a),s,{type:lt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/info",{clientID:e,instanceID:t,documentID:n}),dataType:"json"});return r(l)}))},getPage:function(e,t,n,s,c){return a(e),l().then((function(a){var l=N(o(a),c,{type:lt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/pages/{pageNumber}",{clientID:e,instanceID:t,documentID:n,pageNumber:s}),dataType:"json"});return r(l)}))},get:function(e){return r({type:lt,url:e})},formatDocumentUrl:function(e,t,n,r){var a=i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}",{clientID:e,instanceID:t,documentID:n});return r&&(a+="?"+r),a},getDocumentFormats:function(e){return l().then((function(t){var n=N(o(t),e,{type:lt,url:i("{baseUrl}/formats"),dataType:"json"});return r(n)}))},getServiceVersion:function(e){return l().then((function(t){var n=N(o(t),e,{type:lt,url:i("{baseUrl}/version"),dataType:"json"});return r(n)}))},getResource:function(e,t,n,s,c){return a(e),l().then((function(a){var l=N(o(a),c,{type:lt,url:i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/resources/{resourceID}",{clientID:e,instanceID:t,documentID:n,resourceID:s}),dataType:(null==c?void 0:c.dataType)||"json"});return r(l)}))},getSearchResults:function(e,t,n,s,c,u,d,f){a(e);var p=i("{baseUrl}/clients/{clientID}/instances/{instanceID}/documents/{documentID}/search",{clientID:e,instanceID:t,documentID:n});return l().then((function(e){var t=N(o(e),f,{type:st,url:p,contentType:it,dataType:"json",data:JSON.stringify({searchToken:s,matchCase:c,matchWholeWord:u,useRegularExpressions:d})});return r(t)}))},setAccessToken:function(e){t=Promise.resolve(e)},login:l,keepClientAlive:function(e,t){return l().then((function(n){var a=N(o(n),t,{type:st,url:i("{baseUrl}/clients/keepAlive/{clientID}",{clientID:e})});return r(a)}))},getClientsSessionTimeoutSeconds:function(e){return l().then((function(t){var n=N(o(t),e,{type:lt,url:i("{baseUrl}/clients/sessionTimeout")});return r(n)})).then((function(e){return e.clientSessionTimeout}))}}}function ft(e){var t={ExportInProgress:1,PrintInProgress:2,RenderInProgress:4};function n(e){return!!(l&e)}function r(e,t){t?l|=e:l&=~e}var a,i=e.controller,o=e.history,l=0,s=e.commands;if(!i)throw"No controller (telerikReporting.ReportViewerController) has been specified.";function c(){a||(a=!0,window.setTimeout((function(){try{e=i.getReportSource(),r=i.getPageCount(),l=i.getCurrentPageNumber(),c=e&&e.report,d=(u=c&&r>0)&&l<r,f=u&&l>1,p=u&&l,P={},i.getDocumentMapState(P),g=P,v=function(){var e={};return i.getParametersAreaState(e),e}(),h=function(){var e={};return i.getSearchDialogState(e),e}(),m=function(){var e={};return i.getSendEmailDialogState(e),e}(),E=n(t.RenderInProgress),b=n(t.PrintInProgress),T=n(t.ExportInProgress),s.goToFirstPage.enabled(f),s.goToPrevPage.enabled(f),s.stopRendering.enabled(c&&E),s.goToLastPage.enabled(d),s.goToNextPage.enabled(d),s.goToPage.enabled(u),s.print.enabled(u&&!E&&!b),s.export.enabled(u&&!E&&!T),s.refresh.enabled(c),s.historyBack.enabled(o&&o.canMoveBack()),s.historyForward.enabled(o&&o.canMoveForward()),s.toggleDocumentMap.enabled(c&&g.enabled).checked(g.enabled&&g.visible),s.toggleParametersArea.enabled(c&&v.enabled).checked(v.enabled&&v.visible),s.togglePrintPreview.enabled(u).checked(i.getViewMode()==de.PRINT_PREVIEW),s.pageMode.enabled(u).checked(i.getPageMode()==pe.CONTINUOUS_SCROLL),s.zoom.enabled(p),s.zoomIn.enabled(p),s.zoomOut.enabled(p),s.toggleZoomMode.enabled(p).checked(i.getScaleMode()==ge.FIT_PAGE||i.getScaleMode()==ge.FIT_PAGE_WIDTH),s.toggleSearchDialog.enabled(u).checked(h.visible),s.toggleSendEmailDialog.enabled(u).checked(m.visible),i.updateUI(null),i.pageNumberChange(l),i.pageCountChange(r)}finally{a=!1}var e,r,l,c,u,d,f,p,g,v,h,m,E,b,T,P}),10))}i.setParametersAreaVisible(c),i.setDocumentMapVisible(c),i.updateUIInternal(c),i.setSearchDialogVisible(c),i.setSendEmailDialogVisible(c),i.scaleModeChanged(c),i.currentPageChanged(c),i.beforeLoadReport((function(){r(t.RenderInProgress,!0),c()})),i.reportLoadProgress(c),i.reportLoadComplete((function(){r(t.RenderInProgress,!1),c()})),i.reportSourceChanged(c),i.viewModeChanged(c),i.pageModeChanged((function(){c()})),i.setUIState((function(e,n){r(t[n.operationName],n.inProgress),c()})),i.error((function(){r(t.ExportInProgress,!1),r(t.PrintInProgress,!1),r(t.RenderInProgress,!1),c()})),i.renderingStopped((function(){r(t.RenderInProgress,!1),c()})),c()}var pt={};function gt(e,t,n){var r=(t=$.extend({},pt,t,n)).controller;if(!r)throw"No controller (telerikReporting.reportViewerController) has been specified.";var a,i,o=$(e),l=!1!==t.documentMapVisible,s=t.enableAccessibility,c=null,u=!1;function d(e){var t=this.dataItem(e.node),n=t.page,a=t.id;r.navigateToPage(n,{type:"bookmark",id:a})}function f(e){s&&window.setTimeout((function(){p(e.node)}),100)}function p(e){M($(e).find("li"),(function(){var e=$(this);e.attr("aria-label",e[0].innerText)}))}function g(){v([])}function v(e){var n,r,i=e&&!$.isEmptyObject(e),l=a.data("kendoTreeView");if(!l)try{a.kendoTreeView({dataTextField:"text",select:d}),l=a.data("kendoTreeView")}catch(e){throw console.error("Instantiation of Kendo TreeView as Document Map threw an exception",e),e}l.setDataSource(e),s&&((r=l).bind("expand",f),r.element.attr("aria-label",ee.ariaLabelDocumentMap),M(r.element.find("ul"),(function(){p(this)})),u&&(n=o.next(),t.documentMapAreaPosition===Ee.RIGHT&&(n=o.prev()),n.attr("aria-label",ee.ariaLabelDocumentMapSplitter))),m(i)}function h(){o.removeClass("trv-loading")}function m(e){var n=re.viewerInstances.find((e=>e.id===t.viewerSelector+"-document-map-splitter")).instance,r=o.next();t.documentMapAreaPosition===Ee.RIGHT&&(r=o.prev()),n&&((u?$.fn.removeClass:$.fn.addClass).call(r,"trv-hidden"),n.toggle(".trv-document-map",e))}(a=$('<div id="'+t.viewerSelector+'-documentMap"></div>')).appendTo(e),r.beginLoadReport((function(){o.addClass("trv-loading");var e,t=r.getReportSource().report,n=c!==t||(e={},r.getDocumentMapState(e),!e.visible);c=t,n&&g()})).reportLoadComplete((function(e,t){t.documentMapAvailable?(u=!0,v(t.documentMapNodes),r.setDocumentMapVisible({enabled:!0,visible:l})):m(u=!1),h()})).error((function(e,t){h(),g()})).renderingStopped((function(){u=!1,m(!1)})),r.setDocumentMapVisible((function(e,t){m((l=t.visible)&&u)})).getDocumentMapState((function(e,t){t.enabled=u,t.visible=l})),(i=o.find(".trv-document-map-overlay"))&&i.attr("aria-label",ee[i.attr("aria-label")])}var vt="telerik_ReportViewer_DocumentMapArea";$.fn[vt]=function(e,t){return M(this,(function(){$.data(this,vt)||$.data(this,vt,new gt(this,e,t))}))};var ht={},mt="pa.parametersReady",Et="pa.Error";function bt(e,t,n){t=$.extend({},ht,t,n);var r={},a=$(r),i={},o=t.controller;if(!o)throw"No controller (telerikReporting.reportViewerController) has been specified.";var l,s,c,u=[].concat(t.parameterEditors,rt),f=void 0,p=$(e),g=p.find(".trv-parameters-area-content"),v=p.find(".trv-error-message"),h=p.find(".trv-parameters-area-preview-button");h.text(ee[h.text()]),h.attr("aria-label",ee[h.attr("aria-label")]),h.on("click",(function(e){e.preventDefault(),w()&&A()}));var m,E=t.templates["trv-parameter"],b=!1!==t.parametersAreaVisible,T=t.enableAccessibility;function P(e,t){e.style.display=t?"none":""}function I(e){var n=$(E),r=n.find(".trv-parameter-value"),a=n.find(".trv-parameter-title"),o=n.find(".trv-parameter-error"),s=n.find(".trv-parameter-error-message"),f=n.find(".trv-parameter-use-default input"),p=t.parameters&&t.parameters.editors?t.parameters.editors:null,g=function(e,t){var n;return M(u,(function(){return this&&this.match(e,t)&&(n=this),!n})),n}(e,p),v=d(e.text),m=!e.isVisible;m&&(v+=" [<b>hidden</b>]"),a.html(v).attr("title",v),s.text(e.Error),(e.Error?$.fn.show:$.fn.hide).call(o);var b=g.createEditor(r,{templates:t.templates,parameterChanged:function(e,t){var n=document.querySelector(".trv-pages-area .trv-error-message ul li."+e.name);try{t=De.validate(e,t),o.hide(),n&&P(n,!0),function(e,t){delete e.Error,e.value=t,l[e.id]=t,void 0!==c?e.id in c&&(l[e.id]=t):l[e.id]=t;if(y(e),e.childParameters)G(N);else{var n=w();if(_(n),n){var r=document.querySelector(".trv-pages-area .trv-error-message");h.is(":visible")&&r&&(r.textContent=ee.tryReportPreview),N()}}}(e,t)}catch(t){n&&P(n,!1),e.Error=t,e.value=[],s.text(t),o.show(),_(!1)}finally{!function(e){var t=i[e.id];if(!t||!T)return;t.setAccessibilityErrorState(e)}(e)}},enableAccessibility:T});(i[e.id]=b,b.beginEdit(e),T&&!m&&b.addAccessibility(e),f.length>0)&&(f.on("click",(function(){var t=$(this).is(":checked");t?(delete l[e.id],delete c[e.id],y(e),G(H)):(l[e.id]=e.value,c[e.id]=e.value),b.enable(!t),D()})),null!==c?e.id in c||(f.prop("checked",!0),b.enable(!1)):m&&(f.prop("checked",!0),b.enable(!1)));return n}function _(e){e?(h.prop("disabled",!1),h.removeClass("k-disabled")):(h.prop("disabled",!0),h.addClass("k-disabled"))}function C(e){v.text(e),(e?$.fn.addClass:$.fn.removeClass).call(p,"trv-error")}function S(){var e;(e=!0,M(s,(function(){return e=!this.isVisible||this.autoRefresh})),e?$.fn.removeClass:$.fn.addClass).call(p,"preview")}function w(){var e=!0;return M(s,(function(){return e=!this.Error})),e}function R(e){var n;l={},f={},s=e||[],M(i,(function(){this.hasOwnProperty("destroy")&&this.destroy()})),i={};var r=$("<div></div>");M(s,(function(){try{this.value=De.validate(this,this.value)}catch(e){this.Error=this.Error||e}!Boolean(this.Error)?(l[this.id]=this.value,this.availableValues?f[this.id]={valueMember:this.value,displayMember:this.label,availableValues:this.availableValues,multivalue:this.multivalue}:f[this.id]=this.value):this.Error=ee.invalidParameter,(this.isVisible||t.showHiddenParameters)&&(n=I(this))&&r.append(n)})),void 0!==c&&(null===c?(c={},M(s,(function(){this.isVisible?c[this.id]=this.value:delete l[this.id]}))):M(s,(function(){this.id in c||delete l[this.id]}))),g.empty(),s.length>0&&(g.append(r.children()),T&&g.attr("aria-label","Parameters area. Contains "+s.length+" parameters.")),S(),_(w()),o.setProcessedParameter($.extend({},f))}function A(){o.setParameters($.extend({},l)),o.previewReport(!1)}function D(){r.parametersReady(l)}function N(){D(),function(){for(var e=!0,t=s.length-1;e&&t>=0;t--){var n=s[t];e=n.id in l&&(Boolean(n.autoRefresh)||!n.isVisible)}return e}()&&A()}function y(e){e.childParameters&&M(e.childParameters,(function(e,t){var n=function(e){if(s)for(var t=0;t<s.length;t++){var n=s[t];if(n.id===e)return n}return null}(t);n&&y(n),delete l[t],function(e){if(i){var t=i[e];t&&"function"==typeof t.clearPendingChange&&t.clearPendingChange()}}(t)}))}function k(e){if(!e||null===e)return!1;var t=!1;return M(e,(function(){return!(t=this.isVisible)})),t}(m=p.find(".trv-parameters-area-preview-button"))&&(m.attr("aria-label",ee[m.attr("aria-label")]),m.text(ee[m.text()]));var x=0;function L(){x++,p.addClass("trv-loading")}function O(){x>0&&0==--x&&p.removeClass("trv-loading")}var V=!1;function U(e,n){(V=k(e))||z(!1),R(e),C(""),V&&b&&(z(!0),T&&function(){var e=p.prev(),n=p.find(".trv-parameters-area-content").attr("tabIndex");t.parametersAreaPosition!==me.TOP&&t.parametersAreaPosition!==me.LEFT||(e=p.next());e.attr("aria-label",ee.ariaLabelParametersAreaSplitter),e.attr("tabIndex",n)}()),o.updateUIInternal(),"function"==typeof n&&n(),O()}function G(e){F(o.loadParameters(l),e)}function F(e,t){L(),e.then((function(e){U(e,t)})).catch((function(e){O(),W(),p.hasClass("trv-hidden")||C(e),r.error(e)}))}function B(e,t){var n=function(e){var t;return e&&e.length&&(t=e[0]),"function"==typeof t?t:null}(t);return n?a.on(e,n):a.trigger(e,t),o}function H(){null===c&&(c=$.extend({},l)),D()}function z(e){var n=re.viewerInstances.find((e=>e.id===t.viewerSelector+"-parameters-splitter")).instance,r=p.prev();t.parametersAreaPosition!==me.TOP&&t.parametersAreaPosition!==me.LEFT||(r=p.next()),n&&((V?$.fn.removeClass:$.fn.addClass).call(r,"trv-hidden"),n.toggle(".trv-parameters-area",e))}function W(){R([])}return o.reloadParameters((function(e,t){C(),g.empty(),F(t,H)})).beforeLoadReport((function(){x=0,L()})).error(O).pageReady(O),o.getParametersAreaState((function(e,t){var n=!1;s&&(n=k(s)),t.enabled=n,t.visible=b})).setParametersAreaVisible((function(e,t){b=t.visible,z(t.visible&&k(s))})),$.extend(r,{allParametersValid:function(){return w()},clear:function(){W()},error:function(){return B(Et,arguments)},parametersReady:function(){return B(mt,arguments)},setParameters:function(e){c=null===e?null:$.extend({},e)}}),r}var Tt,Pt,It="telerik_ReportViewer_ParametersArea";function _t(e,t,n){var r,a=$.extend({},t,n),i=$(e).data("kendoMenu"),o=e.childNodes,l=a.controller,s=a.enableAccessibility;if(!l)throw"No controller (telerikReporting.ReportViewerController) has been specified.";function c(t){M($(e).find("ul[data-command-list=export-format-list]"),(function(){var e=$(this),n=e.parents("li"),r=s?n.attr("tabindex"):-1;r||(r=1),e.empty(),M(t,(function(){var e="<li "+(s?u('aria-label="{localizedName}" ',this):" ")+u('tabindex="'+r+'"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>',this);i.append(e,n)})),s&&M(n.find("li"),(function(){var e=$(this);e.off("keydown"),e.on("keydown",(function(t){switch(t.which){case kendo.keys.ENTER:d(e);break;case kendo.keys.UP:var n=e.prev();n.length>0?n.focus():e.parents("li").focus();break;case kendo.keys.DOWN:var r=e.next();r.length>0?r.focus():e.parent().children("li").first().focus()}}))}))}))}function d(e){if(m(e))n="#trv-main-menu-export-command",$("[data-role='telerik_ReportViewer_MainMenu']").data("kendoMenu").open(n);else if(e&&e.length>0){var t=e.children("a");t.length>0&&t.click()}var n}function p(e){var t,n=$(e.item);t=n,Tt&&Tt.is(t)&&window.setTimeout((function(){var e=t.find("li");e.length>0&&e[0].focus()}),100)}function g(e){Pt=void 0}function v(e){switch(e.which){case kendo.keys.ENTER:if(!s){var t=h();t.length>0&&(m(t)&&Pt&&(t=Pt),d(t))}break;case kendo.keys.RIGHT:s?function(){var e=h();if(!e||!e.length>0)return;var t=e.next();"none"==t.css("display")&&(t=t.next());!t.length>0&&(t=$(o).filter("li.k-item").first());t.focus()}():function(){var e=i.element.children("li.k-item"),t=e.filter(".k-focus");if(kendo.version>="2017.3.913")return void(r=t);if(t.hasClass("k-disabled"))if(!r||t.is(r)){var n=t.next();!n.length>0&&(n=e.first()),t.toggleClass("k-focus"),n.toggleClass("k-focus"),r=n,i._oldHoverItem=n}else r=t;else i._oldHoverItem=t,r=t}();break;case kendo.keys.LEFT:s?function(){var e=h();if(!e||!e.length>0)return;var t=e.prev();"none"==t.css("display")&&(t=t.prev());!t.length>0&&(t=$(o).filter("li.k-item").last());t.focus()}():(n=i.element.children("li.k-item.k-focus"),r=n);break;case kendo.keys.DOWN:case kendo.keys.UP:s||(Pt=function(){var e=i.element.find('li.k-item.k-focus [data-command="telerik_ReportViewer_export"]');if(1===e.length)return e.parent("li");return}())}var n}function h(){var e,t=document.activeElement;if(t&&"li"==t.localName)for(var n=$(o).filter("li.k-item"),r=0;r<n.length;r++){var a=n[r];if(t===a){e=$(a);break}}else t&&"input"==t.localName?e=$(t).closest("li.k-item"):0===(e=i.element.children("li.k-item.k-focus")).length&&(e=i.element.children("li.k-item").first());return e}function m(e){if(0!==e.length){var t=e.attr("id");return"trv-main-menu-export-command"==t||"trv-side-menu-export-command"==t}}i||function(){try{i=$(e).kendoMenu().data("kendoMenu")}catch(e){throw console.error("Instantiation of Kendo Menu as Main Menu threw an exception",e),e}i.bind("activate",p),i.bind("deactivate",g),i.element.off("keydown",v),i.element.on("keydown",v),a.enableAccessibility&&M($.find('[data-role="telerik_ReportViewer_MainMenu"]'),(function(){var e=$(this),t=e.find("li"),n=0,r=e.attr("tabIndex");r&&((n=f(r))&&!isNaN(n)||(n=0)),function(e,t){M(e,(function(){var e=$(this);e.attr("tabindex",t),e.focus((function(){e.addClass("k-focus")})),e.blur((function(){e.removeClass("k-focus")}));var n=e.children("a");if(n.length>0){var r=$(n);r.attr("tabindex",-1),e.attr("title",r.attr("title"))}e.off("keydown"),e.on("keydown",(function(t){t.which==kendo.keys.ENTER&&(d(e),Tt=e)}))}))}(t,n);var a=t.find('input[data-role="telerik_ReportViewer_PageNumberInput"]');a.length>0&&a.attr("tabindex",n)}));!function(){var e=V("ul[data-role=telerik_ReportViewer_MainMenu]");if(!e)return;M(e,(function(){var e=$(this),t=e.children("li.k-item");e.attr("aria-label",ee[e.attr("aria-label")]),M(t,(function(){var e=$(this);if(e.attr("aria-label",ee[e.attr("aria-label")]),e.hasClass("trv-report-pager"))e.attr("title",ee[e.attr("title")]);else{var t=e.find("a");t&&t.attr("title",ee[t.attr("title")])}}))}))}()}(),l.reportLoadComplete((function(e,t){s||i&&i._oldHoverItem&&i._oldHoverItem.toggleClass("k-focus"),t.renderingExtensions?c(t.renderingExtensions):l.getDocumentFormats().then(c)}))}$.fn[It]=function(e,t){return M(this,(function(){$.data(this,It)||$.data(this,It,new bt(this,e,t))}))};var Ct="telerik_ReportViewer_MainMenu";$.fn[Ct]=function(e,t){return M(this,(function(){$.data(this,Ct)||$.data(this,Ct,new _t(this,e,t))}))};var St={};function wt(e,t,n){var r,a,i,o,l,s,c,d,f,p,g,v,h,m,E,b,T,P,I,_,C,S=(t=$.extend({},St,t)).controller,w=!1,R=!1,A=[],D=$("[data-selector='"+n.viewerSelector+"']").find(".trv-report-viewer"),N="",y={shadedClassName:"trv-search-dialog-shaded-result",highlightedClassName:"trv-search-dialog-highlighted-result",current:null,elements:[]};if(!S)throw"No controller (telerikReporting.ReportViewerController) has been specified.";function k(){P||(x(!1),I=!1)}function x(t){R=t,t?(I=!0,function(){if(!w){r=$(e),a=r.find(".trv-search-dialog-input-box"),f=r.find(".trv-search-dialog-results-label"),p=r.find(".trv-search-dialog-results-area"),function(){try{p.kendoListView({selectable:!0,navigatable:!0,dataSource:{},contentElement:"",template:"<div class='trv-search-dialog-results-row'><span>#: description #</span> <span class='trv-search-dialog-results-pageSpan'>"+ee.searchDialogPageText+" #:page#</span></div>",change:function(){var e=this.select().index(),t=this.dataSource.view();!function(e){if(!e)return;y.current&&(y.current.removeClass(y.highlightedClassName),y.current.addClass(y.shadedClassName));e.page===S.getCurrentPageNumber()?Y(e):S.getPageMode()!==pe.CONTINUOUS_SCROLL?q():Y(e);_=e,S.navigateToPage(e.page,{type:"search",id:e.id})}(t[e]),X(e,t.length)}})}catch(e){throw console.error("Instantiation of Kendo ListView as search result area threw an exception",e),e}}(),function(e){if(!e)return;var t=e.find(".trv-search-dialog-caption-label"),n=e.find(".trv-search-dialog-search-options"),r=e.find("a[data-command='telerik_ReportViewer_searchDialog_StopSearch']"),a=e.find("a[data-command='telerik_ReportViewer_searchDialog_MatchCase']"),i=e.find("a[data-command='telerik_ReportViewer_searchDialog_MatchWholeWord']"),o=e.find("a[data-command='telerik_ReportViewer_searchDialog_UseRegex']"),l=e.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateUp']"),s=e.find("a[data-command='telerik_ReportViewer_searchDialog_NavigateDown']");te(e,"aria-label"),te(n,"aria-label"),c=t,c&&c.text(ee[c.text()]),Q(r),Q(a),Q(i),Q(o),Q(l),Q(s);var c}(r);try{i=r.find(".trv-search-dialog-search-options").kendoMenu(),l=r.find(".trv-search-dialog-stopsearch-placeholder").kendoMenu(),c=r.find(".trv-search-dialog-navigational-buttons").kendoMenu()}catch(e){throw console.error("Instantiation of Kendo Menu for Search Dialog threw an exception",e),e}o=i.data("kendoMenu"),s=l.data("kendoMenu"),d=c.data("kendoMenu"),o.element.on("keydown",L),s.element.on("keydown",L),d.element.on("keydown",L),function(e){for(var t=$(e).find(".k-menu-item"),n=0;n<t.length;n++)$(t[n]).removeClass("k-item")}(".trv-search-dialog-search-options");try{g=a.kendoComboBox({dataTextField:"value",dataValueField:"value",dataSource:A,contentElement:"",change:z,ignoreCase:!1,filtering:H,filter:"startswith",delay:1e3,open:function(e){T&&e.preventDefault()},select:U}).data("kendoComboBox")}catch(e){throw console.error("Instantiation of Kendo ComboBox as search input threw an exception",e),e}try{v=D.find(".trv-search-window").kendoWindow({title:ee.searchDialogTitle,height:390,width:310,minWidth:310,minHeight:390,maxHeight:700,scrollable:!1,close:function(){O(),N=""},open:function(){V()},deactivate:function(){S.setSearchDialogVisible({visible:!1})},activate:function(){g.input.focus()}}).data("kendoWindow")}catch(e){throw console.error("Instantiation of Kendo Window for Search dialog threw an exception",e),e}v.wrapper.addClass("trv-search"),m={searchDialog_MatchCase:new ne((function(){G(this)})),searchDialog_MatchWholeWord:new ne((function(){G(this)})),searchDialog_UseRegex:new ne((function(){G(this)}))},ae.bind(i,{controller:S,commands:m},n),h=new ne((function(){F(!1)})),ae.bind(l,{controller:S,commands:{searchDialog_StopSearch:h}},n),E={searchDialog_NavigateUp:new ne((function(){J(-1)})),searchDialog_NavigateDown:new ne((function(){J(1)}))},ae.bind(c,{controller:S,commands:E},n),w=!0}}(),v.open(),g.value(""),K(null),Z(!1,null)):(q(),v&&v.options.visible&&v.close())}function L(e){var t=$(e.target).find(".k-focus");if(13===e.keyCode&&t&&t.length>0){var n=t.children("a");n.length>0&&n.click()}}function O(){var e=v.element.parent(".k-window");C=e.offset()}function V(){var e=$(window).innerWidth(),t=$(window).innerHeight(),n=v.wrapper,r=n.outerWidth(!0),a=n.outerHeight(!0),i=10;if(C){var o=C.left,l=C.top,s=l+a;o+r>e-i&&(o=Math.max(i,e-r-i),n.css({left:o}),v.setOptions({position:{left:o}})),s>t-i&&(l=Math.max(i,t-a-i),n.css({top:l}),v.setOptions({position:{top:l}}))}else{var c=D[0].getBoundingClientRect();n.css({top:c.top+i,left:c.right-r-i}),v.setOptions({position:{top:c.top+i,left:c.right-r-i}})}}function U(e){if(window.event||window.event.type){var t=window.event;"keydown"===t.type&&(e.preventDefault(),40===t.keyCode?J(1):38===t.keyCode&&J(-1))}}function G(e){e.checked(!e.checked()),g&&W(g.value())}function F(e){h.enabled(e)}function B(e,t){R&&j(b)}function H(e){e.preventDefault(),e.filter&&e.filter.value!==N&&W(N=e.filter.value)}function z(e){var t=e.sender.value();t&&N!==t&&W(N=t)}function W(e){f.text(ee.searchDialogSearchInProgress),q(),b=null,F(!0),Z(!1,null),function(e){if(!e||""===e)return;var t=A.filter((function(t){return t.value===e}));if(t&&t.length>0)return;A.unshift({value:e}),A.length>10&&A.pop();T=!0,g.dataSource.data(A),g.select((function(t){return t.value===e})),T=!1}(e),S.getSearchResults({searchToken:e,matchCase:m.searchDialog_MatchCase.checked(),matchWholeWord:m.searchDialog_MatchWholeWord.checked(),useRegex:m.searchDialog_UseRegex.checked()}).then((function(e){K(e,null)})).catch((function(e){e&&K(null,e)}))}function K(e,t){var n,r;F(!1),t&&Z(!0,t),function(e){var t=p.data("kendoListView");e||(e=[]);t.dataSource.data(e)}(e),b=e,e&&e.length>0?(j(e),n=p.data("kendoListView"),r=n.element.children().first(),n.select(r),n.trigger("change")):X(-1,0)}function j(e){if(e&&0!==e.length){var t=r.parent().find(".trv-page-container").find("[data-search-id]");M(e,(function(){var e=t.filter("[data-search-id="+this.id+"]");e&&(e.addClass(y.shadedClassName),y.elements.push(e))})),Y(_),_=null}}function Y(e){if(e){var t=e.id,n=$(y.elements.filter((function(e){return e.attr("data-search-id")===t}))).first();if(n&&(y.current=n[0],y.current)){var r=$("[data-search-id='"+t+"']");r.removeClass(y.shadedClassName),r.addClass(y.highlightedClassName)}}}function X(e,t){var n=0===t?ee.searchDialogNoResultsLabel:u(ee.searchDialogResultsFormatLabel,[e+1,t]);f.text(n);var r=e>0,a=e<t-1;E.searchDialog_NavigateUp.enabled(r),E.searchDialog_NavigateDown.enabled(a)}function q(){y.elements&&y.elements.length>0&&M(y.elements,(function(){this.removeClass(y.shadedClassName)})),y.current&&y.current.removeClass(y.highlightedClassName),y.elements=[],y.current=null}function J(e){var t=p.data("kendoListView"),n=t.select();if(n){var r=t.select().trigger("change").index(),a=t.dataSource.view(),i=Math.min(a.length-1,Math.max(0,r+e));if(i!==r){var o=a[i],l=t.element.find('[data-uid="'+o.uid+'"]');l&&(t.select(l),t.trigger("change"),function(e,t){if(e.offsetTop-e.clientHeight<t.scrollTop)e.scrollIntoView();else{var n=e.offsetTop+e.offsetHeight;n>t.scrollTop+t.offsetHeight&&(t.scrollTop=n-t.offsetHeight)}}(l[0],t.element[0]))}}else n=t.element.children().first(),t.select(n),t.trigger("change")}function Z(e,t){var n=i.find("i[data-role='telerik_ReportViewer_SearchDialog_Error']");if(n&&0!==n.length){var r=i.data("kendoMenu").element.find("li").last();e?(n[0].title=t,r.show()):r.hide()}else console.log(t)}function Q(e){te(e,"title"),te(e,"aria-label")}function te(e,t){e&&e.attr(t,ee[e.attr(t)])}function ne(e){var t=!0,n=!1,r={enabled:function(e){if(0===arguments.length)return t;var n=Boolean(e);return t=n,$(this).trigger("enabledChanged"),r},checked:function(e){if(0===arguments.length)return n;var t=Boolean(e);return n=t,$(this).trigger("checkedChanged"),r},exec:e};return r}S.pageReady(B).scrollPageReady(B).beginLoadReport(k).viewModeChanged(k),S.setSendEmailDialogVisible((function(e,t){t.visible&&R&&x(!R)})).getSearchDialogState((function(e,t){t.visible=R})).setSearchDialogVisible((function(e,t){!function(e){if(R=e,e){if(n.searchMetadataOnDemand&&!I)return P=!0,S.reportLoadComplete((function(){P&&(x(!0),P=!1)})),void S.refreshReport(!0)}x(e)}(t.visible)})),$(window).resize((function(){v&&v.options.visible&&(O(),V())}))}var Rt="telerik_ReportViewer_SearchDialog";$.fn[Rt]=function(e,t){return M(this,(function(){$.data(this,Rt)||$.data(this,Rt,new wt(this,e,t))}))};var At={};function Dt(e,t,n){var r,a,i,o,l,s,c,u,d,f,p,g,v,h=(t=$.extend({},At,t)).controller,m=!1,E=!1,b=n.viewerSelector,T=$("[data-selector='"+b+"']").find(".trv-report-viewer");if(!h)throw"No controller (telerikReporting.ReportViewerController) has been specified.";n.sendEmail&&n.sendEmail.enabled?(h.beginLoadReport(P).viewModeChanged(P),h.getSendEmailDialogState((function(e,t){t.visible=E})).setSendEmailDialogVisible((function(e,t){I(t.visible)})).setSearchDialogVisible((function(e,t){t.visible&&E&&I(!E)})),h.getDocumentFormats().then((function(e){p=e})),$(window).resize((function(){a&&a.options.visible&&(C(),S(),w())}))):$("[data-selector='"+b+"']").find("a[data-command='telerik_ReportViewer_toggleSendEmailDialog']").closest(".k-item ").hide();function P(){I(!1)}function I(t){E=t,t?(!function(){if(!m){r=$(e),i=r.find("[name='from']"),o=r.find("[name='to']"),l=r.find("[name='cc']"),s=r.find("[name='subject']"),u=r.find("[name='format']"),d=r.find("textarea"),r.find(".trv-send-email-field input").each((function(){var e=$(this),t=e.attr("name");e.attr("id",b+"-"+t)})),r.find(".trv-send-email-label label").each((function(){var e=$(this),t=e.attr("for");e.attr("for",b+"-"+t)})),g={sendEmail_Cancel:new L((function(){k()})),sendEmail_Send:new L((function(e){var t,n,r,a,d;d={from:i.val(),to:o.val(),cc:l.val(),subject:s.val(),format:c.value(),body:_(),deviceInfo:{}},t=A(i)||!M(i,!1),n=A(o)||!M(o,!0),r=l.val().length&&!M(l,!0),(a=c.value().length)||D(u,"data-required-msg"),!(t||n||r)&&a&&(h.sendReport(d),k())}))},ae.bind(r.find(".trv-send-email-actions"),{controller:h,commands:g},n),function(e){if(!e)return;var t=e.find(".trv-replace-string"),n=e.find("[aria-label]"),r=e.find("[title]");t.length&&$.each(t,(function(e,t){var n;(n=$(t))&&n.text(ee[n.text()])}));n.length&&$.each(n,(function(e,t){x($(t),"aria-label")}));r.length&&$.each(r,(function(e,t){x($(t),"title")}))}(r);try{a=T.find(".trv-send-email-window").kendoWindow({title:ee.sendEmailDialogTitle,minWidth:350,minHeight:350,maxHeight:900,modal:!0,close:function(){C(),$(".k-invalid-msg").removeClass("-visible")},open:function(){S(),w()},deactivate:function(){h.setSendEmailDialogVisible({visible:!1})},activate:function(){a.wrapper.find(".trv-send-email-fields input[type='email']:visible").first().focus(),setTimeout((function(){i.off("blur").on("blur",(function(e){A($(this))||M($(this),!1)})),o.off("blur").on("blur",(function(e){A($(this))||M($(this),!0)})),l.off("blur").on("blur",(function(e){$(this).val().length?M($(this),!0):N($(this))}))}),250)}}).data("kendoWindow")}catch(e){throw console.error("Instantiation of Kendo Window for Send Email dialog threw an exception",e),e}a.wrapper.addClass("trv-send-email");try{c=u.kendoComboBox({dataTextField:"localizedName",dataValueField:"name",dataSource:p||[],filter:"startswith",dataBound:function(){this.select(0),this.trigger("change")}}).data("kendoComboBox")}catch(e){throw console.error("Instantiation of Kendo ComboBox as document format selector threw an exception",e),e}r.on("keydown",'[name="format_input"]',(function(e){var t=9;e.keyCode===t&&f&&setTimeout((function(){f.focus()}))}));try{f=d.kendoEditor({tools:["bold","italic","underline","strikethrough","justifyLeft","justifyCenter","justifyRight","justifyFull","insertUnorderedList","insertOrderedList","indent","outdent","createLink","unlink","cleanFormatting","formatting","fontName","fontSize","foreColor","backColor","subscript","superscript"]}).data("kendoEditor")}catch(e){throw console.error("Instantiation of Kendo Editor for Email body editor threw an exception",e),e}R(n.sendEmail),m=!0}}(),R(n.sendEmail),a.open()):a&&a.options.visible&&a.close()}function _(){return f?f.value():""}function C(){var e=a.element.parent(".k-window");v=e.offset()}function S(){var e=a.element.parent(".k-window"),t=350;$(window).width()>800&&(t=720),e.css({width:t}),a.refresh({width:t})}function w(){if(v){var e=10,t=$(window).innerWidth(),n=$(window).innerHeight(),r=a.wrapper,i=r.outerWidth(!0),o=r.outerHeight(!0),l=v.left,s=v.top,c=s+o;l+i>t-e&&(l=Math.max(e,t-i-e),r.css({left:l}),a.setOptions({position:{left:l}})),c>n-e&&(s=Math.max(e,n-o-e),r.css({top:s}),a.setOptions({position:{top:s}}))}else a.center()}function R(e){i.val(e&&e.from||""),o.val(e&&e.to||""),l.val(e&&e.cc||""),s.val(e&&e.subject||""),e&&e.format?c.value(e.format):c.select(0),c.trigger("change"),f.value(e&&e.body||"")}function A(e){return e.val().length?(N(e),!1):(D(e,"data-required-msg"),!0)}function D(e,t){var n=ee[e.attr(t)];$('[data-for="'+e.attr("name")+'"]').addClass("-visible").text(n)}function N(e){$('[data-for="'+e.attr("name")+'"]').removeClass("-visible")}function M(e,t){var n=e.val();if(t){for(var r=n.split(/[\s,;]+/),a=0;a<r.length;a++)if(!y(r[a].trim(),e))return!1;return!0}return y(n,e)}function y(e,t){return e.indexOf(",")>-1||e.indexOf(";")>-1?(D(t,"data-single-email-msg"),!1):!!/\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/.test(e)||(D(t,"data-email-msg"),!1)}function k(){a.close()}function x(e,t){e&&e.attr(t,ee[e.attr(t)])}function L(e){var t=!0,n=!1,r={enabled:function(e){if(0===arguments.length)return t;var n=Boolean(e);return t=n,$(this).trigger("enabledChanged"),r},checked:function(e){if(0===arguments.length)return n;var t=Boolean(e);return n=t,$(this).trigger("checkedChanged"),r},exec:e};return r}}var Nt="telerik_ReportViewer_SendEmail";function Mt(e,t,n){var r,a=$.extend({},t,n),i=$(e).data("kendoMenu"),o=a.enableAccessibility,l=3,s=!1,c=a.controller;if(!c)throw"No controller (telerikReporting.ReportViewerController) has been specified.";function d(e){var t=$(e.item);r.unbind("expand",d),r.append({text:ee.loadingFormats,spriteCssClass:"k-icon k-loading"},t),a.controller.getDocumentFormats().then(f).then((function(){r.expand(t)})).then((function(){r.bind("expand",d)}))}function f(t){M($(e).find("ul[data-command-list=export-format-list]"),(function(){var e=$(this),n=e.parents("li"),a=n.attr("tabindex");a||(a=l),e.empty(),M(t,(function(e){var t="<li "+(o?u('aria-label="{localizedName}" ',this):" ")+u('tabindex="'+a+'"><a tabindex="-1" href="#" data-command="telerik_ReportViewer_export" data-command-parameter="{name}"><span>{localizedName}</span></a></li>',this);r.append(t,n)})),g(n.find("li"),a),p(n)}))}function p(e){M(e.find("li"),(function(){0===$(this).children("ul").length&&$(this).children("a").click((function(){c.setSideMenuVisible({visible:!s})}))}))}function g(e,t){e.attr("tabindex",t),M(e.find("li"),(function(){var e=$(this);e.attr("tabindex",t);var n=e.children("a");n.length>0&&$(n).attr("tabindex",-1);e.focus((function(){var t=e.children("a");t.length>0&&t.addClass("k-focus")})),e.blur((function(){var t=e.children("a");t.length>0&&t.removeClass("k-focus")})),e.off("keydown",h),e.on("keydown",h)}))}function v(e){if(e.which==kendo.keys.ENTER){var t,n=!1,a=document.activeElement;if(a&&"li"==a.localName)for(var i=r.element.find("li.k-item"),o=0;o<i.length;o++){var l=i[o];if(a===l){t=$(l),n=!0;break}}else t=r.select();if(!t||!t.length>0)return;m(t,n)}}function h(e){e.which==kendo.keys.ENTER&&m($(e.target),!1)}function m(e,t){if(!(!e.length>0))if(0===e.children("ul").length){var n=e.find("a");n.length>0&&n[0].click()}else t&&(e.hasClass("k-active")?r.collapse(e):r.expand(e))}i||function(e){var t=$(e);try{r=t.children("ul").kendoPanelBar().data("kendoPanelBar")}catch(e){throw console.error("Instantiation of Kendo PanelBar as side menu threw an exception",e),e}r.bind("expand",d),r.element.off("keydown",v),r.element.on("keydown",v),function(e){if(!e)return;var t=e.children("ul"),n=e.attr("tabindex");g(t,n||l)}(t),p(t),t.click((function(t){t.target==e&&c.setSideMenuVisible({visible:!s})})),function(){var e=V("div[data-role=telerik_ReportViewer_SideMenu] > ul");if(!e)return;M(e,(function(){var e=$(this),t=e.children("li.k-panelbar-header");e.attr("aria-label",ee[e.attr("aria-label")]),M(t,(function(){var e=$(this),t=e.find("a");if(e.attr("aria-label",ee[e.attr("aria-label")]),t){var n=t.find("span:not(.k-icon)");t.attr("title",ee[t.attr("title")]),n&&n.text(ee[n.text()])}}))}))}()}(e),c.setSideMenuVisible((function(e,t){var n;(n=r.element.parent()).position().left<0||!n.is(":visible")?n.show():window.setTimeout((function(){n.hide()}),500),o&&r.element.focus(),(s=t.visible)||r.collapse($("#trv-side-menu-export-command"))})).getSideMenuVisible((function(e,t){t.visible=s}))}$.fn[Nt]=function(e,t){return M(this,(function(){$.data(this,Nt)||$.data(this,Nt,new Dt(this,e,t))}))};var yt="telerik_ReportViewer_SideMenu";$.fn[yt]=function(e,t){return M(this,(function(){$.data(this,yt)||$.data(this,yt,new Mt(this,e,t))}))};var kt=Object.defineProperty,xt=(e,t,n)=>(((e,t,n)=>{t in e?kt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class $t{constructor(){xt(this,"_data",{}),this._data={}}get length(){return Object.keys(this._data).length}getItem(e){return this._data[e]||null}setItem(e,t){this._data[e]=t}removeItem(e){delete this._data[e]}key(e){return Object.keys(this._data)[e]||null}clear(){this._data={}}}const Lt=(Ot={},{load:function(e,t,n){var r=Ot[e];return r||(Ot[e]=r=n.get(e).then((function(e){var n={},r=[],a=c(t,"\\/")+"/";e=l(e,"{service}/",a),e=l(e,"{service}",a);var i=$("<div></div>").html(e);return M(i.find("template"),(function(e,t){var r=$(t);n[r.attr("id")]=o(r.html(),"\n \t")})),M(i.find("link"),(function(e,t){r.push(o(t.outerHTML,"\n \t"))})),r=L(r),{templates:n,styleSheets:r}}))),r}});var Ot,Vt=Object.defineProperty,Ut=(e,t,n)=>(((e,t,n)=>{t in e?Vt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);class Gt{constructor(e,t,n){Ut(this,"_id"),Ut(this,"_storage"),Ut(this,"_defaults"),this._id=e,this._storage=t,this._defaults=n||{}}formatKey(e){return this._id+"_"+e}getItem(e){var t=this._storage.getItem(this.formatKey(e));if("string"==typeof t)try{t=JSON.parse(t)}catch(e){t=null}return null!=t?t:this._defaults[e]}setItem(e,t){var n=this.formatKey(e);this._storage.setItem(n,JSON.stringify(t))}getViewMode(){return this.getItem("viewMode")}setViewMode(e){this.setItem("viewMode",e)}getPageMode(){return this.getItem("pageMode")}setPageMode(e){this.setItem("pageMode",e)}getPrintMode(){return this.getItem("printMode")}setPrintMode(e){this.setItem("printMode",e)}getScale(){return this.getItem("scale")}setScale(e){this.setItem("scale",e)}getScaleMode(){return this.getItem("scaleMode")}setScaleMode(e){this.setItem("scaleMode",e)}getDocumentMapVisible(){return this.getItem("documentMapVisible")}setDocumentMapVisible(e){this.setItem("documentMapVisible",e)}getParametersAreaVisible(){return this.getItem("parametersAreaVisible")}setParametersAreaVisible(e){this.setItem("parametersAreaVisible",e)}getHistory(){return this.getItem("history")}setHistory(e){this.setItem("history",e)}getClientId(){return this.getItem("clientId")}setClientId(e){this.setItem("clientId",e)}getReportSource(){return this.getItem("reportSource")}setReportSource(e){this.setItem("reportSource",e)}getPageNumber(){return this.getItem("pageNumber")}setPageNumber(e){this.setItem("pageNumber",e)}getEnableAccessibility(){return this.getItem("enableAccessibility")}setEnableAccessibility(e){this.setItem("enableAccessibility",e)}getAccessibilityKeyMap(){return this.getItem("accessibilityKeyMap")}setAccessibilityKeyMap(e){this.setItem("accessibilityKeyMap",e)}getSearchMetadataOnDemand(){return this.getItem("searchMetadataOnDemand")}setSearchMetadataOnDemand(e){this.setItem("searchMetadataOnDemand",e)}getKeepClientAlive(){return this.getItem("keepClientAlive")}setKeepClientAlive(e){this.setItem("keepClientAlive",e)}}const Ft=re.viewerInstances;function Bt(e,t){var n=t.serviceUrl,r="";t.reportServer&&(r=c(t.reportServer.url,"\\/"),n=r+"/api/reports");var a,o,l,s=$(e),f={},p=t.id||`trv_${e.id}`,g={},v={},h={},m={},E={},b={},T="";if(t.viewerSelector="reportViewer-"+i(),s.attr("data-selector",t.viewerSelector),function(e){if(!e)return s.text("The report viewer configuration options are not initialized."),!1;if(e.reportServer){if(!e.reportServer.url)return s.text("The report server URL is not specified."),!1}else if(!e.serviceUrl)return s.text("The serviceUrl is not specified."),!1;return!0}(t)){var P="18.1.24.514";return t=N({},function(e,t){return{id:null,serviceUrl:null,templateUrl:c(e,"\\/")+"/resources/templates/telerikReportViewerTemplate-"+t+".html/",reportSource:null,reportServer:null,authenticationToken:null,sendEmail:null,scale:1,scaleMode:ge.FIT_PAGE,viewMode:de.INTERACTIVE,pageMode:pe.CONTINUOUS_SCROLL,parametersAreaPosition:me.RIGHT,documentMapAreaPosition:Ee.LEFT,parameters:{editors:{multiSelect:he.LIST_VIEW,singleSelect:he.LIST_VIEW}},persistSession:!1,parameterEditors:[],disabledButtonClass:null,checkedButtonClass:null,parametersAreaVisible:!0,documentMapVisible:!0,enableAccessibility:!1,searchMetadataOnDemand:!1,initialPageAreaImageUrl:null,keepClientAlive:!0}}(n,P),t),g=new Gt(p,t.persistSession?window.sessionStorage:new $t,{scale:t.scale,scaleMode:t.scaleMode,printMode:t.printMode?t.printMode:t.directPrint,enableAccessibility:t.enableAccessibility,searchMetadataOnDemand:t.searchMetadataOnDemand,sendEmail:t.sendEmail,parametersAreaPosition:t.parametersAreaPosition,documentMapAreaPosition:t.documentMapAreaPosition,keepClientAlive:t.keepClientAlive}),t.reportServer?(T=c(t.reportServer.url,"\\/"),b.serviceUrl=T+"/api/reports",b.loginInfo={url:T+"/Token",username:t.reportServer.username,password:t.reportServer.password}):b.serviceUrl=t.serviceUrl,o=new dt(b),(v=t.controller)?v.updateSettings(g):v=new xe({serviceClient:o,settings:g}),l=new Ve({controller:v,settings:g}),m=new Ie({controller:v,history:l}),new ft({controller:v,history:l,commands:m}),E={stringResources:ee,refreshReport:function(e){return 0===arguments.length&&(e=!0),v.refreshReport(e),E},reportSource:function(e){return e||null===e?(v.setReportSource(e),v.refreshReport(!1),E):v.getReportSource()},clearReportSource:function(){return v.clearReportSource(),E},viewMode:function(e){return e?(v.setViewMode(e),E):v.getViewMode()},pageMode:function(e){return e?(v.setPageMode(e),E):v.getPageMode()},printMode:function(e){return e?(v.setPrintMode(e),E):v.getPrintMode()},scale:function({scale:e,scaleMode:t}={}){return e||t?(v.setScale(e||v.getScale()),v.setScaleMode(t||v.getScaleMode()),E):{scale:v.getScale(),scaleMode:v.getScaleMode()}},currentPage:function(){return v.getCurrentPageNumber()},pageCount:function(){return v.getPageCount()},parametersAreaVisible:function(e){v.setParametersAreaVisible({visible:e})},getReportParameters:function(){return v.getReportParameters()},authenticationToken:function(e){return e&&v.setAuthenticationToken(e),E},bind:function(e,t){I(e,t,!0)},unbind:function(e,t){I(e,t,!1)},accessibilityKeyMap:function(e){if(a)return e?(a.setKeyMap(e),E):a.getKeyMap()},commands:m,dispose:function(){v.dispose(),h&&h.dispose()}},window.Promise?R(P):k("https://cdn.polyfill.io/v2/polyfill.min.js?features=Promise",R,P),E}function I(e,t,n){"function"==typeof t?n?$(E).on(e,{sender:E},t):$(E).off(e,t):t||n||$(E).off(e)}function _(){var n,r,i,o,l,c,u;s.html(f["trv-report-viewer"]),ae.bind(s,{controller:v,commands:m,templates:f},t),(h=new at(e,v)).attach(),function(){var e={max:"500px",min:"50px",size:"210px",collapsible:!0},n=s.find(".trv-parameters-area"),r=[{}],a={max:"500px",min:"50px",size:"210px",collapsible:!0,collapsed:!0},i=s.find(".trv-document-map"),o=[{}],l="horizontal";t.documentMapAreaPosition===Ee.RIGHT?(i.insertAfter(s.find(".trv-pages-area")),o.push(a)):o.unshift(a);t.parametersAreaPosition!==me.TOP&&t.parametersAreaPosition!==me.BOTTOM||(l="vertical",n.addClass("-vertical"),e.size="130px");t.parametersAreaPosition===me.LEFT||t.parametersAreaPosition===me.TOP?(n.insertBefore(s.find(".trv-document-map-splitter")),r.unshift(e)):r.push(e);try{var c=s.find(".trv-document-map-splitter").kendoSplitter({panes:o,expand:function(e){C(e.pane,!0)},collapse:function(e){C(e.pane,!1)},resize:function(e){}}).data("kendoSplitter")}catch(e){throw console.error("Instantiation of Kendo Splitter as Document Map splitter threw an exception",e),e}try{var u=s.find(".trv-parameters-splitter").kendoSplitter({panes:r,orientation:l,expand:function(e){C(e.pane,!0)},collapse:function(e){C(e.pane,!1)},resize:function(e){}}).data("kendoSplitter")}catch(e){throw console.error("Instantiation of Kendo Splitter as Parameters area splitter threw an exception",e),e}var d={id:t.viewerSelector+"-parameters-splitter",instance:u},f={id:t.viewerSelector+"-document-map-splitter",instance:c};Ft.push(d),Ft.push(f)}(),function(){var e={EXPORT_BEGIN:v.Events.EXPORT_STARTED,EXPORT_END:v.Events.EXPORT_DOCUMENT_READY,PRINT_BEGIN:v.Events.PRINT_STARTED,PRINT_END:v.Events.PRINT_DOCUMENT_READY,RENDERING_BEGIN:v.Events.BEFORE_LOAD_REPORT,RENDERING_END:v.Events.REPORT_LOAD_COMPLETE,PAGE_READY:v.Events.PAGE_READY,ERROR:v.Events.ERROR,UPDATE_UI:v.Events.UPDATE_UI,INTERACTIVE_ACTION_EXECUTING:v.Events.INTERACTIVE_ACTION_EXECUTING,INTERACTIVE_ACTION_ENTER:v.Events.INTERACTIVE_ACTION_ENTER,INTERACTIVE_ACTION_LEAVE:v.Events.INTERACTIVE_ACTION_LEAVE,VIEWER_TOOLTIP_OPENING:v.Events.TOOLTIP_OPENING,SEND_EMAIL_BEGIN:v.Events.SEND_EMAIL_STARTED,SEND_EMAIL_END:v.Events.SEND_EMAIL_READY},t=$(E);for(const[n,r]of Object.entries(e))v.on(r,(function(e,r){t.trigger(n,r)}))}(),I(Oe.EXPORT_BEGIN,t.exportBegin,!0),I(Oe.EXPORT_END,t.exportEnd,!0),I(Oe.PRINT_BEGIN,t.printBegin,!0),I(Oe.PRINT_END,t.printEnd,!0),I(Oe.RENDERING_BEGIN,t.renderingBegin,!0),I(Oe.RENDERING_END,t.renderingEnd,!0),I(Oe.PAGE_READY,t.pageReady,!0),I(Oe.ERROR,t.error,!0),I(Oe.UPDATE_UI,t.updateUi,!0),I(Oe.INTERACTIVE_ACTION_EXECUTING,t.interactiveActionExecuting,!0),I(Oe.INTERACTIVE_ACTION_ENTER,t.interactiveActionEnter,!0),I(Oe.INTERACTIVE_ACTION_LEAVE,t.interactiveActionLeave,!0),I(Oe.VIEWER_TOOLTIP_OPENING,t.viewerToolTipOpening,!0),I(Oe.SEND_EMAIL_BEGIN,t.sendEmailBegin,!0),I(Oe.SEND_EMAIL_END,t.sendEmailEnd,!0),n=g.getViewMode(),r=g.getPageMode(),i=g.getPrintMode(),o=g.getScale(),l=g.getScaleMode(),c=g.getDocumentMapVisible(),u=g.getParametersAreaVisible(),g.getAccessibilityKeyMap(),v.setViewMode(n||t.viewMode),v.setPageMode(r||t.pageMode),v.setPrintMode(i||t.printMode),v.setScale(o||t.scale),v.setScaleMode(l||t.scaleMode),v.setDocumentMapVisible({visible:c||t.documentMapVisible}),v.setParametersAreaVisible({visible:u||t.parametersAreaVisible}),v.printModeChanged((function(){g.setPrintMode(v.getPrintMode())})),v.viewModeChanged((function(){g.setViewMode(v.getViewMode())})),v.pageModeChanged((function(){g.setPageMode(v.getPageMode())})),v.scaleChanged((function(e,t){g.setScale(t)})),v.scaleModeChanged((function(e,t){g.setScaleMode(t)})),v.setSideMenuVisible((function(e,t){window.setTimeout((function(){(t.visible?$.fn.addClass:$.fn.removeClass).call(s,"trv-side-menu-visible")}),1)})),v.setDocumentMapVisible((function(){var e={};v.getDocumentMapState(e),g.setDocumentMapVisible(e.visible)})),v.setParametersAreaVisible((function(){var e={};v.getParametersAreaState(e),g.setParametersAreaVisible(e.visible)})),function(e){if(e.enableAccessibility){a=new ne({controller:v,templates:f});var t=e.accessibilityKeyMap;t&&a.setKeyMap(t),g.contentTabIndex=function(){var e="div.trv-pages-area";try{var t=s.find(e);if(0===t.length)throw"Selector "+e+" did not return a result.";return parseInt(t.attr("tabindex"))}catch(e){return console&&console.log(e),0}}()}}(t)}function C(e,t){switch($(e).attr("data-id")){case"trv-document-map":v.setDocumentMapVisible({visible:t});break;case"trv-parameters-area":v.setParametersAreaVisible({visible:t})}}function w(){var e=!1;_(),v.reportLoadComplete((function(){!1===t.documentMapVisible&&v.setDocumentMapVisible({visible:!1})}));var n=g.getReportSource();if(void 0!==n){v.setReportSource(n);var r=g.getPageNumber();void 0!==r&&v.navigateToPage(r),e=!0}else t.viewMode&&v.setViewMode(t.viewMode),t.pageMode&&v.setPageMode(t.pageMode),t.reportSource&&(v.setReportSource(t.reportSource),e=!0);"function"==typeof t.ready&&t.ready.call(E),e&&v.refreshReport(!1)}function R(e){(function(e){return window.kendo?Promise.resolve():x(c(n,"\\/")+"/resources/js/telerikReportViewer.kendo-"+e+".min.js/").catch((function(e){O("Kendo could not be loaded automatically. Make sure 'options.serviceUrl' / 'options.reportServer.url' is correct and accessible. The error is: "+e.error)}))})(e).then((function(){})).then((function(){E.authenticationToken(t.authenticationToken),v.getServiceVersion().catch((function(e){var t=S(e)?e.exceptionMessage:u(ee.errorServiceUrl,[d(n)]);return s.text(t),Promise.reject()})).then((function(r){if(r!==e)return s.text(u(ee.errorServiceVersion,[r,e])),Promise.reject();Lt.load(t.templateUrl,n,o).catch((function(){return s.text(u(ee.errorLoadingTemplates,[d(t.templateUrl)])),Promise.reject()})).then((function(e){return f=e.templates,function(e){if(!e)return Promise.resolve();var t=$("head"),n=t.find("link").map((function(e,t){return t.outerHTML})).toArray(),r=[];return M(e,(function(e,a){-1===n.indexOf(a)&&r.push(new Promise((function(e,n){var r=$(a);r.on("load",e),r.on("onerror",(function(){O("error loading stylesheet "+a),e()})),t.append(r)})))})),Promise.all(r).then(v.cssLoaded)}(e.styleSheets)})).then(w)}))}))}}var Ht="telerik_ReportViewer";$.fn[Ht]=function(e){return this.selector&&!e.selector&&(e.selector=this.selector),M(this,(function(){$.data(this,Ht)||$.data(this,Ht,new Bt(this,e))}))};return[{name:"telerik_ReportViewer_DocumentMapArea",constructor:gt},{name:"telerik_ReportViewer_MainMenu",constructor:_t},{name:"telerik_ReportViewer_PagesArea",constructor:He},{name:"telerik_ReportViewer_ParametersArea",constructor:bt},{name:"telerik_ReportViewer_SearchDialog",constructor:wt},{name:"telerik_ReportViewer_SendEmail",constructor:Dt},{name:"telerik_ReportViewer_SideMenu",constructor:Mt}].forEach((e=>{$.fn[e.name]=function(t,n){return M(this,(function(){$.data(this,e.name)||$.data(this,e.name,new e.constructor(this,t,n))}))}})),e.Accessibility=ne,e.Binder=ae,e.CommandSet=Ie,e.DocumentMapAreaPositions=Ee,e.Events=Oe,e.GlobalSettings=re,e.HistoryManager=Ve,e.PageModes=pe,e.PagesArea=He,e.ParameterEditorTypes=he,e.ParameterEditors=rt,e.ParameterTypes=ve,e.ParameterValidators=De,e.ParametersAreaPositions=me,e.PerspectiveManager=at,e.PrintManager=Ae,e.PrintModes=fe,e.ReportViewer=Bt,e.ReportViewerController=xe,e.ScaleModes=ge,e.Scroll=Ge,e.ServiceClient=dt,e.TouchBehavior=Ue,e.UIController=ft,e.UIFreezeCoordinator=Fe,e.ViewModes=de,e.domUtils=J,e.parameterEditorsMatch=Ke,e.utils=z,Object.defineProperty(e,"__esModule",{value:!0}),e}({});