1function CSP(){}function DOMChangesQueue(){this.maSetCssQueueNodes=[];this.maSetCssQueueProp=[];this.maSetCssQueueValues=[];this.maResetHeightQueueNodes=[];this.maCachedOffsetToClear=[]}function FastArray(){this.moHash={};this.moArray=[]}function $Elt(n,t){return CacheMgr.GetInstance().GetEl(n,t)}function $E(n){return $(document.getElementById(n))}function $PI(n,t){return ControlMgr.GetInstance().GetPositionItem(n,t)}function $S(n,t,i){return StyleMgr.GetInstance().GetStyle(n,t,i)}function $SetStyle(n,t,i){StyleMgr.GetInstance().SetStyle(n,t,i)}function $SetCss(n,t){n=typeof n=="string"?$E(n):$(n);n.css(t)}function $AddClass(n,t){StyleMgr.GetInstance().AddClass(n,t)}function $RemoveClass(n,t){StyleMgr.GetInstance().RemoveClass(n,t)}function $ReplaceClass(n,t,i){StyleMgr.GetInstance().ReplaceClass(n,t,i)}function $HasClass(n,t){return StyleMgr.GetInstance().HasClass(n,t)}function $SwitchClass(n,t){return StyleMgr.GetInstance().SwitchClass(n,t)}function $Control(n,t){return ControlMgr.GetInstance().GetControl(n,t)}function $AddEvent(n,t,i,r,u){CtrlEventMgr.GetInstance().AddEvent(n,t,i,r,u)}function $AddAction(n,t,i,r,u){CtrlEventMgr.GetInstance().AddAction(n,t,i,r,u)}function $LS(n){console.log("LS"+n)}function $LE(n){console.log("LE"+n)}function CacheMgr(){this.mbIsActive=!0;this.Refresh()}function ConstProperties(){}function ConstValues(){}function ControlHeap(){this.moArray=[];this.moPresenceHash={}}function ControlMgr(){this.Refresh();this.moReferences={};this.moNewReferences={};this.moPopupReferences={};this.moRootPositionItem;this.moPropertyQueue=[];this.moHash={};this.moOldHash={};this.moNewHash={}}function ControlsUtils(){this.moKeywords=new RegExp("if|else|Math.min|Math.max|Math.floor|Math.round|return|[&|()+*/<>=,;{}-]","g")}function CtrlEventMgr(){this.moBroadcastToChannel={};this.moChannelToBroadcast={};this.moObjectReference={};this.moUnregisterFuncs={};var n=this;$(window).bind("storage",function(t){t.originalEvent&&t.originalEvent.key=="SiteWideBroadcast"&&n.Broadcast(t.originalEvent.newValue,"
1site-wide",!0)})}function CtrlEvent(n,t,i){this.moObject=n;this.moActivatedFunc=t;this.moUnregisterFunc=i;this.moFunc=[]}function Dependency(n,t,i,r,u,f){if(this.moSource=n,this.moDest=t,this.miType=i,this.miSubType=r,this.miAlignment=Dependency.StringAlignmentToInt(u),this.miAxis=f,this.miAxis==Dependency.Const.AXIS_X?(this.moSource.AddXDependent(this),this.moDest.AddXSource(this)):(this.moSource.AddYDependent(this),this.moDest.AddYSource(this)),Param.PropagateChangesInGlobalPosition&&(this.miAlignment==Dependency.Const.ALIGNMENT_GLOBAL_TOP||this.miAlignment==Dependency.Const.ALIGNMENT_GLOBAL_LEFT)){var e=this.moSource.GetParentContainer();e&&new Dependency(e,this.moDest,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.miAlignment,this.miAxis)}}function HistoryMgr(){}function ImageMgr(){this.maLoadingQueue={};this.miCpt=0;this.miTimeout}function PositionItem(){this.msId;this.msAdvancedX;this.masXTypes;this.miXOff;this.miOriginalXOff;this.msReferenceX;this.msAdvancedY;this.masYTypes;this.miYOff;this.miOriginalYOff;this.msReferenceY;this.msAdvancedWidth;this.msWidthType;this.miWidth;this.msWidthReference;this.miOriginalWidth;this.miOriginalWidth_NotOverridable;this.msAdvancedHeight;this.msHeightType;this.miHeight;this.msHeightReference;this.miOriginalHeight;this.miOriginalHeight_NotOverridable;this.mbEthereal;this.miPositionBroadcastMarker;this.moProperties;this.miDeep=0;this.masStyles;this.moXDependents;this.moXSources;this.moYDependents;this.moYSources;this.moQuickXSource;this.moQuickWSource;this.moQuickYSource;this.moQuickHSource;this.mbUpdateStyle;this.mbXMustBeCalculated;this.mbYMustBeCalculated;this.moActivatedProperties;this.moSuperContainer;this.moAncestorWebComponents;this.msCtrlType;this.miPrePosX;this.miPrePosY;this.moBgDiv;this.maTextNodes;this.maiActualColWidth=[];this.maiColWidth=[];this.mabCanGrow=[];this.mbCMSBlockEdit=!1;this.mbHasFreeHtml;this.mbParentIsFreeHtml}function GetHeightIFrame(n){var i=null,t=n.GetChildNodes()[0];return t.contentWindow?iFrameBody=t.contentWindow.document.getElementsByTagName("body")[0]:t.contentDocument&&(iFrameBody=t.contentDocument.getElementsByTagName("body")[0]),iFrameBody&&(i=$(iFrameBody).height()),i}function GetWidthIFrame(n){var i=null,t=n.GetChildNodes()[0];return t.contentWindow?iFrameBody=t.contentWindow.document.getElementsByTagName("body")[0]:t.contentDocument&&(iFrameBody=t.contentDocument.getElementsByTagName("body")[0]),iFrameBody&&(i=$(iFrameBody).width()),i}function getStyle(n,t,i,r,u){var o,f,e;if(i||(i="[EMPTY]"),o=/(.*)ABS VF(.*) PopupContentClass(.*)/gi,o.test(i)&&(r=!0),!r&&moStyleCache.hasOwnProperty(i)&&moStyleCache[i].hasOwnProperty(t))return moStyleCache[i][t];if(f=!1,window.getComputedStyle)document.getElementById(n.GetNode().GetId())?f=window.getComputedStyle(n.GetNode(),null).getPropertyValue(t):(f=u,r=!0);else if(n.GetNode().currentStyle){function i(n){for(var n=n.split("-"),i=n[0],t=1;parT=n[t];t++)i+=parT.charAt(0).toUpperCase()+parT.substr(1);return i}f=n.GetNode().currentStyle[i(t)]}return i&&!r&&(moStyleCache.hasOwnProperty(i)?e=moStyleCache[i]:(e={},moStyleCache[i]=e),e[t]=f),f}function PositionMgr(){this.moXDirtyHeap=new ControlHeap;this.moYDirtyHeap=new ControlHeap;this.mbPositioning=!1;this.mbPosRequested=!1}function PostRenderMgr(){this.maoFunctions=[];this.maoDelayFunctions=[];this.maoAfterPreRenderOnAjaxSuccessFunctions=[]}function PreRenderMgr(){}function Point(n,t){this.x=parseInt(n);this.y=parseInt(t)}function ResizeMgr(){var n=this.GetScreenSize();this.moCachedScreenSize=n;this.miMinScreenWidth=700;this.moAnchorScreen=document.createElement("div");this.moAnchorScreen.setAttribute("id","AnchorFlashMatrix3Screen:"+ConstValues.Const.SCREEN);M3IECompatMode&&(this.moAnchorScreen=new HTMLElement(this.moAnchorScreen));this.moAnchorScreen.Setup(this.moAnchorScreen.GetNode(),"Anchor",null,"0",null,"0",new String(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)),new String(n.y),null,null,null,null,null,null,null);this.moAnchorScreen.SetDeep(ResizeMgr.Const.INT_MAX_VALUE);this.moAnchorPopupBase=document.createElement("div");this.moAnchorPopupBase.setAttribute("id","AnchorFlashMatrix3Screen:"+ConstValues.Const.SCREEN);M3IECompatMode&&(this.moAnchorPopupBase=new HTMLElement(this.moAnchorPopupBase));this.moAnchorPopupBase.Setup(this.moAnchorPopupBase.GetNode(),"Anchor",null,"0",null,"0",new String(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)-ResizeMgr.Const.POPUP_MARGIN),new String(n.y-ResizeMgr.Const.POPUP_MARGIN),null,null,null,null,null,null,null);this.moAnchorPopupBase.SetDeep(ResizeMgr.Const.INT_MAX_VALUE);ControlMgr.GetInstance().AddPositionItem(this.moAnchorPopupBase);this.moAnchorScreen;this.moAnchorPopupBase;this.miScollbarSize;this.mbHasHorizontalScrollbar=!1}function BindableScopeTable(){this.moTable={}}function Collection(){this.moCollectionToVForm={};this.moVFormToCollection={}}function EventItem(n,t,i,r,u,f,e,o,s,h,c){this.msSourceVForm=Utils.IsString(n)?n:null;this.msSourceEvent=Utils.IsString(t)||t==null?t:null;this.msSourceType=Utils.IsString(i)&&(i==Matrix3.Const.RETURNTYPE_FULL||i==Matrix3.Const.RETURNTYPE_VIEWSTATE)?i:null;this.msTargetVForm=Utils.IsString(r)||r==null?r:null;this.msTargetEvent=Utils.IsString(u)||u==null?u:null;this.msTargetType=Utils.IsString(f)&&(f==Matrix3.Const.RETURNTYPE_FULL||f==Matrix3.Const.RETURNTYPE_VIEWSTATE)||f==null?f:null;this.msEventDelay=Utils.IsString(e)&&(e==Matrix3.Const.DELAY_BUFFERED||e==Matrix3.Const.DELAY_IMMEDIAT)?e:null;this.moPosition=Utils.IsString(s)||s==null?null:s;h&&(this.moMetaKeys=h);this.mbAllowParallel=c;this.msArgs=o}function EventTable(){this.moEventList=[];this.moEventTable={};this.moVFormsTriggeredByTriggingProperty={}}function RegisterControlEvent(n,t,i){var r=document.getElementById(n),f,u,e,o;r&&(r["on"+t]=null,r.removeAttribute("on"+t),f=this,u=i.bind(r),t==="click"&&(EventControlAction_ClickHandlers[n]=u),e=r.getAttribute("_dblc_")==="1",o=function(n){var i=t==="click",r=t==="dblclick";i?e?(Utils.IsIE()||n&&n.detail==1)&&(f.callback=setTimeout(function(){u(n)},300)):u(n):r?(Utils.IsIE()||n&&n.detail>=2)&&(clearTimeout(f.callback),u(n)):u(n)},r.addEventListener(t,o))}function RegisterButtonEvent(n,t,i){var u=document.getElementById(n),r;u&&(r=u.querySelector("a"),r&&(r["on"+t]=null,r.removeAttribute("on"+t),t==="click"&&(EventControlAction_ClickHandlers[n]=i),r.addEventListener(t,i)))}function RegisterButtonClickDblClickEvent(n,t,i){var f=document.getElementById(n),r,u,e,o;f&&(r=f.querySelector("a"),r&&(r.onclick=null,r.ondblclick=null,r.removeAttribute("onclick"),r.removeAttribute("dblclick"),u=this,e=function(n){(Utils.IsIE()||n&&n.detail==1)&&(u.callback=setTimeout(t,300))},typeof EventControlAction_ClickHandlers!="undefined"&&(EventControlAction_ClickHandlers[n]=t),o=function(n){(Utils.IsIE()||n&&n.detail>=2)&&(clearTimeout(u.callback),i(n))},r.addEventListener("click",e),r.addEventListener("dblclick",o)))}function RegisterTextAreaEvent(n,t,i){var r=document.getElementById(n);r&&(r["on"+t]=null,r.removeAttribute("on"+t),t==="click"&&(EventControlAction_ClickHandlers[n]=i),r.addEventListener(t,i))}function RegisterImageEvent(n,t,i){var u=document.getElementById(n),r;u&&(r=u.querySelector("img"),t==="click"&&(EventControlAction_ClickHandlers[n]=i),r&&(r.removeAttribute("on"+t),t==="error"&&(!r.complete||r.naturalWi
1dth!==0&&r.naturalHeight!==0||Utils.IsFirefox()&&Utils.IsStringFilled(r.src)&&r.src.toLowerCase().endsWith(".svg")||i()),r.addEventListener(t,i)))}function TriggerItem(n,t,i,r,u,f){this.msSourceVForm=Utils.IsString(n)?n:null;this.msSourceEvent=Utils.IsString(t)||t==null?t:null;this.msTargetVForm=Utils.IsString(i)?i:null;this.msTargetEvent=Utils.IsString(r)||r==null?r:null;this.msTargetType=Utils.IsString(u)&&(u==Matrix3.Const.RETURNTYPE_FULL||u==Matrix3.Const.RETURNTYPE_VIEWSTATE)?u:null;this.msCommonTriggingProperty=Utils.IsString(f)||f==null?f:null;this.msID=TriggerItem.CreateID(this.msSourceVForm,this.msSourceEvent,this.msTargetVForm,this.msTargetEvent)}function TriggerTable(){this.moTriggerList=[];this.moTriggerTable={}}function VFormInfoItem(n,t,i,r,u){this.msVFormID=Utils.IsString(n)?n:null;this.msSubID=Utils.IsString(t)||t==null?t:null;this.msPersistant=Utils.IsString(i)||i==null?i:null;this.msVFormParent=Utils.IsString(r)||r==null?r:null;this.msVFormPanel=Utils.IsString(u)||u==null?u:null}function VFormInfoTable(){this.moVFormInfoTable={}}function ImageAnnotator(){}function VideoAnnotator(){}function CookieConsentTools(){}function DraggableItem(n,t,i){var r,u,f;typeof i!="object"&&(i={});this.moOptions=$.extend({},DraggableItem.DefaultOptions,i);this.msID=n;this.maDragGroups=t;this.msGroupsStringList=t.join(Utils.Const.GROUP_SEPARATOR);this.masMultiSelectionGroup=[];this.oDragItem=$E(this.msID);r=this.oDragItem;DragDropMgr.DraggableSubscribe(this.msID,this);Matrix3.RegisterForCleanup(n,"DraggableItem",function(){DragDropMgr.DraggableUnsubscribe(n);r&&r.off("mouseover.draggableItemInit");try{r&&r.hasClass("ui-draggable")&&r.draggable("destroy")}catch(t){}r=null});this.mbIsReorder=!1;u=this.moOptions.ReorderMode.split("_");this.mbIsVertical=u.indexOf(DragDropMgr.Const.REORDER_MODE_VERTICAL)!==-1;this.mbIsHierarchy=u.indexOf(DragDropMgr.Const.REORDER_MODE_HIERARCHY)!==-1;this.mbIsCustomIndex=u.indexOf(DragDropMgr.Const.REORDER_MODE_CUSTOM_INDEX)!==-1;f=this;this.mfInitOnMouseOver=function(){$(this).hasClass("ui-draggable")||f._SetDraggableProperty()};this.oDragItem.on("mouseover.draggableItemInit",this.mfInitOnMouseOver)}function DroppableItem(n,t,i,r,u,f){if(this.msID=n,this.moPI=$PI(this.msID),typeof u!="object"&&(u={}),this.moOptions=$.extend({},DroppableItem.DefaultOptions,u),this.moPI){this.oDropItem=$E(this.msID);var o=this.oDropItem,e=this;DragDropMgr.DroppableSubscribe(this.msID,this);Matrix3.RegisterForCleanup(n,"DroppableItem",function(){DragDropMgr.DroppableUnsubscribe(n);try{o&&o.hasClass("ui-droppable")&&o.droppable("destroy")}catch(t){}o=null;e._parentMouseoverHandler&&e._parentElement&&e._parentElement.unbind("mouseover",e._parentMouseoverHandler);e._parentMouseoverHandler=null;e._parentElement=null;e=null});this.mbIsReorder=!1;this.maGroups=t;this.mbIsDropAllowed=i;this.msMessage=r;this.msReorderMode=f;Utils.IsIE8()==!1?this._BindMouseMoveOnParent():this._SetDroppableProperty()}}function AutoSizeObserver(n){this.msID=n;this.msControlID=n}function BindableElementsMgr(){this.moElementsStore={}}function CleanupFunction(n){return n.IsCleanupFunction=!0,n}function BreadcrumbPositionMgr(){}function FramesMgr(){this.moFrames={}}function InlineUploaderMgr(){}function MultipleSelectionMgr(){this.moGroupToItems={};this.moItemIDToGroups={};this.moItems={};this.moLastElements={};this.moExtraGroupItems={};this.moGroupToLastSelectedItemID={};this.moGroupToStatedItemsEID={};this.moGroupToFullSelectedState={};this.moGroupsSelectionBarVisible={};this.moEnableIfSelectedFuncs={};this.moGroupToTypeToActions={};this.moVisibleIfSelected={};this.moEnableIfSelected={};this.moVisibleWhenSelectSome={};this.moVisibleWhenSelectAll={};this.moStatedItemsEIDToDynamicGroupID={};this.moFromItems={};this.moToItems={}}function SelectionItem(n,t,i,r,u,f,e,o){Utils.IsString(n)&&(this.msID=n,Utils.IsStringFilled(r)?r.toUpperCase()=="TRUE"||r=="1"?(this.SelectItem(),this.mbDeferSelect=!0):this.mbIsSelected=!1:this.mbIsSelected=$E(Utils.GetVFormId(this.GetID())).hasClass(SelectionItem.Const.CLASS_SELECTED));this.moSrcObj=e;this.mbForceCtrl=Utils.IsBoolean(t)?t:!1;this.mbKeepSelected=Utils.Trim(f)==""||f=="0"?!1:!0;u&&u!=""&&(this.mbDeactivateSelection=!0);var s=parseFloat(i);isNaN(s)&&(s=-1);(s||i==0)&&(this.miIndex=s);this.DebugTools_DisplayPosition();this.mbDisableShiftClick=Utils.ParseBool(o)?!0:!1;Matrix3.mbDebug||($PI(n).onselectstart=function(){return!1})}function clamp(n,t,i){return Math.min(Math.max(t,n),i)}function InitializeMediaResumableUpload(n,t,i,r,u,f,e,o,s,h,c,l,a,v){var y=new ResumableUpload(v),d,g,p,w,b,k;y.InitialSetup();e&&e!==""||(e=f,$('[id="'+f+':MinimizeBtn"]').hide());y.InstanceID=n;y.UploadTransactionID=t;y.HasPostUpload=c&&c.toLowerCase()==="true";y.FileTypes=i;y.ForcedSemiSync=u;y.UserID=r;y.RootVFormID=e;y.VFormID=f;y.WaitMessageForSessionComplete=l;y.MaxFileNumberToRegister=parseInt(h);y.UploadReportURL=v.UploadReportURL||"CS.aspx?VP3=UploadItemStatusReport&UTRID="+t;y.CompactDisplayThreshold=v.CompactDisplayThreshold||250;y.LargeSizeUploadMode=!1;y.CompactDisplayMode=!1;y.unreachableRetryInterval=v.unreachableRetryInterval||5e3;y.permanentErrors=v.permanentErrors||[405,406,409,410];y.maxChunkRetries=v.maxChunkRetries||3600;y.chunkRetryInterval=v.chunkRetryInterval||2e3;y.maxChunkRetryInterval=v.chunkRetryInterval||3e4;y.maximumCompliantChunkCount=v.maximumCompliantChunkCount||9e3;d=10485760;y.minimumCompliantChunkSize=v.minimumCompliantChunkSize||d;g=4294967296;y.maximumCompliantChunkSize=v.maximumCompliantChunkSize||g;isNaN(y.MaxFileNumberToRegister)&&(y.MaxFileNumberToRegister=512);y.MaxFilesCount=undefined;a&&a.toLowerCase()==="false"&&(y.MaxFilesCount=1);y.ForceShowMask=v.ForceShowMask;p=131072;y.BYTE_MASK_UNIT=p;
1w=parseInt(o);w=Math.max(p,Math.ceil(w/p)*p);y.RootVForm=$('div[id="'+y.RootVFormID+'"]');y.CustomHeaders={CortexReferrer:window.location.href};y.S3URLPrefix="S3URL=";y.S3UploadConfiguration={IsUploadingDirectlyToS3:v.IsUploadingDirectlyToS3===!0,URLsByChunk:{}};y.Resumable=new Resumable({uploadMethod:function(n){return y.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.opts.HasPresignedURLs?"PUT":"POST"},chunkSize:w,simultaneousUploads:parseInt(s),testChunks:!1,throttleProgressCallbacks:1,setChunkTypeFromFile:!0,withCredentials:!1,fileParameterName:"file",forceChunkSize:!0,fileType:y.FileTypes,method:function(n){return y.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.opts.HasPresignedURLs?"octet":"multipart"},target:function(n){if(y.S3UploadConfiguration.IsUploadingDirectlyToS3){var t=n.find(function(n){return n.startsWith(y.S3URLPrefix)});if(t&&y.S3UploadConfiguration.URLsByChunk[t])return y.S3UploadConfiguration.URLsByChunk[t]}return"API/CortexUploader_BO/v1.0/UploadFile"},query:function(n,t){return y.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.opts.HasPresignedURLs&&y.S3UploadConfiguration.URLsByChunk[y.S3URLPrefix+n.uniqueIdentifier+"."+t.offset]?{S3URL:n.uniqueIdentifier+"."+t.offset}:y.TranslateFileChunkToUploadApiFormData(n,t)},preprocess:function(n){return y.PreProcessUploadItemChunk(n)},maxFiles:y.MaxFilesCount,permanentErrors:y.permanentErrors,maxChunkRetries:y.maxChunkRetries,chunkRetryInterval:y.chunkRetryInterval,headers:function(n){if(y.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.opts.HasPresignedURLs){var t={};return n.opts.ServerSideEncryption&&n.opts.ServerSideEncryptionKeyId&&(t["x-amz-server-side-encryption"]=n.opts.ServerSideEncryption,t["x-amz-server-side-encryption-aws-kms-key-id"]=n.opts.ServerSideEncryptionKeyId),n.opts.BlobType&&(t["x-ms-blob-type"]=n.opts.BlobType),t}return y.CustomHeaders},maxFilesErrorCallback:function(){alert("Please upload no more than "+y.MaxFilesCount+" file"+(y.MaxFilesCount===1?"":"s")+" at a time.");y.ResetUploadItems()}});y.Resumable.support?y.RootVForm.find(".resumable-drop").show():y.RootVForm.find(".resumable-error").show();y.SetupGUI();y.SetupContainerForMinimizedUploads();y.SetupEvents();ResumableUpload.Instances[n]=y;y.LastUpdatedProgress=0;Matrix3.RegisterForCleanup(y.VFormID,"ResumableUpload",function(){(function(n){var t=ResumableUpload.Instances[n];t&&t.Cleanup();delete ResumableUpload.Instances[n];ResumableUpload.CheckAndHideUploadContainer()})(n)});y.UploadItemsByUniqueID={};v&&v.InlineUploaderID&&(b=InlineUploaderMgr.Instances[v.InlineUploaderID],b&&(k=b.GetFiles(),k&&k.length>0&&(y.Resumable.fire("startProgress"),y.Resumable.addFiles(b.GetFiles()))))}function StackMgr(){this.miIndex=StackMgr.Const.START_INDEX}function StringBuilder(n){this.strings=[""];this.append(n)}function StyleMgr(){this.mbIsActive=!0;this.moStyleCache={};this.moClassCache={};this._GetStyle=document.defaultView&&document.defaultView.getComputedStyle?function(n,t){var i=null,r;return t=="float"&&(t="cssFloat"),i=n.style[t],i||(r=document.defaultView.getComputedStyle(n,""),r&&(i=r[t])),i}:document.documentElement.currentStyle&&Utils.IsIE()?function(n,t){var i,r;switch(t){case"opacity":i=100;try{i=n.filters["DXImageTransform.Microsoft.Alpha"].opacity}catch(u){try{i=n.filters("alpha").opacity}catch(u){}}return i/100;case"float":t="styleFloat";default:return r=n.currentStyle?n.currentStyle[t]:null,n.style[t]||r}}:function(n,t){return n.style[t]};this._SetStyle=Utils.IsIE()?function(n,t,i){switch(t){case"opacity":Utils.IsString(n.style.filter)&&(n.style.filter="alpha(opacity="+i*100+")",n.currentStyle&&n.currentStyle.hasLayout||(n.style.zoom=1));break;case"float":t="styleFloat";default:n.style[t]=i==""?"":i}}:function(n,t,i){t=="float"&&(t="cssFloat");n.style[t]=i==""?"":i}}function TemplatesMgr(){}function UIComponentLoader(){}function WaitingPopupMgr(){this.moItems={};this.moConfigItems={};this.mbDebug=!1;this.moPopup=null;this.msActiveID=null;this.miShowPopupTimer=0;this.mbWaitingShown=!1;this.mbTeardownPending=!1;this.miTeardownFallbackTimer=0}function ClearAction(){}function CloseWindowAction(){}function CollapsePanelAction(){}function ExecuteScriptAction(){}function ParamValueUpdateAction(){}function RefreshMgrAction(){}function BlurAdvEvent(){}function BlurEvent(){}function ChangeEvent(){}function ClickDeferredMgr(){this.moClickDeferreds={}}function ClickDeferredEvent(){}function ClickEvent(){}function ClickOutEvent(){}function DragFilesInBrowserEvent(){}function FocusEvent(){}function ControlKeyboardEvent(){}function MouseDownEvent(){}function OrientationChangeEvent(){}function OutEvent(){}function OverEvent(){}function ScrollDownEvent(){}function ScrollUpEvent(){}function ShortcutEvent(){}function ShowEvent(){}function SwipeEvent(){}function WindowExitEvent(){}function WindowResizeEvent(){}function AutoCompContainer(n,t,i,r,u,f){if(typeof n=="string"&&n!="")this.msControlID=n;else throw"AutoCompContainer Error : Try to init an autocomp container with a control id null or empty.";this.msContainerID=this.msControlID+AutoCompContainer.Const.ID_SUFFIX;
1this.moControl=$E(this.msControlID);this.moRootNode=null;this.moContainer=null;this.moAnchorControl=$(i);(this.moAnchorControl.length<=0||this.moControl.is("textarea"))&&(this.moAnchorControl=this.moControl);this.moAdvancedActionPanel=$(r);this.moAdvancedActionPanel.length>0&&(this.moAdvancedActionPanel[0].ActivePositionGroup&&this.moAdvancedActionPanel[0].ActivePositionGroup(PositionGroupProperties.Const.POSITION_GROUP_POPUP),this.moAdvancedActionPanel[0].mbAbsolutePos=!0);this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.ADVANED_ACTION_PANEL_CLASS);this.mbIsDisplayed=!1;this.miMinWidth="auto";this.miMaxWidth="auto";this.miForceWidth="auto";this.msSpecificClass=this._GenerateContainerClass(t);this.mbLastDisplayIsOver=!1;this.mbUseChildQuery=!1;this.mbMatchWidthToParent=u;this.mbPinActionPnlToBottom=f;this._Create()}function AutoCompInvokedWithChar(n){this.moAutoComp=n;this.moOptions=this.moAutoComp.moOptions;this._Init()}function AutoCompletionProperties(n){if(typeof n=="string"&&n!="")this.msID=n;else throw"AutoCompletionProperties Error : Try to init an autocompletion property with a control id null or empty.";this.mbIsEnabled=!1;this.moAutoComp=$E(this.msID);this.moAutoComp.autocomplete("instance")&&this.moAutoComp.autocomplete("destroy");this.moFieldValue=null;this.moContainer=null;this.moEvents={};this.moMatrixCtrl=null;this.moBaseDefaultOptions={sIDFieldValue:null,bForceSelection:!0,bMatchContainerWidthToParent:!1,bGroupDescription:!1,iMaxResults:300,iMinLength:2,iQueryDelay:300,iQueryTimeout:6e4,sNoItemMessage:null,sNoChildItemMessage:null,bAutoFocus:!1,bDropDown:!1,bSuggestEmpty:!1,sEmptyRowText:null,bAllowCreation:!1,bAllowCreationOnEmptyText:!0,sContainerClass:"AutoComp",bPreSelectFirstValue:!1,bHideLoaderImage:!1,bHideColumnTitle:!1,bRequestAllOnClick:!1,bRequestAllOnHover:!1,bRequestAllOnCreation:!1,bSelectAllOnClick:!1,bEnableHTML:!1,iMinWidth:null,iMaxWidth:null,iForceWidth:null,oStaticSource:null,bStaticSourceEmpty:!1,bSmartSearchOrder:!1,bKeepStaticSource:!1,sQueryFile:null,sQueryFilterFile:null,sParamTablePath:null,sParamTablePathFilters:null,sQuerySearchField:"",sQueryTextboxFields:"",sQueryAdditionals:"",sQueryProperties:"",sQueryViewState:"",sEventTrackingCode:"",sPageTrackingCode:"",bAllowMultiEntry:!1,sMultiEntrySeparator:" ",bAllowMultiEntryDuplicate:!1,sChildQueryFile:null,sChildQueryFilterFile:null,sOption:null,bAddDetails:!1,bEnlargeTextarea:!0,iMaxHeightTextarea:150,cInvokeWithChar:null,bAutoWidth:!1,bForceAutoWidthImmediately:!1,iAutoWidthPadding:0,sSQLPlaceholder1:null,sSQLPlaceholder2:null,bCloseIfControlNotVisible:!1,bPinActionPnlToBottom:!1,sOrderBy:null,sColStyleClasses:null,bEnableStructuralElement:!0,bAutoCompLabelVerticalAlignCenter:!1,sCustomIconImageElementID:null,bCxRichText:!1};this.mbIsStaticSource=!1;this.mbFirstLineIsAnEmptyLine=!1;this.moStaticSourceKeys=[];this.moStaticSourceKeysRecommended=[];this.moStaticSourceTitles=[];this.moStaticSourceSearchData=[];this.moStaticSourceDescriptions=[];this.moStaticSourceGroups=[];this.moStaticSourceColumnsHeaders=[];this.moStaticSourceColumnsSizes=[];this.mbShowHeader=!1;this.moStaticSource=null;this.moStaticSourceColors=null;this.moStaticSourceIcons=null;this.moStaticColorCode=null;this.moStaticFontIcons=null;this.moStaticCustomIcons=null;this.msCustomIconImageElementID=null;this.miNumberRealItems=0;this.miLineCounter=0;this.moLastLiFocused=null;this.mbItemSelected=!1;this.mbOpenedByKeyboard=!1;this.miKeyboardOpenTimeout=null;this.msLatestItemLabel="";this.msLatestItemValue="";this.msOriginalItemLabel="";this.msOriginalItemValue="";this.mbComplexAutoComp=!1;this.moComplexAutoComp=null;this.mbAutoCompTextarea=!1;this.moAutoCompTextarea=null;this.mbAutoCompMultiEntry=!1;this.moAutoCompMultiEntry=null;this.mbAutoCompInvokedWithChar=!1;this.moAutoCompInvokedWithChar=null;this.miContainerWidthTotal;this.miNbColumns=1;this.mbLastSearchNoResult=!1;this.msLastSearch="";this.miScrollTop=0;this.moCache={};this.moLastXhr;this.mbHasDebugQuery=!1;this.moLoader=null;this.moDropDownBtn=null;this.mbUseChildQuery=!1;this.mbUseParentQuery=!1;this.mbUIValueFilled=!1;this.mbCreateNewEntry=!1;this.moKeySelectorsToContinueEvents=[];this.mbFirstShow=!0}function AutoCompMultiEntry(n){this.moAutoComp=n;this.moOptions=this.moAutoComp.moOptions;this.moMultiEntrySeparatorsToConvert=[];this._Init()}function AutoCompTextarea(n){this.moAutoComp=n;this.moOptions=this.moAutoComp.moOptions;this.miLineWidth=0;this.miCharWidth=0;this.miMinHeight=20;this.miMaxRows=8;this.miCurrentRows=1;this._Init()}function ComplexAutoCompProperties(n){this.moAutoComp=n;this.msLastSearch="";this.masSearchLevel=[];this.masSearchLevelParent=[];this.miScrollTop=0;this.maiLastScrollTopLevel=[];this.maiLastScrollTopLevelParent=[];this.masColWidth;this.miScrollBarWidth=AutoCompletionProperties.Const.SCROLLBAR_WIDTH;this.miDefaultColumnWidth=AutoCompletionProperties.Const.DEFAULT_COLUMN_WIDTH;this.miTotalWidth;this.msVFormID;this.msOptionEventName;this.msOptionEventType;this.msOptionEventDelay;this.msOptionEventArgs;this.mbHasNextAndPreviousButtons=!1;this.mbAtRoot=!0}function AdvancedVisibilityMgr(){this.moControlsIDs=new FastArray;this.moPendingControlIDs=[]}function AttachZoomForImage(n,t,i){bMyZoomDarkMode=t;HandleAttachZoom(n+"_img",i)}function AttachZoomForLabel(n,t){bMyZoomDarkMode=t;HandleAttachZoom(n)}function HandleAttachZoom(n,t){var i,r;IsInEditMode(n)||(i=document.getElementById(n),i&&(r=function(){i&&i.tagName&&i.tagName.toLowerCase()==="img"?HandleAyncAttachZoom(i,t):($E(n).find("img").each(function(n,i){HandleAyncAttachZoom(i,t)}),$E(n).find("video").each(function(n,i){HandleAyncAttachZoom(i,t)}))},r(),AttachZoomMgr.AttachedElements[n]=i,AttachZoomMgr.AttachedCallbacks[n]=r,Matrix3.RegisterForCleanup(n,"HandleAttachZoom",function(){delete AttachZoomMgr.AttachedElements[n];delete AttachZoomMgr.AttachedCallbacks[n]})))}function HandleAyncAttachZoom(n,t){n.complete?AttachZoom(n,t):n.nodeName.toUpperCase()==="IMG"?n.addEventListener("load",function(){AttachZoom(n,t)}):n.addEventListener("loadedmetadata",function(){AttachZoom(n,t)})}function AttachZoom(n,t){var r,u,i;if(SetImageResponsive(n),r=parseInt(n.height),u=parseInt(n.width),n.nodeName.toUpperCase()==="IMG"){if(i=n.closest("a"),i&&i.getAttribute("href"))return;
1(t||r<n.naturalHeight||u<n.naturalWidth)&&getMediumZoom().attach(n)}}function getMediumZoom(){return typeof myZoomVariable=="undefined"&&(window.myZoomVariable=mediumZoom({margin:10,background:"rgb(255, 255, 255, 0.5)"})),bMyZoomDarkMode&&window.myZoomVariable.update({background:"rgb(0, 0, 0, 0.5)"}),window.myZoomVariable}function isTiptapImage(n){var t=document.querySelectorAll(".tiptap");return t.length>0&&Array.prototype.slice.call(t).some(function(t){return t.contains(n)})}function SetImageResponsive(n){var u=$(n).parent(),e,t;if(!u.hasClass("Image")||!(u.attr("data-r").indexOf(AutoScaleProperties.Const.PROPERTY_POLICY)>=0)){var i=n.width,o=n.height/i,s=n.naturalWidth,r=GetParentWidth(n),f=!1;r===0&&(n.removeAttribute("height"),n.removeAttribute("width"),n.style.maxWidth="100%",r=n.width,n.style.maxWidth=null,f=!0);e=isTiptapImage(n)&&n.style.clipPath&&n.style.clipPath!=="none";t=i>0?Math.min(i,r):Math.min(s,r);!e&&t!==0&&(t!=i||f)&&(n.style.width=t+"px",n.style.height=t*o+"px")}}function GetParentWidth(n){for(var t=n.parentElement;t!=null&&t.nodeName.toUpperCase()==="SPAN";)t=t.parentElement;return t?(t.tagName.toLowerCase()==="figure"&&(t=t.parentElement),t.clientWidth):0}function IsInEditMode(n){var i=document.getElementById(n),t;return i&&(t=i.className,t&&t.indexOf("CMS4Editable")>-1)?!0:!1}function AutoExpandHeight(){}function AutoScaleProperties(){}function AutoScroll(n,t){var u,r,i;this.msID=n;this.mdOffset=0;this.mdSpeed=t;Utils.IsIE8()==!1&&(u=$Elt(n),r=u.GetContainerForChildren(),r&&r.length>0&&(this.moTarget=r[0],this.mdLastTime=(new Date).getTime(),i=this,this.miTimer=setInterval(function(){var n=(new Date).getTime();i.mdOffset-=(n-i.mdLastTime)*i.mdSpeed/1e3;i.mdLastTime=n;i.moTarget.style.webkitTransform="translate("+Math.round(i.mdOffset)+"px, 0)";i.moTarget.style.MozTransform="translate("+Math.round(i.mdOffset)+"px, 0)"},20)))}function ClassProperties(){}function ClearCacheProperties(){}function ClipboardProperties(){}function CommandProperties(){}function M5ServerContextMenuHandler(n,t){var i={pos:{x:n.pageX,y:n.pageY}};return Matrix3.AddEvent(t,"SERVER_CTM",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(i)),n.stopPropagation(),!1}function CustomScrollbarProperties(){}function DeactivateBackProperties(){}function DefaultActionProperties(){}function DeferInject(){}function DOMEventProperties(){}function DragProperties(){}function DropProperties(){}function DynamicChildrenVisibilityMgr(){this.moPanels=new FastArray}function DynamicChildrenVisibilityProperties(){}function EditableTable(){}function EffectProperties(){}function ExecutionContext(n,t,i,r,u,f,e,o,s){this.msBaseUri=n;this.msVformID=t;this.msPopUpID=i;this.msEventTrackingSummary=r;this.msEventOpenPopUp=u;this.msIsInDarkMode=f;this.msUserDateFormat=e;this.msAdditionalConfigutation=o;this.configurationData=$.extend({},s,{darkMode:Utils.ParseBool(this.msIsInDarkMode),popupId:this.msPopUpID,dateFormat:this.msUserDateFormat,additionalData:JSON.parse(this.msAdditionalConfigutation)});this._subscribe(Utils.GetSignalName(this.msVformID,Matrix3.Const.SIGNAL_NODE_REMOVED),this._cleanUp.bind(this),!0)}function FileNameOnDropProperties(){}function FixedPos(){}function FixedProperties(){}function FocusProperties(){}function FoldProperties(){this.msMode;this.msTitleOpen="";this.msTitleClosed="";this.miMinCloseSize=0;this.msBtnSkinFold=null;this.msBtnSkinUnfold=null}function FreeHtmlContainer(){}function GlobalDataProviderProperties(){}function HyperlinkProperties(){}function InPlaceEditorProperties(){}function LoadingAjaxMgr(){this.aoLoadings=[]}function LoadingAjaxProperties(){}function LoadingPostBackMgr(){this.aoLoadings={}}function LoadingPostBackProperties(){}function LoadingProperties(){}function MatrixEventProperties(){}function MenuProperties(){}function MenuGroupMgr(){this.moMenuGroups={};var n=this;$(document).on("click touchend",function(t){n.RecalculateMenu(t)})}function MountMgr(){this.maoFunctions=[];this.MountChange=new CtrlEvent(this);this.mbIsMountActive=!1}function MountProperties(){}function MultipleSourcesProperties(){}function PositionGroupProperties(){}function ProcessLinkAnchorsForLabel(n){var t=$('a[href^="#"]',$('div[id="'+n+'"]'));t.length>0&&t.each(function(n,t){var r=$(t),i=r.attr("href");i=i.substr(1,i.length-1);r.click(function(){var n=document.getElementById(i);typeof n!="undefined"&&n&&document.getElementById(i).scrollIntoView()});r.removeAttr("href");r.removeAttr("target")})}function RelativeProperties(){}function ReorderProperties(){}function RequiredProperties(){}function ResizableProperties(){}function ResizeProperties(){}function RulerProperties(){}function ScrollProperties(){}function ScrollbarMgr(){var t,n,i;this.moScrollbars=new FastArray;Utils.DebugFormPresent()&&(t=$(ControlMgr.FindRootControl()).find(">.ScrollablePanel")[0],n=Utils.Form1(),t&&n&&(i=function(){t.isConnected&&Utils.DebugFormPresent()||(this.mbShouldScrollBodyToBottomOnPosReload=!1,n.removeEventListener("scroll",i));this.mbShouldScrollBodyToBottomOnPosReload=t.GetScrollDistanceToBottom()<=1&&n.GetScrollDistanceToTop()>1}.bind(this),n.addEventListener("scroll",i)))}function ScrollTargetProperties(n){this.msTarget=n.GetProperty(ScrollTargetProperties.Const.PROPERTY_TARGET);this.msDirection=n.GetProperty(ScrollTargetProperties.Const.PROPERTY_DIRECTION,ScrollTargetProperties.Const.DIRECTION_DOWN);this.msStep=n.GetProperty(ScrollTargetProperties.Const.PROPERTY_SCROLL_STEP,"64");this.moCtrl=n;ScrollTargetMgr.Register(this);var t=this;Utils.AddEvent(this.moCtrl,"mousedown",function(){ScrollTargetMgr.IsBusy(t.msTarget)||t.MouseDownHandler()},this)}function ScrollTargetMgr(){this.moTargetsArray;this.moTargetsProcessing={}}function SelectAllProperties(){}function SelectionProperties(){}function SequenceLoadingProperties(n){var i,t,r;this.msID=n.GetVFormId();
1this.moControl=n;this.iLowestAskedIndex=Number.MAX_VALUE;this.iHightestAskedIndex=Number.MIN_VALUE;this.miPrepositioningOffset=null;this.miSelectedTemplateIndex=null;this.moScrollTween=null;this.moCoveringItemTween=null;this.moTLMaskTween=null;this.moBRMaskTween=null;this.miListOffset=0;SequenceLoadingMgr.GetInstance().Register(this.msID,this);Matrix3.RegisterInCache(this.msID,SequenceLoadingMgr);i=n.GetProperty(ConstProperties.Const.PROPERTY_VALUE_HORIZONTAL,ConstProperties.Const.PROPERTY_VALUE_HORIZONTAL)==ConstProperties.Const.PROPERTY_VALUE_HORIZONTAL;this.mbIsHorizontal=i&&n.GetOriginalWidth()==-1||!i&&n.miHeight!=-1;this.mbCoverEnabled=n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_COVER_EFFECT);this.mbShowMask=n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_SHOW_MASK);this.moControl.tabIndex=0;Utils.AddEvent(this.moControl,"keydown",this.KeyDownHandler,this);Utils.AddEvent(this.moControl,"touchstart",this.TouchStart,this);Utils.AddEvent(this.moControl,"touchmove",this.TouchMove,this);Utils.AddEvent(this.moControl,"touchend",this.TouchEnd,this);this.mbShowMask&&(this.moTopLeftMask=document.createElement("div"),$AddClass(this.moTopLeftMask,"ABS"),$SetStyle(this.moTopLeftMask,"left","0px"),$SetStyle(this.moTopLeftMask,"top","0px"),$SetStyle(this.moTopLeftMask,"width","100px"),$SetStyle(this.moTopLeftMask,"height","100px"),t=n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_MASK_SKIN),t&&t!=""&&$AddClass(this.moTopLeftMask,t),r=document.createElement("div"),$AddClass(r,"BG"),this.moTopLeftMask.appendChild(r),this.moBotRightMask=this.moTopLeftMask.cloneNode(!0),n.moParent.GetNode().appendChild(this.moTopLeftMask),n.moParent.GetNode().appendChild(this.moBotRightMask),Utils.AddEvent(this.moTopLeftMask,"click",this.PrevClickHandler,this),Utils.AddEvent(this.moBotRightMask,"click",this.NextClickHandler,this));this.mdAutoScrollSpeed=n.GetProperty("AutoscrollSpeed");this.moAutoScroll=null;this.mbAutoPlay=n.GetProperty(SlideshowCtrl.Const.PROPERTY_AUTO_PLAY,!1);this.miAutoPlayDelay=n.GetProperty(SlideshowCtrl.Const.PROPERTY_DELAY,4e3);this.moAutoPlay=null}function SequenceLoadingMgr(){this.moTable={};this.moPrevBtnTable={};this.moNextBtnTable={};this.moLabelTable={};this.miPreloadProgrammed=0}function SlideShowProperties(){}function TempSourceProperties(){}function TooltipProperties(n,t,i,r,u){this.moControl=n;this.msTooltipID=t;this.miHideDelay=r;this.miShowDelay=i;this.msTooltipPosition=u;this.msOriginalTooltipID=t;this.mbTooltipInitialized=!1;this.mbOverControl=!1;this.mbOverTooltip=!1;this.mbTooltipAsked=!1;this.mbTooltipShown=!1;this.mbTooltipShared=n.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_SHARED,!1);this.oLastEvt=null;Utils.AddEvent(this.moControl,"mouseover",this.OverControl,this);Utils.AddEvent(this.moControl,"mouseout",this.OutControl,this);this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&Utils.AddEvent(this.moControl,"mousemove",this.MouseMoveHandler,this);TooltipMgr.moTable[n.GetId()]=this;Matrix3.RegisterInCache(n.GetId(),TooltipMgr)}function TooltipMgr(){this.moTable={}}function UserDropImagesProperties(n,t){this.msControlId=n;this.moDefaultOptions={separator:"|",box_title:"Search by files name",box_message:"Drop images here",drop_event_vformid:"",drop_event_name:"",drop_event_returntype:"",drop_event_delay:"",drop_event_arguments:"",ctrl_type:PositionItem.constructor.CONTROL_TYPE_TEXTBOX};this.moOptions={};this.moRootNode;this.moDropZone;this.ActiveUserDropImages(t);this.moMask;this.miOffsetLeft=0;this.miOffsetTop=0}function VisibilityObserverMgr(){this.moVisibilityObservers=new FastArray}function ZoomProperties(){}function AudioCtrl(n){this.msID=n}function AudioPlayer(n,t,i,r,u,f,e,o,s,h,c,l,a,v){this.mbReady=!1;this.mbDirty=!1;this.msElementID=n;this.msVFormID=t;this.mfDuration=i;this.mbPlayOnLoad=!1;this.mfPlayAtOnLoad=v>=0?u>=0&&v>u?u:v>i?i:r>=0&&v<r?r:v:undefined;this.mbIsMiniMode=f;this.mfStartTime=r>0?r.toFixed(4):0;u>0&&(this.mfEndTime=u.toFixed(4));this.msDownloadButtonColor=e;this.mbAutoPlayNext=o;this.mbForcePlay=s;this.mbLoop=a;this.msPopupId=h;this.msPlayingId=c;this.moPlaylist=l;this.RegisterWithWatcher(t)}function AutoCompletionCtrl(n){this.msID=n;this.msControlID=n}function ButtonCtrl(n){this.msID=n;this.msControlID=n}function ChartCtrl(n){this.msID=n}function ChartV2Ctrl(n){this.msID=n}function CheckBoxCtrl(n){this.msID=n;this.msControlID=n}function CropCtrl(n){this.msID=n;this.mbFirstLoad=!0;this.msVFormID=n.split(Matrix3.Const.SEPARATOR_CONTROL)[0]}function DataTableCtrl(n){this.msID=n}function DateCtrl(n){this.msID=n;this.mbInputValueChanged=!1;this.moDefaultOptions={defaultValue:"",serverFormat:Param.DateClientFormat,clientFormat:Param.DateServerFormat,defaultPeriod:0,interval:!1,defaultValueTo:"",time:!1,oneField:!1,nbMonthDisplayed:1,showWeek:!1,selectorMonth:!1,selectorYear:!1,language:"English",timeIsRequired:!1,firstDayOfWeek:0,dateAdvance:!1,allowIncompleteDate:!1,serverTimezoneOffset:(new Date).getTimezoneOffset(),showInvalidDateWarning:!1,showTimezoneSelector:!1};this.moOptions={};this.masServerFormatOrder;this.masServerFormatOrderHash;this.moFieldClient;this.moFieldClientTo;this.moEvents={};this.mbMonthFromEmpty=!1;this.mbYearFromEmpty=!1;this.mbMonthToEmpty=!1;this.mbYearToEmpty=!1;this.mbDateFromIncomplete=!1;this.mbDateToIncomplete=!1;this.mbUserHasInputDateFrom=!1;this.mbUserHasInputDateTo=!1;this.mbDateFromTypedInOnce=!1;this.mbDateToTypedInOnce=!1;this.mbStartDateAndEndDateValid=!0;this.mbCannotConvertToUserTimezone=!1;this.mbIsSetting=!1;this.moLastValidValue=null}function DropDownListCtrl(n){this.msID=n;this.msControlID=n}function FlashCtrl(n){this.msID=n}function HiddenCtrl(n){this.msID=n;this.msControlID=n}function HyperlinkCtrl(n){this.msID=n}function ImageCtrl(n){this.msID=n;this.msControlID=n;this.moOverlays={};this._setupOverlayRendering()}function LabelCtrl(n){this.msID=n;this.msControlID=n}function MapCtrl(n){this.msID=n}function MapMarkerCtrl(n){this.msID=n}function MeetingFlashQR(n){this.msID=n}function MenuMgr(){this.msLastID=null}function MenuCtrl(n){this.msID=n}
1function PanelAdvancedCtrl(n){this.msID=n;this.msControlID=n}function PanelCtrl(n){this.msID=n;this.msControlID=n}function PanelColCtrl(n){this.msID=n}function PanelPopupCtrl(){}function PanelTableCtrl(n){this.msID=n}function ParameterBoolCtrl(n){this.msID=n}function ParameterEnumCtrl(n){this.msID=n}function ParameterStrCtrl(n){this.msID=n}function ParameterNumCtrl(n){this.msID=n}function ParamControl(n){if(n){this.moControl=n;this.mbIsTextarea=typeof this.moControl.moTextarea!="undefined";var t=this;this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea==!0?(this.msInitialValue=this.moControl.moTextarea.value,Utils.AddEvent(this.moControl.moTextarea,"cut",this.delayedResize,this),Utils.AddEvent(this.moControl.moTextarea,"paste",this.delayedResize,this),Utils.AddEvent(this.moControl.moTextarea,"drop",this.delayedResize,this),Utils.AddEvent(this.moControl.moTextarea,"keydown",this.keydownControl,this),$(this.moControl).hasClass("Parameter_NotEditable")&&$(this.moControl.moTextarea).click(function(n){n.preventDefault();t.DetailsHandler()})):this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea==!1&&this.moControl.moInput?(this.msInitialValue=this.moControl.moInput.value,Utils.AddEvent(this.moControl.moInput,"cut",this.delayedResize,this),Utils.AddEvent(this.moControl.moInput,"paste",this.delayedResize,this),Utils.AddEvent(this.moControl.moInput,"drop",this.delayedResize,this),Utils.AddEvent(this.moControl.moInput,"keydown",this.keydownControl,this),$(this.moControl).hasClass("Parameter_NotEditable")&&$(this.moControl.moInput).click(function(n){n.preventDefault();t.DetailsHandler()})):this.moControl.msCtrlType=="ParameterEnum"?(this.msInitialValue=$(this.moControl).find("input[name$=_Value]")[0].value,this.msInitialDisplayValue=$(this.moControl).find("input[name='"+this.moControl.msId+"']")[0].value,$E(this.moControl.msId).bind("autocomp_select",function(){t.ChangeHandler()})):this.moControl.msCtrlType=="ParameterBool"&&(this.msInitialValue=$(this.moControl).find("input")[0].checked,$(this.moControl).find("input").click(function(){t.ChangeHandler()}));$(this.moControl).find(".Details, .Head, .Comment").click(function(n){n.preventDefault();t.DetailsHandler()});$(this.moControl).find(".Resolve").click(function(n){n.preventDefault();t.ResolveHandler()});$(this.moControl).find(".Reset").click(function(n){n.preventDefault();t.ResetHandler()});$(this.moControl).find(".HelpBtn").click(function(n){var t=$(this).attr("data-url");Matrix3.moCMS&&Matrix3.moCMS.OpenHelpPopup(t);n.preventDefault()});ParamMgr.moTable[n.GetId()]=this;Matrix3.RegisterInCache(n.GetId(),ParamMgr)}}function ParamMgr(){this.moTable={};this.moSaveBtns={};this.moCancelbtns={};this.moClosePopupSaveParamBtns={};this.mbHasUnsavedChanges=!1;this.maUnsavedParameterControlIds={}}function Popup(n,t){this.msID=n.id;this.moGlobalContainer=null;this.moJGlobalContainer=null;this.moNode=n;this.moNodePI=null;this.moJNode=null;this.moPaddingBottomDiv=null;this.msSkinFamilyAlias=t;this.moHeader=null;this.moCloseButton=null;this.moMask=null;this.mbIsForceCenteringEnabled=!1;this.mbPendingReveal=!1;this.miLastMeasuredHeight=-1;this.miRevealDeadline=0;this.moRevealTimeout=null;this.mbMaskHandoverDeferred=!1;this.mbMaskTransparentPendingReveal=!1;this.mbIsPopupShifting=!1;this.msPopupPosition=Popup.Const.POSITION_CENTER;this.moPopupAbsolutePosition=null;this.mbSaveLastPosition=null;this.mbSaveLastPositionUseLongID=!1;this.mbPreventPushingIntoViewport=!1;this.msReferenceVFormID=null;this.mbPreventCloseOnClickOutside=!1;this.mbCloseOnLeave=!1;this.mbHideMask=!1;this.mbHideCloseButton=!1;this.mbModeless=!1;this.moPopupLayer=null;this.mbPreventESC=!1;this.mbIsContextMenu=!1;this.mbPreventClosingParentContextMenu=!1;this.mbIgnoreFocusTrap=!1;this.miOriginalPageContentHeight=null;this.mbPopupFullscreenSmallViewport=!1;this.mbPopupFullscreenAllViewport=!1;this.mbRestoreFocusOnClose=!0;this.moLastActiveElement=null;this._init()}function RadioButtonListCtrl(n){this.msID=n;this.msControlID=n}function RatingCtrl(n){this.msID=n;this.msControlID=n;this.moEvents={}}
1function SlideshowCtrl(n){this.msID=n;this.moPosItem;this.maImages;this.maAnimations;this.miCurrentIndex=-1;this.mbPlaying=!0;this.miIntervalId}function SlideshowMgr(){this.moRegisteredControls={}}function TextAreaCtrl(n){this.msID=n;this.msControlID=n;this.mbTextArea=!0}function TextBoxCtrl(n){this.msID=n;this.msControlID=n}function TextBoxPasswordCtrl(n){this.msID=n;this.msControlID=n}function TimeCtrl(n){this.msID=n}function UploadCtrl(n){this.msID=n;this.Event_UploadCompleted=new CtrlEvent;this.Event_UploadStarted=new CtrlEvent}function UploadFieldCtrl(n){this.msID=n}function VideoCtrl(n){this.msID=n}function GetHtml5Player(n,t){var r=n,i,u;return t&&t.length>0&&(r=r+"_"+t),i=$('[data-media-id="VideoCtrl_'+r+'"],[data-media-id="AudioCtrl_'+r+'"]'),i&&i.length!==0||(i=$(".VideoCtrl_"+n+", .AudioCtrl_"+n)),u=undefined,i.length>0&&(u=i.find("audio, video").get(0)),u}function WebComponentCtrl(n){this.msID=n;this.msControlID=n;this.moPreservedProperties=[]}function CMS(){this.moCurrentMode=null;this.moEditToolbar=null;this.moParameterEdit=null;this.msDebugJSVFormID=null;this.moNotEditable=!1;this.moRenderedVFormVUCs=new Set;this.moVUCAbsolutePositions=[]}function CMSMode(){this.moCMS;this.mbCanvasMode=!1;this.moCanvas=null;this.moKineticStage=null;this.moKineticMainLayer=null;this.moElts={};this.moEltsPI={};this.moEltsParams={};this.moEltsTreeLinks={};this.moEltsHTMLDocPosition={};this.moPyramid=null;this.miScrollTop=0;this.moEltsIDNoInteractive=[];this.moListEltsIDHovered=[];this.msLastEltIDHovered;this.moListEltsIDSelected=[];this.moListEventsUnbinded=[];this.moDependencies={};this.moAnchors={};this.mbDragging=!1;this.miDragMode}function CMSModeMaintenance(){CMSMode.call(this)}function VUCButtons(){this.isEnable=!1;this.moRenderedVFormVUCs=new Set;this.moVUCAbsolutePositions=[]}var Param={ImageAnnotatorVersion:"Marker",PointMarkerKeepShowingSeconds:"2",VideoAnnotatorVersion:"V2",IconForItemTooltip:"fa fa-info-circle",ItemTooltipOrientation:"s",ShowAllResultsForStaticSource:"true",StructuralElementKeyType:"Structural Element",CSPEnabled:"true",DateClientFormat:"MM/DD/YYYY",DateServerFormat:"MM/DD/YYYY",FormatYearShortcutActivated:"true",DropAnimationDuration:"800",DropAnimationSize:"100",DropAnimationText:"Dropped",ACCellCompensationWidth:"6",DelayTimeBeforeShowingWaitingPopup:"0",DropdownAutoCompStyle:!0,FixBGScrollablePnl:"",MaxErrorLog:"5",MaxWarningLog:"5",SelectAllWhenBatchLoadingMessage:"Your assets are loading... Please try selecting all again in a few seconds",EnableInhibitPositioning:!1,TemplateWaitingPP:'<div id="WaitingPopup" style="position: absolute; width: 100%; height: 100%; top: 0; z-index: 999999; cursor: wait;"> <div class="PopupC A3PopupC A3 SFA" style="position: absolute; margin: auto; top: 0; bottom: 0; left: 0; right: 0; width: [WIDTH]px; height: [HEIGHT]px;"> <table style="border-collapse:collapse;width:[WIDTH]px"> <tbody> <tr> <td class="PopupInnerPnlC"> <div class="PopupHeaderPnl"> <div class="PopupHeaderC"> <div class="PopupTitleC">[TITLE]<\/div> <\/div> <\/div> <div class="DefaultPopupClass"> <div class="VF A3 PopupContentClass" style="display: table-cell; width: [WIDTH]px; text-align: center;"> <div class="CT Label"> <div class="Lbl"><i class="fa fa-spinner fa-spin fa-3x fa-fw" style="font-size: 1.5em"><\/i> [MESSAGE]<\/div> <\/div> <\/div> <\/div> <\/td> <\/tr> <\/tbody> <\/table> <\/div><\/div>',TemplateWaitingPPContextMenu:'<div id="WaitingPopup" style="position: absolute; width: 100%; height: 100%; top: 0; z-index: 999999; pointer-events: none;"> <div class="PopupC A3PopupC A3 SFA" style="position: absolute; top: [POS_TOP]px; left: [POS_LEFT]px; width: [WIDTH]px; height: [HEIGHT]px; pointer-events: auto;"> <table style="border-collapse:collapse;width:[WIDTH]px"> <tbody> <tr> <td class="PopupInnerPnlC"> <div class="DefaultPopupClass"> <div class="VF A3 PopupContentClass" style="display: table-cell; width: [WIDTH]px; vertical-align: middle; text-align: center;"> <div class="CT Label" style="padding-top: 30px;"> <div class="Lbl"><i class="fa fa-spinner fa-spin fa-3x fa-fw" style="font-size: 1.5em"><\/i> [MESSAGE]<\/div> <\/div> <\/div> <\/div> <\/td> <\/tr> <\/tbody> <\/table> <\/div><\/div>',TipsyDefaultFadeEffect:"true",TipsyDefaultHideDelay:"0",TipsyDefaultOpacity:"1",TipsyDefaultOrientation:"s",TipsyDefaultShowDelay:"300",TipsyDefaultUseHTML:"true",VideoControlPauseButtonTooltip:"Pause the video",VideoControlPlayButtonTooltip:"Play the video at this position",VideoControlReplayButtonTooltip:"Play the video segment corresponding to this caption paragraph",ClientNameShort:"BOE",WebInstrumentationEnvironment:"Production",WebInstrumentationExporterEndpointForce:"",WebInstrumentationFinalizeDelayMs:"500",WebInstrumentationFinalizeHardCapsMs:"30000",WebInstrumentationFinalizeSPAMs:"500",WebInstrumentationHealthCheckTimeoutMs:"500",WebInstrumentationIsEnabled:"true",WebInstrumentationMaxExportFailures:"10",WebInstrumentationMetricsBucketBoundariesSeconds:"0.05,0.1,0.25,0.5,0.75,1,1.5,2,2.5,3,4,5,8,13,21,34",WebInstrumentationMetricsExportIntervalMs:"60000",WebInstrumentationMetricsIsEnabled:"true",WebInstrumentationMetricsTemporality:"delta",WebInstrumentationMinDurationMs:"1",WebInstrumentationPageTypeMap:"spaces=VPage: CMS5;asset-management=VPage: DamView",WebInstrumentationRootSpan:"Page Load Complete",WebInstrumentationSpaResourceBufferMs:"5000",WebInstrumentationSpaSpan:"SPA Navigation",WebInstrumentationTimeoutMs:"5000",WebInstrumentationTracePropagationCorsUrls:"",WebInstrumentationTracePropagationIsEnabled:"false",AppBuildDate:"MjAyNi0wOC0yNyAwNTozMTo1MS4wMDA"},M3IECompatMode,Utils,giContextMenuCounter,AjaxEventMgr,Matrix3,sLocH,sNewUrl,oNewUrl,TriggerTableHelper,widgetsAutocomplete,DragDropMgr,DragDropReorderMgr,NearestItemFinder,TranslationMode,addthis_share,Matr
1ixDebug,Effect,IntervalTreeUtils,fConfirmOngoingUploads,SimpleTooltip,swfobject,VFormEffects,WysiwygManager,AutoCompletionMgr,AttachZoomMgr,bMyZoomDarkMode,SizeLearningMgr,UserDropImagesPropertiesMgr,CMSParameters,CMSUtils;window.Param=window.Param||{};window.Param.HtmlSanitize=window.Param.HtmlSanitize||{};window.Param.HtmlSanitize.Config={allowedTags:["a","abbr","acronym","address","annotate","area","article","aside","b","bdi","big","blockquote","br","button","caption","center","cite","code","col","colgroup","cx-icon","cx-tooltip","data","datalist","dd","del","delete","details","dfn","dir","div","dl","dt","em","fieldset","figcaption","figure","font","footer","form","group","h1","h2","h3","h4","h5","h6","header","hr","i","img","input","ins","insert","kbd","keygen","label","legend","li","main","map","mark","menu","menuitem","meter","nav","ol","optgroup","option","output","p","pre","progress","q","rp","rt","ruby","s","samp","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","text","textarea","tfoot","th","thead","time","tr","tt","u","ul","var","video","wbr"],allowedAttributes:["abbr","accept","accept-charset","accesskey","action","align","alt","autocomplete","autosave","axis","bgcolor","border","cellpadding","cellspacing","challenge","char","charoff","charset","checked","cite","class","clear","color","cols","colspan","compact","content","contenteditable","controls","coords","data-value","datetime","dir","disabled","draggable","dropzone","enctype","for","frame","headers","height","high","hoist","href","hreflang","hspace","ismap","keytype","label","lang","list","longdesc","low","max","max-delay","maxlength","media","method","min","multiple","name","nohref","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","poster","prompt","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","rules","scope","selected","shape","size","slot","span","spellcheck","src","start","step","style","summary","tabindex","target","title","type","usemap","valign","value","vspace","wait","width","wrap"],allowedSchemes:["http","https","mailto"],allowedCssProperties:["background","background-attachment","background-color","background-image","background-position","background-repeat","border","border-bottom","border-bottom-color","border-bottom-style","border-bottom-width","border-collapse","border-color","border-left","border-left-color","border-left-style","border-left-width","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-style","border-top-width","border-width","bottom","caption-side","clear","clip","color","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","float","font","font-family","font-size","font-style","font-variant","font-weight","height","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","max-height","max-width","min-height","min-width","opacity","orphans","outline","outline-color","outline-style","outline-width","overflow","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","quotes","right","table-layout","text-align","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-style","text-indent","text-transform","top","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-spacing","z-index"]};window.Param.HtmlSanitize.Enabled=!0; 2/*! 3 * Added by Tom 4 * Date: 2019-04-17 5 * Remove NodeJS from Adobe Plugins injected into the DOM (cause problems for JQuery and other libraries) 6 */ 7window.NodeJsModule={};typeof module=="object"&&(window.NodeJsModule=module,module=undefined);window.NodeJsExports={};typeof exports=="object"&&(window.NodeJsExports=exports,exports=undefined);typeof require=="undefined"&&typeof cep_node!="undefined"&&(require=cep_node.require);delete window.module;delete window.exports;CSP.IsEnabled=function(){return Param.CSPEnabled==="true"||Param.CSPEnabled===!0||window.CSPEnabled};DOMChangesQueue.moSingleton=null;DOMChangesQueue.GetInstance=function(){return DOMChangesQueue.moSingleton||(DOMChangesQueue.moSingleton=new DOMChangesQueue),DOMChangesQueue.moSingleton};DOMChangesQueue.prototype={QueueSetCss:function(n,t,i){var u,r,f;for(this.maSetCssQueueNodes.push(n),this.maSetCssQueueProp.push(t),this.maSetCssQueueValues.push(i),u=PositionItem.GetOffsetAffectedByQueueCss(n),r=0,f=u.length;r<f;r++)this.maCachedOffsetToClear.push(u[r])},QueueResetHeight:function(n){var i,t,r;for(this.maResetHeightQueueNodes.push(n),i=PositionItem.GetOffsetAffectedByQueueCss(n),t=0,r=i.length;t<r;t++)this.maCachedOffsetToClear.push(i[t])},ApplyQueue:function(){for(var n=0,t=this.maSetCssQueueNodes.length;n<t;n++)$(this.maSetCssQueueNodes[n]).css(this.maSetCssQueueProp[n],this.maSetCssQueueValues[n]);for(n=0,t=this.maResetHeightQueueNodes.length;n<t;n++)this.maResetHeightQueueNodes[n].style.height=null;this.maCachedOffsetToClear.length>0&&PositionItem.ClearCachedOffset(this.maCachedOffsetToClear);this.maSetCssQueueNodes=[];this.maSetCssQueueProp=[];this.maSetCssQueueValues=[];this.maResetHeightQueueNodes=[];this.maCachedOffsetToClear=[]}};FastArray.prototype={Push:function(n){var t=!1;return n==null||(this.Exists(n)&&this.Remove(this.moHash[n]),this.moArray.push(n),this.moHash[n]=this.moArray.length-1,t=!0),t},PushIfNotExists:function(n){var t=!1;return n==null||this.Exists(n)||(this.moArray.push(n),this.moHash[n]=this.moArray.length-1,t=!0),t},Remove:function(n){var t=!1,i;return Utils.IsNumber(n)||(n=this.moHash[n]),n!=null&&n<this.moArray.length&&(i=this.moArray[n],delete this.moHash[i],this.moArray.splice(n,1),this._RepopulateIndex(),t=!0),t},RemoveIfExists:function(n){this.Exists(n)&&(this.Remove(this.moHash[n]),delete this.moHash[n])},GetSize:function(){return this.moArray.length},Exists:function(n){var t=!1;return n==null||(t=n in this.moHash),t},Get:function(n){var t=null;return!Utils.IsNumber(n)||n>=this.moArray.length||(t=this.moArray[n]),t},GetArray:function(){return this.moArray},GetIndex:function(n){var t=-1;return n in this.moHash&&(t=this.moHash[n]),t},_RepopulateIndex:function(){this.moHash={};for(var n=0,t=this.moArray.length;n<t;n++)this.moHash[this.moArray[n]]=n},Sort:function(n){this.moArray.sort(n);this._RepopulateIndex()}};M3IECompatMode=!1;window.HTMLElement==null?(M3IECompatMode=!0,HTMLElement=function(n){this.moDOMNode=n;this.moParent=this.GetParentNode();this.nodeType=this.moDOMNode.nodeType;this.attributes=this.moDOMNode.attributes;this.nodeValue=this.moDOMNode.nodeValue;this.childNodes=this.moDOMNode.childNodes;typeof this.moDOMNode.id!="undefined"&&(this.id=this.moDOMNode.id)},HTMLElement.prototype.GetParentNode=function(){return this.moDOMNode.parentNode},HTMLElement.prototype.GetChildNodes=function(){return this.moDOMNode.childNodes},HTMLElement.prototype.GetNode=function(){return this.moDOMNode},HTMLElement.prototype.setAttribute=function(n,t){this.moDOMNode.setAttribute(n,t)},HTMLElement.prototype.appendChild=function(n){var t=n,i=this.moDOMNode.innerHTML;this.moDOMNode.innerHTML=i+t},HTMLElement.prototype.HasProperty=function(n){var t=$PI(this.moDOMNode);return t.HasProperty(n)},HTMLElement.prototype.GetProperty=function(n){var t=$PI(this.moDOMNode);return t.GetProperty(n)},HTMLElement.prototype.SetProperty=function(n,t){var i=$PI(this.moDOMNode);return i.SetProperty(n,t)}):(HTMLElement.prototype.GetParentNode=function(){return this.parentNode},HTMLElement.prototype.GetChildNodes=function(){return this.childNodes},HTMLElement.prototype.GetNode=function(){return this});try{if(typeof sessionStorage=="object")try{sessionStorage.setItem("Test",1);sessionStorage.removeItem("Test")}catch(e){Storage.prototype.setItem=function(){};Storage.prototype._setItem=Storage.prototype.setItem}}catch(ex){}(function(n){try{return new MouseEvent("test"),!1}catch(i){}var t=function(t,i){i=i||{bubbles:!1,cancelable:!1};var r=document.createEvent("MouseEvent");return r.initMouseEvent(t,i.bubbles,i.cancelable,n,0,i.screenX||0,i.screenY||0,i.clientX||0,i.clientY||0,i.ctrlKey||!1,i.altKey||!1,i.shiftKey||!1,i.metaKey||!1,i.button||0,i.relatedTarget||null),r};t.prototype=Event.prototype;n.MouseEvent=t})(window),function(n,t){typeof define=="function"&&define.amd?define(["./ResizeSensor.js"],t):typeof exports=="object"?module.exports=t(require("./ResizeSensor.js")):(n.ElementQueries=t(n.ResizeSensor),n.ElementQueries.listen())}(typeof window!="undefined"?window:this,function(n){var t=function(){function e(n){n||(n=document.documentElement);var t=window.getComputedStyle(n,null).fontSize;return parseFloat(t)||16}function c(n){if(!n.getBoundingClientRect)return{width:n.offsetWidth,height:n.offsetHeight};var t=n.getBoundingClientRect();return{width:Math.round(t.width),height:Math.round(t.height)}}
7function l(n,t){var i=t.split(/\d/),r=i[i.length-1];t=parseFloat(t);switch(r){case"px":return t;case"em":return t*e(n);case"rem":return t*e();case"vw":return t*document.documentElement.clientWidth/100;case"vh":return t*document.documentElement.clientHeight/100;case"vmin":case"vmax":var u=document.documentElement.clientWidth/100,f=document.documentElement.clientHeight/100,o=Math[r==="vmin"?"min":"max"];return t*o(u,f);default:return t}}function a(n,i){this.element=n;var s,r,h,a,v,u,f,o,e=["min-width","min-height","max-width","max-height"];this.call=function(){h=c(this.element);u={};for(s in t[i])t[i].hasOwnProperty(s)&&(r=t[i][s],a=l(this.element,r.value),v=r.property==="width"?h.width:h.height,o=r.mode+"-"+r.property,f="",r.mode==="min"&&v>=a&&(f+=r.value),r.mode==="max"&&v<=a&&(f+=r.value),u[o]||(u[o]=""),f&&-1===(" "+u[o]+" ").indexOf(" "+f+" ")&&(u[o]+=" "+f));for(var n in e)e.hasOwnProperty(n)&&(u[e[n]]?this.element.setAttribute(e[n],u[e[n]].substr(1)):this.element.removeAttribute(e[n]))}}function o(t,i){t.elementQueriesSetupInformation||(t.elementQueriesSetupInformation=new a(t,i));t.elementQueriesSensor||(t.elementQueriesSensor=new n(t,function(){t.elementQueriesSetupInformation.call()}));t.elementQueriesSetupInformation.call()}function v(n,u,f,e){if(typeof t[n]=="undefined"){t[n]=[];var o=r.length;i.innerHTML+="\n"+n+" {animation: 0.1s element-queries;}";i.innerHTML+="\n"+n+" > .resize-sensor {min-width: "+o+"px;}";r.push(n)}t[n].push({mode:u,property:f,value:e})}function s(n){var t;if(document.querySelectorAll&&(t=n?n.querySelectorAll.bind(n):document.querySelectorAll.bind(document)),t||"undefined"==typeof $$||(t=$$),t||"undefined"==typeof jQuery||(t=jQuery),!t)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return t}function y(n){var e=s(n),r,u,i,f;for(r in t)if(t.hasOwnProperty(mode))for(u=e(r,n),i=0,f=u.length;i<f;i++)o(u[i],r)}function p(t){function a(){var n=!1,i,s;for(i in r)r.hasOwnProperty(i)&&e[i].minWidth&&t.offsetWidth>e[i].minWidth&&(n=i);n||(n=o);u!==n?h[n]?(r[u].style.display="none",r[n].style.display="block",u=n):(s=new Image,s.onload=function(){r[n].src=f[n];r[u].style.display="none";r[n].style.display="block";h[n]=!0;u=n},s.src=f[n]):r[n].src=f[n]}var r=[],e=[],f=[],o=0,u=-1,h=[],i,s,c,l;for(i in t.children)t.children.hasOwnProperty(i)&&t.children[i].tagName&&t.children[i].tagName.toLowerCase()==="img"&&(r.push(t.children[i]),s=t.children[i].getAttribute("min-width")||t.children[i].getAttribute("data-min-width"),c=t.children[i].getAttribute("data-src")||t.children[i].getAttribute("url"),f.push(c),l={minWidth:s},e.push(l),s?t.children[i].style.display="none":(o=r.length-1,t.children[i].style.display="block"));u=o;t.resizeSensor=new n(t,a);a()}function w(){for(var i=s(),t=i("[data-responsive-image],[responsive-image]"),n=0,r=t.length;n<r;n++)p(t[n])}function u(n){var t,r,u,i;for(n=n.replace(/'/g,'"');null!==(t=b.exec(n));)for(r=t[1]+t[3],u=t[2];null!==(i=k.exec(u));)v(r,i[1],i[2],i[3])}function f(n){var i="",t,r;if(n)if("string"==typeof n)n=n.toLowerCase(),(-1!==n.indexOf("min-width")||-1!==n.indexOf("max-width"))&&u(n);else for(t=0,r=n.length;t<r;t++)1===n[t].type?(i=n[t].selectorText||n[t].cssText,-1!==i.indexOf("min-height")||-1!==i.indexOf("max-height")?u(i):(-1!==i.indexOf("min-width")||-1!==i.indexOf("max-width"))&&u(i)):4===n[t].type?f(n[t].cssRules||n[t].rules):3===n[t].type&&f(n[t].styleSheet.cssRules)}var i,t={},r=[],b=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/mgi,k=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/mgi,h=!1;this.init=function(){var u="animationstart",t,e;for(typeof document.documentElement.style.webkitAnimationName!="undefined"?u="webkitAnimationStart":typeof document.documentElement.style.MozAnimationName!="undefined"?u="mozanimationstart":typeof document.documentElement.style.OAnimationName!="undefined"&&(u="oanimationstart"),document.body.addEventListener(u,function(t){var i=t.target,e=window.getComputedStyle(i,null),f,u;-1!==e.getPropertyValue("animation-name").indexOf("element-queries")&&(i.elementQueriesSensor=new n(i,function(){i.elementQueriesSetupInformation&&i.elementQueriesSetupInformation.call()}),f=window.getComputedStyle(i.resizeSensor,null),u=f.getPropertyValue("min-width"),u=parseInt(u.replace("px","")),o(t.target,r[u]))}),h||(i=document.createElement("style"),i.type="text/css",i.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",i.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(i),h=!0),t=0,e=document.styleSheets.length;t<e;t++)try{f(document.styleSheets[t].cssRules||document.styleSheets[t].rules||document.styleSheets[t].cssText)}catch(s){}w()};this.findElementQueriesElements=function(n){y(n)};this.update=function(){this.init()}},i;
7return t.update=function(){t.instance.update()},t.detach=function(n){n.elementQueriesSetupInformation?(n.elementQueriesSensor.detach(),delete n.elementQueriesSetupInformation,delete n.elementQueriesSensor):n.resizeSensor&&(n.resizeSensor.detach(),delete n.resizeSensor)},t.init=function(){t.instance||(t.instance=new t);t.instance.init()},i=function(n){if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var t=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(n(),clearInterval(t))},10);else window.onload=n},t.findElementQueriesElements=function(n){t.instance.findElementQueriesElements(n)},t.listen=function(){i(t.init)},t}),function(n,t){typeof define=="function"&&define.amd?define(t):typeof exports=="object"?module.exports=t():n.ResizeSensor=t()}(typeof window!="undefined"?window:this,function(){function i(n,t){var i=Object.prototype.toString.call(n),u="[object Array]"===i||"[object NodeList]"===i||"[object HTMLCollection]"===i||"[object Object]"===i||"undefined"!=typeof jQuery&&n instanceof jQuery||"undefined"!=typeof Elements&&n instanceof Elements,r=0,f=n.length;if(u)for(;r<f;r++)t(n[r]);else t(n)}function r(n){if(!n.getBoundingClientRect)return{width:n.offsetWidth,height:n.offsetHeight};var t=n.getBoundingClientRect();return{width:Math.round(t.width),height:Math.round(t.height)}}var t,n;return typeof window=="undefined"?null:(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(n){return window.setTimeout(n,20)},n=function(u,f){function e(){var t=[],n,i;this.add=function(n){t.push(n)};this.call=function(){for(n=0,i=t.length;n<i;n++)t[n].call()};this.remove=function(r){var u=[];for(n=0,i=t.length;n<i;n++)t[n]!==r&&u.push(t[n]);t=u};this.length=function(){return t.length}}function o(n,i){var u,s,f;if(n){if(n.resizedAttached){n.resizedAttached.add(i);return}n.resizedAttached=new e;n.resizedAttached.add(i);n.resizeSensor=document.createElement("div");n.resizeSensor.dir="ltr";n.resizeSensor.className="resize-sensor";u="position: absolute; left: -10px; top: -10px; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";s="position: absolute; left: 0; top: 0; transition: 0s;";n.resizeSensor.style.cssText=u;n.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+u+'"><div style="'+s+'"><\/div><\/div><div class="resize-sensor-shrink" style="'+u+'"><div style="'+s+' width: 200%; height: 200%"><\/div><\/div>';n.appendChild(n.resizeSensor);f=window.getComputedStyle(n).getPropertyValue("position");"absolute"!==f&&"relative"!==f&&"fixed"!==f&&(n.style.position="relative");var o=n.resizeSensor.childNodes[0],v=o.childNodes[0],h=n.resizeSensor.childNodes[1],c,l,d,g,y=r(n),p=y.width,w=y.height,a=function(){var t=n.offsetWidth===0&&n.offsetHeight===0,i;t&&(i=n.style.display,n.style.display="block");v.style.width="100000px";v.style.height="100000px";o.scrollLeft=1e5;o.scrollTop=1e5;h.scrollLeft=1e5;h.scrollTop=1e5;t&&(n.style.display=i)};n.resizeSensor.resetSensor=a;var nt=function(){(l=0,c)&&(p=d,w=g,n.resizedAttached&&n.resizedAttached.call())},b=function(){var i=r(n),u=i.width,f=i.height;c=u!=p||f!=w;c&&!l&&(l=t(nt));a()},k=function(n,t,i){n.attachEvent?n.attachEvent("on"+t,i):n.addEventListener(t,i)};k(o,"scroll",b);k(h,"scroll",b);t(a)}}i(u,function(n){o(n,f)});this.detach=function(t){n.detach(u,t)};this.reset=function(){u.resizeSensor.resetSensor()}},n.reset=function(n){i(n,function(n){n.resizeSensor.resetSensor()})},n.detach=function(n,t){i(n,function(n){n&&(n.resizedAttached&&typeof t=="function"&&(n.resizedAttached.remove(t),n.resizedAttached.length())||n.resizeSensor&&(n.contains(n.resizeSensor)&&n.removeChild(n.resizeSensor),delete n.resizeSensor,delete n.resizedAttached))})},n)});HTMLElement.prototype.SetupIFrame=function(){if(this.miOriginalWidth==-1||this.miOriginalHeight==-1){var n=this,t=function(){n.PollFrameSize()};setInterval(t,100)}};HTMLElement.prototype.PollFrameSize=function(){var n,t,i;try{n=!1;this.miOriginalWidth==-1&&(t=GetWidthIFrame(this),t!=this.miWidth&&(PositionMgr.GetInstance().AddToDirtyXList(this),n=!0));this.miOriginalHeight==-1&&(i=GetHeightIFrame(this),i!=this.miHeight&&(PositionMgr.GetInstance().AddToDirtyYList(this),n=!0));n&&!Matrix3.HasEventsInProgress()&&PositionMgr.GetInstance().CalculatePositionAsync()}catch(r){}};Utils={Const:{GROUP_SEPARATOR:",",SUFFIX_LABEL:"_Lbl",TAG_RESOLUTION_WIDTH:"\\[RESOLUTION_WIDTH\\]",TAG_RESOLUTION_HEIGHT:"\\[RESOLUTION_HEIGHT\\]",TAG_TOTAL_ITEMS:"\\[TOTAL_ITEMS\\]",OPTION_SEPARATOR:";",OPTION_VALUE_SEPARATOR:":",SEPARATOR_VALUE:"|",SHIFT_KEY:"Shift",CTRL_KEY:"Ctrl",ALT_KEY:"Alt",META_KEY:"Meta",APP_BUILD_DATE:"AppBuildDate",SIDE_PANEL_MAX_WIDTH:.5,BUSINESS_HOURS_PER_DAY:8,SCREEN_RECORDING_REQUEST_KEY:"REQUEST_KEY",IS_SCREEN_RECORDING_KEY:"IS_SCREEN_RECORDING",SCREEN_RECORD_FILE_NAME:"ScreenRecord.webm",TAB_ID_KEY:"tab-unique-id",IS_DARK_MODE_KEY:"is-dark-mode",UNLOAD_CURRENT_TAB:"unload-current-tab",FOCUSABLE_SELECTORS:'a[href]:not([tabindex="-1"]), area[href], button:not([disabled]):not([tabindex="-1"]), input:not([disabled]):not([tabindex="-1"]):not([type="hidden"]), select:not([disabled]):not([tabindex="-1"]), textarea:not([disabled]):not([tabindex="-1"]), iframe, object, embed, [tabindex]:not
7([tabindex="-1"]), [contenteditable]'},moForm1Cache:null,moWindow:null,Form1:function(){return this.moForm1Cache==null&&(this.moForm1Cache=document.getElementById("Form1")),this.moForm1Cache},GetDocument:function(){return Utils.Form1()},Window:function(){return this.moWindow==null&&(this.moWindow=$(window)),this.moWindow[0]},HashToParameters:function(n){var t="",i;if(n instanceof Object){for(i in n)t+="&"+i+"="+encodeURIComponent(n[i]);t.length!=0&&(t=t.substr(1))}return t},HashToFormData:function(n,t){if(t instanceof Object)for(var i in t)n.append(i,t[i])},HasTopLayer:function(){try{return!!document.querySelector(":modal:not(.LoadingPopupClass):not(#context-menu-layer):not(.context-menu-list), :popover-open:not(.LoadingPopupClass):not(#context-menu-layer):not(.context-menu-list)")||!!document.fullscreenElement}catch(n){return!!document.fullscreenElement}},ShowPopover:function(n){n&&(n.popover="manual",n.__beforePopoverStyles={border:n.style.border,backgroundColor:n.style.backgroundColor},n.id!==Matrix3.Const.LOADING_PANEL_ID&&n.id!==CMSParameters.loader.id&&(n.style.backgroundColor="transparent"),n.style.borderColor="transparent",n.showPopover())},HidePopover:function(n){if(n&&n.popover){if(n.hidePopover(),n.__beforePopoverStyles)for(var t in n.__beforePopoverStyles)n.style[t]=n.__beforePopoverStyles[t];n.removeAttribute("popover")}},IsMouseLeaveOrEnter:function(n,t){if(n.type!="mouseout"&&n.type!="mouseover"&&n.type!="mouseup")return!1;var i;for(n.relatedTarget?i=n.relatedTarget:n.type=="mouseout"?i=n.toElement:n.type=="mouseover"?i=n.fromElement:n.type=="mouseup"&&(i=n.target?n.target:n.srcElement);i&&i!=t;)i=i.parentNode;return i!=t},GetHeight:function(n,t){var n=$Elt(n),i=$S(n,"height");if(i=="auto"&&($SetStyle(n,"zoom","1"),i=n.clientHeight+"px"),t)try{i=parseInt(i)}catch(r){i=parseInt(i.substring(0,i.length-2))}return i},GetWidth:function(n,t){var n=$Elt(n),i=$S(n,"width");
7if(i=="auto"&&($SetStyle(n,"zoom","1"),i=n.clientWidth+"px"),t)try{i=parseInt(i)}catch(r){i=parseInt(i.substring(0,i.length-2))}return i},GetAbsoluteWidth:function(n){n=$Elt(n);var t=Utils.GetWidth(n,!0),i=parseInt($S(n,"marginLeft")),r=parseInt($S(n,"marginRight")),u=parseInt($S(n,"borderLeft")),f=parseInt($S(n,"borderRight"));return isNaN(t)&&(t=0),isNaN(i)&&(i=0),isNaN(r)&&(r=0),isNaN(u)&&(u=0),isNaN(f)&&(f=0),t+i+r+u+f},GetAbsoluteHeight:function(n){n=$Elt(n);var t=Utils.GetHeight(n,!0),i=parseInt($S(n,"marginTop")),r=parseInt($S(n,"marginBottom")),u=parseInt($S(n,"borderTop")),f=parseInt($S(n,"borderBottom"));return isNaN(t)&&(t=0),isNaN(i)&&(i=0),isNaN(r)&&(r=0),isNaN(u)&&(u=0),isNaN(f)&&(f=0),t+i+r+u+f},GetX:function(n){var t;return Utils.IsString(n)?Utils.StartsWith(n,"#")?$(n).offset().left:$E(n).offset().left:n.offset().left},GetY:function(n){var t;return Utils.IsString(n)?Utils.StartsWith(n,"#")?$(n).offset().top:$E(n).offset().top:n.offset().top},IsFirefox:function(){return Utils._uaLower.indexOf("firefox")!=-1?!0:!1},IsIE:function(){var n=$.browser.msie;return n?n:!!navigator.userAgent.match(/Trident\/7\./)},IsIE6:function(){var n=$.browser.msie&&$.browser.version<7;return n?n:!1},IsIE7:function(){var n=$.browser.msie&&$.browser.version<8;return n?n:!1},IsIE8:function(){var n=$.browser.msie&&$.browser.version<9;return n?n:!1},IsIE9:function(){var n=$.browser.msie&&$.browser.version<10;return n?n:!1},IsIE11:function(){return!!navigator.userAgent.match(/Trident.*rv\:11\./)},IsSafari:function(){var n=$.browser.safari||$.browser.webkit&&!$.browser.chrome;return n?n:!1},IsOpera:function(){var n=$.browser.opera;return n?n:!1},IsWebKit:function(){var n=$.browser.webkit;return n?n:!1},IsIPad:function(){return Utils._platformLower.indexOf("iphone")!=-1||Utils._uaLower.indexOf("iphone")!=-1||Utils._platformLower.indexOf("ipad")!=-1||Utils._uaLower.indexOf("ipad")!=-1||Utils._platformLower.indexOf("ipod")!=-1||Utils._uaLower.indexOf("ipod")!=-1||Utils._platformLower==="macintel"&&navigator.maxTouchPoints>1},IsAndroid:function(){return Utils._platformLower.indexOf("android")!=-1||Utils._uaLower.indexOf("android")!=-1},IsTouchDevice:function(){try{return document.createEvent("TouchEvent"),!0}catch(n){return!1}},GetViewportScale:function(){try{return window.visualViewport.scale}catch(n){return 1}},AddEvent:function(n,t,i,r,u){if(M3IECompatMode&&n.GetNode&&(n=n.GetNode()),n=$Elt(n),n){r||(r=n);var f=function(n){return i.call(r,n,u)};$(n).on(t,f)}n=null;t=null},DetachEvent:function(n,t,i){M3IECompatMode&&n.GetNode&&(n=n.GetNode());$(n).off(t);n=null;t=null;i=null},GetPageWidth:function(){return $(document).width()},GetPageHeight:function(){return $(document).height()},CheckPageResolution:function(n,t,i){var u=Utils.GetPageWidth(),f=Utils.GetPageHeight(),r;(u!==n||f!==t)&&(r=new URL(window.location.href),r.searchParams.set("FR_","1"),r.searchParams.set("W",u),r.searchParams.set("H",f),Utils.IsStringFilled(i)&&r.searchParams.set("TP",i),window.location.href=r.href)},GetViewportWidth:function(){if(!Utils.miCachedVPWidth){var n=$(window).width(),t=$(Utils.Form1()).width();Utils.miCachedVPWidth=Math.round(t)===n?Math.floor(t):n}return Utils.miCachedVPWidth},GetViewportHeight:function(){if(!Utils.miCachedVPHeight){var n=$(window).height(),t=$(Utils.Form1()).height();Utils.miCachedVPHeight=Math.round(t)===n?Math.floor(t):n}return Utils.miCachedVPHeight},ClearViewPortCache:function(){Utils.miCachedVPWidth=null;Utils.miCachedVPHeight=null},ScrollToAnchor:function(n){$PI($('[name="anchor_'+n+'"]')[0].id).ScrollToMe(!0)},GetScrollTop:function(){return Utils.GetDocument().scrollTop},GetScrollLeft:function(){return Utils.GetDocument().scrollLeft},GetMainParentContainerScrollTop:function(n){var t=Utils.GetPopupContainer(n);return t&&t!=null?t.scrollTop:Utils.GetScrollTop()},GetMainParentContainerScrollLeft:function(n){var t=Utils.GetPopupContainer(n);return t&&t!=null?t.scrollLeft:Utils.GetScrollLeft()},LockBodyScroll:function(){var n,t;return document.body.hasAttribute("data-scroll-locked")?parseInt(document.body.getAttribute("data-scroll-y")||"0"):(n=window.scrollY,document.body.style.overflow="hidden",t=Utils.Form1(),t&&(t.style.overflow="hidden"),Utils.IsIPad()&&(document.body.style.position="fixed",document.body.style.top=-n+"px",document.body.style.left="0",document.body.style.right="0"),document.body.setAttribute("data-scroll-locked","true"),document.body.setAttribute("data-scroll-y",n.toString()),n)},UnlockBodyScroll:function(){var t,n;document.body.hasAttribute("data-scroll-locked")&&(t=parseInt(document.body.getAttribute("data-scroll-y")||"0"),document.body.style.overflow="",n=Utils.Form1(),n&&(n.style.overflow=""),Utils.IsIPad()&&(document.body.style.position="",document.body.style.top="",document.body.style.left="",document.body.style.right="",window.scrollTo(0,t)),document.body.removeAttribute("data-scroll-locked"),document.body.removeAttribute("data-scroll-y"))},GetPopupContainer:function(n){var u=null,r=$E(n),i,t,f;if(r&&r.length>0)for(i=r.parents(),t=0,f=i.length;t<f;t++)if(i[t].classList.contains(Popup.Const.SCROLLABLE_CONTAINER_CLASS)){u=i[t];break}return u},Augment:function(n,t){for(var i in t.prototype)i in n.prototype||(n.prototype[i]=t.prototype[i])},OpenHelp:function(n,t){var i="width=440, height=600,alwaysRaised=yes,toolbar=0,directories=0,menubar=0,status=1,resizable=yes,location=0,scrollbars=1,copyhistory=0,",r="left="+(screen.width-440)+",top=0,screenX="+(screen.width-440)+",screenY=0";i=i+r;window.open(n,t,i)},GetTextContent:function(n){var t="";return n&&(t=n.innerText?n.innerText:n.textContent),t},SetTextContent:function(n,t,i){n&&(i?n.innerHTML=t:n.innerText?n.innerText=t:n.textContent=t)},BuildMask:function(n,t,i){var r=document.createElement("div");return r.id=n,r.msIndex=StackMgr.GetInstance().GetIndex(),typeof i=="undefined"&&(i=Utils.Form1()),$AddClass(r,t),$SetCss(r,{display:"none","z-index":""+r.msIndex,position:"fixed",left:"0px",bottom:"0px",right:"0px",top:"0px"}),r.ResizeMask=function(){},r.Show=function(){this.mbIsVisible=!0;$SetCss(this.id,{display:"block"});this.ResizeMask()},r.Hide=function(){this.mbIsVisible=!1;$SetCss(this.id,{display:"none"})},r.IsVisible=function(){return this.mbIsVisible},r.GetIndex=function(){return this.msIndex},r.Destroy=function(){$(this).remove()},i.appendChild(r),r},TransformVirtualID:function(n){return Utils.IsString(n)&&(n=n.replace(Utils._reTagWidth,Utils.GetViewportWidth()),n=n.replace(Utils._reTagHeight,Utils.GetViewportHe
7ight())),n},CloneNode:function(n){var t=n.cloneNode(!1),i='<span style="display:none;"><br /><\/span>'+n.innerHTML;return t.innerHTML=i,t},GetMousePosition:function(n){return n=$.event.fix(n),this.miMouseX=n.pageX,this.miMouseY=n.pageY,[this.miMouseX,this.miMouseY]},GetMousePositionX:function(n){return n?n.pageX:this.miMouseX},GetMousePositionY:function(n){var t;return n?(n=$.event.fix(n),t=n.pageY):t=this.miMouseY,t},GetOptions:function(n){var u={},i,t,r;if(n)for(i=n.split(Utils.Const.OPTION_SEPARATOR),t=0;t<i.length;t++)r=i[t].split(Utils.Const.OPTION_VALUE_SEPARATOR),u[r[0].toLowerCase()]=r[1];return u},GetMetaKey:function(n){var t=[];return n&&(n.ctrlKey&&t.push(Utils.Const.CTRL_KEY),n.shiftKey&&t.push(Utils.Const.SHIFT_KEY),n.altKey&&t.push(Utils.Const.ALT_KEY),n.metaKey&&t.push(Utils.Const.META_KEY)),t},StopPropagation:function(n){return n=n?n:window.event,n.stopPropagation&&n.stopPropagation(),n.preventDefault&&n.preventDefault(),n.cancelBubble=!0,n.cancel=!0,n.returnValue=!1,!1},CreateReference:function(n){var t=n.split(Matrix3.Const.SEPARATOR_CONTROL)[0];t in Matrix3.moReferences||(Matrix3.moReferences[t]={});Matrix3.moReferences[t][n]=!0},EvalScriptsWithNonce:function(_jsCode,_sNonce){var options,oDocBody,oScriptRange,sDynamicScriptFragment;window.$?(options={},_sNonce&&(options={nonce:_sNonce}),$.globalEval(_jsCode,options)):typeof _sNonce!="undefined"&&_sNonce?(oDocBody=document.body,$("#dynamic_eval_script").remove(),oScriptRange=document.createRange(),sDynamicScriptFragment="<div id='dynamic_eval_script'><script nonce='"+_sNonce+"'>"+_jsCode+"<\/script><\/div>",oDocBody.appendChild(oScriptRange.createContextualFragment(sDynamicScriptFragment))):eval(_sScripts)},EvalScriptsResultWithNonce:function(_jsCode,_sNonce){var sJS="var cspResult = "+_jsCode;try{Utils.EvalScriptsWithNonce(sJS,_sNonce)}catch(e){return console.log("cannot evaluate: "+_jsCode),eval(_jsCode)}return cspResult},LoadScriptWithNonce:function(n,t,i,r,u){var f;Utils.IsBoolean(r)||(r=!0);(Utils.IsUndefined(t)||!Utils.IsFunction(t))&&(t=function(){});(Utils.IsUndefined(i)||!Utils.IsFunction(i))&&(i=function(){});Matrix3.moLoadedScripts||(Matrix3.moLoadedScripts={});typeof n=="string"&&(n=[n]);var o=0,e=function(){if(o++,o==n.length)try{t()}catch(i){Matrix3.LogError(i)}},s=function(n){var t=n;r&&Param[Utils.Const.APP_BUILD_DATE]&&(n=Utils.AddOrUpdateUrlParameter(n,"version",Param[Utils.Const.APP_BUILD_DATE]));r&&Matrix3.moLoadedScripts.hasOwnProperty(t)?e():Matrix3.moLoadingScripts[t]?(Matrix3.moLoadingScripts[t].successCallbacksQueue.push(e),Matrix3.moLoadingScripts[t].errorCallbacksQueue.push(i)):(Matrix3.moLoadingScripts[t]={},Matrix3.moLoadingScripts[t].successCallbacksQueue=[],Matrix3.moLoadingScripts[t].errorCallbacksQueue=[],Matrix3.moLoadingScripts[t].successCallback=function(){for(var n in Matrix3.moLoadingScripts[t].successCallbacksQueue)Matrix3.moLoadingScripts[t].successCallbacksQueue[n]();delete Matrix3.moLoadingScripts[t]},Matrix3.moLoadingScripts[t].errorCallback=function(){for(var n in Matrix3.moLoadingScripts[t].errorCallbacksQueue)Matrix3.moLoadingScripts[t].errorCallbacksQueue[n]();delete Matrix3.moLoadingScripts[t]},Matrix3.moLoadingScripts[t].successCallbacksQueue.push(e),Matrix3.moLoadingScripts[t].errorCallbacksQueue.push(i),typeof u!="undefined"&&u?$.ajax({url:n,dataType:"script",attrs:{nonce:u},scriptAttrs:{nonce:u},success:function(){Matrix3.moLoadedScripts[t]=!0;Matrix3.moLoadingScripts[t].successCallback()},error:function(){Matrix3.moLoadingScripts[t].errorCallback()},cache:r}):$.ajax({url:n,dataType:"script",success:function(){Matrix3.moLoadedScripts[t]=!0;Matrix3.moLoadingScripts[t].successCallback()},error:function(){Matrix3.moLoadingScripts[t].errorCallback()},cache:r}))};for(f=0;f<n.length;f++)s(n[f])},LoadStylesheet:function(n,t,i,r){var u;Utils.IsBoolean(r)||(r=!0);(Utils.IsUndefined(i)||!Utils.IsFunction(i))&&(i=function(){});Matrix3.moLoadedStyles||(Matrix3.moLoadedStyles={});typeof n=="string"&&(n=[n]);var e=0,f=function(){if(e++,e==n.length)try{t()}catch(i){Matrix3.LogError(i)}},o=function(n){r&&Param[Utils.Const.APP_BUILD_DATE]&&(n=Utils.AddOrUpdateUrlParameter(n,"version",Param[Utils.Const.APP_BUILD_DATE]));r&&Matrix3.moLoadedStyles.hasOwnProperty(n)?f():Matrix3.moLoadingStyleSheets[n]?(Matrix3.moLoadingStyleSheets[n].successCallbacksQueue.push(f),Matrix3.moLoadingStyleSheets[n].errorCallbacksQueue.push(i)):(Matrix3.moLoadingStyleSheets[n]={},Matrix3.moLoadingStyleSheets[n].successCallbacksQueue=[],Matrix3.moLoadingStyleSheets[n].errorCallbacksQueue=[],Matrix3.moLoadingStyleSheets[n].successCallback=function(){for(var t in Matrix3.moLoadingStyleSheets[n].successCallbacksQueue)Matrix3.moLoadingStyleSheets[n].successCallbacksQueue[t]();delete Matrix3.moLoadingStyleSheets[n]},Matrix3.moLoadingStyleSheets[n].errorCallback=function(){for(var t in Matrix3.moLoadingStyleSheets[n].errorCallbacksQueue)Matrix3.moLoadingStyleSheets[n].errorCallbacksQueue[t]();delete Matrix3.moLoadingStyleSheets[n]},Matrix3.moLoadingStyleSheets[n].successCallbacksQueue.push(f),Matrix3.moLoadingStyleSheets[n].errorCallbacksQueue.push(i),$.ajax({url:n,dataType:"text",success:function(t){$("head").append("<style>"+t+"<\/style>");Matrix3.moLoadedStyles[n]=!0;Matrix3.moLoadingStyleSheets[n].successCallback()},error:function(){Matrix3.moLoadingStyleSheets[n].errorCallback()},cache:r}))};for(u=0;
7u<n.length;u++)o(n[u])},IsFunction:function(n){return typeof n=="function"},IsString:function(n){return n!=null&&typeof n=="string"},IsStringFilled:function(n){return Utils.IsString(n)&&n!=""},IsObject:function(n){return n&&(typeof n=="object"||Utils.IsFunction(n))||!1},IsUndefined:function(n){return typeof n=="undefined"},IsNull:function(n){return n===null},IsNumber:function(n){return typeof n=="number"&&isFinite(n)},IsBoolean:function(n){return typeof n=="boolean"},IsArray:function(n){return $.isArray(n)},ParseBool:function(n){return Utils.IsString(n)&&(n=n.toLowerCase()),n=="1"||n=="true"||n=="yes"||n=="on"||n==1||n==!0?!0:!1},Trim:function(n){return Utils.LeftTrim(Utils.RightTrim(n))},LeftTrim:function(n){if(Utils.IsString(n)&&n)var t=n.replace(/^ +/g,"");else t="";return t},RightTrim:function(n){if(Utils.IsString(n)&&n)var t=n.replace(/ +$/g,"");else t="";return t},StartsWith:function(n,t){var i=!1;return Utils.IsString(n)&&Utils.IsString(t)&&(i=n.indexOf(t)==0),i},EndsWith:function(n,t){var i=!1;return Utils.IsString(n)&&Utils.IsString(t)&&(i=n.indexOf(t)==n.length-t.length),i},IndexOf:function(n,t){if(Array.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;i++)if(n[i]==t)return i;return-1},Base64ToUTF8:function(n){if(Utils.IsString(n)&&n){var t=atob(n),i=Uint8Array.from(t,function(n){return n.codePointAt(0)});return(new TextDecoder).decode(i)}return""},GetNaturalWidth:function(n){if(typeof n.naturalWidth=="undefined"){var t=new Image;return t.src=n.src,t.width}return Utils.IsIE()&&n.src.endsWith(".svg")?n.getBoundingClientRect().width:n.naturalWidth},GetNaturalHeight:function(n){if(typeof n.naturalHeight=="undefined"){var t=new Image;return t.src=n.src,t.height}return Utils.IsIE()&&n.src.endsWith(".svg")?n.getBoundingClientRect().height:n.naturalHeight},ImgChangeSrc:function(n,t,i,r){if(typeof t!="undefined"&&typeof i=="string"){var u=$PI(t);typeof u!="undefined"&&typeof u.moLinkedImage!="undefined"&&u.moLinkedImage!=null&&typeof r=="boolean"&&r&&(u.moLinkedImage.onload=function(){AutoScaleProperties.Apply($PI(t))})}n&&(Utils.ImgChangeSrc.caller&&n.removeEventListener("error",Utils.ImgChangeSrc.caller),n.src=i,n.onerror="return false;")},SetupExternalRefThumbFallback:function(n,t){var u=document.getElementById(n),i,r;u&&(i=u.querySelector("img"),i)&&(r=function(){i.removeEventListener("error",r);var n=document.getElementById(t);n?(n.style.display="none",typeof PositionMgr!="undefined"&&(PositionMgr.InvalidateNodeAndAncestors(n),PositionMgr.CalculatePositionDebounced())):i.style.display="none"},i.addEventListener("error",r),i.complete&&i.naturalWidth===0&&r())},PreloadImage:function(n){var t=new Image;t.src=n},RestoreEncodingEventArgsIE:function(n){return n.match("=")||n.match("&")?encodeURIComponent(n):n},RequestFullscreen:function(){var n=document.body;n.requestFullscreen?n.requestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullScreen&&n.webkitRequestFullScreen()},GetJavaVersion:function(){var t="",n;try{n=deployJava().getJREs();n&&n.length>0&&(t=escape(n[n.length-1]))}catch(i){}return t},InsertCSS:function(n){var r,u,i,f,t,e;for(n=Utils.Trim(n),r=!0,u=$("head").children(),i=0,f=u.length;i<f;i++)if(t=$(u[i]),typeof t[0]!="undefined"&&typeof t[0].tagName=="string"&&t[0].tagName.toLowerCase()=="link"&&Utils.Trim(t.attr("href"))==n){r=!1;break}r==!0&&(e=$('<link href="'+n+'" rel="stylesheet" type="text/css" />'),$("head").append(e))},PreloadFonts:function(n){var t,i,e,r,o;if(n&&document&&document.fonts&&typeof document.fonts.load=="function")if(typeof document.fonts.forEach=="function")document.fonts.forEach(function(t){n.includes(t.family)&&t.status!=="loaded"&&t.load()});else{var u=new Array(9).fill(1).map(function(n,t){return(t+1)*100}),f=["normal","italic","oblique"],s=n.length,h=u.length,c=f.length;for(t=0;t<s;t++)for(i=0;i<h;i++)for(e=u[i].toString(),r=0;r<c;r++)o=f[r],document.fonts.load(o+" "+e+' 10px "'+n[t]+'"')}},PreloadComponents:function(n){var r,t,u,i;if(n&&customElements){for(r=[],t=document.createElement("div"),t.style.width=0,t.style.height=0,t.style.visibility="hidden",u="",i=0;i<n.length;i++)customElements.get(n[i])||(r.push(n[i]),u+="<"+n[i]+" pre-render><\/"+n[i]+">");if(r.length===0)return;t.innerHTML=u;document.body.appendChild(t);Promise.all(r.map(function(n){return customElements.whenDefined(n)})).then(function(){return Promise.all(Array.from(t.children).map(function(n){return n.updateComplete}))}).finally(function(){setTimeout(function(){t.remove()},2e3)})}},SetPageTitle:function(n){document&&document.title&&(document.title=n)},miScrollbarWidthCached:null,miScrollbarHeightCached:null,GetScrollBarSize:function(){var t,n,f,e,r,u,
7i,o;return Utils.miScrollbarWidthCached==null&&(t=document.createElement("p"),t.style.width="100%",t.style.height="100%",n=document.createElement("div"),n.style.position="absolute",n.style.top="0px",n.style.left="0px",n.style.width="100px",n.style.height="100px",n.style.overflow="hidden",Utils.IsIE8()==!0?n.style.visibility="hidden":n.style.opacity="0",n.appendChild(t),document.body.appendChild(n),f=t.offsetWidth,e=t.offsetHeight,n.style.overflow="scroll",r=t.offsetWidth,u=t.offsetHeight,f==r&&(r=n.clientWidth),e==u&&(u=n.clientHeight),document.body.removeChild(n),i=f-r,(typeof i!="number"||isNaN(i)===!0)&&(i=0),o=e-u,(typeof i!="number"||isNaN(i)===!0)&&(o=0),Utils.miScrollbarWidthCached=i,Utils.miScrollbarHeightCached=o),{width:Utils.miScrollbarWidthCached,height:Utils.miScrollbarHeightCached}},ScrollToBottom:function(n){!n},replaceAll:function(n,t){var i=new RegExp(Object.keys(t).map(function(n){return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}).join("|"),"gi");return n.replace(i,function(n){return t[n]})},htmlDecode:function(n){return String(n).replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")},debounce:function(n,t,i){var r;return function(){var u=this,f=arguments;clearTimeout(r);r=setTimeout(function(){r=null;i||n.apply(u,f)},t);i&&!r&&n.apply(u,f)}},RequestIdleCallback:function(n){window.requestIdleCallback?window.requestIdleCallback(n):setTimeout(n,1)},StartResize:function(n,t,i,r){var s,l,a,y,h,c;EditableTable.UnFreezeAllTables(!0);EditableTable.mbDisableFreeze=!0;n.preventDefault();l=Utils.ParseBool(r);l&&PreloadMgr.Reset();t&&t!=""&&(a=Utils.StartsWith(t,"AddEvent"),s=a?Utils.debounce(function(i){var r=t.split("|");if(!(r.length<2)){var u=r[1],f=Utils.GetVFormId(n.target.id),e=Utils.IsNumber(i)?i.toString():Array.isArray(i)?JSON.stringify(i):i;
7Matrix3.AddEventUsingDTO({sourceVForm:f,sourceEvent:u,args:e,event:n})}},500):Utils.debounce(function(n){Array.isArray(n)&&(n=JSON.stringify(n));$.ajax({url:t.replace("[SIZE]",n)})},500));var e=$(n.target).css("cursor"),o=$(n.target).attr("data-rzd"),p=e=="e-resize"||e=="w-resize"||o=="w-resize"||o=="e-resize",v=e=="n-resize"||e=="w-resize"||o=="n-resize"||o=="w-resize"?-1:1,u=null;if(this.IsStringFilled(i)?(u=ControlMgr.GetInstance().GetReference(i),u==null&&(y=this.GetVFormId(n.target.parentNode.id)+Matrix3.Const.SEPARATOR_CONTROL+i,u=$PI(y))):u=$PI(n.target.parentNode.id),u!=null){h=n.pageX;c=n.pageY;n.type==="touchstart"&&(h=n.touches[0].pageX,c=n.touches[0].pageY);var w=u.GetWidth(),b=u.GetHeight(),f=function(n){var y=n.pageX,k=n.pageY,e,d,tt,g,o,f,it,l,i,a,r,nt;if(n.type==="touchmove"?(y=n.touches[0].pageX,k=n.touches[0].pageY):n.type==="touchend"&&(y=n.changedTouches[0].pageX,k=n.changedTouches[0].pageY),d="["+PositionGroupProperties.Const.ATTR_POSITION_GROUP+'="'+PositionGroupProperties.Const.POSITION_GROUP_POPUP+'"]',d+=",["+PositionGroupProperties.Const.ATTR_POSITION_GROUP+'="'+PositionGroupProperties.Const.POSITION_GROUP_NOTIFICATION+'"]',tt=$(d),tt.each(function(){try{var t=$Elt(this),n=t.moParent;PositionMgr.GetInstance().AddToDirtyXList(n);PositionMgr.GetInstance().AddToDirtyYList(n);n.ExtractDependences();n.ForceHasChangedMaskBypassingChildren()}catch(i){}}),p){if(g=100,o=Utils.GetParameterValueFromURL(t,"MinWidth"),o&&o!=""&&(g=parseInt(o)),f=Math.max(g,w+v*(y-h)),t&&t!=""&&t.includes("SaveSidePanelWidth")&&(f=Math.min(f,Utils.GetViewportWidth()*Utils.Const.SIDE_PANEL_MAX_WIDTH)),u.OverrideOriginalWidth(f),e=f,PositionMgr.GetInstance().AddToDirtyXList(u),it=$(u),l=it.closest("."+PositionItem.Const.CONTROL_TYPE_PANEL_TABLE)[0],l){if(i=$Elt(l),a=$(i).find("."+PositionItem.Const.CONTROL_TYPE_PANEL_COL).index(u),i.maiColWidth){if(i.maiActualColWidth)for(r=0;r<a;r++)i.maiColWidth[r]=i.maiActualColWidth[r];i.maiColWidth[a]=f;e=i.maiColWidth;i.maiActualColWidth=null}if(i.mabCanGrow)for(r=0;r<=a;r++)i.mabCanGrow[r]=!1;PositionMgr.GetInstance().AddToDirtyXList(l)}}else nt=Math.max(100,b+v*(k-c)),u.SetHeight(nt),e=nt,PositionMgr.GetInstance().AddToDirtyYList(u);u.ForceHasChanged();Matrix3.mbPreventAnimation=!0;PositionMgr.CalculatePositionDebounced(function(){Matrix3.mbPreventAnimation=!1});FixedPos.RefreshFixedPosItemsOnIdle();EditableTable.DropRedundantHeaderOffsetOnAllTables();s&&s(e)};Utils.IsTouchDevice()?$(document).bind("touchmove",f):$(document).mousemove(f);$(document).bind("mouseup touchend",function(n){f&&f(n);$(document).unbind("mousemove touchmove",f);f=null;setTimeout(function(){EditableTable.mbDisableFreeze=!1;EditableTable.FreezeAllTables(!0);DynamicChildrenVisibilityMgr.GetInstance().ForceExecutePanels()},0)})}return!1},GetRootOrPopupId:function(n){var t=null;if(this.IsStringFilled(n)){t=n;var i=Matrix3.Const.SEPARATOR_HIERARCHY,u=n.indexOf(i),r=n.indexOf(i,u+1);r!=-1&&(t=n.substring(0,r))}return t},GetVFormId:function(n){if(!n)return n;var t=n.split(Matrix3.Const.SEPARATOR_CONTROL);return t.length==1?n:t[0]},GetNodeCortexID:function(n){var t=$(n);return typeof t.attr("data-pid")!="undefined"?t.attr("data-pid"):t.attr("id")},GetVFormIdFromNode:function(n){var t=Utils.GetNodeCortexID(n);return Utils.GetVFormId(t)},ShouldBeIgnoredWhenCheckingTopLevelPopup:function(n,t){var i=$E(n+Popup.Const.CONTAINER_SUFFIX);return i.length===0||Matrix3.moCMS&&Matrix3.moCMS.moEditToolbar&&Matrix3.moCMS.moEditToolbar.msId&&n===Matrix3.moCMS.moEditToolbar.msId||i.hasClass("minimized-mode")||i.hasClass("contextual-menu")&&!t||i.hasClass("NotificationBannerPopup")},IsInTopLevelPopup:function(n,t){for(var r,u=!0,i=Matrix3.maPopupStack.length-1;i>=0;i--)if(r=Matrix3.maPopupStack[i],!Utils.ShouldBeIgnoredWhenCheckingTopLevelPopup(r,t)){u=Utils.StartsWith(n,r);break}return u},IsInAnyPopup:function(n){for(var i,t=Matrix3.maPopupStack.length-1;t>=0;t--)if(i=Matrix3.maPopupStack[t],Utils.StartsWith(n,i))return!0;return!1},GetPopupIds:function(){for(var t,i=[],n=Matrix3.maPopupStack.length-1;n>=0;
7n--)t=Matrix3.maPopupStack[n],Utils.ShouldBeIgnoredWhenCheckingTopLevelPopup(t)||i.push(t);return i},GetTopLevelPopup:function(n){for(var i,r=null,t=Matrix3.maPopupStack.length-1;t>=0;t--)if(i=Matrix3.maPopupStack[t],!Utils.ShouldBeIgnoredWhenCheckingTopLevelPopup(i,n)){r=i;break}return r},FormatFileSize:function(n){return n>=1073741824?Math.round(n/1073741824*100)/100+"TB":n>=1048576?Math.round(n/1048576*100)/100+"MB":n>=1024?Math.round(n/1024)+"KB":n+"B"},DebugFormPresent:function(){return ControlMgr.GetInstance().GetReference("DebugSummary")!=null},FindClosestVFormID:function(n){for(var t=n.target.parentNode,i=null;t;){if(typeof t.msId!="undefined"&&t.IsVForm()){i=t.id;break}t=t.parentNode}return i},FindClosestVFormIDByNode:function(n){for(var t=n.parentNode,i=null;t;){if(typeof t.msId!="undefined"&&t.IsVForm()){i=t.id;break}t=t.parentNode}return i},FindClosestNodeID:function(n){for(var t=n.parentNode,r=null,i;t;){if(i=Utils.GetNodeCortexID(t),i){r=i;break}t=t.parentNode}return r},FindClosestCortexNodeID:function(n){for(var t=n.parentNode,r=null,u=ControlMgr.GetInstance().GetRootPositionItem().GetId().split(".")[0],i;t;){if(i=Utils.GetNodeCortexID(t),i&&i.startsWith(u)){r=i;break}t=t.parentNode}return r},AddEventFromHTML:function(n,t,i){var r=Utils.FindClosestVFormID(n);r&&Matrix3.AddEventUsingDTO({sourceVForm:r,sourceEvent:t,sourceType:Matrix3.Const.RETURNTYPE_FULL,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:i,event:n})},UpdateCounterOrSendEvent:function(n,t,i){var r=$E(n).find("."+t)[0],f,u;r?(f=r.innerText,u=parseInt(f)-1,u>0?(r.innerText=u,setTimeout(function(){Utils.UpdateCounterOrSendEvent(n,t,i)},1e3)):u===0&&(r.innerText=0,Matrix3.AddEvent(n,i,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT))):Matrix3.AddEvent(n,i,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT)},ShowContextMenu:function(n,t,i){var r=$("div[id='"+t+"']");return r[0].dispatchEvent(new MouseEvent("contextmenu",n)),i&&$(".context-menu-list").off("mouseleave").mouseleave(function(){$(".context-menu-list:hover").length||(r.contextMenu("hide"),$(".context-menu-list").off("mouseleave"))}),n.stopPropagation(),!1},DisableFocus:function(n,t){var r,o,e,u,f;if((t||!Utils.IsDisabledFocusLayer(n))&&(r=$E(n)[0],r))for(Utils.moDisableFocusBackup||(Utils.moDisableFocusBackup={_Count:0}),t||(Utils.IsDisabledFocusLayer(n)||(Utils.moDisableFocusBackup._Count=Utils.moDisableFocusBackup._Count+1),Utils.moDisableFocusBackup[n]={}),r.contains(document.activeElement)&&Utils.moDisableFocusBackup[n]&&(Utils.moDisableFocusBackup[n].moLastActiveElement=document.activeElement),o='[tabindex]:not([disabled]), [role="button"]:not([disabled]), [role="menuitem"]:not([disabled]), a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])',e=r.querySelectorAll(o),u=0;u<e.length;u++){var i=e[u],s=i.closest("div.tiptap.ProseMirror"),h=i.hasAttribute("data-focus-disabled");t||h||(f=i.getAttribute("tabindex"),f&&(i.id?Utils.moDisableFocusBackup[n][i.id]=f:i.__disableFocusBackupTabIndex=f),i.hasAttribute("aria-hidden")&&(i.__disableFocusBackupAriaHidden=i.getAttribute("aria-hidden")));s&&s.contains(i)||(i.setAttribute("tabindex","-1"),i.setAttribute("aria-hidden","true"),t||h||i.setAttribute("data-focus-disabled",n))}},RestoreFocus:function(n,t){var r,o,f,u,i,e;if(Utils.IsDisabledFocusLayer(n)&&(r=$E(n)[0],r)){for(o='[tabindex]:not([disabled]), [role="button"]:not([disabled]), [role="menuitem"]:not([disabled]), a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])',f=r.querySelectorAll(o),u=0;u<f.length;u++)(i=f[u],i.getAttribute("data-focus-disabled")===n)&&(i.removeAttribute("data-focus-disabled"),i.id&&Utils.moDisableFocusBackup[n][i.id]?i.setAttribute("tabindex",Utils.moDisableFocusBackup[n][i.id]):i.__disableFocusBackupTabIndex?i.setAttribute("tabindex",i.__disableFocusBackupTabIndex):i.removeAttribute("tabindex"),i.__disableFocusBackupAriaHidden?(i.setAttribute("aria-hidden",i.__disableFocusBackupAriaHidden),delete i.__disableFocusBackupAriaHidden):i.removeAttribute("aria-hidden"));e=t?Utils.GetViableFocusTarget(Utils.moDisableFocusBackup[n].moLastActiveElement):null;e?e.focus():r.focus();delete Utils.moDisableFocusBackup[n];Utils.moDisableFocusBackup._Count=Utils.moDisableFocusBackup._Count-1}},GetViableFocusTarget:function(n){var e=function(n){return n.checkVisibility?n.checkVisibility({visibilityProperty:!0}):window.getComputedStyle(n).visibility!=="hidden"},u=function(n){return n.isConnected&&n.getClientRects().length>0&&!(n.closest&&n.closest(".PanelFolded"))&&e(n)},o=function(n){var i,t;if(!window.DeferInject||!n.closest)return!1;for(i=!1,t=n.closest(".InvisibleC");t;t=t.parentElement&&t.parentElement.closest(".InvisibleC"))t.id&&DeferInject.IsShowOnParentHover(t.id)&&
7(t.classList.remove("InvisibleC"),i=!0);return i},f=function(n){return u(n)||n.isConnected&&o(n)&&u(n)},t,i,r;if(!n)return null;if(f(n))return n;for(t=n.parentElement;t;t=t.parentElement)if(i=t.__oFocusFallbackTrigger,i&&(r=i.querySelector("a")||i,f(r)))return r;return null},IsDisabledFocusLayer:function(n){return Utils.moDisableFocusBackup&&n in Utils.moDisableFocusBackup},HasDisabledFocusLayer:function(){return Utils.moDisableFocusBackup&&Utils.moDisableFocusBackup._Count>0},GetParameterValueFromURL:function(n,t){n||(n=window.location.href);t=t.replace(/[\[\]]/g,"\\$&");var r=new RegExp("[?&]"+t+"(=([^&#]*)|&|#|$)"),i=r.exec(n);return i?i[2]?decodeURIComponent(i[2].replace(/\+/g," ")):"":null},AddOrUpdateUrlParameter:function(n,t,i){var r=n.indexOf("#"),e=r===-1?"":n.substr(r),u,f;return n=r===-1?n:n.substr(0,r),u=new RegExp("([?&])"+t+"=.*?(&|$)","i"),f=n.indexOf("?")!==-1?"&":"?",n=n.match(u)?n.replace(u,"$1"+t+"="+i+"$2"):n+f+t+"="+i,n+e},IsAbove:function(n,t){for(var f,r,e=!1,u=Utils.GetAncestors(n),o=Utils.GetAncestors(t),i=1;i<u.length;i++)if(u[i]!=o[i]){for(f=u[i-1],r=0;r<f.children.length;r++){if(f.children[r]==u[i]){e=!0;break}if(f.children[r]==o[i]){e=!1;break}}break}return e},GetAncestors:function(n){if(!n)return[];for(var t=[n];n.parentElement;)n=n.parentElement,t.push(n);return t.reverse()},GetNearestCommonAncestor:function(n,t){var u=null,r,f,i;if(n==t)u=n;else if(n&&t&&(r=Utils.GetAncestors(n),f=Utils.GetAncestors(t),r[0]==f[0]))for(i=1;i<r.length;i++)if(r[i]!=f[i]){u=r[i-1];break}return u},RoundRobin:function(n,t){if(t=t||0,n===undefined||n===null)n=[];else if(!Array.isArray(n))throw new Error("Expecting argument to RoundRobin to be an Array");return function(){return t>=n.length&&(t=0),n[t++]}},SetGridTableRowVisibility:function(n,t,i){$E(n).find(".grid-row-"+t).each(function(){var n=$(this),t=n.css("display")=="none";i?t&&n.css("display","unset"):t||n.css("display","none")})},SetGridTableListVisibility:function(n,t){for(var c,o,s,e,p=$E(n),h=p.find(".flex-item"),l=0,a=0,i=0;i<t.length;i++)if(t[i]!=-1){l=t[i];break}for(i=t.length-1;i>=0;i--)if(t[i]!=-1){a=t[i];break}for(c=h.length/2,o=-1,i=0;i<c;i++){var u=t[i],w=u!=-1,v=i*2,r=$(h[v]),f=$(h[v+1]),y=r.css("display")=="none";if(w){for(r.removeClass("flex-first-row flex-last-row flex-first-col flex-last-col"),f.removeClass("flex-first-row flex-last-row flex-first-col flex-last-col"),u==l?(r.addClass("flex-first-row"),f.addClass("flex-first-row")):u==a&&(r.addClass("flex-last-row"),f.addClass("flex-last-row")),(o==-1||o!=u)&&(o=u,r.addClass("flex-first-col")),s=-1,e=i+1;e<c;e++)if(t[e]!=-1){s=t[e];break}(s==-1||u!=s)&&f.addClass("flex-last-col");y&&(r.css("display","unset"),f.css("display","unset"))}else y||(r.css("display","none"),f.css("display","none"))}},GetSignalName:function(n,t){return n+"|"+t},IsInIFrame:function(){try{return window.self!==window.top}catch(n){return!1}},RegisterFrameEvents:function(){Utils.mbRegisteredFrameEvents||(Utils.mbRegisteredFrameEvents=!0,window.addEventListener("message",function(n){var i=n.data.Name,r,f,u,t,e;if(i==="CloseFrame"||i==="CloseTopPopup"){Utils.CloseTopLevelPopup();return}if(i==="FireNotification"){r=JSON.parse(n.data.Payload);Matrix3.ShowNotification(r.Message,r.Title,{timeout:r.Timeout,notificationType:r.Type,close:r.ShowClose,buttons:r.Buttons,id:r.NotificationID,theme:r.Theme,drag:!1});return}i==="DocumentLoaded"&&(t=Matrix3.moPopupTable[Utils.GetTopLevelPopup()],t&&!Utils.mbPreventHideLoading&&(t.moMark&&t.moMark.Hide(),$(t.moGlobalContainer).find("div[id$=':LoadingPnl']").remove()),Utils.mbPreventHideLoading&&(Utils.mbPreventHideLoading=!1));i==="PreventHideLoading"&&(Utils.mbPreventHideLoading=!0);i==="LoadScreenRecording"&&(t=Matrix3.moPopupTable[Utils.GetTopLevelPopup()],t&&Utils.GetFileHandle(Utils.Const.SCREEN_RECORD_FILE_NAME).then(function(n){return Utils.ReadFileFromOPFS(n).then(function(n){if(n){var t=Utils.ConvertDataURItoBlob(n,"video/webm");t&&Utils.FireToIFrameEvent("LoadRecording",t);Utils.moScreenRecordBlob=null}})}));i==="StartRecording"&&(Utils.DeleteFileInOPFS(Utils.Const.SCREEN_RECORD_FILE_NAME).then(function(){}),Utils.TriggerDebugRecording(n.data.Payload));i==="SendAjaxEvent"&&(f=n.data.Payload.EventName,u=n.data.Payload.Argument,u&&typeof u!="string"&&(u=JSON.stringify(u)),t=Matrix3.moPopupTable[Utils.GetTopLevelPopup()],t&&Matrix3.AddEventUsingDTO({sourceVForm:t.msID,sourceEvent:f,sourceType:Matrix3.Const.RETURNTYPE_VIEWSTATE,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:u}));i==="OpenNewTab"&&(e=n.data.Payload.Argument,window.open(e,"_blank"))}))},RegisterSourceToFrameEvents:function(n,t,i){if(!Utils.mbRegisteredSourceFrameEvents){Utils.mbRegisteredSourceFrameEvents=!0;var r=function(){document.fullscreenElement===null&&Matrix3.AddEventUsingDTO({sourceVForm:i,sourceEvent:"NOOPS",sourceType:Matrix3.Const.RETURNTYPE_VIEWSTATE,eventDelay:Matrix3.Const.DELAY_IMMEDIAT})};window.addEventListener("message",function(n){var f=n.data.Name,u,e,i;f==="LoadRecording"&&n.data.Payload&&(i=n.data.Payload,Utils.moScreenRecordBlob=i,u=$("div[id$='VideoPlayer'] video")[0],u.removeEventListener("fullscreenchange",r),u.addEventListener("fullscreenchange",r),Utils.LoadVideoElement(i,u));f==="UploadRecording"&&(e=n.data.Payload,i=Utils.moScreenRecordBlob,i&&t,i.name=e,t._uploadFile(i),Utils.moScreenRecordBlob=null)})}},RegisterRecordInAnotherTabWindowEvent:function(n){var u,i,t,r;if(Utils.IsStorageAvailable()&&(u=sessionStorage.getItem(Utils.Const.IS_SCREEN_RECORDING_KEY),u)){if(i=function(){sessionStorage.setItem(Utils.Const.UNLOAD_CURRENT_TAB,"1")},window.addEventListener("pagehide",i),window.addEventListener("beforeunload",i),Utils.mbRegisterRecordInAnotherTabWindowEvent)return;t=sessionStorage.getItem(Utils.Const.TAB_ID_KEY);t&&sessionStorage.getItem(Utils.Const.UNLOAD_CURRENT_TAB)!=="0"||(t=Utils.GenerateTabUniqueId(),sessionStorage.setItem(Utils.Const.TAB_ID_KEY,t));sessionStorage.setItem(Utils.Const.UNLOAD_CURRENT_TAB,"0");r=new BroadcastChannel(t);Utils.mbRegisterRecordInAnotherTabWindowEvent=!0;r.addEventListener("message",function(t){var f=t.data.Event,u,i;switch(f){case"StopRecording":Utils.ReadAndStoreFileToOPFS(new Blob([t.data.Payload],{type:"video/webm"}),Utils.Const.SCREEN_RECORD_FILE_NAME).then(function(){var t=sessionStorage.getItem(Utils.Const.SCREEN_RECORDING_REQUEST_KEY);
7Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:"FINISHED_SCREEN_RECORDING",sourceType:Matrix3.Const.RETURNTYPE_VIEWSTATE,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:t});sessionStorage.removeItem(Utils.Const.IS_SCREEN_RECORDING_KEY)}).catch(function(n){console.error(n)});break;case"CancelScreenRecording":i=sessionStorage.getItem(Utils.Const.SCREEN_RECORDING_REQUEST_KEY);Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:"CANCEL_SCREEN_RECORDING",sourceType:Matrix3.Const.RETURNTYPE_FULL,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:i});break;case"ShowLinkRequest":i=sessionStorage.getItem(Utils.Const.SCREEN_RECORDING_REQUEST_KEY);Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:"SHOW_SCREEN_RECORD_POPUP",sourceType:Matrix3.Const.RETURNTYPE_FULL,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:i});break;case"UnloadRecordingPage":setTimeout(function(){var r=t.data.Data,i;r.HasScreenRecording||localStorage.getItem("isRecording")||(i=sessionStorage.getItem(Utils.Const.SCREEN_RECORDING_REQUEST_KEY),Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:"CANCEL_SCREEN_RECORDING",sourceType:Matrix3.Const.RETURNTYPE_FULL,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:i}))},500);break;case"Refocus":window.name=sessionStorage.getItem(Utils.Const.TAB_ID_KEY);r.postMessage({Name:"FireFocus"});break;case"SendAjaxEvent":u=t.data.Payload.Event;i=t.data.Payload.Args;Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:u,sourceType:Matrix3.Const.RETURNTYPE_FULL,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:i})}})}},FireFrameEvent:function(n,t){if(Utils.IsInIFrame()){if(n=="DocumentLoaded"){var i=window.document.getElementsByTagName("html")[0];i.style.cssText=i.style.cssText+"; background-color: transparent !important;";i=window.document.getElementsByTagName("body")[0];i.style.cssText=i.style.cssText+"; background-color: transparent !important;";window.focus()}window.parent.postMessage({Name:n,Payload:t},"*")}},FireToIFrameEvent:function(n,t){var i=document.getElementById("link-frame");i.contentWindow.postMessage({Name:n,Payload:t},"*")},FireEventToOpener:function(n,t){window.opener&&window.opener.postMessage({Name:n,Payload:t},"*")},CloseTopLevelPopup:function(){var n=Matrix3.moPopupTable[Utils.GetTopLevelPopup()];n&&n.Remove(!1,!1,!1,!1)},CopyToClipboard:function(n,t,i,r){var f=function(){i||Matrix3.ShowNotification("Copied to clipboard",{theme:r,notificationType:"success"})},e,u;if(Utils.IsIE())u=document.createElement("textarea"),u.value=n,u.setAttribute("readonly",""),u.style={position:"absolute",left:"-9999px"},document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u),f();else{function i(n,t){return new Blob([t],{type:n})}t||(t=n);e=new clipboard.ClipboardItem({"text/html":new Blob([t],{type:"text/html"}),"text/plain":new Blob([n],{type:"text/plain"})});clipboard.write([e]).then(f)}},TriggerDebugRecording:function(n){typeof n!="string"&&(n=JSON.stringify(n));var t=Matrix3.moPopupTable[Utils.GetTopLevelPopup()];t&&Matrix3.AddEventUsingDTO({sourceVForm:t.msID,sourceEvent:"REQUEST_DEBUG_RECORDING",sourceType:Matrix3.Const.RETURNTYPE_VIEWSTATE,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,args:n})},SplitMultipleDelimiters:function(n,t){for(var i=n,r=0;r<t.length;r++)i=i.split(t[r]).join(",");return i.split(",")},IsStorageAvailable:function(){try{return typeof sessionStorage!="undefined"}catch(n){return!1}},SaveMainScrollPosition:function(n){var t=this.GetPopupContainer(n);t||(t=this.Form1());t&&(t.miStoredScrollTop=t.scrollTop)},RestoreMainScrollPosition:function(n){var t=this.GetPopupContainer(n),i;t||(t=this.Form1());t&&t.miStoredScrollTop&&t.miStoredScrollTop!==t.scrollTop&&(i=$PI(n),t.scrollTop=i?Math.min(t.miStoredScrollTop,PositionItem.getAbsoluteXY(i)[1]+i.GetHeight()-this.GetViewportHeight()):t.miStoredScrollTop)},IsEventSourceOutSideThis:function(n,t){var i=$Elt(n.msID);return i&&!i.contains(t.srcElement)},IsClickOnButton:function(n){var t=n.srcElement;return t.tagName.toLowerCase()==="a"||t.tagName.toLowerCase()==="button"},FormatDurationWithHour:function(n,t){var i=Math.floor(n/3600),u=Math.floor(n/60%60),f=Math.floor(n%60),r;return f=f>=10?f:"0"+f,u=u>=10?u:"0"+u,r=u+":"+f,t&&i===0?r="00:"+r:i>0&&(i<10&&(i="0"+i),r=i+":"+r),r},TriggerContextMenuOn:function(n,t){var i=document.getElementById(t);i&&(Utils.miHasManualContextMenu=!0,Utils.ShowContextMenu(n,t))},TriggerCloseContextMenu:function(){Utils.miHasManualContextMenu&&(Utils.miHasManualContextMenu=!1,Popup.CloseAllContextMenuPopup())},PrePrintPDFAsync:function(){var n,f,r,u,t,e,i,o;if(document.body.scrollIntoView(!1),Utils.GetDocument().scrollTo(0,Utils.GetDocument().scrollHeight),n=$("div[data-vf='DocumentTranscriptDisplay_VForm'] .Label"),n!=null&&n.length)for(f=$("div[data-vf='DocumentTranscriptDisplay_VForm'] > *[id]").map(function(n,t){return $(t).height()}).toArray().reduce(function(n,t){return n+t},0),f*=2;n!=null&&n.length;)n.height(f),n=n.parent();if(r=$("div[data-vf='DamView_Results_VForm'] > .PanelFloat:not([id$='FlagsPnl'])").last(),r){for(u=r.height(),t=r.parent(),t.height(u),t=t.parent(),t.height(u),t=t.parent(),t.height(u),e=$("div[data-vf='PrintDamView_VForm'] > *[id]").map(function(n,t){return $(t).height()}).toArray().reduce(function(n,t){return n+t},0),e*=2,i=$("div[data-vf='PrintDamView_VForm']").last();i!=null&&i.length;)i.height(e),i=i.parent();return document.body.scrollIntoView(!1),Utils.GetDocument().scrollTo(0,Utils.GetDocument().scrollHeight),o=Array.from(document.getElementsByTagName("img"),function(n){if(!n.complete)return new Promise(function(t,i){n.addEventListener("load",t);n.addEventListener("error",i)})}),Promise.all(o)}},ConvertTimeStringToMilliseconds:function(n,t){var r=!0,u=0,f,i;if(t=t||-1,t===-1&&(t=this.Const.BUSINESS_HOURS_PER_DAY),n&&n.trim().length>
70)if(n=n.replace(/\s+/g,""),f=/^(?:(\d+)d)?(?:(\d+)h)?(?:(\d+)m?)?(?:(\d+)s)?$/,i=n.match(f),i){var e=0,o=0,s=0,h=0;try{i[1]&&(e=parseInt(i[1],10));i[2]&&(o=parseInt(i[2],10));i[3]&&(s=parseInt(i[3],10));i[4]&&(h=parseInt(i[4],10))}catch(p){return{success:!1,result:0}}var c=Number.MAX_SAFE_INTEGER,l=e*t*36e5,a=o*36e5,v=s*6e4,y=h*1e3;if(u=l+a+v+y,u>c)return{success:!1,result:0};r=!0}else r=!1;return{success:r,result:u}},ConvertMillisecondsToTimeString:function(n){var o=1e3,i=60*o,r=60*i,s=24*r,h=Math.floor(n/s),u,f,e,t;return n%=s,u=Math.floor(n/r),n%=r,f=Math.floor(n/i),n%=i,e=Math.floor(n/o),t="",h>0&&(t+=h+"d "),u>0&&(t+=u+"h "),f>0&&(t+=f+"m "),(e>0||t==="")&&(t+=e+"s"),t.trim()},LoadVideoElement:function(n,t){var r=URL.createObjectURL(n),i=t;i&&(i.src=r,i.addEventListener("loadedmetadata",function(){(i.duration===Infinity||isNaN(Number(i.duration)))&&(i.currentTime=1e101,setTimeout(function(){i.currentTime=0},500))}))},GenerateTabUniqueId:function(){return"tab_"+Math.random().toString(36).substr(2,9)},GetFileHandle:function(n,t){return navigator.storage.getDirectory().then(function(i){return i.getFileHandle(n,t)})},WriteToOPFSFile:function(n,t){return n.createWritable().then(function(n){return n.write(t).then(function(){return n.close()})})},ReadAndStoreFileToOPFS:function(n,t){var i=new FileReader;return new Promise(function(r,u){i.onload=function(n){var i=n.target.result;Utils.GetFileHandle(t,{create:!0}).then(function(n){return Utils.WriteToOPFSFile(n,i)}).then(function(){r("File successfully stored in OPFS")}).catch(u)};i.onerror=function(){u("Error reading file")};i.readAsDataURL(n)})},ReadFileFromOPFS:function(n){return n.getFile().then(function(n){var t=new FileReader;return new Promise(function(i,r){t.onload=function(n){i(n.target.result)};t.onerror=function(){r("Error reading file")};t.readAsText(n)})})},DeleteFileInOPFS:function(n){return navigator.storage.getDirectory().then(function(t){return t.removeEntry(n)})},ConvertDataURItoBlob:function(n,t){for(var e,u=n.split(","),o=u[u.length-1],r=atob(o),f=new Array(r.length),i=0;i<r.length;i++)f[i]=r.charCodeAt(i);return e=new Uint8Array(f),new Blob([e],{type:t})},EnsureMinDelay:function(n,t){return Promise.all([n,new Promise(n=>setTimeout(n,t))]).then(n=>n[0])},FindAllFocusableElements:function(n,t){if(!n)return[];var i=[],u=Utils.Const.FOCUSABLE_SELECTORS,r=function(n){var h,e,o,s,f;if(n){if(n.nodeType===1&&n.matches){if(h=n.matches("[data-hidden], [hidden], [inert]")||n.style.display==="none"||n.style.visibility==="hidden",h)return;n.matches(u)&&(t?(e=n.getBoundingClientRect(),e.width>0&&e.height>0&&(o=window.getComputedStyle(n),o.visibility!=="hidden"&&o.display!=="none"&&i.push(n))):i.push(n))}for(n.shadowRoot&&r(n.shadowRoot),s=n.children||[],f=0;f<s.length;f++)r(s[f])}};return r(n),i},FindFirstFocusableElement:function(n,t){var r,i;if(!n)return null;for(r=Utils.FindAllFocusableElements(n,t),i=0;i<r.length;i++)if(r[i]!==n)return r[i];return null},FindLastFocusableElement:function(n){var i,t;if(!n)return null;for(i=Utils.FindAllFocusableElements(n),t=i.length-1;t>=0;t--)if(i[t]!==n)return i[t];return null},FindNextFocusableElement:function(n,t){if(!n||!t)return null;var i=Utils.FindAllFocusableElements(t),r=i.indexOf(n);return r>=0&&r<i.length-1?i[r+1]:null},ReplaceSkinFamily:function(n,t){$('link[href*="'+n+'"]').attr("href",t);PreloadMgr.Reset(!1);setTimeout(function(){EditableTable.ReFreezeAllTables()},50)}};Utils._forcedPreviewUA=function(n){switch(n){case"mobile":return{ua:"Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",platform:"iPhone"};case"tablet":return{ua:"Mozilla/5.0 (iPad; CPU OS 17_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Mobile/15E148 Safari/604.1",platform:"iPad"};default:return null}},function(){var t=navigator.userAgent,i=navigator.platform,n;try{n=Utils._forcedPreviewUA(new URLSearchParams(window.location.search).get("previewDevice"));n&&(t=n.ua,i=n.platform,Object.defineProperty(navigator,"userAgent",{get:function(){return n.ua},configurable:!0}),Object.defineProperty(navigator,"platform",{get:function(){return n.platform},configurable:!0}))}catch(r){}Utils._uaLower=t.toLowerCase();Utils._platformLower=i.toLowerCase()}();Utils._reTagWidth=new RegExp(Utils.Const.TAG_RESOLUTION_WIDTH,"g");Utils._reTagHeight=new RegExp(Utils.Const.TAG_RESOLUTION_HEIGHT,"g"),function(){Utils.LoadScript||(Utils.LoadScript=typeof UtilsLoadScript!="undefined"&&UtilsLoadScript?UtilsLoadScript:function(n,t,i,r){Utils.LoadScriptWithNonce(n,t,i,r,null)});Utils.EvalScripts||(Utils.EvalScripts=typeof UtilsEvalScripts!="undefined"&&UtilsEvalScripts?UtilsEvalScripts:function(n){Utils.EvalScriptsWithNonce(n,null)});Utils.EvalScriptsWithResult||(Utils.EvalScriptsWithResult=typeof UtilsEvalScriptsWithResult!="undefined"&&UtilsEvalScriptsWithResult?UtilsEvalScriptsWithResult:function(n){return Utils.EvalScriptsResultWithNonce(n,null)})}();CacheMgr.Const={MGR_NAME:"Cache"};CacheMgr.moSingleton=null;CacheMgr.GetInstance=function(){return CacheMgr.moSingleton||(CacheMgr.moSingleton=new CacheMgr),CacheMgr.moSingleton};CacheMgr.prototype={GetEl:function(n,t){var i=null;return n&&((n.nodeType||typeof n==typeof window&&window&&n==window)&&
7!t?i=n:(t&&n.id&&(n=n.id),n in this.moCache&&this.mbIsActive&&this.moCache[n].parentNode?i=this.moCache[n]:(i=document.getElementById(n),i&&(this.moCache[n]=i,Matrix3.RegisterInCache(n,CacheMgr))))),i},Refresh:function(){this.moCache={}},RefreshNode:function(n){delete this.moCache[n]},LoadCache:function(){for(var t=document.getElementsByTagName("div"),n=0,i=t.length;n<i;n++)t[n].id&&(this.moCache[t[n].id]=t[n],Matrix3.RegisterInCache(t[n].id,CacheMgr))}};ConstProperties.Const={LABEL_TEXT:"LT",DISABLED:"D",NAME:"N",EVENT:"E",POSTBACK_EVENT:"PostbackEvent",PLEASE_WAIT_MSG:"PleaseWaitMsg",VALUE:"V",TEXT:"Text",OPTION_LIST:"OptionList",FLASH_STYLE:"FS",FLASH_SCROLLABLE:"FlashScrollable",SCROLL_RESTRICTION:"ScrollRestriction",FLASH_ID:"FID",FLASH_PADDING:"FP",FLASH_PADDING_TOP:"FPT",FLASH_PADDING_RIGHT:"FPR",FLASH_PADDING_BOTTOM:"FPB",FLASH_PADDING_LEFT:"FPL",CMS_BLOCK_EDIT:"BCMS",CHILDREN_FLASH_STYLE:"CFS",SOURCE:"Source",TEMP_SOURCE:"TempSource",URL:"URL",IMAGE_HEIGHT:"ImageHeight",IMAGE_WIDTH:"ImageWidth",IMAGE_OVER:"ImageOver",IMAGE_OUT:"ImageOut",IMAGE_ERROR:"ImageError",LAYOUT:"Layout",CONTROL_EVENTS:"CE",CONTROL_ACTIONS:"CA",ETHEREAL:"Ethereal",ZINDEX:"ZIndex",PAGE_TRACKING:"PageTracking",EVENT_TRACKING:"EventTracking",SCROLL_TO_ME:"ScrollToMe",SCROLL_TO_ME_PADDING_TOP:"ScrollToMePaddingTop",ANIMATE_SCROLL_TO_ME:"AnimateScrollToMe",HANDLE:"Handle",FLASHVARS:"FlashVars",STAR:"Star",DESCRIPTION_TEXT:"DescriptionText",WARNING_TEXT:"WarningText",DATE_INTERVAL:"Interval",DATE_PERIOD_OPTIONS:"PeriodOptions",DATE_VALUE_TO:"ValueTo",DATE_USER_FORMAT:"UserFormat",DATE_SERVER_FORMAT:"ServerFormat",DATE_TIME:"DateTime",MAX_RESIZE_WIDTH:"MaxResizeWidth",MIN_RESIZE_WIDTH:"MinResizeWidth",MAX_RESIZE_HEIGHT:"MaxResizeHeight",MIN_RESIZE_HEIGHT:"MinResizeHeight",RESIZE_WIDTH:"ResizeWidth",RESIZE_HEIGHT:"ResizeHeight",AUTOLIMIT_RESIZE_HEIGHT:"AutoLimitResizeHeight",RESIZE_KEEP_RATIO:"ResizeKeepRatio",BLOCK_DRAG:"BlockDrag",DISABLE_MASK:"DisableMask",SCROLLBAR_SKIN:"ScrollBarSkin",IS_MENU:"IsMenu",CROP_WIDTH:"CropWidth",CROP_HEIGHT:"CropHeight",CROP_X:"CropX",CROP_Y:"CropY",CROP_DONT_KEEP_RATIO:"CropDontKeepRatio",CROP_SHOWCONTROLS:"CropShowControls",PROPERTY_FLOAT_SPACING:"FloatSpacing",PROPERTY_FLOAT_V_SPACING:"FloatVSpacing",PROPERTY_FLOAT_H_SPACING:"FloatHSpacing",PROPERTY_FLOAT_DIRECTION:"FloatDirection",PROPERTY_FLOAT_AUTO_SPACING:"FloatAutoSpacing",PROPERTY_FLOAT_AUTO_SIZE:"FloatAutoSize",PROPERTY_FLOAT_CENTER_ITEMS:"FloatCenterItems",PROPERTY_FLOAT_VERTICAL_CENTER_ITEMS:"FloatVerticalCenterItems",PROPERTY_FLOW_STRETCH_FACTOR:"FlowStretchFactor",PROPERTY_FLOW_MAX_ROWS:"FlowMaxRows",PROPERTY_IGNORE_IF_HIDDEN:"IgnoreIfHidden",PROPERTY_VALUE_HORIZONTAL:"horizontal",PROPERTY_VALUE_VERTICAL:"vertical",IN_PLACE_EDIT:"InPlaceEdit",COLUMNS_WIDTH:"CW",COLUMNS_CAN_GROW:"CCG",NEED_SIZE:"SizeNeeded",PROPERTY_INSTANCE_NAME:"InstanceName",SEQUENCE_LOADING_PREV:"SLP",SEQUENCE_LOADING_NEXT:"SLN",SEQUENCE_LOADING_CONTEXTUAL_TABLE:"SLCT",SEQUENCE_LOADING_LABEL:"SLLB",PROPERTY_SLIDESHOW_ID:"SlideshowID"};ConstValues.Const={T_STAR:"*",SUPER_CONTAINER:"SuperContainer",SCREEN:"screen",DEFAULT_LABEL_INPUT_SPACING:5,DEFAULT_AUTOCOMP_LIST_HEIGHT:300,SESSION_ID:"ASPSESSID",STANDARD_INPUT_HEIGHT:40,DISABLED_CONTROL_OPACITY:.5,ANNOTATION_TOOLS:"AnnotationTools",ANNOTATION_STATE:"AnnotationState",ANNOTATION_REMOVE:"AnnotationRemove",ANNOTATION_UNDO:"AnnotationUndo",ANNOTATION_REDO:"AnnotationRedo"};ControlHeap.prototype={GetSize:function(){return this.moArray.length},Add:function(n){if(n){var t=this.moArray.length,i,r;if(this.moPresenceHash.hasOwnProperty(n.GetId()))this.moPresenceHash[n.GetId()]!=n&&document.body.contains(n.GetNode())&&(this.Remove(this.moPresenceHash[n.GetId()]),this.Add(n));else{for(this.moArray[t]=n,i=t-1,i>>=1;t>0&&this.moArray[t].miDeep>this.moArray[i].miDeep;)r=this.moArray[t],this.moArray[t]=this.moArray[i],this.moArray[i]=r,t=i,i=t-1>>1;this.moPresenceHash[n.GetId()]=n}}},IsControlDirty:function(n){return this.moPresenceHash.hasOwnProperty(n.GetId())},Peek:function(){return this.moArray[0]},Pop:function(){var n=this.moArray[0];return this.moArray.length>1?(this.moArray[0]=this.moArray.pop(),this.BubbleUp(0),delete this.moPresenceHash[n.GetId()]):this.moArray.length==1&&(this.moArray=[],this.moPresenceHash={}),n},BubbleUp:function(n){for(var i=n,t,r,o=!1,u;!o;){t=i;t<<=1;t++;r=t;r++;var s=this.moArray[i].miDeep,f=0,e=0;this.moArray[t]!=null&&(f=this.moArray[t].miDeep-s);this.moArray[r]!=null&&(e=this.moArray[r].miDeep-s);f>=e&&f>0?(u=this.moArray[i],this.moArray[i]=this.moArray[t],this.moArray[t]=u,i=t):e>0?(u=this.moArray[i],this.moArray[i]=this.moArray[r],this.moArray[r]=u,i=r):o=!0}},Remove:function(n){var t,i;if(this.moPresenceHash.hasOwnProperty(n.GetId())&&this.moPresenceHash[n.GetId()]==n){for(t=0;this.moArray[t]!=n;)t++;t<this.moArray.length-1?(this.moArray[t]=this.moArray.pop(),this.BubbleUp(t)):this.moArray.pop();delete this.moPresenceHash[n.GetId()]}else{if(Utils.IndexOf(this.moArray,n)!=-1){for(t=0;this.moArray[t]!=n;)t++;t<this.moArray.length-1?(this.moArray[t]=this.moArray.pop(),this.BubbleUp(t)):this.moArray.pop();delete this.moPresenceHash[n.GetId()]}for(i in this.moPresenceHash)if(this.moPresenceHash[i]==n){delete this.moPresenceHash[i];break}}}};ControlMgr.moRootControl=null;ControlMgr.moSingleton=null;ControlMgr.Reset=function(){ControlMgr.moSingleton=null};ControlMgr.GetInstance=function(){return ControlMgr.moSingleton||(ControlMgr.moSingleton=new ControlMgr),ControlMgr.moSingleton};ControlMgr.FindControlChildren=function(n){for(var e,t,o,i,c,u=n.GetNode().childNodes,f=[],l=u.length,r=0;r<l;r++)f.push(u[r]);for(e=[];f.length>0;){if(t=f[0],f.shift(),o=!1,t.attributes&&t.attributes["class"]){i=t.attributes["class"].value;var s=i.indexOf(" CT"),a=i.indexOf("CT ")===0||i==="CT"||i.indexOf(" CT ")>-1||s>-1&&s===i.length-3,h=i.indexOf("DefaultPopupClass");(i.indexOf("ABS")>-1||a||i.indexOf("PanelLine")>-1||i.indexOf("PanelCol")>-1||h>-1||i.indexOf("PopupWrapper")>-1)&&(h!==-1&&t.id==""&&(t.id="ArtificialID_"+Math.floor(Math.random()*1e9)),t.attributes["data-p"]==null&&t.setAttribute("data-p","al,,0,b,,0,,,-1,,,-1,"),e.push(t),o=!0)}
7if(!o&&(t.nodeType==3?(n.maTextNodes==null&&(n.maTextNodes=[]),n.maTextNodes.push(t)):t.nodeType==1&&(i=$(t).attr("class"),i&&i=="BG"?n.moBgDiv=t:t.id==n.GetNode().id+"_img"?n.moLinkedImage=t:i=="FreeHtml"?(n.mbHasFreeHtml=!0,PostRenderMgr.GetInstance().AddFunction(function(){FreeHtmlContainer.Activate(n)},!1,!0)):(t.id==n.GetNode().id+"_Lbl"||i==="Value")&&PostRenderMgr.GetInstance().AddFunction(function(){LabelCtrl.Activate(n)},!1,!0)),u=t.childNodes,u))for(c=u.length,r=0;r<c;r++)f.push(u[r])}return e};ControlMgr.FindRootControl=function(){if(!ControlMgr.moRootControl){for(var n=$Elt("BodyContent").firstChild;n.id=="";)n=n.firstChild;ControlMgr.moRootControl=n}return ControlMgr.moRootControl};ControlMgr.Const={MGR_NAME:"Control"};ControlMgr.prototype={GetControl:function(n,t){if(!(n in this.moObjects)){var i=null;switch(t){case AudioCtrl.Const.CONTROL_NAME:i=new AudioCtrl(n);break;case AutoCompletionCtrl.Const.CONTROL_NAME:case"ParameterEnum":i=new AutoCompletionCtrl(n);break;case ButtonCtrl.Const.CONTROL_NAME:i=new ButtonCtrl(n);break;case ChartCtrl.Const.CONTROL_NAME:i=new ChartCtrl(n);break;case ChartV2Ctrl.Const.CONTROL_NAME:i=new ChartV2Ctrl(n);break;case CheckBoxCtrl.Const.CONTROL_NAME:case"ParameterBool":i=new CheckBoxCtrl(n);break;case CropCtrl.Const.CONTROL_NAME:i=new CropCtrl(n);break;case DataTableCtrl.Const.CONTROL_NAME:i=new DataTableCtrl(n);break;case DateCtrl.Const.CONTROL_NAME:i=new DateCtrl(n);break;case DropDownListCtrl.Const.CONTROL_NAME:i=new DropDownListCtrl(n);break;case RatingCtrl.Const.CONTROL_NAME:i=new RatingCtrl(n);break;case FlashCtrl.Const.CONTROL_NAME:i=new FlashCtrl(n);break;case ImageCtrl.Const.CONTROL_NAME:i=new ImageCtrl(n);break;case LabelCtrl.Const.CONTROL_NAME:i=new LabelCtrl(n);break;case WebComponentCtrl.Const.CONTROL_NAME:i=new WebComponentCtrl(n);break;case MenuCtrl.Const.CONTROL_NAME:i=new MenuCtrl(n);break;case PanelAdvancedCtrl.Const.CONTROL_NAME:case PanelAdvancedCtrl.Const.CONTROL_NAME_SIMPLE:i=new PanelAdvancedCtrl(n);break;case RadioButtonListCtrl.Const.CONTROL_NAME:i=new RadioButtonListCtrl(n);break;case TextAreaCtrl.Const.CONTROL_NAME:case"ParameterStr":i=new TextAreaCtrl(n);break;case TextBoxCtrl.Const.CONTROL_NAME:i=new TextBoxCtrl(n);break;case TextBoxPasswordCtrl.Const.CONTROL_NAME:i=new TextBoxPasswordCtrl(n);break;case HyperlinkCtrl.Const.CONTROL_NAME:i=new HyperlinkCtrl(n);break;case PanelTableCtrl.Const.CONTROL_NAME:i=new PanelTableCtrl(n);break;case UploadCtrl.Const.CONTROL_NAME:i=new UploadCtrl(n);break;case UploadFieldCtrl.Const.CONTROL_NAME:i=new UploadFieldCtrl(n);break;case Popup.Const.CONTROL_NAME:i=new Popup($Elt(n),!0);break;case MapCtrl.Const.CONTROL_NAME:i=new MapCtrl(n);break;case MapMarkerCtrl.Const.CONTROL_NAME:i=new MapMarkerCtrl(n);break;case TimeCtrl.Const.CONTROL_NAME:i=new TimeCtrl(n);break;case HiddenCtrl.Const.CONTROL_NAME:i=new HiddenCtrl(n);break;case VideoCtrl.Const.CONTROL_NAME:i=new VideoCtrl(n);break;case PanelColCtrl.Const.CONTROL_NAME:i=new PanelColCtrl(n);break;case SlideshowCtrl.Const.CONTROL_NAME:i=new SlideshowCtrl(n);break;default:throw"Cannot find the control "+t+" ("+n+")";}this.moObjects[n]=i;Matrix3.RegisterInCache(n,ControlMgr)}return this.moObjects[n]},Refresh:function(){this.moObjects={}},RefreshNode:function(n){var t,r,i;if(this.moObjects[n]&&(t=this.moObjects[n],t.moActiveEffect&&t.moActiveEffect.stop(!1),delete this.moObjects[n],t.Event_ShowTimers))for(r in t.Event_ShowTimers)clearTimeout(t.Event_ShowTimers[r]);i=this.moHash[n];i&&(i.CleanDependencies(),this.RemovePositionItem(n));n in EventControlAction_ClickHandlers&&delete EventControlAction_ClickHandlers[n]},CreateControl:function(n,t,i){var u,nt,w,e,o,s,p,k,l,a,d,f,h,g,y,c,r;if(i==null&&(i=0),w=!1,n==null?(u=ControlMgr.FindRootControl(),w=!0):u=n,e=$(u),e.attr("data-r"))try{o=JSON.parse(e.attr("data-r"))}catch(tt){o={};Matrix3.LogError("Unable to parse data-r for control "+u.id+" (value = "+e.attr("data-r")+")",!0)}var v=[],b=[],it=",";try{y=PositionItem.GetType($(u).attr("class"))}catch(tt){Matrix3.LogError("Unable to determine the control type from div: "+u.id+" (Html = "+u.parentNode.innerHTML+"). Error: "+tt)}if(c="",e.hasClass("ABS")&&(s=ControlMgr.GetInstance().GetPositionItem(u.id),s!=null)){if(u.hasAttribute("data-p-refresh")||(c=e.attr("data-p",$(s.GetNode()).attr("data-p"))),o)for(p in s.moProperties)o.hasOwnProperty(p)||(o[p]=s.moProperties[p]);else o=s.moProperties;s.mbParentIsFreeHtml&&(u.mbParentIsFreeHtml=!0);e.attr("slot",$(s.GetNode()).attr("slot"));k=s.GetNode();k&&Array.from(k.attributes).map(function(n){return n.nodeName}).filter(function(n){return n&&n.startsWith("data-persistent-")&&!u.hasAttribute(n)}
7).forEach(function(n){e.attr(n,$(s.GetNode()).attr(n))})}for(e.attr("data-p")?c=e.attr("data-p"):e.attr("data-p","al,,0,b,,0,,,-1,,,-1,"),r=c.split(it),M3IECompatMode&&(u=new HTMLElement(u)),l=ControlMgr.FindControlChildren(u,i),w&&(this.moRootPositionItem=u),u.Setup(u.GetNode(),y,r[0],r[2],r[3],r[5],r[8],r[11],r[1],r[4],r[6],r[9],r[7],r[10],o),this.moPropertyQueue.push(u),t!=null?(u.SetDeep(t.miDeep+1),u.moParent=t):u.SetDeep(i),l.length>0&&(v.push(u),b.push(l)),t!=null&&t.GetContainerForChildren().push(u),this.AddPositionItem(u),nt=u;v.length>0;){a=v.shift();d=b.shift();for(f in d){f=d[f];o=null;h=$(f);g=h.attr("class");try{y=PositionItem.GetType(g)}catch(tt){Matrix3.LogError("Unable to determine the control type from div: "+f.id+" (Html = "+f.parentNode.innerHTML+"). Error: "+tt)}if(f!=null){if(c="",h.attr("data-p")&&(c=h.attr("data-p")),r=c.split(it),h.attr("data-r"))try{o=JSON.parse(h.attr("data-r"))}catch(tt){o={};Matrix3.LogError("Unable to parse data-r for control "+f.id+" (value = "+h.attr("data-r")+")",!0)}M3IECompatMode&&(f=new HTMLElement(f));l=ControlMgr.FindControlChildren(f,a.miDeep+1);f.Setup(f.GetNode(),y,r[0],r[2],r[3],r[5],r[8],r[11],r[1],r[4],r[6],r[9],r[7],r[10],o,a);h.hasClass("IFH")&&(f.mbParentIsFreeHtml=!0);g.indexOf("PopupContentClass")>-1&&(f.mbNoPaddingCache=!0,f.mbIsPopupRoot=!0);this.moPropertyQueue.push(f);f.miDeep=a.miDeep+1;l.length>0&&(v.push(f),b.push(l));a.GetContainerForChildren().push(f);this.AddPositionItem(f)}}}return nt},ApplyPropertyQueue:function(){for(var n=0,t=this.moPropertyQueue.length;n<t;n++)this.moPropertyQueue[n].ApplyProperties();this.moPropertyQueue=[]},AddReference:function(n,t){var r,i;n!=null&&(!this.moNewReferences.hasOwnProperty(n)&&this.moReferences.hasOwnProperty(n)&&n!=ConstValues.Const.SUPER_CONTAINER&&(r=this.moReferences[n]),this.moReferences[n]=t,this.moNewReferences[n]=t,i=Utils.GetRootOrPopupId(t.id),this.moPopupReferences[n]||(this.moPopupReferences[n]={}),this.moPopupReferences[n][i]=t)},RemoveReference:function(n,t){this.moNewReferences.hasOwnProperty(n)||(delete this.moReferences[n],this.moPopupReferences[n]&&delete this.moPopupReferences[n][Utils.GetRootOrPopupId(t)])},Get:function(n){return this.moObjects[n]},GetReference:function(n){return this.moReferences[n]},GetPopupReference:function(n,t){var i=null,r=Utils.GetRootOrPopupId(t);return this.moPopupReferences[n]&&this.moPopupReferences[n][r]&&(i=this.moPopupReferences[n][r]),i},GetAllPositionItems:function(){return this.moHash},GetAllControls:function(){return this.moObjects},AddPositionItem:function(n){var i=n.GetId(),t;this.moHash.hasOwnProperty(i)?this.moOldHash[i]=this.moHash[i]:this.moNewHash[i]=n;this.moHash[i]=n;n.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL&&(t=n.GetAlternativeID(),t!=null&&(this.moHash.hasOwnProperty(t)&&(this.moOldHash[t]=this.moHash[t]),this.moHash[t]=n))},GetRootPositionItem:function(){return this.moRootPositionItem},GetPositionItem:function(n,t){var i=null;return n!=null&&(i=t?this.moOldHash[n]:this.moHash[n]),i},RemovePositionItem:function(n){var t=n,r,i;n.GetId&&(t=n.GetId());t in this.moOldHash||t in this.moNewHash||(delete this.moHash[t],Matrix3.RemoveCleanupCallback(t,ControlMgr.Const.MGR_NAME),n.GetProperty&&(r=n.GetProperty(ConstProperties.Const.FLASH_ID),r!=null&&this.RemoveReference(r,t)));n.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL&&n.GetAlternativeID&&(i=n.GetAlternativeID(),i!=null&&(i in this.moOldHash||delete this.moHash[i]))},ClearOldInstance:function(){var t,n,i;for(t in this.moNewHash)n=this.moNewHash[t],i=n&&n.GetNode?n.GetNode():n,i&&!i.isConnected&&(this.moHash.hasOwnProperty(t)&&delete this.moHash[t],n.NullifyDomReferences());for(t in this.moOldHash)n=this.moOldHash[t],i=n&&n.GetNode?n.GetNode():n,i&&!i.isConnected&&n.NullifyDomReferences();this.moOldHash={};this.moNewReferences={};this.moNewHash={}},RemoveOrphanNewPositionItem:function(n){var i=n+".",r=n+":";for(var t in this.moNewHash)(t===n||t.startsWith(i)||t.startsWith(r))&&delete this.moNewHash[t]},ReInit:function(){ControlMgr.moSingleton=new ControlMgr}};ControlsUtils.moSingleton=null;ControlsUtils.GetInstance=function(){return ControlsUtils.moSingleton||(Control
7sUtils.moSingleton=new ControlsUtils),ControlsUtils.moSingleton};ControlsUtils.prototype={GetAdvencedPosKeywordsRegex:function(){return this.moKeywords}};CtrlEventMgr.moSingleton=null;CtrlEventMgr.GetInstance=function(){return CtrlEventMgr.moSingleton||(CtrlEventMgr.moSingleton=new CtrlEventMgr),CtrlEventMgr.moSingleton};CtrlEventMgr.Const={ALL:"*",SUFFIX_SETUP:"_Setup",MGR_NAME:"CtrlEvent"};CtrlEventMgr.prototype={AddEvent:function(n,t,i,r,u){if(n[t+CtrlEventMgr.Const.SUFFIX_SETUP]&&n[t+CtrlEventMgr.Const.SUFFIX_SETUP].call(n,u),n[t]instanceof CtrlEvent){n[t].Subscribe(function(n){CtrlEventMgr.GetInstance().Broadcast(i,r,null,n)});var f=n[t].moUnregisterFunc;typeof f=="function"&&(Matrix3.RegisterInCache(n.msID,CtrlEventMgr),this.moUnregisterFuncs[n.msID]instanceof Array||(this.moUnregisterFuncs[n.msID]=[]),this.moUnregisterFuncs[n.msID].push(f))}else n[t]instanceof Array&&n[t][n[t].length-1].Subscribe(function(n){CtrlEventMgr.GetInstance().Broadcast(i,r,null,n)})},AddAction:function(n,t,i,r,u){var f=function(i){if(n[t])try{n[t].moEventArguments=i;n[t](u)}finally{n[t].moEventArguments=undefined}};this.moObjectReference[n.msID]instanceof Array||(this.moObjectReference[n.msID]=[]);n[t+CtrlEventMgr.Const.SUFFIX_SETUP]&&n[t+CtrlEventMgr.Const.SUFFIX_SETUP](u);this.moBroadcastToChannel[i]||(this.moBroadcastToChannel[i]={});this.moBroadcastToChannel[i][r]||(this.moBroadcastToChannel[i][r]=[]);this.moBroadcastToChannel[i][r].push(f);this.moObjectReference[n.msID].push([i,r,this.moBroadcastToChannel[i][r].length-1]);Matrix3.RegisterInCache(n.msID,CtrlEventMgr);this.moChannelToBroadcast[r]||(this.moChannelToBroadcast[r]={});this.moChannelToBroadcast[r][i]||(this.moChannelToBroadcast[r][i]=[]);this.moChannelToBroadcast[r][i].push(f)},Broadcast:function(n,t,i,r){var s,o,h,u,f,e;if(i||t!="site-wide"){if(CtrlEventMgr.Const.ALL in this.moBroadcastToChannel){o=this.moBroadcastToChannel[CtrlEventMgr.Const.ALL];for(s in o)if(u=this.moBroadcastToChannel[n][s],u instanceof Array)for(f=0,e=u.length;f<e;f++)u[f]&&u[f](r)}if(CtrlEventMgr.Const.ALL in this.moChannelToBroadcast){o=this.moChannelToBroadcast[CtrlEventMgr.Const.ALL];for(h in o)if(u=this.moChannelToBroadcast[t][h],u instanceof Array)for(f=0,e=u.length;f<e;f++)u[f]&&u[f](r)}if(this.moBroadcastToChannel[n]&&this.moBroadcastToChannel[n][t]&&(u=this.moBroadcastToChannel[n][t],u instanceof Array))for(f=0,e=u.length;f<e;f++)u[f]&&u[f](r)}else Utils.IsStorageAvailable()&&(sessionStorage.setItem("SiteWideBroadcast",n),sessionStorage.setItem("SiteWideBroadcast",""))},RefreshNode:function(n){var i=this.moObjectReference[n],u,t,r;if(i)for(t=0,r=i.length;t<r;t++)this.moChannelToBroadcast[i[t][1]][i[t][0]][i[t][2]]=null,this.moBroadcastToChannel[i[t][0]][i[t][1]][i[t][2]]=null;if(u=this.moUnregisterFuncs[n],u)for(t=0,r=u.length;t<r;t++)u[t]()}};CtrlEvent.prototype={Subscribe:function(n){this.mbActivatedEvt||(this.moActivatedFunc&&this.moActivatedFunc.call(this.moObject),this.mbActivatedEvt=!0);this.moFunc.push(n)},Fire:function(n){for(var t=0,i=this.moFunc.length;t<i;t++)this.moFunc[t](n)}};Dependency.Const={TYPE_PARENT:0,TYPE_PREVIOUS:1,TYPE_REFERENCE:2,TYPE_SCREEN:3,SUBTYPE_NONE:-1,SUBTYPE_POS:0,SUBTYPE_SIZE:1,ALIGNMENT_NONE:-1,ALIGNMENT_TOP:0,ALIGNMENT_ALIGN_TOP:1,ALIGNMENT_CENTER:2,ALIGNMENT_ALIGN_BOTTOM:3,ALIGNMENT_BOTTOM:4,ALIGNMENT_LEFT:5,ALIGNMENT_ALIGN_LEFT:6,ALIGNMENT_ALIGN_RIGHT:7,ALIGNMENT_RIGHT:8,ALIGNMENT_INTERNAL:9,ALIGNMENT_WIDTH:10,ALIGNMENT_HEIGHT:11,ALIGNMENT_GLOBAL_TOP:12,ALIGNMENT_GLOBAL_LEFT:13,AXIS_X:0,AXIS_Y:1};Dependency.StringAlignmentToInt=function(n){var t=Dependency.ConstALIGNMENT_NONE;if(n===Dependency.Const.ALIGNMENT_GLOBAL_TOP||n===Dependency.Const.ALIGNMENT_GLOBAL_LEFT)return n;if(Utils.IsStringFilled(n))switch(n){case PositionItem.Const.XTYPE_TO_LEFT:t=Dependency.Const.ALIGNMENT_LEFT;break;case PositionItem.Const.XTYPE_ALIGN_LEFT:t=Dependency.Const.ALIGNMENT_ALIGN_LEFT;break;case PositionItem.Const.XTYPE_CENTER:t=Dependency.Const.ALIGNMENT_CENTER;break;case PositionItem.Const.XTYPE_TO_RIGHT:t=Dependency.Const.ALIGNMENT_RIGHT;break;case PositionItem.Const.XTYPE_ALIGN_RIGHT:t=Dependency.Const.ALIGNMENT_ALIGN_RIGHT;break;case PositionItem.Const.YTYPE_TO_TOP:t=Dependency.Const.ALIGNMENT_TOP;break;case PositionItem.Const.YTYPE_ALIGN_TOP:t=Dependency.Const.ALIGNMENT_ALIGN_TOP;break;case PositionItem.Const.YTYPE_CENTER:t=Dependency.Const.ALIGNMENT_CENTER;break;case PositionItem.Const.YTYPE_TO_BOTTOM:t=Dependency.Const.ALIGNMENT_BOTTOM;break;case PositionItem.Const.YTYPE_ALIGN_BOTTOM:t=Dependency.Const.ALIGNMENT_ALIGN_BOTTOM;break;case PositionItem.Const.WIDTHTYPE_INTERNAL:t=Dependency.Const.ALIGNMENT_INTERNAL;break;case PositionItem.Const.HEIGHTTYPE_INTERNAL:t=Dependency.Const.ALIGNMENT_INTERNAL;break;case PositionItem.Const.TYPE_WIDTH:t=Dependency.Const.ALIGNMENT_WIDTH;break;case PositionItem.Const.TYPE_CONTENT_WIDTH:t=Dependency.Const.ALIGNMENT_WIDTH;break;case PositionItem.Const.TYPE_HEIGHT:t=Dependency.Const.ALIGNMENT_HEIGHT;break;default:t=Dependency.Const.ALIGNMENT_NONE}return t};
7Dependency.prototype={ReplaceSource:function(n,t){this.moSource!==n&&(t==null&&(t=!0),this.miAxis==Dependency.Const.AXIS_X?(t&&this.moSource.RemoveXDependent(this),this.moSource=n,this.moSource.AddXDependent(this)):(t&&this.moSource.RemoveYDependent(this),this.moSource=n,this.moSource.AddYDependent(this)))},ReplaceDestination:function(n,t){t==null&&(t=!0);this.miAxis==Dependency.Const.AXIS_X?(t&&this.moDest.RemoveXSource(this),this.moDest=n,this.moDest.AddXSource(this)):(t&&this.moDest.RemoveYSource(this),this.moDest=n,this.moDest.AddYSource(this))},Delete:function(n,t){n==null&&(n=!0);t==null&&(t=!0);this.miAxis==Dependency.Const.AXIS_X?(n&&this.moSource.RemoveXDependent(this),t&&this.moDest.RemoveXSource(this)):(n&&this.moSource.RemoveYDependent(this),t&&this.moDest.RemoveYSource(this))},GetSource:function(){return this.moSource},GetDestination:function(){return this.moDest},GetType:function(){return this.miType},GetSubType:function(){return this.miSubType},GetAlignment:function(){return this.miAlignment},GetAxis:function(){return this.miAxis},toString:function(){var n=new StringBuilder;return n.append(this.moSource.GetId()+" to "+this.moDest.GetId()+" type "+this.miType),n.toString()}};HistoryMgr.moInstance=null;HistoryMgr.GetInstance=function(){return HistoryMgr.moInstance||(HistoryMgr.moInstance=new HistoryMgr),HistoryMgr.moInstance};HistoryMgr.prototype={Init:function(){this.msCurrentH=this.msOriginH=Matrix3.msURL;this.msCurrentEquivalentURL=Matrix3.msURL;window.onhashchange=function(n){var t=new URL(n.newURL),i=window.location.hash;t&&(i=t.hash);HistoryMgr.GetInstance().HashChanged(i)};window.onpopstate=function(n){var u,f,t,i,r,e;if(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[onpopstate]",n,JSON.stringify(n.state),n.type,JSON.stringify(n)),u=!window.iPreventClosingPopup,Matrix3.maPopupStack.length>0&&n.state&&n.state.popupState&&typeof n.state.popupState=="string"&&n.state.popupState.indexOf(Popup.Const.STATE_POPUP_PREFIX)>-1)if(window.iPreventClosingPopup>0)window.iPreventClosingPopup--;else{for(t=Matrix3.maPopupStack.length-1;t>=0;){if(f=Matrix3.maPopupStack[t],!$PI(f).GetProperty(Popup.Const.PROP_DISABLE_HISTORY))break;t--}t>=0&&(u=!1,Matrix3.moPopupTable[f].Remove(!1,!0,!0))}else window.iPreventClosingPopup>0&&window.iPreventClosingPopup--;if(i=HistoryMgr.GetInstance().moPendingStates,HistoryMgr.GetInstance().moPendingStates=[],i&&i.length>0)for(r=0;r<i.length;r++)window.history.pushState(i[r],window.document.title,window.location.href);window.history.state&&window.history.state.popupState&&window.history.state.popupState==Popup.Const.STATE_POPUP_PREFIX+"0"&&(e=window.history.state,e.popupState=undefined,window.history.replaceState(e,window.document.title,window.location.href));!window.bInPopState&&u&&(window.bInPopState=!0,window.location.href=window.location.href,window.bInPopState=!1)}},HashChanged:function(n){var r=!1,i,t,u,f;if(n&&n!="#/"&&n!="#/."?n.substring(0,8).toLowerCase()=="#anchor_"?(i=n.substring(1),t=$('[name="'+i+'"]'),t.length&&$PI(t[0].id).ScrollToMe(!0)):n[1]!="/"?(i=n.substring(1),t=$('[name="'+i+'"]'),t.length&&$PI(t[0].id).ScrollToMe(!0)):(n=n.substring(2),r=!0):(n=this.msOriginH,r=!0),decodeURIComponent(n)!=decodeURIComponent(this.msCurrentH)&&r==!0)try{this.msCurrentEquivalentURL=null;u=HistoryMgr.GetURLFromH(n);f=new URL(u);HistoryMgr.GetBaseURL().indexOf(f.origin)===0&&(this.msCurrentH=n,Matrix3.LoadFullPage(u))}catch(e){console.log(e)}},UpdateHash:function(n,t){var i,r,u;if(n&&n!=this.msOriginH||(n=""),n.substring(0,1)=="/"){if(i=n.substring(1),r=i.substring(0,7),r!="http://"&&r!="https:/"&&(i=HistoryMgr.GetBaseURL()+i),i.indexOf(HistoryMgr.GetBaseURL())!==0){console.warn("The new URL is not in the same origin, skip updating URL. New URL: "+i+", Base URL: "+HistoryMgr.GetBaseURL());return}u={url:i};t?history&&history.replaceState&&history.replaceState(u,"",i):history&&history.pushState&&history.pushState(u,"",i);this.msCurrentEquivalentURL=i}else this.msCurrentEquivalentURL=null,this.msCurrentH=n,window.location.hash="#/"+n},UpdateParameter:function(n,t){if(!(history&&history.replaceState)){console.log("This browser doesn't support history.replaceState");return}var u=new URL(window.location.href),i=u.searchParams,r=!1;t?i.has(n)?i.get(n)==t||(r=!0,i.set(n,t)):(r=!0,i.append(n,t)):i.has(n)&&(r=!0,i.delete(n));r&&history.replaceState(window.history.state,document.title,u.href)},GetCurrentURL:function(){return this.msCurrentEquivalentURL?this.msCurrentEquivalentURL:this.msCurrentH?HistoryMgr.GetURLFromH(this.msCurrentH):Matrix3.msURL},PreventClosingPopup:function(){isNaN(window.iPreventClosingPopup)?window.iPreventClosingPopup=1:window.iPreventClosingPopup++},AnyOnpopstateEventLeft:function(){return window.iPreventClosingPopup?!0:!1},AnyPopupStateLeft:function(){var t=!1,n=window.history.state,i,r;return n&&n.popupState&&typeof n.popupState=="string"&&n.popupState.indexOf(Popup.Const.STATE_POPUP_PREFIX)>-1&&n.popupState!=Popup.Const.STATE_POPUP_PREFIX+"0"&&(i=+n.popupState.substring(Popup.Const.STATE_POPUP_PREFIX.length)||0,r=window.iPreventClosingPopup||0,t=i>r),t},AddPendingState:function(n){this.moPendingStates||(this.moPendingStates=[]);this.moPendingStates.push(n)},DisablePopupState:function(){if(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[Disable Popup History]"),this.moDisabledPopupIDs||(this.moDisabledPopupIDs={}),Matrix3.maPopupStack)for(var n=0;n<Matrix3.maPopupStack.length;n++)this.moDisabledPopupIDs[Matrix3.maPopupStack[n]]=!0},IsDisabledPopupState:function(n){return this.moDisabledPopupIDs?this.moDisabledPopupIDs.hasOwnProperty(n):!1}};HistoryMgr.GetBaseURL=function(){if("baseURI"in document)return document.baseURI;var n=document.getElementsByTagName("base");return n.length>0?n[0].href:window.location.href};HistoryMgr.GetURLFromH=function(n){var t,i=n.substring(0,7);return i!="http://"&&i!="https:/"?(t=HistoryMgr.GetBaseURL(),n.startsWith("Redirect/")||n.startsWith("redirect/")?(n=n.substring(9),t+=n):t+=t.substring(0,7)=="http://"?"C.aspx?VP3="+n:"CS.aspx?VP3="+n):t=n,t};HistoryMgr.PushPopupState=function(n,t){var u=$PI(n),i,r;u.GetProperty(Popup.Const.PROP_DISABLE_HISTORY)||window.history&&window.history.pushState&&(HistoryMgr.GetInstance().IsDisabledPopupState(n)||(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[PushPopupState] Push state for popup. Current state = "+JSON.stringify(history.state)),i=window.history.state||{},i.popupState&&(typeof i.popupState!="string"||i.popupState.indexOf(Popup.Const.STATE_POPUP_PREFIX)!=-1)||(i.popupState=Popup.Const.STATE_POPUP_PREFIX+"0",window.history.replaceState(i,window.document.title,window.location.href)),r=+i.popupState.substring(Popup.Const.STATE_POPUP_PREFIX.length)+1,HistoryMgr.GetInstance().AnyOnpopstateEventLeft()?(window.iPreventClosingPopup&&r-window.iPreventClosingPopup>0&&(r-=window.iPreventClosingPopup),i.popupState=Popup.Const.STATE_POPUP_PREFIX+r,HistoryMgr.GetInstance().AddPendingState(i)):t?window.history.replaceState(i,window.document.title,t):(i.popupState=Popup.Const.STATE_POPUP_PREFIX+r,window.history.pushState(i,window.document.title,window.location.href))))};ImageMgr.ControlImageLoaded=function(n,t){var i,r,u;delete ImageMgr.GetInstance().maLoadingQueue[t.GetId()];ImageMgr.GetInstance().miCpt--;i=t.moLinkedImage;i!=null&&(r=i.width,u=i.height,(i.miImgW!=r||i.miImgH!=u)&&(i.miImgW=r,i.miImgH=u,t.GetOriginalWidth()==-1||t.GetOriginalHeight()==-1?(PositionMgr.GetInstance().AddToDirtyXList(t),PositionMgr.GetInstance().AddToDirtyYList(t),t.ForceHasChanged(),ImageMgr.GetInstance().miTimeout?ImageMgr.GetInstance().miCpt==0&&(clearTimeout(ImageMgr.GetInstance().miTimeout),ImageMgr.GetInstance().miTimeout=setTimeout(function(){ImageMgr.LaunchRepositioning()},10)):ImageMgr.GetInstance().miTimeout=ImageMgr.GetInstance().miCpt>0?setTimeout(function(){ImageMgr.LaunchRepositioning()},500):setTimeout(function(){ImageMgr.LaunchRepositioning()},10)):t.moProperties&&t.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&(AutoScaleProperties.Apply(t),Matrix3.HasEventsInProgress()||DOMChangesQueue.GetInstance().ApplyQueue())))};ImageMgr.LaunchRepositioning=function(){ImageMgr.GetInstance().miTimeout=null;Matrix3.HasEventsInProgress()||PositionMgr.GetInstance().CalculatePosition()};ImageMgr.Const={MGR_NAME:"Image"};ImageMgr.moSingleton=null;ImageMgr.GetInstance=function(){return ImageMgr.moSingleton||(ImageMgr.moSingleton=new ImageMgr),ImageMgr.moSingleton};ImageMgr.prototype={Push:function(n,t){var i=t.HasProperty(AutoScaleProperties.Const.PROPERTY_POLICY),r=t.HasProperty("DocumentWidth"),u=t.GetOriginalWidth()!=-1&&t.GetOriginalHeight()!=-1;(!i||r)&&u||this.maLoadingQueue.hasOwnProperty(t.GetId())||(this.maLoadingQueue[t.GetId()]=!0,this.miCpt++,n.complete?ImageMgr.ControlImageLoaded({},t):(Utils.AddEvent(n,"load",ImageMgr.ControlImageLoaded,this,t),n.addEventListener("error",function(){delete ImageMgr.GetInstance().maLoadingQueue[t.GetId()];ImageMgr.GetInstance().miCpt--})))}};PositionItem.Const={PROPERTY_ADVANCED_X:"aFx",PROPERTY_ADVANCED_Y:"aFy",PROPERTY_ADVANCED_WIDTH:"aFw",PROPERTY_ADVANCED_HEIGHT:"aFh",PROPERTY_ADVANCED_VISIBILITY:"AdvancedVisibilityExp",PROPERTY_POPUP_SHRINKABLE:"PopupShrinkable",KEY_PREVIOUS:"_PREVIOUS_",KEY_DEFAULT:"_DEFAULT_",XTYPE_TO_RIGHT:"r",XTYPE_TO_LEFT:"l",XTYPE_ALIGN_RIGHT:"ar",XTYPE_ALIGN_LEFT:"al",XTYPE_CENTER:"c",TYPE_WIDTH:"width",TYPE_CONTENT_WIDTH:"contentWidth",TYPE_HEIGHT:"height",YTYPE_TO_TOP:"t",YTYPE_TO_BOTTOM:"b",YTYPE_ALIGN_TOP:"at",YTYPE_ALIGN_BOTTOM:"ab",YTYPE_CENTER:"c",WIDTHTYPE_INTERNAL:"i",HEIGHTTYPE_INTERNAL:"i",L_FLOAT_LAYOUT:"float",REF_AUTO:"_auto",REF_PARENT:"_parent",REF_CHILDREN:"_children",REF_TEXT:"_text",REF_MAX_CONTENT:"_maxcontent",REF_SCREEN:"screen",REF_ANCESTOR_PREFIX:"_ancestor:",REF_BRO_PREFIX:"_bro:",REF_REFERENCE_PREFIX:"_ref:",REF_POPUP_REFERENCE_PREFIX:"_popupref:",REF_SELFWIDTH:"_selfwidth",REF_SELFHEIGHT:"_selfheight",DEFAULT_SCROLLBAR_SKIN:"ScrollBar_Default",POSITIONING_LOOP_THRESHOLD:500,CONTROL_TYPE_AJAXBUTTON_BUY:"AjaxButtonBuy",CONTROL_TYPE_ANCHOR:"Anchor",CONTROL_TYPE_AUDIO:"Audio",CONTROL_TYPE_AUTOCOMPLETION:"AutoCompletion",CONTROL_TYPE_BUTTON:"Button",CONTROL_TYPE_CHART:"Chart",CONTROL_TYPE_CHECKBOX:"CheckBox",CONTROL_TYPE_CROP:"Crop",CONTROL_TYPE_DATATABLE:"DataTable",CONTROL_TYPE_DATE:"Date",CONTROL_TYPE_DATE_TIME:"DateTime",CONTROL_TYPE_DATE_INTERVAL:"DateInterval",CONTROL_TYPE_DATE_INTERVAL_TIME:"DateIntervalTime",CONTROL_TYPE_DROPDOWNLIST:"DropDownList",CONTROL_TYPE_RATING:"Rating",CONTROL_TYPE_FLASH:"Flash",CONTROL_TYPE_FLOAT_PANEL:"FloatPanel",CONTROL_TYPE_FREE_HTML:"FreeHTML",CONTROL_TYPE_WEB_COMPONENT:"WebComponent",CONTROL_TYPE_HIDDEN:"Hidden",CONTROL_TYPE_HYPERLINK:"Hyperlink",CONTROL_TYPE_IFRAME:"I
7Frame",CONTROL_TYPE_IMAGE:"Image",CONTROL_TYPE_MEDIA:"Media",CONTROL_TYPE_LABEL:"Label",CONTROL_TYPE_LABELBO:"LabelBO",CONTROL_TYPE_PANEL:"Panel",CONTROL_TYPE_POPUP:"Popup",CONTROL_TYPE_PANEL_TABLE:"PanelTable",CONTROL_TYPE_PANEL_COL:"PanelCol",CONTROL_TYPE_PANEL_LINE:"PanelLine",CONTROL_TYPE_PARAMETER_BOOL:"ParameterBool",CONTROL_TYPE_PARAMETER_ENUM:"ParameterEnum",CONTROL_TYPE_PARAMETER_NUM:"ParameterNum",CONTROL_TYPE_PARAMETER_STR:"ParameterStr",CONTROL_TYPE_PROGRESS_BAR:"ProgressBar",CONTROL_TYPE_RADIOBUTTON_LIST:"RadioButtonList",CONTROL_TYPE_SLIDESHOW:"Slideshow",CONTROL_TYPE_SECTION_HEADER:"SectionHeader",CONTROL_TYPE_TEXTAREA:"TextArea",CONTROL_TYPE_TEXTBOX:"TextBox",CONTROL_TYPE_TEXTBOXPASSWORD:"TextBoxPassword",CONTROL_TYPE_TIMER:"Timer",CONTROL_TYPE_TIME:"Time",CONTROL_TYPE_MENU:"Menu",CONTROL_TYPE_MENU_ITEM:"MenuItem",CONTROL_TYPE_UPLOAD:"Upload",CONTROL_TYPE_UPLOAD_FIELD:"UploadField",CONTROL_TYPE_VIDEO:"Video",CONTROL_TYPE_YOUTUBE:"Youtube"};PositionItem.SetProperty_Safe=function(n,t,i){var r=$PI(n);r&&(r[t]=i)};PositionItem.GetType=function(n){var t,i=n=="CT"||n.substring(0,3)=="CT ";if(i||n!="ABS"&&n.substring(0,4)!="ABS ")if(i||n.indexOf("PanelCol")>=0||n.indexOf("PanelLine")>=0){n=i?n.substring(3).split(" ")[0]:n.split(" ")[0];switch(n){case"Label":t=PositionItem.Const.CONTROL_TYPE_LABEL;break;case"Button":t=PositionItem.Const.CONTROL_TYPE_BUTTON;break;case"Panel":t=PositionItem.Const.CONTROL_TYPE_PANEL;break;case"TextBox":t=PositionItem.Const.CONTROL_TYPE_TEXTBOX;break;case"AutoComp":t=PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION;break;case"PanelFloat":t=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL;break;case"TextArea":t=PositionItem.Const.CONTROL_TYPE_TEXTAREA;break;case"Hyperlink":t=PositionItem.Const.CONTROL_TYPE_HYPERLINK;break;case"TextArea":t=PositionItem.Const.CONTROL_TYPE_TEXTAREA;break;case"TextBoxPassword":t=PositionItem.Const.CONTROL_TYPE_TEXTBOXPASSWORD;break;case"DropDownList":t=PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST;break;case"Rating":t=PositionItem.Const.CONTROL_TYPE_RATING;break;case"Image":t=PositionItem.Const.CONTROL_TYPE_IMAGE;break;case"AutoComp":t=PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION;break;case"PanelCol":t=PositionItem.Const.CONTROL_TYPE_PANEL_COL;break;case"PanelLine":t=PositionItem.Const.CONTROL_TYPE_PANEL_LINE;break;case"RadioButtonList":t=PositionItem.Const.CONTROL_TYPE_RADIOBUTTON_LIST;break;case"Slideshow":t=PositionItem.Const.CONTROL_TYPE_SLIDESHOW;break;case"CheckBox":t=PositionItem.Const.CONTROL_TYPE_CHECKBOX;break;case"Date":t=PositionItem.Const.CONTROL_TYPE_DATE;break;case"Anchor":t=PositionItem.Const.CONTROL_TYPE_ANCHOR;break;case"IFrame":t=PositionItem.Const.CONTROL_TYPE_IFRAME;break;case"PanelTable":t=PositionItem.Const.CONTROL_TYPE_PANEL_TABLE;break;case"Upload":t=PositionItem.Const.CONTROL_TYPE_UPLOAD;break;default:t=n}}else n.indexOf("DefaultPopupClass")>-1||n.indexOf("PopupContentClass")>-1?t=PositionItem.Const.CONTROL_TYPE_PANEL:n.indexOf("VForm_PopupWrapper")>-1&&(t=PositionItem.Const.CONTROL_TYPE_POPUP);else t=PositionItem.Const.CONTROL_TYPE_PANEL;return t};PositionItem.TransformStringArrayToInt=function(n){for(var t=0,i=n.length;t<i;t++)n[t]=parseInt(n[t])};PositionItem.TranslateAdvancedPosExpression=function(n){var t=n.replace(/return /g,"");return t=t.replace(/min\(/g,"Math.min("),t=t.replace(/max\(/g,"Math.max("),t=t.replace(/floor\(/g,"Math.floor("),t.replace(/round\(/g,"Math.round(")};PositionItem.IsHidden=function(n){if(n.GetProperty(ConstProperties.Const.PROPERTY_IGNORE_IF_HIDDEN)){var t=window.getComputedStyle(n);if(t.display==="none"||t.visibility==="hidden")return!0}return!1};HTMLElement.prototype.Setup=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){var ht,k,at,d,vt,g,yt,nt,pt,tt,b,ft,it,w,st,et,kt,ct,rt,lt,ut,ot,wt,dt,bt;if(this.moContainerForChildrens=[],this.x=0,this.y=0,this.msOriginalDOMWidth=n.style.width,this.msOriginalDOMHeight=n.style.height,this.mbFirstX=!0,this.mbFirstY=!0,this.miCachedPaddingLeft=null,this.miCachedPaddingRight=null,this.miCachedPaddingTop=null,this.miCachedPaddingBottom=null,this.msId=n.id,n.attributes!=null&&n.attributes["data-pid"]!=null&&(this.msId=n.attributes["data-pid"].value),this.msCtrlType=t,this.moProperties=y,this.moParent=p,this.moAncestorWebComponents=[],this.msAdvancedX=this.GetProperty(PositionItem.Const.PROPERTY_ADVANCED_X),this.msAdvancedY=this.GetProperty(PositionItem.Const.PROPERTY_ADVANCED_Y),this.msAdvancedWidth=this.GetProperty(PositionItem.Const.PROPERTY_ADVANCED_WIDTH),this.msAdvancedHeight=this.GetProperty(PositionItem.Const.PROPERTY_ADVANCED_HEIGHT),this.msAdvancedVisibilityExp=this.GetProperty(PositionItem.Const.PROPERTY_ADVANCED_VISIBILITY),this.msAdvancedX!=null&&(this.msAdvancedX=PositionItem.TranslateAdvancedPosExpression(this.msAdvancedX)),this.msAdvancedY!=null&&(this.msAdvancedY=PositionItem.TranslateAdvancedPosExpression(this.msAdvancedY)),this.msAdvancedWidth!=null&&(this.msAdvancedWidth=PositionItem.TranslateAdvancedPosExpression(this.msAdvancedWidth)),this.msAdvancedHeight!=null&&(this.msAdvancedHeight=PositionItem.TranslateAdvancedPosExpression(this.msAdvancedHeight)),this.msAdvancedVisibilityExp!=null&&(this.msAdvancedVisibilityExp=PositionItem.TranslateAdvancedPosExpression(this.msAdvancedVisibilityExp)),this.msReferenceX=[],this.masXTypes=[],Utils.IsStringFilled(this.msAdvancedX)?this.miXOff=0:(this.miXOff=parseInt(r),isNaN(this.miXOff)&&(this.miXOff=0),Utils.IsStringFilled(s)&&this.msReferenceX.push(s),Utils.IsStringFilled(i)&&this.masXTypes.push(i)),this.msReferenceY=[],this.masYTypes=[],Utils.IsStringFilled(this.msAdvancedY)?this.miYOff=0:(this.miYOff=parseInt(f),isNaN(this.miYOff)&&(this.miYOff=0),Utils.IsStringFilled(h)&&this.msReferenceY.push(h),Utils.IsStringFilled(u)&&this.masYTypes.push(u)),this.msWidthReference=[],this.msWidthType=[],Utils.IsStringFilled(this.msAdvancedWidth)?this.miWidth=0:(this.miWidth=parseInt(e),isNaN(this.miWidth)&&(this.miWidth=0),Utils.IsStringFilled(a)&&this.msWidthReference.push(a),Utils.IsStringFilled(c)&&this.msWidthType.push(c)),this.msHeightReference=[],this.msHeightType=[],Utils.IsStringFilled(this.msAdvancedHeight)?this.miHeight=0:(this.miHeight=parseInt(o),isNaN(this.miHeight)&&(this.miHeight=0),Utils.IsStringFilled(v)&&this.msHeightReference.push(v),Utils.IsStringFilled(l)&&this.msHeightType.push(l)),this.miOriginalWidth=this.miWidth,this.miOriginalHeight=this.miHeight,this.miOriginalWidth_NotOverridable=this.miWidth,this.miOriginalHeight_NotOverridable=this.miHeight,this.miOriginalXOff=this.miXOff,this.miOriginalYOff=this.miYOff,this.miWidth<0&&(this.miWidth=0),this.miHeight<0&&(this.miHeight=0),y!=null){if(y[ConstProperties.Const.COLUMNS_WIDTH]&&(this.maiColWidth=y[ConstProperties.Const.COLUMNS_WIDTH].split(",")),y[ConstProperties.Const.COLUMNS_CAN_GROW]){this.mabCanGrow=y[ConstProperties.Const.COLUMNS_CAN_GROW].split(",");for(ht in this.mabCanGrow)this.mabCanGrow[ht]=this.mabCanGrow[ht]==="true"||this.mabCanGrow[ht]==="1"}y.hasOwnProperty("SX")&&(this.mbSX=!0);y.hasOwnProperty("SY")&&(this.mbSY=!0);y.hasOwnProperty("SXY")&&(this.mbSX=!0,this.mbSY=!0);y.PPA&&(this.mbAbsolutePos=!0,this.mbXMustBeCalculated=!0,this.mbYMustBeCalculated=!0,this.x=this.miXOff,this.y=this.miYOff);this.moAbsolutePosCustomHandlerX=null;this.moAbsolutePosCustomHandlerY=null;y.hasOwnProperty("GUH")&&(this.miGridUnitHeight=parseInt(y.GUH));y.hasOwnProperty("MaxFw")&&(this.miMaxWidth=y.MaxFw)}if(this.maiColWidth==null&&(this.maiColWidth=[]),this.mabCanGrow==null&&(this.mabCanGrow=[]),PositionItem.TransformStringArrayToInt(this.maiColWidth),Utils.IsStringFilled(this.msAdvancedX)){k=this.msAdvancedX;
7k=k.replace(ControlsUtils.GetInstance().GetAdvencedPosKeywordsRegex()," ");at=k;do at=k,k=k.replace(/(^| )[0-9]+(\.[0-9]+)?( |$)/g," ");while(k!=at);if(k=k.replace(/ +/g," "),k=k.replace(/(^ +)|( +$)/g,""),k!="")for(tt=k.split(" "),b=0,ft=tt.length;b<ft;b++)it=tt[b],w=it.split("."),w.length==1?w[0]==PositionItem.Const.XTYPE_ALIGN_LEFT||w[0]==PositionItem.Const.XTYPE_ALIGN_RIGHT||w[0]==PositionItem.Const.XTYPE_CENTER||w[0]==PositionItem.Const.XTYPE_TO_LEFT||w[0]==PositionItem.Const.XTYPE_TO_RIGHT||w[0]==PositionItem.Const.TYPE_CONTENT_WIDTH?(this.msReferenceX.push(PositionItem.Const.KEY_PREVIOUS),this.masXTypes.push(w[0])):(this.msReferenceX.push(w[0]),this.masXTypes.push(PositionItem.Const.KEY_DEFAULT)):(this.msReferenceX.push(w[0]),this.masXTypes.push(w[1]))}if(Utils.IsStringFilled(this.msAdvancedY)){d=this.msAdvancedY;d=d.replace(ControlsUtils.GetInstance().GetAdvencedPosKeywordsRegex()," ");vt=d;do vt=d,d=d.replace(/(^| )[0-9]+(\.[0-9]+)?( |$)/g," ");while(d!=vt);if(d=d.replace(/ +/g," "),d=d.replace(/(^ +)|( +$)/g,""),d!="")for(tt=d.split(" "),b=0,ft=tt.length;b<ft;b++)it=tt[b],w=it.split("."),w.length==1?w[0]==PositionItem.Const.YTYPE_ALIGN_BOTTOM||w[0]==PositionItem.Const.YTYPE_ALIGN_TOP||w[0]==PositionItem.Const.YTYPE_CENTER||w[0]==PositionItem.Const.YTYPE_TO_BOTTOM||w[0]==PositionItem.Const.YTYPE_TO_TOP?(this.msReferenceY.push(PositionItem.Const.KEY_PREVIOUS),this.masYTypes.push(w[0])):(this.msReferenceY.push(w[0]),this.masYTypes.push(PositionItem.Const.KEY_DEFAULT)):(this.msReferenceY.push(w[0]),this.masYTypes.push(w[1]))}if(Utils.IsStringFilled(this.msAdvancedWidth)){g=this.msAdvancedWidth;g=g.replace(ControlsUtils.GetInstance().GetAdvencedPosKeywordsRegex()," ");yt=g;do yt=g,g=g.replace(/(^| )[0-9]+(\.[0-9]+)?( |$)/g," ");while(g!=yt);if(g=g.replace(/ +/g," "),g=g.replace(/(^ +)|( +$)/g,""),g!="")for(tt=g.split(" "),b=0,ft=tt.length;b<ft;b++)(it=tt[b],it!="and"&&it!="or")&&(w=it.split("."),w.length==1?w[0]==PositionItem.Const.WIDTHTYPE_INTERNAL?(this.msWidthReference.push(PositionItem.Const.KEY_PREVIOUS),this.msWidthType.push(w[0])):(this.msWidthReference.push(w[0]),this.msWidthType.push(PositionItem.Const.KEY_DEFAULT)):(this.msWidthReference.push(w[0]),this.msWidthType.push(w[1])))}if(Utils.IsStringFilled(this.msAdvancedHeight)){nt=this.msAdvancedHeight;nt=nt.replace(ControlsUtils.GetInstance().GetAdvencedPosKeywordsRegex()," ");pt=nt;do pt=nt,nt=nt.replace(/(^| )[0-9]+(\.[0-9]+)?( |$)/g," ");while(nt!=pt);if(nt=nt.replace(/ +/g," "),nt=nt.replace(/(^ +)|( +$)/g,""),nt!="")for(tt=nt.split(" "),b=0,ft=tt.length;b<ft;b++)(it=tt[b],it!="and"&&it!="or")&&(w=it.split("."),w.length==1?w[0]==PositionItem.Const.HEIGHTTYPE_INTERNAL?(this.msHeightReference.push(PositionItem.Const.KEY_PREVIOUS),this.msHeightType.push(w[0])):(this.msHeightReference.push(w[0]),this.msHeightType.push(PositionItem.Const.KEY_DEFAULT)):(this.msHeightReference.push(w[0]),this.msHeightType.push(w[1])))}Utils.IsStringFilled(this.msAdvancedVisibilityExp)&&AdvancedVisibilityMgr.GetInstance().AddAsPending(this.msId);this.miDeep=0;this.masStyles=new FastArray;this.mbUpdateStyle=!0;this.mbXMustBeCalculated=!0;this.mbYMustBeCalculated=!0;this.moXDependents=[];this.moXSources=[];this.moYDependents=[];this.moYSources=[];this.moQuickXSource=null;this.moQuickWSource=null;this.moQuickYSource=null;this.moQuickHSource=null;this.mbAutoWidth=!1;this.mbAutoHeight=!1;this.moActivatedProperties={};name=this.msId;this.moPlaceHolder=null;switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_LABEL:this.moProperties&&this.moProperties.hasOwnProperty(ConstProperties.Const.SEQUENCE_LOADING_LABEL)&&SequenceLoadingMgr.GetInstance().RegisterLabel(this);break;case PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL:this.mbHorizontalFlow=this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_DIRECTION,ConstProperties.Const.PROPERTY_VALUE_HORIZONTAL)==ConstProperties.Const.PROPERTY_VALUE_HORIZONTAL;st=this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_SPACING,0);this.mbHorizontalFlow?(this.miForcedFlowSpacing=parseInt(this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_H_SPACING,st))||0,this.miForcedOrthgonalSpacing=parseInt(this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_V_SPACING,st))||0):(this.miForcedFlowSpacing=parseInt(this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_V_SPACING,st))||0,this.miForcedOrthgonalSpacing=parseInt(this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_H_SPACING,st))||0);break;case PositionItem.Const.CONTROL_TYPE_PANEL:this.GetProperty(ConstProperties.Const.IS_MENU)&&(rt=this,Matrix3.maPrePositionCalls.push(function(){MenuGroupMgr.GetInstance().ConfigureMenuControl(rt)}));this.HasProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_ID)&&(rt=this,Matrix3.maPrePositionCalls.push(function(){TooltipProperties.ConfigureControl(rt)}));this.mdFixedAspectRatio=this.GetFixedAspectRatio();this.mbFixedAspectRatio=this.mdFixedAspectRatio!=-1;break;case PositionItem.Const.CONTROL_TYPE_HYPERLINK:case PositionItem.Const.CONTROL_TYPE_BUTTON:this.maTextNodes&&typeof this.maTextNodes[0]!="undefined"&&(et={},kt=this.maTextNodes[0].parentNode,this.miOriginalWidth!=-1&&this.msWidthReference.length==0&&(et.width=this.miOriginalWidth+"px"),this.miOriginalHeight>0&&this.msHeightReference.length==0&&(et.height=this.miOriginalHeight+"px"),et&&et!={}&&$SetCss(kt,et));this.moProperties&&(this.moProperties.hasOwnProperty(MultipleSourcesProperties.Const.PROPERTY_MULTIPLE_SOURCE)&&this.ActiveMultipleSources(),this.moProperties.hasOwnProperty(ScrollTargetProperties.Const.PROPERTY_TARGET)&&new ScrollTargetProperties(this),(this.moProperties.hasOwnProperty(ConstProperties.Const.SEQUENCE_LOADING_PREV)||this.moProperties.hasOwnProperty(ConstProperties.Const.SEQUENCE_LOADING_NEXT))&&SequenceLoadingMgr.GetInstance().RegisterButton(this),this.moProperties.hasOwnProperty("PID")&&(rt=this,PostRenderMgr.GetInstance().AddFunction(function(){PreloadMgr.Register(rt)},!1,!0)),this.moProperties.hasOwnProperty("SelectFullForGroup")?MultipleSelectionMgr.GetInstance().RegisterSelectFullForGroup(this,this.moProperties.SelectFullForGroup):this.moProperties.hasOwnProperty("DeselectFullForGroup")?MultipleSelectionMgr.GetInstance().RegisterDeselectFullForGroup(this,this.moProperties.DeselectFullForGroup):this.moProperties.hasOwnProperty("SelectAllForGroup")?MultipleSelectionMgr.GetInstance().RegisterSelectAllBtn(this,this.moProperties.SelectAllForGroup):this.moProperties.hasOwnProperty("DeselectSomeForGroup")?MultipleSelectionMgr.GetInstance().RegisterDeselecteSomeBtn(this,this.moProperties.DeselectSomeForGroup):this.moProperties.hasOwnProperty("DeselectAllForGroup")?MultipleSelectionMgr.GetInstance().RegisterDeselecteAllBtn(this,this.moProperties.DeselectAllForGroup):this.moProperties.hasOwnProperty("VisibleWhenSelectSomeForGroup")?MultipleSelectionMgr.GetInstance().RegisterVisibleWhenSelectSome(this,this.moProperties.VisibleWhenSelectSomeForGroup):this.moProperties.hasOwnProperty("VisibleWhenSelectAllForGroup")&&MultipleSelectionMgr.GetInstance().RegisterVisibleWhenSelectAll(this,this.moProperties.VisibleWhenSelectAllForGroup));break;case PositionItem.Const.CONTROL_TYPE_IMAGE:this.moProperties&&this.moProperties.hasOwnProperty(MultipleSourcesProperties.Const.PROPERTY_MULTIPLE_SOURCE)&&this.ActiveMultipleSources();break;case PositionItem.Const.CONTROL_TYPE_SLIDESHOW:$Control(this.msId,SlideshowCtrl.Const.CONTROL_NAME).Configure(this);break;case PositionItem.Const.CONTROL_TYPE_IFRAME:this.SetupIFrame();break;case PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT:this.miOriginalWidth!==-1||this.msWidthReference.length!==0||Utils.IsStringFilled(this.msAdvancedWidth)||this.msWidthReference.push(PositionItem.Const.REF_AUTO);this.miOriginalHeight!==-1||this.msHeightReference.length!==0||Utils.IsStringFilled(this.msAdvancedHeight)||this.msHeightReference.push(PositionItem.Const.REF_AUTO);rt=this;Param.PreloadWebComponentV2&&rt.classList.add(WebComponentCtrl.Const.CLASS_INITIALIZED);PostRenderMgr.GetInstance().AddFunction(function(){WebComponentCtrl.Activate(rt)},!1,!0);break;case PositionItem.Const.CONTROL_TYPE_CHECKBOX:ct=this.firstElementChild||this.children&&this.children[0];ct&&ct.tagName&&ct.tagName.toLowerCase().indexOf("cx")===0&&(rt=this,PostRenderMgr.GetInstance().AddFunction(function(){WebComponentCtrl.ObserveWrapperWithWebComponent(rt,CheckBoxCtrl.Const.WC_NODE_NAME.toLowerCase())},!1,!0));break;case PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION:case PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST:case PositionItem.Const.CONTROL_TYPE_TEXTAREA:case PositionItem.Const.CONTROL_TYPE_TEXTBOX:case PositionItem.Const.CONTROL_TYPE_TEXTBOXPASSWORD:if(ut=$(this).find("input:not([type='hidden'])")[0]||$(this).find("select")[0]||$(this).find("textarea")[0],ut){ot=function(){var n=ut.validity&&ut.validity.badInput;Utils.IsStringFilled(ut.value)||n?$(this).addClass("Filled"):$(this).removeClass("Filled")}.bind(this);$(ut).on("input change",ot)}break;case PositionItem.Const.CONTROL_TYPE_PARAMETER_STR:case PositionItem.Const.CONTROL_TYPE_PARAMETER_ENUM:case PositionItem.Const.CONTROL_TYPE_PARAMETER_BOOL:if(this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PARAMETER_STR)if(this.getElementsByTagName("textarea")&&this.getElementsByTagName("textarea").length>0){this.moTextarea=this.getElementsByTagName("textarea")[0];try{this.moTextarea.focus();this.moTextarea.select()}catch(gt){}}else this.moInput=this.getElementsByTagName("input")[0];if(this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PARAMETER_STR||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PARAMETER_ENUM){if(lt=$(this).find("textarea")[0],lt){ot=function(){Utils.IsStringFilled(lt.value)?$(this).addClass("Filled"):$(this).removeClass("Filled")}.bind(this);$(lt).on("input change",ot)}if(ut=$(this).find("input:not([type='hidden'])")[0],ut){ot=function(){Utils.IsStringFilled(ut.value)?$(this).addClass("Filled"):$(this).removeClass("Filled")}.bind(this);$(ut).on("input change",ot)}}}this.moLinkedImage&&(ImageMgr.GetInstance().Push(this.moLinkedImage,this),this.moProperties&&(this.moProperties.hasOwnProperty(TooltipProperties.Const.PROPERTY_TEMP_IMG)&&this.msId==TooltipProperties.msTempImgId&&($(this.moLinkedImage).attr("src",$(TooltipProperties.moLastTempImg.moLinkedImage).attr("src")),this.miWidth=TooltipProperties.moLastTempImg.miWidth,this.miHeight=TooltipProperties.moLastTempImg.miHeight),!this.moProperties.hasOwnProperty("DocumentWidth")&&this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&$SetStyle(this.moLinkedImage,"visibility","hidden")));this.HasProperty(ConstProperties.Const.NEED_SIZE)&&SizeLearningMgr.RegisterControl(this);this.HasProperty(ConstProperties.Const.FLASH_ID)&&(wt=this.GetProperty(ConstProperties.Const.FLASH_ID),dt=wt.split(" "),ControlMgr.GetInstance().AddReference(wt,this));this.HasProperty(ConstProperties.Const.PROPERTY_SLIDESHOW_ID)&&SlideshowMgr.GetInstance().RegisterNode(this);this.mbEthereal=this.GetProperty(ConstProperties.Const.ETHEREAL);
7this.mbCMSBlockEdit=this.HasProperty(ConstProperties.Const.CMS_BLOCK_EDIT)?Utils.ParseBool(this.GetProperty(ConstProperties.Const.CMS_BLOCK_EDIT)):!1;(this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_LINE||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL)&&this.GetProperty("OverSkin")&&(bt=Utils.Trim(this.GetProperty("OverSkin")),Utils.AddEvent(this.GetNode(),"mouseenter",function(){$AddClass(this.GetNode(),bt)},this),Utils.AddEvent(this.GetNode(),"mouseleave",function(){$RemoveClass(this.GetNode(),bt)},this));PositionMgr.RegisterNodeToRender(this)};HTMLElement.prototype.ApplyProperties=function(){var t,i,o,f,u,s,e,r,n;switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_HYPERLINK:case PositionItem.Const.CONTROL_TYPE_BUTTON:this.moProperties&&(this.moProperties.hasOwnProperty(ConstProperties.Const.SEQUENCE_LOADING_PREV)&&(t=this.GetVFormId(),i=ControlMgr.GetInstance().GetReference(this.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_PREV)),i!=null&&(t=i.GetVFormId()),Utils.AddEvent(this.GetNode(),"click",function(){SequenceLoadingMgr.GetInstance().NavigateSequence(!1,t)},this)),this.moProperties.hasOwnProperty(ConstProperties.Const.SEQUENCE_LOADING_NEXT)&&(t=this.GetVFormId(),i=ControlMgr.GetInstance().GetReference(this.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_NEXT)),i!=null&&(t=i.GetVFormId()),Utils.AddEvent(this.GetNode(),"click",function(){SequenceLoadingMgr.GetInstance().NavigateSequence(!0,t)},this)),ButtonCtrl.AutoConfigPulse(this))}if((this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL)&&this.moProperties&&((this.moProperties.hasOwnProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)||this.moProperties.hasOwnProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING))&&SequenceLoadingProperties.ConfigureControl(this),this.moProperties.hasOwnProperty("PG")&&(o=this.moProperties.PG,f="",this.moProperties.hasOwnProperty("PGO")&&(f=this.moProperties.PGO),UseBootstrap||$Control(this.msId,PanelAdvancedCtrl.Const.CONTROL_NAME).ActivePositionGroup(o,f))),this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_LINE){if(u=this.GetProperty("AddToCollectionWhenEdited"),Utils.IsStringFilled(u)){r=this;Matrix3.moCollection.Remove(u,this.msId);n=function(t){var i=$(t.target);(t.type=="click"&&(i.is("a, .ui-autocomplete-input")||i.parent().is("a, .ui-autocomplete-input"))||t.type=="click"&&(i.is("input[type=checkbox]")||i.is("input[type=radio]"))||t.type=="keydown"&&i.is(":input")||t.type=="click"&&i.is("div[data-pending-collection='HasPendingChanges']"+i.prop("nodeName"))||t.type=="editionstart")&&(Matrix3.moCollection.Add(u,this.msId),$(r.GetNode()).off("click",n).off("keydown",n).off("editionstart",n));PreloadMgr.Reset(!1)};$(this.GetNode()).on("click",n).on("keydown",n).on("editionstart",n);Matrix3.RegisterForCleanup(this.msId,"AddToCollectionWhenEdited",function(){$(r.GetNode()).off("click",n).off("keydown",n)})}if(s=this.GetProperty("ConfirmWhenEditedAndUnloadingPage"),Utils.ParseBool(s)){e=Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING;r=this;Matrix3.moCollection.Remove(e,this.msId);n=function(t){for(var u=$(t.target),f=Utils.GetVFormId(r.msId),o=!1,i=u;i.length===1&&!o;)i.attr("id")&&(Utils.StartsWith(i.attr("id"),f+Matrix3.Const.SEPARATOR_HIERARCHY)||Utils.StartsWith(i.attr("id"),f+Matrix3.Const.SEPARATOR_CONTROL)||i.attr("id")===f)&&(o=!0),i=i.parent();o&&(t.type=="click"&&u.parents(".ui-menu-item").length>0||t.type=="click"&&u.is("input[type=checkbox], input[type=radio]")||t.type=="keydown"&&u.is(":input"))&&(Matrix3.moCollection.Add(e,r.msId),$(document).off("click",n).off("keydown",n))};$(document).on("click",n).on("keydown",n);Matrix3.RegisterForCleanup(this.msId,"ConfirmWhenEditedAndUnloadingPage",function(){$(document).off("click",n).off("keydown",n)})}}};HTMLElement.prototype.ExtractDependences=function(n,t){if(UseBootstrap)return[!0,!0];var i=[!0,!0];switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL:i=[!0,!0];this.ExtractDependencesContainer(n,t);break;case PositionItem.Const.CONTROL_TYPE_PANEL:case PositionItem.Const.CONTROL_TYPE_POPUP:case PositionItem.Const.CONTROL_TYPE_PANEL_TABLE:case PositionItem.Const.CONTROL_TYPE_PANEL_LINE:case PositionItem.Const.CONTROL_TYPE_PANEL_COL:case PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT:i=this.ExtractDependencesContainer(n,t);break;default:i=this.ExtractDependencesControl(n,t)}return i};HTMLElement.prototype.ExtractDependencesContainer=function(n,t){var u=this.ExtractDependencesControl(n,t),h=this.GetProperty(ConstProperties.Const.RESIZE_WIDTH,-1),c=this.GetProperty(ConstProperties.Const.RESIZE_HEIGHT,-1),l,f,e,r,i,o,s;h!=-1&&ResizeMgr.GetInstance().AddToResizeXList(this);c!=-1&&ResizeMgr.GetInstance().AddToResizeYList(this);l=this.GetProperty(ConstProperties.Const.AUTOLIMIT_RESIZE_HEIGHT);this.moContainerForChildrens=EditableTable.SortLinesAfterExpand(this.moContainerForChildrens).elementList;var a=this.moContainerForChildrens,v=a.length,y=h==-1&&(this.GetOriginalWidth()==-1||this.ForceXChildrenDependence()),p=(c==-1||l)&&(this.GetOriginalHeight()==-1||this.ForceYChildrenDependence()),w=this.XDependsOnlyFromLastControl(),b=this.YDependsOnlyFromLastControl(),k;
7for((this.GetProperty(ConstProperties.Const.FLASH_ID)==ConstValues.Const.SUPER_CONTAINER||this.mbParentIsFreeHtml)&&(t=this),f=this.moAncestorWebComponents.slice(),this.msCtrlType===PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT&&f.push(this),e=PositionMgr.GetInstance(),r=0;r<v;r++)i=a[r],o=r==v-1,i!=null&&(i.moAncestorWebComponents=f.slice(),s=i.ExtractDependences(k,t),s[0]&&e.AddToDirtyXList(i),s[1]&&e.AddToDirtyYList(i),i.IsEthereal()||(!this.mbAutoWidth&&(y&&!w||y&&w&&o)&&(new Dependency(i,this,Dependency.Const.TYPE_PARENT,Dependency.Const.SUBTYPE_NONE,null,Dependency.Const.AXIS_X),u[0]=!1),!this.mbAutoHeight&&(p&&!b||p&&b&&o)&&(new Dependency(i,this,Dependency.Const.TYPE_PARENT,Dependency.Const.SUBTYPE_NONE,null,Dependency.Const.AXIS_Y),u[1]=!1)),k=i);return u};HTMLElement.prototype.ExtractDependencesControl=function(n,t){var c=[!0,!0],i,f,l,a,w,v,e,p,o,s,r,y,h,u;for(n&&(a=n,w=!0),t&&(this.moSuperContainer=t,v=!0),l||(f=this.GetParentContainer(),l=!0),r=0,y=this.masXTypes.length;r<y;r++)e=this.msReferenceX[r],p=!1,Utils.IsStringFilled(e)&&e!=PositionItem.Const.KEY_PREVIOUS?(u=Dependency.Const.AXIS_X,this.masXTypes[r]==PositionItem.Const.TYPE_HEIGHT&&(u=Dependency.Const.AXIS_Y),e==PositionItem.Const.REF_PARENT?(f=this.GetParentContainer(),l=!0,f&&(this.moQuickXSource=new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],u),c[0]=!1)):(e==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?(v||(this.moSuperContainer=this.GetAncestorWithFlashID(ConstValues.Const.SUPER_CONTAINER),v=!0),i=this.moSuperContainer):Utils.StartsWith(e,PositionItem.Const.REF_ANCESTOR_PREFIX)?i=this.GetAncestorWithFlashID(e.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(e,PositionItem.Const.REF_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetReference(e.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(e,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetPopupReference(e.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(e,PositionItem.Const.REF_BRO_PREFIX)?i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(e.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(e)),i==null&&(i=ControlMgr.GetInstance().GetReference(e))),i!=null?(e==PositionItem.Const.REF_SCREEN?(this.moQuickXSource=new Dependency(i,this,Dependency.Const.TYPE_SCREEN,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],u),Param.PropagateChangesInGlobalPosition?new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_LEFT,u):new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],u)):(l&&f!==i.GetParentContainer()&&(Param.PropagateChangesInGlobalPosition?(new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_LEFT,u),new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_LEFT,u)):new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],u)),this.moQuickXSource=new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],u)),PositionMgr.GetInstance().AddToDirtyXList(this),c[0]=!1):p=!Utils.IsStringFilled(this.msAdvancedX))):p=!0,p&&(w||(a=this.GetLastControl(),w=!0),a!=null?(this.moQuickXSource=new Dependency(a,this,Dependency.Const.TYPE_PREVIOUS,Dependency.Const.SUBTYPE_POS,this.masXTypes[r],Dependency.Const.AXIS_X),PositionMgr.GetInstance().AddToDirtyXList(a),c[0]=!1):this.moQuickXSource!=null&&this.moQuickXSource.GetType()===Dependency.Const.TYPE_PREVIOUS&&(this.moQuickXSource.Delete(!0,!0),this.moQuickXSource=null));for(r=0,y=this.msWidthReference.length;r<y;r++)o=this.msWidthReference[r],u=Dependency.Const.AXIS_X,this.msWidthType[r]==PositionItem.Const.TYPE_HEIGHT&&(u=Dependency.Const.AXIS_Y),o==PositionItem.Const.REF_PARENT?(l||(f=this.GetParentContainer(),l=!0),f!=null&&(this.moQuickWSource=new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_SIZE,this.msWidthType[r],u),c[0]=!1)):o==PositionItem.Const.REF_AUTO?(this.mbAutoWidth=!0,AutoSizeObserver.Activate(this)):o==PositionItem.Const.REF_CHILDREN?this.mbForceXChildDep=!0:(o==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?(v||(this.moSuperContainer=this.GetAncestorWithFlashID(ConstV
7alues.Const.SUPER_CONTAINER),v=!0),i=this.moSuperContainer):Utils.StartsWith(o,PositionItem.Const.REF_ANCESTOR_PREFIX)?i=this.GetAncestorWithFlashID(o.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(o,PositionItem.Const.REF_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetReference(o.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(o,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetPopupReference(o.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(o,PositionItem.Const.REF_BRO_PREFIX)?i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(o.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(o)),i==null&&(i=ControlMgr.GetInstance().GetReference(o))),i!=null&&(this.moQuickWSource=o==PositionItem.Const.REF_SCREEN?new Dependency(i,this,Dependency.Const.TYPE_SCREEN,Dependency.Const.SUBTYPE_SIZE,this.msWidthType[r],u):new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_SIZE,this.msWidthType[r],u),PositionMgr.GetInstance().AddToDirtyXList(this),c[0]=!1));for(r=0,y=this.masYTypes.length;r<y;r++)s=this.msReferenceY[r],p=!1,u=Dependency.Const.AXIS_Y,(this.masYTypes[r]==PositionItem.Const.TYPE_WIDTH||this.masYTypes[r]==PositionItem.Const.TYPE_CONTENT_WIDTH)&&(u=Dependency.Const.AXIS_X),Utils.IsStringFilled(s)&&s!=PositionItem.Const.KEY_PREVIOUS?s==PositionItem.Const.REF_PARENT?(l||(f=this.GetParentContainer(),l=!0),f!=null&&(this.moQuickYSource=new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],u),c[1]=!1)):(s==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?(v||(this.moSuperContainer=this.GetAncestorWithFlashID(ConstValues.Const.SUPER_CONTAINER),v=!0),i=this.moSuperContainer):Utils.StartsWith(s,PositionItem.Const.REF_ANCESTOR_PREFIX)?i=this.GetAncestorWithFlashID(s.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(s,PositionItem.Const.REF_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetReference(s.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(s,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetPopupReference(s.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(s,PositionItem.Const.REF_BRO_PREFIX)?i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(s.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(s)),i==null&&(i=ControlMgr.GetInstance().GetReference(s))),i!=null?(s==PositionItem.Const.REF_SCREEN?(this.moQuickYSource=new Dependency(i,this,Dependency.Const.TYPE_SCREEN,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],u),Param.PropagateChangesInGlobalPosition?new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_TOP,u):new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],u)):(l&&f!==i.GetParentContainer()&&(Param.PropagateChangesInGlobalPosition?(new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_TOP,u),new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,Dependency.Const.ALIGNMENT_GLOBAL_TOP,u)):new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],u)),this.moQuickYSource=new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],u)),PositionMgr.GetInstance().AddToDirtyYList(this),c[1]=!1):p=!Utils.IsStringFilled(this.msAdvancedY)):p=!0,p&&!this.mbParentIsFreeHtml&&(w||(a=this.GetLastControl(),w=!0),a!=null?(this.moQuickYSource=new Dependency(a,this,Dependency.Const.TYPE_PREVIOUS,Dependency.Const.SUBTYPE_POS,this.masYTypes[r],Dependency.Const.AXIS_Y),PositionMgr.GetInstance().AddToDirtyYList(a),c[1]=!1):this.moQuickYSource!=null&&this.moQuickYSource.GetType()===Dependency.Const.TYPE_PREVIOUS&&(this.moQuickYSource.Delete(!0,!0),this.moQuickYSource=null));for(r=0,y=this.msHeightReference.length;r<y;r++)h=this.msHeightReference[r],u=Dependency.Const.AXIS_Y,(this.msHeightType[r]==PositionItem.Const.TYPE_WIDTH||this.msHeightType[r]==PositionItem.Const.TYPE_CONTENT_WIDTH)&&(u=Dependency.Const.AXIS_X),h==PositionItem.Const.REF_PARENT?(l||(f=this.GetParentContainer(),l=!0),f!=null&&(this.moQuickHSource=new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.msHeightType[r],u),c[1]=!1)):h==PositionItem.Const.REF_AUTO?(this.mbAutoHeight=!0,AutoSizeObserver.Activate(this)):h==PositionItem.Const.REF_CHILDREN?this.mbForceYChildDep=!0:(h==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?(v||(this.moSuperContainer=this.GetAncestorWithFlashID(ConstV
7alues.Const.SUPER_CONTAINER),v=!0),i=this.moSuperContainer):Utils.StartsWith(h,PositionItem.Const.REF_ANCESTOR_PREFIX)?i=this.GetAncestorWithFlashID(h.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(h,PositionItem.Const.REF_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetReference(h.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(h,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetPopupReference(h.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(h,PositionItem.Const.REF_BRO_PREFIX)?i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(h.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(h)),i==null&&(i=ControlMgr.GetInstance().GetReference(h))),i!=null&&(this.moQuickHSource=h==PositionItem.Const.REF_SCREEN?new Dependency(i,this,Dependency.Const.TYPE_SCREEN,Dependency.Const.SUBTYPE_POS,this.msHeightType[r],u):new Dependency(i,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_POS,this.msHeightType[r],u),PositionMgr.GetInstance().AddToDirtyYList(this),c[1]=!1));return this.mbParentIsFreeHtml&&l&&!this.mbAutoWidth&&(this.moQuickWSource=new Dependency(f,this,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_SIZE,"i",Dependency.Const.AXIS_X),c[0]=!1),c};HTMLElement.prototype.CalculateXPosition=function(){var n,t,i,r;if(this.mbAbsolutePos)n=this.mbXMustBeCalculated,this.mbXMustBeCalculated=!1,typeof this.moAbsolutePosCustomHandlerX=="function"&&this.moAbsolutePosCustomHandlerX();else if(this.moAncestorWebComponents.some(function(n){return!n.shadowRoot||!n.hasUpdated})){n=!1;this.mbUpdateStyle=!1;for(t in this.moXDependents)i=this.moXDependents[t],r=i.GetDestination(),r.mbUpdateStyle=!1}else switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_LABEL:case PositionItem.Const.CONTROL_TYPE_TEXTBOX:case PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST:case PositionItem.Const.CONTROL_TYPE_RATING:case PositionItem.Const.CONTROL_TYPE_TEXTBOXPASSWORD:case PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION:case PositionItem.Const.CONTROL_TYPE_RADIOBUTTON_LIST:case PositionItem.Const.CONTROL_TYPE_DATE:case PositionItem.Const.CONTROL_TYPE_TEXTAREA:case PositionItem.Const.CONTROL_TYPE_CHECKBOX:case PositionItem.Const.CONTROL_TYPE_UPLOAD:case PositionItem.Const.CONTROL_TYPE_PARAMETER_STR:case PositionItem.Const.CONTROL_TYPE_PARAMETER_ENUM:case PositionItem.Const.CONTROL_TYPE_PARAMETER_BOOL:n=this.CalculateXPositionLabel();break;case PositionItem.Const.CONTROL_TYPE_HYPERLINK:case PositionItem.Const.CONTROL_TYPE_BUTTON:n=this.CalculateXPositionButton();break;case PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL:n=this.CalculateXPositionFloatPnl();break;case PositionItem.Const.CONTROL_TYPE_IMAGE:n=this.CalculateXPositionImage();break;case PositionItem.Const.CONTROL_TYPE_IFRAME:n=this.CalculateXPositionIFrame();break;case PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT:n=this.CalculateXPositionWebComponent();break;case PositionItem.Const.CONTROL_TYPE_DATATABLE:n=this.CalculateXPositionDataTable();break;case PositionItem.Const.CONTROL_TYPE_PANEL:case PositionItem.Const.CONTROL_TYPE_POPUP:n=this.CalculateXPositionContainer();break;case PositionItem.Const.CONTROL_TYPE_PANEL_TABLE:n=this.CalculateXPositionPanelTable();break;case PositionItem.Const.CONTROL_TYPE_PANEL_COL:case PositionItem.Const.CONTROL_TYPE_PANEL_LINE:n=this.CalculateXPositionContainer();break;default:n=this.CalculateXPositionControl()}return this.mbFirstX=!1,n};HTMLElement.prototype.CalculateYPosition=function(){var n,t,i,r;if(Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] CALLED for control: "+this.msId+", Current Y: "+this.y+", Type: "+this.msCtrlType+", Stack trace:"),this.mbAbsolutePos)n=this.mbYMustBeCalculated,this.mbYMustBeCalculated=!1,typeof this.moAbsolutePosCustomHandlerY=="function"&&this.moAbsolutePosCustomHandlerY();else if(this.moAncestorWebComponents.some(function(n){return!n.shadowRoot||!n.hasUpdated})){n=!1;
7this.mbUpdateStyle=!1;for(t in this.moXDependents)i=this.moXDependents[t],r=i.GetDestination(),r.mbUpdateStyle=!1}else switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_LABEL:case PositionItem.Const.CONTROL_TYPE_TEXTBOX:case PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST:case PositionItem.Const.CONTROL_TYPE_RATING:case PositionItem.Const.CONTROL_TYPE_TEXTBOXPASSWORD:case PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION:case PositionItem.Const.CONTROL_TYPE_RADIOBUTTON_LIST:case PositionItem.Const.CONTROL_TYPE_DATE:case PositionItem.Const.CONTROL_TYPE_TEXTAREA:case PositionItem.Const.CONTROL_TYPE_CHECKBOX:case PositionItem.Const.CONTROL_TYPE_UPLOAD:case PositionItem.Const.CONTROL_TYPE_PARAMETER_STR:case PositionItem.Const.CONTROL_TYPE_PARAMETER_ENUM:case PositionItem.Const.CONTROL_TYPE_PARAMETER_BOOL:n=this.CalculateYPositionLabel();break;case PositionItem.Const.CONTROL_TYPE_BUTTON:case PositionItem.Const.CONTROL_TYPE_HYPERLINK:n=this.CalculateYPositionButton();break;case PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL:n=this.CalculateYPositionFloatPnl();break;case PositionItem.Const.CONTROL_TYPE_IMAGE:n=this.CalculateYPositionImage();break;case PositionItem.Const.CONTROL_TYPE_IFRAME:n=this.CalculateYPositionIFrame();break;case PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT:n=this.CalculateYPositionWebComponent();break;case PositionItem.Const.CONTROL_TYPE_DATATABLE:n=this.CalculateYPositionDataTable();break;case PositionItem.Const.CONTROL_TYPE_PANEL:case PositionItem.Const.CONTROL_TYPE_POPUP:case PositionItem.Const.CONTROL_TYPE_PANEL_TABLE:n=this.CalculateYPositionContainer();break;case PositionItem.Const.CONTROL_TYPE_PANEL_COL:case PositionItem.Const.CONTROL_TYPE_PANEL_LINE:n=this.CalculateYPositionContainer();break;default:n=this.CalculateYPositionControl()}return this.mbFirstY=!1,n};HTMLElement.prototype.CalculateXPositionControl=function(){var v=!1,n=null,h=this.miWidth,y,c,i,k,d,l,a,o,u,e,s,f,p,t,r,w,b;if(y=this.moPlaceHolder!=null?this.moPlaceHolder.moParent:this.moParent,this.msWidthReference&&this.msWidthReference.length!=0||Utils.IsStringFilled(this.msAdvancedWidth))if(Utils.IsString(this.msAdvancedWidth)){for(c=this.msAdvancedWidth,f=0,p=this.msWidthReference.length;f<p;f++)t=0,i=this.msWidthReference[f],i==PositionItem.Const.REF_PARENT?(k=this.GetParentContainer(),k!=null&&(t=k.GetWidth())):i==PositionItem.Const.REF_AUTO?t=this.GetAutoWidth():i==PositionItem.Const.REF_CHILDREN?t=this.GetChildrenWidth():i==PositionItem.Const.REF_TEXT?t=this.GetLabelWidth():i==PositionItem.Const.REF_MAX_CONTENT?t=this.GetMaxContentWidth():i==PositionItem.Const.REF_CONTENT_WIDTH?t=this.GetContentWidth():(i==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?n=this.moSuperContainer:Utils.StartsWith(i,PositionItem.Const.REF_ANCESTOR_PREFIX)?n=this.GetAncestorWithFlashID(i.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(i,PositionItem.Const.REF_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetReference(i.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(i,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetPopupReference(i.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(i,PositionItem.Const.REF_BRO_PREFIX)?n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(i.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(i)),n==null&&(n=ControlMgr.GetInstance().GetReference(i))),n!=null&&(l=0,this.msWidthType[f]==PositionItem.Const.TYPE_HEIGHT?t=n.GetHeight():this.msWidthType[f]==PositionItem.Const.TYPE_CONTENT_WIDTH?t=n.GetContentWidth():(this.msWidthType[f]==PositionItem.Const.WIDTHTYPE_INTERNAL&&n.IsContainer()&&(a=n,l=-a.GetPaddingLeft()-a.GetPaddingRight()),t=n.GetWidth()+l))),t=t||0,d=this.msWidthType[f]==PositionItem.Const.KEY_DEFAULT?new RegExp(i,"g"):new RegExp(i+"."+this.msWidthType[f],"g"),c=c.replace(d,t.toString());c=c.replace("--","");h=PositionItem.EvaluateExpression(c,this.GetNode());h=Math.max(0,h)}else n=null,this.moQuickWSource!=null?(n=this.moQuickWSource.GetSource(),this.moQuickWSource.GetType()==Dependency.Const.TYPE_REFERENCE?(l=0,this.msWidthType.length!=0&&this.msWidthType[0]==PositionItem.Const.WIDTHTYPE_INTERNAL&&n.IsContainer()&&(a=n,l=-a.GetPaddingLeft()-a.GetPaddingRight()),h=n.GetWidth()+this.miOriginalWidth+l):this.moQuickWSource.GetType()==Dependency.Const.TYPE_SCREEN&&(h=n.GetWidth()+this.miOriginalWidth)):this.mbAutoWidth&&(h=Math.max(Math.ceil(this.GetNode().getBoundingClientRect().width),this.GetNode().offsetWidth));if(h!=this.miWidth&&(this.SetWidth(h),v=!0),o=0,n=null,u=0,e=0,Utils.IsStringFilled(this.msAdvancedX)){for(s=this.msAdvancedX,f=0,p=this.msReferenceX.length;f<p;f++){if(t=0,r=this.msReferenceX[f],r==PositionItem.Const.REF_PARENT?(n=this.GetParentContainer(),n!=null&&(e=n.GetWidth())):(r==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?n=this.moSuperContainer:Utils.StartsWith(r,PositionItem.Const.REF_ANCESTOR_PREFIX)?n=this.GetAncestorWithFlashID(r.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(r,PositionItem.Const.REF_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetReference(r.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(r,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetPopupReference(r.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):r==PositionItem.Const.KEY_PREVIOUS&&this.GetLastControl()!=null?(n=this.GetLastControl(),u=n.x,e=n.GetWidth()):Utils.StartsWith(r,PositionItem.Const.REF_BRO_PREFIX)?n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(r.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(r)),n==null&&(n=ControlMgr.GetInstance().GetReference(r))),n!=null&&(e=n.GetWidth(),u=r=="screen"?y.globalToLocal(new Point(0,0)).x:n.moParent==this.moParent?n.x:n==this.moParent?0:y.globalToLocal(n.localToGlobal(new Point(0,0))).x)),e=e||0,u=u||0,w=this.masXTypes[f],n!=null)switch(w){case PositionItem.Const.XTYPE_TO_RIGHT:t=u+e;break;case PositionItem.Const.XTYPE_TO_LEFT:t=u-this.miWidth;break;case PositionItem.Const.XTYPE_ALIGN_RIGHT:t=u+e-this.miWidth;break;case PositionItem.Const.XTYPE_ALIGN_LEFT:t=u;break;case PositionItem.Const.XTYPE_CENTER:t=Math.round(u+e/2-this.miWidth/2);break;case PositionItem.Const.TYPE_WIDTH:t=e;break;case PositionItem.Const.TYPE_CONTENT_WIDTH:t=n.GetContentWidth();break;case PositionItem.Const.TYPE_HEIGHT:t=n.GetHeight();break;default:s=s.replace(new RegExp(r+".","g"),t.toString())}t=t||0;s=r!=PositionItem.Const.KEY_PREVIOUS?s.replace(new RegExp(r+"."+w,"g"),t.toString()):s.replace(new RegExp("([^.a-zA-Z]|^)"+w+"([^.a-zA-Z]|$)","g"),"$1"+t.toString()+"$2")}s=s.replace("--","");o=PositionItem.EvaluateExpression(s,this.GetNode())}else if(n=null,this.moQuickXSource!=null&&(n=this.moQuickXSource.GetSource(),e=n.GetWidth(),u=this.moQuickXSource.GetType()==Dependency.Const.TYPE_REFERENCE?n.moParent==this.moParent?n.x:n==this.moParent?0:y.globalToLocal(n.localToGlobal(new Point(0,0))).x:this.moQuickXSource.GetType()==Dependency.Const.TYPE_SCREEN?y.globalToLocal(ControlMgr.GetInstance().GetRootPositionItem().localToGlobal(new Point(0,0),!0),!0).x:n.x),n!=null){switch(this.masXTypes[0]){case PositionItem.Const.XTYPE_TO_RIGHT:o=u+e;break;case PositionItem.Const.XTYPE_TO_LEFT:o=u-this.miWidth;break;case PositionItem.Const.XTYPE_ALIGN_RIGHT:o=u+e-this.miWidth;break;case PositionItem.Const.XTYPE_ALIGN_LEFT:o=u;break;case PositionItem.Const.XTYPE_CENTER:o=Math.round(u+e/2-this.miWidth/2);break;case PositionItem.Const.TYPE_CONTENT_WIDTH:o=n.GetContentWidth()}o+=this.miXOff}else b=this.GetParentContainer(),b!=null&&b.msCtrlType!==PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT&&(o=Math.max(parseInt(b.GetPaddingLeft()),parseInt(this.miXOff)));return v=v||this.mbXMustBeCalculated||this.x!=o,v&&(this.mbXMustBeCalculated=!1,this.mbUpd
7ateStyle=!0),this.moPlaceHolder==null?this.moPosDecider==null&&(this.x=o):this.moPlaceHolder.x=o,v};HTMLElement.prototype.GetAutoWidth=function(){var n=this.style.width,t=Math.ceil(this.GetNode().getBoundingClientRect().width);return this.style.width=n,t};HTMLElement.prototype.GetChildrenWidth=function(){var t,u,i,f,n,r;for(iWidth=this.GetPaddingLeft(),t=this.GetContainerForChildren(),u=this.XDependsOnlyFromLastControl()?t.length-1:0,i=u,f=t.length;i<f;i++)n=t[i],n==null||n.IsEthereal()||(iWidth=Math.max(iWidth,n.x+Math.max(0,n.GetWidth())));return this.mbHasFreeHtml&&(r=$(this.GetNode()).find(">.FreeHtml"),iWidth=Math.max(iWidth,r.position().left+r.outerWidth())),iWidth+=this.GetPaddingRight()};HTMLElement.prototype.GetContentWidth=function(){var i=this.GetChildrenWidth(),t=this.children,r,n;if(t)for(r=t.length,n=0;n<r;n++)t[n].classList.contains("BG")||(i=Math.round(Math.max(i,Math.max(0,$(t[n]).width()))));return i};HTMLElement.prototype.CalculateXPositionContainer=function(){var t=!1,o=this.GetProperty(ConstProperties.Const.RESIZE_WIDTH,-1),n=this.GetOriginalWidth(),s=this.GetWidth(),l=this.x,h,i,r,u,c,f,e;return this.mbParentIsFreeHtml?(this.moParent.CalculateXPosition(),n=$(this.GetNode()).outerWidth()):this.GetProperty("Fold")==FoldProperties.Const.CLOSE&&(this.GetProperty("FoldOrientation")==FoldProperties.Const.ORIENTATION_LEFT||this.GetProperty("FoldOrientation")==FoldProperties.Const.ORIENTATION_RIGHT)?n=this.GetProperty("FoldMinCloseSize",0):o!=-1?n=Utils.GetViewportWidth()-ResizeMgr.GetInstance().GetScrollbarSize()-o:this.GetOriginalWidth()==-1&&(this.mbIsPopupRoot?(h=this.GetProperty(PositionItem.Const.PROPERTY_POPUP_SHRINKABLE,!0),n=h?this.GetChildrenWidth():Math.min(Math.max(this.GetWidth(),this.GetChildrenWidth()),ResizeMgr.GetInstance().GetScreenAnchor().GetWidth())):n=this.GetChildrenWidth()),PositionItem.IsHidden(this)&&(n=0),this.SetWidth(n),t=this.CalculateXPositionControl()||t,n=this.GetWidth(),i=this.GetProperty(ConstProperties.Const.MIN_RESIZE_WIDTH),i&&i!=0&&(n=Math.max(n,i)),r=this.GetProperty(ConstProperties.Const.MAX_RESIZE_WIDTH),r&&r!=0&&(n=Math.min(n,r)),this.mbFixedAspectRatio&&(u=Utils.GetViewportHeight()-this.GetProperty(ConstProperties.Const.RESIZE_HEIGHT),c=n/u,c>this.mdFixedAspectRatio&&(n=this.mdFixedAspectRatio*u)),n!=s&&this.SetUpdateStyle(!0),t=n!=s||l!=this.x||this.mbFirstX,this.SetWidth(n),this.classList.contains(Popup.Const.CONTENT_CLASS)&&(f=DOMChangesQueue.GetInstance(),f.QueueSetCss(this.parentElement,"width",n+"px"),e=this.parentElement.children[0],e&&f.QueueSetCss(e,"width",n+"px")),this.mbFixedAspectRatio&&t&&PositionMgr.GetInstance().AddToDirtyYList(this),t&&this.mbHasFreeHtml&&this.moContainerForChildrens.length>0&&(PositionMgr.GetInstance().AddToDirtyYList(this),this.TransferPositioningToDOM()),t};HTMLElement.prototype.CalculateYPositionControl=function(){var a=!1,n=null,o=this.miHeight,c,r,g,b,k,tt,ut,ft,l,v,it,f,i,u,h,s,w,t,e,d,p;if(Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Starting height calculation - Control: "+this.msId+", Initial iHeight (from this.miHeight): "+o+", GetOriginalHeight(): "+this.GetOriginalHeight()+", msHeightReference: "+JSON.stringify(this.msHeightReference)+", msAdvancedHeight: "+this.msAdvancedHeight+", mbAutoHeight: "+this.mbAutoHeight),c=this.moPlaceHolder!=null?this.moPlaceHolder.moParent:this.moParent,this.msHeightReference.length!=0||Utils.IsStringFilled(this.msAdvancedHeight))if(Utils.IsString(this.msAdvancedHeight)){var i=0,u=0,y=this.msAdvancedHeight;for(s=0,w=this.msHeightReference.length;s<w;s++){if(t=0,r=this.msHeightReference[s],r==PositionItem.Const.REF_PARENT)g=this.GetParentContainer(),g!=null&&(t=g.GetHeight());else if(r==PositionItem.Const.REF_AUTO)t=this.GetAutoHeight();else if(r==PositionItem.Const.REF_CHILDREN)t=this.GetChildrenHeight();else if(r==PositionItem.Const.REF_MAX_CONTENT)t=this.GetMaxContentHeight();else if(r==PositionItem.Const.REF_SELFWIDTH)t=this.GetWidth();else if(r==PositionItem.Const.REF_SELFHEIGHT){t=0;$(this.GetNode()).css("width",this.GetWidth());var nt=this.GetProperty(ConstProperties.Const.MAX_RESIZE_HEIGHT),rt=this.GetChildNodes(),et=rt.length;for(b=0;b<et;b++)k=rt[b],tt=k.offsetTop+Math.max(k.offsetHeight,k.scrollHeight),tt&&(t=Math.max(t,tt),nt&&nt!=0&&(t=Math.min(t,nt)))}else if(r==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?n=this.moSuperContainer:Utils.StartsWith(r,PositionItem.Const.REF_ANCESTOR_PREFIX)?n=this.GetAncestorWithFlashID(r.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(r,PositionItem.Const.REF_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetReference(r.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(r,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetPopupReference(r.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(r,PositionItem.Const.REF_BRO_PREFIX)?n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(r.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(r)),n==null&&(n=ControlMgr.GetInstance().GetReference(r))),n!=null&&(u=n.GetHeight(),i=e=="screen"?c.globalToLocal(new Point(0,0)).y:n==this.moParent?0:n.moParent==this.moParent?n.y:c.globalToLocal(n.localToGlobal(new Point(0,0))).y),u=u||0,i=i||0,n!=null&&(l=0,this.msHeightType[s]==PositionItem.Const.TYPE_WIDTH?t=n.GetWidth():this.msHeightType[s]==PositionItem.Const.TYPE_CONTENT_WIDTH?t=n.GetContentWidth():(this.msHeightType[s]==PositionItem.Const.HEIGHTTYPE_INTERNAL&&n.IsContainer()&&(v=n,l=-v.GetPaddingTop()-v.GetPaddingBottom()),t=n.GetHeight()+l)),ut=this.msHeightType[s],n!=null)switch(ut){case PositionItem.Const.YTYPE_TO_BOTTOM:t=i+u;break;case PositionItem.Const.YTYPE_ALIGN_TOP:t=i}t=t||0;ft=this.msHeightType[s]==PositionItem.Const.KEY_DEFAULT?new RegExp(r,"g"):new RegExp(r+"."+this.msHeightType[s],"g");y=y.replace(ft,t.toString())}y=y.replace("--","");o=PositionItem.EvaluateExpression(y,this.GetNode());o=Math.max(0,o)}else n=null,this.moQuickHSource!=null?(n=this.moQuickHSource.GetSource(),this.moQuickHSource.GetType()==Dependency.Const.TYPE_REFERENCE?(l=0,this.msHeightType.length!=0&&this.msHeightType[0]==PositionItem.Const.WIDTHTYPE_INTERNAL&&n.IsContainer()&&(v=n,l=-v.GetPaddingTop()-v.GetPaddingBottom()),o=n.GetHeight()+this.miOriginalHeight+l,Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Height from REFERENCE source - Control: "+this.msId+", Source: "+(n?n.GetId():"NULL")+", Source Height: "+(n?n.GetHeight():"N/A")+", miOriginalHeight: "+this.miOriginalHeight+", iDiff: "+l+", Calculated iHeight: "+o)):this.moQuickHSource.GetType()==Dependency.Const.TYPE_SCREEN&&(o=n.GetHeight()+this.miOriginalHeight,Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Height from SCREEN source - Control: "+this.msId+", Source Height: "+(n?n.GetHeight():"N/A")+", miOriginalHeight: "+this.miOriginalHeight+", Calculated iHeight: "+o))):this.mbAutoHeight&&(it=this.GetNode().getBoundingClientRect().height,o=Math.max(Math.ceil(it),this.GetNode().offsetHeight),Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Auto-height calculated - Control: "+this.msId+", outerHeight(): "+it+", Calculated iHeight: "+o));if(PositionItem.IsHidden(this)&&(o=0,Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Control is HIDDEN - Control: "+this.msId+", Setting iHeight to 0")),Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Height check - Control: "+this.msId+", Calculated iHeight: "+o+", Current miHeight: "+this.miHeight+", Will update: "+(o!=this.miHeight)+", IsHidden: "+PositionItem.IsHidden(this)+", mbAutoHeight: "+this.mbAutoHeight),o!=this.miHeight&&(Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] SETTING HEIGHT - Control: "+this.msId+", Old Height: "+this.miHeight+", New Height: "+o),this.SetHeight(o),a=!0),f=0,Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Starting Y calculation for: "+this.msId+", msAdvancedY: "+this.msAdvancedY+", moQuickYSource: "+(this.moQuickYSource?"YES":"NO")),n=null,i=0,u=0,Utils.IsStringFilled(this.msAdvancedY)){for(h=this.msAdvancedY,s=0,w=this.msReferenceY.length;s<w;
7s++){if(t=0,e=this.msReferenceY[s],e==PositionItem.Const.REF_PARENT?(n=this.GetParentContainer(),n!=null&&(u=n.GetHeight()),n==this.moParent&&(i=0)):(e==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?n=this.moSuperContainer:Utils.StartsWith(e,PositionItem.Const.REF_ANCESTOR_PREFIX)?n=this.GetAncestorWithFlashID(e.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(e,PositionItem.Const.REF_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetReference(e.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(e,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?n=ControlMgr.GetInstance().GetPopupReference(e.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):e==PositionItem.Const.KEY_PREVIOUS&&this.GetLastControl()!=null?(n=this.GetLastControl(),i=n.y,u=n.GetHeight()):Utils.StartsWith(e,PositionItem.Const.REF_BRO_PREFIX)?n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(e.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(n=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(e)),n==null&&(n=ControlMgr.GetInstance().GetReference(e))),n!=null&&(u=n.GetHeight(),i=e=="screen"?c.globalToLocal(new Point(0,0)).y:n==this.moParent?0:n.moParent==this.moParent?n.y:c.globalToLocal(n.localToGlobal(new Point(0,0))).y)),i=i||0,u=u||0,d=this.masYTypes[s],n!=null)switch(d){case PositionItem.Const.YTYPE_TO_TOP:t=i-this.miHeight;break;case PositionItem.Const.YTYPE_TO_BOTTOM:t=i+u;break;case PositionItem.Const.YTYPE_ALIGN_TOP:t=i;break;case PositionItem.Const.YTYPE_ALIGN_BOTTOM:t=i+u-this.miHeight;break;case PositionItem.Const.YTYPE_CENTER:t=Math.round(i+u/2-this.miHeight/2);break;case PositionItem.Const.TYPE_HEIGHT:t=u;break;case PositionItem.Const.TYPE_WIDTH:t=n.GetWidth();break;case PositionItem.Const.TYPE_CONTENT_WIDTH:t=n.GetContentWidth();break;default:h=h.replace(new RegExp(e+".","g"),t.toString())}t=t||0;h=e!=PositionItem.Const.KEY_PREVIOUS?h.replace(new RegExp(e+"."+d,"g"),t.toString()):h.replace(new RegExp("([^.a-zA-Z]|^)"+d+"([^.a-zA-Z]|$)","g"),"$1"+t.toString()+"$2")}h=h.replace("--","");f=PositionItem.EvaluateExpression(h,this.GetNode())}else if(n=null,this.moQuickYSource!=null&&(n=this.moQuickYSource.GetSource(),u=n.GetHeight(),i=this.moQuickYSource.GetType()==Dependency.Const.TYPE_REFERENCE?n.moParent==this.moParent?n.y:n==this.moParent?0:c.globalToLocal(n.localToGlobal(new Point(0,0))).y:this.moQuickYSource.GetType()==Dependency.Const.TYPE_SCREEN?c.globalToLocal(ControlMgr.GetInstance().GetRootPositionItem().localToGlobal(new Point(0,0),!0),!0).y:n.y),n!=null){switch(this.masYTypes[0]){case PositionItem.Const.YTYPE_TO_TOP:f=i-this.miHeight;break;case PositionItem.Const.YTYPE_TO_BOTTOM:f=i+u;break;case PositionItem.Const.YTYPE_ALIGN_TOP:f=i;break;case PositionItem.Const.YTYPE_ALIGN_BOTTOM:f=i+u-this.miHeight;break;case PositionItem.Const.YTYPE_CENTER:f=Math.round(i+u/2-this.miHeight/2)}f+=this.miYOff;Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] After offset applied - Control: "+this.msId+", iY: "+f+", miYOff: "+this.miYOff+", Source: "+(n?n.GetId():"NULL")+", SourceY: "+i+", SourceH: "+u)}else p=this.GetParentContainer(),p!=null&&p.msCtrlType!==PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT&&(f=Math.max(p.GetPaddingTop(),parseInt(this.miYOff)),Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] No reference - Control: "+this.msId+", iY: "+f+", Parent PaddingTop: "+p.GetPaddingTop()+", miYOff: "+this.miYOff));return Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Final calculated iY - Control: "+this.msId+", iY: "+f+", Current this.y: "+this.y+", Will update: "+(this.y!=f)),a=a||this.mbYMustBeCalculated||this.y!=f,a&&(this.mbYMustBeCalculated=!1,this.mbUpdateStyle=!0),Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] Control: "+this.msId+", Old Y: "+this.y+", New Y (iY): "+f+", bResult: "+a+", moPlaceHolder: "+(this.moPlaceHolder?"YES":"NO")+", moPosDecider: "+(this.moPosDecider?"YES":"NO")),this.moPlaceHolder==null?this.moPosDecider==null?(Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] SETTING this.y = "+f+" for control: "+this.msId),this.y=f):Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] NOT SETTING this.y (moPosDecider exists) for control: "+this.msId):(Matrix3.IsConsoleLogActive(this.msId)&&Matrix3.ConsoleLog(this.msId,"[PositionItem.CalculateYPosition] SETTING moPlaceHolder.y = "+f+" for control: "+this.msId),this.moPlaceHolder.y=f),a};HTMLElement.prototype.GetAutoHeight=function(){var n=this.style.height,t=Math.ceil(this.GetNode().getBoundingClientRect().height);return this.style.height=n,t};HTMLElement.prototype.GetChildrenHeight=function(){var t,u,i,f,n,r;for(iHeight=this.GetPaddingTop(),t=this.GetContainerForChildren(),u=this.YDependsOnlyFromLastControl()?t.length-1:0,i=u,f=t.length;i<f;i++)(n=t[i],!this.GetProperty(ConstProperties.Const.IS_MENU)||n.getAttribute("role")!=="menu"||this.contains(n))&&(n==null||n.IsEthereal()||(iHeight=Math.max(iHeight,n.y+Math.max(0,n.GetHeight()))));return this.mbHasFreeHtml&&(r=$(this.GetNode()).find(">.FreeHtml"),iHeight=Math.max(iHeight,r.position().top+r.outerHeight())),iHeight+=this.GetPaddingBottom()};HTMLElement.prototype.CalculateYPositionContainer=function(){var u=!1,h=this.GetProperty(ConstProperties.Const.RESIZE_HEIGHT,-1),n=this.GetOriginalHeight(),c=this.GetHeight(),p=this.y,t=n,l,e,f,r,a,v,o,s,y;
7if(h!=-1?t=Utils.GetViewportHeight()-h:this.GetOriginalHeight()==-1&&(t=this.GetChildrenHeight(),this.miGridUnitHeight&&(t=Math.ceil(t/this.miGridUnitHeight)*this.miGridUnitHeight)),this.GetProperty("Fold")==FoldProperties.Const.CLOSE&&(this.GetProperty("FoldOrientation")==FoldProperties.Const.ORIENTATION_TOP||this.GetProperty("FoldOrientation")==FoldProperties.Const.ORIENTATION_BOTTOM)?(l=FoldProperties.GetFoldHeight(this),e=this.GetProperty("FoldMinCloseSize",l),n=e<=t?e:t):n=t,this.SetHeight(n),u=this.CalculateYPositionControl()||u,n=this.GetHeight(),f=parseInt(this.GetProperty(ConstProperties.Const.MIN_RESIZE_HEIGHT)),f&&f!=0&&(n=Math.max(n,f)),r=this.GetProperty(ConstProperties.Const.MAX_RESIZE_HEIGHT),a=this.GetProperty(ConstProperties.Const.AUTOLIMIT_RESIZE_HEIGHT),a)for(r=0,o=this.GetContainerForChildren(),i=0,v=o.length;i<v;i++)oControl=o[i],oControl!=null&&(r=Math.max(r,oControl.y+Math.max(0,oControl.GetHeight())));return r&&r!=0&&(n=Math.min(n,r)),this.mbFixedAspectRatio&&(s=Utils.GetViewportWidth()-ResizeMgr.GetInstance().GetScrollbarSize()-this.GetProperty(ConstProperties.Const.RESIZE_WIDTH),y=s/n,y<this.mdFixedAspectRatio&&(n=s/this.mdFixedAspectRatio)),n!=c&&this.SetUpdateStyle(!0),u=n!=c||p!=this.y||this.mbFirstY,this.SetHeight(n),u&&(this.mbHasFreeHtml&&this.moContainerForChildrens.length>0||this.mbParentIsFreeHtml)&&(PositionMgr.GetInstance().AddToDirtyXList(this),this.TransferPositioningToDOM()),u};HTMLElement.prototype.GetId=function(){return this.msId};HTMLElement.prototype.GetIdWithoutVFormId=function(){var n=this.msId.split(Matrix3.Const.SEPARATOR_CONTROL);if(n.length==1)this.msId;else return n[1]};HTMLElement.prototype.GetInstanceName=function(){return this.GetIdWithoutVFormId()};HTMLElement.prototype.GetVFormId=function(){var n=this.msId.split(Matrix3.Const.SEPARATOR_CONTROL);return n.length==1?this.msId.substr(0,this.msId.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY)):n[0]};HTMLElement.prototype.IsVForm=function(){return this.msId.lastIndexOf(Matrix3.Const.SEPARATOR_CONTROL)==-1};HTMLElement.prototype.GetParentVFormId=function(){var n=this.GetVFormId();return n.substr(0,n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY))};HTMLElement.prototype.GetProperty=function(n,t){var i;return this.moProperties!=null&&(i=this.moProperties[n]),i==null&&(i=t),i};HTMLElement.prototype.SetProperty=function(n,t){this.moProperties==null&&(this.moProperties={});this.moProperties[n]=t};HTMLElement.prototype.HasProperty=function(n){return this.moProperties!=null?this.moProperties.hasOwnProperty(n):!1};HTMLElement.prototype.GetParentContainer=function(){for(var t=null,n=this;n!=null&&t==null;)n=n.moParent,t=n;return t};HTMLElement.prototype.GetLastControl=function(){var r=null,t,n,i;return this.moPlaceHolder!=null?(t=moPlaceHolder,n=moPlaceHolder.moParent.moParent):(t=this,n=this.GetParentContainer()),n!=null&&(i=Utils.IndexOf(n.GetContainerForChildren(),t)-1,i>=0&&(r=n.GetContainerForChildren()[i])),r};HTMLElement.prototype.GetBrotherId=function(n){var t=this.msId.split(Matrix3.Const.SEPARATOR_CONTROL);return t.length==1?this.msId.substr(0,this.msId.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY))+Matrix3.Const.SEPARATOR_CONTROL+n:t[0]+Matrix3.Const.SEPARATOR_CONTROL+n};HTMLElement.prototype.IsEthereal=function(){return this.mbEthereal};HTMLElement.prototype.IsUpdateStyle=function(){return this.mbUpdateStyle&&!this.mbForcedSkipUpdatingStyle};HTMLElement.prototype.ApplyStyle=function(n){if(n==null&&(n=!1),this.moProperties&&(this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&AutoScaleProperties.Apply(this),this.moProperties.hasOwnProperty(MultipleSourcesProperties.Const.PROPERTY_MULTIPLE_SOURCE)&&this.ApplyMultipleSources()),!Matrix3.HasPendingEventOnParentOrSelf(Utils.GetVFormId(this.msId))&&(this.mbUpdateStyle=!1,this.mbDispatchControlStyleAppliedEvent)){var t=new CustomEvent("ControlStyleApplied",{bubbles:!1,detail:{id:this.msId}});this.dispatchEvent(t)}this.mbForceHasChangedCalled=!1};HTMLElement.prototype.TransformFloatingOffsetY=function(n){var i,t,r;return this.moFloatingParent?(i=this.moParent.offsetBetweenControl
7s(this.moFloatingParent),t=0,this.moFloatingParent.GetNode?(r=this.moFloatingParent.GetNode(),t=r.scrollTop):t=this.moFloatingParent.scrollTop,t&&(i.y-=t),n+i.y):n};HTMLElement.prototype.TransformFloatingOffsetX=function(n){var i,t,r;return this.moFloatingParent?(i=this.moParent.offsetBetweenControls(this.moFloatingParent),t=0,this.moFloatingParent.GetNode?(r=this.moFloatingParent.GetNode(),t=r.scrollLeft):t=this.moFloatingParent.scrollLeft,t&&(i.x-=t),n+i.x):n};HTMLElement.prototype.TransferPositioningToDOM=function(){var nt=!1,n=this.GetNode(),w,h,f,c,l,a,v,b,t,o,u,i,k,d,r,y,e,p;if(!("isConnected"in Node.prototype)||n.isConnected){if((this.mbAnimate||PositionMgr.mbAnimateGlobal)&&!n.preventAnimationForAnnouncement?(w=Matrix3.mbPreventAnimation?0:this.miAnimLen?this.miAnimLen:250,this.mbAnimated=w>0,$(n).css({"transition-property":"top left width height","transition-duration":w+"ms","transition-timing-function":"ease-in-out"})):this.mbAnimated&&(this.mbAnimated=!1,$(n).css({"transition-duration":"0ms"})),h=this.mbParentIsFreeHtml?"":this.mbAutoWidth?undefined:Math.max(this.miWidth,0)+"px",f=this.miFixedHeight>0?this.miFixedHeight+"px":this.mbAutoHeight?undefined:Math.max(this.miHeight,0)+"px",c=function(n){var i={};for(var t in n)typeof n[t]!="undefined"&&(i[t]=n[t]);return i},!this.mbAbsolutePos){this.moFloatingParent?(l=this.moParent.offsetBetweenControls(this.moFloatingParent),this.mbPosFixed?(o=this.miFixedX,Utils.DebugFormPresent()&&Utils.IsInAnyPopup(this.moFloatingParent.msId)&&Utils.IsInTopLevelPopup(this.moFloatingParent.msId)&&(o-=16),$(n).css(c({left:o+"px",top:this.miFixedY+"px",width:h,height:f}))):(a=0,v=0,this.moFloatingParent.GetNode?(b=this.moFloatingParent.GetNode(),a=b.scrollTop,v=b.scrollLeft):(a=this.moFloatingParent.scrollTop,v=this.moFloatingParent.scrollLeft),a&&(l.y-=a),v&&(l.x-=v),t=$(n),t.css(c({left:this.x-l.x+"px",top:this.y-l.y+"px",width:h,height:f})),t.attr("data-stayinview")&&(u=t.offset(),i={top:u.top,left:u.left},u.top+t.height()>Utils.GetViewportHeight()?i.top=Math.max(0,Utils.GetViewportHeight()-t.height()):u.top<0&&(i.top=0),u.left+t.width()>Utils.GetViewportWidth()?i.left=Math.max(0,Utils.GetViewportWidth()-t.width()):i.left<0&&(i.left=0),t.offset(i),n.x+=i.left-u.left,n.y+=i.top-u.top))):this.msCtrlType!=PositionItem.Const.CONTROL_TYPE_POPUP&&(n=this.GetNode(),t=$(n),this.mbPosFixed?(o=this.miFixedX,Utils.DebugFormPresent()&&Utils.IsInAnyPopup(this.msId)&&Utils.IsInTopLevelPopup(this.msId)&&(o-=16),t.css(c({left:o+"px",top:this.miFixedY+"px",width:h,height:f}))):t.css(c({left:this.x+"px",top:this.y+"px",width:h,height:f})),t.attr("data-stayinview")&&(u=t.offset(),i={top:u.top,left:u.left},u.top+t.height()>Utils.GetViewportHeight()?i.top=Math.max(0,Utils.GetViewportHeight()-t.height()):u.top<0&&(i.top=0),u.left+t.width()>Utils.GetViewportWidth()?i.left=Math.max(0,Utils.GetViewportWidth()-t.width()):i.left<0&&(i.left=0),t.offset(i),n.x+=i.left-u.left,n.y+=i.top-u.top),typeof AnnouncementManager!="undefined"&&(k=t.data(AnnouncementManager.Const.WRAPPER_DATA_LAST_UPDATED_HEIGHT),k&&k!=iHeight&&(this.mbForceRecheckAnnouncementRootHeight=!0)));switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_PANEL_COL:f=Math.max(this.moParent.miHeight,0)+"px";$(n).css({height:f,"min-height":f});break;case PositionItem.Const.CONTROL_TYPE_PANEL_LINE:f=Math.max(this.miHeight,0)+"px";d=$(n).find(">.PanelCol");d.css("height",f);d.css("min-height",f);break;case PositionItem.Const.CONTROL_TYPE_BUTTON:r=$(this).find("a");this.GetWidth()===0||this.GetHeight()===0||this.classList.contains("InvisibleC")&&!DeferInject.IsShowOnParentHover(this.GetId())?(this.mbOriginalAttrsRemembered=!0,this.msOriginalTabIndex=r.attr("tabindex"),this.msOriginalRole=r.attr("role"),this.msOriginalAriaLabel=r.attr("aria-label"),r.attr("tabindex","-1"),r.attr("role","presentation"),r.attr("aria-label","")):this.mbOriginalAttrsRemembered?(r.attr("tabindex",this.msOriginalTabIndex),r.attr("role",this.msOriginalRole),r.attr("aria-label",this.msOriginalAriaLabel)):Utils.IsStringFilled(r.attr("aria-label"))||(Utils.IsStringFilled(r.text())?r.attr("aria-label",r.text()):Utils.IsStringFilled(r.attr("title"))&&r.attr("aria-label",r.attr("title")));break;case PositionItem.Const.CONTROL_TYPE_TEXTAREA:case PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION:case PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST:case PositionItem.Const.CONTROL_TYPE_TEXTBOX:if(this.msCtrlType===PositionItem.Const.CONTROL_TYPE_TEXTAREA?(e=$(n).find(">.Input>textarea"),e.length>0&&(n.style.setProperty("--input-height",e.outerHeight()+"px"),n.style.setProperty("--input-width",e.outerWidth()+"px"))):(y=$(n).find(">.Input>input:not([type='hidden'])"),this.msCtrlType===PositionItem.Const.CONTROL_TYPE_DROPDOWNLIST&&(y=$(n).find(">.Input>select")),e=$(n).find(">.Input>textarea"),y.length>0?(n.style.setProperty("--input-height",y.outerHeight()+"px"),n.style.setProperty("--input-width",y.outerWidth()+"px")):e.length>0&&(n.style.setProperty("--input-height",e.outerHeight()+"px"),n.style.setProperty("--input-width",e.outerWidth()+"px"))),p=$(n).find(">.Lbl"),p.length>0){n.style.setProperty("--label-width",p.outerWidth()+"px");var tt=p[0],s=getComputedStyle(tt),it=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),rt=parseFloat(s.borderTopWidth)+parseFloat(s.borderBottomWidth),g=tt.clientHeight-it-rt,ut=parseInt(s.lineHeight.substring(0,s.lineHeight.length-2)),ft=n.style.getPropertyValue("--label-height");ft!==g+"px"&&(n.style.setProperty("--label-height",g+"px"),g>ut&&(n.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(n),nt=!0,PositionMgr.GetInstance().mbPositioning||PositionMgr.GetInstance().CalculatePosition()))}}}return nt}};HTMLElement.prototype.ApplyPostPositionProperties=function(){var n,t;this.HasProperty(ConstProperties.Const.SCROLL_TO_ME)&&this.GetProperty(ConstProperties.Const.SCROLL_TO_ME)&&(n=0,this.HasProperty(ConstProperties.Const.SCROLL_TO_ME_PADDING_TOP)&&(n=-this.GetProperty(ConstProperties.Const.SCROLL_TO_ME_PADDING_TOP)),t=this.HasProperty(ConstProperties.Const.ANIMATE_SCROLL_TO_ME)&&this.GetProperty(ConstProperties.Const.ANIMATE_SCROLL_TO_ME),this.ScrollToMe(t,!1,!1,n),delete this.moProperties[ConstProperties.Const.SCROLL_TO_ME])};HTMLElement.prototype.ScrollPopupContainerToMe=function(){for(var n=this.moParent,t;n!=null;)n.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP&&(t=new Point(this.GetWidth()/2,0),t=this.localToGlobal(t),$(n.GetNode()).closest("."+Popup.Const.SCROLLABLE_CONTAINER_CLASS).scrollTop(t.y).scrollLeft(t.x-window.innerWidth/2)),n=n.moParent};
7HTMLElement.prototype.ScrollContainerToMe=function(n){var i=document.getElementById(n),t;i&&(t=new Point(this.GetWidth()/2,0),t=this.localToGlobal(t),$(i).scrollTop(t.y).scrollLeft(t.x-window.innerWidth/2))};HTMLElement.prototype.ScrollToMe=function(n,t,i,r,u){for(var f=this.moParent,s=1,h,e;f!=null&&s>0;)f.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP&&(s=0,e=new Point(this.GetWidth()/2,0),e=this.localToGlobal(e),$(f.GetNode()).closest("."+Popup.Const.SCROLLABLE_CONTAINER_CLASS).scrollTop(e.y).scrollLeft(e.x-window.innerWidth/2)),h=$(f.GetNode()),t||i?t?h.css("overflow-x")!="hidden"&&f.mbSX&&(f.ScrollToMakeControlVisible(this,n,r),s--):i&&h.css("overflow-y")!="hidden"&&f.mbSY&&(f.ScrollToMakeControlVisible(this,n,r),s--):(h.css("overflow-x")!="hidden"||h.css("overflow-y")!="hidden")&&(f.mbSX||f.mbSY)&&(f.ScrollToMakeControlVisible(this,n,r),s--),f=f.moParent;if(s>0){e=new Point(this.GetWidth()/2,0);e=this.localToGlobal(e);var l=ControlMgr.GetInstance().GetRootPositionItem(),c=new Point(window.innerWidth/2,0),o=new Point(e.x-c.x,e.y-c.y);u&&(o.y-=window.innerHeight-this.GetHeight());r&&(o.y+=r);window.scrollTo?n?$(Utils.Form1()).animate({scrollTop:o.y},350):Utils.Form1().scrollTop=o.y:n?$(document.body).animate({scrollLeft:o.x,scrollTop:o.y},350):(document.body.scrollLeft=o.x,document.body.scrollTop=o.y)}};HTMLElement.prototype.IsScrollable=function(){return this.IsScrollableX()||this.IsScrollableY()};HTMLElement.prototype.IsScrollableX=function(){var n=this.GetNode(),t=$(n).css("overflow-x");return t!=="hidden"&&t!=="visible"&&n.clientWidth&&n.scrollWidth&&n.clientWidth<n.scrollWidth};HTMLElement.prototype.IsScrollableY=function(){var n=this.GetNode(),t=$(n).css("overflow-y");return t!=="hidden"&&t!=="visible"&&n.clientHeight&&n.scrollHeight&&n.clientHeight<n.scrollHeight};HTMLElement.prototype.ScrollToMakeControlVisible=function(n,t,i){var f=new Point(n.GetWidth()/2,0),s,h;f=this.globalToLocal(n.localToGlobal(f));var o=new Point(this.GetWidth()/2,0),u=new Point(f.x-o.x,f.y-o.y),r=this.GetNode(),e=$(r);return e.css("overflow-x")=="hidden"&&(u.x=0),e.css("overflow-y")=="hidden"&&(u.y=0),s=r.scrollTop,h=r.scrollLeft,n.HasProperty(ConstProperties.Const.SCROLL_TO_ME_PADDING_TOP)&&(u.y-=n.GetProperty(ConstProperties.Const.SCROLL_TO_ME_PADDING_TOP)),i&&(u.y+=i),t?e.animate({scrollTop:r.scrollTop+u.y,scrollLeft:r.scrollLeft+u.x},350):(r.scrollTop+=u.y,r.scrollLeft+=u.x),delete ScrollbarMgr.moScrollPosition[this.msId],r.scrollTop!=s||r.scrollLeft!=h};HTMLElement.prototype.SetDeep=function(n){this.miDeep=n};HTMLElement.prototype.GetDeep=function(){return this.miDeep};HTMLElement.prototype.GetOriginalHeight=function(){return this.miOriginalHeight};HTMLElement.prototype.GetOriginalWidth=function(){return this.miOriginalWidth};HTMLElement.prototype.GetOriginalHeight_NotOverridable=function(){return this.miOriginalHeight_NotOverridable};HTMLElement.prototype.GetOriginalWidth_NotOverridable=function(){return this.miOriginalWidth_NotOverridable};HTMLElement.prototype.ForceXChildrenDependence=function(){return this.mbForceXChildDep||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL};HTMLElement.prototype.ForceYChildrenDependence=function(){return this.mbForceYChildDep||this.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL};HTMLElement.prototype.XDependsOnlyFromLastControl=function(){return this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_LINE};HTMLElement.prototype.YDependsOnlyFromLastControl=function(){return!1};HTMLElement.prototype.GetContainerForChildren=function(){return this.moContainerForChildrens};HTMLElement.prototype.GetAllColumns=function(){for(var n,i=[],r=this.moContainerForChildrens.length,t=0;t<r;t++)n=this.moContainerForChildrens[t],n.hasAttribute("data-table-ethereal")||$(n).hasClass("DVMenuCell")||i.push(n);return i};HTMLElement.prototype.IsContainer=function(){var n=!1;switch(this.msCtrlType){case PositionItem.Const.CONTROL_TYPE_PANEL:case PositionItem.Const.CONTROL_TYPE_PANEL:case PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL:case PositionItem.Const.CONTROL_TYPE_PANEL_TABLE:case PositionItem.Const.CONTROL_TYPE_PANEL_COL:case PositionItem.Const.CONTROL_TYPE_PANEL_LINE:case PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT:n=!0}return n};HTMLElement.prototype.GetWidth=function(){return this.miWidth};HTMLElement.prototype.SetWidth=function(n){this.miWidth=parseInt(n)};HTMLElement.prototype.GetHeight=function(){return this.miHeight};HTMLElement.prototype.SetHeight=function(n){this.miHeight=parseInt(n)};HTMLElement.prototype.SetXType=function(n){this.masXTypes[0]=n};HTMLElement.prototype.SetYType=function(n){this.masYTypes[0]=n};HTMLElement.prototype.GetPaddingCacheKey=function(){var n=this.GetNode().className;return this.msCtrlType==PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT?n+" "+this.GetNode().tagName:n};HTMLElement.prototype.GetPaddingTop=function(){if(this.miCachedPaddingTop==null){var n=this.GetProperty(ConstProperties.Const.FLASH_PADDING,null);this.miCachedPaddingTop=this.GetProperty(ConstProperties.Const.FLASH_PADDING_TOP,n);this.miCachedPaddingTop==null&&(this.miCachedPaddingTop=parseInt(getStyle(this,"padding-top",this.GetPaddingCacheKey(),this.mbNoPaddingCache,0)));this.miCachedPaddingTop=this.miCachedPaddingTop||0}return this.miCachedPaddingTop};HTMLElement.prototype.GetPaddingRight=function(){if(this.miCachedPaddingRight==null){var n=this.GetProperty(ConstProperties.Const.FLASH_PADDING,null);this.miCachedPaddingRight=this.GetProperty(ConstProperties.Const.FLASH_PADDING_RIGHT,n);this.miCachedPaddingRight==null&&(this.miCachedPaddingRight=parseInt(getStyle(this,"padding-right",this.GetPaddingCacheKey(),this.mbNoPaddingCache,0)));this.miCachedPaddingRight=this.miCachedPaddingRight||0}return this.miCachedPaddingRight};HTMLElement.prototype.GetPaddingBottom=function(){if(this.miCachedPaddingBottom==null){var n=this.GetProperty(ConstProperties.Const.FLASH_PADDING,null);this.miCachedPaddingBottom=this.GetProperty(ConstProperties.Const.FLASH_PADDING_BOTTOM,n);this.miCachedPaddingBottom==null&&(this.miCachedPaddingBottom=parseInt(getStyle(this,"padding-bottom",this.GetPaddingCacheKey(),this.mbNoPaddingCache,0)));this.miCachedPaddingBottom=this.miCachedPaddingBottom||0}return this.miCachedPaddingBottom};HTMLElement.prototype.GetPaddingLeft=function(){if(this.miCachedPaddingLeft==null){var n=this.GetProperty(ConstProperties.Const.FLASH_PADDING,null);this.miCachedPaddingLeft=this.GetProperty(ConstProperties.Const.FLASH_PADDING_LEFT,n);this.miCachedPaddingLeft==null&&(this.miCachedPaddingLeft=parseInt(getStyle(this,"padding-left",this.GetPaddingCacheKey(),this.mbNoPaddingCache,0)));this.miCachedPaddingLeft=this.miCachedPaddingLeft||0}return this.miCachedPaddingLeft};
7HTMLElement.prototype.SetUpdateStyle=function(n){this.mbUpdateStyle=n};HTMLElement.prototype.GetActivatedProperty=function(n){return this.moActivatedProperties[n]};HTMLElement.prototype.AddXDependent=function(n){var t=Utils.IndexOf(this.moXDependents,n);t==-1&&this.moXDependents.push(n)};HTMLElement.prototype.AddYDependent=function(n){var t=Utils.IndexOf(this.moYDependents,n);t==-1&&this.moYDependents.push(n)};HTMLElement.prototype.RemoveXDependent=function(n){var t=Utils.IndexOf(this.moXDependents,n);t!=-1&&this.moXDependents.splice(t,1)};HTMLElement.prototype.RemoveYDependent=function(n){var t=Utils.IndexOf(this.moYDependents,n);t!=-1&&this.moYDependents.splice(t,1)};HTMLElement.prototype.AddXSource=function(n){var t=Utils.IndexOf(this.moXSources,n);t==-1&&this.moXSources.push(n)};HTMLElement.prototype.AddYSource=function(n){var t=Utils.IndexOf(this.moYSources,n);t==-1&&this.moYSources.push(n)};HTMLElement.prototype.RemoveXSource=function(n){this.moXSources.splice(Utils.IndexOf(this.moXSources,n),1)};HTMLElement.prototype.RemoveYSource=function(n){this.moYSources.splice(Utils.IndexOf(this.moYSources,n),1)};HTMLElement.prototype.GetXDependents=function(){return this.moXDependents};HTMLElement.prototype.GetXSources=function(){return this.moXSources};HTMLElement.prototype.GetYDependents=function(){return this.moYDependents};HTMLElement.prototype.GetYSources=function(){return this.moYSources};HTMLElement.prototype.CleanDependencies=function(){var n;if(this.moXSources)while(n=this.moXSources.pop())n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1);if(this.moQuickXSource&&(n=this.moQuickXSource,n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1),this.moQuickXSource=null),this.moYSources)while(n=this.moYSources.pop())n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1);if(this.moQuickYSource&&(n=this.moQuickYSource,n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1),this.moQuickYSource=null),this.moQuickWSource&&(n=this.moQuickWSource,n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1),this.moQuickWSource=null),this.moQuickHSource&&(n=this.moQuickHSource,n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!0,!1),this.moQuickHSource=null),this.moXDependents)while(n=this.moXDependents.pop())n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!1,!0);if(this.moYDependents)while(n=this.moYDependents.pop())n.GetType()!=Dependency.Const.TYPE_PARENT&&n.Delete(!1,!0);PositionMgr.GetInstance().RemoveFromBothDirtyLists(this)};HTMLElement.prototype.NullifyDomReferences=function(){this.moBgDiv=null;this.moLinkedImage=null;this.maTextNodes=null;this.moAncestorWebComponents=null;this.moParent=null;this.moContainerForChildrens=null;this.moSuperContainer=null;this.moFloatingParent=null;this.moPlaceHolder=null;this.moTextarea=null;this.moInput=null;this.moQuickXSource=null;this.moQuickWSource=null;this.moQuickYSource=null;this.moQuickHSource=null};HTMLElement.prototype.GetAncestorWithFlashID=function(n,t){var i,r;if(t==null&&(t=!0),i=null,t||this.GetProperty(ConstProperties.Const.FLASH_ID)!=n){if(r=this.GetParentContainer(),r!=null)i=r.GetAncestorWithFlashID(n,!1);else if(n==ConstValues.Const.SUPER_CONTAINER)return ResizeMgr.GetInstance().GetScreenAnchor()}else i=this;return i};HTMLElement.prototype.GetLabelWidth=function(){var t=0,f,e,u,o,n,c,i,r,l;for(this.style.width!==this.msOriginalDOMWidth&&(this.style.width=this.msOriginalDOMWidth),f=this.getBoundingClientRect().x,e=this.GetChildNodes(),u=0,o=e.length;u<o;u++)if(n=e[u],n instanceof HTMLElement){var s=n.getBoundingClientRect(),a=Math.max(n.offsetLeft,s.x-f),v=Math.max(n.offsetWidth,s.width),h=Math.round((a+v)*100)/100;h!=undefined&&(t=Math.max(t,Math.ceil(h)))}else if(n.nodeType===Node.TEXT_NODE&&n.nodeValue&&n.nodeValue.replace(/\s+/g,"").length>0)try{c=n;i=document.createRange();i.selectNode(c);r=i.getBoundingClientRect();i.detach&&i.detach();r&&r.width>0&&(l=Math.round((r.x-f+r.width)*100)/100,t=Math.max(t,Math.ceil(l)))}catch(y){}return t};HTMLElement.prototype.GetMaxContentWidth=function(){for(var n=0,r=this.GetChildNodes(),t=0,f=r.length;t<f;t++){var i=$(r[t]),e=i[0].style.width,u=Math.ceil(i.css("width","max-content").width())+1;u&&(n=Math.max(n,u));i.css("width",e)}return n};HTMLElement.prototype.GetMaxContentHeight=function(){for(var n=0,r=this.GetChildNodes(),t=0,f=r.length;t<f;t++){var i=$(r[t]),e=i[0].style.height,u=Math.ceil(i.css("height","max-content").height())+1;u&&(n=Math.max(n,u));i.css("height",e)}return n};HTMLElement.prototype.CalculateXPositionLabel=function(){var t=this.CalculateXPositionControl(),n;return t&&(n=this.GetWidth(),this.GetOriginalWidth()==-1&&(n=this.GetLabelWidth(),n!=this.GetWidth()&&(this.SetWidth(n),this.CalculateXPositionControl(),t=!0,this.mbUpd
7ateStyle=!0)),this.GetOriginalHeight()==-1&&(PositionMgr.GetInstance().AddToDirtyYList(this),this.miOriginalWidth==-1||!this.msWidthReference.length!=0||this.mbAutoWidth||DOMChangesQueue.GetInstance().QueueSetCss(this.GetNode(),"width",this.miWidth+"px"))),t};HTMLElement.prototype.CalculateYPositionLabel=function(){var h=!1,n,l,f,e,t,o,u,c,i,s;if(this.GetOriginalHeight()==-1){if(n=0,l=!1,this.msCtrlType==PositionItem.Const.CONTROL_TYPE_PARAMETER_STR&&this.moTextarea&&(this.GetNode().style.width||DOMChangesQueue.GetInstance().ApplyQueue(),this.moTextarea.style.height="auto",this.moTextarea.style.height=this.moTextarea.scrollHeight+"px"),this.msCtrlType==PositionItem.Const.CONTROL_TYPE_TEXTAREA&&this.moProperties&&this.moProperties.hasOwnProperty(AutoExpandHeight.Const.EXPAND_ON_FOCUS_TO_HEIGHT)&&(n=0,!AutoExpandHeight.moRegistered.hasOwnProperty(this.msId))){var r=$(this).find("textarea"),t=this.moProperties[AutoExpandHeight.Const.EXPAND_ON_FOCUS_TO_HEIGHT],a=parseInt(r.css("height"));r.attr("rows","1").css("height","auto");f=Math.max(51,r[0].scrollHeight+2);e=a;e=f>t?t:f;r.css("height",e+"px")}for(t=this.GetProperty(ConstProperties.Const.MAX_RESIZE_HEIGHT),o=this.GetChildNodes(),u=0,c=o.length;u<c;u++)(i=o[u],i.nodeType===Node.ELEMENT_NODE)&&(i.classList.contains("resize-sensor")||(s=i.offsetTop+Math.max(i.offsetHeight,i.scrollHeight),s&&(n=Math.max(n,s),t&&t!=0&&(n=Math.min(n,t)))));this.miGridUnitHeight&&(n=Math.ceil(n/this.miGridUnitHeight)*this.miGridUnitHeight);n!=this.GetHeight()&&(this.SetHeight(n),h=!0,this.mbUpdateStyle=!0)}return this.CalculateYPositionControl()||h};HTMLElement.prototype.CalculateXPositionButton=function(){var t=this.CalculateXPositionControl(),n,i;return this.GetOriginalWidth()==-1&&this.moLinkedImage!=null&&(n=this.moLinkedImage.offsetWidth,n!=undefined&&n!=this.miWidth&&(this.SetWidth(n),t=!0,this.mbUpdateStyle=!0)),t&&(n=this.GetWidth(),this.GetOriginalWidth()==-1&&(n=0,this.moLinkedImage!=null?(n=this.moLinkedImage.offsetWidth,n!=undefined&&n!=this.miWidth&&(this.SetWidth(n),t=!0,this.mbUpdateStyle=!0)):this.miTextWidth?n=this.miTextWidth:(this.style.width!==this.msOriginalDOMWidth&&(this.style.width=this.msOriginalDOMWidth),this.GetChildNodes().length>1?(i=this.GetChildNodes().item(1),this.miTextWidth=i.offsetLeft+i.offsetWidth+1):this.miTextWidth=0,n=this.miTextWidth),this.miMaxWidth&&(n=Math.min(this.miMaxWidth,n)),n!=this.GetWidth()&&(this.SetWidth(n),this.CalculateXPositionControl(),t=!0,this.mbUpdateStyle=!0)),t&&this.GetOriginalHeight()==-1&&(PositionMgr.GetInstance().AddToDirtyYList(this),this.miTextHeight=null,DOMChangesQueue.GetInstance().QueueResetHeight(this.GetNode()),this.moLinkedImage==null&&this.GetChildNodes().length&&(this.miOriginalWidth==-1||!this.msWidthReference.length!=0&&n!=this.miMaxWidth||this.mbAutoWidth||DOMChangesQueue.GetInstance().QueueSetCss(this.GetNode(),"width",this.miWidth+"px")))),t&&this.moLinkedImage!=null&&this.moProperties&&this.GetOriginalHeight()==-1&&this.GetOriginalWidth()!=-1&&this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&AutoScaleProperties.Apply(this),t};HTMLElement.prototype.CalculateYPositionButton=function(){var t=!1,n,i,r;return this.GetOriginalHeight()==-1&&(n=0,this.moLinkedImage!=null?(n=this.moLinkedImage.offsetHeight,n!=undefined&&n!=this.miHeight&&(this.SetHeight(n),t=!0,this.mbUpdateStyle=!0)):this.miTextHeight==null?(this.style.height!==this.msOriginalDOMHeight&&(this.style.height=this.msOriginalDOMHeight),this.GetChildNodes().length>1?(i=this.GetChildNodes().item(1),r=this.GetChildNodes().item(2),$(i).hasClass("IB")&&i.nodeName==="DIV"&&r&&(i=r),this.miTextHeight=i.offsetTop+i.scrollHeight):this.miTextHeight=0,n=this.miTextHeight):n=this.miTextHeight,this.miGridUnitHeight&&(n=Math.ceil(n/this.miGridUnitHeight)*this.miGridUnitHeight),n!=this.GetHeight()&&(this.SetHeight(n),t=!0,this.mbUpdateStyle=!0)),t=this.CalculateYPositionControl()||t,t&&this.moLinkedImage!=null&&this.moProperties&&this.GetOriginalWidth()==-1&&this.GetOriginalHeight()!=-1&&this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&AutoScaleProperties.Apply(this),t};HTMLElement.prototype.RecursiveRemove=function(){var t=[],n,r,i,u;for(t.push(this),r=ControlMgr.GetInstance();t.length>0;)if(n=t.pop(),n.CleanDependencies(),r.RemovePositionItem(n),n.moContainerForChildrens&&n.moContainerForChildrens.length>0)for(i=0,u=n.moContainerForChildrens.length;i<u;i++)t.push(n.moContainerForChildrens[i]);setTimeout(function(){try{Array.from(this.querySelectorAll("*")).filter(function(n){return n.moFloatingParent&&!this.contains(n.moParent)}
7.bind(this)).forEach(function(n){$(n).detach()});var n=Array.from(this.querySelectorAll("*"));n.push(this);jQuery.cleanData($(n))}catch(t){Matrix3.LogError("Failed to cleanup jQuery data for node id="+this.id+" Error: "+t,!0)}}.bind(this),50)};HTMLElement.prototype.CalculateXPositionImage=function(){var n=!1,t;return this.GetOriginalWidth()==-1&&this.moLinkedImage!=null&&(t=this.moLinkedImage.offsetWidth,t!=undefined&&t!=this.miWidth&&(this.SetWidth(t),n=!0,this.mbUpdateStyle=!0)),n=this.CalculateXPositionControl()||n,n&&this.moLinkedImage!=null&&this.moProperties&&this.GetOriginalHeight()==-1&&this.GetOriginalWidth()!=-1&&this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&AutoScaleProperties.Apply(this),n};HTMLElement.prototype.CalculateYPositionImage=function(){var n=!1,t;return this.GetOriginalHeight()==-1&&this.moLinkedImage!=null&&(t=this.moLinkedImage.offsetHeight,t!=undefined&&t!=this.miHeight&&(this.SetHeight(t),n=!0,this.mbUpdateStyle=!0)),n=this.CalculateYPositionControl()||n,n&&this.moLinkedImage!=null&&this.moProperties&&this.GetOriginalWidth()==-1&&this.GetOriginalHeight()!=-1&&this.moProperties.hasOwnProperty(AutoScaleProperties.Const.PROPERTY_POLICY)&&AutoScaleProperties.Apply(this),n};HTMLElement.prototype.CalculateXPositionIFrame=function(){var t=!1,n;if(this.GetOriginalWidth()==-1){n=0;try{n=GetWidthIFrame(this)}catch(i){}n!=undefined&&n!=this.miWidth&&(this.SetWidth(n),t=!0,this.mbUpdateStyle=!0)}return this.CalculateXPositionControl()||t};HTMLElement.prototype.CalculateXPositionWebComponent=function(){var r=!1,f=this.miWidth,n,u,i,t;if(this.GetOriginalWidth()==-1&&this.shadowRoot&&this.shadowRoot.children.length>0){if(n=0,this.shadowRoot)for(u=this.shadowRoot.children,t=0;t<u.length;t++)n=Math.max(n,u[t].offsetLeft+u[t].offsetWidth);if(i=this.GetContainerForChildren(),i&&i.length>0)for(t=0;t<i.length;t++)n=Math.max(n,i[t].offsetLeft+i[t].offsetWidth);n=Math.max(n,this.offsetWidth);n!=undefined&&n!=this.miWidth&&(this.SetWidth(n),r=!0,this.mbUpdateStyle=!0)}return r=this.CalculateXPositionControl()||r,f==this.miWidth||this.GetOriginalHeight()!=-1||this.mbAutoWidth||(PositionMgr.GetInstance().AddToDirtyYList(this),DOMChangesQueue.GetInstance().QueueResetHeight(this.GetNode()),DOMChangesQueue.GetInstance().QueueSetCss(this.GetNode(),"width",this.miWidth+"px")),r};HTMLElement.prototype.CalculateXPositionDataTable=function(){var n=this.CalculateXPositionControl();return n&&PositionMgr.GetInstance().AddToDirtyYList(this),n};HTMLElement.prototype.CalculateYPositionIFrame=function(){var t=!1,n;if(this.GetOriginalHeight()==-1){n=0;try{n=GetHeightIFrame(this)}catch(i){}n!=undefined&&n!=this.miHeight&&(this.SetHeight(n),t=!0,this.mbUpdateStyle=!0)}return this.CalculateYPositionControl()||t};HTMLElement.prototype.CalculateYPositionWebComponent=function(){var u=!1,n,r,i,t;if(this.GetOriginalHeight()==-1&&this.shadowRoot&&this.shadowRoot.children.length>0){if(n=0,this.shadowRoot)for(r=this.shadowRoot.children,t=0;t<r.length;t++)n=Math.max(n,r[t].offsetTop+r[t].offsetHeight);if(i=this.GetContainerForChildren(),i&&i.length>0)for(t=0;t<i.length;t++)n=Math.max(n,i[t].offsetTop+i[t].offsetHeight);n=Math.max(n,this.offsetHeight);n!=undefined&&n!=this.miHeight&&(this.SetHeight(n),u=!0,this.mbUpdateStyle=!0)}return this.CalculateYPositionControl()||u};HTMLElement.prototype.CalculateYPositionDataTable=function(){var n=!1,i=this.GetOriginalHeight()==0,t;if(i){t=0;try{t=$(this.GetChildNodes()[0]).height()}catch(r){}t!=undefined&&t!=this.miHeight&&(this.SetHeight(t),n=!0,this.mbUpdateStyle=!0)}return n=this.CalculateYPositionControl()||n,n&&!i&&$Control(this.msId,DataTableCtrl.Const.CONTROL_NAME).ApplyScrollHeight(),n};HTMLElement.prototype.CalculateXPositionPanelTable=function(){var v=this.CalculateXPositionContainer(),h=0,f,e,l,r,o,u,n,i,a;if(this.GetContainerForChildren().length>0&&(h=this.GetContainerForChildren()[0].GetAllColumns().length),this.maiActualColWidth==null||v){var s=this.moContainerForChildrens,t=this.GetWidth(),c=this.ComputeActualColWidth(h,s);for(c>t&&(t=c,this.SetWidth(t)),f=PositionMgr.GetInstance(),e=0,l=s.length;e<l;e++)if(r=s[e],r.GetOriginalWidth()!=t&&(r.OverrideOriginalWidth(t),r.ForceHasChanged(),f.AddToDirtyXList(r)),o=0,u=r.GetAllColumns(),u.length==1)n=u[0],n.GetOriginalWidth()!=t&&(n.OverrideOriginalWidth(t),n.ForceHasChanged(),f.AddToDirtyXList(n));else for(i=0,a=u.length;i<a;i++)n=u[i],n!=null&&((n.GetOriginalWidth()!=this.maiActualColWidth[i]||n.miXOff!=o)&&(n.OverrideOriginalWidth(this.maiActualColWidth[i]),n.miXOff=o,n.ForceHasChanged(),f.AddToDirtyXList(n)),o+=this.maiActualColWidth[i])}return!0};HTMLElement.prototype.ComputeActualColWidth=function(n,t){var s=this.GetWidth(),f,r,i,e,u;for(this.maiActualColWidth=[],f=0,r=0,i=0;i<n;i++)this.maiColWidth[i]!=null?this.maiColWidth[i]==-1?(e=t.length==1?t[0]:t[Math.max(1,t.length-1)],u=e.GetAllColumns()[i],u.OverrideOriginalWidth(-1),u.CalculateXPosition(),this.maiActualColWidth[i]=u.GetWidth()):this.maiActualColWidth[i]=this.maiColWidth[i]:(this.maiActualColWidth[i]=30,this.mabCanGrow[i]=1),f+=this.maiActualColWidth[i],(this.mabCanGrow[i]==null||this.mabCanGrow[i]==1)&&(r+=this.maiActualColWidth[i]);var h=s-f,c=Math.max(1,(h+r)/r),o=0;for(i=0;i<n;i++)(this.mabCanGrow[i]==null||this.mabCanGrow[i]==1)&&(this.maiActualColWidth[i]*=c),o+=this.maiActualColWidth[i];return o};HTMLElement.prototype.GetFixedAspectRatio=function(){var i=-1,r=this.GetProperty(ConstProperties.Const.RESIZE_KEEP_RATIO),n,t;return r&&(n=this.GetProperty(ConstProperties.Const.MAX_RESIZE_WIDTH),t=this.GetProperty(ConstProperties.Const.MAX_RESIZE_HEIGHT),n!=0&&t!=0&&(i=parseFloat(n)/parseFloat(t))),i};PositionItem._passScroll=null;PositionItem.GetPassScroll=function(n){var i,t;return PositionItem._passScroll==null&&(PositionItem._passScroll=ne
7w Map,i=function(){PositionItem._passScroll=null},typeof Promise!="undefined"&&Promise.resolve?Promise.resolve().then(i):setTimeout(i,0)),t=PositionItem._passScroll.get(n),t===undefined&&(t={top:n.scrollTop,left:n.scrollLeft},PositionItem._passScroll.set(n,t)),t};PositionItem._cachedOffset={};PositionItem.getOffset=function(n){var t,i,r;return PositionItem._cachedOffset[n.msId]||(t=[0,0],n.moParent&&n.moParent.msCtrlType===PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT?(t[0]=n.offsetLeft,t[1]=n.offsetTop):n.mbParentIsFreeHtml&&n.moParent&&(i=n.getBoundingClientRect(),r=n.moParent.getBoundingClientRect(),t[0]=i.left-r.left,t[1]=i.top-r.top),PositionItem._cachedOffset[n.msId]=t),PositionItem._cachedOffset[n.msId]};PositionItem.GetOffsetAffectedByQueueCss=function(n){var i=[],t,r;if(n&&typeof n.contains=="function")for(t in PositionItem._cachedOffset)r=$PI(t),n.contains(r)&&i.push(t);return i};PositionItem.ClearCachedOffset=function(n){if(typeof n=="undefined")PositionItem._cachedOffset={};else for(var t=0,i=n.length;t<i;t++)delete PositionItem._cachedOffset[n[t]]};PositionItem.getAbsoluteXY=function(n,t,i){function h(){if(a==null){var n=$("#Form1"),t=$(window);a={wl:t.scrollLeft()+n.scrollLeft(),wt:t.scrollTop()+n.scrollTop()}}return a}var c={},l={},y=EditableTable.GetAllTables(),s,u,r,a,v,o,f,e;if(n)for(s in y)e=y[s],e&&(!c[s]&&e.HasFrozenColumns()&&e.IsNodeInScrollablePart(n)&&(c[s]=e),!l[s]&&e.IsUnFrozenTemporarily()&&e.IsNodeInNonScrollablePart(n)&&(l[s]=e));if(u=null,r=[],r=[n.x,n.y],r[0]==null&&(r[0]=0),r[1]==null&&(r[1]=0),u=n.moParent,a=null,u!=n)for((u&&u.msCtrlType===PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT||n.mbParentIsFreeHtml)&&(v=PositionItem.getOffset(n),r[0]=v[0],r[1]=v[1]);u;)u.mbPosFixed?(r[0]+=u.miFixedX,r[1]+=u.miFixedY,r[0]+=h().wl,r[1]+=h().wt,u=null):(o=u.GetNode(),u.moParent&&(u.moParent.msCtrlType===PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT||u.mbParentIsFreeHtml)?r[0]+=PositionItem.getOffset(u)[0]:u.x&&(r[0]+=u.x),u.mbSX&&(r[0]-=PositionItem.GetPassScroll(o).left),u.moParent&&(u.moParent.msCtrlType===PositionItem.Const.CONTROL_TYPE_WEB_COMPONENT||u.mbParentIsFreeHtml)?r[1]+=PositionItem.getOffset(u)[1]:u.y?(r[1]+=u.y,t&&u.moParent&&u.moParent.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP&&o.offsetTop&&(f=u.moParent.GetNode(),r[0]+=f.offsetLeft,r[1]+=f.offsetTop,f.miTranslatedX&&(r[0]+=f.miTranslatedX),f.miTranslatedY&&(r[1]+=f.miTranslatedY),r[0]-=f.parentNode.scrollLeft,r[1]-=f.parentNode.scrollTop,i&&(r[0]+=h().wl,r[1]+=h().wt))):u.moParent!=undefined&&u.moParent.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP&&o.offsetTop!=undefined&&(r[0]+=o.offsetLeft,r[1]+=o.offsetTop,t&&(f=u.moParent.GetNode(),r[0]+=f.offsetLeft,r[1]+=f.offsetTop,f.miTranslatedX&&(r[0]+=f.miTranslatedX),f.miTranslatedY&&(r[1]+=f.miTranslatedY),r[0]-=f.parentNode.scrollLeft,r[1]-=f.parentNode.scrollTop,i&&(r[0]+=h().wl,r[1]+=h().wt))),u.mbSY&&(r[1]-=PositionItem.GetPassScroll(o).top),u.msId&&(c[u.msId]&&(e=c[u.msId],r[0]-=e.GetScrollLeft()),l[u.msId]&&(e=l[u.msId],r[0]+=e.GetScrollLeft())),u.announcementPadding&&(r[1]+=u.announcementPadding),u=u.moParent);return r[0]==null&&(r[0]=0),r[1]==null&&(r[1]=0),r};HTMLElement.prototype.localToGlobal=function(n,t,i){var r=PositionItem.getAbsoluteXY(this,t,i);return new Point(r[0]+n.x,r[1]+n.y)};HTMLElement.prototype.globalToLocal=function(n,t,i){var r=PositionItem.getAbsoluteXY(this,t,i);return this.mbPosFixed&&(r=[this.miFixedX,this.miFixedY]),new Point(n.x-r[0],n.y-r[1])};HTMLElement.prototype.offsetBetweenControls=function(n,t,i){var r=PositionItem.getAbsoluteXY(n,t,i),u=PositionItem.getAbsoluteXY(this,t,i);return new Point(r[0]-u[0],r[1]-u[1])};HTMLElement.prototype.RecalculatePosition=function(n,t,i){var u,f,o,r,e,s;if(this.ForceHasChanged(n),PositionMgr.GetInstance().AddToDirtyXList(this),PositionMgr.GetInstance().AddToDirtyYList(this),t&&this.moContainerForChildrens){for(u=[],f=0,o=this.moContainerForChildrens.length;f<o;f++)u.push(this.moContainerForChildrens[f]);while(u.length>0)if(r=u.shift(),r.ForceHasChanged(n),PositionMgr.GetInstance().AddToDirtyXList(r),PositionMgr.GetInstance().AddToDirtyYList(r),r.moContainerForChildrens)for(e=0,s=r.moContainerForChildrens.length;e<s;e++)u.push(r.moContainerForChildrens[e])}i||PositionMgr.CalculatePositionDebounced()};HTMLElement.prototype.ForceHasChanged=function(n){this.mbXMustBeCalculated=!0;this.mbYMustBeCalculated=!0;this.mbFirstX=!0;this.mbFirstY=!0;this.miTextWidth=null;this.miTextHeight=null;n&&!this.mbAbsolutePos&&(this.style.setProperty("width",this.msOriginalDOMWidth),this.style.setProperty("height",this.msOriginalDOMHeight));this.mbForceHasChangedCalled=!0};HTMLElement.prototype.ForceHasChangedMaskBypassingChildren=function(){var t,i,n;if(this.moContainerForChildrens)for(t=0,i=this.moContainerForChildrens.length;t<i;t++)n=this.moContainerForChildrens[t],n.moProperties&&n.moProperties.hasOwnProperty("PG")&&n.ForceHasChanged(),n.ForceHasChangedMaskBypassingChildren()};HTMLElement.prototype.ForceHasChangedAllChildren=function(n){var t,r,i;if(this.moContainerForChildrens)for(t=0,r=this.moContainerForChildrens.length;t<r;t++)i=this.moContainerForChildrens[t],i.ForceHasChanged(n),i.ForceHasChangedAllChildren(n)};HTMLElement.prototype.CopyDependenciesTo=function(n){for(var i,t=0;t<this.moXDependents.length;t++)i=this.moXDependents[t],i.ReplaceSource(n,!1);for(this.moXDependents=[],t=0;t<this.moYDependents.length;t++)i=this.moYDependents[t],i.ReplaceSource(n,!1);this.moYDependents=[]};HTMLElement.prototype.FixAddDependency=function(n){!this.mbAutoWidth&&(this.GetOriginalWidth()==-1||this.ForceXChildrenDependence())&&new Dependency(n,this,Dependency.Const.TYPE_PARENT,Dependency.Const.SUBTYPE_NONE,null,Dependency.Const.AXIS_X);!this.mbAutoHeight&&(this.GetOriginalHeight()==-1||this.ForceYChildrenDependence())&&new Dependency(n,this,Dependency.Const.TYPE_PARENT,Dependency.Const.SUBTYPE_NONE,null,Dependency.Const.AXIS_Y)};HTMLElement.prototype.AddControl=function(n,t,i){if(n.moParent=this,this.moContainerForChildrens!=null)if(t!=null)if(t==n)this.moContainerForChildrens.splice(Utils.IndexOf(this.moContainerForChildrens,t),1),i!=null?this.moContainerForChildrens.splice(Utils.IndexOf(this.moContainerForChildrens,i),0,n):this.moContainerForChildrens.push(n);else{var r=Utils.IndexOf(this.moContainerForChildrens,t);r!=-1?this.moContainerForChildrens.splice(r,1,n):this.moContainerForChildrens.push(n)}else i!=null?this.moContainerForChildrens.splice(Utils.IndexOf(this.moContainerForChildrens,i),0,n):this.moContainerForChildrens.push(n)};HTMLElement.prototype.OverrideOriginalWidth=function(n){this.miOriginalWidth=n};HTMLElement.prototype.OverrideOriginalHeight=function(n){this.miOriginalHeight=n};HTMLElement.prototype._Debug=function(n){var f=document.createElement("CONTROL"),r,t,i,u;for(n.appendChild(f),f.setAttribute("name",this.msId),t=0,i=this.moContainerForChildrens.length;t<i;t++)this.moContainerForChildrens[t]._Debug(f);if(this.moXDependents.length>0)for(r=document.createElement("DEPENDENCIES_X"),f.appendChild(r),t=0,i=this.moXDependents.length;t<i;t++)u=document.createElement("dep_X"),r.appendChild(u),u.innerHTML=this.moXDependents[t].toString();if(this.moYDependents.length>0)for(r=document.createElement("DEPENDENCIES_Y"),f.appendChild(r),t=0,i=this.moYDependents.length;t<i;t++)u=document.createElement("dep_Y"),r.appendChild(u),u.innerHTML=this.moYDependents[t].toString()};HTMLElement.prototype.IsUnderMouse=function(n,t){return n&&(n.type==="click"||n.type==="mousedown"||n.type==="touchend")&&n.target&&this.contains(n.target)?!0:(Utils.GetMousePosition(n),this.IsUnderMouse_NoEvt(t))};HTMLElement.prototype.IsUnderMouse_NoEvt=function(n){var t=[Utils.miMouseX,Utils.miMouseY],i=PositionItem.getAbsoluteXY(this,!0),r;return this.mbPosFixed?i=[this.miFixedX,this.miFixedY]:PositionItem.IsInPopup(this)==!1&&(t[0]+=Utils.Form1().scrollLeft,t[1]+=Utils.Form1().scrollTop),r=!1,n?t[0]>=i[0]&&t[0]<=i[0]+this.GetWidth()&&t[1]>=i[1]&&t[1]<=i[1]+this.GetHeight():t[0]>i[0]&&t[0]<i[0]+this.GetWidth()&&t[1]>i[1]&&t[1]<i[1]+this.GetHeight()};PositionItem.IsInPopup=function(n){return n&&n.id&&Utils.IsInAnyPopup(n.id)};HTMLElement.prototype.GetAlternativeID=function(){var t=null,i=this.GetProperty(ConstProperties.Const.PROPERTY_INSTANCE_NAME),n;return i!=null&&(n=this.GetId(),t=n.substr(0,n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY))+Matrix3.Const.SEPARATOR_CONTROL+i),t};HTMLElement.prototype.GetName=function(){var n=null,t;return this.HasProperty(ConstProperties.Const.NAME)?n=this.GetProperty(ConstProperties.Const.NAME):(t=this.msId.split(Matrix3.Const.SEPARATOR_CONTROL),n=t.length<=1?this.GetAlternativeID():t[1]),n};HTMLElement.prototype.GetVFormName=function(){var n=this.GetName(),t;return typeof n=="string"?(t=n.split(Matrix3.Const.SEPARATOR_CONTROL),t.length<=1?n:t[1]):this.msId};HTMLElement.prototype.EvaluateAdvancedVisibilityExp=function(){var t,f,r,e,o,u,s,n,i,h,c;if(Utils.IsStringFilled(this.msAdvancedVisibilityExp)){this.moAdvancedVisibilityReferences={};t=this.msAdvancedVisibilityExp;
7t=t.replace(ControlsUtils.GetInstance().GetAdvencedPosKeywordsRegex()," ");f=t;do f=t,t=t.replace(/(^| )[0-9]+(\.[0-9]+)?( |$)/g," ");while(t!=f);if(t=t.replace(/ +/g," "),t=t.replace(/(^ +)|( +$)/g,""),r=this,e=function(n){var i=n.target.msId,u,f,e;r.moAdvancedVisibilityReferences[i]&&(r.moAdvancedVisibilityReferences[i].mbVisible=n.visible||!1);u=r.msAdvancedVisibilityExp;for(i in r.moAdvancedVisibilityReferences)f=r.moAdvancedVisibilityReferences[i],u=u.replace(f.moRegexp,f.mbVisible?"1":"0");var o=r.GetNode(),t=$(o),s=PositionItem.EvaluateExpression(u,o).toString(),h=t.css("visibility");Utils.ParseBool(s)?t.css("visibility",""):t.css("visibility","hidden");e=t.css("visibility");h!==e&&t.trigger(jQuery.Event(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,{visible:e!=="hidden"}))},t!=""){for(o=t.split(" "),u=0,s=o.length;u<s;u++)if(n=o[u],n==PositionItem.Const.REF_PARENT?i=this.GetParentContainer():n==PositionItem.Const.REF_ANCESTOR_PREFIX+ConstValues.Const.SUPER_CONTAINER?i=this.moSuperContainer:Utils.StartsWith(n,PositionItem.Const.REF_ANCESTOR_PREFIX)?i=this.GetAncestorWithFlashID(n.substring(PositionItem.Const.REF_ANCESTOR_PREFIX.length)):Utils.StartsWith(n,PositionItem.Const.REF_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetReference(n.substring(PositionItem.Const.REF_REFERENCE_PREFIX.length)):Utils.StartsWith(n,PositionItem.Const.REF_POPUP_REFERENCE_PREFIX)?i=ControlMgr.GetInstance().GetPopupReference(n.substring(PositionItem.Const.REF_POPUP_REFERENCE_PREFIX.length),this.msId):Utils.StartsWith(n,PositionItem.Const.REF_BRO_PREFIX)?i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(n.substring(PositionItem.Const.REF_BRO_PREFIX.length))):(i=ControlMgr.GetInstance().GetPositionItem(this.GetBrotherId(n)),i==null&&(i=ControlMgr.GetInstance().GetReference(n))),i!=null){$(i).on(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,e);this.moAdvancedVisibilityReferences[i.msId]={msRef:n,moRegexp:new RegExp(n,"g"),mbVisible:$(i).css("visibility")!="hidden"};Matrix3.RegisterForCleanup(this.msId,Matrix3.Const.PROPERTY_ADVANCED_VISIBILITY,function(){$(i).off(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,e)})}else h=new RegExp(n,"g"),this.msAdvancedVisibilityExp=this.msAdvancedVisibilityExp.replace(h,"1");for(c in this.moAdvancedVisibilityReferences)VisibilityObserverMgr.GetInstance().Add(c)}}};HTMLElement.prototype.ScrollToTop=function(){this.scrollTop=0};HTMLElement.prototype.ScrollToBottom=function(){this.scrollTop=this.scrollHeight-this.clientHeight+1};HTMLElement.prototype.GetScrollDistanceToTop=function(){return this.scrollTop};HTMLElement.prototype.GetScrollDistanceToBottom=function(){return Math.abs(this.scrollTop+this.clientHeight-this.scrollHeight)};HTMLElement.prototype.GetCorrespondingControl=function(){return ControlMgr.GetInstance().GetControl(this.msId,this.msCtrlType)};moStyleCache={};PositionItem.EvaluateExpressionCache={};PositionItem.EvaluateExpression=function(_sInput,_oCallerElem){var iComputedVal=0,sTranslatedExpression,iEvaluatedVal,oCallerElement;if(_sInput in PositionItem.EvaluateExpressionCache)iComputedVal=PositionItem.EvaluateExpressionCache[_sInput];else{if(CSP.IsEnabled()){PositionItem.MathExpParser||(PositionItem.MathExpParser=new exprEval.Parser);sTranslatedExpression=PositionItem.TranslatePositioningExpressionCSPSafe(_sInput,_oCallerElem);try{iEvaluatedVal=PositionItem.MathExpParser.evaluate(sTranslatedExpression);isNaN(iEvaluatedVal)&&(iEvaluatedVal=0);iComputedVal=iEvaluatedVal}catch(oEx){if(_oCallerElem)try{oCallerElement=$(_oCallerElem);oEx.message+=" . Control: "+oCallerElement.attr("id")+" . Data: "+oCallerElement.attr("data-r")}catch(n){}console.error("Cannot evaluate: "+_sInput+". Translated: "+sTranslatedExpression);Matrix3.LogError(oEx);iComputedVal=0}}else iComputedVal=eval(_sInput);PositionItem.EvaluateExpressionCache[_sInput]=iComputedVal}return iComputedVal};PositionItem.TranslatePositioningExpressionCSPSafe=function(n,t){var r=n,i,u,f;if(CSP.IsEnabled())try{if(n=n.replace(/Math./g,"").replace(/return/g,"").replace(/;/g,"").replace(/\|\|/," or ").replace(/&&/," and "),n.indexOf("if")!=-1){r=n;var e=n.indexOf("("),i=n.indexOf("{"),h=n.lastIndexOf(")",i),c=n.substr(e+1,h-e-1).trim(),l=PositionItem.TranslatePositioningExpressionCSPSafe(c),o=n.indexOf("else"),u=n.lastIndexOf("}",o),a=n.substr(i+1,u-i-1).trim(),v=PositionItem.TranslatePositioningExpressionCSPSafe(a),y=o+4,p=n.substr(y).trim(),w=PositionItem.TranslatePositioningExpressionCSPSafe(p);r="("+l+") ? ("+v+") : ("+w+")"}else i=n.indexOf("{"),u=n.lastIndexOf("}"),r=i!=-1&&i<u?n.substr(i+1,u-i-1).trim():n}catch(s){if(t)try{f=$(t);s.message+=" . Cannot translate into a CSP-safe positioning expression: "+n+" . Control: "+f.attr("id")+" . Data: "+f.attr("data-r")}catch(i){}return Matrix3.LogError(s),n}return r};PositionMgr.Const={MGR_NAME:"Position",MAX_POSITIONING_DURATION:4e3,RELEVENT_LOOP_IDENTIFICATION_ITERATIONS:2e3,MAX_ITER_ON_SAME_CONTROL:500};DebugTooltip={FLASH_EDIT_BTN_ID:"Debug_VForm_LaunchFlashEditBtn"};PositionMgr.moNodesToSetPosition={};PositionMgr.RegisterNodeToRender=function(n){if(n.msId&&!n.msId.endsWith(Popup.Const.CONTAINER_SUFFIX)){var t=$PI(n.msId);t&&t!==n&&!n.mbAbsolutePos&&t.isConnected&&!n.mbParentIsFreeHtml&&(PositionMgr.moNodesToSetPosition[n.msId]={width:t.miWidth,height:t.miHeight,top:t.y,left:t.x})}};PositionMgr.PreInitializeNodesPosition=function(){var i,t,n;for(i in PositionMgr.moNodesToSetPosition)if(t=PositionMgr.moNodesToSetPosition[i],n=$PI(i),n&&!n.mbAbsolutePos&&n.isConnected&&!n.mbParentIsFreeHtml){if(n.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_LINE||n.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_COL){delete PositionMgr.moNodesToSetPosition[i];continue}if((n.msCtrlType==PositionItem.Const.CONTROL_TYPE_BUTTON||n.msCtrlType==PositionItem.Const.CONTROL_TYPE_CHECKBOX||n.msCtrlType==PositionItem.Const.CONTROL_TYPE_LABEL)&&(n.GetOriginalHeight()==-1||n.GetOriginalWidth()==-1)){delete PositionMgr.moNodesToSetPosition[i];continue}n.mbAutoWidth||n.style.width||(n.style.width=t.width+"px");n.style.setProperty("--pre-w",t.width+"px");n.mbAutoHeight||n.style.height||(n.style.height=t.height+"px");
7n.style.setProperty("--pre-h",t.height+"px");n.style.setProperty("--pre-x",t.left+"px");n.style.setProperty("--pre-y",t.top+"px");n.style.top=t.top+"px";n.style.left=t.left+"px";n.x=t.left;n.y=t.top;n.miWidth<=0&&(n.miWidth=t.width);n.miHeight<=0&&(n.miHeight=t.height);delete PositionMgr.moNodesToSetPosition[i]}};PositionMgr.moSingleton=null;PositionMgr.GetInstance=function(){return PositionMgr.moSingleton||(PositionMgr.moSingleton=new PositionMgr),PositionMgr.moSingleton};PositionMgr.prototype={IsPositioning:function(){return this.mbPositioning},CalculatePositionAsync:function(n){if(!this.mbPosRequested&&(!Param.EnableInhibitPositioning||!Matrix3.mbInhibitPositioning)&&!this.mbPositioning){this.mbPosRequested=!0;var t=this;setTimeout(function(){t.mbPosRequested=!1;t.CalculatePosition(!1,!0);typeof n=="function"&&n()},10)}},CalculatePosition:function(n,t,i){var y,et,tt,dt,o,ot,yt,h,c,a,f,e,k,lt,d,at,g,v,nt,s,r,u,wt,l,bt,ft,vt,kt;if(!UseBootstrap&&(!Param.EnableInhibitPositioning||!Matrix3.mbInhibitPositioning)){if(this.mbPositioning=!0,y=ControlMgr.GetInstance(),et=ResizeMgr.GetInstance().moAnchorScreen,Utils.IsIE()&&window.setInterval(function(){Utils.GetDocument().scrollTop==0&&(Utils.GetDocument().scrollTop=1)},1e3),t==null&&(t=!0),this.SetButtonStyleBlock(!1),tt=this.mdTweenDuration>0,dt=(new Date).getTime(),this.miLastReposDate=(new Date).getTime(),t){if(PositionItem.ClearCachedOffset(),SequenceLoadingMgr.GetInstance().PrePositioning(),tt||this.mbLastPosHadTweening){o=y.GetAllPositionItems();for(s in o)r=o[s],r.SavePrePositionState()}PositionMgr.PreInitializeNodesPosition()}n||ResizeMgr.GetInstance().AssumeLateralScrollbarVisible();var p=this.moXDirtyHeap.Peek()!=null,w=this.moYDirtyHeap.Peek()!=null,it=0;this.mbTrackControlPositioning=!1;DOMChangesQueue.GetInstance().ApplyQueue();ot={};yt=$(".DVMenuCell.InvisibleC");yt.css("left","0px");for(var pt=DynamicChildrenVisibilityMgr.GetInstance().GetPanels(),st=function(n){var i,t;for(i in pt)t=$E(i)[0],t&&n&&(t===n||t.contains(n))&&pt[i].RefreshDynamicChildrenVisibilityParams(n)},rt=EditableTable.GetFrozenTables(),ut={},ht=function(n){var t,i;for(t in rt)i=$E(t)[0],i&&n&&(i===n||i.contains(n))&&(rt[t].UnFreezeColumns(!0),ut[t]=rt[t],delete rt[t])};p||w;){while(p)if((h=this.moXDirtyHeap.Pop(),p=this.moXDirtyHeap.Peek()!=null,h.isConnected||h==et)&&(this.mbTrackControlPositioning&&(f=h.GetId(),this.moControlFrequencyTable.hasOwnProperty(f)||(this.moControlFrequencyTable[f]=0),this.moControlFrequencyTable[f]=parseInt(this.moControlFrequencyTable[f])+1,this.miIterationsTracked++),ht(h),st(h),this.CalculateXPosition(h),ot[h.msId]=!0,it++,p=this.moXDirtyHeap.Peek()!=null,it%1e3==0&&(new Date).getTime()-this.miLastReposDate>PositionMgr.Const.MAX_POSITIONING_DURATION))if(this.mbTrackControlPositioning===!1)this.mbTrackControlPositioning=!0,this.miIterationsTracked=0,this.moControlFrequencyTable={};else if(this.miIterationsTracked>=PositionMgr.Const.RELEVENT_LOOP_IDENTIFICATION_ITERATIONS){a=!1;for(f in this.moControlFrequencyTable)if(this.moControlFrequencyTable[f]>=PositionMgr.Const.MAX_ITER_ON_SAME_CONTROL){a=!0;break}if(a)return this.moXDirtyHeap=new ControlHeap,this.moYDirtyHeap=new ControlHeap,y.GetReference(DebugTooltip.FLASH_EDIT_BTN_ID)==null?!1:(this.ShowPositionLoopAlert(this.moControlFrequencyTable,"Positioning loop detected on X axis"),!1)}for(DOMChangesQueue.GetInstance().ApplyQueue(),w=this.moYDirtyHeap.Peek()!=null;w;)if((c=this.moYDirtyHeap.Pop(),w=this.moYDirtyHeap.Peek()!=null,c.isConnected||c==et)&&(this.mbTrackControlPositioning&&(f=c.GetId(),this.moControlFrequencyTable.hasOwnProperty(f)||(this.moControlFrequencyTable[f]=0),this.moControlFrequencyTable[f]=parseInt(this.moControlFrequencyTable[f])+1,this.miIterationsTracked++),ht(c),st(c),this.CalculateYPosition(c),ot[c.msId]=!0,it++,w=this.moYDirtyHeap.Peek()!=null,it%1e3==0&&(new Date).getTime()-this.miLastReposDate>PositionMgr.Const.MAX_POSITIONING_DURATION))if(this.mbTrackControlPositioning===!1)this.mbTrackControlPositioning=!0,this.miIterationsTracked=0,this.moControlFrequencyTable={};else if(this.miIterationsTracked>=PositionMgr.Const.RELEVENT_LOOP_IDENTIFICATION_ITERATIONS){a=!1;for(f in this.moControlFrequencyTable)if(this.moControlFrequencyTable[f]>=PositionMgr.Const.MAX_ITER_ON_SAME_CONTROL){a=!0;break}if(a)return this.moXDirtyHeap=new ControlHeap,this.moYDirtyHeap=new ControlHeap,y.GetReference(DebugTooltip.FLASH_EDIT_BTN_ID)==null?!1:(this.ShowPositionLoopAlert(this.moControlFrequencyTable,"Positioning loop detected on Y axis"),!1)}DOMChangesQueue.GetInstance().ApplyQueue();p=this.moXDirtyHeap.Peek()!=null}var gt=(new Date).getTime(),o=y.GetAllPositionItems(),ct=[],b=[];for(s in o){if(r=o[s],r.IsUpdateStyle()&&(ct.push(r),ht(r),st(r)),r.moFloatingParent!=null){if(e=r.IsUpdateStyle(),k=r.moFloatingParent,!r.mbForcedSkipUpdatingStyle){while(!e&&k)e=k.IsUp
7dateStyle(),k=k.moParent;for(lt=r.GetXSources(),u=0;u<lt.length&&!e;u++)for(d=lt[u].GetSource();!e&&d;)e=d.IsUpdateStyle(),d=d.moParent;for(at=r.GetYSources(),u=0;u<at.length&&!e;u++)for(g=at[u].GetSource();!e&&g;)e=g.IsUpdateStyle(),g=g.moParent}e&&b.push(r)}r.mbPosFixed&&FixedPos.Cache.moHandlers.hasOwnProperty(r.msId)&&FixedPos.Cache.moHandlers&&FixedPos.Cache.moHandlers[r.msId]&&Utils.RequestIdleCallback(function(n){return function(){var t=FixedPos.Cache.moHandlers&&FixedPos.Cache.moHandlers[n];typeof t=="function"&&t(!0,!1)}}(r.msId))}v=!1;for(u in ct)r=ct[u],r.ApplyStyle(),v=r.TransferPositioningToDOM()||v;for(s in o)o[s].ApplyPostPositionProperties();for(u in b)nt=b[u],nt.moPosDecider!=null?nt.moPosDecider.CalculateFloatingPosition():(nt.CalculateXPosition(),nt.CalculateYPosition());for(u in b)v=b[u].TransferPositioningToDOM()||v;if(v&&this.CalculatePosition(!1,t,!0),this.SetButtonStyleBlock(!0),tt)for(s in o)r=o[s],r.ApplyTweening(this.mdTweenDuration);this.mbLastPosHadTweening=tt;this.mdTweenDuration=0;t&&(SizeLearningMgr.PositioningFinished(),SequenceLoadingMgr.GetInstance().PostPositioning(),ScrollTargetMgr.RefreshAllVisibility());for(l in Matrix3.moPopupTable)Matrix3.moPopupTable[l]&&Matrix3.moPopupTable[l].RefreshPositionOnScreen&&Matrix3.moPopupTable[l].RefreshPositionOnScreen();for(u=0,wt=Matrix3.maPopupForceCenteringStack.length;u<wt;u++)l=Matrix3.moPopupTable[Matrix3.maPopupForceCenteringStack[u]],l&&l.Center();if(!i)for(bt in Matrix3.moPopupTable)ft=Matrix3.moPopupTable[bt],ft&&ft.RevealAfterPositioning&&ft.RevealAfterPositioning();DOMChangesQueue.GetInstance().ApplyQueue();for(vt in ut)ut[vt].FreezeColumns(null,!0),ut[vt].RefineFreezeAfterResize();this.mbPositioning=!1;$(document).trigger("PositioningCompleted");kt=new CustomEvent("PositioningCompleted");document.dispatchEvent(kt)}},CalculateXPosition:function(n,t){var r,f,u,i;if(n.CalculateXPosition()){r=n.GetXDependents();for(f in r)u=r[f],i=u.GetDestination(),this.DoesBypassDependantControlsID(i.GetId(),t)||(this.moXDirtyHeap.Add(i),(i.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL||u.GetAlignment()==Dependency.Const.ALIGNMENT_WIDTH)&&this.moYDirtyHeap.Add(i))}},CalculateYPosition:function(n,t){var r,f,u,i;if(n.CalculateYPosition()){r=n.GetYDependents();for(f in r)u=r[f],i=u.GetDestination(),this.DoesBypassDependantControlsID(i.GetId(),t)||(this.moYDirtyHeap.Add(i),(i.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL||u.GetAlignment()==Dependency.Const.ALIGNMENT_HEIGHT)&&this.moXDirtyHeap.Add(i))}},DoesBypassDependantControlsID:function(n,t){var u,i,r;if(!t)return!1;for(u=t.length,i=0;i<u;i++)if((r=t[i],r)&&n==r)return!0;return!1},AddToDirtyXList:function(n){this.moXDirtyHeap.Add(n)},AddToDirtyYList:function(n){this.moYDirtyHeap.Add(n)},RemoveFromBothDirtyLists:function(n){this.moXDirtyHeap.Remove(n);this.moYDirtyHeap.Remove(n)},ReInit:function(){PositionMgr.moSingleton=new PositionMgr},SetButtonStyleBlock:function(){},ShowPositionLoopAlert:function(n,t){var u="\n------------------------------------------------------\n"+t+"\n------------------------------------------------------\n",f,i,r,e,o,s;u+="Involved controls:\n";f=n;i=[];for(r in f)e=Matrix3.GetVFormInfoItem(r.split(":")[0]),e?i.push(r+":"+e.GetSubID()):i.push(r+":0");o="API/IdTranslate/v1.0/SystemId";s={format:"json",sIds:JSON.stringify(i)};$.ajax({method:"POST",url:o,data:s,success:function(n){var t=JSON.parse(n.APIResponse.Response.Results);for(var i in f)u+="-- "+t[i]+" \n \n";alert(u)}})}};PositionMgr.CalculatePositionDebounced=Utils.debounce(function(n){PositionMgr.GetInstance().CalculatePositionAsync(n)},10);PositionMgr.InvalidateNodePosition=function(n){var i,t;n&&($(n).css("width",""),n.miTextWidth=null,n.ForceHasChanged(),i=PositionMgr.GetInstance(),i.AddToDirtyYList(n),i.AddToDirtyXList(n),t=n.GetParentContainer(),t!=null&&(t.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL||t.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_TABLE)&&(t.ForceHasChanged(),i.AddToDirtyXList(t),i.AddToDirtyYList(t)))};PositionMgr.InvalidateNodeAndAncestors=function(n){if(n){PositionMgr.InvalidateNodePosition(n);for(var i=PositionMgr.GetInstance(),t=n.GetParentContainer?n.GetParentContainer():null;t;)typeof t.ForceHasChanged=="function"&&(t.ForceHasChanged(),i.AddToDirtyYList(t),i.AddToDirtyXList(t)),t=t.GetParentContainer?t.GetParentContainer():null}};PostRenderMgr.moSingleton=null;PostRenderMgr.GetInstance=function(){return PostRenderMgr.moSingleton||(PostRenderMgr.moSingleton=new PostRenderMgr),PostRenderMgr.moSingleton};PostRenderMgr.prototype={AddFunction:function(n,t,i){((t||!Matrix3.mbContentIsLoaded)&&!Matrix3.mbIsInit||i)&&this.maoFunctions.push(n)},AddDelayedFunction:function(n){this.maoDelayFunctions.push(n)},AddAfterPreRenderOnAjaxSuccessFunction:function(n){this.maoAfterPreRenderOnAjaxSuccessFunctions.push(n)},ExecuteAsap:function(n){this.maoFunctions.length>0?this.maoDelayFunctions.push(n):n()},ExecuteFunctions:function(n){var r=(new Date).getTime(),i,t;if(this.miTimeoutId=null,this.maoDelayFunctions.length){for(i=this.maoDelayFunctions.length,t=0;t<i;t++)this.maoFunctions.push(this.maoDelayFunctions[t]);this.maoDelayFunctions=[]}while(this.maoFunctions.length>0){try{this.maoFunctions.shift()()}catch(u){Matrix3.LogError(u,!0)}if(!n&&this.maoFunctions.length>0&&(new Date).getTime()-r>100){this.miTimeoutId=setTimeout(function(){PostRenderMgr.GetInstance().ExecuteFunctions()},5);break}}this.maoFunctions.length==0&&DOMChangesQueue.GetInstance().ApplyQueue()},ExecuteAfterPreRenderOnAjaxSuccess:function(){while(this.maoAfterPreRenderOnAjaxSuccessFunctions.length>0)try{this.maoAfterPreRenderOnAjaxSuccessFunctions.shift()()}catch(n){Matrix3.LogError(n,!0)}},GetFunctions:function(){return this.maoFunctions},Clear:function(){this.maoFunctions=[];this.maoDelayFunctions=[];this.maoAfterPreRenderOnAjaxSuccessFunctions=[];this.miTimeoutId&&(clearTimeout(this.miTimeoutId),this.miTimeoutId=null)}};PreRenderMgr.moSingleton=null;PreRenderMgr.GetInstance=function(){return PreRenderMgr.moSingleton||(PreRenderMgr.moSingleton=new PreRenderMgr),PreRenderMgr.moSingleton};PreRenderMgr.prototype={AddFunction:function(n){n()}};ResizeMgr.Const={SCROLLBARS_SIZE:0,POPUP_MARGIN:16,INT_MAX_VALUE:999999};ResizeMgr.moSingleton=null;ResizeMgr.GetInstance=function(){return ResizeMgr.moSingleton||(ResizeMgr.moSingleton=new ResizeMgr),ResizeMgr.moSingleton};ResizeMgr.prototype={Clean:function(){this.moSingleton=new ResizeMgr},GetScrollbarSize:function(){return this.miScollbarSize},ExportScreenToLists:function(){ControlMgr.GetInstance().AddReference(ConstValues.Const.SCREEN,this.moAnchorScreen);PositionMgr.GetInstance().AddToDirtyXList(this.moAnchorScreen);PositionMgr.GetInstance().AddToDirtyYList(this.moAnchorScreen);this.moAnchorScreen.ForceHasChanged()},Resize:function(){var n=this.GetScreenSize(),t,i;if(!this.moCachedScreenSize||this.moCachedScreenSize.x!==n.x||this.moCachedScreenSize.y!==n.y){if(this.moCachedScreenSize=n,this.moAnchorScreen.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)),this.moAnchorPopupBase.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)-ResizeMgr.Const.POPUP_MARGIN),this.moAnchorScreen.SetHeight(n.y),this.moAnchorPopupBase.SetHeight(n.y-ResizeMgr.Const.POPUP_MARGIN),this.moAnchorScreen.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyXList(ResizeMgr.GetInstance().moAnchorScreen),PositionMgr.GetInstance().AddToDirtyYList(ResizeMgr.GetInstance().moAnchorScreen),t=!1,ControlMgr.GetInstance().GetRootPositionItem()==null||Matrix3.HasEventsInProgress()||(t=!0,Matrix3.mbPreventAnimation=!0,PositionMgr.GetInstance().CalculatePositionAsync(),Matrix3.mbPreventAnimation=!1,DOMChangesQueue.GetInstance().ApplyQueue()),i=function(){if(Matrix3.maPopupStack.length>0&&Matrix3.moPopupTable!=null)for(var n in Matrix3.moPopupTable)Matrix3.moPopupTable[n].Center()},i(),t)$(document).one("PositioningCompleted",function(){i()});this.AddOrRemoveHorizontalScrollbar()}},AssumeLateralScrollbarVisible:function(){this.miScollbarSize=ResizeMgr.Const.SCROLLBARS_SIZE;var n=this.GetScreenSize();this.moAnchorScreen.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize));this.moAnchorPopupBase.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)-ResizeMgr.Const.POPUP_MARGIN);PositionMgr.GetInstance().AddToDirtyXList(this.moAnchorScreen);PositionMgr.GetInstance().AddToDirtyYList(this.moAnchorScreen);this.moAnchorScreen.ForceHasChanged()},AssumeLateralScrollbarHidden:function(){this.miScollbarSize=0;var n=this.GetScreenSize();this.moAnchorScreen.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize));this.moAnchorPopupBase.SetWidth(Math.max(this.miMinScreenWidth,n.x-this.miScollbarSize)-ResizeMgr.Const.POPUP_MARGIN);PositionMgr.GetInstance().AddToDirtyXList(this.moAnchorScreen);PositionMgr.GetInstance().AddToDirtyYList(this.moAnchorScreen);this.moAnchorScreen.ForceHasChanged()},AddToResizeXList:function(n){new Dependency(this.moAnchorScreen,n,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_SIZE,null,Dependency.Const.AXIS_X)},AddToResizeYList:function(n){new Dependency(this.moAnchorScreen,n,Dependency.Const.TYPE_REFERENCE,Dependency.Const.SUBTYPE_SIZE,null,Dependency.Const.AXIS_Y)}
7,GetScreenAnchor:function(){return this.moAnchorScreen},GetPopupBaseAnchor:function(){return this.moAnchorPopupBase},GetScreenSize:function(){var n=Utils.GetViewportWidth(),t=Utils.GetViewportHeight();return n!=null&&t!=null?new Point(n,t):new Point(1280,1024)},SetMinScreenWidth:function(n){this.miMinScreenWidth=parseInt(n);this.AddOrRemoveHorizontalScrollbar()},AddOrRemoveHorizontalScrollbar:function(){var n;Utils.GetViewportWidth()<this.miMinScreenWidth?(n=$(Utils.Form1()),n.css("overflow-x","auto"),this.mbHasHorizontalScrollbar=!0):this.mbHasHorizontalScrollbar==!0&&(n=$(Utils.Form1()),n.css("overflow-x","hidden"),this.mbHasHorizontalScrollbar=!1)},ReInit:function(){ResizeMgr.moSingleton=new ResizeMgr}};ResizeMgr.SendResToServer=Utils.debounce(function(){(!window.opener||window.menubar.visible)&&(Utils.IsInIFrame()||$.ajax({method:"GET",url:"htm/Resolution.aspx?W="+Utils.GetViewportWidth()+"&H="+Utils.GetViewportHeight()+"&dummy="+(new Date).getTime()}))},1e3);ResizeMgr.SendResToServerImmediate=function(){(!window.opener||window.menubar.visible)&&(Utils.IsInIFrame()||$.ajax({method:"GET",url:"htm/Resolution.aspx?W="+Utils.GetViewportWidth()+"&H="+Utils.GetViewportHeight()+"&dummy="+(new Date).getTime(),"async":!1}))};!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).exprEval={})}(this,function(n){"use strict";function t(n,t){this.type=n;this.value=null!=t?t:0}function ft(n){return new t(w,n)}function h(n){return new t(b,n)}function dt(n){return new t(k,n)}function p(n,t,i){var h,a,ft,l,nt,tt,r=[],ot,it,u,e,et;if(ct(n))return c(n,i);for(ot=n.length,it=0;it<ot;it++)if(u=n[it],e=u.type,e===o||e===v)r.push(u.value);else if(e===b)a=r.pop(),h=r.pop(),"and"===u.value?r.push(!!h&&!!p(a,t,i)):"or"===u.value?r.push(!!h||!!p(a,t,i)):"="===u.value?(l=t.binaryOps[u.value],r.push(l(h,p(a,t,i),i))):(l=t.binaryOps[u.value],r.push(l(c(h,i),c(a,i))));else if(e===k)ft=r.pop(),a=r.pop(),h=r.pop(),"?"===u.value?r.push(p(h?a:ft,t,i)):(l=t.ternaryOps[u.value],r.push(l(c(h,i),c(a,i),c(ft,i))));else if(e===s)if(u.value in t.functions)r.push(t.functions[u.value]);else if(u.value in t.unaryOps&&t.parser.isOperatorEnabled(u.value))r.push(t.unaryOps[u.value]);else{if(et=i[u.value],void 0===et)throw new Error("undefined variable: "+u.value);r.push(et)}else if(e===w)h=r.pop(),l=t.unaryOps[u.value],r.push(l(c(h,i)));else if(e===d){for(tt=u.value,nt=[];0<tt--;)nt.unshift(c(r.pop(),i));if(!(l=r.pop()).apply||!l.call)throw new Error(l+" is not a function");r.push(l.apply(void 0,nt))}else if(e===rt)r.push(function(){function e(){for(var u=Object.assign({},i),r=0,f=n.length;r<f;r++)u[n[r]]=arguments[r];return p(o,t,u)}for(var f,o=r.pop(),n=[],s=u.value;0<s--;)n.unshift(r.pop());return f=r.pop(),Object.defineProperty(e,"name",{value:f,writable:!1}),i[f]=e}());else if(e===f)r.push(function(n,t){return ct(n)?n:{type:ht,value:function(i){return p(n.value,t,i)}}}(u,t));else if(e===ht)r.push(u);else if(e===y)h=r.pop(),r.push(h[u.value]);else if(e===ut)r.pop();else{if(e!==g)throw new Error("invalid Expression");for(tt=u.value,nt=[];0<tt--;)nt.unshift(r.pop());r.push(nt)}if(1<r.length)throw new Error("invalid Expression (parity)");return 0===r[0]?0:c(r[0],i)}function ct(n){return n&&n.type===ht}function c(n,t){return ct(n)?n.value(t):n}function lt(n,t){for(var r,h,nt,u,l,a,e,c,i=[],p=0;p<n.length;p++)if(e=n[p],c=e.type,c===o)"number"==typeof e.value&&e.value<0?i.push("("+e.value+")"):Array.isArray(e.value)?i.push("["+e.value.map(gt).join(", ")+"]"):i.push(gt(e.value));else if(c===b)h=i.pop(),r=i.pop(),u=e.value,t?"^"===u?i.push("Math.pow("+r+", "+h+")"):"and"===u?i.push("(!!"+r+" && !!"+h+")"):"or"===u?i.push("(!!"+r+" || !!"+h+")"):"||"===u?i.push("(function(a,b){ return Array.isArray(a) && Array.isArray(b) ? a.concat(b) : String(a) + String(b); }(("+r+"),("+h+")))"):"=="===u?i.push("("+r+" === "+h+")"):"!="===u?i.push("("+r+" !== "+h+")"):"["===u?i.push(r+"[("+h+") | 0]"):i.push("("+r+" "+u+" "+h+")"):"["===u?i.push(r+"["+h+"]"):i.push("("+r+" "+u+" "+h+")");else if(c===k){if(nt=i.pop(),h=i.pop(),r=i.pop(),"?"!==(u=e.value))throw new Error("invalid Expression");i.push("("+r+" ? "+h+" : "+nt+")")}else if(c===s||c===v)i.push(e.value);else if(c===w)r=i.pop(),"-"===(u=e.value)||"+"===u?i.push("("+u+r+")"):t?"not"===u?i.push("(!"+r+")"):"!"===u?i.push("fac("+r+")"):i.push(u+"("+r+")"):"!"===u?i.push("("+r+"!)"):i.push("("+u+" "+r+")");else if(c===d){for(a=e.value,l=[];0<a--;)l.unshift(i.pop());u=i.pop();i.push(u+"("+l.join(", ")+")")}else if(c===rt){for(h=i.pop(),a=e.value,l=[];0<a--;)l.unshift(i.pop());r=i.pop();t?i.push("("+r+" = function("+l.join(", ")+") { return "+h+" })"):i.push("("+r+"("+l.join(", ")+") = "+h+")")}else if(c===y)r=i.pop(),i.push(r+"."+e.value);else if(c===g){for(a=e.value,l=[];0<a--;)l.unshift(i.pop());i.push("["+l.join(", ")+"]")}else if(c===f)i.push("("+lt(e.value,t)+")");else if(c!==ut)throw new Error("invalid Expression");return 1<i.length&&(i=t?[i.join(",")]:[i.join(";")]),String(i[0])}function gt(n){return"string"==typeof n?JSON.stringify(n).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):n}function nt(n,t){for(var i=0;i<n.length;i++)if(n[i]===t)return!0;return!1}function at(n,t,i){for(var u,o=!!(i=i||{}).withMembers,r=null,e=0;e<n.length;e++)u=n[e],u.type===s||u.type===v?o||nt(t,u.value)?r=(null!==r&&(nt(t,r)||t.push(r)),u.value):t.push(u.value):u.type===y&&o&&null!==r?r+="."+u.value:u.type===f?at(u.value,t,i):null!==r&&(nt(t,r)||t.push(r),r=null);null===r||nt(t,r)||t.push(r)}function e(n,t){this.tokens=n;this.parser=t;this.unaryOps=t.unaryOps;this.binaryOps=t.binaryOps;this.ternaryOps=t.ternaryOps;this.functions=t.functions}function ti(n,t,i){this.type=n;this.value=t;this.index=i}function u(n,t){this.pos=0;this.current=null;this.unaryOps=n.unaryOps;this.binaryOps=n.binaryOps;this.ternaryOps=n.ternaryOps;this.consts=n.consts;this.expression=t;this.savedPosition=0;this.savedCurrent=null;this.options=n.options;this.parser=n}
vendor: 1,576 bytes, line 7
7function r(n,t,i){this.parser=n;this.tokens=t;this.current=null;this.nextToken=null;this.next();this.savedCurrent=null;this.savedNextToken=null;this.allowMemberAccess=!1!==i.allowMemberAccess}function ai(n,t){return Number(n)+Number(t)}function vi(n,t){return n-t}function yi(n,t){return n*t}function pi(n,t){return n/t}function wi(n,t){return n%t}function bi(n,t){return Array.isArray(n)&&Array.isArray(t)?n.concat(t):""+n+t}function ki(n,t){return n===t}function di(n,t){return n!==t}function gi(n,t){return t<n}function nr(n,t){return n<t}function tr(n,t){return t<=n}function ir(n,t){return n<=t}function rr(n,t){return Boolean(n&&t)}function ur(n,t){return Boolean(n||t)}function fr(n,t){return nt(t,n)}function er(n){return(Math.exp(n)-Math.exp(-n))/2}function or(n){return(Math.exp(n)+Math.exp(-n))/2}function sr(n){return n===1/0?1:n===-1/0?-1:(Math.exp(n)-Math.exp(-n))/(Math.exp(n)+Math.exp(-n))}function hr(n){return n===-1/0?n:Math.log(n+Math.sqrt(n*n+1))}function cr(n){return Math.log(n+Math.sqrt(n*n-1))}function lr(n){return Math.log((1+n)/(1-n))/2}function ei(n){return Math.log(n)*Math.LOG10E}function ar(n){return-n}function vr(n){return!n}function yr(n){return n<0?Math.ceil(n):Math.floor(n)}function pr(n){return Math.random()*(n||1)}function oi(n){return pt(n+1)}function pt(n){var f,e,r,u,t,i;if(r=n,isFinite(r)&&r===Math.round(r)){if(n<=0)return isFinite(n)?1/0:NaN;if(171<n)return 1/0;for(u=n-2,t=n-1;1<u;)t*=u,u--;return 0===t&&(t=1),t}if(n<.5)return Math.PI/(Math.sin(Math.PI*n)*pt(1-n));if(171.35<=n)return 1/0;if(85<n){var o=n*n,s=o*n,h=s*n,c=h*n;
7return Math.sqrt(2*Math.PI/n)*Math.pow(n/Math.E,n)*(1+1/(12*n)+1/(288*o)-139/(51840*s)-571/(2488320*h)+163879/(209018880*c)+5246819/(75246796800*c*n))}for(--n,e=st[0],i=1;i<st.length;++i)e+=st[i]/(n+i);return f=n+si+.5,Math.sqrt(2*Math.PI)*Math.pow(f,n+.5)*Math.exp(-f)*e}function wr(n){return Array.isArray(n)?n.length:String(n).length}function hi(){for(var r,n,i=0,t=0,u=0;u<arguments.length;u++)n=Math.abs(arguments[u]),t<n?(i=i*(r=t/n)*r+1,t=n):i+=0<n?(r=n/t)*r:n;return t===1/0?1/0:t*Math.sqrt(i)}function ci(n,t,i){return n?t:i}function br(n,t){return void 0===t||0==+t?Math.round(n):(n=+n,t=-+t,isNaN(n)||"number"!=typeof t||t%1!=0?NaN:(n=n.toString().split("e"),+((n=(n=Math.round(+(n[0]+"e"+(n[1]?n[1]-t:-t)))).toString().split("e"))[0]+"e"+(n[1]?+n[1]+t:t))))}function kr(n,t,i){return i&&(i[n]=t),t}function dr(n,t){return n[0|t]}function gr(n){return 1===arguments.length&&Array.isArray(n)?Math.max.apply(Math,n):Math.max.apply(Math,arguments)}function nu(n){return 1===arguments.length&&Array.isArray(n)?Math.min.apply(Math,n):Math.min.apply(Math,arguments)}function tu(n,t){if("function"!=typeof n)throw new Error("First argument to map is not a function");if(!Array.isArray(t))throw new Error("Second argument to map is not an array");return t.map(function(t,i){return n(t,i)})}function iu(n,t,i){if("function"!=typeof n)throw new Error("First argument to fold is not a function");if(!Array.isArray(i))throw new Error("Second argument to fold is not an array");return i.reduce(function(t,i,r){return n(t,i,r)},t)}function ru(n,t){if("function"!=typeof n)throw new Error("First argument to filter is not a function");if(!Array.isArray(t))throw new Error("Second argument to filter is not an array");return t.filter(function(t,i){return n(t,i)})}function uu(n,t){if(!Array.isArray(t)&&"string"!=typeof t)throw new Error("Second argument to indexOf is not a string or array");return t.indexOf(n)}function fu(n,t){if(!Array.isArray(t))throw new Error("Second argument to join is not an array");return t.join(n)}function eu(n){return(0<n)-(n<0)||+n}function ou(n){return n<0?-Math.pow(-n,wt):Math.pow(n,wt)}function su(n){return Math.exp(n)-1}function hu(n){return Math.log(1+n)}function cu(n){return Math.log(n)/Math.LN2}function a(n){this.options=n||{};this.unaryOps={sin:Math.sin,cos:Math.cos,tan:Math.tan,asin:Math.asin,acos:Math.acos,atan:Math.atan,sinh:Math.sinh||er,cosh:Math.cosh||or,tanh:Math.tanh||sr,asinh:Math.asinh||hr,acosh:Math.acosh||cr,atanh:Math.atanh||lr,sqrt:Math.sqrt,cbrt:Math.cbrt||ou,log:Math.log,log2:Math.log2||cu,ln:Math.log,lg:Math.log10||ei,log10:Math.log10||ei,expm1:Math.expm1||su,log1p:Math.log1p||hu,abs:Math.abs,ceil:Math.ceil,floor:Math.floor,round:Math.round,trunc:Math.trunc||yr,"-":ar,"+":Number,exp:Math.exp,not:vr,length:wr,"!":oi,sign:Math.sign||eu};this.binaryOps={"+":ai,"-":vi,"*":yi,"/":pi,"%":wi,"^":Math.pow,"||":bi,"==":ki,"!=":di,">":gi,"<":nr,">=":tr,"<=":ir,and:rr,or:ur,"in":fr,"=":kr,"[":dr};this.ternaryOps={"?":ci};this.functions={random:pr,fac:oi,min:nu,max:gr,hypot:Math.hypot||hi,pyt:Math.hypot||hi,pow:Math.pow,atan2:Math.atan2,"if":ci,gamma:pt,roundTo:br,map:tu,fold:iu,filter:ru,indexOf:uu,join:fu};this.consts={E:Math.E,PI:Math.PI,"true":!0,"false":!1}}var o="INUMBER",w="IOP1",b="IOP2",k="IOP3",s="IVAR",v="IVARNAME",d="IFUNCALL",rt="IFUNDEF",f="IEXPR",ht="IEXPREVAL",y="IMEMBER",ut="IENDSTATEMENT",g="IARRAY",ii,ri,ui,fi,si,st,wt,bt,kt,li;t.prototype.toString=function(){switch(this.type){case o:case w:case b:case k:case s:case v:case ut:return this.value;case d:return"CALL "+this.value;case rt:return"DEF "+this.value;case g:return"ARRAY "+this.value;case y:return"."+this.value;default:return"Invalid Instruction"}};e.prototype.simplify=function(n){return n=n||{},new e(function n(i,r,u,e,h){for(var l,p,a,tt,it,d,c=[],nt=[],rt=0;rt<i.length;rt++)if(l=i[rt],p=l.type,p===o||p===v)Array.isArray(l.value)?c.push.apply(c,n(l.value.map(function(n){return new t(o,n)}).concat(new t(g,l.value.length)),r,u,e,h)):c.push(l);else if(p===s&&h.hasOwnProperty(l.value))l=new t(o,h[l.value]),c.push(l);else if(p===b&&1<c.length)tt=c.pop(),a=c.pop(),d=u[l.value],l=new t(o,d(a.value,tt.value)),c.push(l);else if(p===k&&2<c.length)it=c.pop(),tt=c.pop(),a=c.pop(),"?"===l.value?c.push(a.value?tt.value:it.value):(d=e[l.value],l=new t(o,d(a.value,tt.value,it.value)),c.push(l));else if(p===w&&0<c.length)a=c.pop(),d=r[l.value],l=new t(o,d(a.value)),c.push(l);else if(p===f){for(;0<c.length;)nt.push(c.shift());nt.push(new t(f,n(l.value,r,u,e,h)))}else if(p===y&&0<c.length)a=c.pop(),c.push(new t(o,a.value[l.value]));else{for(;0<c.length;)nt.push(c.shift());nt.push(l)}for(;0<c.length;)nt.push(c.shift());return nt}(this.tokens,this.unaryOps,this.binaryOps,this.ternaryOps,n),this.parser)};e.prototype.substitute=function(n,i){return i instanceof e||(i=this.parser.parse(String(i))),new e(function n(i,r,u){for(var c,v,a,e,y,o=[],l=0;l<i.length;l++)if(c=i[l],v=c.type,v===s&&c.value===r)for(a=0;a<u.tokens.length;a++)e=u.tokens[a],y=e.type===w?ft(e.value):e.type===b?h(e.value):e.type===k?dt(e.value):new t(e.type,e.value),o.push(y);else v===f?o.push(new t(f,n(c.value,r,u))):o.push(c);return o}(this.tokens,n,i),this.parser)};e.prototype.evaluate=function(n){return n=n||{},p(this.tokens,this,n)};e.prototype.toString=function(){return lt(this.tokens,!1)};e.prototype.symbols=function(n){n=n||{};var t=[];return at(this.tokens,t,n),t};e.prototype.variables=function(n){var t,i;return n=n||{},t=[],at(this.tokens,t,n),i=this.functions,t.filter(function(n){return!(n in i)})};e.prototype.toJSFunction=function(n,t){var i=this,r=new Function(n,"with(this.functions) with (this.ternaryOps) with (this.binaryOps) with (this.unaryOps) { return "+lt(this.simplify(t).tokens,!0)+"; }");return function(){return r.apply(i,arguments)}};var it="TEOF",i="TOP",et="TNUMBER",ni="TSTRING",l="TPAREN",tt="TBRACKET",ot="TCOMMA",vt="TNAME",yt="TSEMICOLON";ti.prototype.toString=function(){return this.type+": "+this.value};u.prototype.newToken=function(n,t,i){return new ti(n,t,null!=i?i:this.pos)};u.prototype.save=function(){this.savedPosition=this.pos;this.savedCurrent=this.current};u.prototype.restore=function(){this.pos=this.savedPosition;this.current=this.savedCurrent};u.prototype.next=function(){return this.pos>=this.expression.length?this.newToken(it,"EOF"):this.isWhitespace()||this.isComment()?this.next():this.isRadixInteger()||this.isNumber()||this.isOperator()||this.isString()||this.isParen()||this.isBracket()||this.isComma()||this.isSemicolon()||this.isNamedOp()||this.isConst(
7)||this.isName()?this.current:void this.parseError('Unknown character "'+this.expression.charAt(this.pos)+'"')};u.prototype.isString=function(){var r=!1,t=this.pos,i=this.expression.charAt(t),n,u;if("'"===i||'"'===i)for(n=this.expression.indexOf(i,t+1);0<=n&&this.pos<this.expression.length;){if(this.pos=n+1,"\\"!==this.expression.charAt(n-1)){u=this.expression.substring(t+1,n);this.current=this.newToken(ni,this.unescape(u),t);r=!0;break}n=this.expression.indexOf(i,n+1)}return r};u.prototype.isParen=function(){var n=this.expression.charAt(this.pos);return("("===n||")"===n)&&(this.current=this.newToken(l,n),this.pos++,!0)};u.prototype.isBracket=function(){var n=this.expression.charAt(this.pos);return!("["!==n&&"]"!==n||!this.isOperatorEnabled("["))&&(this.current=this.newToken(tt,n),this.pos++,!0)};u.prototype.isComma=function(){return","===this.expression.charAt(this.pos)&&(this.current=this.newToken(ot,","),this.pos++,!0)};u.prototype.isSemicolon=function(){return";"===this.expression.charAt(this.pos)&&(this.current=this.newToken(yt,";"),this.pos++,!0)};u.prototype.isConst=function(){for(var t,r,i=this.pos,n=i;n<this.expression.length;n++)if(t=this.expression.charAt(n),t.toUpperCase()===t.toLowerCase()&&(n===this.pos||"_"!==t&&"."!==t&&(t<"0"||"9"<t)))break;return i<n&&(r=this.expression.substring(i,n),r in this.consts)?(this.current=this.newToken(et,this.consts[r]),this.pos+=r.length,!0):!1};u.prototype.isNamedOp=function(){for(var r,t,u=this.pos,n=u;n<this.expression.length;n++)if(r=this.expression.charAt(n),r.toUpperCase()===r.toLowerCase()&&(n===this.pos||"_"!==r&&(r<"0"||"9"<r)))break;return u<n&&(t=this.expression.substring(u,n),this.isOperatorEnabled(t)&&(t in this.binaryOps||t in this.unaryOps||t in this.ternaryOps))?(this.current=this.newToken(i,t),this.pos+=t.length,!0):!1};u.prototype.isName=function(){for(var n,r,u=this.pos,t=u,i=!1;t<this.expression.length;t++)if(n=this.expression.charAt(t),n.toUpperCase()===n.toLowerCase()){if(t===this.pos&&("$"===n||"_"===n)){"_"===n&&(i=!0);continue}if(t===this.pos||!i||"_"!==n&&(n<"0"||"9"<n))break}else i=!0;return i?(r=this.expression.substring(u,t),this.current=this.newToken(vt,r),this.pos+=r.length,!0):!1};u.prototype.isWhitespace=function(){for(var t=!1,n=this.expression.charAt(this.pos);!(" "!==n&&"\t"!==n&&"\n"!==n&&"\r"!==n||(t=!0,this.pos++,this.pos>=this.expression.length));)n=this.expression.charAt(this.pos);return t};ii=/^[0-9a-f]{4}$/i;u.prototype.unescape=function(n){var i=n.indexOf("\\"),t,f,r,u;if(i<0)return n;for(t=n.substring(0,i);0<=i;){f=n.charAt(++i);switch(f){case"'":t+="'";break;case'"':t+='"';break;case"\\":t+="\\";break;case"/":t+="/";break;case"b":t+="\b";break;case"f":t+="\f";break;case"n":t+="\n";break;case"r":t+="\r";break;case"t":t+="\t";break;case"u":r=n.substring(i+1,i+5);ii.test(r)||this.parseError("Illegal escape sequence: \\u"+r);t+=String.fromCharCode(parseInt(r,16));i+=4;break;default:throw this.parseError('Illegal escape sequence: "\\'+f+'"');}++i;u=n.indexOf("\\",i);t+=n.substring(i,u<0?n.length:u);i=u}return t};u.prototype.isComment=function(){return"/"===this.expression.charAt(this.pos)&&"*"===this.expression.charAt(this.pos+1)&&(this.pos=this.expression.indexOf("*/",this.pos)+2,1===this.pos&&(this.pos=this.expression.length),!0)};u.prototype.isRadixInteger=function(){var i,r,n=this.pos,t,u,f;if(n>=this.expression.length-2||"0"!==this.expression.charAt(n))return!1;if(++n,"x"===this.expression.charAt(n))i=16,r=/^[0-9a-f]$/i,++n;else{if("b"!==this.expression.charAt(n))return!1;i=2;r=/^[01]$/i;++n}for(t=!1,u=n;n<this.expression.length;){if(f=this.expression.charAt(n),!r.test(f))break;n++;t=!0}return t&&(this.current=this.newToken(et,parseInt(this.expression.substring(u,n),i)),this.pos=n),t};u.prototype.isNumber=function(){for(var r,f,t,i=!1,n=this.pos,s=n,u=n,e=!1,o=!1;n<this.expression.length&&("0"<=(t=this.expression.charAt(n))&&t<="9"||!e&&"."===t);)"."===t?e=!0:o=!0,n++,i=o;if(i&&(u=n),"e"===t||"E"===t){for(n++,r=!0,f=!1;n<this.expression.length;){if(t=this.expression.charAt(n),r&&("+"===t||"-"===t))r=!1;else{if(!("0"<=t&&t<="9"))break;r=!(f=!0)}n++}f||(n=u)}return i?(this.current=this.newToken(et,parseFloat(this.expression.substring(s,n))),this.pos=n):this.pos=u,i};u.prototype.isOperator=function(){var t=this.pos,n=this.expression.charAt(this.pos);if("+"===n||"-"===n||"*"===n||"/"===n||"%"===n||"^"===n||"?"===n||":"===n||"."===n)this.current=this.newToken(i,n);else if("∙"===n||"•"===n)this.current=this.newToken(i,"*");else if(">"===n)"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(i,">="),this.pos++):this.current=this.newToken(i,">");else if("<"===n)"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(i,"<="),this.pos++):this.current=this.newToken(i,"<");else if("|"===n){if("|"!==this.expression.charAt(this.pos+1))return!1;this.current=this.newToken(i,"||");this.pos++}else if("="===n)"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(i,"=="),this.pos++):this.current=this.newToken(i,n);else{if("!"!==n)return!1;"="===this.expression.charAt(this.pos+1)?(this.current=this.newToken(i,"!="),this.pos++):this.current=this.newToken(i,n)}return this.pos++,!!this.isOperatorEnabled(this.current.value)||(this.pos=t,!1)};u.prototype.isOperatorEnabled=function(n){return this.parser.isOperatorEnabled(n)};u.prototype.getCoordinates=function(){for(var t,i=0,n=-1;i++,t=this.pos-n,0<=(n=this.expression.indexOf("\n",n+1))&&n<this.pos;);return{line:i,column:t}};u.prototype.parseError=function(n){var t=this.getCoordinates();throw new Error("parse error ["+t.line+":"+t.column+"]: "+n);};r.prototype.next=function(){return this.current=this.nextToken,this.nextToken=this.tokens.next()};r.prototype.tokenMatches=function(n,t){return void 0===t||(Array.isArray(t)?nt(t,n.value):"function"==typeof t?t(n):n.value===t)};r.prototype.save=function(){this.savedCurrent=this.current;this.savedNextToken=this.nextToken;this.tokens.save()};
7r.prototype.restore=function(){this.tokens.restore();this.current=this.savedCurrent;this.nextToken=this.savedNextToken};r.prototype.accept=function(n,t){return!(this.nextToken.type!==n||!this.tokenMatches(this.nextToken,t))&&(this.next(),!0)};r.prototype.expect=function(n,t){if(!this.accept(n,t)){var i=this.tokens.getCoordinates();throw new Error("parse error ["+i.line+":"+i.column+"]: Expected "+(t||n));}};r.prototype.parseAtom=function(n){var r,u=this.tokens.unaryOps;if(this.accept(vt)||this.accept(i,function(n){return n.value in u}))n.push(new t(s,this.current.value));else if(this.accept(et))n.push(new t(o,this.current.value));else if(this.accept(ni))n.push(new t(o,this.current.value));else if(this.accept(l,"("))this.parseExpression(n),this.expect(l,")");else{if(!this.accept(tt,"["))throw new Error("unexpected "+this.nextToken);this.accept(tt,"]")?n.push(new t(g,0)):(r=this.parseArrayList(n),n.push(new t(g,r)))}};r.prototype.parseExpression=function(n){var t=[];this.parseUntilEndStatement(n,t)||(this.parseVariableAssignmentExpression(t),this.parseUntilEndStatement(n,t)||this.pushExpression(n,t))};r.prototype.pushExpression=function(n,t){for(var i=0,r=t.length;i<r;i++)n.push(t[i])};r.prototype.parseUntilEndStatement=function(n,i){return!!this.accept(yt)&&(!this.nextToken||this.nextToken.type===it||this.nextToken.type===l&&")"===this.nextToken.value||i.push(new t(ut)),this.nextToken.type!==it&&this.parseExpression(i),n.push(new t(f,i)),!0)};r.prototype.parseArrayList=function(n){for(var t=0;!this.accept(tt,"]");)for(this.parseExpression(n),++t;this.accept(ot);)this.parseExpression(n),++t;return t};r.prototype.parseVariableAssignmentExpression=function(n){var e,c,o;for(this.parseConditionalExpression(n);this.accept(i,"=");){var r=n.pop(),u=[],l=n.length-1;if(r.type!==d){if(r.type!==s&&r.type!==y)throw new Error("expected variable for assignment");this.parseVariableAssignmentExpression(u);n.push(new t(v,r.value));n.push(new t(f,u));n.push(h("="))}else{if(!this.tokens.isOperatorEnabled("()="))throw new Error("function definition is not permitted");for(e=0,c=r.value+1;e<c;e++)o=l-e,n[o].type===s&&(n[o]=new t(v,n[o].value));this.parseVariableAssignmentExpression(u);n.push(new t(f,u));n.push(new t(rt,r.value))}}};r.prototype.parseConditionalExpression=function(n){for(this.parseOrExpression(n);this.accept(i,"?");){var r=[],u=[];this.parseConditionalExpression(r);this.expect(i,":");this.parseConditionalExpression(u);n.push(new t(f,r));n.push(new t(f,u));n.push(dt("?"))}};r.prototype.parseOrExpression=function(n){for(this.parseAndExpression(n);this.accept(i,"or");){var r=[];this.parseAndExpression(r);n.push(new t(f,r));n.push(h("or"))}};r.prototype.parseAndExpression=function(n){for(this.parseComparison(n);this.accept(i,"and");){var r=[];this.parseComparison(r);n.push(new t(f,r));n.push(h("and"))}};ri=["==","!=","<","<=",">=",">","in"];r.prototype.parseComparison=function(n){for(this.parseAddSub(n);this.accept(i,ri);){var t=this.current;this.parseAddSub(n);n.push(h(t.value))}};ui=["+","-","||"];r.prototype.parseAddSub=function(n){for(this.parseTerm(n);this.accept(i,ui);){var t=this.current;this.parseTerm(n);n.push(h(t.value))}};fi=["*","/","%"];r.prototype.parseTerm=function(n){for(this.parseFactor(n);this.accept(i,fi);){var t=this.current;this.parseFactor(n);n.push(h(t.value))}};r.prototype.parseFactor=function(n){var r=this.tokens.unaryOps,t;if(this.save(),this.accept(i,function(n){return n.value in r})){if("-"!==this.current.value&&"+"!==this.current.value){if(this.nextToken.type===l&&"("===this.nextToken.value)return this.restore(),void this.parseExponential(n);if(this.nextToken.type===yt||this.nextToken.type===ot||this.nextToken.type===it||this.nextToken.type===l&&")"===this.nextToken.value)return this.restore(),void this.parseAtom(n)}t=this.current;this.parseFactor(n);n.push(ft(t.value))}else this.parseExponential(n)};r.prototype.parseExponential=function(n){for(this.parsePostfixExpression(n);this.accept(i,"^");)this.parseFactor(n),n.push(h("^"))};r.prototype.parsePostfixExpression=function(n){for(this.parseFunctionCall(n);this.accept(i,"!");)n.push(ft("!"))};r.prototype.parseFunctionCall=function(n){var r,f=this.tokens.unaryOps,u;if(this.accept(i,function(n){return n.value in f}))u=this.current,this.parseAtom(n),n.push(ft(u.value));
7else for(this.parseMemberExpression(n);this.accept(l,"(");)this.accept(l,")")?n.push(new t(d,0)):(r=this.parseArgumentList(n),n.push(new t(d,r)))};r.prototype.parseArgumentList=function(n){for(var t=0;!this.accept(l,")");)for(this.parseExpression(n),++t;this.accept(ot);)this.parseExpression(n),++t;return t};r.prototype.parseMemberExpression=function(n){for(this.parseAtom(n);this.accept(i,".")||this.accept(tt,"[");){var r=this.current;if("."===r.value){if(!this.allowMemberAccess)throw new Error('unexpected ".", member access is not permitted');this.expect(vt);n.push(new t(y,this.current.value))}else{if("["!==r.value)throw new Error("unexpected symbol: "+r.value);if(!this.tokens.isOperatorEnabled("["))throw new Error('unexpected "[]", arrays are disabled');this.parseExpression(n);this.expect(tt,"]");n.push(h("["))}}};si=4.7421875;st=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22];wt=1/3;a.prototype.parse=function(n){var t=[],i=new r(this,new u(this,n),{allowMemberAccess:this.options.allowMemberAccess});return i.parseExpression(t),i.expect(it,"EOF"),new e(t,this)};a.prototype.evaluate=function(n,t){return this.parse(n).evaluate(t)};bt=new a;a.parse=function(n){return bt.parse(n)};a.evaluate=function(n,t){return bt.parse(n).evaluate(t)};kt={"+":"add","-":"subtract","*":"multiply","/":"divide","%":"remainder","^":"power","!":"factorial","<":"comparison",">":"comparison","<=":"comparison",">=":"comparison","==":"comparison","!=":"comparison","||":"concatenate",and:"logical",or:"logical",not:"logical","?":"conditional",":":"conditional","=":"assignment","[":"array","()=":"fndef"};a.prototype.isOperatorEnabled=function(n){var t,i=(t=n,kt.hasOwnProperty(t)?kt[t]:t),r=this.options.operators||{};return!(i in r&&!r[i])};li={Parser:a,Expression:e};n.Expression=e;n.Parser=a;n.default=li;Object.defineProperty(n,"__esModule",{value:!0})}); 8/*! 9 * jQuery JavaScript Library v3.7.0 10 * https://jquery.com/ 11 * 12 * Copyright OpenJS Foundation and other contributors 13 * Released under the MIT license 14 * https://jquery.org/license 15 * 16 * Date: 2023-05-11T18:29Z 17 */ 18(function(n,t){"use strict";typeof module=="object"&&typeof module.exports=="object"?module.exports=n.document?t(n,!0):function(n){if(!n.document)throw new Error("jQuery requires a window with a document");return t(n)}:t(n)})(typeof window!="undefined"?window:this,function(n,t){"use strict";function kr(n,t,i){i=i||u;var r,e,f=i.createElement("script");if(f.text=n,t)for(r in se)e=t[r]||t.getAttribute&&t.getAttribute(r),e&&f.setAttribute(r,e);i.head.appendChild(f).parentNode.removeChild(f)}function ft(n){return n==null?n+"":typeof n=="object"||typeof n=="function"?fi[wr.call(n)]||"object":typeof n}function pi(n){var t=!!n&&"length"in n&&n.length,i=ft(n);return e(n)||ut(n)?!1:i==="array"||t===0||typeof t=="number"&&t>0&&t-1 in n}function s(n,t){return n.nodeName&&n.nodeName.toLowerCase()===t.toLowerCase()}function ve(n,t){return t?n==="\0"?"�":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n}function wi(n,t,r){return e(t)?i.grep(n,function(n,i){return!!t.call(n,i,n)!==r}):t.nodeType?i.grep(n,function(n){return n===t!==r}):typeof t!="string"?i.grep(n,function(n){return d.call(t,n)>-1!==r}):i.filter(t,n,r)}function su(n,t){while((n=n[t])&&n.nodeType!==1);return n}function ye(n){var t={};return i.each(n.match(p)||[],function(n,i){t[i]=!0}),t}function ot(n){return n}function oi(n){throw n;}function hu(n,t,i,r){var u;try{n&&e(u=n.promise)?u.call(n).done(t).fail(i):n&&e(u=n.then)?u.call(n,t,i):t.apply(undefined,[n].slice(r))}catch(n){i.apply(undefined,[n])}}function hi(){u.removeEventListener("DOMContentLoaded",hi);n.removeEventListener("load",hi);i.ready()}function be(n,t){return t.toUpperCase()}function k(n){return n.replace(pe,"ms-").replace(we,be)}function dt(){this.expando=i.expando+dt.uid++}function ge(n){return n==="true"?!0:n==="false"?!1:n==="null"?null:n===+n+""?+n:ke.test(n)?JSON.parse(n):n}function lu(n,t,i){var r;if(i===undefined&&n.nodeType===1)if(r="data-"+t.replace(de,"-$&").toLowerCase(),i=n.getAttribute(r),typeof i=="string"){try{i=ge(i)}catch(u){}c.set(n,t,i)}else i=undefined;return i}function vu(n,t,r,u){var s,h,c=20,l=u?function(){return u.cur()}:function(){return i.css(n,t,"")},o=l(),e=r&&r[3]||(i.cssNumber[t]?"":"px"),f=n.nodeType&&(i.cssNumber[t]||e!=="px"&&+o)&>.exec(i.css(n,t));if(f&&f[3]!==e){for(o=o/2,e=e||f[3],f=+o||1;c--;)i.style(n,t,f+e),(1-h)*(1-(h=l()/o||.5))<=0&&(c=0),f=f/h;f=f*2;i.style(n,t,f+e);r=r||[]}return r&&(f=+f||+o||0,s=r[1]?f+(r[1]+1)*r[2]:+r[2],u&&(u.unit=e,u.start=f,u.end=s)),s}function to(n){var r,f=n.ownerDocument,u=n.nodeName,t=bi[u];return t?t:(r=f.body.appendChild(f.createElement(u)),t=i.css(r,"display"),r.parentNode.removeChild(r),t==="none"&&(t="block"),bi[u]=t,t)}function ct(n,t){for(var e,u,f=[],i=0,o=n.length;i<o;i++)(u=n[i],u.style)&&(e=u.style.display,t?(e==="none"&&(f[i]=r.get(u,"display")||null,f[i]||(u.style.display="")),u.style.display===""&&ni(u)&&(f[i]=to(u))):e!=="none"&&(f[i]="none",r.set(u,"display",e)));for(i=0;i<o;i++)f[i]!=null&&(n[i].style.display=f[i]);return n}function l(n,t){var r;return(r=typeof n.getElementsByTagName!="undefined"?n.getElementsByTagName(t||"*"):typeof n.querySelectorAll!="undefined"?n.querySelectorAll(t||"*"):[],t===undefined||t&&s(n,t))?i.merge([n],r):r}function ki(n,t){for(var i=0,u=n.length;i<u;i++)r.set(n[i],"globalEval",!t||r.get(t[i],"globalEval"))}function bu(n,t,r,u,f){for(var e,o,p,c,w,a,s=t.createDocumentFragment(),v=[],h=0,b=n.length;h<b;
18h++)if(e=n[h],e||e===0)if(ft(e)==="object")i.merge(v,e.nodeType?[e]:e);else if(wu.test(e)){for(o=o||s.appendChild(t.createElement("div")),p=(yu.exec(e)||["",""])[1].toLowerCase(),c=y[p]||y._default,o.innerHTML=c[1]+i.htmlPrefilter(e)+c[2],a=c[0];a--;)o=o.lastChild;i.merge(v,o.childNodes);o=s.firstChild;o.textContent=""}else v.push(t.createTextNode(e));for(s.textContent="",h=0;e=v[h++];){if(u&&i.inArray(e,u)>-1){f&&f.push(e);continue}if(w=ht(e),o=l(s.appendChild(e),"script"),w&&ki(o),r)for(a=0;e=o[a++];)pu.test(e.type||"")&&r.push(e)}return s}function lt(){return!0}function at(){return!1}function gi(n,t,r,u,f,e){var o,s;if(typeof t=="object"){typeof r!="string"&&(u=u||r,r=undefined);for(s in t)gi(n,s,r,u,t[s],e);return n}if(u==null&&f==null?(f=r,u=r=undefined):f==null&&(typeof r=="string"?(f=u,u=undefined):(f=u,u=r,r=undefined)),f===!1)f=at;else if(!f)return n;return e===1&&(o=f,f=function(n){return i().off(n),o.apply(this,arguments)},f.guid=o.guid||(o.guid=i.guid++)),n.each(function(){i.event.add(this,t,f,u,r)})}function ci(n,t,u){if(!u){r.get(n,t)===undefined&&i.event.add(n,t,lt);return}r.set(n,t,!1);i.event.add(n,t,{namespace:!1,handler:function(n){var f,u=r.get(this,t);if(n.isTrigger&1&&this[t]){if(u)(i.event.special[t]||{}).delegateType&&n.stopPropagation();else if(u=v.call(arguments),r.set(this,t,u),this[t](),f=r.get(this,t),r.set(this,t,!1),u!==f)return n.stopImmediatePropagation(),n.preventDefault(),f}else u&&(r.set(this,t,i.event.trigger(u[0],u.slice(1),this)),n.stopPropagation(),n.isImmediatePropagationStopped=lt)}})}function ku(n,t){return s(n,"table")&&s(t.nodeType!==11?t:t.firstChild,"tr")?i(n).children("tbody")[0]||n:n}function fo(n){return n.type=(n.getAttribute("type")!==null)+"/"+n.type,n}function eo(n){return(n.type||"").slice(0,5)==="true/"?n.type=n.type.slice(5):n.removeAttribute("type"),n}function du(n,t){var f,o,e,s,h,l,u;if(t.nodeType===1){if(r.hasData(n)&&(s=r.get(n),u=s.events,u)){r.remove(t,"handle events");for(e in u)for(f=0,o=u[e].length;f<o;f++)i.event.add(t,e,u[e][f])}c.hasData(n)&&(h=c.access(n),l=i.extend({},h),c.set(t,l))}}function oo(n,t){var i=t.nodeName.toLowerCase();i==="input"&&ti.test(n.type)?t.checked=n.checked:(i==="input"||i==="textarea")&&(t.defaultValue=n.defaultValue)}function vt(n,t,u,o){t=pr(t);var a,b,c,v,s,y,h=0,p=n.length,d=p-1,w=t[0],k=e(w);if(k||p>1&&typeof w=="string"&&!f.checkClone&&ro.test(w))return n.each(function(i){var r=n.eq(i);k&&(t[0]=w.call(this,i,r.html()));vt(r,t,u,o)});if(p&&(a=bu(t,n[0].ownerDocument,!1,n,o),b=a.firstChild,a.childNodes.length===1&&(a=b),b||o)){for(c=i.map(l(a,"script"),fo),v=c.length;h<p;h++)s=a,h!==d&&(s=i.clone(s,!0,!0),v&&i.merge(c,l(s,"script"))),u.call(n[h],s,h);if(v)for(y=c[c.length-1].ownerDocument,i.map(c,eo),h=0;h<v;h++)s=c[h],pu.test(s.type||"")&&!r.access(s,"globalEval")&&i.contains(y,s)&&(s.src&&(s.type||"").toLowerCase()!=="module"?i._evalUrl&&!s.noModule&&i._evalUrl(s.src,{nonce:s.nonce||s.getAttribute("nonce")},y):kr(s.textContent.replace(uo,""),s,y))}return n}function gu(n,t,r){for(var u,e=t?i.filter(t,n):n,f=0;(u=e[f])!=null;f++)r||u.nodeType!==1||i.cleanData(l(u)),u.parentNode&&(r&&ht(u)&&ki(l(u,"script")),u.parentNode.removeChild(u));return n}function ii(n,t,r){var o,s,h,u,c=tr.test(t),e=n.style;return r=r||li(n),r&&(u=r.getPropertyValue(t)||r[t],c&&u&&(u=u.replace(kt,"$1")||undefined),u!==""||ht(n)||(u=i.style(n,t)),!f.pixelBoxStyles()&&nr.test(u)&&so.test(t)&&(o=e.width,s=e.minWidth,h=e.maxWidth,e.minWidth=e.maxWidth=e.width=u,u=r.width,e.width=o,e.minWidth=s,e.maxWidth=h)),u!==undefined?u+"":u}function tf(n,t){return{get:function(){if(n()){delete this.get;return}return(this.get=t).apply(this,arguments)}}}function ho(n){for(var i=n[0].toUpperCase()+n.slice(1),t=rf.length;t--;)if(n=rf[t]+i,n in uf)return n}function ir(n){var t=i.cssProps[n]||ff[n];return t?t:n in uf?n:ff[n]=ho(n)||n}function sf(n,t,i){var r=gt.exec(t);return r?Math.max(0,r[2]-(i||0))+(r[3]||"px"):t}function rr(n,t,r,u,f,e){var o=t==="width"?1:0,h=0,s=0,c=0;if(r===(u?"border":"content"))return 0;for(;o<4;o+=2)r==="margin"&&(c+=i.css(n,r+nt[o],!0,f)),u?(r==="content"&&(s-=i.css(n,"padding"+nt[o],!0,f)),r!=="margin"&&(s-=i.css(n,"border"+nt[o]+"Width",!0,f))):(s+=i.css(n,"padding"+nt[o],!0,f),r!=="padding"?s+=i.css(n,"border"+nt[o]+"Width",!0,f):h+=i.css(n,"border"+nt[o]+"Width",!0,f));return!u&&e>=0&&(s+=Math.max(0,Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-e-s-h-.5))||0),s+c}function hf(n,t,r){var e=li(n),l=!f.boxSizingReliable()||r,o=l&&i.css(n,"boxSizing",!1,e)==="border-box",h=o,u=ii(n,t,e),c="offset"+t[0].toUpperCase()+t.slice(1);if(nr.test(u)){if(!r)return u;u="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&s(n,"tr")||u==="auto"||!parseFloat(u)&&i.css(n,"dis
18play",!1,e)==="inline")&&n.getClientRects().length&&(o=i.css(n,"boxSizing",!1,e)==="border-box",h=c in n,h&&(u=n[c])),u=parseFloat(u)||0,u+rr(n,t,r||(o?"border":"content"),h,e,u)+"px"}function a(n,t,i,r,u){return new a.prototype.init(n,t,i,r,u)}function ur(){ai&&(u.hidden===!1&&n.requestAnimationFrame?n.requestAnimationFrame(ur):n.setTimeout(ur,i.fx.interval),i.fx.tick())}function af(){return n.setTimeout(function(){yt=undefined}),yt=Date.now()}function vi(n,t){var r,u=0,i={height:n};for(t=t?1:0;u<4;u+=2-t)r=nt[u],i["margin"+r]=i["padding"+r]=n;return t&&(i.opacity=i.width=n),i}function vf(n,t,i){for(var u,f=(w.tweeners[t]||[]).concat(w.tweeners["*"]),r=0,e=f.length;r<e;r++)if(u=f[r].call(i,t,n))return u}function ao(n,t,u){var f,y,w,c,b,s,o,l,k="width"in t||"height"in t,v=this,p={},h=n.style,a=n.nodeType&&ni(n),e=r.get(n,"fxshow");u.queue||(c=i._queueHooks(n,"fx"),c.unqueued==null&&(c.unqueued=0,b=c.empty.fire,c.empty.fire=function(){c.unqueued||b()}),c.unqueued++,v.always(function(){v.always(function(){c.unqueued--;i.queue(n,"fx").length||c.empty.fire()})}));for(f in t)if(y=t[f],cf.test(y)){if(delete t[f],w=w||y==="toggle",y===(a?"hide":"show"))if(y==="show"&&e&&e[f]!==undefined)a=!0;else continue;p[f]=e&&e[f]||i.style(n,f)}if(s=!i.isEmptyObject(t),s||!i.isEmptyObject(p)){k&&n.nodeType===1&&(u.overflow=[h.overflow,h.overflowX,h.overflowY],o=e&&e.display,o==null&&(o=r.get(n,"display")),l=i.css(n,"display"),l==="none"&&(o?l=o:(ct([n],!0),o=n.style.display||o,l=i.css(n,"display"),ct([n]))),(l==="inline"||l==="inline-block"&&o!=null)&&i.css(n,"float")==="none"&&(s||(v.done(function(){h.display=o}),o==null&&(l=h.display,o=l==="none"?"":l)),h.display="inline-block"));u.overflow&&(h.overflow="hidden",v.always(function(){h.overflow=u.overflow[0];h.overflowX=u.overflow[1];h.overflowY=u.overflow[2]}));s=!1;for(f in p)s||(e?"hidden"in e&&(a=e.hidden):e=r.access(n,"fxshow",{display:o}),w&&(e.hidden=!a),a&&ct([n],!0),v.done(function(){a||ct([n]);r.remove(n,"fxshow");for(f in p)i.style(n,f,p[f])})),s=vf(a?e[f]:0,f,v),f in e||(e[f]=s.start,a&&(s.end=s.start,s.start=0))}}function vo(n,t){var r,f,e,u,o;for(r in n)if(f=k(r),e=t[f],u=n[r],Array.isArray(u)&&(e=u[1],u=n[r]=u[0]),r!==f&&(n[f]=u,delete n[r]),o=i.cssHooks[f],o&&"expand"in o){u=o.expand(u);delete n[f];for(r in u)r in n||(n[r]=u[r],t[r]=e)}else t[f]=e}function w(n,t,r){var o,s,h=0,a=w.prefilters.length,f=i.Deferred().always(function(){delete l.elem}),l=function(){if(s)return!1;for(var o=yt||af(),t=Math.max(0,u.startTime+u.duration-o),h=t/u.duration||0,i=1-h,r=0,e=u.tweens.length;r<e;r++)u.tweens[r].run(i);return(f.notifyWith(n,[u,i,t]),i<1&&e)?t:(e||f.notifyWith(n,[u,1,0]),f.resolveWith(n,[u]),!1)},u=f.promise({elem:n,props:i.extend({},t),opts:i.extend(!0,{specialEasing:{},easing:i.easing._default},r),originalProperties:t,originalOptions:r,startTime:yt||af(),duration:r.duration,tweens:[],createTween:function(t,r){var f=i.Tween(n,u.opts,t,r,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(f),f},stop:function(t){var i=0,r=t?u.tweens.length:0;if(s)return this;for(s=!0;i<r;i++)u.tweens[i].run(1);return t?(f.notifyWith(n,[u,1,0]),f.resolveWith(n,[u,t])):f.rejectWith(n,[u,t]),this}}),c=u.props;for(vo(c,u.opts.specialEasing);h<a;h++)if(o=w.prefilters[h].call(u,n,c,u.opts),o)return e(o.stop)&&(i._queueHooks(u.elem,u.opts.queue).stop=o.stop.bind(o)),o;return i.map(c,vf,u),e(u.opts.start)&&u.opts.start.call(n,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),i.fx.timer(i.extend(l,{elem:n,anim:u,queue:u.opts.queue})),u}function it(n){var t=n.match(p)||[];return t.join(" ")}function rt(n){return n.getAttribute&&n.getAttribute("class")||""}function fr(n){return Array.isArray(n)?n:typeof n=="string"?n.match(p)||[]:[]}function hr(n,t,r,u){var f;if(Array.isArray(t))i.each(t,function(t,i){r||yo.test(n)?u(n,i):hr(n+"["+(typeof i=="object"&&i!=null?t:"")+"]",i,r,u)});else if(r||ft(t)!=="object")u(n,t);else for(f in t)hr(n+"["+f+"]",t[f],r,u)}function te(n){return function(t,i){typeof t!="string"&&(i=t,t="*");var r,u=0,f=t.toLowerCase().match(p)||[];
18if(e(i))while(r=f[u++])r[0]==="+"?(r=r.slice(1)||"*",(n[r]=n[r]||[]).unshift(i)):(n[r]=n[r]||[]).push(i)}}function ie(n,t,r,u){function e(s){var h;return f[s]=!0,i.each(n[s]||[],function(n,i){var s=i(t,r,u);if(typeof s!="string"||o||f[s]){if(o)return!(h=s)}else return t.dataTypes.unshift(s),e(s),!1}),h}var f={},o=n===cr;return e(t.dataTypes[0])||!f["*"]&&e("*")}function ar(n,t){var r,u,f=i.ajaxSettings.flatOptions||{};for(r in t)t[r]!==undefined&&((f[r]?n:u||(u={}))[r]=t[r]);return u&&i.extend(!0,n,u),n}function rs(n,t,i){for(var e,u,f,o,s=n.contents,r=n.dataTypes;r[0]==="*";)r.shift(),e===undefined&&(e=n.mimeType||t.getResponseHeader("Content-Type"));if(e)for(u in s)if(s[u]&&s[u].test(e)){r.unshift(u);break}if(r[0]in i)f=r[0];else{for(u in i){if(!r[0]||n.converters[u+" "+r[0]]){f=u;break}o||(o=u)}f=f||o}if(f)return f!==r[0]&&r.unshift(f),i[f]}function us(n,t,i,r){var h,u,f,s,e,o={},c=n.dataTypes.slice();if(c[1])for(f in n.converters)o[f.toLowerCase()]=n.converters[f];for(u=c.shift();u;)if(n.responseFields[u]&&(i[n.responseFields[u]]=t),!e&&r&&n.dataFilter&&(t=n.dataFilter(t,n.dataType)),e=u,u=c.shift(),u)if(u==="*")u=e;else if(e!=="*"&&e!==u){if(f=o[e+" "+u]||o["* "+u],!f)for(h in o)if(s=h.split(" "),s[1]===u&&(f=o[e+" "+s[0]]||o["* "+s[0]],f)){f===!0?f=o[h]:o[h]!==!0&&(u=s[0],c.unshift(s[1]));break}if(f!==!0)if(f&&n.throws)t=f(t);else try{t=f(t)}catch(l){return{state:"parsererror",error:f?l:"No conversion from "+e+" to "+u}}}return{state:"success",data:t}}var h=[],yr=Object.getPrototypeOf,v=h.slice,pr=h.flat?function(n){return h.flat.call(n)}:function(n){return h.concat.apply([],n)},ui=h.push,d=h.indexOf,fi={},wr=fi.toString,bt=fi.hasOwnProperty,br=bt.toString,oe=br.call(Object),f={},e=function(n){return typeof n=="function"&&typeof n.nodeType!="number"&&typeof n.item!="function"},ut=function(n){return n!=null&&n===n.window},u=n.document,se={type:!0,src:!0,nonce:!0,noModule:!0},dr="3.7.0",he=/HTML$/i,i=function(n,t){return new i.fn.init(n,t)},gr,b,ei,ru,uu,fu,eu,ou,p,cu,si,st,ni,bi,y,wu,di,yt,ai,cf,lf,yf,pt,pf,wf,bf,or,sr,re,wt,vr,yi,ue,fe,ee;i.fn=i.prototype={jquery:dr,constructor:i,length:0,toArray:function(){return v.call(this)},get:function(n){return n==null?v.call(this):n<0?this[n+this.length]:this[n]},pushStack:function(n){var t=i.merge(this.constructor(),n);return t.prevObject=this,t},each:function(n){return i.each(this,n)},map:function(n){return this.pushStack(i.map(this,function(t,i){return n.call(t,i,t)}))},slice:function(){return this.pushStack(v.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(i.grep(this,function(n,t){return(t+1)%2}))},odd:function(){return this.pushStack(i.grep(this,function(n,t){return t%2}))},eq:function(n){var i=this.length,t=+n+(n<0?i:0);return this.pushStack(t>=0&&t<i?[this[t]]:[])},end:function(){return this.prevObject||this.constructor()},push:ui,sort:h.sort,splice:h.splice};i.extend=i.fn.extend=function(){var s,u,f,t,o,c,n=arguments[0]||{},r=1,l=arguments.length,h=!1;for(typeof n=="boolean"&&(h=n,n=arguments[r]||{},r++),typeof n=="object"||e(n)||(n={}),r===l&&(n=this,r--);r<l;r++)if((s=arguments[r])!=null)for(u in s)(t=s[u],u!=="__proto__"&&n!==t)&&(h&&t&&(i.isPlainObject(t)||(o=Array.isArray(t)))?(f=n[u],c=o&&!Array.isArray(f)?[]:o||i.isPlainObject(f)?f:{},o=!1,n[u]=i.extend(h,c,t)):t!==undefined&&(n[u]=t));return n};i.extend({expando:"jQuery"+(dr+Math.random()).replace(/\D/g,""),isReady:!0,error:function(n){throw new Error(n);},noop:function(){},isPlainObject:function(n){var t,i;return!n||wr.call(n)!=="[object Object]"?!1:(t=yr(n),!t)?!0:(i=bt.call(t,"constructor")&&t.constructor,typeof i=="function"&&br.call(i)===oe)},isEmptyObject:function(n){for(var t in n)return!1;return!0},globalEval:function(n,t,i){kr(n,{nonce:t&&t.nonce},i)},each:function(n,t){var r,i=0;if(pi(n)){for(r=n.length;i<r;i++)if(t.call(n[i],i,n[i])===!1)break}else for(i in n)if(t.call(n[i],i,n[i])===!1)break;return n},text:function(n){var r,u="",f=0,t=n.nodeType;if(t){if(t===1||t===9||t===11)return n.textContent;if(t===3||t===4)return n.nodeValue}else while(r=n[f++])u+=i.text(r);return u},makeArray:function(n,t){var r=t||[];return n!=null&&(pi(Object(n))?i.merge(r,typeof n=="string"?[n]:n):ui.call(r,n)),r},inArray:function(n,t,i){return t==null?-1:d.call(t,n,i)},isXMLDoc:function(n){var i=n&&n.namespaceURI,t=n&&(n.ownerDocument||n).documentElement;return!he.test(i||t&&t.nodeName||"HTML")},merge:function(n,t){for(var u=+t.length,i=0,r=n.length;i<u;i++)n[r++]=t[i];return n.length=r,n},grep:function(n,t,i){for(var u,f=[],r=0,e=n.length,o=!i;r<e;r++)u=!t(n[r],r),u!==o&&f.push(n[r]);return f},map:function(n,t,i){var e,u,r=0,f=[];if(pi(n))for(e=n.length;r<e;
18r++)u=t(n[r],r,i),u!=null&&f.push(u);else for(r in n)u=t(n[r],r,i),u!=null&&f.push(u);return pr(f)},guid:1,support:f});typeof Symbol=="function"&&(i.fn[Symbol.iterator]=h[Symbol.iterator]);i.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(n,t){fi["[object "+t+"]"]=t.toLowerCase()});var ce=h.pop,le=h.sort,ae=h.splice,o="[\\x20\\t\\r\\n\\f]",kt=new RegExp("^"+o+"+|((?:^|[^\\\\])(?:\\\\.)*)"+o+"+$","g");i.contains=function(n,t){var i=t&&t.parentNode;return n===i||!!(i&&i.nodeType===1&&(n.contains?n.contains(i):n.compareDocumentPosition&&n.compareDocumentPosition(i)&16))};gr=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;i.escapeSelector=function(n){return(n+"").replace(gr,ve)};b=u;ei=ui,function(){function fr(){try{return u.activeElement}catch(n){}}function r(n,t,o,s){var h,k,v,y,d,b,g,p=t&&t.ownerDocument,w=t?t.nodeType:9;if(o=o||[],typeof n!="string"||!n||w!==1&&w!==9&&w!==11)return o;if(!s&&(nt(t),t=t||u,a)){if(w!==11&&(d=ir.exec(n)))if(h=d[1]){if(w===9)if(v=t.getElementById(h)){if(v.id===h)return l.call(o,v),o}else return o;else if(p&&(v=p.getElementById(h))&&r.contains(t,v)&&v.id===h)return l.call(o,v),o}else{if(d[2])return l.apply(o,t.getElementsByTagName(n)),o;if((h=d[3])&&t.getElementsByClassName)return l.apply(o,t.getElementsByClassName(h)),o}if(!st[n+" "]&&(!c||!c.test(n))){if(g=n,p=t,w===1&&(ki.test(n)||li.test(n))){for(p=dt.test(n)&>(t.parentNode)||t,p==t&&f.scope||((y=t.getAttribute("id"))?y=i.escapeSelector(y):t.setAttribute("id",y=e)),b=lt(n),k=b.length;k--;)b[k]=(y?"#"+y:":scope")+" "+at(b[k]);g=b.join(",")}try{return l.apply(o,p.querySelectorAll(g)),o}catch(tt){st(n,!0)}finally{y===e&&t.removeAttribute("id")}}}return yi(n.replace(kt,"$1"),t,o,s)}function ct(){function n(r,u){return i.push(r+" ")>t.cacheLength&&delete n[i.shift()],n[r+" "]=u}var i=[];return n}function y(n){return n[e]=!0,n}function ut(n){var t=u.createElement("fieldset");try{return!!n(t)}catch(i){return!1}finally{t.parentNode&&t.parentNode.removeChild(t);t=null}}function er(n){return function(t){return s(t,"input")&&t.type===n}}function or(n){return function(t){return(s(t,"input")||s(t,"button"))&&t.type===n}}function ai(n){return function(t){return"form"in t?t.parentNode&&t.disabled===!1?"label"in t?"label"in t.parentNode?t.parentNode.disabled===n:t.disabled===n:t.isDisabled===n||t.isDisabled!==!n&&ur(t)===n:t.disabled===n:"label"in t?t.disabled===n:!1}}function it(n){return y(function(t){return t=+t,y(function(i,r){for(var u,f=n([],i.length,t),e=f.length;e--;)i[u=f[e]]&&(i[u]=!(r[u]=i[u]))})})}function gt(n){return n&&typeof n.getElementsByTagName!="undefined"&&n}function nt(n){var s,h=n?n.ownerDocument||n:b;return h==u||h.nodeType!==9||!h.documentElement?u:(u=h,g=u.documentElement,a=!i.isXMLDoc(u),pt=g.matches||g.webkitMatchesSelector||g.msMatchesSelector,b!=u&&(s=u.defaultView)&&s.top!==s&&s.addEventListener("unload",rr),f.getById=ut(function(n){return g.appendChild(n).id=i.expando,!u.getElementsByName||!u.getElementsByName(i.expando).length}),f.disconnectedMatch=ut(function(n){return pt.call(n,"*")}),f.scope=ut(function(){return u.querySelectorAll(":scope")}),f.cssHas=ut(function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(n){return!0}}),f.getById?(t.filter.ID=function(n){var t=n.replace(w,k);return function(n){return n.getAttribute("id")===t}},t.find.ID=function(n,t){if(typeof t.getElementById!="undefined"&&a){var i=t.getElementById(n);return i?[i]:[]}}):(t.filter.ID=function(n){var t=n.replace(w,k);return function(n){var i=typeof n.getAttributeNode!="undefined"&&n.getAttributeNode("id");return i&&i.value===t}},t.find.ID=function(n,t){if(typeof t.getElementById!="undefined"&&a){var i,u,f,r=t.getElementById(n);if(r){if(i=r.getAttributeNode("id"),i&&i.value===n)return[r];for(f=t.getElementsByName(n),u=0;r=f[u++];)if(i=r.getAttributeNode("id"),i&&i.value===n)return[r]}return[]}}),t.find.TAG=function(n,t){return typeof t.getElementsByTagName!="undefined"?t.getElementsByTagName(n):t.querySelectorAll(n)},t.find.CLASS=function(n,t){if(typeof t.getElementsByClassName!="undefined"&&a)return t.getElementsByClassName(n)},c=[],ut(function(n){var t;g.appendChild(n).innerHTML="<a id='"+e+"' href='' disabled='disabled'><\/a><select id='"+e+"-\r\\' disabled='disabled'><option selected=''><\/option><\/select>";n.querySelectorAll("[selected]").length||c.push("\\["+o+"*(?:value|"+si+")");n.querySelectorAll("[id~="+e+"-]").length||c.push("~=");n.querySelectorAll("a#"+e+"+*").length||c.push(".#.+[+~]");n.querySelectorAll(":checked").length||c.push(":checked");t=u.createElement("input");t.setAttribute("type","hidden");n.appendChild(t).setAttribute("name","D");g.appendChild(n).disabled=!0;n.querySelectorAll(":disabled").length!==2&&c.push(":enabled",":disabled");t=u.createElement("input");t.setAttribute("name","");n.appendChild(t);n.querySelectorAll("[name='']").length||c.push("\\["+o+"*name"+o+"*="+o+"*(?:''|\"\")")}),f.cssHas||c.push(":has"),c=c.length&&new RegExp(c.join("|")),wt=function(n,t){if(n===t)return ot=!0,0;var i=!n.compareDocumentPosition-!t.compareDocumentPosition;return i?i:(i=(n.ownerDocument||n)==(t.ownerDocument||t)?n.compareDocumentPosition(t):1,i&1||!f.sortDetached&&t.compareDocumentPosition(n)===i)?n===u||n.ownerDocument==b&&r.contains(b,n)?-1:t===u||t.ownerDocument==b&&r.contains(b,t)?1:ft?d.call(ft,n)-d.call(ft,t):0:i&4?-1:1},u)}function vi(){}function lt(n,i){var e,f,s,o,u,h,c,l=fi[n+" "];if(l)return i?0:l.slice(0);for(u=n,h=[],c=t.preFilter;u;){(!e||(f=bi.exec(u)))&&(f&&(u=u.slice(f[0].length)||u),h.push(s=[]));e=!1;(f=li.exec(u))&&(e=f.shift(),s.push({value:e,type:f[0].replace(kt," ")}),u=u.slice(e.length));for(o in t.filter)(f=ht[o].exec(u))&&(!c[o]||(f=c[o](f)))&&(e=f.shift(),s.push({value:e,type:o,matches:f}),u=u.slice(e.length));if(!e)break}return i?u.length:u?r.error(n):fi(n,h).slice(0)}function at(n){for(var t=0,r=n.length,i="";t<r;t++)i+=n[t].value;return i}
vendor: 4,269 bytes, line 18
18function vt(n,t,i){var r=t.dir,u=t.next,f=u||r,o=i&&f==="parentNode",h=pi++;return t.first?function(t,i,u){while(t=t[r])if(t.nodeType===1||o)return n(t,i,u);return!1}:function(t,i,c){var l,a,v=[p,h];if(c){while(t=t[r])if((t.nodeType===1||o)&&n(t,i,c))return!0}else while(t=t[r])if(t.nodeType===1||o)if(a=t[e]||(t[e]={}),u&&s(t,u))t=t[r]||t;else{if((l=a[f])&&l[0]===p&&l[1]===h)return v[2]=l[2];if(a[f]=v,v[2]=n(t,i,c))return!0}return!1}}function ni(n){return n.length>1?function(t,i,r){for(var u=n.length;u--;)if(!n[u](t,i,r))return!1;return!0}:n[0]}function sr(n,t,i){for(var u=0,f=t.length;u<f;u++)r(n,t[u],i);return i}function yt(n,t,i,r,u){for(var e,o=[],f=0,s=n.length,h=t!=null;f<s;f++)(e=n[f])&&(!i||i(e,r,u))&&(o.push(e),h&&t.push(f));return o}function ti(n,t,i,r,u,f){return r&&!r[e]&&(r=ti(r)),u&&!u[e]&&(u=ti(u,f)),y(function(f,e,o,s){var a,c,v,h,w=[],p=[],b=e.length,k=f||sr(t||"*",o.nodeType?[o]:o,[]),y=n&&(f||!t)?yt(k,w,n,o,s):k;if(i?(h=u||(f?n:b||r)?[]:e,i(y,h,o,s)):h=y,r)for(a=yt(h,p),r(a,[],o,s),c=a.length;c--;)(v=a[c])&&(h[p[c]]=!(y[p[c]]=v));if(f){if(u||n){if(u){for(a=[],c=h.length;c--;)(v=h[c])&&a.push(y[c]=v);u(null,h=[],a,s)}for(c=h.length;c--;)(v=h[c])&&(a=u?d.call(f,v):w[c])>-1&&(f[a]=!(e[a]=v))}}else h=yt(h===e?h.splice(b,h.length):h),u?u(null,e,h,s):l.apply(e,h)})}function ii(n){for(var o,u,r,s=n.length,h=t.relative[n[0].type],c=h||t.relative[" "],i=h?1:0,l=vt(function(n){return n===o},c,!0),a=vt(function(n){return d.call(o,n)>-1},c,!0),f=[function(n,t,i){var r=!h&&(i||t!=et)||((o=t).nodeType?l(n,t,i):a(n,t,i));return o=null,r}];i<s;i++)if(u=t.relative[n[i].type])f=[vt(ni(f),u)];else{if(u=t.filter[n[i].type].apply(null,n[i].matches),u[e]){for(r=++i;r<s;r++)if(t.relative[n[r].type])break;return ti(i>1&&ni(f),i>1&&at(n.slice(0,i-1).concat({value:n[i-2].type===" "?"*":""})).replace(kt,"$1"),u,i<r&&ii(n.slice(i,r)),r<s&&ii(n=n.slice(r)),r<s&&at(n))}f.push(u)}return ni(f)}function hr(n,r){var f=r.length>0,e=n.length>0,o=function(o,s,h,c,v){var y,g,k,d=0,w="0",tt=o&&[],b=[],it=et,rt=o||e&&t.find.TAG("*",v),ut=p+=it==null?1:Math.random()||.1,ft=rt.length;for(v&&(et=s==u||s||v);w!==ft&&(y=rt[w])!=null;w++){if(e&&y){for(g=0,s||y.ownerDocument==u||(nt(y),h=!a);k=n[g++];)if(k(y,s||u,h)){l.call(c,y);break}v&&(p=ut)}f&&((y=!k&&y)&&d--,o&&tt.push(y))}if(d+=w,f&&w!==d){for(g=0;k=r[g++];)k(tt,b,s,h);if(o){if(d>0)while(w--)tt[w]||b[w]||(b[w]=ce.call(c));b=yt(b)}l.apply(c,b);v&&!o&&b.length>0&&d+r.length>1&&i.uniqueSort(c)}return v&&(p=ut,et=it),tt};return f?y(o):o}function ri(n,t){var r,u=[],f=[],i=oi[n+" "];if(!i){for(t||(t=lt(n)),r=t.length;r--;)i=ii(t[r]),i[e]?u.push(i):f.push(i);i=oi(n,hr(f,u));i.selector=n}return i}function yi(n,i,r,u){var o,f,e,c,v,h=typeof n=="function"&&n,s=!u&<(n=h.selector||n);if(r=r||[],s.length===1){if(f=s[0]=s[0].slice(0),f.length>2&&(e=f[0]).type==="ID"&&i.nodeType===9&&a&&t.relative[f[1].type]){if(i=(t.find.ID(e.matches[0].replace(w,k),i)||[])[0],i)h&&(i=i.parentNode);else return r;n=n.slice(f.shift().value.length)}for(o=ht.needsContext.test(n)?0:f.length;o--;){if(e=f[o],t.relative[c=e.type])break;if((v=t.find[c])&&(u=v(e.matches[0].replace(w,k),dt.test(f[0].type)&>(i.parentNode)||i))){if(f.splice(o,1),n=u.length&&at(f),!n)return l.apply(r,u),r;break}}}return(h||ri(n,s))(u,i,!a,r,!i||dt.test(n)&>(i.parentNode)||i),r}var rt,t,et,ft,ot,l=ei,u,g,a,c,pt,e=i.expando,p=0,pi=0,ui=ct(),fi=ct(),oi=ct(),st=ct(),wt=function(n,t){return n===t&&(ot=!0),0},si="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",tt="(?:\\\\[\\da-fA-F]{1,6}"+o+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",hi="\\["+o+"*("+tt+")(?:"+o+"*([*^$|!~]?=)"+o+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+tt+"))|)"+o+"*\\]",ci=":("+tt+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+hi+")*)|.*)\\)|)",wi=new RegExp(o+"+","g"),bi=new RegExp("^"+o+"*,"+o+"*"),li=new RegExp("^"+o+"*([>+~]|"+o+")"+o+"*"),ki=new RegExp(o+"|>"),di=new RegExp(ci),gi=new RegExp("^"+tt+"$"),ht={ID:new RegExp("^#("+tt+")"),CLASS:new RegExp("^\\.("+tt+")"),TAG:new RegExp("^("+tt+"|[*])"),ATTR:new RegExp("^"+hi),PSEUDO:new RegExp("^"+ci),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+
18o+"*(even|odd|(([+-]|)(\\d*)n|)"+o+"*(?:([+-]|)"+o+"*(\\d+)|))"+o+"*\\)|)","i"),bool:new RegExp("^(?:"+si+")$","i"),needsContext:new RegExp("^"+o+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+o+"*((?:-\\d)?\\d*)"+o+"*\\)|)(?=[^-]|$)","i")},nr=/^(?:input|select|textarea|button)$/i,tr=/^h\d$/i,ir=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,dt=/[+~]/,w=new RegExp("\\\\[\\da-fA-F]{1,6}"+o+"?|\\\\([^\\r\\n\\f])","g"),k=function(n,t){var i="0x"+n.slice(1)-65536;return t?t:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,i&1023|56320)},rr=function(){nt()},ur=vt(function(n){return n.disabled===!0&&s(n,"fieldset")},{dir:"parentNode",next:"legend"});try{l.apply(h=v.call(b.childNodes),b.childNodes);h[b.childNodes.length].nodeType}catch(cr){l={apply:function(n,t){ei.apply(n,v.call(t))},call:function(n){ei.apply(n,v.call(arguments,1))}}}r.matches=function(n,t){return r(n,null,null,t)};r.matchesSelector=function(n,t){if(nt(n),a&&!st[t+" "]&&(!c||!c.test(t)))try{var i=pt.call(n,t);if(i||f.disconnectedMatch||n.document&&n.document.nodeType!==11)return i}catch(e){st(t,!0)}return r(t,u,null,[n]).length>0};r.contains=function(n,t){return(n.ownerDocument||n)!=u&&nt(n),i.contains(n,t)};r.attr=function(n,i){(n.ownerDocument||n)!=u&&nt(n);var r=t.attrHandle[i.toLowerCase()],f=r&&bt.call(t.attrHandle,i.toLowerCase())?r(n,i,!a):undefined;return f!==undefined?f:n.getAttribute(i)};r.error=function(n){throw new Error("Syntax error, unrecognized expression: "+n);};i.uniqueSort=function(n){var r,u=[],t=0,i=0;if(ot=!f.sortStable,ft=!f.sortStable&&v.call(n,0),le.call(n,wt),ot){while(r=n[i++])r===n[i]&&(t=u.push(i));while(t--)ae.call(n,u[t],1)}return ft=null,n};i.fn.uniqueSort=function(){return this.pushStack(i.uniqueSort(v.apply(this)))};t=i.expr={cacheLength:50,createPseudo:y,match:ht,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(n){return n[1]=n[1].replace(w,k),n[3]=(n[3]||n[4]||n[5]||"").replace(w,k),n[2]==="~="&&(n[3]=" "+n[3]+" "),n.slice(0,4)},CHILD:function(n){return n[1]=n[1].toLowerCase(),n[1].slice(0,3)==="nth"?(n[3]||r.error(n[0]),n[4]=+(n[4]?n[5]+(n[6]||1):2*(n[3]==="even"||n[3]==="odd")),n[5]=+(n[7]+n[8]||n[3]==="odd")):n[3]&&r.error(n[0]),n},PSEUDO:function(n){var i,t=!n[6]&&n[2];return ht.CHILD.test(n[0])?null:(n[3]?n[2]=n[4]||n[5]||"":t&&di.test(t)&&(i=lt(t,!0))&&(i=t.indexOf(")",t.length-i)-t.length)&&(n[0]=n[0].slice(0,i),n[2]=t.slice(0,i)),n.slice(0,3))}},filter:{TAG:function(n){var t=n.replace(w,k).toLowerCase();return n==="*"?function(){return!0}:function(n){return s(n,t)}},CLASS:function(n){var t=ui[n+" "];return t||(t=new RegExp("(^|"+o+")"+n+"("+o+"|$)"))&&ui(n,function(n){return t.test(typeof n.className=="string"&&n.className||typeof n.getAttribute!="undefined"&&n.getAttribute("class")||"")})},ATTR:function(n,t,i){return function(u){var f=r.attr(u,n);return f==null?t==="!=":t?(f+="",t==="=")?f===i:t==="!="?f!==i:t==="^="?i&&f.indexOf(i)===0:t==="*="?i&&f.indexOf(i)>-1:t==="$="?i&&f.slice(-i.length)===i:t==="~="?(" "+f.replace(wi," ")+" ").indexOf(i)>-1:t==="|="?f===i||f.slice(0,i.length+1)===i+"-":!1:!0}},CHILD:function(n,t,i,r,u){var h=n.slice(0,3)!=="nth",o=n.slice(-4)!=="last",f=t==="of-type";return r===1&&u===0?function(n){return!!n.parentNode}:function(t,i,c){var y,w,l,v,k,d=h!==o?"nextSibling":"previousSibling",b=t.parentNode,nt=f&&t.nodeName.toLowerCase(),g=!c&&!f,a=!1;if(b){if(h){while(d){for(l=t;l=l[d];)if(f?s(l,nt):l.nodeType===1)return!1;k=d=n==="only"&&!k&&"nextSibling"}return!0}if(k=[o?b.firstChild:b.lastChild],o&&g){for(w=b[e]||(b[e]={}),y=w[n]||[],v=y[0]===p&&y[1],a=v&&y[2],l=v&&b.childNodes[v];l=++v&&l&&l[d]||(a=v=0)||k.pop();)if(l.nodeType===1&&++a&&l===t){w[n]=[p,v,a];break}}else if(g&&(w=t[e]||(t[e]={}),y=w[n]||[],v=y[0]===p&&y[1],a=v),a===!1)while(l=++v&&l&&l[d]||(a=v=0)||k.pop())if((f?s(l,nt):l.nodeType===1)&&++a&&(g&&(w=l[e]||(l[e]={}),w[n]=[p,a]),l===t))break;return a-=u,a===r||a%r==0&&a/r>=0}}},PSEUDO:function(n,i){var f,u=t.pseudos[n]||t.setFilters[n.toLowerCase()]||r.error("unsupported pseudo: "+n);return u[e]?u(i):u.length>1?(f=[n,n,"",i],t.setFilters.hasOwnProperty(n.toLowerCase())?y(function(n,t){for(var r,f=u(n,i),e=f.length;e--;)r=d.call(n,f[e]),n[r]=!(t[r]=f[e])}):function(n){return u(n,0,f)}):u}},pseudos:{not:y(function(n){var t=[],r=[],i=ri(n.replace(kt,"$1"));return i[e]?y(function(n,t,r,u){for(var e,o=i(n,null,u,[]),f=n.length;f--;)(e=o[f])&&(n[f]=!(t[f]=e))}):function(n,u,f){return t[0]=n,i(t,null,f,r),t[0]=null,!r.pop()}}),has:y(function(n){return function(t){return r(n,t).length>0}}),contains:y(function(n){return n=n.replace(w,k),function(t){return(t.textContent||i.text(t)).indexOf(n)>-1}}),lang:y(function(n){return gi.test(n||"")||r.error("unsupported lang: "+n),n=n.replace(w,k).toLowerCase(),function(t){var i;do if(i=a?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return i=i.toLowerCase(),i===n||i.indexOf(n+"-")===0;while((t=t.parentNode)&&t.nodeType===1);return!1}}),target:function(t){var i=n.location&&n.location.hash;return i&&i.slice(1)===t.id},root:function(n){return n===g},focus:function(n){return n===fr()&&u.hasFocus()&&!!(n.type||n.href||~n.tabIndex)},enabled:ai(!1),disabled:ai(!0),checked:function(n){return s(n,"input")&&!!n.checked||s(n,"option")&&!!n.selected},selected:function(n){return n.parentNode&&n.parentNode.selectedIndex,n.selected===!0},empty:function(n){for(n=n.firstChild;n;n=n.nextSibling)if(n.nodeType<6)return!1;return!0},parent:function(n){return!t.pseudos.empty(n)},header:function(n){return tr.test(n.nodeName)}
18,input:function(n){return nr.test(n.nodeName)},button:function(n){return s(n,"input")&&n.type==="button"||s(n,"button")},text:function(n){var t;return s(n,"input")&&n.type==="text"&&((t=n.getAttribute("type"))==null||t.toLowerCase()==="text")},first:it(function(){return[0]}),last:it(function(n,t){return[t-1]}),eq:it(function(n,t,i){return[i<0?i+t:i]}),even:it(function(n,t){for(var i=0;i<t;i+=2)n.push(i);return n}),odd:it(function(n,t){for(var i=1;i<t;i+=2)n.push(i);return n}),lt:it(function(n,t,i){for(var r=i<0?i+t:i>t?t:i;--r>=0;)n.push(r);return n}),gt:it(function(n,t,i){for(var r=i<0?i+t:i;++r<t;)n.push(r);return n})}};t.pseudos.nth=t.pseudos.eq;for(rt in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})t.pseudos[rt]=er(rt);for(rt in{submit:!0,reset:!0})t.pseudos[rt]=or(rt);vi.prototype=t.filters=t.pseudos;t.setFilters=new vi;f.sortStable=e.split("").sort(wt).join("")===e;nt();f.sortDetached=ut(function(n){return n.compareDocumentPosition(u.createElement("fieldset"))&1});i.find=r;i.expr[":"]=i.expr.pseudos;i.unique=i.uniqueSort;r.compile=ri;r.select=yi;r.setDocument=nt;r.escape=i.escapeSelector;r.getText=i.text;r.isXML=i.isXMLDoc;r.selectors=i.expr;r.support=i.support;r.uniqueSort=i.uniqueSort}();var et=function(n,t,r){for(var u=[],f=r!==undefined;(n=n[t])&&n.nodeType!==9;)if(n.nodeType===1){if(f&&i(n).is(r))break;u.push(n)}return u},nu=function(n,t){for(var i=[];n;n=n.nextSibling)n.nodeType===1&&n!==t&&i.push(n);return i},tu=i.expr.match.needsContext,iu=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;i.filter=function(n,t,r){var u=t[0];return(r&&(n=":not("+n+")"),t.length===1&&u.nodeType===1)?i.find.matchesSelector(u,n)?[u]:[]:i.find.matches(n,i.grep(t,function(n){return n.nodeType===1}))};i.fn.extend({find:function(n){var t,r,u=this.length,f=this;if(typeof n!="string")return this.pushStack(i(n).filter(function(){for(t=0;t<u;t++)if(i.contains(f[t],this))return!0}));for(r=this.pushStack([]),t=0;t<u;t++)i.find(n,f[t],r);return u>1?i.uniqueSort(r):r},filter:function(n){return this.pushStack(wi(this,n||[],!1))},not:function(n){return this.pushStack(wi(this,n||[],!0))},is:function(n){return!!wi(this,typeof n=="string"&&tu.test(n)?i(n):n||[],!1).length}});uu=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;fu=i.fn.init=function(n,t,r){var f,o;if(!n)return this;if(r=r||ru,typeof n=="string"){if(f=n[0]==="<"&&n[n.length-1]===">"&&n.length>=3?[null,n,null]:uu.exec(n),f&&(f[1]||!t)){if(f[1]){if(t=t instanceof i?t[0]:t,i.merge(this,i.parseHTML(f[1],t&&t.nodeType?t.ownerDocument||t:u,!0)),iu.test(f[1])&&i.isPlainObject(t))for(f in t)e(this[f])?this[f](t[f]):this.attr(f,t[f]);return this}return o=u.getElementById(f[2]),o&&(this[0]=o,this.length=1),this}return!t||t.jquery?(t||r).find(n):this.constructor(t).find(n)}return n.nodeType?(this[0]=n,this.length=1,this):e(n)?r.ready!==undefined?r.ready(n):n(i):i.makeArray(n,this)};fu.prototype=i.fn;ru=i(u);eu=/^(?:parents|prev(?:Until|All))/;ou={children:!0,contents:!0,next:!0,prev:!0};i.fn.extend({has:function(n){var t=i(n,this),r=t.length;return this.filter(function(){for(var n=0;n<r;n++)if(i.contains(this,t[n]))return!0})},closest:function(n,t){var r,f=0,o=this.length,u=[],e=typeof n!="string"&&i(n);if(!tu.test(n))for(;f<o;f++)for(r=this[f];r&&r!==t;r=r.parentNode)if(r.nodeType<11&&(e?e.index(r)>-1:r.nodeType===1&&i.find.matchesSelector(r,n))){u.push(r);break}return this.pushStack(u.length>1?i.uniqueSort(u):u)},index:function(n){return n?typeof n=="string"?d.call(i(n),this[0]):d.call(this,n.jquery?n[0]:n):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(n,t){return this.pushStack(i.uniqueSort(i.merge(this.get(),i(n,t))))},addBack:function(n){return this.add(n==null?this.prevObject:this.prevObject.filter(n))}});i.each({parent:function(n){var t=n.parentNode;return t&&t.nodeType!==11?t:null},parents:function(n){return et(n,"parentNode")},parentsUntil:function(n,t,i){return et(n,"parentNode",i)},next:function(n){return su(n,"nextSibling")},prev:function(n){return su(n,"previousSibling")},nextAll:function(n){return et(n,"nextSibling")},prevAll:function(n){return et(n,"previousSibling")},nextUntil:function(n,t,i){return et(n,"nextSibling",i)},prevUntil:function(n,t,i){return et(n,"previousSibling",i)},siblings:function(n){return nu((n.parentNode||{}).firstChild,n)},children:function(n){return nu(n.firstChild)},contents:function(n){return n.contentDocument!=null&&yr(n.contentDocument)?n.contentDocument:(s(n,"template")&&(n=n.content||n),i.merge([],n.childNodes))}},function(n,t){i.fn[n]=function(r,u){var f=i.map(this,t,r);return n.slice(-5)!=="Until"&&(u=r),u&&typeof u=="string"&&(f=i.filter(u,f)),this.length>1&&(ou[n]||i.uniqueSort(f),eu.test(n)&&f.reverse()),this.pushStack(f)}});p=/[^\x20\t\r\n\f]+/g;
18i.Callbacks=function(n){n=typeof n=="string"?ye(n):i.extend({},n);var o,r,c,u,t=[],s=[],f=-1,l=function(){for(u=u||n.once,c=o=!0;s.length;f=-1)for(r=s.shift();++f<t.length;)t[f].apply(r[0],r[1])===!1&&n.stopOnFalse&&(f=t.length,r=!1);n.memory||(r=!1);o=!1;u&&(t=r?[]:"")},h={add:function(){return t&&(r&&!o&&(f=t.length-1,s.push(r)),function u(r){i.each(r,function(i,r){e(r)?n.unique&&h.has(r)||t.push(r):r&&r.length&&ft(r)!=="string"&&u(r)})}(arguments),r&&!o&&l()),this},remove:function(){return i.each(arguments,function(n,r){for(var u;(u=i.inArray(r,t,u))>-1;)t.splice(u,1),u<=f&&f--}),this},has:function(n){return n?i.inArray(n,t)>-1:t.length>0},empty:function(){return t&&(t=[]),this},disable:function(){return u=s=[],t=r="",this},disabled:function(){return!t},lock:function(){return u=s=[],r||o||(t=r=""),this},locked:function(){return!!u},fireWith:function(n,t){return u||(t=t||[],t=[n,t.slice?t.slice():t],s.push(t),o||l()),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!c}};return h};i.extend({Deferred:function(t){var u=[["notify","progress",i.Callbacks("memory"),i.Callbacks("memory"),2],["resolve","done",i.Callbacks("once memory"),i.Callbacks("once memory"),0,"resolved"],["reject","fail",i.Callbacks("once memory"),i.Callbacks("once memory"),1,"rejected"]],o="pending",f={state:function(){return o},always:function(){return r.done(arguments).fail(arguments),this},"catch":function(n){return f.then(null,n)},pipe:function(){var n=arguments;return i.Deferred(function(t){i.each(u,function(i,u){var f=e(n[u[4]])&&n[u[4]];r[u[1]](function(){var n=f&&f.apply(this,arguments);n&&e(n.promise)?n.promise().progress(t.notify).done(t.resolve).fail(t.reject):t[u[0]+"With"](this,f?[n]:arguments)})});n=null}).promise()},then:function(t,r,f){function s(t,r,u,f){return function(){var h=this,c=arguments,a=function(){var n,i;if(!(t<o)){if(n=u.apply(h,c),n===r.promise())throw new TypeError("Thenable self-resolution");i=n&&(typeof n=="object"||typeof n=="function")&&n.then;e(i)?f?i.call(n,s(o,r,ot,f),s(o,r,oi,f)):(o++,i.call(n,s(o,r,ot,f),s(o,r,oi,f),s(o,r,ot,r.notifyWith))):(u!==ot&&(h=undefined,c=[n]),(f||r.resolveWith)(h,c))}},l=f?a:function(){try{a()}catch(n){i.Deferred.exceptionHook&&i.Deferred.exceptionHook(n,l.error);t+1>=o&&(u!==oi&&(h=undefined,c=[n]),r.rejectWith(h,c))}};t?l():(i.Deferred.getErrorHook?l.error=i.Deferred.getErrorHook():i.Deferred.getStackHook&&(l.error=i.Deferred.getStackHook()),n.setTimeout(l))}}var o=0;return i.Deferred(function(n){u[0][3].add(s(0,n,e(f)?f:ot,n.notifyWith));u[1][3].add(s(0,n,e(t)?t:ot));u[2][3].add(s(0,n,e(r)?r:oi))}).promise()},promise:function(n){return n!=null?i.extend(n,f):f}},r={};return i.each(u,function(n,t){var i=t[2],e=t[5];f[t[1]]=i.add;e&&i.add(function(){o=e},u[3-n][2].disable,u[3-n][3].disable,u[0][2].lock,u[0][3].lock);i.add(t[3].fire);r[t[0]]=function(){return r[t[0]+"With"](this===r?undefined:this,arguments),this};r[t[0]+"With"]=i.fireWith}),f.promise(r),t&&t.call(r,r),r},when:function(n){var f=arguments.length,t=f,o=Array(t),u=v.call(arguments),r=i.Deferred(),s=function(n){return function(t){o[n]=this;u[n]=arguments.length>1?v.call(arguments):t;--f||r.resolveWith(o,u)}};if(f<=1&&(hu(n,r.done(s(t)).resolve,r.reject,!f),r.state()==="pending"||e(u[t]&&u[t].then)))return r.then();while(t--)hu(u[t],s(t),r.reject);return r.promise()}});cu=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;i.Deferred.exceptionHook=function(t,i){n.console&&n.console.warn&&t&&cu.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,i)};i.readyException=function(t){n.setTimeout(function(){throw t;})};si=i.Deferred();i.fn.ready=function(n){return si.then(n).catch(function(n){i.readyException(n)}),this};i.extend({isReady:!1,readyWait:1,ready:function(n){(n===!0?--i.readyWait:i.isReady)||(i.isReady=!0,n!==!0&&--i.readyWait>0)||si.resolveWith(u,[i])}});i.ready.then=si.then;u.readyState!=="complete"&&(u.readyState==="loading"||u.documentElement.doScroll)?(u.addEventListener("DOMContentLoaded",hi),n.addEventListener("load",hi)):n.setTimeout(i.ready);var g=function(n,t,r,u,f,o,s){var h=0,l=n.length,c=r==null;if(ft(r)==="object"){f=!0;for(h in r)g(n,t,h,r[h],!0,o,s)}else if(u!==undefined&&(f=!0,e(u)||(s=!0),c&&(s?(t.call(n,u),t=null):(c=t,t=function(n,t,r){return c.call(i(n),r)})),t))for(;h<l;h++)t(n[h],r,s?u:u.call(n[h],h,t(n[h],r)));return f?n:c?t.call(n):l?t(n[0],r):o},pe=/^-ms-/,we=/-([a-z])/g;st=function(n){return n.nodeType===1||n.nodeType===9||!+n.nodeType};dt.uid=1;dt.prototype={cache:function(n){var t=n[this.expando];return t||(t={},st(n)&&(n.nodeType?n[this.expando]=t:Object.defineProperty(n,this.expando,{value:t,configurable:!0}))),t},set:function(n,t,i){var r,u=this.cache(n);if(typeof t=="string")u[k(t)]=i;else for(r in t)u[k(r)]=t[r];return u},get:function(n,t){return t===undefined?this.cache(n):n[this.expando]&&n[this.expando][k(t)]},access:function(n,t,i){return t===undefined||t&&typeof t=="string"&&i===undefined?this.get(n,t):(this.set(n,t,i),i!==undefined?i:t)},remove:function(n,t){var u,r=n[this.expando];if(r!==undefined){if(t!==undefined)for(Array.isArray(t)?t=t.map(k):(t=k(t),t=t in r?[t]:t.match(p)||[]),u=t.length;u--;)delete r[t[u]];(t===undefined||i.isEmptyObject(r))&&(n.nodeType?n[this.expando]=undefined:delete n[this.expando])}},hasData:function(n){var t=n[this.expando];return t!==undefined&&!i.isEmptyObject(t)}};var r=new dt,c=new dt,ke=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,de=/[A-Z]/g;i.extend({hasData:function(n){return c.hasData(n)||r.hasData(n)},data:function(n,t,i){return c.access(n,t,i)},removeData:function(n,t){c.remove(n,t)},_data:function(n,t,i){return r.access(n,t,i)},_removeData:function(n,t){r.remove(n,t)}});i.fn.extend({data:function(n,t){var f,u,e,i=this[0],o=i&&i.attributes;if(n===undefined){if(this.length&&(e=c.get(i),i.nodeType===1&&!r.get(i,"hasDataAttrs"))){for(f=o.length;f--;)o[f]&&(u=o[f].name,u.indexOf("data-")===0&&(u=k(u.slice(5)),lu(i,u,e[u]))
18);r.set(i,"hasDataAttrs",!0)}return e}return typeof n=="object"?this.each(function(){c.set(this,n)}):g(this,function(t){var r;if(i&&t===undefined)return(r=c.get(i,n),r!==undefined)?r:(r=lu(i,n),r!==undefined)?r:void 0;this.each(function(){c.set(this,n,t)})},null,t,arguments.length>1,null,!0)},removeData:function(n){return this.each(function(){c.remove(this,n)})}});i.extend({queue:function(n,t,u){var f;if(n)return t=(t||"fx")+"queue",f=r.get(n,t),u&&(!f||Array.isArray(u)?f=r.access(n,t,i.makeArray(u)):f.push(u)),f||[]},dequeue:function(n,t){t=t||"fx";var r=i.queue(n,t),e=r.length,u=r.shift(),f=i._queueHooks(n,t),o=function(){i.dequeue(n,t)};u==="inprogress"&&(u=r.shift(),e--);u&&(t==="fx"&&r.unshift("inprogress"),delete f.stop,u.call(n,o,f));!e&&f&&f.empty.fire()},_queueHooks:function(n,t){var u=t+"queueHooks";return r.get(n,u)||r.access(n,u,{empty:i.Callbacks("once memory").add(function(){r.remove(n,[t+"queue",u])})})}});i.fn.extend({queue:function(n,t){var r=2;return(typeof n!="string"&&(t=n,n="fx",r--),arguments.length<r)?i.queue(this[0],n):t===undefined?this:this.each(function(){var r=i.queue(this,n,t);i._queueHooks(this,n);n==="fx"&&r[0]!=="inprogress"&&i.dequeue(this,n)})},dequeue:function(n){return this.each(function(){i.dequeue(this,n)})},clearQueue:function(n){return this.queue(n||"fx",[])},promise:function(n,t){var u,e=1,o=i.Deferred(),f=this,s=this.length,h=function(){--e||o.resolveWith(f,[f])};for(typeof n!="string"&&(t=n,n=undefined),n=n||"fx";s--;)u=r.get(f[s],n+"queueHooks"),u&&u.empty&&(e++,u.empty.add(h));return h(),o.promise(t)}});var au=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,gt=new RegExp("^(?:([+-])=|)("+au+")([a-z%]*)$","i"),nt=["Top","Right","Bottom","Left"],tt=u.documentElement,ht=function(n){return i.contains(n.ownerDocument,n)},no={composed:!0};tt.getRootNode&&(ht=function(n){return i.contains(n.ownerDocument,n)||n.getRootNode(no)===n.ownerDocument});ni=function(n,t){return n=t||n,n.style.display==="none"||n.style.display===""&&ht(n)&&i.css(n,"display")==="none"};bi={};i.fn.extend({show:function(){return ct(this,!0)},hide:function(){return ct(this)},toggle:function(n){return typeof n=="boolean"?n?this.show():this.hide():this.each(function(){ni(this)?i(this).show():i(this).hide()})}});var ti=/^(?:checkbox|radio)$/i,yu=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,pu=/^$|^module$|\/(?:java|ecma)script/i;(function(){var i=u.createDocumentFragment(),n=i.appendChild(u.createElement("div")),t=u.createElement("input");t.setAttribute("type","radio");t.setAttribute("checked","checked");t.setAttribute("name","t");n.appendChild(t);f.checkClone=n.cloneNode(!0).cloneNode(!0).lastChild.checked;n.innerHTML="<textarea>x<\/textarea>";f.noCloneChecked=!!n.cloneNode(!0).lastChild.defaultValue;n.innerHTML="<option><\/option>";f.option=!!n.lastChild})();y={thead:[1,"<table>","<\/table>"],col:[2,"<table><colgroup>","<\/colgroup><\/table>"],tr:[2,"<table><tbody>","<\/tbody><\/table>"],td:[3,"<table><tbody><tr>","<\/tr><\/tbody><\/table>"],_default:[0,"",""]};y.tbody=y.tfoot=y.colgroup=y.caption=y.thead;y.th=y.td;f.option||(y.optgroup=y.option=[1,"<select multiple='multiple'>","<\/select>"]);wu=/<|&#?\w+;/;di=/^([^.]*)(?:\.(.+)|)/;i.event={global:{},add:function(n,t,u,f,e){var l,a,w,v,b,h,s,c,o,k,d,y=r.get(n);if(st(n))for(u.handler&&(l=u,u=l.handler,e=l.selector),e&&i.find.matchesSelector(tt,e),u.guid||(u.guid=i.guid++),(v=y.events)||(v=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(t){return typeof i!="undefined"&&i.event.triggered!==t.type?i.event.dispatch.apply(n,arguments):undefined}),t=(t||"").match(p)||[""],b=t.length;b--;)(w=di.exec(t[b])||[],o=d=w[1],k=(w[2]||"").split(".").sort(),o)&&(s=i.event.special[o]||{},o=(e?s.delegateType:s.bindType)||o,s=i.event.special[o]||{},h=i.extend({type:o,origType:d,data:f,handler:u,guid:u.guid,selector:e,needsContext:e&&i.expr.match.needsContext.test(e),namespace:k.join(".")},l),(c=v[o])||(c=v[o]=[],c.delegateCount=0,s.setup&&s.setup.call(n,f,k,a)!==!1||n.addEventListener&&n.addEventListener(o,a)),s.add&&(s.add.call(n,h),h.handler.guid||(h.handler.guid=u.guid
vendor: 1,311 bytes, line 18
18)),e?c.splice(c.delegateCount++,0,h):c.push(h),i.event.global[o]=!0)},remove:function(n,t,u,f,e){var v,k,h,a,y,s,c,l,o,b,d,w=r.hasData(n)&&r.get(n);if(w&&(a=w.events)){for(t=(t||"").match(p)||[""],y=t.length;y--;){if(h=di.exec(t[y])||[],o=d=h[1],b=(h[2]||"").split(".").sort(),!o){for(o in a)i.event.remove(n,o+t[y],u,f,!0);continue}for(c=i.event.special[o]||{},o=(f?c.delegateType:c.bindType)||o,l=a[o]||[],h=h[2]&&new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"),k=v=l.length;v--;)s=l[v],(e||d===s.origType)&&(!u||u.guid===s.guid)&&(!h||h.test(s.namespace))&&(!f||f===s.selector||f==="**"&&s.selector)&&(l.splice(v,1),s.selector&&l.delegateCount--,c.remove&&c.remove.call(n,s));k&&!l.length&&(c.teardown&&c.teardown.call(n,b,w.handle)!==!1||i.removeEvent(n,o,w.handle),delete a[o])}i.isEmptyObject(a)&&r.remove(n,"handle events")}},dispatch:function(n){var u,c,s,e,f,l,h=new Array(arguments.length),t=i.event.fix(n),a=(r.get(this,"events")||Object.create(null))[t.type]||[],o=i.event.special[t.type]||{};for(h[0]=t,u=1;u<arguments.length;u++)h[u]=arguments[u];if(t.delegateTarget=this,!o.preDispatch||o.preDispatch.call(this,t)!==!1){for(l=i.event.handlers.call(this,t,a),u=0;(e=l[u++])&&!t.isPropagationStopped();)for(t.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!t.isImmediatePropagationStopped();
18)(!t.rnamespace||f.namespace===!1||t.rnamespace.test(f.namespace))&&(t.handleObj=f,t.data=f.data,s=((i.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),s!==undefined&&(t.result=s)===!1&&(t.preventDefault(),t.stopPropagation()));return o.postDispatch&&o.postDispatch.call(this,t),t.result}},handlers:function(n,t){var f,e,u,o,s,c=[],h=t.delegateCount,r=n.target;if(h&&r.nodeType&&!(n.type==="click"&&n.button>=1))for(;r!==this;r=r.parentNode||this)if(r.nodeType===1&&!(n.type==="click"&&r.disabled===!0)){for(o=[],s={},f=0;f<h;f++)e=t[f],u=e.selector+" ",s[u]===undefined&&(s[u]=e.needsContext?i(u,this).index(r)>-1:i.find(u,this,null,[r]).length),s[u]&&o.push(e);o.length&&c.push({elem:r,handlers:o})}return r=this,h<t.length&&c.push({elem:r,handlers:t.slice(h)}),c},addProp:function(n,t){Object.defineProperty(i.Event.prototype,n,{enumerable:!0,configurable:!0,get:e(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[n]},set:function(t){Object.defineProperty(this,n,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(n){return n[i.expando]?n:new i.Event(n)},special:{load:{noBubble:!0},click:{setup:function(n){var t=this||n;return ti.test(t.type)&&t.click&&s(t,"input")&&ci(t,"click",!0),!1},trigger:function(n){var t=this||n;return ti.test(t.type)&&t.click&&s(t,"input")&&ci(t,"click"),!0},_default:function(n){var t=n.target;return ti.test(t.type)&&t.click&&s(t,"input")&&r.get(t,"click")||s(t,"a")}},beforeunload:{postDispatch:function(n){n.result!==undefined&&n.originalEvent&&(n.originalEvent.returnValue=n.result)}}}};i.removeEvent=function(n,t,i){n.removeEventListener&&n.removeEventListener(t,i)};i.Event=function(n,t){if(!(this instanceof i.Event))return new i.Event(n,t);n&&n.type?(this.originalEvent=n,this.type=n.type,this.isDefaultPrevented=n.defaultPrevented||n.defaultPrevented===undefined&&n.returnValue===!1?lt:at,this.target=n.target&&n.target.nodeType===3?n.target.parentNode:n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget):this.type=n;t&&i.extend(this,t);this.timeStamp=n&&n.timeStamp||Date.now();this[i.expando]=!0};i.Event.prototype={constructor:i.Event,isDefaultPrevented:at,isPropagationStopped:at,isImmediatePropagationStopped:at,isSimulated:!1,preventDefault:function(){var n=this.originalEvent;this.isDefaultPrevented=lt;n&&!this.isSimulated&&n.preventDefault()},stopPropagation:function(){var n=this.originalEvent;this.isPropagationStopped=lt;n&&!this.isSimulated&&n.stopPropagation()},stopImmediatePropagation:function(){var n=this.originalEvent;this.isImmediatePropagationStopped=lt;n&&!this.isSimulated&&n.stopImmediatePropagation();this.stopPropagation()}};i.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},i.event.addProp);i.each({focus:"focusin",blur:"focusout"},function(n,t){function f(n){if(u.documentMode){var e=r.get(this,"handle"),f=i.event.fix(n);f.type=n.type==="focusin"?"focus":"blur";f.isSimulated=!0;e(n);f.target===f.currentTarget&&e(f)}else i.event.simulate(t,n.target,i.event.fix(n))}i.event.special[n]={setup:function(){var i;if(ci(this,n,!0),u.documentMode)i=r.get(this,t),i||this.addEventListener(t,f),r.set(this,t,(i||0)+1);else return!1},trigger:function(){return ci(this,n),!0},teardown:function(){var n;if(u.documentMode)n=r.get(this,t)-1,n?r.set(this,t,n):(this.removeEventListener(t,f),r.remove(this,t));else return!1},_default:function(t){return r.get(t.target,n)},delegateType:t};i.event.special[t]={setup:function(){var i=this.ownerDocument||this.document||this,e=u.documentMode?this:i,o=r.get(e,t);o||(u.documentMode?this.addEventListener(t,f):i.addEventListener(n,f,!0));r.set(e,t,(o||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,i=u.documentMode?this:e,o=r.get(i,t)-1;o?r.set(i,t,o):(u.documentMode?this.removeEventListener(t,f):e.removeEventListener(n,f,!0),r.remove(i,t))}}});
18i.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(n,t){i.event.special[n]={delegateType:t,bindType:t,handle:function(n){var u,f=this,r=n.relatedTarget,e=n.handleObj;return r&&(r===f||i.contains(f,r))||(n.type=e.origType,u=e.handler.apply(this,arguments),n.type=t),u}}});i.fn.extend({on:function(n,t,i,r){return gi(this,n,t,i,r)},one:function(n,t,i,r){return gi(this,n,t,i,r,1)},off:function(n,t,r){var u,f;if(n&&n.preventDefault&&n.handleObj)return u=n.handleObj,i(n.delegateTarget).off(u.namespace?u.origType+"."+u.namespace:u.origType,u.selector,u.handler),this;if(typeof n=="object"){for(f in n)this.off(f,t,n[f]);return this}return(t===!1||typeof t=="function")&&(r=t,t=undefined),r===!1&&(r=at),this.each(function(){i.event.remove(this,n,r,t)})}});var io=/<script|<style|<link/i,ro=/checked\s*(?:[^=]|=\s*.checked.)/i,uo=/^\s*<!\[CDATA\[|\]\]>\s*$/g;i.extend({htmlPrefilter:function(n){return n},clone:function(n,t,r){var u,h,o,e,s=n.cloneNode(!0),c=ht(n);if(!f.noCloneChecked&&(n.nodeType===1||n.nodeType===11)&&!i.isXMLDoc(n))for(e=l(s),o=l(n),u=0,h=o.length;u<h;u++)oo(o[u],e[u]);if(t)if(r)for(o=o||l(n),e=e||l(s),u=0,h=o.length;u<h;u++)du(o[u],e[u]);else du(n,s);return e=l(s,"script"),e.length>0&&ki(e,!c&&l(n,"script")),s},cleanData:function(n){for(var u,t,f,o=i.event.special,e=0;(t=n[e])!==undefined;e++)if(st(t)){if(u=t[r.expando]){if(u.events)for(f in u.events)o[f]?i.event.remove(t,f):i.removeEvent(t,f,u.handle);t[r.expando]=undefined}t[c.expando]&&(t[c.expando]=undefined)}}});i.fn.extend({detach:function(n){return gu(this,n,!0)},remove:function(n){return gu(this,n)},text:function(n){return g(this,function(n){return n===undefined?i.text(this):this.empty().each(function(){(this.nodeType===1||this.nodeType===11||this.nodeType===9)&&(this.textContent=n)})},null,n,arguments.length)},append:function(){return vt(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=ku(this,n);t.appendChild(n)}})},prepend:function(){return vt(this,arguments,function(n){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var t=ku(this,n);t.insertBefore(n,t.firstChild)}})},before:function(){return vt(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this)})},after:function(){return vt(this,arguments,function(n){this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling)})},empty:function(){for(var n,t=0;(n=this[t])!=null;t++)n.nodeType===1&&(i.cleanData(l(n,!1)),n.textContent="");return this},clone:function(n,t){return n=n==null?!1:n,t=t==null?n:t,this.map(function(){return i.clone(this,n,t)})},html:function(n){return g(this,function(n){var t=this[0]||{},r=0,u=this.length;if(n===undefined&&t.nodeType===1)return t.innerHTML;if(typeof n=="string"&&!io.test(n)&&!y[(yu.exec(n)||["",""])[1].toLowerCase()]){n=i.htmlPrefilter(n);try{for(;r<u;r++)t=this[r]||{},t.nodeType===1&&(i.cleanData(l(t,!1)),t.innerHTML=n);t=0}catch(f){}}t&&this.empty().append(n)},null,n,arguments.length)},replaceWith:function(){var n=[];return vt(this,arguments,function(t){var r=this.parentNode;i.inArray(this,n)<0&&(i.cleanData(l(this)),r&&r.replaceChild(t,this))},n)}});i.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(n,t){i.fn[n]=function(n){for(var u,f=[],e=i(n),o=e.length-1,r=0;r<=o;r++)u=r===o?this:this.clone(!0),i(e[r])[t](u),ui.apply(f,u.get());return this.pushStack(f)}});var nr=new RegExp("^("+au+")(?!px)[a-z%]+$","i"),tr=/^--/,li=function(t){var i=t.ownerDocument.defaultView;return i&&i.opener||(i=n),i.getComputedStyle(t)},nf=function(n,t,i){var u,r,f={};for(r in t)f[r]=n.style[r],n.style[r]=t[r];u=i.call(n);for(r in t)n.style[r]=f[r];return u},so=new RegExp(nt.join("|"),"i");(function(){function r(){if(t){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";t.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";tt.appendChild(s).appendChild(t);var i=n.getComputedStyle(t);h=i.top!=="1%";v=e(i.marginLeft)===12;t.style.right="60%";a=e(i.right)===36;c=e(i.width)===36;t.style.position="absolute";l=e(t.offsetWidth/3)===12;tt.removeChild(s);t=null}}function e(n){return Math.round(parseFloat(n))}var h,c,l,a,o,v,s=u.createElement("div"),t=u.createElement("div");t.style&&(t.style.backgroundClip="content-box",t.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle=t.style.backgroundClip==="content-box",i.extend(f,{boxSizingReliable:function(){return r(),c},pixelBoxStyles:function(){return r(),a},pixelPosition:function(){return r(),h},reliableMarginLeft:function(){return r(),v},scrollboxSize:function(){return r(),l},reliableTrDimensions:function(){var i,t,r,f;return o==null&&(i=u.createElement("table"),t=u.createElement("tr"),r=u.createElement("div"),i.style.cssText="position:absolute;
18left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",tt.appendChild(i).appendChild(t).appendChild(r),f=n.getComputedStyle(t),o=parseInt(f.height,10)+parseInt(f.borderTopWidth,10)+parseInt(f.borderBottomWidth,10)===t.offsetHeight,tt.removeChild(i)),o}}))})();var rf=["Webkit","Moz","ms"],uf=u.createElement("div").style,ff={};var co=/^(none|table(?!-c[ea]).+)/,lo={position:"absolute",visibility:"hidden",display:"block"},ef={letterSpacing:"0",fontWeight:"400"};i.extend({cssHooks:{opacity:{get:function(n,t){if(t){var i=ii(n,"opacity");return i===""?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(n,t,r,u){if(n&&n.nodeType!==3&&n.nodeType!==8&&n.style){var e,s,o,c=k(t),l=tr.test(t),h=n.style;if(l||(t=ir(c)),o=i.cssHooks[t]||i.cssHooks[c],r!==undefined){if(s=typeof r,s==="str
18ing"&&(e=gt.exec(r))&&e[1]&&(r=vu(n,t,e),s="number"),r==null||r!==r)return;s!=="number"||l||(r+=e&&e[3]||(i.cssNumber[c]?"":"px"));f.clearCloneStyle||r!==""||t.indexOf("background")!==0||(h[t]="inherit");o&&"set"in o&&(r=o.set(n,r,u))===undefined||(l?h.setProperty(t,r):h[t]=r)}else return o&&"get"in o&&(e=o.get(n,!1,u))!==undefined?e:h[t]}},css:function(n,t,r,u){var f,o,e,s=k(t),h=tr.test(t);return(h||(t=ir(s)),e=i.cssHooks[t]||i.cssHooks[s],e&&"get"in e&&(f=e.get(n,!0,r)),f===undefined&&(f=ii(n,t,u)),f==="normal"&&t in ef&&(f=ef[t]),r===""||r)?(o=parseFloat(f),r===!0||isFinite(o)?o||0:f):f}});i.each(["height","width"],function(n,t){i.cssHooks[t]={get:function(n,r,u){if(r)return co.test(i.css(n,"display"))&&(!n.getClientRects().length||!n.getBoundingClientRect().width)?nf(n,lo,function(){return hf(n,t,u)}):hf(n,t,u)},set:function(n,r,u){var s,e=li(n),h=!f.scrollboxSize()&&e.position==="absolute",l=h||u,c=l&&i.css(n,"boxSizing",!1,e)==="border-box",o=u?rr(n,t,u,c,e):0;return c&&h&&(o-=Math.ceil(n["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(e[t])-rr(n,t,"border",!1,e)-.5)),o&&(s=gt.exec(r))&&(s[3]||"px")!=="px"&&(n.style[t]=r,r=i.css(n,t)),sf(n,r,o)}}});i.cssHooks.marginLeft=tf(f.reliableMarginLeft,function(n,t){if(t)return(parseFloat(ii(n,"marginLeft"))||n.getBoundingClientRect().left-nf(n,{marginLeft:0},function(){return n.getBoundingClientRect().left}))+"px"});i.each({margin:"",padding:"",border:"Width"},function(n,t){i.cssHooks[n+t]={expand:function(i){for(var r=0,f={},u=typeof i=="string"?i.split(" "):[i];r<4;r++)f[n+nt[r]+t]=u[r]||u[r-2]||u[0];return f}};n!=="margin"&&(i.cssHooks[n+t].set=sf)});i.fn.extend({css:function(n,t){return g(this,function(n,t,r){var f,e,o={},u=0;if(Array.isArray(t)){for(f=li(n),e=t.length;u<e;u++)o[t[u]]=i.css(n,t[u],!1,f);return o}return r!==undefined?i.style(n,t,r):i.css(n,t)},n,t,arguments.length>1)}});i.Tween=a;a.prototype={constructor:a,init:function(n,t,r,u,f,e){this.elem=n;this.prop=r;this.easing=f||i.easing._default;this.options=t;this.start=this.now=this.cur();this.end=u;this.unit=e||(i.cssNumber[r]?"":"px")},cur:function(){var n=a.propHooks[this.prop];return n&&n.get?n.get(this):a.propHooks._default.get(this)},run:function(n){var t,r=a.propHooks[this.prop];return this.pos=this.options.duration?t=i.easing[this.easing](n,this.options.duration*n,0,1,this.options.duration):t=n,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),r&&r.set?r.set(this):a.propHooks._default.set(this),this}};a.prototype.init.prototype=a.prototype;a.propHooks={_default:{get:function(n){var t;return n.elem.nodeType!==1||n.elem[n.prop]!=null&&n.elem.style[n.prop]==null?n.elem[n.prop]:(t=i.css(n.elem,n.prop,""),!t||t==="auto"?0:t)},set:function(n){i.fx.step[n.prop]?i.fx.step[n.prop](n):n.elem.nodeType===1&&(i.cssHooks[n.prop]||n.elem.style[ir(n.prop)]!=null)?i.style(n.elem,n.prop,n.now+n.unit):n.elem[n.prop]=n.now}}};a.propHooks.scrollTop=a.propHooks.scrollLeft={set:function(n){n.elem.nodeType&&n.elem.parentNode&&(n.elem[n.prop]=n.now)}};i.easing={linear:function(n){return n},swing:function(n){return.5-Math.cos(n*Math.PI)/2},_default:"swing"};i.fx=a.prototype.init;i.fx.step={};cf=/^(?:toggle|show|hide)$/;lf=/queueHooks$/;i.Animation=i.extend(w,{tweeners:{"*":[function(n,t){var i=this.createTween(n,t);return vu(i.elem,n,gt.exec(t),i),i}]},tweener:function(n,t){e(n)?(t=n,n=["*"]):n=n.match(p);for(var i,r=0,u=n.length;r<u;r++)i=n[r],w.tweeners[i]=w.tweeners[i]||[],w.tweeners[i].unshift(t)},prefilters:[ao],prefilter:function(n,t){t?w.prefilters.unshift(n):w.prefilters.push(n)}});i.speed=function(n,t,r){var u=n&&typeof n=="object"?i.extend({},n):{complete:r||!r&&t||e(n)&&n,duration:n,easing:r&&t||t&&!e(t)&&t};return i.fx.off?u.duration=0:typeof u.duration!="number"&&(u.duration=u.duration in i.fx.speeds?i.fx.speeds[u.duration]:i.fx.speeds._default),(u.queue==null||u.queue===!0)&&(u.queue="fx"),u.old=u.complete,u.complete=function(){e(u.old)&&u.old.call(this);u.queue&&i.dequeue(this,u.queue)},u};i.fn.extend({fadeTo:function(n,t,i,r){return this.filter(ni).css("opacity",0).show().end().animate({opacity:t},n,i,r)},animate:function(n,t,u,f){var s=i.isEmptyObject(n),o=i.speed(t,u,f),e=function(){var t=w(this,i.extend({},n),o);(s||r.get(this,"finish"))&&t.stop(!0)};return e.finish=e,s||o.queue===!1?this.each(e):this.queue(o.queue,e)},stop:function(n,t,u){var f=function(n){var t=n.stop;delete n.stop;t(u)};
18return typeof n!="string"&&(u=t,t=n,n=undefined),t&&this.queue(n||"fx",[]),this.each(function(){var s=!0,t=n!=null&&n+"queueHooks",o=i.timers,e=r.get(this);if(t)e[t]&&e[t].stop&&f(e[t]);else for(t in e)e[t]&&e[t].stop&&lf.test(t)&&f(e[t]);for(t=o.length;t--;)o[t].elem===this&&(n==null||o[t].queue===n)&&(o[t].anim.stop(u),s=!1,o.splice(t,1));(s||!u)&&i.dequeue(this,n)})},finish:function(n){return n!==!1&&(n=n||"fx"),this.each(function(){var t,e=r.get(this),u=e[n+"queue"],o=e[n+"queueHooks"],f=i.timers,s=u?u.length:0;for(e.finish=!0,i.queue(this,n,[]),o&&o.stop&&o.stop.call(this,!0),t=f.length;t--;)f[t].elem===this&&f[t].queue===n&&(f[t].anim.stop(!0),f.splice(t,1));for(t=0;t<s;t++)u[t]&&u[t].finish&&u[t].finish.call(this);delete e.finish})}});i.each(["toggle","show","hide"],function(n,t){var r=i.fn[t];i.fn[t]=function(n,i,u){return n==null||typeof n=="boolean"?r.apply(this,arguments):this.animate(vi(t,!0),n,i,u)}});i.each({slideDown:vi("show"),slideUp:vi("hide"),slideToggle:vi("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(n,t){i.fn[n]=function(n,i,r){return this.animate(t,n,i,r)}});i.timers=[];i.fx.tick=function(){var r,n=0,t=i.timers;for(yt=Date.now();n<t.length;n++)r=t[n],r()||t[n]!==r||t.splice(n--,1);t.length||i.fx.stop();yt=undefined};i.fx.timer=function(n){i.timers.push(n);i.fx.start()};i.fx.interval=13;i.fx.start=function(){ai||(ai=!0,ur())};i.fx.stop=function(){ai=null};i.fx.speeds={slow:600,fast:200,_default:400};i.fn.delay=function(t,r){return t=i.fx?i.fx.speeds[t]||t:t,r=r||"fx",this.queue(r,function(i,r){var u=n.setTimeout(i,t);r.stop=function(){n.clearTimeout(u)}})},function(){var n=u.createElement("input"),t=u.createElement("select"),i=t.appendChild(u.createElement("option"));n.type="checkbox";f.checkOn=n.value!=="";f.optSelected=i.selected;n=u.createElement("input");n.value="t";n.type="radio";f.radioValue=n.value==="t"}();pt=i.expr.attrHandle;i.fn.extend({attr:function(n,t){return g(this,i.attr,n,t,arguments.length>1)},removeAttr:function(n){return this.each(function(){i.removeAttr(this,n)})}});i.extend({attr:function(n,t,r){var u,f,e=n.nodeType;if(e!==3&&e!==8&&e!==2){if(typeof n.getAttribute=="undefined")return i.prop(n,t,r);if(e===1&&i.isXMLDoc(n)||(f=i.attrHooks[t.toLowerCase()]||(i.expr.match.bool.test(t)?yf:undefined)),r!==undefined){if(r===null){i.removeAttr(n,t);return}return f&&"set"in f&&(u=f.set(n,r,t))!==undefined?u:(n.setAttribute(t,r+""),r)}return f&&"get"in f&&(u=f.get(n,t))!==null?u:(u=i.find.attr(n,t),u==null?undefined:u)}},attrHooks:{type:{set:function(n,t){if(!f.radioValue&&t==="radio"&&s(n,"input")){var i=n.value;return n.setAttribute("type",t),i&&(n.value=i),t}}}},removeAttr:function(n,t){var i,u=0,r=t&&t.match(p);if(r&&n.nodeType===1)while(i=r[u++])n.removeAttribute(i)}});yf={set:function(n,t,r){return t===!1?i.removeAttr(n,r):n.setAttribute(r,r),r}};i.each(i.expr.match.bool.source.match(/\w+/g),function(n,t){var r=pt[t]||i.find.attr;pt[t]=function(n,t,i){var f,e,u=t.toLowerCase();return i||(e=pt[u],pt[u]=f,f=r(n,t,i)!=null?u:null,pt[u]=e),f}});pf=/^(?:input|select|textarea|button)$/i;wf=/^(?:a|area)$/i;i.fn.extend({prop:function(n,t){return g(this,i.prop,n,t,arguments.length>1)},removeProp:function(n){return this.each(function(){delete this[i.propFix[n]||n]})}});i.extend({prop:function(n,t,r){var f,u,e=n.nodeType;if(e!==3&&e!==8&&e!==2)return(e===1&&i.isXMLDoc(n)||(t=i.propFix[t]||t,u=i.propHooks[t]),r!==undefined)?u&&"set"in u&&(f=u.set(n,r,t))!==undefined?f:n[t]=r:u&&"get"in u&&(f=u.get(n,t))!==null?f:n[t]},propHooks:{tabIndex:{get:function(n){var t=i.find.attr(n,"tabindex");return t?parseInt(t,10):pf.test(n.nodeName)||wf.test(n.nodeName)&&n.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}});f.optSelected||(i.propHooks.selected={get:function(n){var t=n.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(n){var t=n.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}});i.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){i.propFix[this.toLowerCase()]=this});i.fn.extend({addClass:function(n){var r,t,f,o,u,s;return e(n)?this.each(function(t){i(this).addClass(n.call(this,t,rt(this)))}):(r=fr(n),r.length)?this.each(function(){if(f=rt(this),t=this.nodeType===1&&" "+it(f)+" ",t){for(u=0;
18u<r.length;u++)o=r[u],t.indexOf(" "+o+" ")<0&&(t+=o+" ");s=it(t);f!==s&&this.setAttribute("class",s)}}):this},removeClass:function(n){var r,t,f,o,u,s;return e(n)?this.each(function(t){i(this).removeClass(n.call(this,t,rt(this)))}):arguments.length?(r=fr(n),r.length)?this.each(function(){if(f=rt(this),t=this.nodeType===1&&" "+it(f)+" ",t){for(u=0;u<r.length;u++)for(o=r[u];t.indexOf(" "+o+" ")>-1;)t=t.replace(" "+o+" "," ");s=it(t);f!==s&&this.setAttribute("class",s)}}):this:this.attr("class","")},toggleClass:function(n,t){var s,u,f,o,h=typeof n,c=h==="string"||Array.isArray(n);return e(n)?this.each(function(r){i(this).toggleClass(n.call(this,r,rt(this),t),t)}):typeof t=="boolean"&&c?t?this.addClass(n):this.removeClass(n):(s=fr(n),this.each(function(){if(c)for(o=i(this),f=0;f<s.length;f++)u=s[f],o.hasClass(u)?o.removeClass(u):o.addClass(u);else(n===undefined||h==="boolean")&&(u=rt(this),u&&r.set(this,"__className__",u),this.setAttribute&&this.setAttribute("class",u||n===!1?"":r.get(this,"__className__")||""))}))},hasClass:function(n){for(var t,r=0,i=" "+n+" ";t=this[r++];)if(t.nodeType===1&&(" "+it(rt(t))+" ").indexOf(i)>-1)return!0;return!1}});bf=/\r/g;i.fn.extend({val:function(n){var t,r,f,u=this[0];return arguments.length?(f=e(n),this.each(function(r){var u;this.nodeType===1&&(u=f?n.call(this,r,i(this).val()):n,u==null?u="":typeof u=="number"?u+="":Array.isArray(u)&&(u=i.map(u,function(n){return n==null?"":n+""})),t=i.valHooks[this.type]||i.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&t.set(this,u,"value")!==undefined||(this.value=u))})):u?(t=i.valHooks[u.type]||i.valHooks[u.nodeName.toLowerCase()],t&&"get"in t&&(r=t.get(u,"value"))!==undefined)?r:(r=u.value,typeof r=="string")?r.replace(bf,""):r==null?"":r:void 0}});i.extend({valHooks:{option:{get:function(n){var t=i.find.attr(n,"value");return t!=null?t:it(i.text(n))}},select:{get:function(n){for(var e,t,o=n.options,u=n.selectedIndex,f=n.type==="select-one",h=f?null:[],c=f?u+1:o.length,r=u<0?c:f?u:0;r<c;r++)if(t=o[r],(t.selected||r===u)&&!t.disabled&&(!t.parentNode.disabled||!s(t.parentNode,"optgroup"))){if(e=i(t).val(),f)return e;h.push(e)}return h},set:function(n,t){for(var u,r,f=n.options,e=i.makeArray(t),o=f.length;o--;)r=f[o],(r.selected=i.inArray(i.valHooks.option.get(r),e)>-1)&&(u=!0);return u||(n.selectedIndex=-1),e}}}});i.each(["radio","checkbox"],function(){i.valHooks[this]={set:function(n,t){if(Array.isArray(t))return n.checked=i.inArray(i(n).val(),t)>-1}};f.checkOn||(i.valHooks[this].get=function(n){return n.getAttribute("value")===null?"on":n.value})});var ri=n.location,kf={guid:Date.now()},er=/\?/;i.parseXML=function(t){var r,u;if(!t||typeof t!="string")return null;try{r=(new n.DOMParser).parseFromString(t,"text/xml")}catch(f){}return u=r&&r.getElementsByTagName("parsererror")[0],(!r||u)&&i.error("Invalid XML: "+(u?i.map(u.childNodes,function(n){return n.textContent}).join("\n"):t)),r};or=/^(?:focusinfocus|focusoutblur)$/;sr=function(n){n.stopPropagation()};i.extend(i.event,{trigger:function(t,f,o,s){var k,c,l,d,v,y,a,w,b=[o||u],h=bt.call(t,"type")?t.type:t,p=bt.call(t,"namespace")?t.namespace.split("."):[];if((c=w=l=o=o||u,o.nodeType!==3&&o.nodeType!==8)&&!or.test(h+i.event.triggered)&&(h.indexOf(".")>-1&&(p=h.split("."),h=p.shift(),p.sort()),v=h.indexOf(":")<0&&"on"+h,t=t[i.expando]?t:new i.Event(h,typeof t=="object"&&t),t.isTrigger=s?2:3,t.namespace=p.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=undefined,t.target||(t.target=o),f=f==null?[t]:i.makeArray(f,[t]),a=i.event.special[h]||{}
vendor: 5,494 bytes, line 18
18,s||!a.trigger||a.trigger.apply(o,f)!==!1)){if(!s&&!a.noBubble&&!ut(o)){for(d=a.delegateType||h,or.test(d+h)||(c=c.parentNode);c;c=c.parentNode)b.push(c),l=c;l===(o.ownerDocument||u)&&b.push(l.defaultView||l.parentWindow||n)}for(k=0;(c=b[k++])&&!t.isPropagationStopped();)w=c,t.type=k>1?d:a.bindType||h,y=(r.get(c,"events")||Object.create(null))[t.type]&&r.get(c,"handle"),y&&y.apply(c,f),y=v&&c[v],y&&y.apply&&st(c)&&(t.result=y.apply(c,f),t.result===!1&&t.preventDefault());return t.type=h,s||t.isDefaultPrevented()||(!a._default||a._default.apply(b.pop(),f)===!1)&&st(o)&&v&&e(o[h])&&!ut(o)&&(l=o[v],l&&(o[v]=null),i.event.triggered=h,t.isPropagationStopped()&&w.addEventListener(h,sr),o[h](),t.isPropagationStopped()&&w.removeEventListener(h,sr),i.event.triggered=undefined,l&&(o[v]=l)),t.result}},simulate:function(n,t,r){var u=i.extend(new i.Event,r,{type:n,isSimulated:!0});i.event.trigger(u,null,t)}});i.fn.extend({trigger:function(n,t){return this.each(function(){i.event.trigger(n,t,this)})},triggerHandler:function(n,t){var r=this[0];if(r)return i.event.trigger(n,t,r,!0)}});var yo=/\[\]$/,df=/\r?\n/g,po=/^(?:submit|button|image|reset|file)$/i,wo=/^(?:input|select|textarea|keygen)/i;i.param=function(n,t){var r,u=[],f=function(n,t){var i=e(t)?t():t;u[u.length]=encodeURIComponent(n)+"="+encodeURIComponent(i==null?"":i)};if(n==null)return"";if(Array.isArray(n)||n.jquery&&!i.isPlainObject(n))i.each(n,function(){f(this.name,this.value)});else for(r in n)hr(r,n[r],t,f);return u.join("&")};i.fn.extend({serialize:function(){return i.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var n=i.prop(this,"elements");return n?i.makeArray(n):this}).filter(function(){var n=this.type;return this.name&&!i(this).is(":disabled")&&wo.test(this.nodeName)&&!po.test(n)&&(this.checked||!ti.test(n))}).map(function(n,t){var r=i(this).val();return r==null?null:Array.isArray(r)?i.map(r,function(n){return{name:t.name,value:n.replace(df,"\r\n")}}):{name:t.name,value:r.replace(df,"\r\n")}}).get()}});var bo=/%20/g,ko=/#.*$/,go=/([?&])_=[^&]*/,ns=/^(.*?):[ \t]*([^\r\n]*)$/mg,ts=/^(?:GET|HEAD)$/,is=/^\/\//,gf={},cr={},ne="*/".concat("*"),lr=u.createElement("a");return lr.href=ri.href,i.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ri.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ri.protocol),global:!0,processData:!0,"async":!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ne,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":i.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(n,t){return t?ar(ar(n,i.ajaxSettings),t):ar(i.ajaxSettings,n)},ajaxPrefilter:te(gf),ajaxTransport:te(cr),ajax:function(t,r){function b(t,r,u,l){var y,rt,g,p,b,a=r;s||(s=!0,d&&n.clearTimeout(d),c=undefined,k=l||"",e.readyState=t>0?4:0,y=t>=200&&t<300||t===304,u&&(p=rs(f,e,u)),!y&&i.inArray("script",f.dataTypes)>-1&&i.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),p=us(f,p,e,y),y?(f.ifModified&&(b=e.getResponseHeader("Last-Modified"),b&&(i.lastModified[o]=b),b=e.getResponseHeader("etag"),b&&(i.etag[o]=b)),t===204||f.type==="HEAD"?a="nocontent":t===304?a="notmodified":(a=p.state,rt=p.data,g=p.error,y=!g)):(g=a,(t||!a)&&(a="error",t<0&&(t=0))),e.status=t,e.statusText=(r||a)+"",y?tt.resolveWith(h,[rt,a,e]):tt.rejectWith(h,[e,a,g]),e.statusCode(w),w=undefined,v&&nt.trigger(y?"ajaxSuccess":"ajaxError",[e,f,y?rt:g]),it.fireWith(h,[e,a]),v&&(nt.trigger("ajaxComplete",[e,f]),--i.active||i.event.trigger("ajaxStop")))}typeof t=="object"&&(r=t,t=undefined);r=r||{};var c,o,k,a,d,l,s,v,g,y,f=i.ajaxSetup({},r),h=f.context||f,nt=f.context&&(h.nodeType||h.jquery)?i(h):i.event,tt=i.Deferred(),it=i.Callbacks("once memory"),w=f.statusCode||{},rt={},ut={},ft="canceled",e={readyState:0,getResponseHeader:function(n){var t;if(s){if(!a)for(a={};t=ns.exec(k);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[n.toLowerCase()+" "]}return t==null?null:t.join(", ")},getAllResponseHeaders:function(){return s?k:null},setRequestHeader:function(n,t){return s==null&&(n=ut[n.toLowerCase()]=ut[n.toLowerCase()]||n,rt[n]=t),this},overrideMimeType:function(n){return s==null&&(f.mimeType=n),this},statusCode:function(n){var t;if(n)if(s)e.always(n[e.status]);else for(t in n)w[t]=[w[t],n[t]];return this},abort:function(n){var t=n||ft;return c&&c.abort(t),b(0,t),this}};if(tt.promise(e),f.url=((t||f.url||ri.href)+"").replace(is,ri.protocol+"//"),f.type=r.method||r.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(p)||[""],f.crossDomain==null){l=u.createElement("a");try{l.href=f.url;l.href=l.href;f.crossDomain=lr.protocol+"//"+lr.host!=l.protocol+"//"+l.host}catch(et){f.crossDomain=!0}}if(f.data&&f.processData&&typeof f.data!="string"&&(f.data=i.param(f.data,f.traditional)),ie(gf,f,r,e),s)return e;v=i.event&&f.global;v&&i.active++==0&&i.event.trigger("ajaxStart");f.type=f.type.toUpperCase();f.hasContent=!ts.test(f.type);o=f.url.replace(ko,"");f.hasContent?f.data&&f.processData&&(f.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&(f.data=f.data.replace(bo,"+")):(y=f.url.slice(o.length),f.data&&(f.processData||typeof f.data=="str
18ing")&&(o+=(er.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(o=o.replace(go,"$1"),y=(er.test(o)?"&":"?")+"_="+kf.guid+++y),f.url=o+y);f.ifModified&&(i.lastModified[o]&&e.setRequestHeader("If-Modified-Since",i.lastModified[o]),i.etag[o]&&e.setRequestHeader("If-None-Match",i.etag[o]));(f.data&&f.hasContent&&f.contentType!==!1||r.contentType)&&e.setRequestHeader("Content-Type",f.contentType);e.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+(f.dataTypes[0]!=="*"?", "+ne+"; q=0.01":""):f.accepts["*"]);for(g in f.headers)e.setRequestHeader(g,f.headers[g]);if(f.beforeSend&&(f.beforeSend.call(h,e,f)===!1||s))return e.abort();if(ft="abort",it.add(f.complete),e.done(f.success),e.fail(f.error),c=ie(cr,f,r,e),c){if(e.readyState=1,v&&nt.trigger("ajaxSend",[e,f]),s)return e;f.async&&f.timeout>0&&(d=n.setTimeout(function(){e.abort("timeout")},f.timeout));try{s=!1;c.send(rt,b)}catch(et){if(s)throw et;b(-1,et)}}else b(-1,"No Transport");return e},getJSON:function(n,t,r){return i.get(n,t,r,"json")},getScript:function(n,t){return i.get(n,undefined,t,"script")}}),i.each(["get","post"],function(n,t){i[t]=function(n,r,u,f){return e(r)&&(f=f||u,u=r,r=undefined),i.ajax(i.extend({url:n,type:t,dataType:f,data:r,success:u},i.isPlainObject(n)&&n))}}),i.ajaxPrefilter(function(n){for(var t in n.headers)t.toLowerCase()==="content-type"&&(n.contentType=n.headers[t]||"")}),i._evalUrl=function(n,t,r){return i.ajax({url:n,type:"GET",dataType:"script",cache:!0,"async":!1,global:!1,converters:{"text script":function(){}},dataFilter:function(n){i.globalEval(n,t,r)}})},i.fn.extend({wrapAll:function(n){var t;return this[0]&&(e(n)&&(n=n.call(this[0])),t=i(n,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var n=this;n.firstElementChild;)n=n.firstElementChild;return n}).append(this)),this},wrapInner:function(n){return e(n)?this.each(function(t){i(this).wrapInner(n.call(this,t))}):this.each(function(){var t=i(this),r=t.contents();r.length?r.wrapAll(n):t.append(n)})},wrap:function(n){var t=e(n);return this.each(function(r){i(this).wrapAll(t?n.call(this,r):n)})},unwrap:function(n){return this.parent(n).not("body").each(function(){i(this).replaceWith(this.childNodes)}),this}}),i.expr.pseudos.hidden=function(n){return!i.expr.pseudos.visible(n)},i.expr.pseudos.visible=function(n){return!!(n.offsetWidth||n.offsetHeight||n.getClientRects().length)},i.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}},re={0:200,1223:204},wt=i.ajaxSettings.xhr(),f.cors=!!wt&&"withCredentials"in wt,f.ajax=wt=!!wt,i.ajaxTransport(function(t){var i,r;if(f.cors||wt&&!t.crossDomain)return{send:function(u,f){var o,e=t.xhr();if(e.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)e[o]=t.xhrFields[o];t.mimeType&&e.overrideMimeType&&e.overrideMimeType(t.mimeType);t.crossDomain||u["X-Requested-With"]||(u["X-Requested-With"]="XMLHttpRequest");for(o in u)e.setRequestHeader(o,u[o]);i=function(n){return function(){i&&(i=r=e.onload=e.onerror=e.onabort=e.ontimeout=e.onreadystatechange=null,n==="abort"?e.abort():n==="error"?typeof e.status!="number"?f(0,"error"):f(e.status,e.statusText):f(re[e.status]||e.status,e.statusText,(e.responseType||"text")!=="text"||typeof e.responseText!="string"?{binary:e.response}:{text:e.responseText},e.getAllResponseHeaders()))}};e.onload=i();r=e.onerror=e.ontimeout=i("error");e.onabort!==undefined?e.onabort=r:e.onreadystatechange=function(){e.readyState===4&&n.setTimeout(function(){i&&r()})};i=i("abort");try{e.send(t.hasContent&&t.data||null)}catch(s){if(i)throw s;}},abort:function(){i&&i()}}}),i.ajaxPrefilter(function(n){n.crossDomain&&(n.contents.script=!1)}),i.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(n){return i.globalEval(n),n}}}),i.ajaxPrefilter("script",function(n){n.cache===undefined&&(n.cache=!1);n.crossDomain&&(n.type="GET")}),i.ajaxTransport("script",function(n){if(n.crossDomain||n.scriptAttrs){var r,t;return{send:function(f,e){r=i("<script>").attr(n.scriptAttrs||{}
18).prop({charset:n.scriptCharset,src:n.url}).on("load error",t=function(n){r.remove();t=null;n&&e(n.type==="error"?404:200,n.type)});u.head.appendChild(r[0])},abort:function(){t&&t()}}}}),vr=[],yi=/(=)\?(?=&|$)|\?\?/,i.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var n=vr.pop()||i.expando+"_"+kf.guid++;return this[n]=!0,n}}),i.ajaxPrefilter("json jsonp",function(t,r,u){var f,o,s,h=t.jsonp!==!1&&(yi.test(t.url)?"url":typeof t.data=="string"&&(t.contentType||"").indexOf("application/x-www-form-urlencoded")===0&&yi.test(t.data)&&"data");if(h||t.dataTypes[0]==="jsonp")return f=t.jsonpCallback=e(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,h?t[h]=t[h].replace(yi,"$1"+f):t.jsonp!==!1&&(t.url+=(er.test(t.url)?"&":"?")+t.jsonp+"="+f),t.converters["script json"]=function(){return s||i.error(f+" was not called"),s[0]},t.dataTypes[0]="json",o=n[f],n[f]=function(){s=arguments},u.always(function(){o===undefined?i(n).removeProp(f):n[f]=o;t[f]&&(t.jsonpCallback=r.jsonpCallback,vr.push(f));s&&e(o)&&o(s[0]);s=o=undefined}),"script"}),f.createHTMLDocument=function(){var n=u.implementation.createHTMLDocument("").body;return n.innerHTML="<form><\/form><form><\/form>",n.childNodes.length===2}(),i.parseHTML=function(n,t,r){if(typeof n!="string")return[];typeof t=="boolean"&&(r=t,t=!1);var s,e,o;return(t||(f.createHTMLDocument?(t=u.implementation.createHTMLDocument(""),s=t.createElement("base"),s.href=u.location.href,t.head.appendChild(s)):t=u),e=iu.exec(n),o=!r&&[],e)?[t.createElement(e[1])]:(e=bu([n],t,o),o&&o.length&&i(o).remove(),i.merge([],e.childNodes))},i.fn.load=function(n,t,r){var u,s,h,f=this,o=n.indexOf(" ");return o>-1&&(u=it(n.slice(o)),n=n.slice(0,o)),e(t)?(r=t,t=undefined):t&&typeof t=="object"&&(s="POST"),f.length>0&&i.ajax({url:n,type:s||"GET",dataType:"html",data:t}).done(function(n){h=arguments;f.html(u?i("<div>").append(i.parseHTML(n)).find(u):n)}).always(r&&function(n,t){f.each(function(){r.apply(this,h||[n.responseText,t,n])})}),this},i.expr.pseudos.animated=function(n){return i.grep(i.timers,function(t){return n===t.elem}).length},i.offset={setOffset:function(n,t,r){var o,s,h,c,u,l,y,a=i.css(n,"position"),v=i(n),f={};a==="static"&&(n.style.position="relative");u=v.offset();h=i.css(n,"top");l=i.css(n,"left");y=(a==="absolute"||a==="fixed")&&(h+l).indexOf("auto")>-1;y?(o=v.position(),c=o.top,s=o.left):(c=parseFloat(h)||0,s=parseFloat(l)||0);e(t)&&(t=t.call(n,r,i.extend({},u)));t.top!=null&&(f.top=t.top-u.top+c);t.left!=null&&(f.left=t.left-u.left+s);"using"in t?t.using.call(n,f):v.css(f)}},i.fn.extend({offset:function(n){if(arguments.length)return n===undefined?this:this.each(function(t){i.offset.setOffset(this,n,t)});var r,u,t=this[0];if(t)return t.getClientRects().length?(r=t.getBoundingClientRect(),u=t.ownerDocument.defaultView,{top:r.top+u.pageYOffset,left:r.left+u.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var n,u,f,t=this[0],r={top:0,left:0};if(i.css(t,"position")==="fixed")u=t.getBoundingClientRect();else{for(u=this.offset(),f=t.ownerDocument,n=t.offsetParent||f.documentElement;n&&(n===f.body||n===f.documentElement)&&i.css(n,"position")==="static";)n=n.parentNode;n&&n!==t&&n.nodeType===1&&(r=i(n).offset(),r.top+=i.css(n,"borderTopWidth",!0),r.left+=i.css(n,"borderLeftWidth",!0))}return{top:u.top-r.top-i.css(t,"marginTop",!0),left:u.left-r.left-i.css(t,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var n=this.offsetParent;n&&i.css(n,"position")==="static";)n=n.offsetParent;return n||tt})}}),i.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,t){var r="pageYOffset"===t;i.fn[n]=function(i){return g(this,function(n,i,u){var f;if(ut(n)?f=n:n.nodeType===9&&(f=n.defaultView),u===undefined)return f?f[t]:n[i];f?f.scrollTo(r?f.pageXOffset:u,r?u:f.pageYOffset):n[i]=u},n,i,arguments.length)}}),i.each(["top","left"],function(n,t){i.cssHooks[t]=tf(f.pixelPosition,function(n,r){if(r)return r=ii(n,t),nr.test(r)?i(n).position()[t]+"px":r})}),i.each({Height:"height",Width:"width"},function(n,t){i.each({padding:"inner"+n,content:t,"":"outer"+n},function(r,u){i.fn[u]=function(f,e){var o=arguments.length&&(r||typeof f!="boolean"),s=r||(f===!0||e===!0?"margin":"border");return g(this,function(t,r,f){var e;return ut(t)?u.indexOf("outer")===0?t["inner"+n]:t.document.documentElement["client"+n]:t.nodeType===9?(e=t.documentElement,Math.max(t.body["scroll"+n],e["scroll"+n],t.body["offset"+n],e["offset"+n],e["client"+n])):f===undefined?i.css(t,r,s):i.style(t,r,f,s)},t,o?f:undefined,o)}})}),i.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(n,t){i.fn[t]=function(n){return this.on(t,n)}}),i.fn.extend({bind:function(n,t,i){return this.on(n,null,t,i)},unbind:function(n,t){return this.off(n,null,t)},delegate:function(n,t,i,r){return this.on(t,n,i,r)},undelegate:function(n,t,i){return arguments.length===1?this.off(n,"**"):this.off(t,n||"**",i)},hover:function(n,t){return this.mouseenter(n).mouseleave(t||n)}}),i.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(n,t){i.fn[t]=function(n,i){return arguments.length>0?this.on(t,null,n,i):this.trigger(t)}}),ue=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g,i.proxy=function(n,t){var u,f,r;return(typeof t=="string"&&(u=n[t],t=n,n=u),!e(n))?undefined:(f=v.call(arguments,2),r=function(){return n.apply(t||this,f.concat(v.call(arguments)))},r.guid=n.guid=n.guid||i.guid++,r)},i.holdReady=function(n){n?i.readyWait++:i.ready(!0)},i.isArray=Array.isArray,i.parseJSON=JSON.parse,i.nodeName=s,i.isFunction=e,i.isWindow=ut,i.camelCase=k,i.type=ft,i.now=Date.now,i.isNumeric=function(n){var t=i.type(n);return(t==="number"||t==="string")&&!isNaN(n-parseFloat(n))},i.trim=function(n){return n==null?"":(n+"").replace(ue,"$1")},typeof define=="function"&&define.amd&&define("jquery",[],function(){return i}),fe=n.jQuery,ee=n.$,i.noConflict=function(t){return n.$===i&&(n.$=ee),t&&n.jQuery===i&&(n.jQuery=fe),i},typeof t=="undefined"&&(n.jQuery=n.$=i),i}); 19/*! jQuery UI - v1.13.2 - 2023-03-17 20* http://jqueryui.com 21* Includes: widget.js, position.js, data.js, disable-selection.js, focusable.js, jquery-patch.js, keycode.js, scroll-parent.js, tabbable.js, unique-id.js 22* Copyright jQuery Foundation and other contributors; Licensed MIT */ 23(function(n){"use strict";typeof define=="function"&&define.amd?define(["jquery"],n):n(jQuery)})(function(n){"use strict";function a(n){for(var t=n.css("visibility");t==="inherit";)n=n.parent(),t=n.css("visibility");return t==="visible"}var f,s,h,c,l,v,y,r,u,p,w,b,k,t;n.ui=n.ui||{};f=n.ui.version="1.13.2"; 24/*! 25 * jQuery UI Widget 1.13.2 26 * http://jqueryui.com 27 * 28 * Copyright jQuery Foundation and other contributors 29 * Released under the MIT license. 30 * http://jquery.org/license 31 */ 32var e=0,o=Array.prototype.hasOwnProperty,i=Array.prototype.slice;n.cleanData=function(t){return function(i){for(var r,u,f=0;(u=i[f])!=null;f++)r=n._data(u,"events"),r&&r.remove&&n(u).triggerHandler("remove");t(i)}}(n.cleanData);n.widget=function(t,i,r){var f,u,o,h={},e=t.split(".")[0],s;return t=t.split(".")[1],s=e+"-"+t,r||(r=i,i=n.Widget),Array.isArray(r)&&(r=n.extend.apply(null,[{}].concat(r))),n.expr.pseudos[s.toLowerCase()]=function(t){return!!n.data(t,s)},n[e]=n[e]||{},f=n[e][t],u=n[e][t]=function(n,t){if(!this||!this._createWidget)return new u(n,t);arguments.length&&this._createWidget(n,t)},n.extend(u,f,{version:r.version,_proto:n.extend({},r),_childConstructors:[]}),o=new i,o.options=n.widget.extend({},o.options),n.each(r,function(n,t){if(typeof t!="function"){h[n]=t;return}h[n]=function(){function r(){return i.prototype[n].apply(this,arguments)}function u(t){return i.prototype[n].apply(this,t)}return function(){var i=this._super,f=this._superApply,n;return this._super=r,this._superApply=u,n=t.apply(this,arguments),this._super=i,this._superApply=f,n}}()}),u.prototype=n.widget.extend(o,{widgetEventPrefix:f?o.widgetEventPrefix||t:t},h,{constructor:u,namespace:e,widgetName:t,widgetFullName:s}),f?(n.each(f._childConstructors,function(t,i){var r=i.prototype;
32n.widget(r.namespace+"."+r.widgetName,u,i._proto)}),delete f._childConstructors):i._childConstructors.push(u),n.widget.bridge(t,u),u};n.widget.extend=function(t){for(var e=i.call(arguments,1),f=0,s=e.length,r,u;f<s;f++)for(r in e[f])u=e[f][r],o.call(e[f],r)&&u!==undefined&&(t[r]=n.isPlainObject(u)?n.isPlainObject(t[r])?n.widget.extend({},t[r],u):n.widget.extend({},u):u);return t};n.widget.bridge=function(t,r){var u=r.prototype.widgetFullName||t;n.fn[t]=function(f){var s=typeof f=="string",o=i.call(arguments,1),e=this;return s?this.length||f!=="instance"?this.each(function(){var i,r=n.data(this,u);return f==="instance"?(e=r,!1):r?typeof r[f]!="function"||f.charAt(0)==="_"?n.error("no such method '"+f+"' for "+t+" widget instance"):(i=r[f].apply(r,o),i!==r&&i!==undefined?(e=i&&i.jquery?e.pushStack(i.get()):i,!1):void 0):n.error("cannot call methods on "+t+" prior to initialization; attempted to call method '"+f+"'")}):e=undefined:(o.length&&(f=n.widget.extend.apply(null,[f].concat(o))),this.each(function(){var t=n.data(this,u);t?(t.option(f||{}),t._init&&t._init()):n.data(this,u,new r(f,this))})),e}};n.Widget=function(){};n.Widget._childConstructors=[];n.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,i){i=n(i||this.defaultElement||this)[0];this.element=n(i);this.uuid=e++;this.eventNamespace="."+this.widgetName+this.uuid;this.bindings=n();this.hoverable=n();this.focusable=n();this.classesElementLookup={};i!==this&&(n.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(n){n.target===i&&this.destroy()}}),this.document=n(i.style?i.ownerDocument:i.document||i),this.window=n(this.document[0].defaultView||this.document[0].parentWindow));this.options=n.widget.extend({},this.options,this._getCreateOptions(),t);this._create();this.options.disabled&&this._setOptionDisabled(this.options.disabled);this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:n.noop,_create:n.noop,_init:n.noop,destroy:function(){var t=this;this._destroy();n.each(this.classesElementLookup,function(n,i){t._removeClass(i,n)});this.element.off(this.eventNamespace).removeData(this.widgetFullName);this.widget().off(this.eventNamespace).removeAttr("aria-disabled");this.bindings.off(this.eventNamespace)},_destroy:n.noop,widget:function(){return this.element},option:function(t,i){var e=t,r,u,f;if(arguments.length===0)return n.widget.extend({},this.options);if(typeof t=="string")if(e={},r=t.split("."),t=r.shift(),r.length){for(u=e[t]=n.widget.extend({},this.options[t]),f=0;f<r.length-1;f++)u[r[f]]=u[r[f]]||{},u=u[r[f]];if(t=r.pop(),arguments.length===1)return u[t]===undefined?null:u[t];u[t]=i}else{if(arguments.length===1)return this.options[t]===undefined?null:this.options[t];e[t]=i}return this._setOptions(e),this},_setOptions:function(n){for(var t in n)this._setOption(t,n[t]);return this},_setOption:function(n,t){return n==="classes"&&this._setOptionClasses(t),this.options[n]=t,n==="disabled"&&this._setOptionDisabled(t),this},_setOptionClasses:function(t){var i,u,r;for(i in t)(r=this.classesElementLookup[i],t[i]!==this.options.classes[i]&&r&&r.length)&&(u=n(r.get()),this._removeClass(r,i),u.addClass(this._classes({element:u,keys:i,classes:t,add:!0})))},_setOptionDisabled:function(n){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!n);n&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(t){function f(){var r=[];t.element.each(function(t,u){var f=n.map(i.classesElementLookup,function(n){return n}).some(function(n){return n.is(u)});f||r.push(u)});i._on(n(r),{remove:"_untrackClassesElement"})}function u(u,e){for(var s,o=0;o<u.length;o++)s=i.classesElementLookup[u[o]]||n(),t.add?(f(),s=n(n.uniqueSort(s.get().concat(t.element.get())))):s=n(s.not(t.element).get()),i.classesElementLookup[u[o]]=s,r.push(u[o]),e&&t.classes[u[o]]&&r.push(t.classes[u[o]])}var r=[],i=this;return t=n.extend({element:this.element,classes:this.options.classes||{}},t),t.keys&&u(t.keys.match(/\S+/g)||[],!0),t.extra&&u(t.extra.match(/\S+/g)||[]),r.join(" ")},_untrackClassesElement:function(t){var i=this;n.each(i.classesElementLookup,function(r,u){n.inArray(t.target,u)!==-1&&(i.classesElementLookup[r]=n(u.not(t.target).get()))});this._off(n(t.target))},_removeClass:function(n,t,i){return this._toggleClass(n,t,i,!1)},_addClass:function(n,t,i){return this._toggleClass(n,t,i,!0)},_toggleClass:function(n,t,i,r){r=typeof r=="boolean"?r:i;var u=typeof n=="string"||n===null,f={extra:u?t:i,keys:u?n:t,element:u?this.element:n,add:r};return f.element.toggleClass(this._classes(f),r),this},_on:function(t,i,r){var f,u=this;typeof t!="boolean"&&(r=i,i=t,t=!1);r?(i=f=n(i),this.bindings=this.bindings.add(i)):(r=i,i=this.element,f=this.widget());n.each(r,function(r,e){function o(){if(t||u.options.disabled!==!0&&!n(this).hasClass("ui-state-disabled"))return(typeof e=="string"?u[e]:e).apply(u,arguments)}typeof e!="string"&&(o.guid=e.guid=e.guid||o.guid||n.guid++);var s=r.match(/^([\w:-]*)\s*(.*)$/),h=s[1]+u.eventNamespace,c=s[2];if(c)f.on(h,c,o);else i.on(h,o)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;t.off(i);this.bindings=n(this.bindings.not(t).get());this.focusable=n(this.focusable.not(t).get());this.hoverable=n(this.hoverable.not(t).get())},_delay:function(n,t){function r(){return(typeof n=="string"?i[n]:n).apply(i,arguments)}var i=this;return setTimeout(r,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t);this._on(t,{mouseenter:function(t){this._addClass(n(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(n(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t);this._on(t,{focusin:function(t){this._addClass(n(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(n(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,i,r){var u,f,e=this.options[t];if(r=r||{},i=n.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],f=i.originalEvent,f)for(u in f)u in i||(i[u]=f[u]);return this.element.trigger(i,r),!(typeof e=="function"&&e.apply(this.element[0],[i].concat(r))===!1||i.isDefaultPrevented())}};n.each({show:"fadeIn",hide:"fadeOut"},function(t,i){n.Widget.prototype["_"+t]=function(r,u,f){typeof u=="string"&&(u={effect:u});var o,e=u?u===!0||typeof u=="number"?i:u.effect||i:t;u=u||{};typeof u=="number"?u={duration:u}:u===!0&&(u={});o=!n.isEmptyObject(u);u.complete=f;u.delay&&r.delay(u.delay);o&&n.effects&&n.effects.effect[e]?r[t](u):e!==t&&r[e]?r[e](u.duration,u.easing,f):r.queue(function(i){n(this)[t]();f&&f.call(r[0]);i()})}});s=n.widget;
33/*! 34 * jQuery UI Position 1.13.2 35 * http://jqueryui.com 36 * 37 * Copyright jQuery Foundation and other contributors 38 * Released under the MIT license. 39 * http://jquery.org/license 40 * 41 * http://api.jqueryui.com/position/ 42 */ 43(function(){function c(n,t,i){return[parseFloat(n[0])*(h.test(n[0])?t/100:1),parseFloat(n[1])*(h.test(n[1])?i/100:1)]}function r(t,i){return parseInt(n.css(t,i),10)||0}function l(n){return n!=null&&n===n.window}function v(n){var t=n[0];return t.nodeType===9?{width:n.width(),height:n.height(),offset:{top:0,left:0}}:l(t)?{width:n.width(),height:n.height(),offset:{top:n.scrollTop(),left:n.scrollLeft()}}:t.preventDefault?{width:0,height:0,offset:{top:t.pageY,left:t.pageX}}:{width:n.outerWidth(),height:n.outerHeight(),offset:n.offset()}}var u,i=Math.max,t=Math.abs,f=/left|center|right/,e=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,h=/%$/,a=n.fn.position;n.position={scrollbarWidth:function(){if(u!==undefined)return u;var r,i,t=n("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'><\/div><\/div>"),f=t.children()[0];return n("body").append(t),r=f.offsetWidth,t.css("overflow","scroll"),i=f.offsetWidth,r===i&&(i=t[0].clientWidth),t.remove(),u=r-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),r=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),u=i==="scroll"||i==="auto"&&t.width<t.element[0].scrollWidth,f=r==="scroll"||r==="auto"&&t.height<t.element[0].scrollHeight;return{width:f?n.position.scrollbarWidth():0,height:u?n.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=n(t||window),r=l(i[0]),u=!!i[0]&&i[0].nodeType===9,f=!r&&!u;return{element:i,isWindow:r,isDocument:u,offset:f?n(t).offset():{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:i.outerWidth(),height:i.outerHeight()}}};n.fn.position=function(u){if(!u||!u.of)return a.apply(this,arguments);u=n.extend({},u);var w,h,l,p,y,k,d=typeof u.of=="string"?n(document).find(u.of):n(u.of),nt=n.position.getWithinInfo(u.within),tt=n.position.getScrollInfo(nt),b=(u.collision||"flip").split(" "),g={};return k=v(d),d[0].preventDefault&&(u.at="left top"),h=k.width,l=k.height,p=k.offset,y=n.extend({},p),n.each(["my","at"],function(){var n=(u[this]||"").split(" "),t,i;n.length===1&&(n=f.test(n[0])?n.concat(["center"]):e.test(n[0])?["center"].concat(n):["center","center"]);n[0]=f.test(n[0])?n[0]:"center";n[1]=e.test(n[1])?n[1]:"center";t=o.exec(n[0]);i=o.exec(n[1]);g[this]=[t?t[0]:0,i?i[0]:0];u[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]}),b.length===1&&(b[1]=b[0]),u.at[0]==="right"?y.left+=h:u.at[0]==="center"&&(y.left+=h/2),u.at[1]==="bottom"?y.top+=l:u.at[1]==="center"&&(y.top+=l/2),w=c(g.at,h,l),y.left+=w[0],y.top+=w[1],this.each(function(){var v,k,e=n(this),o=e.outerWidth(),s=e.outerHeight(),it=r(this,"marginLeft"),rt=r(this,"marginTop"),ut=o+it+r(this,"marginRight")+tt.width,ft=s+rt+r(this,"marginBottom")+tt.height,f=n.extend({},y),a=c(g.my,e.outerWidth(),e.outerHeight());u.my[0]==="right"?f.left-=o:u.my[0]==="center"&&(f.left-=o/2);u.my[1]==="bottom"?f.top-=s:u.my[1]==="center"&&(f.top-=s/2);f.left+=a[0];f.top+=a[1];v={marginLeft:it,marginTop:rt};n.each(["left","top"],function(t,i){n.ui.position[b[t]]&&n.ui.position[b[t]][i](f,{targetWidth:h,targetHeight:l,elemWidth:o,elemHeight:s,collisionPosition:v,collisionWidth:ut,collisionHeight:ft,offset:[w[0]+a[0],w[1]+a[1]],my:u.my,at:u.at,within:nt,elem:e})});u.using&&(k=function(n){var r=p.left-f.left,v=r+h-o,c=p.top-f.top,y=c+l-s,a={target:{element:d,left:p.left,top:p.top,width:h,height:l},element:{element:e,left:f.left,top:f.top,width:o,height:s},horizontal:v<0?"left":r>0?"right":"center",vertical:y<0?"top":c>0?"bottom":"middle"};h<o&&t(r+v)<h&&(a.horizontal="center");l<s&&t(c+y)<l&&(a.vertical="middle");a.important=i(t(r),t(v))>i(t(c),t(y))?"horizontal":"vertical";u.using.call(this,n,a)});e.offset(n.extend(f,{using:k}))})};n.ui.position={fit:{left:function(n,t){var e=t.within,u=e.isWindow?e.scrollLeft:e.offset.left,o=e.width,s=n.left-t.collisionPosition.marginLeft,r=u-s,f=s+t.collisionWidth-o-u,h;t.collisionWidth>o?r>0&&f<=0?(h=n.left+r+t.collisionWidth-o-u,n.left+=r-h):n.left=f>0&&r<=0?u:r>f?u+o-t.collisionWidth:u:r>0?n.left+=r:f>0?n.left-=f:n.left=i(n.left-s,n.left)},top:function(n,t){var o=t.within,u=o.isWindow?o.scrollTop:o.offset.top,e=t.within.height,s=n.top-t.collisionPosition.marginTop,r=u-s,f=s+t.collisionHeight-e-u,h;t.collisionHeight>e?r>0&&f<=0?(h=n.top+r+t.collisionHeight-e-u,n.top+=r-h):n.top=f>0&&r<=0?u:r>f?u+e-t.collisionHeight:u:r>0?n.top+=r:f>0?n.top-=f:n.top=i(n.top-s,n.top)}},flip:{left:function(n,i){var r=i.within,y=r.offset.left+r.scrollLeft,c=r.width,o=r.isWindow?r.scrollLeft:r.offset.left,l=n.left-i.collisionPosition.marginLeft,a=l-o,v=l+i.collisionWidth-c-o,u=i.my[0]==="left"?-i.elemWidth:i.my[0]==="right"?i.elemWidth:0,f=i.at[0]==="left"?i.targetWidth:i.at[0]==="right"?-i.targetWidth:0,e=-2*i.offset[0],s,h;a<0?(s=n.left+u+f+e+i.collisionWidth-c-y,(s<0||s<t(a))&&(n.left+=u+f+e)):v>0&&(h=n.left-i.collisionPosition.marginLeft+u+f+e-o,(h>0||t(h)<v)&&(n.left+=u+f+e))},top:function(n,i){var r=i.within,y=r.offset.top+r.scrollTop,c=r.height,o=r.isWindow?r.scrollTop:r.offset.top,l=n.top-i.collisionPosition.marginTop,a=l-o,v=l+i.collisionHeight-c-o,p=i.my[1]==="top",u=p?-i.elemHeight:i.my[1]==="bottom"?i.elemHeight:0,f=i.at[1]==="top"?i.targetHeight:i.at[1]==="bottom"?-i.targetHeight:0,e=-2*i.offset[1],s,h;a<0?(h=n.top+u+f+e+i.collisionHeight-c-y,(h<0||h<t(a))&&(n.top+=u+f+e)):v>0&&(s=n.top-i.collisionPosition.marginTop+u+f+e-o,(s>0||t(s)<v)&&(n.top+=u+f+e))}},flipfit:{left:function(){n.ui.position.flip.left.apply(this,arguments);n.ui.position.fit.left.apply(this,arguments)},top:function(){n.ui.position.flip.top.apply(this,arguments);n.ui.position.fit.top.apply(this,arguments)}}}})();h=n.ui.position; 44/*! 45 * jQuery UI :data 1.13.2 46 * http://jqueryui.com 47 * 48 * Copyright jQuery Foundation and other contributors 49 * Released under the MIT license. 50 * http://jquery.org/license 51 */ 52c=n.extend(n.expr.pseudos,{data:n.expr.createPseudo?n.expr.createPseudo(function(t){return function(i){return!!n.data(i,t)}}):function(t,i,r){return!!n.data(t,r[3])}}); 53/*! 54 * jQuery UI Disable Selection 1.13.2 55 * http://jqueryui.com 56 * 57 * Copyright jQuery Foundation and other contributors 58 * Released under the MIT license. 59 * http://jquery.org/license 60 */ 61l=n.fn.extend({disableSelection:function(){var n="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.on(n+".ui-disableSelection",function(n){n.preventDefault()})}}(),enableSelection:function(){return this.off(".ui-disableSelection")}}); 62/*! 63 * jQuery UI Focusable 1.13.2 64 * http://jqueryui.com 65 * 66 * Copyright jQuery Foundation and other contributors 67 * Released under the MIT license. 68 * http://jquery.org/license 69 */ 70n.ui.focusable=function(t,i){var u,f,e,r,o,s=t.nodeName.toLowerCase();return"area"===s?(u=t.parentNode,f=u.name,!t.href||!f||u.nodeName.toLowerCase()!=="map")?!1:(e=n("img[usemap='#"+f+"']"),e.length>0&&e.is(":visible")):(/^(input|select|textarea|button|object)$/.test(s)?(r=!t.disabled,r&&(o=n(t).closest("fieldset")[0],o&&(r=!o.disabled))):r="a"===s?t.href||i:i,r&&n(t).is(":visible")&&a(n(t)))};n.extend(n.expr.pseudos,{focusable:function(t){return n.ui.focusable(t,n.attr(t,"tabindex")!=null)}});v=n.ui.focusable;y=n.fn._form=function(){return typeof this[0].form=="string"?this.closest("form"):n(this[0].form)}; 71/*! 72 * jQuery UI Support for jQuery core 1.8.x and newer 1.13.2 73 * http://jqueryui.com 74 * 75 * Copyright jQuery Foundation and other contributors 76 * Released under the MIT license. 77 * http://jquery.org/license 78 * 79 */ 80n.expr.pseudos||(n.expr.pseudos=n.expr[":"]);n.uniqueSort||(n.uniqueSort=n.unique);n.escapeSelector||(r=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,u=function(n,t){return t?n==="\0"?"�":n.slice(0,-1)+"\\"+n.charCodeAt(n.length-1).toString(16)+" ":"\\"+n},n.escapeSelector=function(n){return(n+"").replace(r,u)});n.fn.even&&n.fn.odd||n.fn.extend({even:function(){return this.filter(function(n){return n%2==0})},odd:function(){return this.filter(function(n){return n%2==1})}}); 81/*!
82 * jQuery UI Keycode 1.13.2 83 * http://jqueryui.com 84 * 85 * Copyright jQuery Foundation and other contributors 86 * Released under the MIT license. 87 * http://jquery.org/license 88 */ 89p=n.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}; 90/*! 91 * jQuery UI Scroll Parent 1.13.2 92 * http://jqueryui.com 93 * 94 * Copyright jQuery Foundation and other contributors 95 * Released under the MIT license. 96 * http://jquery.org/license 97 */ 98w=n.fn.scrollParent=function(t){var i=this.css("position"),u=i==="absolute",f=t?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter(function(){var t=n(this);return u&&t.css("position")==="static"?!1:f.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return i==="fixed"||!r.length?n(this[0].ownerDocument||document):r}; 99/*! 100 * jQuery UI Unique ID 1.13.2 101 * http://jqueryui.com 102 * 103 * Copyright jQuery Foundation and other contributors 104 * Released under the MIT license. 105 * http://jquery.org/license 106 */ 107b=n.fn.extend({uniqueId:function(){var n=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++n)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&n(this).removeAttr("id")})}});k=n.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()); 108/*! 109 * jQuery UI Mouse 1.13.2 110 * http://jqueryui.com 111 * 112 * Copyright jQuery Foundation and other contributors 113 * Released under the MIT license. 114 * http://jquery.org/license 115 */ 116t=!1;n(document).on("mouseup",function(){t=!1});var d=n.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(n){return t._mouseDown(n)}).on("click."+this.widgetName,function(i){if(!0===n.data(i.target,t.widgetName+".preventClickEvent"))return n.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1});this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName);this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseMoved=!1;this._mouseStarted&&this._mouseUp(i);this._mouseDownEvent=i;var r=this,u=i.which===1,f=typeof this.options.cancel=="string"&&i.target.nodeName?n(i.target).closest(this.options.cancel).length:!1;if(!u||f||!this._mouseCapture(i))return!0;if(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){r.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted))return i.preventDefault(),!0;!0===n.data(i.target,this.widgetName+".preventClickEvent")&&n.removeData(i.target,this.widgetName+".preventClickEvent");this._mouseMoveDelegate=function(n){return r._mouseMove(n)};this._mouseUpDelegate=function(n){return r._mouseUp(n)};this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate);return i.preventDefault(),t=!0,!0}},_mouseMove:function(t){if(this._mouseMoved){if(n.ui.ie&&(!document.documentMode||document.documentMode<9)&&!t.button)return this._mouseUp(t);if(!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t)}return((t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted)?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(i){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate);this._mouseStarted&&(this._mouseStarted=!1,i.target===this._mouseDownEvent.target&&n.data(i.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(i));this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer);this.ignoreMissingWhich=!1;t=!1;i.preventDefault()},_mouseDistanceMet:function(n){return Math.max(Math.abs(this._mouseDownEvent.pageX-n.pageX),Math.abs(this._mouseDownEvent.pageY-n.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),g=n.ui.plugin={add:function(t,i,r){var u,f=n.ui[t].prototype;for(u in r)f.plugins[u]=f.plugins[u]||[],f.plugins[u].push([i,r[u]])},call:function(n,t,i,r){var u,f=n.plugins[t];if(f&&(r||n.element[0].parentNode&&n.element[0].parentNode.nodeType!==11))for(u=0;
116u<f.length;u++)n.options[f[u][0]]&&f[u][1].apply(n.element,i)}},nt=n.ui.safeActiveElement=function(n){var t;try{t=n.activeElement}catch(i){t=n.body}return t||(t=n.body),t.nodeName||(t=n.body),t},tt=n.ui.safeBlur=function(t){t&&t.nodeName.toLowerCase()!=="body"&&n(t).trigger("blur")}});!function(n){"use strict";var t=function(n,i){var r=/[^\w\-.:]/.test(n)?new Function(t.arg+",tmpl","var _e=tmpl.encode"+t.helper+",_s='"+n.replace(t.regexp,t.func)+"';return _s;"):t.cache[n]=t.cache[n]||t(t.load(n));return i?r(i,t):function(n){return r(n,t)}};t.cache={};t.load=function(n){return document.getElementById(n).innerHTML};t.regexp=/([\s'\\])(?!(?:[^{]|\{(?!%))*%\})|(?:\{%(=|#)([\s\S]+?)%\})|(\{%)|(%\})/g;t.func=function(n,t,i,r,u,f){return t?{"\n":"\\n","\r":"\\r","\t":"\\t"," ":" "}[t]||"\\"+t:i?"="===i?"'+_e("+r+")+'":"'+("+r+"==null?'':"+r+")+'":u?"';":f?"_s+='":void 0};t.encReg=/[<>&"'\x00]/g;t.encMap={"<":"<",">":">","&":"&",'"':""","'":"'"};t.encode=function(n){return(null==n?"":""+n).replace(t.encReg,function(n){return t.encMap[n]||""})};t.arg="o";t.helper=",print=function(s,e){_s+=e?(s==null?'':s):_e(s);},include=function(s,d){_s+=tmpl(s,d);}";"function"==typeof define&&define.amd?define(function(){return t}):"object"==typeof module&&module.exports?module.exports=t:n.tmpl=t}(this);$.extend($.expr[":"],{scrollable:function(n){var t;return $(n).css("overflow")=="scroll"||$(n).css("overflowX")=="scroll"||$(n).css("overflowY")=="scroll"?!0:(t=n.clientHeight<n.scrollHeight&&($.inArray($(n).css("overflowY"),["scroll","auto"])!=-1||$.inArray($(n).css("overflow"),["scroll","auto"])!=-1),t)?!0:n.clientWidth<n.scrollWidth&&($.inArray($(n).css("overflowX"),["scroll","auto"])!=-1||$.inArray($(n).css("overflow"),["scroll","auto"])!=-1)}}),function(){var t,n;jQuery.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};t=jQuery.uaMatch(navigator.userAgent);n={};t.browser&&(n[t.browser]=!0,n.version=t.version);n.chrome?n.webkit=!0:n.webkit&&(n.safari=!0);jQuery.browser=n}(),function(n){var e=function(){try{return!!Symbol.iterator}catch(n){return!1}},r=e(),i=function(n){var t={next:function(){var t=n.shift();return{done:t===void 0,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t},u=function(n){return encodeURIComponent(n).replace(/%20/g,"+")},f=function(n){return decodeURIComponent(String(n).replace(/\+/g," "))},o=function(){var f=function(n){var r,e,t,i,u;if(Object.defineProperty(this,"_entries",{writable:!0,value:{}}),r=typeof n,r!=="undefined")if(r==="string")n!==""&&this._fromString(n);else if(n instanceof f)e=this,n.forEach(function(n,t){e.append(t,n)});else if(n!==null&&r==="object")if(Object.prototype.toString.call(n)==="[object Array]")for(t=0;t<n.length;t++)if(i=n[t],Object.prototype.toString.call(i)==="[object Array]"||i.length!==2)this.append(i[0],i[1]);else throw new TypeError("Expected [string, any] as entry at index "+t+" of URLSearchParams's input");else for(u in n)n.hasOwnProperty(u)&&this.append(u,n[u]);else throw new TypeError("Unsupported input's type for URLSearchParams");},t=f.prototype;t.append=function(n,t){n in this._entries?this._entries[n].push(String(t)):this._entries[n]=[String(t)]};t.delete=function(n){delete this._entries[n]};t.get=function(n){return n in this._entries?this._entries[n][0]:null};t.getAll=function(n){return n in this._entries?this._entries[n].slice(0):[]};t.has=function(n){return n in this._entries};t.set=function(n,t){this._entries[n]=[String(t)]};t.forEach=function(n,t){var u,i,r;for(i in this._entries)if(this._entries.hasOwnProperty(i))for(u=this._entries[i],r=0;r<u.length;r++)n.call(t,u[r],i,this)};t.keys=function(){var n=[];return this.forEach(function(t,i){n.push(i)}),i(n)};t.values=function(){var n=[];return this.forEach(function(t){n.push(t)}),i(n)};t.entries=function(){var n=[];return this.forEach(function(t,i){n.push([i,t])}),i(n)};r&&(t[Symbol.iterator]=t.entries);t.toString=function(){var n=[];return this.forEach(function(t,i){n.push(u(i)+"="+u(t))}),n.join("&")};n.URLSearchParams=f},s=function(){try{var t=n.URLSearchParams;return new t("?a=1").toString()==="a=1"&&typeof t.prototype.set=="function"}catch(t){return!1}},t;s()||o();t=n.URLSearchParams.prototype;typeof t.sort!="function"&&(t.sort=function(){var i=this,n=[],t;for(this.forEach(function(t,r){n.push([r,t]);
116i._entries||i.delete(r)}),n.sort(function(n,t){return n[0]<t[0]?-1:n[0]>t[0]?1:0}),i._entries&&(i._entries={}),t=0;t<n.length;t++)this.append(n[t][0],n[t][1])});typeof t._fromString!="function"&&Object.defineProperty(t,"_fromString",{enumerable:!1,configurable:!1,writable:!1,value:function(n){var i,u,r,t;if(this._entries)this._entries={};else for(i=[],this.forEach(function(n,t){i.push(t)}),t=0;t<i.length;t++)this.delete(i[t]);for(n=n.replace(/^\?/,""),u=n.split("&"),t=0;t<u.length;t++)r=u[t].split("="),this.append(f(r[0]),r.length>1?f(r[1]):"")}})}(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:this),function(n){var i=function(){try{var t=new n.URL("b","http://a");return t.pathname="c%20d",t.href==="http://a/c%20d"&&t.searchParams}catch(t){return!1}},r=function(){var t=n.URL,i=function(t,i){var u,f,r,h;if(typeof t!="string"&&(t=String(t)),u=document,i&&(n.location===void 0||i!==n.location.href)){u=document.implementation.createHTMLDocument("");f=u.createElement("base");f.href=i;u.head.appendChild(f);try{if(f.href.indexOf(i)!==0)throw new Error(f.href);}catch(t){throw new Error("URL unable to set base "+i+" due to "+t);}}if(r=u.createElement("a"),r.href=t,f&&(u.body.appendChild(r),r.href=r.href),r.protocol===":"||!/:/.test(r.href))throw new TypeError("Invalid URL");Object.defineProperty(this,"_anchorElement",{value:r});var e=new n.URLSearchParams(this.search),o=!0,s=!0,c=this;["append","delete","set"].forEach(function(n){var t=e[n];e[n]=function(){t.apply(e,arguments);o&&(s=!1,c.search=e.toString(),s=!0)}});Object.defineProperty(this,"searchParams",{value:e,enumerable:!0});h=void 0;Object.defineProperty(this,"_updateSearchParams",{enumerable:!1,configurable:!1,writable:!1,value:function(){this.search!==h&&(h=this.search,s&&(o=!1,this.searchParams._fromString(this.search),o=!0))}})},r=i.prototype,u=function(n){Object.defineProperty(r,n,{get:function(){return this._anchorElement[n]},set:function(t){this._anchorElement[n]=t},enumerable:!0})};["hash","host","hostname","port","protocol"].forEach(function(n){u(n)});Object.defineProperty(r,"search",{get:function(){return this._anchorElement.search},set:function(n){this._anchorElement.search=n;this._updateSearchParams()},enumerable:!0});Object.defineProperties(r,{toString:{get:function(){var n=this;return function(){return n.href}}},href:{get:function(){return this._anchorElement.href.replace(/\?$/,"")},set:function(n){this._anchorElement.href=n;this._updateSearchParams()},enumerable:!0},pathname:{get:function(){return this._anchorElement.pathname.replace(/(^\/?)/,"/")},set:function(n){this._anchorElement.pathname=n},enumerable:!0},origin:{get:function(){var n={"http:":80,"https:":443,"ftp:":21}[this._anchorElement.protocol],t=this._anchorElement.port!=n&&this._anchorElement.port!=="";return this._anchorElement.protocol+"//"+this._anchorElement.hostname+(t?":"+this._anchorElement.port:"")},enumerable:!0},password:{get:function(){return""},set:function(){},enumerable:!0},username:{get:function(){return""},set:function(){},enumerable:!0}});i.createObjectURL=function(){return t.createObjectURL.apply(t,arguments)};i.revokeObjectURL=function(){return t.revokeObjectURL.apply(t,arguments)};n.URL=i},t;if(i()||r(),n.location!==void 0&&!("origin"in n.location)){t=function(){return n.location.protocol+"//"+n.location.hostname+(n.location.port?":"+n.location.port:"")};try{Object.defineProperty(n.location,"origin",{get:t,enumerable:!0})}
116catch(i){setInterval(function(){n.location.origin=t()},100)}}}(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:this),function(n,t){ 117/*! 118 * jQuery UI Datepicker 1.13.2 119 * http://jqueryui.com 120 * 121 * Copyright jQuery Foundation and other contributors 122 * Released under the MIT license. 123 * http://jquery.org/license 124 */ 125function o(n){for(var t,i;n.length&&n[0]!==document;){if(t=n.css("position"),(t==="absolute"||t==="relative"||t==="fixed")&&(i=parseInt(n.css("zIndex"),10),!isNaN(i)&&i!==0))return i;n=n.parent()}return 0}function u(){this._curInst=null;this._keyEvent=!1;this._disabledInputs=[];this._datepickerShowing=!1;this._inDialog=!1;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1};n.extend(this._defaults,this.regional[""]);this.regional.en=n.extend(!0,{},this.regional[""]);this.regional["en-US"]=n.extend(!0,{},this.regional.en);this.dpDiv=f(n("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>"))}function f(t){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",i,function(){n(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!==-1&&n(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",i,e)}function e(){n.datepicker._isDisabledDatepicker(i.inline?i.dpDiv.parent()[0]:i.input[0])||(n(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),n(this).addClass("ui-state-hover"),this.className.indexOf("ui-datepicker-prev")!==-1&&n(this).addClass("ui-datepicker-prev-hover"),this.className.indexOf("ui-datepicker-next")!==-1&&n(this).addClass("ui-datepicker-next-hover"))}function r(t,i){n.extend(t,i);for(var r in i)i[r]==null&&(t[r]=i[r]);return t}var i,s;n.extend(n.ui,{datepicker:{version:"1.13.2"}});n.extend(u.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(n){return r(this._defaults,n||{}),this},_attachDatepicker:function(t,i){var r,f,u;r=t.nodeName.toLowerCase();f=r==="div"||r==="span";t.id||(this.uuid+=1,t.id="dp"+this.uuid);u=this._newInst(n(t),f);u.settings=n.extend({},i||{});r==="input"?this._connectDatepicker(t,u):f&&this._inlineDatepicker(t,u)},_newInst:function(t,i){var r=t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:r,input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?f(n("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'><\/div>")):this.dpDiv}},_connectDatepicker:function(t,i){var r=n(t);if(i.append=n([]),i.trigger=n([]),!r.hasClass(this.markerClassName)){this._attachments(r,i);r.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp);this._autoSize(i);n.data(t,"datepicker",i);i.settings.disabled&&this._disableDatepicker(t)}},_attachments:function(t,i){var u,r,f,e=this._get(i,"appendText"),o=this._get(i,"isRTL");if(i.append&&i.append.remove(),e&&(i.append=n("<span>").addClass(this._appendClass).text(e),t[o?"before":"after"](i.append)),t.off("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),u=this._get(i,"showOn"),u==="focus"||u==="both")t.on("focus",this._showDatepicker);
125if(u==="button"||u==="both"){r=this._get(i,"buttonText");f=this._get(i,"buttonImage");this._get(i,"buttonImageOnly")?i.trigger=n("<img>").addClass(this._triggerClass).attr({src:f,alt:r,title:r}):(i.trigger=n("<button type='button'>").addClass(this._triggerClass),f?i.trigger.html(n("<img>").attr({src:f,alt:r,title:r})):i.trigger.text(r));t[o?"before":"after"](i.trigger);i.trigger.on("click",function(){return n.datepicker._datepickerShowing&&n.datepicker._lastInput===t[0]?n.datepicker._hideDatepicker():n.datepicker._datepickerShowing&&n.datepicker._lastInput!==t[0]?(n.datepicker._hideDatepicker(),n.datepicker._showDatepicker(t[0])):n.datepicker._showDatepicker(t[0]),!1})}},_autoSize:function(n){if(this._get(n,"autoSize")&&!n.inline){var r,u,f,t,i=new Date(2009,11,20),e=this._get(n,"dateFormat");e.match(/[DM]/)&&(r=function(n){for(u=0,f=0,t=0;t<n.length;t++)n[t].length>u&&(u=n[t].length,f=t);return f},i.setMonth(r(this._get(n,e.match(/MM/)?"monthNames":"monthNamesShort"))),i.setDate(r(this._get(n,e.match(/DD/)?"dayNames":"dayNamesShort"))+20-i.getDay()));n.input.attr("size",this._formatDate(n,i).length)}},_inlineDatepicker:function(t,i){var r=n(t);r.hasClass(this.markerClassName)||(r.addClass(this.markerClassName).append(i.dpDiv),n.data(t,"datepicker",i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(t),i.dpDiv.css("display","block"))},_dialogDatepicker:function(t,i,u,f,e){var s,h,c,l,a,o=this._dialogInst;if(!o){this.uuid+=1;s="dp"+this.uuid;this._dialogInput=n("<input type='text' id='"+s+"' style='position: absolute; top: -100px; width: 0px;'/>");this._dialogInput.on("keydown",this._doKeyDown);n("body").append(this._dialogInput);o=this._dialogInst=this._newInst(this._dialogInput,!1);o.settings={};n.data(this._dialogInput[0],"datepicker",o)}return r(o.settings,f||{}),i=i&&i.constructor===Date?this._formatDate(o,i):i,this._dialogInput.val(i),this._pos=e?e.length?e:[e.pageX,e.pageY]:null,this._pos||(h=document.documentElement.clientWidth,c=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,a=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[h/2-100+l,c/2-150+a]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),o.settings.onSelect=u,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),n.blockUI&&n.blockUI(this.dpDiv),n.data(this._dialogInput[0],"datepicker",o),this},_destroyDatepicker:function(t){var r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(r=t.nodeName.toLowerCase(),n.removeData(t,"datepicker"),r==="input"?(f.append.remove(),f.trigger.remove(),u.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):(r==="div"||r==="span")&&u.removeClass(this.markerClassName).empty(),i===f&&(i=null,this._curInst=null))},_enableDatepicker:function(t){var i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),i==="input"?(t.disabled=!1,f.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):(i==="div"||i==="span")&&(r=u.children("."+this._inlineClass),r.children().removeClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}))},_disableDatepicker:function(t){var i,r,u=n(t),f=n.data(t,"datepicker");u.hasClass(this.markerClassName)&&(i=t.nodeName.toLowerCase(),i==="input"?(t.disabled=!0,f.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):(i==="div"||i==="span")&&(r=u.children("."+this._inlineClass),r.children().addClass("ui-state-disabled"),r.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=n.map(this._disabledInputs,function(n){return n===t?null:n}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(n){if(!n)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===n)return!0;return!1},_getInst:function(t){try{return n.data(t,"datepicker")}catch(i){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(i,u,f){var o,c,s,h,e=this._getInst(i);if(arguments.length===2&&typeof u=="string")return u==="defaults"?n.extend({},n.datepicker._defaults):e?u==="all"?n.extend({},e.settings):this._get(e,u):null;o=u||{};typeof u=="string"&&(o={},o[u]=f);e&&(this._curInst===e&&this._hideDatepicker(),c=this._getDateDatepicker(i,!0),s=this._getMinMaxDate(e,"min"),h=this._getMinMaxDate(e,"max"),r(e.settings,o),s!==null&&o.dateFormat!==t&&o.minDate===t&&(e.settings.minDate=this._formatDate(e,s)),h!==null&&o.dateFormat!==t&&o.maxDate===t&&(e.settings.maxDate=this._formatDate(e,h)),"disabled"in o&&(o.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(n(i),e),this._autoSize(e),this._setDate(e,c),this._updateAlternate(e),this._updateDatepicker(e))}
vendor: 4,561 bytes, line 125
125,_changeDatepicker:function(n,t,i){this._optionDatepicker(n,t,i)},_refreshDatepicker:function(n){var t=this._getInst(n);t&&this._updateDatepicker(t)},_setDateDatepicker:function(n,t){var i=this._getInst(n);i&&(this._setDate(i,t),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(n,t){var i=this._getInst(n);return i&&!i.inline&&this._setDateFromField(i,t),i?this._getDate(i):null},_doKeyDown:function(t){var u,e,f,i=n.datepicker._getInst(t.target),r=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,n.datepicker._datepickerShowing)switch(t.keyCode){case 9:n.datepicker._hideDatepicker();r=!1;break;case 13:return f=n("td."+n.datepicker._dayOverClass+":not(."+n.datepicker._currentClass+")",i.dpDiv),f[0]&&n.datepicker._selectDay(t.target,i.selectedMonth,i.selectedYear,f[0]),u=n.datepicker._get(i,"onSelect"),u?(e=n.datepicker._formatDate(i),u.apply(i.input?i.input[0]:null,[e,i])):n.datepicker._hideDatepicker(),!1;case 27:n.datepicker._hideDatepicker();break;case 33:n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 34:n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&n.datepicker._clearDate(t.target);r=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&n.datepicker._gotoToday(t.target);r=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?1:-1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?-n.datepicker._get(i,"stepBigMonths"):-n.datepicker._get(i,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,-7,"D");r=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,o?-1:1,"D");r=t.ctrlKey||t.metaKey;t.originalEvent.altKey&&n.datepicker._adjustDate(t.target,t.ctrlKey?+n.datepicker._get(i,"stepBigMonths"):+n.datepicker._get(i,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&n.datepicker._adjustDate(t.target,7,"D");r=t.ctrlKey||t.metaKey;break;default:r=!1}else t.keyCode===36&&t.ctrlKey?n.datepicker._showDatepicker(this):r=!1;r&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var i,r,u=n.datepicker._getInst(t.target);if(n.datepicker._get(u,"constrainInput"))return i=n.datepicker._possibleChars(n.datepicker._get(u,"dateFormat")),r=String.fromCharCode(t.charCode==null?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||r<" "||!i||i.indexOf(r)>-1},_doKeyUp:function(t){var r,i=n.datepicker._getInst(t.target);if(i.input.val()!==i.lastVal)try{r=n.datepicker.parseDate(n.datepicker._get(i,"dateFormat"),i.input?i.input.val():null,n.datepicker._getFormatConfig(i));r&&(n.datepicker._setDateFromField(i),n.datepicker._updateAlternate(i),n.datepicker._updateDatepicker(i))}catch(u){}return!0},_showDatepicker:function(t){if(t=t.target||t,t.nodeName.toLowerCase()!=="input"&&(t=n("input",t.parentNode)[0]),!n.datepicker._isDisabledDatepicker(t)&&n.datepicker._lastInput!==t){var i,s,h,u,f,e,c;(i=n.datepicker._getInst(t),n.datepicker._curInst&&n.datepicker._curInst!==i&&(n.datepicker._curInst.dpDiv.stop(!0,!0),i&&n.datepicker._datepickerShowing&&n.datepicker._hideDatepicker(n.datepicker._curInst.input[0])),s=n.datepicker._get(i,"beforeShow"),h=s?s.apply(t,[t,i]):{},h!==!1)&&(r(i.settings,h),i.lastVal=null,n.datepicker._lastInput=t,n.datepicker._setDateFromField(i),n.datepicker._inDialog&&(t.value=""),n.datepicker._pos||(n.datepicker._pos=n.datepicker._findPos(t),n.datepicker._pos[1]+=t.offsetHeight),u=!1,n(t).parents().each(function(){return u|=n(this).css("position")==="fixed",!u}),f={left:n.datepicker._pos[0],top:n.datepicker._pos[1]},n.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),n.datepicker._updateDatepicker(i),f=n.datepicker._checkOffset(i,f,u),i.dpDiv.css({position:n.datepicker._inDialog&&n.blockUI?"static":u?"fixed":"absolute",display:"none",left:f.left+"px",top:f.top+"px"}),i.inline||(e=n.datepicker._get(i,"showAnim"),c=n.datepicker._get(i,"duration"),i.dpDiv.css("z-index",o(n(t))+1),n.datepicker._datepickerShowing=!0,n.effects&&n.effects.effect[e]?i.dpDiv.show(e,n.datepicker._get(i,"showOptions"),c):i.dpDiv[e||"show"](e?c:null),n.datepicker._shouldFocusInput(i)&&i.input.trigger("focus"),n.datepicker._curInst=i))}},_updateDatepicker:function(t){this.maxRows=4;i=t;t.dpDiv.empty().append(this._generateHTML(t));this._attachHandlers(t);
125var r,u=this._getNumberOfMonths(t),f=u[1],o=t.dpDiv.find("."+this._dayOverClass+" a"),s=n.datepicker._get(t,"onUpdateDatepicker");o.length>0&&e.apply(o.get(0));t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");f>1&&t.dpDiv.addClass("ui-datepicker-multi-"+f).css("width",17*f+"em");t.dpDiv[(u[0]!==1||u[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");t===n.datepicker._curInst&&n.datepicker._datepickerShowing&&n.datepicker._shouldFocusInput(t)&&t.input.trigger("focus");t.yearshtml&&(r=t.yearshtml,setTimeout(function(){r===t.yearshtml&&t.yearshtml&&t.dpDiv.find("select.ui-datepicker-year").first().replaceWith(t.yearshtml);r=t.yearshtml=null},0));s&&s.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(n){return n.input&&n.input.is(":visible")&&!n.input.is(":disabled")&&!n.input.is(":focus")},_checkOffset:function(t,i,r){var u=t.dpDiv.outerWidth(),f=t.dpDiv.outerHeight(),h=t.input?t.input.outerWidth():0,o=t.input?t.input.outerHeight():0,e=document.documentElement.clientWidth+(r?0:n(document).scrollLeft()),s=document.documentElement.clientHeight+(r?0:n(document).scrollTop());return i.left-=this._get(t,"isRTL")?u-h:0,i.left-=r&&i.left===t.input.offset().left?n(document).scrollLeft():0,i.top-=r&&i.top===t.input.offset().top+o?n(document).scrollTop():0,i.left-=Math.min(i.left,i.left+u>e&&e>u?Math.abs(i.left+u-e):0),i.top-=Math.min(i.top,i.top+f>s&&s>f?Math.abs(f+o):0),i},_findPos:function(t){for(var i,r=this._getInst(t),u=this._get(r,"isRTL");t&&(t.type==="hidden"||t.nodeType!==1||n.expr.pseudos.hidden(t));)t=t[u?"previousSibling":"nextSibling"];return i=n(t).offset(),[i.left,i.top]},_hideDatepicker:function(t){var r,f,u,e,i=this._curInst;i&&(!t||i===n.data(t,"datepicker"))&&this._datepickerShowing&&(r=this._get(i,"showAnim"),f=this._get(i,"duration"),u=function(){n.datepicker._tidyDialog(i)},n.effects&&(n.effects.effect[r]||n.effects[r])?i.dpDiv.hide(r,n.datepicker._get(i,"showOptions"),f,u):i.dpDiv[r==="slideDown"?"slideUp":r==="fadeIn"?"fadeOut":"hide"](r?f:null,u),r||u(),this._datepickerShowing=!1,e=this._get(i,"onClose"),e&&e.apply(i.input?i.input[0]:null,[i.input?i.input.val():"",i]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),n.blockUI&&(n.unblockUI(),n("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(n){n.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(n.datepicker._curInst){var i=n(t.target),r=n.datepicker._getInst(i[0]);(i[0].id===n.datepicker._mainDivId||i.parents("#"+n.datepicker._mainDivId).length!==0||i.hasClass(n.datepicker.markerClassName)||i.closest("."+n.datepicker._triggerClass).length||!n.datepicker._datepickerShowing||n.datepicker._inDialog&&n.blockUI)&&(!i.hasClass(n.datepicker.markerClassName)||n.datepicker._curInst===r)||n.datepicker._hideDatepicker()}},_adjustDate:function(t,i,r){var u=n(t),f=this._getInst(u[0]);this._isDisabledDatepicker(u[0])||(this._adjustInstDate(f,i,r),this._updateDatepicker(f))},_gotoToday:function(t){var r,u=n(t),i=this._getInst(u[0]);this._get(i,"gotoCurrent")&&i.currentDay?(i.selectedDay=i.currentDay,i.drawMonth=i.selectedMonth=i.currentMonth,i.drawYear=i.selectedYear=i.currentYear):(r=new Date,i.selectedDay=r.getDate(),i.drawMonth=i.selectedMonth=r.getMonth(),i.drawYear=i.selectedYear=r.getFullYear());this._notifyChange(i);this._adjustDate(u)},_selectMonthYear:function(t,i,r){var f=n(t),u=this._getInst(f[0]);u["selected"+(r==="M"?"Month":"Year")]=u["draw"+(r==="M"?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10);this._notifyChange(u);this._adjustDate(f)},_selectDay:function(t,i,r,u){var f,e=n(t);n(u).hasClass(this._unselectableClass)||this._isDisabledDatepicker(e[0])||(f=this._getInst(e[0]),f.selectedDay=f.currentDay=parseInt(n("a",u).attr("data-date")),f.selectedMonth=f.currentMonth=i,f.selectedYear=f.currentYear=r,this._selectDate(t,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear)))},_clearDate:function(t){var i=n(t);this._selectDate(i,"")},_selectDate:function(t,i){var u,f=n(t),r=this._getInst(f[0]);i=i!=null?i:this._formatDate(r);r.input&&r.input.val(i);this._updateAlternate(r);u=this._get(r,"onSelect");
125u?u.apply(r.input?r.input[0]:null,[i,r]):r.input&&r.input.trigger("change");r.inline?this._updateDatepicker(r):(this._hideDatepicker(),this._lastInput=r.input[0],typeof r.input[0]!="object"&&r.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var i,r,u,f=this._get(t,"altField");f&&(i=this._get(t,"altFormat")||this._get(t,"dateFormat"),r=this._getDate(t),u=this.formatDate(i,r,this._getFormatConfig(t)),n(document).find(f).val(u))},noWeekends:function(n){var t=n.getDay();return[t>0&&t<6,""]},iso8601Week:function(n){var i,t=new Date(n.getTime());return t.setDate(t.getDate()+4-(t.getDay()||7)),i=t.getTime(),t.setMonth(0),t.setDate(1),Math.floor(Math.round((i-t)/864e5)/7)+1},parseDate:function(t,i,r){if(t==null||i==null)throw"Invalid arguments";if(i=typeof i=="object"?i.toString():i+"",i==="")return null;for(var a,v,f=0,y=(r?r.shortYearCutoff:null)||this._defaults.shortYearCutoff,d=typeof y!="string"?y:(new Date).getFullYear()%100+parseInt(y,10),g=(r?r.dayNamesShort:null)||this._defaults.dayNamesShort,nt=(r?r.dayNames:null)||this._defaults.dayNames,tt=(r?r.monthNamesShort:null)||this._defaults.monthNamesShort,it=(r?r.monthNames:null)||this._defaults.monthNames,e=-1,s=-1,h=-1,p=-1,w=!1,u,l=function(n){var i=o+1<t.length&&t.charAt(o+1)===n;return i&&o++,i},c=function(n){var u=l(n),r=n==="@"?14:n==="!"?20:n==="y"&&u?4:n==="o"?3:2,e=n==="y"?r:1,o=new RegExp("^\\d{"+e+","+r+"}"),t=i.substring(f).match(o);if(!t)throw"Missing number at position "+f;return f+=t[0].length,parseInt(t[0],10)},k=function(t,r,u){var e=-1,o=n.map(l(t)?u:r,function(n,t){return[[t,n]]}).sort(function(n,t){return-(n[1].length-t[1].length)});if(n.each(o,function(n,t){var r=t[1];if(i.substr(f,r.length).toLowerCase()===r.toLowerCase())return e=t[0],f+=r.length,!1}),e!==-1)return e+1;throw"Unknown name at position "+f;},b=function(){if(i.charAt(f)!==t.charAt(o))throw"Unexpected literal at position "+f;f++},o=0;o<t.length;o++)if(w)t.charAt(o)!=="'"||l("'")?b():w=!1;else switch(t.charAt(o)){case"d":h=c("d");break;case"D":k("D",g,nt);break;case"o":p=c("o");break;case"m":s=c("m");break;case"M":s=k("M",tt,it);break;case"y":e=c("y");break;case"@":u=new Date(c("@"));e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"!":u=new Date((c("!")-this._ticksTo1970)/1e4);e=u.getFullYear();s=u.getMonth()+1;h=u.getDate();break;case"'":l("'")?b():w=!0;break;default:b()}if(f<i.length&&(v=i.substr(f),!/^\s+/.test(v)))throw"Extra/unparsed characters found in date: "+v;if(e===-1?e=(new Date).getFullYear():e<100&&(e+=(new Date).getFullYear()-(new Date).getFullYear()%100+(e<=d?0:-100)),p>-1){s=1;h=p;do{if(a=this._getDaysInMonth(e,s-1),h<=a)break;s++;h-=a}while(1)}if(u=this._daylightSavingAdjust(new Date(e,s-1,h)),u.getFullYear()!==e||u.getMonth()+1!==s||u.getDate()!==h)throw"Invalid date";return u},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*864e9,formatDate:function(n,t,i){if(!t)return"";var u,h=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,c=(i?i.dayNames:null)||this._defaults.dayNames,l=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,a=(i?i.monthNames:null)||this._defaults.monthNames,f=function(t){var i=u+1<n.length&&n.charAt(u+1)===t;return i&&u++,i},e=function(n,t,i){var r=""+t;if(f(n))while(r.length<i)r="0"+r;return r},s=function(n,t,i,r){return f(n)?r[t]:i[t]},r="",o=!1;if(t)for(u=0;u<n.length;u++)if(o)n.charAt(u)!=="'"||f("'")?r+=n.charAt(u):o=!1;else switch(n.charAt(u)){case"d":r+=e("d",t.getDate(),2);break;case"D":r+=s("D",t.getDay(),h,c);break;case"o":r+=e("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":r+=e("m",t.getMonth()+1,2);break;case"M":r+=s("M",t.getMonth(),l,a);break;case"y":r+=f("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":r+=t.getTime();break;case"!":r+=t.getTime()*1e4+this._ticksTo1970;break;case"'":f("'")?r+="'":o=!0;break;default:r+=n.charAt(u)}return r},_possibleChars:function(n){for(var i="",r=!1,u=function(i){var r=t+1<n.length&&n.charAt(t+1)===i;return r&&t++,r},t=0;t<n.length;t++)if(r)n.charAt(t)!=="'"||u("'")?i+=n.charAt(t):r=!1;else switch(n.charAt(t)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":u("'")?i+="'":r=!0;break;default:i+=n.charAt(t)}return i},_get:function(n,i){return n.settings[i]!==t?n.settings[i]:this._defaults[i]},_setDateFromField:function(n,t){if(n.input.val()!==n.lastVal){var f=this._get(n,"dateFormat"),r=n.lastVal=n.input?n.input.val():null,u=this._getDefaultDate(n),i=u,e=this._getFormatConfig(n);try{i=this.parseDate(f,r,e)||u}catch(o){r=t?"":r}n.selectedDay=i.getDate();n.drawMonth=n.selectedMonth=i.getMonth();n.drawYear=n.selectedYear=i.getFullYear();n.currentDay=r?i.getDate():0;n.currentMonth=r?i.getMonth():0;n.currentYear=r?i.getFullYear():0;this._adjustInstDate(n)}},_getDefaultDate:function(n){return this._restrictMinMax(n,this._determineDate(n,this._get(n,"defaultDate"),new Date))},_determineDate:function(t,i,r){var f=function(n){var t=new Date;return t.setDate(t.getDate()+n),t},e=function(i){try{return n.datepicker.parseDate(n.datepicker._get(t,"dateFormat"),i,n.datepicker._getFormatConfig(t))}catch(h){}for(var o=(i.toLowerCase().match(/^c/)?n.datepicker._getDate(t):null)||new Date,f=o.getFullYear(),e=o.getMonth(),r=o.getDate(),s=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,u=s.exec(i);u;){switch(u[2]||"d"){case"d":case"D":r+=parseInt(u[1],10);break;case"w":case"W":r+=parseInt(u[1],10)*7;break;case"m":case"M":e+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e));break;
125case"y":case"Y":f+=parseInt(u[1],10);r=Math.min(r,n.datepicker._getDaysInMonth(f,e))}u=s.exec(i)}return new Date(f,e,r)},u=i==null||i===""?r:typeof i=="string"?e(i):typeof i=="number"?isNaN(i)?r:f(i):new Date(i.getTime());return u=u&&u.toString()==="Invalid Date"?r:u,u&&(u.setHours(0),u.setMinutes(0),u.setSeconds(0),u.setMilliseconds(0)),this._daylightSavingAdjust(u)},_daylightSavingAdjust:function(n){return n?(n.setHours(n.getHours()>12?n.getHours()+2:0),n):null},_setDate:function(n,t,i){var u=!t,f=n.selectedMonth,e=n.selectedYear,r=this._restrictMinMax(n,this._determineDate(n,t,new Date));n.selectedDay=n.currentDay=r.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=r.getMonth();n.drawYear=n.selectedYear=n.currentYear=r.getFullYear();f===n.selectedMonth&&e===n.selectedYear||i||this._notifyChange(n);this._adjustInstDate(n);n.input&&n.input.val(u?"":this._formatDate(n))},_getDate:function(n){return!n.currentYear||n.input&&n.input.val()===""?null:this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay))},_attachHandlers:function(t){var r=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");
vendor: 10,462 bytes, line 125
125t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){n.datepicker._adjustDate(i,-r,"M")},next:function(){n.datepicker._adjustDate(i,+r,"M")},hide:function(){n.datepicker._hideDatepicker()},today:function(){n.datepicker._gotoToday(i)},selectDay:function(){return n.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return n.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return n.datepicker._selectMonthYear(i,this,"Y"),!1}};n(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var k,h,et,c,ot,d,st,nt,ht,l,ct,fi,ei,oi,si,lt,tt,hi,at,it,s,p,vt,w,yt,a,f,pt,wt,bt,kt,rt,dt,i,gt,ni,g,v,ut,ti=new Date,ii=this._daylightSavingAdjust(new Date(ti.getFullYear(),ti.getMonth(),ti.getDate())),e=this._get(t,"isRTL"),ai=this._get(t,"showButtonPanel"),ci=this._get(t,"hideIfNoPrevNext"),ri=this._get(t,"navigationAsDateFormat"),o=this._getNumberOfMonths(t),vi=this._get(t,"showCurrentAtPos"),li=this._get(t,"stepMonths"),ui=o[0]!==1||o[1]!==1,ft=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),b=this._getMinMaxDate(t,"min"),y=this._getMinMaxDate(t,"max"),r=t.drawMonth-vi,u=t.drawYear;if(r<0&&(r+=12,u--),y)for(k=this._daylightSavingAdjust(new Date(y.getFullYear(),y.getMonth()-o[0]*o[1]+1,y.getDate())),k=b&&k<b?b:k;this._daylightSavingAdjust(new Date(u,r,1))>k;)r--,r<0&&(r=11,u--);for(t.drawMonth=r,t.drawYear=u,h=this._get(t,"prevText"),h=ri?this.formatDate(h,this._daylightSavingAdjust(new Date(u,r-li,1)),this._getFormatConfig(t)):h,et=this._canAdjustMonth(t,-1,u,r)?n("<a>").attr({"class":"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:h}).append(n("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(e?"e":"w")).text(h))[0].outerHTML:ci?"":n("<a>").attr({"class":"ui-datepicker-prev ui-corner-all ui-state-disabled",title:h}).append(n("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(e?"e":"w")).text(h))[0].outerHTML,c=this._get(t,"nextText"),c=ri?this.formatDate(c,this._daylightSavingAdjust(new Date(u,r+li,1)),this._getFormatConfig(t)):c,ot=this._canAdjustMonth(t,1,u,r)?n("<a>").attr({"class":"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:c}).append(n("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(e?"w":"e")).text(c))[0].outerHTML:ci?"":n("<a>").attr({"class":"ui-datepicker-next ui-corner-all ui-state-disabled",title:c}).append(n("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(e?"w":"e")).text(c))[0].outerHTML,d=this._get(t,"currentText"),st=this._get(t,"gotoCurrent")&&t.currentDay?ft:ii,d=ri?this.formatDate(d,st,this._getFormatConfig(t)):d,nt="",t.inline||(nt=n("<button>").attr({type:"button","class":"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),ht="",ai&&(ht=n("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(e?nt:"").append(this._isInRange(t,st)?n("<button>").attr({type:"button","class":"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(d):"").append(e?"":nt)[0].outerHTML),l=parseInt(this._get(t,"firstDay"),10),l=isNaN(l)?0:l,ct=this._get(t,"showWeek"),fi=this._get(t,"dayNames"),ei=this._get(t,"dayNamesMin"),oi=this._get(t,"monthNames"),si=this._get(t,"monthNamesShort"),lt=this._get(t,"beforeShowDay"),tt=this._get(t,"showOtherMonths"),hi=this._get(t,"selectOtherMonths"),at=this._getDefaultDate(t),it="",p=0;p<o[0];p++){for(vt="",this.maxRows=4,w=0;w<o[1];w++){if(yt=this._daylightSavingAdjust(new Date(u,r,t.selectedDay)),a=" ui-corner-all",f="",ui){if(f+="<div class='ui-datepicker-group",o[1]>1)switch(w){case 0:f+=" ui-datepicker-group-first";a=" ui-corner-"+(e?"right":"left");break;case o[1]-1:f+=" ui-datepicker-group-last";a=" ui-corner-"+(e?"left":"right");break;default:f+=" ui-datepicker-group-middle";a=""}f+="'>"}for(f+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+a+"'>"+(/all|left/.test(a)&&p===0?e?ot:et:"")+(/all|right/.test(a)&&p===0?e?et:ot:"")+this._generateMonthYearHeader(t,r,u,b,y,p>0||w>0,oi,si)+"<\/div><table class='ui-datepicker-calendar'><thead><tr>",pt=ct?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"<\/th>":"",s=0;s<7;s++)wt=(s+l)%7,pt+="<th scope='col'"+((s+l+6)%7>=5?" class='ui-datepicker-week-end'":"")+"><span title='"+fi[wt]+"'>"+ei[wt]+"<\/span><\/th>";for(f+=pt+"<\/tr><\/thead><tbody>",bt=this._getDaysInMonth(u,r),u===t.selectedYear&&r===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,bt)),kt=(this._getFirstDayOfMonth(u,r)-l+7)%7,rt=Math.ceil((kt+bt)/7),dt=ui?this.maxRows>rt?this.maxRows:rt:rt,this.maxRows=dt,i=this._daylightSavingAdjust(new Date(u,r,1-kt)),gt=0;gt<dt;gt++){for(f+="<tr>",ni=ct?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(i)+"<\/td>":"",s=0;s<7;s++)g=lt?lt.apply(t.input?t.input[0]:null,[i]):[!0,""],v=i.getMonth()!==r,ut=v&&!hi||!g[0]||b&&i<b||y&&i>y,ni+="<td class='"+((s+l+6)%7>=5?" ui-datepicker-week-end":"")+(v?" ui-datepicker-other-month":"")+(i.getTime()===yt.getTime()&&r===t.selectedMonth&&t._keyEvent||at.getTime()===i.getTime()&&at.getTime()===yt.getTime()?" "+this._dayOverClass:"")+(ut?" "+this._unselectableClass+" ui-state-disabled":"")+(v&&!tt?"":" "+g[1]+(i.getTime()===ft.getTime()?" "+this._currentClass:"")+(i.getTime()===ii.getTime()?" ui-datepicker-today":""))+"'"+((!v||tt)&&g[2]?" title='"+g[2].replace(/'/g,"'")+"'":"")+(ut?"":" data-handler='selectDay' data-event='click' data-month='"+i.getMonth()+"' data-year='"+i.getFullYear()+"'")+">"+(v&&!tt?" ":ut?"<span class='ui-state-default'>"+i.getDate()+"<\/span>":"<a class='ui-state-default"+(i.getTime()===ii.getTime()?" ui-state-highlight":"")+(i.getTime()===ft.getTime()?" ui-state-active":"")+(v?" ui-priority-secondary":"")+"' href='#' aria-current='"+(i.getTime()===ft.getTime()?"true":"false")+"' data-date='"+i.getDate()+"'>"+i.getDate()+"<\/a>")+"<\/td>",i.setDate(i.getDate()+1),i=this._daylightSavingAdjust(i);f+=ni+"<\/tr>"}r++;r>11&&(r=0,u++);f+="<\/tbody><\/table>"+(ui?"<\/div>"+(o[0]>0&&w===o[1]-1?"<div class='ui-datepicker-row-break'><\/div>":""):"");vt+=f}it+=vt}return it+=ht,t._keyEvent=!1,it},_generateMonthYearHeader:function(n,t,i,r,u,f,e,o){var k,d,h,v,y,p,s,a,w=this._get(n,"changeMonth"),b=this._get(n,"changeYear"),g=this._get(n,"showMonthAfterYear"),nt=this._get(n,"selectMonthLabel"),tt=this._get(n,"selectYearLabel"),c="<div class='ui-datepicker-title'>",l="";if(f||!w)l+="<span class='ui-datepicker-month'>"+e[t]+"<\/span>";else{for(k=r&&r.getFullYear()===i,d=u&&u.getFullYear()===i,l+="<select class='ui-datepicker-month' aria-label='"+nt+"' data-handler='selectMonth' data-event='change'>",h=0;h<12;h++)(!k||h>=r.getMonth())&&(!d||h<=u.getMonth())&&(l+="<option value='"+h+"'"+(h===t?" selected='selected'":"")+">"+o[h]+"<\/option>");l+="<\/select>"}if(g||(c+=l+(f||!(w&&b)?" ":"")),!n.yearshtml)if(n.yearshtml="",f||!b)c+="<span class='ui-datepicker-year'>"+i+"<\/span>";else{for(v=this._get(n,"yearRange").split(":"),y=(new Date).getFullYear(),p=function(n){var t=n.match(/c[+\-].*/)?i+parseInt(n.substring(1),10):n.match(/[+\-].*/)?y+parseInt(n,10):parseInt(n,10);return isNaN(t)?y:t},s=p(v[0]),a=Math.max(s,p(v[1]||"")),s=r?Math.max(s,r.getFullYear()):s,a=u?Math.min(a,u.getFullYear()):a,n.yearshtml+="<select class='ui-datepicker-year' aria-label='"+tt+"' data-handler='selectYear' data-event='change'>";s<=a;s++)n.yearshtml+="<option value='"+s+"'"+(s===i?" selected='selected'":"")+">"+s+"<\/option>";n.yearshtml+="<\/select>";c+=n.yearshtml;n.yearshtml=null}return c+=this._get(n,"yearSuffix"),g&&(c+=(f||!(w&&b)?" ":"")+l),c+"<\/div>"},_adjustInstDate:function(n,t,i){var u=n.selectedYear+(i==="Y"?t:0),f=n.selectedMonth+(i==="M"?t:0),e=Math.min(n.selectedDay,this._getDaysInMonth(u,f))+(i==="D"?t:0),r=this._restrictMinMax(n,this._daylightSavingAdjust(new Date(u,f,e)));n.selectedDay=r.getDate();n.drawMonth=n.selectedMonth=r.getMonth();n.drawYear=n.selectedYear=r.getFullYear();(i==="M"||i==="Y")&&this._notifyChange(n)},_restrictMinMax:function(n,t){var i=this._getMinMaxDate(n,"min"),r=this._getMinMaxDate(n,"max"),u=i&&t<i?i:t;return r&&u>r?r:u},_notifyChange:function(n){var t=this._get(n,"onChangeMonthYear");t&&t.apply(n.input?n.input[0]:null,[n.selectedYear,n.selectedMonth+1,n])},_getNumberOfMonths:function(n){var t=this._get(n,"numberOfMonths");return t==null?[1,1]:typeof t=="number"?[1,t]:t},_getMinMaxDate:function(n,t){return this._determineDate(n,this._get(n,t+"Date"),null)},_getDaysInMonth:function(n,t){return 32-this._daylightSavingAdjust(new Date(n,t,32)).getDate()},_getFirstDayOfMonth:function(n,t){return new Date(n,t,1).getDay()},_canAdjustMonth:function(n,t,i,r){var f=this._getNumberOfMonths(n),u=this._daylightSavingAdjust(new Date(i,r+(t<0?t:f[0]*f[1]),1));return t<0&&u.setDate(this._getDaysInMonth(u.getFullYear(),u.getMonth())),this._isInRange(n,u)},_isInRange:function(n,t){var i,f,e=this._getMinMaxDate(n,"min"),o=this._getMinMaxDate(n,"max"),r=null,u=null,s=this._get(n,"yearRange");return s&&(i=s.split(":"),f=(new Date).getFullYear(),r=parseInt(i[0],10),u=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=f),i[1].match(/[+\-].*/)&&(u+=f)),(!e||t.getTime()>=e.getTime())&&(!o||t.getTime()<=o.getTime())&&(!r||t.getFullYear()>=r)&&(!u||t.getFullYear()<=u)},_getFormatConfig:function(n){var t=this._get(n,"shortYearCutoff");return t=typeof t!="string"?t:(new Date).getFullYear()%100+parseInt(t,10),{shortYearCutoff:t,dayNamesShort:this._get(n,"dayNamesShort"),dayNames:this._get(n,"dayNames"),monthNamesShort:this._get(n,"monthNamesShort"),monthNames:this._get(n,"monthNames")}},_formatDate:function(n,t,i,r){t||(n.currentDay=n.selectedDay,n.currentMonth=n.selectedMonth,n.currentYear=n.selectedYear);var u=t?typeof t=="object"?t:this._daylightSavingAdjust(new Date(r,i,t)):this._daylightSavingAdjust(new Date(n.currentYear,n.currentMonth,n.currentDay));return this.formatDate(this._get(n,"dateFormat"),u,this._getFormatConfig(n))}});n.fn.datepicker=function(t){if(!this.length)return this;if(!n.datepicker.initialized){n(document).on("mousedown",n.datepicker._checkExternalClick);n.datepicker.initialized=!0}n("#"+n.datepicker._mainDivId).length===0&&n("body").append(n.datepicker.dpDiv);
125var i=Array.prototype.slice.call(arguments,1);return typeof t=="string"&&(t==="isDisabled"||t==="getDate"||t==="widget")?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):t==="option"&&arguments.length===2&&typeof arguments[1]=="string"?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this[0]].concat(i)):this.each(function(){typeof t=="string"?n.datepicker["_"+t+"Datepicker"].apply(n.datepicker,[this].concat(i)):n.datepicker._attachDatepicker(this,t)})};n.datepicker=new u;n.datepicker.initialized=!1;n.datepicker.uuid=(new Date).getTime();n.datepicker.version="1.13.2";s=n.datepicker}(jQuery); 126/*! 127 * jQuery contextMenu - Plugin for simple contextMenu handling 128 * 129 * Version: 1.6.5 130 * 131 * Authors: Rodney Rehm, Addy Osmani (patches for FF) 132 * Web: http://medialize.github.com/jQuery-contextMenu/ 133 * 134 * Licensed under 135 * MIT License http://www.opensource.org/licenses/mit-license 136 * GPL v3 http://opensource.org/licenses/GPL-3.0 137 * 138 */ 139giContextMenuCounter=0,function(n,t){function w(n){for(var u=n.split(/\s+/),i=[],r=0,t;t=u[r];r++)t=t[0].toUpperCase(),i.push(t);return i}function h(t){return t.id&&n('label[for="'+t.id+'"]').val()||t.name}function y(i,r,u){return u||(u=0),r.each(function(){var r=n(this),e=this,s=this.nodeName.toLowerCase(),o,f;s=="label"&&r.find("input, textarea, select").length&&(o=r.text(),r=r.children().first(),e=r.get(0),s=e.nodeName.toLowerCase());switch(s){case"menu":f={name:r.attr("label"),items:{}};u=y(f.items,r.children(),u);break;case"a":case"button":f={name:r.text(),disabled:!!r.attr("disabled"),callback:function(){return function(){r.click()}}()};break;case"menuitem":case"command":switch(r.attr("type")){case t:case"command":case"menuitem":f={name:r.attr("label"),disabled:!!r.attr("disabled"),callback:function(){return function(){r.click()}}()};break;case"checkbox":f={type:"checkbox",disabled:!!r.attr("disabled"),name:r.attr("label"),selected:!!r.attr("checked")};break;case"radio":f={type:"radio",disabled:!!r.attr("disabled"),name:r.attr("label"),radio:r.attr("radiogroup"),value:r.attr("id"),selected:!!r.attr("checked")};break;default:f=t}break;case"hr":f="-------";break;case"input":switch(r.attr("type")){case"text":f={type:"text",name:o||h(e),disabled:!!r.attr("disabled"),value:r.val()};break;case"checkbox":f={type:"checkbox",name:o||h(e),disabled:!!r.attr("disabled"),selected:!!r.attr("checked")};break;case"radio":f={type:"radio",name:o||h(e),disabled:!!r.attr("disabled"),radio:!!r.attr("name"),value:r.val(),selected:!!r.attr("checked")};break;default:f=t}break;case"select":f={type:"select",name:o||h(e),disabled:!!r.attr("disabled"),selected:r.val(),options:{}};r.children().each(function(){f.options[this.value]=n(this).text()});break;case"textarea":f={type:"textarea",name:o||h(e),disabled:!!r.attr("disabled"),value:r.val()};break;case"label":break;default:f={type:"html",html:r.clone(!0)}}f&&(u++,i["key"+u]=f)}),u}var v;n.support.htmlMenuitem="HTMLMenuItemElement"in window;n.support.htmlCommand="HTMLCommandElement"in window;n.support.eventSelectstart="onselectstart"in document.documentElement;n.ui&&n.ui.widget||(v=n.cleanData,n.cleanData=function(t){for(var i=0,r;(r=t[i])!=null;i++)try{n(r).triggerHandler("remove")}catch(u){}v(t)});var r=null,c=!1,o=n(window),s={},u={},l={},a={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!0,determinePosition:function(t){if(n.ui&&n.ui.position)t.css("display","block").position({my:"center top",at:"center bottom","of":this,offset:"0 5",collision:"fit"}).css("display","none");else{var i=this.offset();i.top+=this.outerHeight();i.left+=this.outerWidth()/2-t.outerWidth()/2;t.css(i)}},position:function(n,t,i){var c=this,r,u;if(t||i)r=t==="maintain"&&i==="maintain"?n.$menu.position():{top:i,left:t};else{n.determinePosition.call(this,n.$menu);return}u=3;r.left+=u;var s=o.scrollTop()+o.height(),h=o.scrollLeft()+o.width(),f=n.$menu.outerHeight(),e=n.$menu.outerWidth();r.top+f>s&&(r.top=Math.max(0,r.top-f));r.left+e>h&&(r.left-=e+u*2);n.$menu.css(r);n.focusOnFirstItem()},positionSubmenu:function(t){if(n.ui&&n.ui.position)t.css("display","block").position({my:"left top",at:"right top","of":this,collision:"flipfit fit"}).css("display","");else{var i={top:0,left:this.outerWidth()};t.css(i)}},focusOnFirstItem:function(){setTimeout(function(){var t=n(".context-menu-item > *").first()[0];t&&n(t).trigger("contextmenu:focus")},10)},zIndex:100,animation:{duration:100,show:"slideDown",hide:"slide
139Up"},events:{show:n.noop,hide:n.noop},callback:null,items:{}},f={timer:null,pageX:null,pageY:null},p=function(n){for(var i=0,t=n;;)if(i=Math.max(i,parseInt(t.css("z-index"),10)||0),t=t.parent(),!t||!t.length||"html body".indexOf(t.prop("nodeName").toLowerCase())>-1)break;return i},i={abortevent:function(n){n.preventDefault();n.stopImmediatePropagation()},contextmenu:function(t){var i=n(this),u;if((t.preventDefault(),t.stopImmediatePropagation(),t.data.trigger=="right"||!t.originalEvent)&&!i.hasClass("context-menu-active")&&!i.hasClass("context-menu-disabled")){if(r=i,t.data.build){if(u=t.data.build(r,t),u===!1)return;if(t.data=n.extend(!0,{},a,t.data,u||{}),!t.data.items||n.isEmptyObject(t.data.items)){window.console&&(console.error||console.log)("No items specified to show in contextMenu");throw new Error("No Items sepcified");}t.data.$trigger=r;e.create(t.data)}e.show.call(i,t.data,t.pageX,t.pageY)}},click:function(t){t.preventDefault();t.stopImmediatePropagation();n(this).trigger(n.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY}))},mousedown:function(t){var i=n(this);r&&r.length&&!r.is(i)&&r.data("contextMenu").$menu.trigger("contextmenu:hide");t.button===2&&(r=i.data("contextMenuActive",!0))},mouseup:function(t){var i=n(this);i.data("contextMenuActive")&&r&&r.length&&r.is(i)&&!i.hasClass("context-menu-disabled")&&(t.preventDefault(),t.stopImmediatePropagation(),r=i,i.trigger(n.Event("contextmenu",{data:t.data,pageX:t.pageX,pageY:t.pageY})));i.removeData("contextMenuActive")},mouseenter:function(t){var u=n(this),e=n(t.relatedTarget),o=n(document);if(!e.is(".context-menu-list")&&!e.closest(".context-menu-list").length&&(!r||!r.length)){f.pageX=t.pageX;f.pageY=t.pageY;f.data=t.data;o.on("mousemove.contextMenuShow",i.mousemove);f.timer=setTimeout(function(){f.timer=null;o.off("mousemove.contextMenuShow");r=u;u.trigger(n.Event("contextmenu",{data:f.data,pageX:f.pageX,pageY:f.pageY}))},t.data.delay)}},mousemove:function(n){f.pageX=n.pageX;f.pageY=n.pageY},mouseleave:function(t){var i=n(t.relatedTarget);if(!i.is(".context-menu-list")&&!i.closest(".context-menu-list").length){try{clearTimeout(f.timer)}catch(t){}f.timer=null}},layerClick:function(t){var h=n(this),i=h.data("contextMenuRoot"),s=t.button,f=t.pageX,e=t.pageY,u,r;t.preventDefault();t.stopImmediatePropagation();setTimeout(function(){var h,c=i.trigger=="left"&&s===0||i.trigger=="right"&&s===2;if(document.elementFromPoint&&(i.$layer.hide(),u=document.elementFromPoint(f-o.scrollLeft(),e-o.scrollTop()),i.$layer.show()),i.reposition&&c)if(document.elementFromPoint){if(i.$trigger.is(u)||i.$trigger.has(u).length){i.position.call(i.$trigger,i,f,e);return}}else if(r=i.$trigger.offset(),h=n(window),r.top+=h.scrollTop(),r.top<=t.pageY&&(r.left+=h.scrollLeft(),r.left<=t.pageX&&(r.bottom=r.top+i.$trigger.outerHeight(),r.bottom>=t.pageY&&(r.right=r.left+i.$trigger.outerWidth(),r.right>=t.pageX)))){i.position.call(i.$trigger,i,f,e);return}if(u&&c)i.$trigger.one("contextmenu:hidden",function(){n(u).contextMenu({x:f,y:e})});i.$menu.trigger("contextmenu:hide")},50)},keyStop:function(n,t){t.isInput||n.preventDefault();n.stopPropagation()},key:function(n){var t=r.data("contextMenu")||{},e,u,f;switch(n.keyCode){case 9:case 38:if(i.keyStop(n,t),t.isInput){if(n.keyCode==9&&n.shiftKey){n.preventDefault();t.$selected&&t.$selected.find("input, textarea, select").blur();t.$menu.trigger("prevcommand");return}if(n.keyCode==38&&t.$selected.find("input, textarea, select").prop("type")=="checkbox"){n.preventDefault();return}}else if(n.keyCode!=9||n.shiftKey){t.$menu.trigger("prevcommand");return}case 40:if(i.keyStop(n,t),t.isInput){if(n.keyCode==9){n.preventDefault();t.$selected&&t.$selected.find("input, textarea, select").blur();t.$menu.trigger("nextcommand");return}if(n.keyCode==40&&t.$selected.find("input, textarea, select").prop("type")=="checkbox"){n.preventDefault();return}}else{t.$menu.trigger("nextcommand");return}break;case 37:if(i.keyStop(n,t),t.isInput||!t.$selected||!t.$selected.length)break;if(!t.$selected.parent().hasClass("context-menu-root")){e=t.$selected.parent().parent();
139t.$selected.trigger("contextmenu:blur");t.$selected=e;return}break;case 39:if(i.keyStop(n,t),t.isInput||!t.$selected||!t.$selected.length)break;if(u=t.$selected.data("contextMenu")||{},u.$menu&&t.$selected.hasClass("context-menu-submenu")){t.$selected=null;u.$selected=null;u.$menu.trigger("nextcommand");return}break;case 35:case 36:if(t.$selected&&t.$selected.find("input, textarea, select").length)return;(t.$selected&&t.$selected.parent()||t.$menu).children(":not(.disabled, .not-selectable)")[n.keyCode==36?"first":"last"]().trigger("contextmenu:focus");n.preventDefault();return;case 13:if(i.keyStop(n,t),t.isInput){if(t.$selected&&!t.$selected.is("textarea, select")){n.preventDefault();return}break}t.$selected&&t.$selected.trigger("mouseup");return;case 32:case 33:case 34:i.keyStop(n,t);return;case 27:i.keyStop(n,t);t.$menu.trigger("contextmenu:hide");return;default:if(f=String.fromCharCode(n.keyCode).toUpperCase(),t.accesskeys[f]){t.accesskeys[f].$node.trigger(t.accesskeys[f].$menu?"contextmenu:focus":"mouseup");return}}n.stopPropagation();t.$selected&&t.$selected.trigger(n)},prevItem:function(t){var r,e,f;t.stopPropagation();r=n(this).data("contextMenu")||{};r.$selected&&(e=r.$selected,r=r.$selected.parent().data("contextMenu")||{},r.$selected=e);for(var o=r.$menu.children(),u=!r.$selected||!r.$selected.prev().length?o.last():r.$selected.prev(),s=u;u.hasClass("disabled")||u.hasClass("not-selectable");)if(u=u.prev().length?u.prev():o.last(),u.is(s))return;r.$selected&&i.itemMouseleave.call(r.$selected.get(0),t);i.itemMouseenter.call(u.get(0),t);f=u.find("input, textarea, select");f.length&&f.focus()},nextItem:function(t){var r,e,f;t.stopPropagation();r=n(this).data("contextMenu")||{};r.$selected&&(e=r.$selected,r=r.$selected.parent().data("contextMenu")||{},r.$selected=e);for(var o=r.$menu.children(),u=!r.$selected||!r.$selected.next().length?o.first():r.$selected.next(),s=u;u.hasClass("disabled")||u.hasClass("not-selectable");)if(u=u.next().length?u.next():o.first(),u.is(s))return;r.$selected&&i.itemMouseleave.call(r.$selected.get(0),t);i.itemMouseenter.call(u.get(0),t);f=u.find("input, textarea, select");f.length&&f.focus()},focusInput:function(){var t=n(this).closest(".context-menu-item"),i=t.data(),r=i.contextMenu,u=i.contextMenuRoot;u.$selected=r.$selected=t;u.isInput=r.isInput=!0},blurInput:function(){var i=n(this).closest(".context-menu-item"),t=i.data(),r=t.contextMenu,u=t.contextMenuRoot;u.isInput=r.isInput=!1},menuMouseenter:function(){var t=n(this).data().contextMenuRoot;t.hovering=!0},menuMouseleave:function(t){var i=n(this).data().contextMenuRoot;i.$layer&&i.$layer.is(t.relatedTarget)&&(i.hovering=!1)},itemMouseenter:function(t){var i=n(this),f=i.data(),r=f.contextMenu,u=f.contextMenuRoot;if(u.hovering=!0,t&&u.$layer&&u.$layer.is(t.relatedTarget)&&(t.preventDefault(),t.stopImmediatePropagation()),(r.$menu?r:u).$menu.children(".hover").trigger("contextmenu:blur"),i.hasClass("disabled")||i.hasClass("not-selectable")){r.$selected=null;return}n(r.$selected).focus();i.trigger("contextmenu:focus")},itemMouseleave:function(t){var u=n(this),f=u.data(),r=f.contextMenu,i=f.contextMenuRoot;if(i!==r&&i.$layer&&i.$layer.is(t.relatedTarget)){i.$selected&&i.$selected.trigger("contextmenu:blur");t.preventDefault();t.stopImmediatePropagation();i.$selected=r.$selected=r.$node;return}u.trigger("contextmenu:blur")},itemClick:function(t){var o=n(this),u=o.data(),s=u.contextMenu,i=u.contextMenuRoot,r=u.contextMenuKey,f;if(s.items[r]&&!o.is(".disabled, .context-menu-submenu, .context-menu-separator, .not-selectable")){if(t.preventDefault(),t.stopImmediatePropagation(),n.isFunction(i.callbacks[r])&&Object.prototype.hasOwnProperty.call(i.callbacks,r))f=i.callbacks[r];else if(n.isFunction(i.callback))f=i.callback;else return;f.call(i.$trigger,r,i)!==!1?i.$menu.trigger("contextmenu:hide"):i.$menu.parent().length&&e.update.call(i.$trigger,i)}},inputClick:function(n){n.stopImmediatePropagation()},hideMenu:function(t,i){var r=n(this).data("contextMenuRoot");e.hide.call(r.$trigger,r,i&&i.force)},focusItem:function(t){t.stopPropagation();var r=n(this),u=r.data(),i=u.contextMenu,f=u.contextMenuRoot;r.addClass("hover").siblings(".hover").trigger("contextmenu:blur");i.$selected=f.$selected=r;i.$node&&f.positionSubmenu.call(i.$node,i.$menu)},blurItem:function(t){t.stopPropagation();var i=n(this),r=i.data(),u=r.contextMenu,f=r.contextMenuRoot;i.removeClass("hover");u.$selected=null}},e={show:function(t,u,f){var o=n(this),s={};if(n("#context-menu-layer").trigger("mousedown"),t.$trigger=o,t.events.show.call(o,t)===!1){r=null;return}e.update.call(o,t);t.position.call(o,t,u,f);t.zIndex&&(s.zIndex=Math.max(p(o),StackMgr.GetInstance().GetIndex())+t.zIndex);e.layer.call(t.$menu,t,s.zIndex);t.$menu.find("ul").css("zIndex",s.zIndex+1);t.$menu.css(s)[t.animation.show](t.animation.duration,function(){o.trigger("contextmenu:visible")});
139o.data("contextMenu",t).addClass("context-menu-active");t.$layer[0].showPopover();t.$menu[0].showPopover();n(document).off("keydown.contextMenu").on("keydown.contextMenu",i.key);if(t.autoHide)n(document).on("mousemove.contextMenuAutoHide",function(n){var i=o.offset();i.right=i.left+o.outerWidth();i.bottom=i.top+o.outerHeight();!t.$layer||t.hovering||n.pageX>=i.left&&n.pageX<=i.right&&n.pageY>=i.top&&n.pageY<=i.bottom||t.$menu.trigger("contextmenu:hide")})},hide:function(i,u){var f=n(this);if(i||(i=f.data("contextMenu")||{}),u||!i.events||i.events.hide.call(f,i)!==!1){if(f.removeData("contextMenu").removeClass("context-menu-active"),i.$menu[0].hidePopover(),i.$layer){setTimeout(function(n){return function(){n.remove();Matrix3&&Matrix3.moCMS&&Matrix3.moCMS.RerenderVUCButtons&&Matrix3.moCMS.RerenderVUCButtons(!0)}}(i.$layer),10);try{delete i.$layer}catch(e){i.$layer=null}}r=null;i.$menu.find(".hover").trigger("contextmenu:blur");i.$selected=null;n(document).off(".contextMenuAutoHide").off("keydown.contextMenu");i.$menu&&i.$menu[i.animation.hide](i.animation.duration,function(){i.build&&(i.$menu.remove(),n.each(i,function(n){switch(n){case"ns":case"selector":case"build":case"trigger":return!0;default:i[n]=t;try{delete i[n]}catch(r){}return!0}}));setTimeout(function(){f.trigger("contextmenu:hidden")},10)})}},create:function(r,u){u===t&&(u=r);r.$menu=n('<ul class="context-menu-list"><\/ul>').addClass(r.className||"").data({contextMenu:r,contextMenuRoot:u});n.each(["callbacks","commands","inputs"],function(n,t){r[t]={};u[t]||(u[t]={})});u.accesskeys||(u.accesskeys={});n.each(r.items,function(t,f){var o=n('<li class="context-menu-item"><\/li>').addClass(f.className||""),h=null,s=null,v,a,c,y;o.on("click",n.noop);if(f.$node=o.data({contextMenu:r,contextMenuRoot:u,contextMenuKey:t}),f.accesskey)for(v=w(f.accesskey),a=0;c=v[a];a++)if(!u.accesskeys[c]){u.accesskeys[c]=f;f._name=f.name.replace(new RegExp("("+c+")","i"),'<span class="context-menu-accesskey">$1<\/span>');break}if(typeof f=="string")o.addClass("context-menu-separator not-selectable");else if(f.type&&l[f.type])l[f.type].call(o,f,r,u),n.each([r,u],function(i,r){r.commands[t]=f;n.isFunction(f.callback)&&(r.callbacks[t]=f.callback)});else{f.type=="html"?o.addClass("context-menu-html not-selectable"):f.type?(h=n("<label><\/label>").appendTo(o),n("<span><\/span>").html(f._name||f.name).appendTo(h),o.addClass("context-menu-input"),r.hasTypes=!0,n.each([r,u],function(n,i){i.commands[t]=f;i.inputs[t]=f})):f.items&&(f.type="sub");switch(f.type){case"text":s=n('<input type="text" value="1" name="" value="">').attr("name","context-menu-input-"+t).val(f.value||"").appendTo(h);break;case"textarea":s=n('<textarea name=""><\/textarea>').attr("name","context-menu-input-"+t).val(f.value||"").appendTo(h);f.height&&s.height(f.height);break;case"checkbox":s=n('<input type="checkbox" value="1" name="" value="">').attr("name","context-menu-input-"+t).val(f.value||"").prop("checked",!!f.selected).prependTo(h);break;case"radio":s=n('<input type="radio" value="1" name="" value="">').attr("name","context-menu-input-"+f.radio).val(f.value||"").prop("checked",!!f.selected).prependTo(h);break;case"select":s=n('<select name="">').attr("name","context-menu-input-"+t).appendTo(h);f.options&&(n.each(f.options,function(t,i){n("<option><\/option>").val(t).text(i).appendTo(s)}),s.val(f.selected));break;case"sub":n("<span><\/span>").html(f._name||f.name).appendTo(o);f.appendTo=f.$node;e.create(f,u);o.data("contextMenu",f).addClass("context-menu-submenu");f.callback=null;break;case"html":n(f.html).appendTo(o);break;default:n.each([r,u],function(i,r){r.commands[t]=f;n.isFunction(f.callback)&&(r.callbacks[t]=f.callback)});y=n('<a aria-label="'+f.arialabel+'"><\/a>').html('<span aria-hidden="true">'+(f._name||f.name||"")+"<\/span>");y.appendTo(o)}if(f.type&&f.type!="sub"&&f.type!="html"){s.on("focus",i.focusInput).on("blur",i.blurInput);if(f.events)s.on(f.events,r)}f.icon&&o.addClass("icon icon-"+f.icon)}if(f.$input=s,f.$label=h,o.appendTo(r.$menu),!r.hasTypes&&n.support.eventSelectstart)o.on("selectstart.disableTextSelect",i.abortevent)});
139r.$node||r.$menu.css("display","none").css("border","none").addClass("context-menu-root").attr("popover","manual");r.$menu.appendTo(r.appendTo||document.body);Matrix3&&Matrix3.moCMS&&Matrix3.moCMS.RerenderVUCButtons&&Matrix3.moCMS.RerenderVUCButtons()},resize:function(t,i){t.css({position:"absolute",display:"block"});t.data("width",Math.ceil(t.width())+1);t.css({position:"static",minWidth:"0px",maxWidth:"100000px"});t.find("> li > ul").each(function(){e.resize(n(this),!0)});i||t.find("ul").addBack().css({position:"",display:"",minWidth:"",maxWidth:""}).width(function(){return n(this).data("width")})},update:function(i,r){var u=this;r===t&&(r=i,e.resize(i.$menu));i.$menu.children().each(function(){var f=n(this),o=f.data("contextMenuKey"),t=i.items[o],s=n.isFunction(t.disabled)&&t.disabled.call(u,o,r)||t.disabled===!0;if(f[s?"addClass":"removeClass"]("disabled"),t.type){f.find("input, select, textarea").prop("disabled",s);switch(t.type){case"text":case"textarea":t.$input.val(t.value||"");break;case"checkbox":case"radio":t.$input.val(t.value||"").prop("checked",!!t.selected);break;case"select":t.$input.val(t.selected||"")}}t.$menu&&e.update.call(u,t,r)})},layer:function(t,r){var u=t.$layer=n('<div id="context-menu-layer" style="position:fixed; z-index:'+r+'; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;"><\/div>').css({height:o.height(),width:o.width(),display:"block"}).data("contextMenuRoot",t).attr("popover","manual").insertBefore(this).on("contextmenu",i.abortevent).on("mousedown",i.layerClick);return n.support.fixedPosition||u.css({position:"absolute",height:n(document).height()}),u}};n.fn.contextMenu=function(i){if(i===t)this.first().trigger("contextmenu");else if(i.x&&i.y)this.first().trigger(n.Event("contextmenu",{pageX:i.x,pageY:i.y}));else if(i==="hide"){var r=this.data("contextMenu").$menu;r&&r.trigger("contextmenu:hide")}else i==="destroy"?n.contextMenu("destroy",{context:this}):n.isPlainObject(i)?(i.context=this,n.contextMenu("create",i)):i?this.removeClass("context-menu-disabled"):i||this.addClass("context-menu-disabled");return this};n.contextMenu=function(r,f){var p,h,w;typeof r!="string"&&(f=r,r="create");typeof f=="string"?f={selector:f}:f===t&&(f={});var o=n.extend(!0,{},a,f||{}),v=n(document),l=v,y=!1;o.context&&o.context.length?(l=n(o.context).first(),o.context=l.get(0),y=o.context!==document):o.context=document;switch(r){case"create":if(!o.selector)throw new Error("No selector specified");if(o.selector.match(/.context-menu-(list|item|input)($|\s)/))throw new Error('Cannot bind to selector "'+o.selector+'" as it contains a reserved className');if(!o.build&&(!o.items||n.isEmptyObject(o.items)))throw new Error("No Items sepcified");if(giContextMenuCounter++,o.ns=".contextMenu_"+giContextMenuCounter,y||(s[o.selector]=o.ns),u[o.ns]=o,o.trigger||(o.trigger="right"),!c){v.on({"contextmenu:hide.contextMenu":i.hideMenu,"prevcommand.contextMenu":i.prevItem,"nextcommand.contextMenu":i.nextItem,"contextmenu.contextMenu":i.abortevent,"mouseenter.contextMenu":i.menuMouseenter,"mouseleave.contextMenu":i.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",i.inputClick).on({"mouseup.contextMenu":i.itemClick,"contextmenu:focus.contextMenu":i.focusItem,"contextmenu:blur.contextMenu":i.blurItem,"contextmenu.contextMenu":i.abortevent,"mouseenter.contextMenu":i.itemMouseenter,"mouseleave.contextMenu":i.itemMouseleave},".context-menu-item");c=!0}p=n(o.selector);p.hasClass("context-menu-active")&&p.removeClass("context-menu-active");l.on("contextmenu"+o.ns,o.selector,o,i.contextmenu);if(y)l.on("remove"+o.ns,function(){n(this).contextMenu("destroy")});switch(o.trigger){case"hover":l.on("mouseenter"+o.ns,o.selector,o,i.mouseenter).on("mouseleave"+o.ns,o.selector,o,i.mouseleave);break;case"left":l.on("click"+o.ns,o.selector,o,i.click)}o.build||e.create(o);break;case"destroy":if(y)w=o.context,n.each(u,function(t,i){if(i.context!==w)return!0;h=n(".context-menu-list").filter(":visible");h.length&&h.data().contextMenuRoot.$trigger.is(n(i.context).find(i.selector))&&h.trigger("contextmenu:hide",{force:!0});try{u[i.ns].$menu&&u[i.ns].$menu.remove();delete u[i.ns]}catch(r){u[i.ns]=null}return n(i.context).off(i.ns),!0});else if(o.selector){if(s[o.selector]){h=n(".context-menu-list").filter(":visible");h.length&&h.data().contextMenuRoot.$trigger.is(o.selector)&&h.trigger("contextmenu:hide",{force:!0});try{u[s[o.selector]].$menu&&u[s[o.selector]].$menu.remove();delete u[s[o.selector]]}catch(b){u[s[o.selector]]=null}v.off(s[o.selector])}}else v.off(".contextMenu .contextMenuAutoHide"),n.each(u,function(t,i){n(i.context).off(i.ns)}),s={},u={},c=!1,n("#context-menu-layer, .context-menu-list").remove();break;case"html5":(n.support.htmlCommand||n.support.htmlMenuitem)&&(typeof f!="boolean"||!f)||n('menu[type="context"]').each(function(){this.id&&n.contextMenu({selector:"[contextmenu="+this.id+"]",items:n.contextMenu.fromMenu(this)})}).css("display","none");break;default:throw new Error('Unknown operation "'+r+'"');}return this};n.contextMenu.setInputValues=function(i,r){r===t&&(r={});n.each(i.inputs,function(n,t){switch(t.type){case"text":case"textarea":t.value=r[n]||"";break;case"checkbox":t.selected=r[n]?!0:!1;break;case"radio":t.selected=(r[t.radio]||"")==t.value?!0:!1;break;case"select":t.selected=r[n]||""}})};n.contextMenu.getInputValues=function(i,r){return r===t&&(r={}),n.each(i.inputs,function(n,t){switch(t.type){case"text":case"textarea":case"select":r[n]=t.$input.val();break;case"checkbox":r[n]=t.$input.prop("checked");break;case"radio":t.$input.prop("checked")&&(r[t.radio]=t.value)}}),r};n.contextMenu.fromMenu=function(t){var r=n(t),i={};return y(i,r.children()),i};n.contextMenu.defaults=a;n.contextMenu.types=l;n.contextMenu.handle=i;n.contextMenu.op=e;n.contextMenu.menus=u}(jQuery);!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).uuidv4=t()}(this,function(){"use strict";function u(){if(!i)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(r)}function e(n){return"string"==typeof n&&f.test(n)}for(var i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),r=new
139Uint8Array(16),f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,n=[],t=0;t<256;++t)n.push((t+256).toString(16).substr(1));return function(t,i,r){var f=(t=t||{}).random||(t.rng||u)(),o;if(f[6]=15&f[6]|64,f[8]=63&f[8]|128,i){for(r=r||0,o=0;o<16;++o)i[r+o]=f[o];return i}return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(n[t[i+0]]+n[t[i+1]]+n[t[i+2]]+n[t[i+3]]+"-"+n[t[i+4]]+n[t[i+5]]+"-"+n[t[i+6]]+n[t[i+7]]+"-"+n[t[i+8]]+n[t[i+9]]+"-"+n[t[i+10]]+n[t[i+11]]+n[t[i+12]]+n[t[i+13]]+n[t[i+14]]+n[t[i+15]]).toLowerCase();if(!e(r))throw TypeError("Stringified UUID is invalid");return r}(f)}}); 140/*! @license DOMPurify 3.4.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.2/LICENSE */ 141!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).DOMPurify=t()}(this,function(){"use strict";function i(n){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,u=new Array(r>1?r-1:0),i=1;i<r;i++)u[i-1]=arguments[i];return k(n,t,u)}}function n(n,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;if(b&&b(n,null),!f(t))return n;let i=t.length;for(;i--;){let u=t[i];if("string"==typeof u){const n=r(u);n!==u&&(kt(t)||(t[i]=n),u=n)}n[u]=!0}return n}function fi(n){for(let i=0;i<n.length;i++)t(n,i)||(n[i]=null);return n}function e(n){const i=s(null);for(const[u,r]of ft(n))t(n,u)&&(i[u]=f(r)?fi(r):r&&"object"==typeof r&&r.constructor===Object?e(r):r);return i}function c(n,t){for(;null!==n;){const r=gt(n,t);if(r){if(r.get)return i(r.get);if("function"==typeof r.value)return i(r.value)}n=dt(n)}return function(){return null}}var lt,ut;const{entries:ft,setPrototypeOf:b,isFrozen:kt,getPrototypeOf:dt,getOwnPropertyDescriptor:gt}=Object;let{freeze:u,seal:o,create:s}=Object,{apply:k,construct:d}="undefined"!=typeof Reflect&&Reflect;u||(u=function(n){return n});o||(o=function(n){return n});k||(k=function(n,t){for(var r=arguments.length,u=new Array(r>2?r-2:0),i=2;i<r;i++)u[i-2]=arguments[i];return n.apply(t,u)});d||(d=function(n){for(var i=arguments.length,r=new Array(i>1?i-1:0),t=1;t<i;t++)r[t-1]=arguments[t];return new n(...r)});const l=i(Array.prototype.forEach),ni=i(Array.prototype.lastIndexOf),et=i(Array.prototype.pop),a=i(Array.prototype.push),ti=i(Array.prototype.splice),f=Array.isArray,v=i(String.prototype.toLowerCase),g=i(String.prototype.toString),ot=i(String.prototype.match),h=i(String.prototype.replace),st=i(String.prototype.indexOf),ii=i(String.prototype.trim),ri=i(Number.prototype.toString),ui=i(Boolean.prototype.toString),ht="undefined"==typeof BigInt?null:i(BigInt.prototype.toString),ct="undefined"==typeof Symbol?null:i(Symbol.prototype.toString),t=i(Object.prototype.hasOwnProperty),y=i(Object.prototype.toString),r=i(RegExp.prototype.test),p=(lt=TypeError,function(){for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return d(lt,i)});const at=u(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),nt=u(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),tt=u(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),ei=u(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),it=u(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),oi=u(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),vt=u(["#text"]),yt=u(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","
141spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),rt=u(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pt=u(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),w=u(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),si=o(/\{\{[\w\W]*|[\w\W]*\}\}/gm),hi=o(/<%[\w\W]*|[\w\W]*%>/gm),ci=o(/\$\{[\w\W]*/gm),li=o(/^data-[\-\w.\u00B7-\uFFFF]+$/),ai=o(/^aria-[\-\w]+$/),wt=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),vi=o(/^(?:\w+script|data):/i),yi=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),bt=o(/^html$/i),pi=o(/^[a-z][.\w]*(-[.\w]+)+$/i);ut=Object.freeze({__proto__:null,ARIA_ATTR:ai,ATTR_WHITESPACE:yi,CUSTOM_ELEMENT:pi,DATA_ATTR:li,DOCTYPE_NAME:bt,ERB_EXPR:hi,IS_ALLOWED_URI:wt,IS_SCRIPT_OR_DATA:vi,MUSTACHE_EXPR:si,TMPLIT_EXPR:ci});const wi=1,bi=3,ki=7,di=8,gi=9,nr=function(){return"undefined"==typeof window?null:window};return function b(){function hi(n,t,r){l(n,n=>{n.call(i,t,r,ur)})}let pi=arguments.length>0&&void 0!==arguments[0]?arguments[0]:nr();const i=n=>b(n);if(i.version="3.4.2",i.removed=[],!pi||!pi.document||pi.document.nodeType!==gi||!pi.Element)return i.isSupported=!1,i;let{document:li}=pi;const tu=li,ie=tu.currentScript,{DocumentFragment:bu,HTMLTemplateElement:re,Node:iu,Element:ku,NodeFilter:fr,NamedNodeMap:ue=n.NamedNodeMap||n.MozNamedAttrMap,HTMLFormElement:fe,DOMParser:ee,trustedTypes:ar}=pi,er=ku.prototype,oe=c(er,"cloneNode"),se=c(er,"remove"),he=c(er,"nextSibling"),ce=c(er,"childNodes"),vr=c(er,"parentNode");if("function"==typeof re){const n=li.createElement("template");n.content&&n.content.ownerDocument&&(li=n.content.ownerDocument)}let kt,or="";const{implementation:ru,createNodeIterator:le,createDocumentFragment:ae,getElementsByTagName:ve}=li,{importNode:ye}=tu;let dt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};i.isSupported="function"==typeof ft&&"function"==typeof vr&&ru&&void 0!==ru.createHTMLDocument;const{MUSTACHE_EXPR:yr,ERB_EXPR:pr,TMPLIT_EXPR:wr,DATA_ATTR:pe,ARIA_ATTR:we,IS_SCRIPT_OR_DATA:be,ATTR_WHITESPACE:du,CUSTOM_ELEMENT:ke}=ut;let{IS_ALLOWED_URI:gu}=ut,d=null;const nf=n({},[...at,...nt,...tt,...it,...vt]);let lt=null;const tf=n({},[...yt,...rt,...pt,...w]);
141let o=Object.seal(s(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),sr=null,br=null;const ci=Object.seal(s(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let rf=!0,uu=!0,uf=!1,ff=!0,ai=!1,hr=!0,vi=!1,fu=!1,eu=!1,tr=!1,kr=!1,dr=!1,ef=!0,sf=!1;const hf="user-content-";let ou=!0,cr=!1,ir={},fi=null;const su=n({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let cf=null;const lf=n({},["audio","video","img","source","image","track"]);let hu=null;const af=n({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),gr="http://www.w3.org/1998/Math/MathML",nu="http://www.w3.org/2000/svg",si="http://www.w3.org/1999/xhtml";let rr=si,cu=!1,lu=null;const de=n({},[gr,nu,si],g);let au=n({},["mi","mo","mn","ms","mtext"]),vu=n({},["annotation-xml"]);const ge=n({},["title","style","font","a","script"]);let lr=null;const no=["application/xhtml+xml","text/html"];let k=null,ur=null;const to=li.createElement("form"),vf=function(n){return n instanceof RegExp||n instanceof Function},yu=function(){let i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!ur||ur!==i){i&&"object"==typeof i||(i={});i=e(i);lr=-1===no.indexOf(i.PARSER_MEDIA_TYPE)?"text/html":i.PARSER_MEDIA_TYPE;k="application/xhtml+xml"===lr?g:v;d=t(i,"ALLOWED_TAGS")&&f(i.ALLOWED_TAGS)?n({},i.ALLOWED_TAGS,k):nf;lt=t(i,"ALLOWED_ATTR")&&f(i.ALLOWED_ATTR)?n({},i.ALLOWED_ATTR,k):tf;lu=t(i,"ALLOWED_NAMESPACES")&&f(i.ALLOWED_NAMESPACES)?n({},i.ALLOWED_NAMESPACES,g):de;hu=t(i,"ADD_URI_SAFE_ATTR")&&f(i.ADD_URI_SAFE_ATTR)?n(e(af),i.ADD_URI_SAFE_ATTR,k):af;cf=t(i,"ADD_DATA_URI_TAGS")&&f(i.ADD_DATA_URI_TAGS)?n(e(lf),i.ADD_DATA_URI_TAGS,k):lf;fi=t(i,"FORBID_CONTENTS")&&f(i.FORBID_CONTENTS)?n({},i.FORBID_CONTENTS,k):su;sr=t(i,"FORBID_TAGS")&&f(i.FORBID_TAGS)?n({},i.FORBID_TAGS,k):e({});br=t(i,"FORBID_ATTR")&&f(i.FORBID_ATTR)?n({},i.FORBID_ATTR,k):e({});ir=!!t(i,"USE_PROFILES")&&(i.USE_PROFILES&&"object"==typeof i.USE_PROFILES?e(i.USE_PROFILES):i.USE_PROFILES);rf=!1!==i.ALLOW_ARIA_ATTR;uu=!1!==i.ALLOW_DATA_ATTR;uf=i.ALLOW_UNKNOWN_PROTOCOLS||!1;ff=!1!==i.ALLOW_SELF_CLOSE_IN_ATTR;ai=i.SAFE_FOR_TEMPLATES||!1;hr=!1!==i.SAFE_FOR_XML;vi=i.WHOLE_DOCUMENT||!1;tr=i.RETURN_DOM||!1;kr=i.RETURN_DOM_FRAGMENT||!1;dr=i.RETURN_TRUSTED_TYPE||!1;eu=i.FORCE_BODY||!1;ef=!1!==i.SANITIZE_DOM;sf=i.SANITIZE_NAMED_PROPS||!1;ou=!1!==i.KEEP_CONTENT;cr=i.IN_PLACE||!1;gu=function(n){try{return r(n,""),!0}catch(n){return!1}}(i.ALLOWED_URI_REGEXP)?i.ALLOWED_URI_REGEXP:wt;rr="string"==typeof i.NAMESPACE?i.NAMESPACE:si;au=t(i,"MATHML_TEXT_INTEGRATION_POINTS")&&i.MATHML_TEXT_INTEGRATION_POINTS&&"object"==typeof i.MATHML_TEXT_INTEGRATION_POINTS?e(i.MATHML_TEXT_INTEGRATION_POINTS):n({},["mi","mo","mn","ms","mtext"]);vu=t(i,"HTML_INTEGRATION_POINTS")&&i.HTML_INTEGRATION_POINTS&&"object"==typeof i.HTML_INTEGRATION_POINTS?e(i.HTML_INTEGRATION_POINTS):n({},["annotation-xml"]);const h=t(i,"CUSTOM_ELEMENT_HANDLING")&&i.CUSTOM_ELEMENT_HANDLING&&"object"==typeof i.CUSTOM_ELEMENT_HANDLING?e(i.CUSTOM_ELEMENT_HANDLING):s(null);if(o=s(null),t(h,"tagNameCheck")&&vf(h.tagNameCheck)&&(o.tagNameCheck=h.tagNameCheck),t(h,"attributeNameCheck")&&vf(h.attributeNameCheck)&&(o.attributeNameCheck=h.attributeNameCheck),t(h,"allowCustomizedBuiltInElements")&&"boolean"==typeof h.allowCustomizedBuiltInElements&&(o.allowCustomizedBuiltInElements=h.allowCustomizedBuiltInElements),ai&&(uu=!1),kr&&(tr=!0),ir&&(d=n({},vt),lt=s(null),!0===ir.html&&(n(d,at),n(lt,yt)),!0===ir.svg&&(n(d,nt),n(lt,rt),n(lt,w)),!0===ir.svgFilters&&(n(d,tt),n(lt,rt),n(lt,w)),!0===ir.mathMl&&(n(d,it),n(lt,pt),n(lt,w))),ci.tagCheck=null,ci.attributeCheck=null,t(i,"ADD_TAGS")&&("function"==typeof i.ADD_TAGS?ci.tagCheck=i.ADD_TAGS:f(i.ADD_TAGS)&&(d===nf&&(d=e(d)),n(d,i.ADD_TAGS,k))),t(i,"ADD_ATTR")&&("function"==typeof i.ADD_ATTR?ci.attributeCheck=i.ADD_ATTR:f(i.ADD_ATTR)&&(lt===tf&&(lt=e(lt)),n(lt,i.ADD_ATTR,k))),t(i,"ADD_URI_SAFE_ATTR")&&f(i.ADD_URI_SAFE_ATTR)&&n(hu,i.ADD_URI_SAFE_ATTR,k),t(i,"FORBID_CONTENTS")&&f(i.FORB
vendor: 4,923 bytes, line 141
141ID_CONTENTS)&&(fi===su&&(fi=e(fi)),n(fi,i.FORBID_CONTENTS,k)),t(i,"ADD_FORBID_CONTENTS")&&f(i.ADD_FORBID_CONTENTS)&&(fi===su&&(fi=e(fi)),n(fi,i.ADD_FORBID_CONTENTS,k)),ou&&(d["#text"]=!0),vi&&n(d,["html","head","body"]),d.table&&(n(d,["tbody"]),delete sr.tbody),i.TRUSTED_TYPES_POLICY){if("function"!=typeof i.TRUSTED_TYPES_POLICY.createHTML)throw p('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof i.TRUSTED_TYPES_POLICY.createScriptURL)throw p('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');kt=i.TRUSTED_TYPES_POLICY;or=kt.createHTML("")}else void 0===kt&&(kt=function(n,t){if("object"!=typeof n||"function"!=typeof n.createPolicy)return null;let i=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(i=t.getAttribute(r));const u="dompurify"+(i?"#"+i:"");try{return n.createPolicy(u,{createHTML:n=>n,createScriptURL:n=>n})}catch(n){return console.warn("TrustedTypes policy "+u+" could not be created."),null}}(ar,ie)),null!==kt&&"string"==typeof or&&(or=kt.createHTML(""));u&&u(i);ur=i}},yf=n({},[...nt,...tt,...ei]),pf=n({},[...it,...oi]),gt=function(n){a(i.removed,{element:n});try{vr(n).removeChild(n)}catch(t){se(n)}},yi=function(n,t){try{a(i.removed,{attribute:t.getAttributeNode(n),from:t})}catch(n){a(i.removed,{attribute:null,from:t})}if(t.removeAttribute(n),"is"===n)if(tr||kr)try{gt(t)}catch(n){}else try{t.setAttribute(n,"")}catch(n){}},wf=function(n){let t=null,i=null;if(eu)n="<remove><\/remove>"+n;else{const t=ot(n,/^[\r\n\t ]+/);i=t&&t[0]}"application/xhtml+xml"===lr&&rr===si&&(n='<html xmlns="http://www.w3.org/1999/xhtml"><head><\/head><body>'+n+"<\/body><\/html>");const u=kt?kt.createHTML(n):n;if(rr===si)try{t=(new ee).parseFromString(u,lr)}catch(n){}if(!t||!t.documentElement){t=ru.createDocument(rr,"template",null);try{t.documentElement.innerHTML=cu?or:u}catch(n){}}const r=t.body||t.documentElement;return n&&i&&r.insertBefore(li.createTextNode(i),r.childNodes[0]||null),rr===si?ve.call(t,vi?"html":"body")[0]:vi?t.documentElement:r},bf=function(n){return le.call(n.ownerDocument||n,n,fr.SHOW_ELEMENT|fr.SHOW_COMMENT|fr.SHOW_TEXT|fr.SHOW_PROCESSING_INSTRUCTION|fr.SHOW_CDATA_SECTION,null)},pu=function(n){return n instanceof fe&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof ue)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore||"function"!=typeof n.hasChildNodes)},wu=function(n){return"function"==typeof iu&&n instanceof iu};const kf=function(n){let u=null;if(hi(dt.beforeSanitizeElements,n,null),pu(n))return gt(n),!0;const t=k(n.nodeName);if((hi(dt.uponSanitizeElement,n,{tagName:t,allowedTags:d}),hr&&n.hasChildNodes()&&!wu(n.firstElementChild)&&r(/<[/\w!]/g,n.innerHTML)&&r(/<[/\w!]/g,n.textContent))||hr&&n.namespaceURI===si&&"style"===t&&wu(n.firstElementChild)||n.nodeType===ki||hr&&n.nodeType===di&&r(/<[/\w]/g,n.data))return gt(n),!0;if(sr[t]||!(ci.tagCheck instanceof Function&&ci.tagCheck(t))&&!d[t]){if(!sr[t]&&gf(t)&&(o.tagNameCheck instanceof RegExp&&r(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(ou&&!fi[t]){const i=vr(n)||n.parentNode,t=ce(n)||n.childNodes;if(t&&i)for(let r=t.length-1;r>=0;--r){const u=oe(t[r],!0);i.insertBefore(u,he(n))}}return gt(n),!0}return n instanceof ku&&!function(n){let t=vr(n);t&&t.tagName||(t={namespaceURI:rr,tagName:"template"});const i=v(n.tagName),r=v(t.tagName);return!!lu[n.namespaceURI]&&(n.namespaceURI===nu?t.namespaceURI===si?"svg"===i:t.namespaceURI===gr?"svg"===i&&("annotation-xml"===r||au[r]):Boolean(yf[i]):n.namespaceURI===gr?t.namespaceURI===si?"math"===i:t.namespaceURI===nu?"math"===i&&vu[r]:Boolean(pf[i]):n.namespaceURI===si?!(t.namespaceURI===nu&&!vu[r])&&!(t.namespaceURI===gr&&!au[r])&&!pf[i]&&(ge[i]||!yf[i]):!("application/xhtml+xml"!==lr||!lu[n.namespaceURI]))}(n)?(gt(n),!0):"noscript"!==t&&"noembed"!==t&&"noframes"!==t||!r(/<\/no(script|embed|frames)/i,n.innerHTML)?(ai&&n.nodeType===bi&&(u=n.textContent,l([yr,pr,wr],n=>{u=h(u,n," ")}),n.textContent!==u&&(a(i.removed,{element:n.cloneNode()}),n.textContent=u)),hi(dt.afterSanitizeElements,n,null),!1):(gt(n),!0)},df=function(n,t,i){if(br[t]||ef&&("id"===t||"name"===t)&&(i in li||i in to))return!1;const u=lt[t]||ci.attributeCheck instanceof Function&&ci.attributeCheck(t,n);if((!uu||br[t]||!r(pe,t))&&(!rf||!r(we,t)))if(!u||br[t]){if(!(gf(n)&&(o.tagNameCheck instanceof RegExp&&r(o.tagNameCheck,n)||o.tagNameCheck instanceof Function&&o.tagNameCheck(n))&&(o.attributeNameCheck instanceof RegExp&&r(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t,n))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&r(o.tagNameCheck,i)||o.tagNameCheck instanceof Function&&o.tagNameCheck(i))))return!1}
141else if(!hu[t]&&!r(gu,h(i,du,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===n||0!==st(i,"data:")||!cf[n])&&(!uf||r(be,h(i,du,"")))&&i)return!1;return!0},io=n({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),gf=function(n){return!io[v(n)]&&r(ke,n)},ne=function(n){hi(dt.beforeSanitizeAttributes,n,null);const{attributes:u}=n;if(u&&!pu(n)){const t={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:lt,forceKeepAttr:void 0};let f=u.length;for(;f--;){const y=u[f],{name:o,namespaceURI:c,value:p}=y,s=k(o),a=p;let e="value"===o?a:ii(a);if(t.attrName=s,t.attrValue=e,t.keepAttr=!0,t.forceKeepAttr=void 0,hi(dt.uponSanitizeAttribute,n,t),e=t.attrValue,!sf||"id"!==s&&"name"!==s||0===st(e,hf)||(yi(o,n),e=hf+e),hr&&r(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,e)){yi(o,n);continue}if("attributename"===s&&ot(e,"href")){yi(o,n);continue}if(!t.forceKeepAttr){if(!t.keepAttr){yi(o,n);continue}if(!ff&&r(/\/>/i,e)){yi(o,n);continue}ai&&l([yr,pr,wr],n=>{e=h(e,n," ")});const v=k(n.nodeName);if(df(v,s,e)){if(kt&&"object"==typeof ar&&"function"==typeof ar.getAttributeType&&!c)switch(ar.getAttributeType(v,s)){case"TrustedHTML":e=kt.createHTML(e);break;case"TrustedScriptURL":e=kt.createScriptURL(e)}if(e!==a)try{c?n.setAttributeNS(c,o,e):n.setAttribute(o,e);pu(n)?gt(n):et(i.removed)}catch(u){yi(o,n)}}else yi(o,n)}}hi(dt.afterSanitizeAttributes,n,null)}},te=function(n){let t=null;const i=bf(n);for(hi(dt.beforeSanitizeShadowDOM,n,null);t=i.nextNode();)hi(dt.uponSanitizeShadowNode,t,null),kf(t),ne(t),t.content instanceof bu&&te(t.content);hi(dt.afterSanitizeShadowDOM,n,null)};return i.sanitize=function(n){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=null,u=null,o=null,f=null;if(cu=!n,cu&&(n="<!-->"),"string"!=typeof n&&!wu(n)&&"string"!=typeof(n=function(n){switch(typeof n){case"string":return n;case"number":return ri(n);case"boolean":return ui(n);case"bigint":return ht?ht(n):"0";case"symbol":return ct?ct(n):"Symbol()";case"undefined":default:return y(n);case"function":case"object":{if(null===n)return y(n);const t=n,i=c(t,"toString");if("function"==typeof i){const n=i(t);return"string"==typeof n?n:y(n)}return y(n)}}}(n)))throw p("dirty is not a string, aborting");if(!i.isSupported)return n;if(fu||yu(s),i.removed=[],"string"==typeof n&&(cr=!1),cr){const t=n.nodeName;if("string"==typeof t){const n=k(t);if(!d[n]||sr[n])throw p("root node is forbidden and cannot be sanitized in-place");}}else if(n instanceof iu)t=wf("<!---->"),u=t.ownerDocument.importNode(n,!0),u.nodeType===wi&&"BODY"===u.nodeName||"HTML"===u.nodeName?t=u:t.appendChild(u);else{if(!tr&&!ai&&!vi&&-1===n.indexOf("<"))return kt&&dr?kt.createHTML(n):n;if(t=wf(n),!t)return tr?null:dr?or:""}t&&eu&>(t.firstChild);const a=bf(cr?n:t);for(;o=a.nextNode();)kf(o),ne(o),o.content instanceof bu&&te(o.content);if(cr)return n;if(tr){if(ai){t.normalize();let n=t.innerHTML;l([yr,pr,wr],t=>{n=h(n,t," ")});t.innerHTML=n}if(kr)for(f=ae.call(t.ownerDocument);t.firstChild;)f.appendChild(t.firstChild);else f=t;return(lt.shadowroot||lt.shadowrootmode)&&(f=ye.call(tu,f,!0)),f}let e=vi?t.outerHTML:t.innerHTML;return vi&&d["!doctype"]&&t.ownerDocument&&t.ownerDocument.doctype&&t.ownerDocument.doctype.name&&r(bt,t.ownerDocument.doctype.name)&&(e="<!DOCTYPE "+t.ownerDocument.doctype.name+">\n"+e),ai&&l([yr,pr,wr],n=>{e=h(e,n," ")}),kt&&dr?kt.createHTML(e):e},i.setConfig=function(){yu(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});fu=!0},i.clearConfig=function(){ur=null;fu=!1},i.isValidAttribute=function(n,t,i){ur||yu({});const r=k(n),u=k(t);return df(r,u,i)},i.addHook=function(n,t){"function"==typeof t&&a(dt[n],t)},i.removeHook=function(n,t){if(void 0!==t){const i=ni(dt[n],t);return-1===i?void 0:ti(dt[n],i,1)[0]}return et(dt[n])},i.removeHooks=function(n){dt[n]=[]},i.removeAllHooks=function(){dt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},i}()});!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((n=n||self).clipboard={})}(this,function(n){"use strict";function u(n,t,i,r){return new(i=i||Promise)(function(u,f){function o(n){try{e(r.next(n))}catch(n){f(n)}}function s(n){try{e(r.throw(n))}catch(n){f(n)}}function e(n){var t;n.done?u(n.value):((t=n.value)instanceof i?t:new i(function(n){n(t)})).then(o,s)}e((r=r.apply(n,t||[])).next())})}function f(n,t){function e(e){return function(o){return function(e){if(f)throw new TypeError("Generator is already executing.");for(;r;)try{if(f=1,u&&(i=2&e[0]?u.return:e[0]?u.throw||((i=u.return)&&i.call(u),0):u.next)&&!(i=i.call(u,e[1])).done)return i;switch(u=0,(e=i?[2&e[0],i.value]:e)[0]){case 0:case 1:i=e;break;case 4:return r.label++,{value:e[1],done:!1};case 5:r.label++;u=e[1];e=[0];continue;case 7:e=r.ops.pop();r.trys.pop();continue;default:if(!((i=0<(i=r.trys).length&&i[i.length-1])||6!==e[0]&&2!==e[0])){r=0;continue}if(3===e[0]&&(!i||e[1]>i[0]&&e[1]<i[3])){r.label=e[1];break}if(6===e[0]&&r.label<i[1]){r.label=i[1];i=e;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(e);break}i[2]&&r.ops.pop();r.trys.pop();continue}e=t.call(n,r)}catch(o){e=[6,o];u=0}finally{f=i=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,o])}}var f,u,i,r={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},o={next:e(0),"throw":e(1),"return":e(2)};return"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o}function t(n){h(n)}function w(){return"undefined"==typeof ClipboardEvent&&void 0!==e.clipboardData&&void 0!==e.clipboardData.setData}function k(n){var i=new b,n=function(n,i,r){var u,f,e;for(u in t("listener called"),n.success=!0,i)f=i[u],e=r.clipboardData,e.setData(u,f),"text/plain"===u&&e.getData(u)!==f&&(t("setting text/plain failed"),n.success=!1);r.preventDefault()}.bind(this,i,n);document.addEventListener("copy",n);try{document.execCommand("copy")}finally{document.removeEventListener("copy",n)}return i.success}function d(n,t){return g(n),t=k(t),nt(),t}function g(n){var i,t=document.getSelection();t&&((i=document.createRange()).selectNodeContents(n),t.removeAllRanges(),t.addRange(i))}function nt(){var n=document.getSelection();n&&n.removeAllRanges()}function tt(n){return u(this,void 0,void 0,function(){var i;return f(this,function(){if(i="text/plain"in n,w()){if(!i)throw new Error("No `text/plain` value was specified.");if(r=n["text/plain"],e.clipboardData.setData("Text",r))return[2,!0];throw new Error("Copying failed, possibly because the user rejected it.");}var r;return k(n)?(t("regular execCopy worked"),[2,!0]):-1<navigator.userAgent.indexOf("Edge")?(t('UA "Edge" => assuming success'),[2,!0]):d(document.body,n)?(t("copyUsingTempSelection worked"),[2,!0]):function(n){var t=document.createElement("div");return t.setAttribute("style","-webkit-user-select: text !important"),t.textContent="temporary element",document.body.appendChild(t),n=d(t,n),document.body.removeChild(t),n}(n)?(t("copyUsingTempElem worked"),[2,!0]):function(n){var i,u,r;return t("copyTextUsingDOM"),i=document.createElement("div"),i.setAttribute("style","-webkit-user-select: text !important"),u=i,i.attachShadow&&(t("Using shadow DOM."),u=i.attachShadow({mode:"open"})),r=document.createElement("span"),r.innerText=n,u.appendChild(r),document.body.appendChild(i),g(r),r=document.execCommand("copy"),nt(),document.body.removeChild(i),r}(n["text/plain"])?(t("copyTextUsingDOM worked"),[2,!0]):[2,!1]})})}function it(){return u(this,void 0,void 0,function(){return f(this,function(){if(a)return t("Using `navigator.clipboard.readText()`."),[2,a()];if(w())return t("Reading text using IE strategy."),[2,function(){return u(this,void 0,void 0,function(){var n;return f(this,function(){if(""===(n=e.clipboardData.getData("Text")))throw new Error("Empty clipboard or could not read plain text from clipboard");return[2,n]})})}()];throw new Error("Read is not supported in your browser.");})})}function o(n,t){for(var i=0,r=n;i<r.length;i++)if(-1!==r[i].types.indexOf(t))return!0;return!1}function rt(n,t){var i,r;for(i in void 0===t&&(t={}),this.types=Object.keys(n),this._items={},n)r=n[i],this._items[i]="string"==typeof r?ut(i,r):r;this.presentationStyle=null!==(t=null==t?void 0:t.presentationStyle)&&void 0!==t?t:"unspecified"}function ut(n,t){return new Blob([t],{type:n})}function ft(n){return u(this,void 0,void 0,function(){var r,i,u,e,o,t;return f(this,function(f){switch(f.label){case 0:r={};i=0;u=n.types;f.label=1;case 1:return i<u.length?(t=u[i],e=r,o=t,[4,n.getType(t)]):[3,4];case 2:e[o]=f.sent();f.label=3;case 3:return i++,[3,1];case 4:return t={},n.presentationStyle&&(t.presentationStyle=n.presentationStyle),[2,new p(r,t)]}})})}function et(n){var t={};return t["text/plain"]=ut(n,"text/plain"),new s(t)}function ot(n,t){return u(this,void 0,void 0,function(){return f(this,function(i){switch(i.label){case 0:return[4,n.getType(t)];case 1:return[4,function(n){return u(this,void 0,void 0,function(){return f(this,function(){return[2,new Promise(function(t,i){var r=new FileReader;r.addEventListener("load",function(){var n=r.result;"string"==typeof n?t(n):i("could not convert blob to string")});r.readAsText(n)})]})})}(i.sent())];case 2:return[2,i.sent()]}})})}var h=function(){},c=!0,b,s;!function(){(console.warn||console.log).apply(console,arguments)}.bind("[clipboard-polyfill]");var r="undefined"==typeof navigator?void 0:navigator,i=null==r?void 0:r.clipboard,l=null===(r=null==i?void 0:i.read)||void 0===r?void 0:r.bind(i),a=null===(r=null==i?void 0:i.readText)||void 0===r?void 0:r.bind(i),v=null===(r=null==i?void 0:i.write)||void 0===r?void 0:r.bind(i),y=null===(r=null==i?void 0:i.writeText)||void 0===r?void 0:r.bind(i),i="undefined"==typeof window?void 0:window,p=null==i?void 0:i.ClipboardItem,e=i;b=function(){this.success=!1};s=(rt.prototype.getType=function(n){return u(this,void 0,void 0,function(){return f(this,function(){return[2,this._items[n]]})})},rt);n.ClipboardItem=s;n.read=function(){return u(this,void 0,void 0,function(){var n;return f(this,function(i){switch(i.label){case 0:return l?(t("Using `navigator.clipboard.read()`."),[2,l()]):(n=et,[4,it()]);case 1:return[2,[n.apply(void 0,[i.sent()])]]}})})};n.readText=it;n.setDebugLog=function(n){h=n};n.suppressWarnings=function(){c=!1};n.write=function(n){return u(this,void 0,void 0,function(){var r,e,i;return f(this,function(s){switch(s.label){case 0:return v&&p?(t("Using `navigator.clipboard.write()`."),[4,Promise.all(n.map(ft))]):[3,5];case 1:r=s.sent();s.label=2;case 2:return s.trys.push([2,4,,5]),[4,v(r)];case 3:return[2,s.sent()];case 4:if(e=s.sent(),!o(n,"text/plain")&&!o(n,"text/html"))throw e;return[3,5];case 5:return i=o(n,"text/plain"),c&&!i&&t("clipboard.write() was called without a `text/plain` data type. On some platforms, this may result in an empty clipboard. Call suppressWarnings() to suppress this warning."),i=tt,[4,function(n){return u(this,void 0,void 0,function(){var i,t,r,u,e,o;return f(this,function(f){switch(f.label){case 0:i={};t=0;r=n.types;f.label=1;case 1:return t<r.length?(u=r[t],e=i,o=u,[4,ot(n,u)]):[3,4];case 2:e[o]=f.sent();f.label=3;case 3:return t++,[3,1];case 4:return[2,i]}})})}(n[0])];case 6:if(!i.apply(void 0,[s.sent()]))throw new Error("write() failed");return[2]}})})};n.writeText=function(n){return u(this,void 0,void 0,function(){return f(this,function(){if(y)return t("Using `navigator.clipboard.writeText()`."),[2,y(n)];if(!tt(((i={})["text/plain"]=n,i)))throw new Error("writeText() failed");var i;return[2]})})};Object.defineProperty(n,"__esModule",{value:!0})}
141),function(n){function t(t){if(typeof t.data=="string"&&(t.data={keys:t.data}),t.data&&t.data.keys&&typeof t.data.keys=="string"){var r=t.handler,i=t.data.keys.toLowerCase().split(" ");t.handler=function(t){var o,h;if(this===t.target||!(n.hotkeys.options.filterInputAcceptingElements&&n.hotkeys.textInputTypes.test(t.target.nodeName)||n.hotkeys.options.filterContentEditable&&n(t.target).attr("contenteditable")||n.hotkeys.options.filterTextInputs&&n.inArray(t.target.type,n.hotkeys.textAcceptingInputTypes)>-1)){var f=t.type!=="keypress"&&n.hotkeys.specialKeys[t.which],s=String.fromCharCode(t.which).toLowerCase(),u="",e={};for(n.each(["alt","ctrl","shift"],function(n,i){t[i+"Key"]&&f!==i&&(u+=i+"+")}),t.metaKey&&!t.ctrlKey&&f!=="meta"&&(u+="meta+"),t.metaKey&&f!=="meta"&&u.indexOf("alt+ctrl+shift+")>-1&&(u=u.replace("alt+ctrl+shift+","hyper+")),f?e[u+f]=!0:(e[u+s]=!0,e[u+n.hotkeys.shiftNums[s]]=!0,u==="shift+"&&(e[n.hotkeys.shiftNums[s]]=!0)),o=0,h=i.length;o<h;o++)if(e[i[o]])return r.apply(this,arguments)}}}}n.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}};n.each(["keydown","keyup","keypress"],function(){n.event.special[this]={add:t}})}(jQuery||this.jQuery||window.jQuery),function(n){n.fn.simplyCountable=function(t){t=n.extend({counter:"#counter",countType:"characters",maxCount:140,strictMax:!1,countDirection:"down",safeClass:"safe",overClass:"over",thousandSeparator:",",onOverCount:function(){},onSafeCount:function(){},onMaxCount:function(){}},t);var i=[33,34,35,36,37,38,39,40];return n(this).each(function(){var e=n(this),r=n(t.counter),u,f;if(!r.length)return!1;u=function(){var i,o,a=function(n){return n-n*2+t.maxCount},c=function(){return t.countDirection==="up"?o:i},v=function(n){var r="",i;if(t.thousandSeparator)for(n=n.toString(),n.match(/^-/)&&(n=n.substr(1),r="-"),i=n.length-3;i>0;i-=3)n=n.substr(0,i)+t.thousandSeparator+n.substr(i);return r+n},l=function(n){e.val(n).trigger("change")},u=e.val(),s,h;if(u=u.replace(/^<p>(.*)<\/p>$/i,"$1"),f&&!t.keepHtml&&(u=f.contentDocument.body.innerText,t.endsWithNewLine==!0&&(u=u.replace(/\r\n|\r|\n$/,""))),t.countType==="words"?(i=t.maxCount-n.trim(u).split(/\s+/).length,u===""&&(i+=1)):i=t.countType==="lines"?u.split(/\r\n|\r|\n/).length:u.length,o=a(i),t.strictMax&&i<=0){if(s=u,i<0)t.onMaxCount(c(),e,r);t.countType==="words"?(h=s.match(new RegExp("\\s?(\\S+\\s+){"+t.maxCount+"}")),h&&l(h[0])):l(s.substring(0,t.maxCount));i=0;o=t.maxCount}r.text(v(c()));r.hasClass(t.safeClass)||r.hasClass(t.overClass)?t.upperLimit>-1&&i>t.upperLimit||t.upperLimit&&i<t.lowerLimit?r.removeClass(t.safeClass).addClass(t.overClass):r.removeClass(t.overClass).addClass(t.safeClass):t.upperLimit>-1&&i>t.upperLimit||t.lowerLimit>-1&&i<t.lowerLimit?r.addClass(t.overClass):r.addClass(t.safeClass)};f=t.tinymce;u();e.on("keyup blur paste",function(t){switch(t.type){case"keyup":n.inArray(t.which,i)<0&&u();break;case"paste":setTimeout(u,t.type==="paste"?5:0);break;default:u()}});if(f)f.on("keyup blur paste change",function(){u()})})}}(jQuery); 142/** 143 * k-d Tree JavaScript - V 1.01 144 * 145 * https://github.com/ubilabs/kd-tree-javascript 146 * 147 * @author Mircea Pricop <[email protected]>, 2012 148 * @author Martin Kleppe <[email protected]>, 2012 149 * @author Ubilabs http://ubilabs.net, 2012 150 * @license MIT License <http://www.opensource.org/licenses/mit-license.php> 151 */ 152(function(n,t){typeof define=="function"&&define.amd?define(["exports"],t):typeof exports=="object"?t(exports):t(n)})(this,function(n){function t(n,t,i){this.obj=n;this.left=null;this.right=null;this.parent=i;this.dimension=t}function r(n,r,u){function e(n,i,r){var o=i%u.length,s,f;return n.length===0?null:n.length===1?new t(n[0],o,r):(n.sort(function(n,t){return n[u[o]]-t[u[o]]}),s=Math.floor(n.length/2),f=new t(n[s],o,r),f.left=e(n.slice(0,s),i+1,f),f.right=e(n.slice(s+1),i+1,f),f)}function o(n){function t(n){n.left&&(n.left.parent=n,t(n.left));n.right&&(n.right.parent=n,t(n.right))}f.root=n;t(f.root)}var f=this;Array.isArray(n)?this.root=e(n,0,null):o(n,r,u);this.toJSON=function(n){n||(n=this.root);var i=new t(n.obj,n.dimension,null);
152return n.left&&(i.left=f.toJSON(n.left)),n.right&&(i.right=f.toJSON(n.right)),i};this.insert=function(n){function r(t,i){if(t===null)return i;var f=u[t.dimension];return n[f]<t.obj[f]?r(t.left,t):r(t.right,t)}var i=r(this.root,null),f,e;if(i===null){this.root=new t(n,0,null);return}f=new t(n,(i.dimension+1)%u.length,i);e=u[i.dimension];n[e]<i.obj[e]?i.left=f:i.right=f};this.remove=function(n){function i(t){if(t===null)return null;if(t.obj===n)return t;var r=u[t.dimension];return n[r]<t.obj[r]?i(t.left,t):i(t.right,t)}function r(n){function i(n,t){var r,s,e,o,f;return n===null?null:(r=u[t],n.dimension===t)?n.left!==null?i(n.left,t):n:(s=n.obj[r],e=i(n.left,t),o=i(n.right,t),f=n,e!==null&&e.obj[r]<s&&(f=e),o!==null&&o.obj[r]<f.obj[r]&&(f=o),f)}var t,e,o;if(n.left===null&&n.right===null){if(n.parent===null){f.root=null;return}o=u[n.parent.dimension];n.obj[o]<n.parent.obj[o]?n.parent.left=null:n.parent.right=null;return}n.right!==null?(t=i(n.right,n.dimension),e=t.obj,r(t),n.obj=e):(t=i(n.left,n.dimension),e=t.obj,r(t),n.right=n.left,n.left=null,n.obj=e)}var t;(t=i(f.root),t!==null)&&r(t)};this.nearest=function(n,t,e){function c(i){function y(n,i){o.push([n,i]);o.size()>t&&o.pop()}for(var s,l=u[i.dimension],e=r(n,i.obj),a={},v,h,f=0;f<u.length;f+=1)a[u[f]]=f===i.dimension?n[u[f]]:i.obj[u[f]];if(v=r(a,i.obj),i.right===null&&i.left===null){(o.size()<t||e<o.peek()[1])&&y(i,e);return}s=i.right===null?i.left:i.left===null?i.right:n[l]<i.obj[l]?i.left:i.right;c(s);(o.size()<t||e<o.peek()[1])&&y(i,e);(o.size()<t||Math.abs(v)<o.peek()[1])&&(h=s===i.left?i.right:i.left,h!==null&&c(h))}var s,h,o;if(o=new i(function(n){return-n[1]}),e)for(s=0;s<t;s+=1)o.push([null,e]);for(f.root&&c(f.root),h=[],s=0;s<Math.min(t,o.content.length);s+=1)o.content[s][0]&&h.push([o.content[s][0].obj,o.content[s][1]]);return h};this.balanceFactor=function(){function n(t){return t===null?0:Math.max(n(t.left),n(t.right))+1}function t(n){return n===null?0:t(n.left)+t(n.right)+1}return n(f.root)/(Math.log(t(f.root))/Math.log(2))}}function i(n){this.content=[];this.scoreFunction=n}i.prototype={push:function(n){this.content.push(n);this.bubbleUp(this.content.length-1)},pop:function(){var n=this.content[0],t=this.content.pop();return this.content.length>0&&(this.content[0]=t,this.sinkDown(0)),n},peek:function(){return this.content[0]},remove:function(n){for(var i,r=this.content.length,t=0;t<r;t++)if(this.content[t]==n){i=this.content.pop();t!=r-1&&(this.content[t]=i,this.scoreFunction(i)<this.scoreFunction(n)?this.bubbleUp(t):this.sinkDown(t));return}throw new Error("Node not found.");},size:function(){return this.content.length},bubbleUp:function(n){for(var r=this.content[n],t,i;n>0;)if(t=Math.floor((n+1)/2)-1,i=this.content[t],this.scoreFunction(r)<this.scoreFunction(i))this.content[t]=r,this.content[n]=i,n=t;else break},sinkDown:function(n){for(var f=this.content.length,e=this.content[n],o=this.scoreFunction(e),s,u,h,c;;){var i=(n+1)*2,r=i-1,t=null;if(r<f&&(s=this.content[r],u=this.scoreFunction(s),u<o&&(t=r)),i<f&&(h=this.content[i],c=this.scoreFunction(h),c<(t==null?o:u)&&(t=i)),t!=null)this.content[n]=this.content[t],this.content[t]=e,n=t;else break}}};n.kdTree=r;n.BinaryHeap=i}); 153/*! medium-zoom 1.0.8 | MIT License | https://github.com/francoischalifour/medium-zoom */ 154(function(n,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof define=="function"&&define.amd?define(t):(n=n||self,n.mediumZoom=t())})(this,function(){"use strict";function c(n,t){var u,r,i;(t===void 0&&(t={}),u=t.insertAt,n&&typeof document!="undefined")&&(r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style"),i.type="text/css",u==="top"?r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=n:i.appendChild(document.createTextNode(n)))}var n=Object.assign||function(n){for(var i,r,t=1;t<arguments.length;t++){i=arguments[t];for(r in i)Object.prototype.hasOwnProperty.call(i,r)&&(n[r]=i[r])}return n},i=function(n){return n.tagName==="IMG"},o=function(n){return NodeList.prototype.isPrototypeOf(n)},r=function(n){return n&&n.nodeType===1},u=function(n){var t=n.currentSrc||n.src;return t.substr(-4).toLowerCase()===".svg"},f=function(n){try{return Array.isArray(n)?n.filter(i):o(n)?[].slice.call(n).filter(i):r(n)?[n].filter(i):typeof n=="string"?[].slice.call(document.querySelectorAll(n)).filter(i):[]}
154catch(t){throw new TypeError("The provided selector is invalid.\nExpects a CSS selector, a Node element, a NodeList or an array.\nSee: https://github.com/francoischalifour/medium-zoom");}},s=function(n){var t=document.createElement("div");return t.classList.add("medium-zoom-overlay"),t.style.background=n,t},h=function(n){var i=n.getBoundingClientRect(),s=i.top,h=i.left,r=i.width,f=i.height,t=n.cloneNode(),c=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0,l=window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0,e,o;if(t.removeAttribute("id"),t.style.position="absolute",t.style.top=s+c+"px",t.style.left=h+l+"px",t.style.width=r+"px",t.style.height=f+"px",n.naturalWidth>r){t.style.width=n.naturalWidth+"px";t.style.height=n.naturalHeight+"px";var a=r/n.naturalWidth,v=f/n.naturalHeight,u=Math.max(a,v);t.setAttribute("data-scale",u);e=-(n.naturalWidth/2-r/2)/u;o=-(n.naturalHeight/2-f/2)/u;t.style.transform="scale("+u+") translate3d("+e+"px, "+o+"px, 0)"}else t.style.transform="";return t},t=function(t,i){var r=n({bubbles:!1,cancelable:!1,detail:undefined},i),u;return typeof CustomEvent=="function"?new CustomEvent(t,r):(u=document.createEvent("CustomEvent"),u.initCustomEvent(t,r.bubbles,r.cancelable,r.detail),u)},e=function e(i){var it=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{},b=function(n){var t=document.querySelectorAll(".tiptap");return t.length>0&&Array.prototype.slice.call(t).some(function(t){return t.contains(n)})},k=window.Promise||function(n){function t(){}n(t,t)},rt=function(n){var t=n.target;if(t===p){v();return}a.indexOf(t)!==-1&&nt({target:t})},ut=function(){if(!y&&o.original&&(!Utils.IsTouchDevice()||Utils.GetViewportScale()===1)){var n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;Math.abs(tt-n)>c.scrollOffset&&setTimeout(v,150)}},ft=function(n){var t=n.key||n.keyCode;(t==="Escape"||t==="Esc"||t===27)&&v()},et=function(){var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},u=i,f;return i.background&&(p.style.background=i.background),i.container&&i.container instanceof Object&&(u.container=n({},c.container,i.container)),i.template&&(f=r(i.template)?i.template:document.querySelector(i.template),u.template=f),c=n({},c,u),a.forEach(function(n){n.dispatchEvent(t("medium-zoom:update",{detail:{zoom:l}}))}),l},ot=function(){var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};return e(n({},c,t))},d=function(){for(var t,i=arguments.length,r=Array(i),n=0;n<i;n++)r[n]=arguments[n];return t=r.reduce(function(n,t){return[].concat(n,f(t))},[]),t.filter(function(n){return a.indexOf(n)===-1}).forEach(function(n){a.push(n);n.classList.add("medium-zoom-image")}),w.forEach(function(n){var i=n.type,r=n.listener,u=n.options;t.forEach(function(n){n.addEventListener(i,r,u)})}),l},st=function(){for(var r,u=arguments.length,i=Array(u),n=0;n<u;n++)i[n]=arguments[n];return o.zoomed&&v(),r=i.length>0?i.reduce(function(n,t){return[].concat(n,f(t))},[]):a,r.forEach(function(n){n.classList.remove("medium-zoom-image");n.dispatchEvent(t("medium-zoom:detach",{detail:{zoom:l}}))}),a=a.filter(function(n){return r.indexOf(n)===-1}),l},ht=function(n,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return a.forEach(function(r){r.addEventListener("medium-zoom:"+n,t,i)}),w.push({type:"medium-zoom:"+n,listener:t,options:i}),l},ct=function(n,t){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};return a.forEach(function(r){r.removeEventListener("medium-zoom:"+n,t,i)}),w=w.filter(function(i){return!(i.type==="medium-zoom:"+n&&i.listener.toString()===t.toString())}),l},g=function(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},i=e.target,f=function(){var t={width:document.documentElement.clientWidth,height:document.documentElement.clientHeight,left:0,top:0,right:0,bottom:0},i=void 0,f=void 0,s;if(c.container)if(c.container instanceof Object)t=n({},t,c.container),i=t.width-t.left-t.right-c.margin*2,f=t.height-t.top-t.bottom-c.margin*2;else{var tt=r(c.container)?c.container:document.querySelector(c.container),h=tt.getBoundingClientRect(),it=h.width,rt=h.height,ut=h.left,ft=h.top;t=n({},t,{width:it,height:rt,left:ut,top:ft})}i=i||t.width-c.margin*2;f=f||t.height-c.margin*2;
154var e=o.zoomedHd||o.original,et=u(e)?i:e.naturalWidth||i,ot=u(e)?f:e.naturalHeight||f,l=e.getBoundingClientRect(),st=l.top,ht=l.left,a=l.width,v=l.height,b=Math.min(Math.max(a,et),i)/a,k=Math.min(Math.max(v,ot),f)/v,p=o.zoomed.getAttribute("data-scale"),d=p&&p.length>0;if(d)try{s=parseFloat(p);a/=s;v/=s;b*=s;k*=s}catch(ct){}var y=Math.min(b,k),g=-ht+(i-a)/2+c.margin+t.left,nt=-st+(f-v)/2+c.margin+t.top,w="";w=d?"translate3d("+g+"px, "+nt+"px, 0) scale("+y+")":"scale("+y+") translate3d("+g/y+"px, "+nt/y+"px, 0)";o.zoomed.style.transform=w;o.zoomedHd&&(o.zoomedHd.style.transform=w)};return new k(function(n){var u,s,w,e,k;if(i&&a.indexOf(i)===-1){n(l);return}if(u=function u(){y=!1;o.zoomed.removeEventListener("transitionend",u);o.original.dispatchEvent(t("medium-zoom:opened",{detail:{zoom:l}}));n(l)},o.zoomed){n(l);return}if(i)o.original=i;else if(a.length>0)s=a,o.original=s[0];else{n(l);return}o.original.dispatchEvent(t("medium-zoom:open",{detail:{zoom:l}}));tt=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0;y=!0;o.zoomed=h(o.original);document.body.appendChild(p);c.template&&(w=r(c.template)?c.template:document.querySelector(c.template),o.template=document.createElement("div"),o.template.appendChild(w.content.cloneNode(!0)),document.body.appendChild(o.template));o.original.parentElement&&o.original.parentElement.tagName==="PICTURE"&&o.original.currentSrc&&(o.zoomed.src=o.original.currentSrc);document.body.appendChild(o.zoomed);window.requestAnimationFrame(function(){document.body.classList.add("medium-zoom--opened")});o.original.classList.add("medium-zoom-image--hidden");o.zoomed.classList.add("medium-zoom-image--opened");b(o.original)&&(o.zoomed.style.borderWidth="0px",o.zoomed.style.margin="0px",o.zoomed.style.marginTop="0px",o.zoomed.style.marginBottom="0px",o.zoomed.style.marginLeft="0px",o.zoomed.style.marginRight="0px");o.zoomed.addEventListener("click",v);o.zoomed.addEventListener("transitionend",u);o.original.getAttribute("data-zoom-src")?(o.zoomedHd=o.zoomed.cloneNode(),o.zoomedHd.removeAttribute("srcset"),o.zoomedHd.removeAttribute("sizes"),o.zoomedHd.removeAttribute("loading"),o.zoomedHd.src=o.zoomed.getAttribute("data-zoom-src"),o.zoomedHd.onerror=function(){clearInterval(e);console.warn("Unable to reach the zoom image target "+o.zoomedHd.src);o.zoomedHd=null;f()},e=setInterval(function(){o.zoomedHd.complete&&(clearInterval(e),o.zoomedHd.classList.add("medium-zoom-image--opened"),b(o.original)&&(o.zoomedHd.style.borderWidth="0px",o.zoomedHd.style.margin="0px",o.zoomedHd.style.marginTop="0px",o.zoomedHd.style.marginBottom="0px",o.zoomedHd.style.marginLeft="0px",o.zoomedHd.style.marginRight="0px"),o.zoomedHd.addEventListener("click",v),document.body.appendChild(o.zoomedHd),f())},10)):o.original.hasAttribute("srcset")?(o.zoomedHd=o.zoomed.cloneNode(),o.zoomedHd.removeAttribute("sizes"),o.zoomedHd.removeAttribute("loading"),k=o.zoomedHd.addEventListener("load",function(){o.zoomedHd.removeEventListener("load",k);o.zoomedHd.classList.add("medium-zoom-image--opened");b(o.original)&&(o.zoomedHd.style.borderWidth="0px",o.zoomedHd.style.borderWidth="0px",o.zoomedHd.style.margin="0px",o.zoomedHd.style.marginTop="0px",o.zoomedHd.style.marginBottom="0px",o.zoomedHd.style.marginLeft="0px",o.zoomedHd.style.marginRight="0px");o.zoomedHd.addEventListener("click",v);document.body.appendChild(o.zoomedHd);f()})):f()})},v=function(){return new k(function(n){var u;if(y||!o.original){n(l);return}u=function u(){o.original.classList.remove("medium-zoom-image--hidden");document.body.removeChild(o.zoomed);o.zoomedHd&&document.body.removeChild(o.zoomedHd);document.body.removeChild(p);o.zoomed.classList.remove("medium-zoom-image--opened");o.template&&document.body.removeChild(o.template);y=!1;o.zoomed.removeEventListener("transitionend",u);o.original.dispatchEvent(t("medium-zoom:closed",{detail:{zoom:l}}));o.original=null;o.zoomed=null;o.zoomedHd=null;o.template=null;n(l)};y=!0;document.body.classList.remove("medium-zoom--opened");var r="",f=o.zoomed.getAttribute("data-scale"),e=f&&f.length>0;
154if(e)try{var i=parseFloat(f),s=-(o.zoomed.naturalWidth/2-o.zoomed.naturalWidth*i/2)/i,h=-(o.zoomed.naturalHeight/2-o.zoomed.naturalHeight*i/2)/i;r="scale("+i+") translate3d("+s+"px, "+h+"px, 0)"}catch(c){}else r="";o.zoomed.style.transform=r;o.zoomedHd&&(o.zoomedHd.style.transform=r);o.template&&(o.template.style.transition="opacity 150ms",o.template.style.opacity=0);o.original.dispatchEvent(t("medium-zoom:close",{detail:{zoom:l}}));o.zoomed.addEventListener("transitionend",u)})},nt=function(){var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},t=n.target;return o.original?v():g({target:t})},lt=function(){return c},at=function(){return a},vt=function(){return o.original},a=[],w=[],y=!1,tt=0,c=it,o={original:null,zoomed:null,zoomedHd:null,template:null},p,l;return Object.prototype.toString.call(i)==="[object Object]"?c=i:(i||typeof i=="string")&&d(i),c=n({margin:0,background:"#fff",scrollOffset:40,container:null,template:null},c),p=s(c.background),document.addEventListener("click",rt,!0),document.addEventListener("keyup",ft),document.addEventListener("scroll",ut),window.addEventListener("resize",v),l={open:g,close:v,toggle:nt,update:et,clone:ot,attach:d,detach:st,on:ht,off:ct,getOptions:lt,getImages:at,getZoomedImage:vt}};return c(".medium-zoom-overlay{position:fixed;z-index:10000;top:0;right:0;bottom:0;left:0;opacity:0;transition:opacity .3s;will-change:opacity}.medium-zoom--opened .medium-zoom-overlay{cursor:pointer;cursor:zoom-out;opacity:1}.medium-zoom-image{cursor:pointer;cursor:zoom-in;transition:transform .3s cubic-bezier(.2,0,.2,1)!important}.medium-zoom-image--hidden{visibility:hidden}.medium-zoom-image--opened{position:relative;z-index:10000;cursor:pointer;cursor:zoom-out;will-change:transform;border:1px solid grey;box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);}"),e}); 155/* @license
156Papa Parse 157v5.3.1 158https://github.com/mholt/PapaParse 159License: MIT 160*/ 161if(function(n,t){typeof define=="function"&&define.amd?define([],t):typeof module=="object"&&typeof exports!="undefined"?module.exports=t():n.Papa=t()}(this,function moduleFactory(){"use strict";function g(){var t=i.URL||i.webkitURL||null,r=moduleFactory.toString();return n.BLOB_URL||(n.BLOB_URL=t.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))}function tt(r,u){var a,f,e;if(u=u||{},a=u.dynamicTyping||!1,t(a)&&(u.dynamicTypingFunction=a,a={}),u.dynamicTyping=a,u.transform=t(u.transform)?u.transform:!1,u.worker&&n.WORKERS_SUPPORTED){f=rt();f.userStep=u.step;f.userChunk=u.chunk;f.userComplete=u.complete;f.userError=u.error;u.step=t(u.step);u.chunk=t(u.chunk);u.complete=t(u.complete);u.error=t(u.error);delete u.worker;f.postMessage({input:r,config:u,workerId:f.id});return}return(e=null,r===n.NODE_STREAM_INPUT&&typeof PAPA_BROWSER_CONTEXT=="undefined")?(e=new l(u),e.getStream()):(typeof r=="string"?e=u.download?new s(u):new o(u):r.readable===!0&&t(r.read)&&t(r.on)?e=new c(u):(i.File&&r instanceof File||r instanceof Object)&&(e=new h(u)),e.stream(r))}function it(t,i){function w(){if(typeof i=="object"){if(typeof i.delimiter!="string"||n.BAD_DELIMITERS.filter(function(n){return i.delimiter.indexOf(n)!==-1}).length||(f=i.delimiter),(typeof i.quotes=="boolean"||typeof i.quotes=="function"||Array.isArray(i.quotes))&&(r=i.quotes),(typeof i.skipEmptyLines=="boolean"||typeof i.skipEmptyLines=="string")&&(e=i.skipEmptyLines),typeof i.newline=="string"&&(o=i.newline),typeof i.quoteChar=="string"&&(u=i.quoteChar),typeof i.header=="boolean"&&(h=i.header),Array.isArray(i.columns)){if(i.columns.length===0)throw new Error("Option columns is empty");l=i.columns}i.escapeChar!==undefined&&(c=i.escapeChar+u);typeof i.escapeFormulae=="boolean"&&(v=i.escapeFormulae)}}function s(n,t,i){var u="",e,a,c,r,w,l,k,s,d;if(typeof n=="string"&&(n=JSON.parse(n)),typeof t=="string"&&(t=JSON.parse(t)),e=Array.isArray(n)&&n.length>0,a=!Array.isArray(t[0]),e&&h){for(c=0;c<n.length;c++)c>0&&(u+=f),u+=p(n[c],c);t.length>0&&(u+=o)}for(r=0;r<t.length;r++){var v=e?n.length:t[r].length,y=!1,b=e?Object.keys(t[r]).length===0:t[r].length===0;if(i&&!e&&(y=i==="greedy"?t[r].join("").trim()==="":t[r].length===1&&t[r][0].length===0),i==="greedy"&&e){for(w=[],l=0;l<v;l++)k=a?n[l]:l,w.push(t[r][k]);y=w.join("").trim()===""}if(!y){for(s=0;s<v;s++)s>0&&!b&&(u+=f),d=e&&a?n[s]:s,u+=p(t[r][d],s);r<t.length-1&&(!i||v>0&&!b)&&(u+=o)}}return u}function p(t,i){if(typeof t=="undefined"||t===null)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);v===!0&&typeof t=="string"&&t.match(/^[=+\-@].*$/)!==null&&(t="'"+t);var e=t.toString().replace(y,c),o=typeof r=="boolean"&&r||typeof r=="function"&&r(t,i)||Array.isArray(r)&&r[i]||b(e,n.BAD_DELIMITERS)||e.indexOf(f)>-1||e.charAt(0)===" "||e.charAt(e.length-1)===" ";return o?u+e+u:e}function b(n,t){for(var i=0;i<t.length;i++)if(n.indexOf(t[i])>-1)return!0;return!1}var r=!1,h=!0,f=",",o="\r\n",u='"',c=u+u,e=!1,l=null,v=!1,y;if(w(),y=new RegExp(a(u),"g"),typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return s(null,t,e);if(typeof t[0]=="object")return s(l||Object.keys(t[0]),t,e)}else if(typeof t=="object")return typeof t.data=="string"&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:typeof t.data[0]=="object"?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||typeof t.data[0]=="object"||(t.data=[t.data])),s(t.fields||[],t.data||[],e);throw new Error("Unable to serialize unrecognized input");}function u(r){function u(n){var t=y(n);t.chunkSize=parseInt(t.chunkSize);n.step||n.chunk||(t.chunkSize=null);this._handle=new b(t);this._handle.streamer=this;this._config=t}this._handle=null;this._finished=!1;this._completed=!1;this._halted=!1;this._input=null;this._baseIndex=0;this._partialLine="";this._rowCount=0;this._start=0;this._nextChunk=null;this.isFirstChunk=!0;this._completeResults={data:[],errors:[],meta:{}};u.call(this,r);this.parseChunk=function(r,u){var o,s,f,h,e;if(this.isFirstChunk&&t(this._config.beforeFirstChunk)&&(o=this._config.beforeFirstChunk(r),o!==un
161defined&&(r=o)),this.isFirstChunk=!1,this._halted=!1,s=this._partialLine+r,this._partialLine="",f=this._handle.parse(s,this._baseIndex,!this._finished),this._handle.paused()||this._handle.aborted()){this._halted=!0;return}if(h=f.meta.cursor,this._finished||(this._partialLine=s.substring(h-this._baseIndex),this._baseIndex=h),f&&f.data&&(this._rowCount+=f.data.length),e=this._finished||this._config.preview&&this._rowCount>=this._config.preview,p)i.postMessage({results:f,workerId:n.WORKER_ID,finished:e});else if(t(this._config.chunk)&&!u){if(this._config.chunk(f,this._handle),this._handle.paused()||this._handle.aborted()){this._halted=!0;return}f=undefined;this._completeResults=undefined}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(f.data),this._completeResults.errors=this._completeResults.errors.concat(f.errors),this._completeResults.meta=f.meta),this._completed||!e||!t(this._config.complete)||f&&f.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),e||f&&f.meta.paused||this._nextChunk(),f};this._sendError=function(r){t(this._config.error)?this._config.error(r):p&&this._config.error&&i.postMessage({workerId:n.WORKER_ID,error:r,finished:!1})}}function s(t){function e(n){var t=n.getResponseHeader("Content-Range");return t===null?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}t=t||{};t.chunkSize||(t.chunkSize=n.RemoteChunkSize);u.call(this,t);var i;this._nextChunk=f?function(){this._readChunk();this._chunkLoaded()}:function(){this._readChunk()};this.stream=function(n){this._input=n;this._nextChunk()};this._readChunk=function(){var n,t,u;if(this._finished){this._chunkLoaded();return}if(i=new XMLHttpRequest,this._config.withCredentials&&(i.withCredentials=this._config.withCredentials),f||(i.onload=r(this._chunkLoaded,this),i.onerror=r(this._chunkError,this)),i.open(this._config.downloadRequestBody?"POST":"GET",this._input,!f),this._config.downloadRequestHeaders){n=this._config.downloadRequestHeaders;for(t in n)i.setRequestHeader(t,n[t])}this._config.chunkSize&&(u=this._start+this._config.chunkSize-1,i.setRequestHeader("Range","bytes="+this._start+"-"+u));try{i.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}f&&i.status===0&&this._chunkError()};this._chunkLoaded=function(){if(i.readyState===4){if(i.status<200||i.status>=400){this._chunkError();return}this._start+=this._config.chunkSize?this._config.chunkSize:i.responseText.length;this._finished=!this._config.chunkSize||this._start>=e(i);this.parseChunk(i.responseText)}};this._chunkError=function(n){var t=i.statusText||n;this._sendError(new Error(t))}}function h(t){t=t||{};t.chunkSize||(t.chunkSize=n.LocalChunkSize);u.call(this,t);var i,f,e=typeof FileReader!="undefined";this.stream=function(n){this._input=n;f=n.slice||n.webkitSlice||n.mozSlice;e?(i=new FileReader,i.onload=r(this._chunkLoaded,this),i.onerror=r(this._chunkError,this)):i=new FileReaderSync;this._nextChunk()};this._nextChunk=function(){!this._finished&&(!this._config.preview||this._rowCount<this._config.preview)&&this._readChunk()};this._readChunk=function(){var n=this._input,t,r;this._config.chunkSize&&(t=Math.min(this._start+this._config.chunkSize,this._input.size),n=f.call(n,this._start,t));r=i.readAsText(n,this._config.encoding);e||this._chunkLoaded({target:{result:r}})};this._chunkLoaded=function(n){this._start+=this._config.chunkSize;this._finished=!this._config.chunkSize||this._start>=this._input.size;this.parseChunk(n.target.result)};this._chunkError=function(){this._sendError(i.error)}}function o(n){n=n||{};u.call(this,n);var t;this.stream=function(n){return t=n,this._nextChunk()};this._nextChunk=function(){if(!this._finished){var n=this._config.chunkSize,i;return n?(i=t.substring(0,n),t=t.substring(n)):(i=t,t=""),this._finished=!t,this.parseChunk(i)}}}function c(n){n=n||{};u.call(this,n);var t=[],i=!0,f=!1;this.pause=function(){u.prototype.pause.apply(this,arguments);this._input.pause()};this.resume=function(){u.prototype.resume.apply(this,arguments);this._input.resume()};this.stream=function(n){this._input=n;this._input.on("data",this._streamData);this._input.on("end",this._streamEnd);this._input.on("error",this._streamError)};this._checkIsFinished=function(){f&&t.length===1&&(this._finished=!0)};this._nextChunk=function(){this._checkIsFinished();t.length?this.parseChunk(t.shift()):i=!0};this._streamData=r(function(n){try{t.push(typeof n=="string"?n:n.toString(this._config.encoding));i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(r){this._streamError(r)}},this);this._streamError=r(function(n){this._streamCleanUp();this._sendError(n)},this);this._streamEnd=r(function(){this._streamCleanUp();f=!0;this._streamData("")},this);this._streamCleanUp=r(function(){this._input.removeListener("data",this._streamData);this._input.removeListener("end",this._streamEnd);this._input.removeListener("error",this._streamError)},this)}function l(n){var h=require("stream").Duplex,f=y(n),o=!0,s=!1,e=[],i=null;this._onCsvData=function(n){var t=n.data;i.push(t)||this._handle.paused()||this._handle.pause()};this._onCsvComplete=function(){i.push(null)};f.step=r(this._onCsvData,this);f.complete=r(this._onCsvComplete,this);u.call(this,f);this._nextChunk=function(){s&&e.length===1&&(this._finished=!0);e.length?e.shift()():o=!0};this._addToParseQueue=function(n,i){e.push(r(function(){return this.parseChunk(typeof n=="string"?n:n.toString(f.encoding)),t(i)?i():void 0},this));o&&(o=!1,this._nextChunk())};this._onRead=function(){this._handle.paused()&&this._handle.resume()};this._onWrite=function(n,t,i){this._addToParseQueue(n,i)};this._onWriteComplete=function(){s=!0;this._addToParseQueue("")};
161this.getStream=function(){return i};i=new h({readableObjectMode:!0,decodeStrings:!1,read:r(this._onRead,this),write:r(this._onWrite,this)});i.once("finish",r(this._onWriteComplete,this))}function b(i){function nt(n){return i.skipEmptyLines==="greedy"?n.join("").trim()==="":n.length===1&&n[0].length===0}function ut(n){if(it.test(n)){var t=parseFloat(n);if(t>tt&&t<b)return!0}return!1}function l(){if(r&&h&&(p("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+n.DefaultDelimiter+"'"),h=!1),i.skipEmptyLines)for(var t=0;t<r.data.length;t++)nt(r.data[t])&&r.data.splice(t--,1);return v()&&ft(),st()}function v(){return i.header&&u.length===0}function ft(){function f(n,r){t(i.transformHeader)&&(n=i.transformHeader(n,r));u.push(n)}if(r)if(Array.isArray(r.data[0])){for(var n=0;v()&&n<r.data.length;n++)r.data[n].forEach(f);r.data.splice(0,1)}else r.data.forEach(f)}function et(n){return i.dynamicTypingFunction&&i.dynamicTyping[n]===undefined&&(i.dynamicTyping[n]=i.dynamicTypingFunction(n)),(i.dynamicTyping[n]||i.dynamicTyping)===!0}function ot(n,t){return et(n)?t==="true"||t==="TRUE"?!0:t==="false"||t==="FALSE"?!1:ut(t)?parseFloat(t):rt.test(t)?new Date(t):t===""?null:t:t}function st(){function n(n,t){for(var o=i.header?{}:[],f,e,r=0;r<n.length;r++)f=r,e=n[r],i.header&&(f=r>=u.length?"__parsed_extra":u[r]),i.transform&&(e=i.transform(e,f)),e=ot(f,e),f==="__parsed_extra"?(o[f]=o[f]||[],o[f].push(e)):o[f]=e;return i.header&&(r>u.length?p("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+r,c+t):r<u.length&&p("FieldMismatch","TooFewFields","Too few fields: expected "+u.length+" fields but parsed "+r,c+t)),o}if(!r||!i.header&&!i.dynamicTyping&&!i.transform)return r;var t=1;return!r.data.length||Array.isArray(r.data[0])?(r.data=r.data.map(n),t=r.data.length):r.data=n(r.data,0),i.header&&r.meta&&(r.meta.fields=u),c+=t,r}function ht(t,r,u,f,e){var a,y,h,p,v,o,l,s;for(e=e||[",","\t","|",";",n.RECORD_SEP,n.UNIT_SEP],v=0;v<e.length;v++){var k=e[v],b=0,c=0,d=0;for(h=undefined,o=new w({comments:f,delimiter:k,newline:r,preview:10}).parse(t),l=0;l<o.data.length;l++){if(u&&nt(o.data[l])){d++;continue}if(s=o.data[l].length,c+=s,typeof h=="undefined"){h=s;continue}else s>0&&(b+=Math.abs(s-h),h=s)}o.data.length>0&&(c/=o.data.length-d);(typeof y=="undefined"||b<=y)&&(typeof p=="undefined"||c>p)&&c>1.99&&(y=b,a=k,p=c)}return i.delimiter=a,{successful:!!a,bestDelimiter:a}}function ct(n,t){var f,u,r;n=n.substring(0,1048576);f=new RegExp(a(t)+"([^]*?)"+a(t),"gm");n=n.replace(f,"");var i=n.split("\r"),e=n.split("\n"),o=e.length>1&&e[0].length<i[0].length;if(i.length===1||o)return"\n";for(u=0,r=0;r<i.length;r++)i[r][0]==="\n"&&u++;return u>=i.length/2?"\r\n":"\r"}function p(n,t,i,u){var f={type:n,code:t,message:i};u!==undefined&&(f.row=u);r.errors.push(f)}var b=Math.pow(2,53),tt=-b,it=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,rt=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,o=this,k=0,c=0,f,e,s=!1,d=!1,h,u=[],r={data:[],errors:[],meta:{}},g;t(i.step)&&(g=i.step,i.step=function(n){if(r=n,v())l();else{if(l(),r.data.length===0)return;k+=n.data.length;i.preview&&k>i.preview?e.abort():(r.data=r.data[0],g(r,o))}});this.parse=function(u,o,c){var p=i.quoteChar||'"',a,v;return i.newline||(i.newline=ct(u,p)),h=!1,i.delimiter?t(i.delimiter)&&(i.delimiter=i.delimiter(u),r.meta.delimiter=i.delimiter):(a=ht(u,i.newline,i.skipEmptyLines,i.comments,i.delimitersToGuess),a.successful?i.delimiter=a.bestDelimiter:(h=!0,i.delimiter=n.DefaultDelimiter),r.meta.delimiter=i.delimiter),v=y(i),i.preview&&i.header&&v.preview++,f=u,e=new w(v),r=e.parse(f,o,c),l(),s?{meta:{paused:!0}}:r||{meta:{paused:!1}}};this.paused=function(){return s};this.pause=function(){s=!0;e.abort();f=t(i.chunk)?"":f.substring(e.getCharIndex())};this.resume=function(){o.streamer._halted?(s=!1,o.streamer.parseChunk(f,!0)):setTimeout(o.resume,3)};this.aborted=function(){return d};this.abort=function(){d=!0;e.abort();r.meta.aborted=!0;t(i.complete)&&i.complete(r);f=""}}function a(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(i){var h,r,c;i=i||{};var u=i.delimiter,e=i.newline,o=i.comments,l=i.step,s=i.preview,v=i.fastMode,f;if(f=i.quoteChar===undefined?'"':i.quoteChar,h=f,i.escapeChar!==undefined&&(h=i.escapeChar),(typeof u!="string"||n.BAD_DELIMITERS.indexOf(u)>-1)&&(u=","),o===u)throw new Error("Comment character same as delimiter");else o===!0?o="#":(typeof o!="string"||n.BAD_DELIMITERS.indexOf(o)>-1)&&(o=!1);e!=="\n"&&e!=="\r"&&e!=="\r\n"&&(e="\n");r=0;c=!1;this.parse=function(n,i,y){function st(n){g.push(n);yt=r}function bt(t){var r=0,i;return t!==-1&&(i=n.substring(p+1,t),i&&i.trim()===""&&(r=i.length)),r}function lt(t){return y?d():(typeof t=="undefined"&&(t=n.substring(r)),b.push(t),r=at,st(b),rt&&ht(),d())}function kt(t){r=t;st(b);b=[];w=n.indexOf(e,r)}function d(n){return{data:g,errors:ut,meta:{delimiter:u,linebreak:e,aborted:c,truncated:!!n,cursor:yt+(i||0)}}}function ht(){l(d());g=[];ut=[]}var ft,nt,pt,wt,et,ot;
161if(typeof n!="string")throw new Error("Input must be a string");var at=n.length,tt=u.length,it=e.length,vt=o.length,rt=t(l);r=0;var g=[],ut=[],b=[],yt=0;if(!n)return d();if(v||v!==!1&&n.indexOf(f)===-1){for(ft=n.split(e),nt=0;nt<ft.length;nt++){if(b=ft[nt],r+=b.length,nt!==ft.length-1)r+=e.length;else if(y)return d();if(!o||b.substring(0,vt)!==o){if(rt){if(g=[],st(b.split(u)),ht(),c)return d()}else st(b.split(u));if(s&&nt>=s)return g=g.slice(0,s),d(!0)}}return d()}for(var k=n.indexOf(u,r),w=n.indexOf(e,r),ct=new RegExp(a(h)+a(f),"g"),p=n.indexOf(f,r);;){if(n[r]===f){for(p=r,r++;;){if(p=n.indexOf(f,p+1),p===-1)return y||ut.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:g.length,index:r}),lt();if(p===at-1)return pt=n.substring(r,p).replace(ct,f),lt(pt);if(f===h&&n[p+1]===h){p++;continue}if(f===h||p===0||n[p-1]!==h){if(k!==-1&&k<p+1&&(k=n.indexOf(u,p+1)),w!==-1&&w<p+1&&(w=n.indexOf(e,p+1)),wt=w===-1?k:Math.min(k,w),et=bt(wt),n.substr(p+1+et,tt)===u){b.push(n.substring(r,p).replace(ct,f));r=p+1+et+tt;n[p+1+et+tt]!==f&&(p=n.indexOf(f,r));k=n.indexOf(u,r);w=n.indexOf(e,r);break}if(ot=bt(w),n.substring(p+1+ot,p+1+ot+it)===e){if(b.push(n.substring(r,p).replace(ct,f)),kt(p+1+ot+it),k=n.indexOf(u,r),p=n.indexOf(f,r),rt&&(ht(),c))return d();if(s&&g.length>=s)return d(!0);break}ut.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:g.length,index:r});p++;continue}}continue}if(o&&b.length===0&&n.substring(r,r+vt)===o){if(w===-1)return d();r=w+it;w=n.indexOf(e,r);k=n.indexOf(u,r);continue}if(k!==-1&&(k<w||w===-1)){b.push(n.substring(r,k));r=k+tt;k=n.indexOf(u,r);continue}if(w!==-1){if(b.push(n.substring(r,w)),kt(w+it),rt&&(ht(),c))return d();if(s&&g.length>=s)return d(!0);continue}break}return lt()};this.abort=function(){c=!0};this.getCharIndex=function(){return r}}function rt(){if(!n.WORKERS_SUPPORTED)return!1;var r=g(),t=new i.Worker(r);return t.onmessage=ut,t.id=nt++,v[t.id]=t,t}function ut(n){var i=n.data,r=v[i.workerId],f=!1,o,e,u;if(i.error)r.userError(i.error,i.file);else if(i.results&&i.results.data)if(o=function(){f=!0;k(i.workerId,{data:[],errors:[],meta:{aborted:!0}})},e={abort:o,pause:d,resume:d},t(r.userStep)){for(u=0;u<i.results.data.length;u++)if(r.userStep({data:i.results.data[u],errors:i.results.errors,meta:i.results.meta},e),f)break;delete i.results}else t(r.userChunk)&&(r.userChunk(i.results,e,i.file),delete i.results);i.finished&&!f&&k(i.workerId,i.results)}function k(n,i){var r=v[n];t(r.userComplete)&&r.userComplete(i);r.terminate();delete v[n]}function d(){throw new Error("Not implemented.");}function ft(t){var r=t.data,u;typeof n.WORKER_ID=="undefined"&&r&&(n.WORKER_ID=r.workerId);typeof r.input=="string"?i.postMessage({workerId:n.WORKER_ID,results:n.parse(r.input,r.config),finished:!0}):(i.File&&r.input instanceof File||r.input instanceof Object)&&(u=n.parse(r.input,r.config),u&&i.postMessage({workerId:n.WORKER_ID,results:u,finished:!0}))}function y(n){var t,i;if(typeof n!="object"||n===null)return n;t=Array.isArray(n)?[]:{};for(i in n)t[i]=y(n[i]);return t}function r(n,t){return function(){n.apply(t,arguments)}}function t(n){return typeof n=="function"}var i=function(){return typeof self!="undefined"?self:typeof window!="undefined"?window:typeof i!="undefined"?i:{}}(),f=!i.document&&!!i.postMessage,p=f&&/blob:/i.test((i.location||{}).protocol),v={},nt=0,n={},e;return n.parse=tt,n.unparse=it,n.RECORD_SEP=String.fromCharCode(30),n.UNIT_SEP=String.fromCharCode(31),n.BYTE_ORDER_MARK="",n.BAD_DELIMITERS=["\r","\n",'"',n.BYTE_ORDER_MARK],n.WORKERS_SUPPORTED=!f&&!!i.Worker,n.NODE_STREAM_INPUT=1,n.LocalChunkSize=10485760,n.RemoteChunkSize=5242880,n.DefaultDelimiter=",",n.Parser=w,n.ParserHandle=b,n.NetworkStreamer=s,n.FileStreamer=h,n.StringStreamer=o,n.ReadableStreamStreamer=c,typeof PAPA_BROWSER_CONTEXT=="undefined"&&(n.DuplexStreamStreamer=l),i.jQuery&&(e=i.jQuery,e.fn.parse=function(r){function o(){var i,o,s;if(u.length===0){t(r.complete)&&r.complete();return}if(i=u[0],t(r.before))if(o=r.before(i.file,i.inputElem),typeof o=="object"){if(o.action==="abort"){h("AbortError",i.file,i.inputElem,o.reason);return}if(o.action==="skip"){f();return}typeof o.config=="object"&&(i.instanceConfig=e.extend(i.instanceConfig,o.config))}else if(o==="skip"){f();return}s=i.instanceConfig.complete;i.instanceConfig.complete=function(n){t(s)&&s(n,i.file,i.inputElem);f()};n.parse(i.file,i.instanceConfig)}function h(n,i,u,f){t(r.error)&&r.error({name:n},i,u,f)}function f(){u.splice(0,1);o()}var s=r.config||{},u=[];return this.each(function(){var t=e(this).prop("tagName").toUpperCase()==="INPUT"&&e(this).attr("type").toLowerCase()==="file"&&i.FileReader,n;if(!t||!this.files||this.files.length===0)return!0;for(n=0;n<this.files.length;n++)u.push({file:this.files[n],inputElem:this,instanceConfig:e.extend({},s)})}),o(),this}),p&&(i.onmessage=ft),s.prototype=Object.create(u.prototype),s.prototype.constructor=s,h.prototype=Object.create(u.prototype),h.prototype.constructor=h,o.prototype=Object.create(o.prototype),o.prototype.constructor=o,c.prototype=Object.create(u.prototype),c.prototype.constructor=c,typeof PAPA_BROWSER_CONTEXT=="undefined"&&(l.prototype=Object.create(u.prototype),l.prototype.constructor=l),n}
161),function(n){n.forEach(function(n){n.hasOwnProperty("prepend")||Object.defineProperty(n,"prepend",{configurable:!0,enumerable:!0,writable:!0,value:function(){var t=Array.prototype.slice.call(arguments),n=document.createDocumentFragment();t.forEach(function(t){var i=t instanceof Node;n.appendChild(i?t:document.createTextNode(String(t)))});this.insertBefore(n,this.firstChild)}})})}([Element.prototype,Document.prototype,DocumentFragment.prototype]),function(n,t){"use strict";var i={};n.PubSub=i;t(i);typeof exports=="object"?(module!==undefined&&module.exports&&(exports=module.exports=i),exports.PubSub=i,module.exports=exports=i):typeof define=="function"&&define.amd&&define(function(){return i})}(typeof window=="object"&&window||this,function(n){"use strict";function o(n){for(var t in n)if(Object.prototype.hasOwnProperty.call(n,t))return!0;return!1}function s(n){return function(){throw n;}}function h(n,t,i){try{n(t,i)}catch(r){setTimeout(s(r),0)}}function c(n,t,i){n(t,i)}function r(n,i,r,u){var f=t[i],o=u?c:h,e;if(Object.prototype.hasOwnProperty.call(t,i))for(e in f)Object.prototype.hasOwnProperty.call(f,e)&&o(f[e],n,r)}function l(n,t,u){return function(){var f=String(n),e=f.lastIndexOf(".");for(r(n,n,t,u);e!==-1;)f=f.substr(0,e),e=f.lastIndexOf("."),r(n,f,t,u);r(n,i,t,u)}}function u(n){var i=String(n);return Boolean(Object.prototype.hasOwnProperty.call(t,i)&&o(t[i]))}function a(n){for(var t=String(n),r=u(t)||u(i),f=t.lastIndexOf(".");!r&&f!==-1;)t=t.substr(0,f),f=t.lastIndexOf("."),r=u(t);return r}function f(n,t,i,r){n=typeof n=="symbol"?n.toString():n;var u=l(n,t,r),f=a(n);return f?(i===!0?u():setTimeout(u,0),!0):!1}var t={},e=-1,i="*";n.publish=function(t,i){return f(t,i,!1,n.immediateExceptions)};n.publishSync=function(t,i){return f(t,i,!0,n.immediateExceptions)};n.subscribe=function(n,i){if(typeof i!="function")return!1;n=typeof n=="symbol"?n.toString():n;Object.prototype.hasOwnProperty.call(t,n)||(t[n]={});var r="uid_"+String(++e);return t[n][r]=i,r};n.subscribeAll=function(t){return n.subscribe(i,t)};n.subscribeOnce=function(t,i){var r=n.subscribe(t,function(){n.unsubscribe(r);i.apply(this,arguments)});return n};n.clearAllSubscriptions=function(){t={}};n.clearSubscriptions=function(n){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&i.indexOf(n)===0&&delete t[i]};n.countSubscriptions=function(n){var i,u,r=0;for(i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.indexOf(n)===0){for(u in t[i])r++;break}return r};n.getSubscriptions=function(n){var i,r=[];for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&i.indexOf(n)===0&&r.push(i);return r};n.unsubscribe=function(i){var s=function(n){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.indexOf(n)===0)return!0;return!1},o=typeof i=="string"&&(Object.prototype.hasOwnProperty.call(t,i)||s(i)),h=!o&&typeof i=="string",c=typeof i=="function",f=!1,e,r,u;if(o){n.clearSubscriptions(i);return}for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){if(r=t[e],h&&r[i]){delete r[i];f=i;break}if(c)for(u in r)Object.prototype.hasOwnProperty.call(r,u)&&r[u]===i&&(delete r[u],f=!0)}return f}}),typeof Resumable=="undefined"&&(Resumable=function(n){function s(n,t,i,r){var u,f;if(!n){r();return}if(n.isFile)return n.file(function(n,t){t.fullPath=n;t.relativePath=c(n,t.fileName||t.name);i.push(t);r()}.bind(this,n.fullPath));if(n.isDirectory?u=n:n instanceof File&&(n.relativePath=t,i.push(n)),"function"==typeof n.webkitGetAsEntry?u=n.webkitGetAsEntry():"function"==typeof n.getAsEntry&&(u=n.getAsEntry()),u&&u.isDirectory)return v(u,t+u.name+"/",i,r);if("function"==typeof n.getAsFile){if(f=n.getAsFile(),f&&f instanceof File){f.relativePath=t;i.push(f);r();return}if(!f&&"function"==typeof n.getAsFileSystemHandle){n.getAsFileSystemHandle().then(function(n){n&&n.kind==="file"?n.getFile().then(function(n){n instanceof File&&(n.relativePath=t,i.push(n));r()}).catch(function(){r()}):r()}).catch(function(){r()});return}}r()}function e(n,t){if(!n||n.length===0)return t();n[0](function(){e(n.slice(1),t)})}function v(n,t,i,r){function f(){o.readEntries(function(n){if(n.length)return u=u.concat(n),f();e(u.map(function(n){return s.bind(null,n,t,i)}),r)})}var o=n.createReader(),u=[];f()}
161function h(n,i){if(n.length){t.fire("beforeAdd");var u=[];e(Array.prototype.map.call(n,function(n){var t=n;return"function"==typeof n.webkitGetAsEntry?t=n.webkitGetAsEntry():"function"==typeof n.getAsEntry&&(t=n.getAsEntry()),s.bind(null,t,"",u)}),function(){var n,f;if(!u.length&&(n=i.dataTransfer.files,n&&n.length>0))for(f=0;f<n.length;f++)n[f].size&&u.push(n[f]);u.length?r(u,i):t.fire("emptyDirectory",i)})}}function l(n,t,r){var u=this,f,e;return u.opts={},u.getOpt=n.getOpt,u._prevProgress=0,u.resumableObj=n,u.file=t,u.fileName=t.fileName||t.name,u.size=t.size,u.relativePath=t.relativePath,u.uniqueIdentifier=r,u._pause=!1,u.container="",u.preprocessState=0,f=r!==undefined,e=function(n,t){switch(n){case"progress":u.resumableObj.fire("fileProgress",u,t);break;case"error":u.abort();f=!0;u.chunks=[];u.resumableObj.fire("fileError",u,t);break;case"success":if(f)return;u.resumableObj.fire("fileProgress",u,t);u.isComplete()&&u.resumableObj.fire("fileSuccess",u,t);break;case"retry":u.resumableObj.fire("fileRetry",u)}},u.chunks=[],u.abort=function(){var n=0;i.each(u.chunks,function(t){t.status()=="uploading"&&(t.abort(),n++)});n>0&&u.resumableObj.fire("fileProgress",u)},u.cancel=function(){var n=u.chunks;u.chunks=[];i.each(n,function(n){n.status()=="uploading"&&(n.abort(),u.resumableObj.uploadNextChunk())});u.resumableObj.removeFile(u);u.resumableObj.fire("fileProgress",u)},u.retry=function(){u.bootstrap();var n=!1;u.resumableObj.on("chunkingComplete",function(){n||u.resumableObj.upload();n=!0})},u.bootstrap=function(){var i,t,n;for(u.abort(),f=!1,u.chunks=[],u._prevProgress=0,i=u.getOpt("forceChunkSize")?Math.ceil:Math.floor,t=Math.max(i(u.file.size/u.getOpt("chunkSize")),1),n=0;n<t;n++)(function(n){u.chunks.push(new a(u.resumableObj,u,n,e));u.resumableObj.fire("chunkingProgress",u,n/t)})(n);window.setTimeout(function(){u.resumableObj.fire("chunkingComplete",u)},0)},u.progress=function(){if(f)return 1;var n=0,t=!1;return i.each(u.chunks,function(i){i.status()=="error"&&(t=!0);n+=i.progress(!0)}),n=t?1:n>.99999?1:n,n=Math.max(u._prevProgress,n),u._prevProgress=n,n},u.isUploading=function(){var n=!1;return i.each(u.chunks,function(t){if(t.status()=="uploading")return n=!0,!1}),n},u.isComplete=function(){var n=!1;return u.preprocessState===1?!1:(i.each(u.chunks,function(t){var i=t.status();if(i=="pending"||i=="uploading"||t.preprocessState===1)return n=!0,!1}),!n)},u.pause=function(n){u._pause=typeof n=="undefined"?u._pause?!1:!0:n},u.isPaused=function(){return u._pause},u.preprocessFinished=function(){u.preprocessState=2;u.upload()},u.upload=function(){var t=!1,n;if(u.isPaused()===!1){if(n=u.getOpt("preprocessFile"),typeof n=="function")switch(u.preprocessState){case 0:return u.preprocessState=1,n(u),!0;case 1:return!0}i.each(u.chunks,function(n){if(n.status()=="pending"&&n.preprocessState!==1)return n.send(),t=!0,!1})}return t},u.markChunksCompleted=function(n){if(u.chunks&&!(u.chunks.length<=n))for(var t=0;t<n;t++)u.chunks[t].markComplete=!0},u.resumableObj.fire("chunkingStart",u),u.bootstrap(),this}function a(n,t,r,u){var f=this,e;return f.opts={},f.getOpt=n.getOpt,f.resumableObj=n,f.fileObj=t,f.fileObjSize=t.size,f.fileObjType=t.file.type,f.offset=r,f.callback=u,f.lastProgressCallback=new Date,f.tested=!1,f.retries=0,f.pendingRetry=!1,f.preprocessState=0,f.markComplete=!1,e=f.getOpt("chunkSize"),f.loaded=0,f.startByte=f.offset*e,f.endByte=Math.min(f.fileObjSize,(f.offset+1)*e),f.fileObjSize-f.endByte<e&&!f.getOpt("forceChunkSize")&&(f.endByte=f.fileObjSize),f.xhr=null,f.test=function(){var t,n;f.xhr=new XMLHttpRequest;t=function(){f.tested=!0;var n=f.status();n=="success"?(f.callback(n,f.message()),f.resumableObj.uploadNextChunk()):f.send()};f.xhr.addEventListener("load",t,!1);f.xhr.addEventListener("error",t,!1);f.xhr.addEventListener("timeout",t,!1);var r=[],e=f.getOpt("parameterNamespace"),u=f.getOpt("query");typeof u=="function"&&(u=u(f.fileObj,f));
161i.each(u,function(n,t){r.push([encodeURIComponent(e+n),encodeURIComponent(t)].join("="))});r=r.concat([["chunkNumberParameterName",f.offset+1],["chunkSizeParameterName",f.getOpt("chunkSize")],["currentChunkSizeParameterName",f.endByte-f.startByte],["totalSizeParameterName",f.fileObjSize],["typeParameterName",f.fileObjType],["identifierParameterName",f.fileObj.uniqueIdentifier],["fileNameParameterName",f.fileObj.fileName],["relativePathParameterName",f.fileObj.relativePath],["totalChunksParameterName",f.fileObj.chunks.length]].filter(function(n){return f.getOpt(n[0])}).map(function(n){return[e+f.getOpt(n[0]),encodeURIComponent(n[1])].join("=")}));f.xhr.open(f.getOpt("testMethod"),i.getTarget("test",r));f.xhr.timeout=f.getOpt("xhrTimeout");f.xhr.withCredentials=f.getOpt("withCredentials");n=f.getOpt("headers");typeof n=="function"&&(n=n(f.fileObj,f));i.each(n,function(n,t){f.xhr.setRequestHeader(n,t)});f.xhr.send(null)},f.preprocessFinished=function(){f.preprocessState=2;f.send()},f.send=function(){var v=f.getOpt("preprocess"),s,h,t,c,y,e,o;if(typeof v=="function")switch(f.preprocessState){case 0:f.preprocessState=1;v(f);return;case 1:return}if(f.getOpt("testChunks")&&!f.tested){f.test();return}f.xhr=new XMLHttpRequest;f.xhr.upload.addEventListener("progress",function(n){new Date-f.lastProgressCallback>f.getOpt("throttleProgressCallbacks")*1e3&&(f.callback("progress"),f.lastProgressCallback=new Date);f.loaded=n.loaded||0},!1);f.loaded=0;f.pendingRetry=!1;f.callback("progress");s=function(){var n=f.status(),t;f.xhr&&n=="success"&&(f.etag&&Matrix3.LogWarning("Duplicate chunk upload detected: File=["+f.fileObj.fileName+"], UIRecordID=["+f.fileObj.cortexStatus.UIRecordId+"], ChunkOffset=["+f.offset+"], OldETag=["+f.etag+"], NewETag=["+f.xhr.getResponseHeader("ETag")+"]"),f.etag=f.xhr.getResponseHeader("ETag"));f.fileObj.sourceFileMissing||f.fileObj.sourceFileUnReadable||f.fileObj.sourceFileForbidden?(f.callback("error",f.message()),f.resumableObj.uploadNextChunk()):n=="success"||n=="error"?(f.callback(n,f.message()),f.resumableObj.uploadNextChunk()):(f.callback("retry",f.message()),f.abort(),f.retries++,t=f.getOpt("chunkRetryInterval"),t!==undefined?(f.pendingRetry=!0,setTimeout(f.send,t)):f.send())};f.xhr.addEventListener("load",s,!1);f.xhr.addEventListener("error",s,!1);f.xhr.addEventListener("timeout",s,!1);h=[].filter(function(n){return f.getOpt(n[0])}).reduce(function(n,t){return n[f.getOpt(t[0])]=t[1],n},{});t=f.getOpt("query");typeof t=="function"&&(t=t(f.fileObj,f));i.each(t,function(n,t){h[n]=t});var p=f.fileObj.file.slice?"slice":f.fileObj.file.mozSlice?"mozSlice":f.fileObj.file.webkitSlice?"webkitSlice":"slice",l=f.fileObj.file[p](f.startByte,f.endByte,f.getOpt("setChunkTypeFromFile")?f.fileObj.file.type:""),n=null,a=[],r=f.getOpt("parameterNamespace"),u=f.getOpt("method");typeof u=="function"&&(u=u(f.fileObj,f));u==="octet"?(n=l,i.each(h,function(n,t){a.push([encodeURIComponent(r+n),encodeURIComponent(t)].join("="))})):(n=new FormData,i.each(h,function(t,i){n.append(r+t,i);a.push([encodeURIComponent(r+t),encodeURIComponent(i)].join("="))}),f.getOpt("chunkFormat")=="blob"?n.append(r+f.getOpt("fileParameterName"),l,f.fileObj.fileName):f.getOpt("chunkFormat")=="base64"&&(c=new FileReader,c.onload=function(){n.append(r+f.getOpt("fileParameterName"),c.result);f.xhr.send(n)},c.readAsDataURL(l)));y=i.getTarget("upload",a);e=f.getOpt("uploadMethod");typeof e=="function"&&(e=e(f.fileObj,f));f.xhr.open(e,y);u==="octet"&&f.xhr.setRequestHeader("Content-Type","application/octet-stream");f.xhr.timeout=f.getOpt("xhrTimeout");f.xhr.withCredentials=f.getOpt("withCredentials");o=f.getOpt("headers");typeof o=="function"&&(o=o(f.fileObj,f));i.each(o,function(n,t){f.xhr.setRequestHeader(n,t)});f.getOpt("chunkFormat")=="blob"&&f.xhr.send(n)},f.abort=function(){f.xhr&&f.xhr.abort();f.xhr=null},f.status=function(){return f.fileObj.xhrStatus=f.xhr?f.xhr.status:0,f.pendingRetry?"uploading":f.markComplete?"success":f.xhr?f.xhr.readyState<4?"uploading":f.xhr.status==200||f.xhr.status==201||f.xhr.status==202?"success":i.contains(f.getOpt("permanentErrors"),f.xhr.status)||f.retries>=f.getOpt("maxChunkRetries")?"error":(f.abort(),"pending"):"pending"}
161,f.message=function(){return f.xhr?f.xhr.responseText:""},f.progress=function(n){var t,i;if(typeof n=="undefined"&&(n=!1),t=n?(f.endByte-f.startByte)/f.fileObjSize:1,f.pendingRetry)return 0;f.xhr&&f.xhr.status||f.markComplete||(t*=.95);i=f.status();switch(i){case"success":case"error":return 1*t;case"pending":return 0*t;default:return f.loaded/(f.endByte-f.startByte)*t}},this}var t,c,r;if(!(this instanceof Resumable))return new Resumable(n);if(this.version=1,this.support=typeof File!="undefined"&&typeof Blob!="undefined"&&typeof FileList!="undefined"&&(!!Blob.prototype.webkitSlice||!!Blob.prototype.mozSlice||!!Blob.prototype.slice||!1),!this.support)return!1;t=this;t.files=[];t.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,fileParameterName:"file",chunkNumberParameterName:"resumableChunkNumber",chunkSizeParameterName:"resumableChunkSize",currentChunkSizeParameterName:"resumableCurrentChunkSize",totalSizeParameterName:"resumableTotalSize",typeParameterName:"resumableType",identifierParameterName:"resumableIdentifier",fileNameParameterName:"resumableFilename",relativePathParameterName:"resumableRelativePath",totalChunksParameterName:"resumableTotalChunks",dropActive:"Selected",throttleProgressCallbacks:.5,query:{},headers:{},preprocess:null,preprocessFile:null,method:"multipart",uploadMethod:"POST",testMethod:"GET",prioritizeFirstAndLastChunk:!1,target:"/",testTarget:null,parameterNamespace:"",testChunks:!0,generateUniqueIdentifier:null,getTarget:null,maxChunkRetries:100,chunkRetryInterval:undefined,permanentErrors:[400,401,403,404,409,415,500,501],maxFiles:undefined,withCredentials:!1,xhrTimeout:0,clearInput:!0,chunkFormat:"blob",setChunkTypeFromFile:!1,maxFilesErrorCallback:function(){var n=t.getOpt("maxFiles");alert("Please upload no more than "+n+" file"+(n===1?"":"s")+" at a time.")},minFileSize:0,minFileSizeErrorCallback:function(n){alert(n.fileName||n.name+" is too small, please upload files larger than "+i.formatSize(t.getOpt("minFileSize"))+".")},maxFileSize:undefined,maxFileSizeErrorCallback:function(n){alert(n.fileName||n.name+" is too large, please upload files less than "+i.formatSize(t.getOpt("maxFileSize"))+".")},fileType:[],fileTypeErrorCallback:function(n){alert(n.fileName||n.name+" has invalid extension. Only "+t.getOpt("fileType")+" are allowed.")}};t.opts=n||{};t.getOpt=function(n){var t=this,r;if(n instanceof Array)return r={},i.each(n,function(n){r[n]=t.getOpt(n)}),r;if(t instanceof a){if(typeof t.opts[n]!="undefined")return t.opts[n];t=t.fileObj}if(t instanceof l){if(typeof t.opts[n]!="undefined")return t.opts[n];t=t.resumableObj}if(t instanceof Resumable)return typeof t.opts[n]!="undefined"?t.opts[n]:t.defaults[n]};t.indexOf=function(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0;i<n.length;i++)if(n[i]===t)return i;return-1};t.events=[];t.on=function(n,i){t.events.push(n.toLowerCase(),i)};t.fire=function(){for(var r,i=[],n=0;n<arguments.length;n++)i.push(arguments[n]);for(r=i[0].toLowerCase(),n=0;n<=t.events.length;n+=2)t.events[n]==r&&t.events[n+1].apply(t,i.slice(1)),t.events[n]=="catchall"&&t.events[n+1].apply(null,i);r=="fileerror"&&t.fire("error",i[2],i[1]);r=="fileprogress"&&t.fire("progress")};var i={stopEvent:function(n){n.stopPropagation();n.preventDefault()},each:function(n,t){if(typeof n.length!="undefined"){for(var i=0;i<n.length;i++)if(t(n[i])===!1)return}else for(i in n)if(t(i,n[i])===!1)return},generateUniqueIdentifier:function(n,i){var r=t.getOpt("generateUniqueIdentifier");if(typeof r=="function")return r(n,i);var u=n.relativePath||n.webkitRelativePath||n.fileName||n.name,f=n.fileName||n.name,o=n.size,e=function(n){return typeof n.normalize=="function"?n.normalize("NFC"):n},s=function(n){for(var t=0,i=0;i<n.length;i++)t=(t<<5)-t+n.charCodeAt(i)|0;return(t>>>0).toString(36)},h=s(e(u)+"/"+e(f));return o+"-"+u.replace(/[^0-9a-zA-Z_-]/img,"")+"-"+f.replace(/[^0-9a-zA-Z_-]/img,"")+"-"+h},contains:function(n,t){var r=!1;return i.each(n,function(n){return n==t?(r=!0,!1):!0}),r},formatSize:function(n){return n<1024?n+" bytes":n<1048576?(n/1024).toFixed(0)+" KB":n<1073741824?(n/1048576).toFixed(1)+" MB":(n/1073741824).toFixed(1)+" GB"},getTarget:function(n,i){var r=t.getOpt("target"),f,u;return(n==="test"&&t.getOpt("testTarget")&&(r=t.getOpt("testTarget")==="/"?t.getOpt("target"):t.getOpt("testTarget")),typeof r=="function")?r(i):(f=r.indexOf("?")<0?"?":"&",u=i.join("&"),u&&(r=r+f+u),r)}},f=function(n){n.currentTarget.classList.add(t.getOpt("dropActive"));i.stopEvent(n);t.fire("startProgress");n.dataTransfer&&n.dataTransfer.items?h(n.dataTransfer.items,n):n.dataTransfer&&n.dataTransfer.files&&h(n.dataTransfer.files,n)},o=function(n){n.currentTarget.classList.remove(t.getOpt("dropActive"))},u=function(n){n.preventDefault();var i=n.dataTransfer;t.indexOf(i.types,"Files")>=0?(n.stopPropagation(),i.dropEffect="copy",i.effectAllowed="copy",n.currentTarget.classList.add(t.getOpt("dropActive"))):(i.dropEffect="none",i.effectAllowed="none")};return c=function(n,t){return n&&(n=n.substring(1,n.length-(t.length+1)),n&&n.charAt(n.Length-1)=="/"&&(n=n.substring(0,n.length-1))),n},r=function(n,r){var f=0,u=t.getOpt(["maxFiles","minFileSize","maxFileSize","maxFilesErrorCallback","minFileSizeErrorCallback","maxFileSizeErrorCallback","fileType","fileTypeErrorCallback"]);if(typeof u.maxFiles!="undefined"&&u.maxFiles<n.length+t.files.length)if(u.maxFiles===1&&t.files.length===1&&n.length===1)t.removeFile(t.files[0]);else return u.maxFilesErrorCallback(n,f++),!1;var e=[],o=[],c=n.length,s=[],h=function(){if(!--c){if(!e.length&&!o.length)return;window.setTimeout(function(){t.fire("allFilesAdded",e,o)},0)}};i.each(n,function(n){function a(i){t.getFromUniqueIdentifier(i)?o.push(n):function(){n.uniqueIdentifier=i;var u=new l(t,n,i);t.files.push(u);e.push(u);u.container=typeof r!="undefined"?r.srcElement:null;window.setTimeout(function(){t.fire("fileAdded",u,r)},0)}();h()}if(!t.isAllowedExtension(n,u.fileType))return u.fileTypeErrorCallback(n,f++),s.push(n),!0;if(typeof u.minFileSize!="undefined"&&n.size&&n.size===u.minFileSize)return u.minFileSizeErrorCallback(n,f++),!0;if(typeof u.maxFileSize!="undefined"&&n.size>u.maxFileSize)return u.maxFileSizeErrorCallback(n,f++),!0;var c=i.generateUniqueIdentifier(n,r);c&&typeof c.then=="function"?c.then(function(n){a(n)},function(){h()}):a(c)});window.setTimeout(function(){t.fire("afterAppendFiles",e,s,n)},0)},t.uploadNextChunk=function(){var n=!1,r;return t.getOpt("prioritizeFirstAndLastChunk")&&(i.each(t.files,function(t){return t.chunks.length&&t.chunks[0].status()=="pending"&&t.chunks[0].preprocessState===0?(t.chunks[0].send(),n=!0,!1):t.chunks.length>1&&t.chunks[t.chunks.length-1].status()=="pending"&&t.chunks[t.chunks.length-1].preprocessState===0?(t.chunks[t.chunks.length-1].send(),n=!0,!1):void 0}),n)?!0:(i.each(t.files,function(t){return n=t.upload(),n?!1:void 0}),n)?!0:(r=!1,i.each(t.files,function(n){if(!n.isComplete())return r=!0,!1}),r||t.fire("complete"),!1)},t.assignBrowse=function(n,u){typeof n.length=="undefined"&&(n=[n]);i.each(n,function(n){var i,e,f;n.tagName==="INPUT"&&n.type==="file"?i=n:(i=document.createElement("input"),i.setAttribute("type","file"),i.style.display="none",n.addEventListener("click",function(){i.style.opacity=0;i.style.display="block";i.focus();i.click();i.style.display="none"},!1),n.appendChild(i));e=t.getOpt("maxFiles");typeof e=="undefined"||e!=1?i.setAttribute("multiple","multiple"):i.removeAttribute("multiple");u?i.setAttribute("webkitdirectory","webkitdirectory"):i.removeAttribute("webkitdirectory");f=t.getOpt("fileType");typeof f!="undefined"&&f.length>=1?i.setAttribute("accept",f.map(function(n){return n=n.replace(/\s/g,"").toLowerCase(),n.match(/^[^.][^/]+$/)&&(n="."+n),n}).join(",")):i.removeAttribute("accept");i.addEventListener("change",function(n){t.fire("startProgress");r(n.target.files,n);var i=t.getOpt("clearInput");i&&(n.target.value="")},!1)})},t.assignDrop=function(n){typeof n.length=="undefined"&&(n=[n]);i.each(n,function(n){n.addEventListener("dragover",u,!1);n.addEventListener("dragenter",u,!1);n.addEventListener("dragleave",o,!1);n.addEventListener("drop",f,!1)})},t.unAssignDrop=function(n){typeof n.length=="undefined"&&(n=[n]);i.each(n,function(n){n.removeEventListener("dragover",u);n.removeEventListener("dragenter",u);n.removeEventListener("dragleave",o);n.removeEventListener("drop",f)})},t.isUploading=function(){var n=!1;return i.each(t.files,function(t){if(t.isUploading())return n=!0,!1}),n}
161,t.upload=function(){if(!t.isUploading()){t.fire("uploadStart");for(var n=1;n<=t.getOpt("simultaneousUploads");n++)t.uploadNextChunk()}},t.pause=function(){i.each(t.files,function(n){n.abort()});t.fire("pause")},t.cancel=function(){var n,i;for(t.fire("beforeCancel"),oCancelledFiles=[],n=t.files.length-1;n>=0;n--)t.files[n].isComplete()||(i=t.files[n],t.files[n].cancel(),oCancelledFiles.push(i));t.fire("cancel",oCancelledFiles)},t.progress=function(){var r=0,n=0;return i.each(t.files,function(t){r+=t.progress()*t.size;n+=t.size}),n>0?r/n:0},t.addFile=function(n,t){r([n],t)},t.addFiles=function(n,t){r(n,t)},t.removeFile=function(n){for(var i=t.files.length-1;i>=0;i--)t.files[i]===n&&t.files.splice(i,1)},t.getFromUniqueIdentifier=function(n){var r=!1;return i.each(t.files,function(t){t.uniqueIdentifier==n&&(r=t)}),r},t.getSize=function(){var n=0;return i.each(t.files,function(t){n+=t.size}),n},t.handleDropEvent=function(n){f(n)},t.handleChangeEvent=function(n){r(n.target.files,n);n.target.value=""},t.updateQuery=function(n){t.opts.query=n},t.isAllowedExtension=function(n,t){var f,r,u,i;if(!(n.isFile||n instanceof File))return!1;if(f=n.name,r=-1!==f.indexOf(".")?f.replace(/.*[.]/,"").toLowerCase():"",r="."+r,!t.length)return!0;for(u=0;u<t.length;u++)if(i=t[u].toLowerCase(),(i.length==0||i[0]!=".")&&(i="."+i),i==r)return!0;return!1},this}),function(n){if(typeof exports=="object")module.exports=n();else if(typeof define=="function"&&define.amd)define(n);else{var t;try{t=window}catch(i){t=self}t.SparkMD5=n()}}(function(n){"use strict";function i(n,t){var i=n[0],r=n[1],u=n[2],f=n[3];i+=(r&u|~r&f)+t[0]-680876936|0;i=(i<<7|i>>>25)+r|0;f+=(i&r|~i&u)+t[1]-389564586|0;f=(f<<12|f>>>20)+i|0;u+=(f&i|~f&r)+t[2]+606105819|0;u=(u<<17|u>>>15)+f|0;r+=(u&f|~u&i)+t[3]-1044525330|0;r=(r<<22|r>>>10)+u|0;i+=(r&u|~r&f)+t[4]-176418897|0;i=(i<<7|i>>>25)+r|0;f+=(i&r|~i&u)+t[5]+1200080426|0;f=(f<<12|f>>>20)+i|0;u+=(f&i|~f&r)+t[6]-1473231341|0;u=(u<<17|u>>>15)+f|0;r+=(u&f|~u&i)+t[7]-45705983|0;r=(r<<22|r>>>10)+u|0;i+=(r&u|~r&f)+t[8]+1770035416|0;i=(i<<7|i>>>25)+r|0;f+=(i&r|~i&u)+t[9]-1958414417|0;f=(f<<12|f>>>20)+i|0;u+=(f&i|~f&r)+t[10]-42063|0;u=(u<<17|u>>>15)+f|0;r+=(u&f|~u&i)+t[11]-1990404162|0;r=(r<<22|r>>>10)+u|0;i+=(r&u|~r&f)+t[12]+1804603682|0;i=(i<<7|i>>>25)+r|0;f+=(i&r|~i&u)+t[13]-40341101|0;f=(f<<12|f>>>20)+i|0;u+=(f&i|~f&r)+t[14]-1502002290|0;u=(u<<17|u>>>15)+f|0;r+=(u&f|~u&i)+t[15]+1236535329|0;r=(r<<22|r>>>10)+u|0;i+=(r&f|u&~f)+t[1]-165796510|0;i=(i<<5|i>>>27)+r|0;f+=(i&u|r&~u)+t[6]-1069501632|0;f=(f<<9|f>>>23)+i|0;u+=(f&r|i&~r)+t[11]+643717713|0;u=(u<<14|u>>>18)+f|0;r+=(u&i|f&~i)+t[0]-373897302|0;r=(r<<20|r>>>12)+u|0;i+=(r&f|u&~f)+t[5]-701558691|0;i=(i<<5|i>>>27)+r|0;f+=(i&u|r&~u)+t[10]+38016083|0;f=(f<<9|f>>>23)+i|0;u+=(f&r|i&~r)+t[15]-660478335|0;u=(u<<14|u>>>18)+f|0;r+=(u&i|f&~i)+t[4]-405537848|0;r=(r<<20|r>>>12)+u|0;i+=(r&f|u&~f)+t[9]+568446438|0;i=(i<<5|i>>>27)+r|0;f+=(i&u|r&~u)+t[14]-1019803690|0;f=(f<<9|f>>>23)+i|0;u+=(f&r|i&~r)+t[3]-187363961|0;u=(u<<14|u>>>18)+f|0;r+=(u&i|f&~i)+t[8]+1163531501|0;r=(r<<20|r>>>12)+u|0;i+=(r&f|u&~f)+t[13]-1444681467|0;i=(i<<5|i>>>27)+r|0;f+=(i&u|r&~u)+t[2]-51403784|0;f=(f<<9|f>>>23)+i|0;u+=(f&r|i&~r)+t[7]+1735328473|0;u=(u<<14|u>>>18)+f|0;r+=(u&i|f&~i)+t[12]-1926607734|0;r=(r<<20|r>>>12)+u|0;i+=(r^u^f)+t[5]-378558|0;i=(i<<4|i>>>28)+r|0;f+=(i^r^u)+t[8]-2022574463|0;f=(f<<11|f>>>21)+i|0;u+=(f^i^r)+t[11]+1839030562|0;u=(u<<16|u>>>16)+f|0;r+=(u^f^i)+t[14]-35309556|0;r=(r<<23|r>>>9)+u|0;i+=(r^u^f)+t[1]-1530992060|0;i=(i<<4|i>>>28)+r|0;f+=(i^r^u)+t[4]+1272893353|0;f=(f<<11|f>>>21)+i|0;u+=(f^i^r)+t[7]-155497632|0;u=(u<<16|u>>>16)+f|0;r+=(u^f^i)+t[10]-1094730640|0;r=(r<<23|r>>>9)+u|0;i+=(r^u^f)+t[13]+681279174|0;i=(i<<4|i>>>28)+r|0;f+=(i^r^u)+t[0]-358537222|0;f=(f<<11|f>>>21)+i|0;u+=(f^i^r)+t[3]-722521979|0;u=(u<<16|u>>>16)+f|0;r+=(u^f^i)+t[6]+76029189|0;r=(r<<23|r>>>9)+u|0;i+=(r^u^f)+t[9]-640364487|0;i=(i<<4|i>>>28)+r|0;f+=(i^r^u)+t[12]-421815835|0;f=(f<<11|f>>>21)+i|0;u+=(f^i^r)+t[15]+530742520|0;u=(u<<16|u>>>16)+f|0;r+=(u^f^i)+t[2]-995338651|0;r=(r<<23|r>>>9)+u|0;i+=(u^(r|~f))+t[0]-198630844|0;i=(i<<6|i>>>26)+r|0;f+=(r^(i|~u))+t[7]+1126891415|0;f=(f<<10|f>>>22)+i|0;u+=(i^(f|~r))+t[14]-1416354905|0;u=(u<<15|u>>>17)+f|0;r+=(f^(u|~i))+t[5]-57434055|0;r=(r<<21|r>>>
16111)+u|0;i+=(u^(r|~f))+t[12]+1700485571|0;i=(i<<6|i>>>26)+r|0;f+=(r^(i|~u))+t[3]-1894986606|0;f=(f<<10|f>>>22)+i|0;u+=(i^(f|~r))+t[10]-1051523|0;u=(u<<15|u>>>17)+f|0;r+=(f^(u|~i))+t[1]-2054922799|0;r=(r<<21|r>>>11)+u|0;i+=(u^(r|~f))+t[8]+1873313359|0;i=(i<<6|i>>>26)+r|0;f+=(r^(i|~u))+t[15]-30611744|0;f=(f<<10|f>>>22)+i|0;u+=(i^(f|~r))+t[6]-1560198380|0;u=(u<<15|u>>>17)+f|0;r+=(f^(u|~i))+t[13]+1309151649|0;r=(r<<21|r>>>11)+u|0;i+=(u^(r|~f))+t[4]-145523070|0;i=(i<<6|i>>>26)+r|0;f+=(r^(i|~u))+t[11]-1120210379|0;f=(f<<10|f>>>22)+i|0;u+=(i^(f|~r))+t[2]+718787259|0;u=(u<<15|u>>>17)+f|0;r+=(f^(u|~i))+t[9]-343485551|0;r=(r<<21|r>>>11)+u|0;n[0]=i+n[0]|0;n[1]=r+n[1]|0;n[2]=u+n[2]|0;n[3]=f+n[3]|0}function o(n){for(var i=[],t=0;t<64;t+=4)i[t>>2]=n.charCodeAt(t)+(n.charCodeAt(t+1)<<8)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+3)<<24);return i}function s(n){for(var i=[],t=0;t<64;t+=4)i[t>>2]=n[t]+(n[t+1]<<8)+(n[t+2]<<16)+(n[t+3]<<24);return i}function h(n){for(var e=n.length,f=[1732584193,-271733879,-1732584194,271733878],s,r,u,h,c,t=64;t<=e;t+=64)i(f,o(n.substring(t-64,t)));for(n=n.substring(t-64),s=n.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<s;t+=1)r[t>>2]|=n.charCodeAt(t)<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(i(f,r),t=0;t<16;t+=1)r[t]=0;return u=e*8,u=u.toString(16).match(/(.*?)(.{0,8})$/),h=parseInt(u[2],16),c=parseInt(u[1],16)||0,r[14]=h,r[15]=c,i(f,r),f}function l(n){for(var e=n.length,f=[1732584193,-271733879,-1732584194,271733878],o,r,u,h,c,t=64;t<=e;t+=64)i(f,s(n.subarray(t-64,t)));for(n=t-64<e?n.subarray(t-64):new Uint8Array(0),o=n.length,r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],t=0;t<o;t+=1)r[t>>2]|=n[t]<<(t%4<<3);if(r[t>>2]|=128<<(t%4<<3),t>55)for(i(f,r),t=0;t<16;t+=1)r[t]=0;return u=e*8,u=u.toString(16).match(/(.*?)(.{0,8})$/),h=parseInt(u[2],16),c=parseInt(u[1],16)||0,r[14]=h,r[15]=c,i(f,r),f}function a(n){for(var i="",t=0;t<4;t+=1)i+=e[n>>t*8+4&15]+e[n>>t*8&15];return i}function u(n){for(var t=0;t<n.length;t+=1)n[t]=a(n[t]);return n.join("")}function c(n){return/[\u0080-\uFFFF]/.test(n)&&(n=unescape(encodeURIComponent(n))),n}function v(n,t){for(var r=n.length,u=new ArrayBuffer(r),f=new Uint8Array(u),i=0;i<r;i+=1)f[i]=n.charCodeAt(i);return t?f:u}function y(n){return String.fromCharCode.apply(null,new Uint8Array(n))}function p(n,t,i){var r=new Uint8Array(n.byteLength+t.byteLength);return r.set(new Uint8Array(n)),r.set(new Uint8Array(t),n.byteLength),i?r:r.buffer}function f(n){for(var i=[],r=n.length,t=0;t<r-1;t+=2)i.push(parseInt(n.substr(t,2),16));return String.fromCharCode.apply(String,i)}function t(){this.reset()}var r=function(n,t){return n+t&4294967295},e=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"];return u(h("hello"))!=="5d41402abc4b2a76b9719d911017c592"&&(r=function(n,t){var i=(n&65535)+(t&65535),r=(n>>16)+(t>>16)+(i>>16);return r<<16|i&65535}),typeof ArrayBuffer=="undefined"||ArrayBuffer.prototype.slice||function(){function t(n,t){return(n=n|0||0,n<0)?Math.max(n+t,0):Math.min(n,t)}ArrayBuffer.prototype.slice=function(i,r){var u=this.byteLength,f=t(i,u),e=u,o,s,h,c;return(r!==n&&(e=t(r,u)),f>e)?new ArrayBuffer(0):(o=e-f,s=new ArrayBuffer(o),h=new Uint8Array(s),c=new Uint8Array(this,f,o),h.set(c),s)}}(),t.prototype.append=function(n){return this.appendBinary(c(n)),this},t.prototype.appendBinary=function(n){this._buff+=n;this._length+=n.length;for(var r=this._buff.length,t=64;t<=r;t+=64)i(this._hash,o(this._buff.substring(t-64,t)));return this._buff=this._buff.substring(t-64),this},t.prototype.end=function(n){for(var r=this._buff,e=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,t=0;t<e;t+=1)o[t>>2]|=r.charCodeAt(t)<<(t%4<<3);return this._finish(o,e),i=u(this._hash),n&&(i=f(i)),this.reset(),i},t.prototype.reset=function(){return this._buff="",this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},t.prototype.getState=function(){return{buff:this._buff,length:this._length,hash:this._hash.slice()}},t.prototype.setState=function(n){return this._buff=n.buff,this._length=n.length,this._hash=n.hash,this},t.prototype.destroy=function(){delete this._hash;delete this._buff;delete this._length},t.prototype._finish=function(n,t){var r=t,u,f,e;if(n[r>>2]|=128<<(r%4<<3),r>55)for(i(this._hash,n),r=0;r<16;r+=1)n[r]=0;u=this._length*8;u=u.toString(16).match(/(.*?)(.{0,8})$/);f=parseInt(u[2],16);e=parseInt(u[1],16)||0;n[14]=f;n[15]=e;i(this._hash,n)},t.hash=function(n,i){return t.hashBinary(c(n),i)},t.hashBinary=function(n,t){var r=h(n),i=u(r);return t?f(i):i},t.ArrayBuffer=function(){this.reset()},t.ArrayBuffer.prototype.append=function(n){var r=p(this._buff.buffer,n,!0),u=r.length,t;for(this._length+=n.byteLength,t=64;t<=u;t+=64)i(this._hash,s(r.subarray(t-64,t)));return this._buff=t-64<u?new Uint8Array(r.buffer.slice(t-64)):new Uint8Array(0),this},t.ArrayBuffer.prototype.end=function(n){for(var r=this._buff,e=r.length,o=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i,t=0;t<e;t+=1)o[t>>2]|=r[t]<<(t%4<<3);return this._finish(o,e),i=u(this._hash),n&&(i=f(i)),this.reset(),i},t.ArrayBuffer.prototype.reset=function(){return this._buff=new Uint8Array(0),this._length=0,this._hash=[1732584193,-271733879,-1732584194,271733878],this},t.ArrayBuffer.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.buff=y(n.buff),n},t.ArrayBuffer.prototype.setState=function(n){return n.buff=v(n.buff,!0),t.prototype.setState.call(this,n)},t.ArrayBuffer.prototype.destroy=t.prototype.destroy,t.ArrayBuffer.prototype._finish=t.prototype._finish,t.ArrayBuffer.hash=function(n,t){var r=l(new Uint8Array(n)),i=u(r);return t?f(i):i},t}),AjaxEventMgr=function(){function h(n,t,i){return n.eventNames&&n.eventNames.indexOf(i)===-1?!1:n.vformIdContains&&(typeof t!="string"||t!==n.vformIdContains&&t.indexOf(n.vformIdContains+".")!==0)?!1:!0}function a(n,t){if(h(n,t.vformId,t.eventName))return!0;
161if(t.targets)for(var i=0;i<t.targets.length;i++)if(h(n,t.targets[i].vformId,t.targets[i].eventName))return!0;return!1}function r(n){n._timerId!==null&&(clearTimeout(n._timerId),n._timerId=null)}function c(n,t){r(n);n._timerId=setTimeout(function(){n._timerId=null;try{var t={restart:function(t){n._activeVFormId!==null&&c(n,t)}};n.callback(n._currentCtx,t)}catch(i){typeof Matrix3!="undefined"&&typeof Matrix3.LogError=="function"&&Matrix3.LogError("AjaxEventMgr: timeout callback error: "+i.message)}},t)}function f(n){if(n._activeVFormId!==null){r(n);var t=n._currentCtx;if(n._currentCtx=null,n._activeVFormId=null,typeof n.onCancel=="function")try{n.onCancel(t)}catch(i){typeof Matrix3!="undefined"&&typeof Matrix3.LogError=="function"&&Matrix3.LogError("AjaxEventMgr: timeout onCancel error: "+i.message)}}}function v(t){for(var i,r=0;r<n.length;r++)if(i=n[r],a(i,t)){if(i.excludeEventArgs&&t.args&&i.excludeEventArgs.indexOf(t.args)!==-1){f(i);continue}f(i);i._currentCtx=t;i._activeVFormId=t.vformId;c(i,i.delayMs)}}function y(t){for(var r,u,i=0;i<n.length;i++)(r=n[i],r._activeVFormId!==null)&&(u=t&&t.vformId,u===null||u===undefined||r._activeVFormId===u)&&f(r)}function l(n){typeof Matrix3!="undefined"&&typeof Matrix3.HideNotifications=="function"&&Matrix3.HideNotifications(n,p)}function b(n,t,i){var f,r,u,e;if(!n||!n.length)return[];for(f=[],r=0;r<n.length;r++)(u=n[r],typeof u.onClick=="function")&&(e=document.createElement("button"),e.textContent=u.label,f.push([e.outerHTML,function(n){return function(){var r={close:i,restart:function(n){t.activeControl&&t.activeControl.restart(n)},ctx:t.activeCtx};try{n(r)}catch(u){typeof Matrix3!="undefined"&&typeof Matrix3.LogError=="function"&&Matrix3.LogError("AjaxEventMgr: timeout-toast button error: "+u.message)}}}(u.onClick)]));return f}function o(n,t){return t===n||Utils.StartsWith(t,n+Matrix3.Const.SEPARATOR_HIERARCHY)}function s(n){for(var i in t)if(t[i]&&(!n||o(i,n)))return!0;return!1}function k(n){if(!n){t={};return}for(var i in t)o(i,n)&&delete t[i]}var i={start:[],success:[],error:[]},n=[],e="AjaxEventMgrToast",p={transitionOut:"fadeOutRight"},w=0,t,u;return window.addEventListener("beforeunload",function(){l("."+e)}),t={},u={},{Register:function(n,t){return i[n]&&i[n].push(t),t},Unregister:function(n,t){if(i[n]){var r=i[n].indexOf(t);r!==-1&&i[n].splice(r,1)}},RegisterTimeout:function(t){var u,i,f;if(t.key)for(u=0;u<n.length;u++)if(i=n[u],i.key===t.key)return i.eventNames=t.eventNames||null,i.vformIdContains=t.vformIdContains||null,i.excludeEventArgs=t.excludeEventArgs||null,i.delayMs=t.delayMs,i.callback=t.callback,i.onCancel=t.onCancel||null,{Unregister:function(t){return function(){r(t);var i=n.indexOf(t);i!==-1&&n.splice(i,1)}}(i)};return f={key:t.key||null,eventNames:t.eventNames||null,vformIdContains:t.vformIdContains||null,excludeEventArgs:t.excludeEventArgs||null,delayMs:t.delayMs,callback:t.callback,onCancel:t.onCancel||null,_timerId:null,_currentCtx:null,_activeVFormId:null},n.push(f),{Unregister:function(){r(f);var t=n.indexOf(f);t!==-1&&n.splice(t,1)}}},RegisterTimeoutToast:function(n){var u=n.key?String(n.key).replace(/[^A-Za-z0-9_-]/g,"-"):++w,i=e+"-"+u,f=e+" "+i,o="."+i,t={activeCtx:null,activeControl:null},r=function(){l(o)};return this.RegisterTimeout({key:n.key,eventNames:n.eventNames,vformIdContains:n.vformIdContains,excludeEventArgs:n.excludeEventArgs,delayMs:n.delayMs,callback:function(i,u){t.activeCtx=i;t.activeControl=u;Matrix3.ShowNotification(n.message,$.extend({notificationType:n.notificationType||"info",title:n.title},n.displayOptions,{timeout:0,"class":f,buttons:b(n.buttons,t,r)}))},onCancel:function(){r();t.activeCtx=null;t.activeControl=null}})},MarkChangePending:function(n){function r(){delete t[n];AjaxEventMgr.Unregister("error",i)}if(n){t[n]=!0;var i;i=AjaxEventMgr.Register("error",r);PostRenderMgr.GetInstance().AddAfterPreRenderOnAjaxSuccessFunction(r)}},MarkChangePendingOn:function(n,i){var r=typeof n=="string"?[n]:n||[],f,e,s;r.length&&i&&document.getElementById(i)&&((f=r.join(",")+"|"+i,u[f])||(u[f]=!0,e=this,s=this.Register("start",function(n){n&&r.indexOf(n.eventName)!==-1&&typeof n.vformId=="string"&&o(i,n.vformId)&&e.MarkChangePending(i)}),Matrix3.RegisterForCleanup(i,"AjaxEventMgr.MarkChangePendingOn:"+r.join(","),function(){e.Unregister("start",s);delete u[f];delete t[i]})))},IsSettled:function(n){return!s(n)},FireWhenSettled:function(n,t,i,r){function u(){var i=typeof r.args=="function"?r.args():r.args;Matrix3.AddEventUsingDTO({sourceVForm:n,sourceEvent:t,sourceType:h,args:i});Matrix3.RemoveLoading()}var o,f;r=r||{};var h=i||Matrix3.Const.RETURNTYPE_FULL,e=r.timeoutMs||1e4,c=r.intervalMs||100;if(Matrix3.AddLoading(),!s(n)){u();return}o=Date.now();f=setInterval(function(){s(n)?Date.now()-o>e&&(clearInterval(f),k(n),console.warn("[AjaxEventMgr.FireWhenSettled] pending change did n
161ot settle within "+e+"ms; firing '"+t+"' anyway"),u()):(clearInterval(f),u())},c)},Fire:function(n,t){var f=i[n],u,r;if(f)for(u=f.slice(),r=0;r<u.length;r++)try{u[r](t)}catch(e){typeof Matrix3!="undefined"&&typeof Matrix3.LogError=="function"&&Matrix3.LogError("AjaxEventMgr: listener error on '"+n+"': "+e.message)}n==="start"?v(t):(n==="success"||n==="error")&&y(t)}}}(),BindableScopeTable.Const={},BindableScopeTable.prototype={AddScopeItem:function(n,t){this.moTable[n]||(this.moTable[n]=t)},Merge:function(n){var t;return n instanceof BindableScopeTable&&(t=this,Object.keys(n.moTable).forEach(function(i){t.moTable[i]||(t.moTable[i]=n.moTable[i])})),!1},GetScopeTableForVForms:function(n){var i=new BindableScopeTable,t;return n instanceof Array&&(t=this,n.forEach(function(n){t.moTable[n]&&(i.moTable[n]=t.moTable[n])})),i},FindScope:function(n){var t=null,i=this.GetScopesList(n);return i&&i.length>0&&(t=i[0].ID),t||(t=Matrix3.Const.GLOBAL_BINDABLE_SCOPE_ID),t},GetScopeDefinedByVForm:function(n){return this.moTable&&this.moTable[n]?this.moTable[n].ID:null},GetScopesList:function(n){var t=null,i;return this.moTable?(i=this,t=Object.keys(this.moTable).filter(function(t){return t===n||Utils.StartsWith(n,t+Matrix3.Const.SEPARATOR_HIERARCHY)}).sort(function(n,t){var i=0;return Utils.StartsWith(n,t+Matrix3.Const.SEPARATOR_HIERARCHY)?i=-1:Utils.StartsWith(t,n+Matrix3.Const.SEPARATOR_HIERARCHY)&&(i=1),i}).map(function(n){return i.moTable[n]})):t=[],t.push({id:Matrix3.Const.GLOBAL_BINDABLE_SCOPE_ID,name:Matrix3.Const.GLOBAL_BINDABLE_SCOPE_NAME}),t},Serialize:function(){return JSON.stringify(this.moTable)}},Collection.prototype={Add:function(n,t){var r=!1,i=!0;return Utils.IsString(n)||(i=!1),Utils.IsString(t)||(i=!1),i&&(n in this.moCollectionToVForm||(this.moCollectionToVForm[n]=new FastArray),t in this.moVFormToCollection||(this.moVFormToCollection[t]=new FastArray),this.moCollectionToVForm[n].PushIfNotExists(t)&&this.moVFormToCollection[t].PushIfNotExists(n)&&(r=!0)),r},Remove:function(n,t){var i=!0;Utils.IsString(n)||(i=!1);Utils.IsString(t)||(i=!1);i&&(n in this.moCollectionToVForm&&this.moCollectionToVForm[n].RemoveIfExists(t),t in this.moVFormToCollection&&this.moVFormToCollection[t].RemoveIfExists(n))},ClearCollection:function(n){for(var i=this.GetVFormList(n),t=0;t<i.length;t++)this.moVFormToCollection[i[t]].RemoveIfExists(n);this.moCollectionToVForm[n]=new FastArray},GetVFormIndexes:function(n){var f=!0,i=null,r,t,e,u;if(Utils.IsString(n)||(f=!1),f&&(i={},n in this.moVFormToCollection))for(r=this.moVFormToCollection[n].GetArray(),t=0,e=r.length;t<e;t++)u=r[t],i[u]=this.moCollectionToVForm[u].GetIndex(n).toString();return i},GetVFormList:function(n){var i=!0,t=null,r;if(Utils.IsString(n)||(i=!1),i)if(n in this.moCollectionToVForm)t=this.moCollectionToVForm[n].GetArray();else if(n==""){t=[];for(r in Matrix3.moVFormTable)t.push(r)}else t=[];return t},IsVFormInCollection:function(n,t){var i=!1,r=!0;return Utils.IsString(n)||(r=!1),Utils.IsString(t)||(r=!1),r?t in this.moCollectionToVForm&&(i=this.moCollectionToVForm[t].Exists(n)):t==""&&(i=!0),i}},EventItem.Const={SEPARATOR:"|",SOURCE_VFORM:"SVF",SOURCE_EVENT:"SE",SOURCE_TYPE:"SRT",TARGET_VFORM:"TVF",TARGET_VFORM_SUB_ID:"TVFS",TARGET_EVENT:"TE",TARGET_TYPE:"TRT",DELAY:"D",ARGUMENTS:"ARGS",POSITION:"POS",META_KEY:"MKEY",PARALLEL:"PR"},EventItem.CreateID=function(n,t,i,r){var u=null;return Utils.IsString(n)&&(t==null||Utils.IsString(t))&&(i==null||Utils.IsString(i))&&(r==null||Utils.IsString(r))&&(u=n,t!=null&&(u+=EventItem.Const.SEPARATOR+t),i!=null&&(u+=EventItem.Const.SEPARATOR+i),r!=null&&(u+=EventItem.Const.SEPARATOR+r)),u},EventItem.prototype={GetSourceVForm:function(){return this.msSourceVForm},GetSourceType:function(){return this.msSourceType},GetTargetVForm:function(){return this.msTargetVForm},GetTargetType:function(){return this.msTargetType},GetID:function(){return EventItem.CreateID(this.msSourceVForm,this.msSourceEvent,this.msTargetVForm,this.msTargetEvent)},GetObjectToSerialize:function(){var n={};return Utils.IsString(this.msSourceVForm)&&(n[EventItem.Const.SOURCE_VFORM]=this.msSourceVForm),Utils.IsString(this.msSourceEvent)&&(n[EventItem.Const.SOURCE_EVENT]=this.msSourceEvent),Utils.IsString(this.msTargetVForm)&&(n[EventItem.Const.TARGET_VFORM]=this.msTargetVForm,n[EventItem.Const.TARGET_VFORM_SUB_ID]=this.GetSubID(this.msTargetVForm)),Utils.IsString(this.msTargetEvent)&&(n[EventItem.Const.TARGET_EVENT]=this.msTargetEvent),Utils.IsString(this.msEventDelay)&&(n[EventItem.Const.DELAY]=this.msEventDelay),Utils.IsString(this.msArgs)&&(n[EventItem.Const.ARGUMENTS]=window.Param.UseAjaxFormBuilderV2?decodeURIComponent(this.msArgs):this.msArgs),this.moMetaKeys&&(n[EventItem.Const.META_KEY]=this.moMetaKeys.join("|")),this.moPosition!=null&&(n[EventItem.Const.POSITION]=this.moPosition),n},GetSubID:function(n){var t=null,i=Matrix3.GetVFormInfoItem(n);return i&&(t=i.GetSubID()),t}},EventTable.prototype={AddEventItem:function(n){var r=!1,t,u,i;if(n instanceof EventItem){if(n.GetTargetType()==Matrix3.Const.RETURNTYPE_FULL)for(t=0,u=this.moEventList.length;t<u;t++)i=this.moEventList[t],i.GetTargetVForm()==n.GetTargetVForm()&&i.GetTargetType()==Matrix3.Const.RETURNTYPE_VIEWSTATE&&(i.msTargetType=Matrix3.Const.RETURNTYPE_FULL);this.moEventList.push(n);this.moEventTable[n.GetID()]=this.moEventList.length-1;r=!0}return r},Merge:function(n){var o,i,s,u,h,t,f,r,e;if(n instanceof EventTable){for(o=n.GetEventList(),t=0,f=o.length;t<f;t++){if(i=o[t],i.GetID()in this.moEventTable&&(s=this.moEventTable[i.GetID()],i.msArgs&&s.msArgs==i.msArgs))for(this.moEventList.splice(this.moEventTable[i.GetID()],1),u=0,h=this.moEventList.length;u<h;u++)this.moEventTable[this.moEventList[u].GetID()]=u;this.moEventList.push(i)}for(t=0,f=this.moEventList.length;t<f;t++)this.moEventTable[this.moEventList[t].GetID()]=t;for(r in n.moVFormsTriggeredByTriggingProperty)if(n.moVFormsTriggeredByTriggingProperty.hasOwnProperty(r))for(e in n.moVFormsTriggeredByTriggingProperty[r])n.moVFormsTriggeredByTriggingProperty[r].hasOwnProperty(e)&&this.MarkVFormTriggeredByTriggingProperty(r,e,n.moVFormsTriggeredByTriggingProperty[r][e])}return!1},GetEventList:function(){return this.moEventList},Serialize:function(){for(var t=[],n=0,i=this.moEventList.length;n<i;n++)t.push(this.moEventList[n].GetObjectToSerialize());return JSON.stringify(t)},MarkVFormTriggeredByTriggingProperty:function(n,t,i){n&&t&&i&&(this.moVFormsTriggeredByTriggingProperty[n]||(this.moVFormsTriggeredByTriggingProperty[n]={}),this.moVFormsTriggeredByTriggingProperty[n][t]=i)},GetVFormWithTriggingPropertyTable:function(){return this.moVFormsTriggeredByTriggingProperty}},EventControlAction_ClickHandlers={},Matrix3={ResetGlobalStructures:function(){this.moEventTable=new EventTable;this.moTriggerTable=new TriggerTable;this.moBindableScopeTable=new BindableScopeTable;this.moVFormTable={};this.moAjaxWaitingToProcessResponse={};this.moPopupTable={};this.maPopupStack=[];this.maPopupForceCenteringStack=[];this.moCollection=new Collection;this.moLoadingScripts={};this.moHashedTrackingPoints={};this.moIDGeneratorMapping={};this.moIDGeneratorMappingJSON=null;this.moCustomRedirectHandler=null;this.previewDevice=null;this.moLoadingStyleSheets={};this.moFunctionPrerender=null;CacheMgr.GetInstance().Refresh();ControlMgr.Reset()},StripMatrix5ClipboardHtml:function(n){for(var t,e,r,o,s,u,i,h=Array.prototype.slice.call(n.querySelectorAll("[data-p].CT")).reverse(),f=0;f<h.length;f++){for(t=h[f];t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}for(e=n.querySelectorAll("*"),r=0;r<e.length;r++)for(o=e[r],s=Array.prototype.slice.call(o.attributes).reverse(),u=0;u<s.length;u++)i=s[u].name,(i==="class"||i==="id"||i.indexOf("data-")===0)&&o.removeAttribute(i);return n.innerHTML},Init:function(){var oIDWait,oBody,oForm1,oXML,oViewState,oVForms,oNodes,oChildren,i,len,iKeepAliveRate,oDisableKeepSessionAliveElement;try{if(typeof process=="object"&&process+""=="[object process]"&&(typeof defaultSetTimeout=="undefined"&&(window.defaultSetTimeout=window.setTimeout),window.setTimeout=function(_fFunc,_dDelay){return window.defaultSetTimeout(function(){typeof _fFunc=="string"||_fFunc instanceof String?eval(_fFunc):_fFu
161nc()},_dDelay)}),this.miStartTime=(new Date).getTime(),this.miPostInitTime=null,this.miRequestEndTime=null,this.miEndTime=null,this.mbIsRefreshObjectsTriggered=!1,this.AddLoading(),this.mbContentIsLoaded=!0,this.ResetGlobalStructures(),this.miVersion=null,this.msScript="",this.msWaitMsg="",this.maPrePositionCalls||(this.maPrePositionCalls=[]),this.maAfterPreRenderCalls||(this.maAfterPreRenderCalls=[]),this.miReloadTimeout,this.mbProducingPostBack=!1,this.mbPostBackRequested=!1,this.msAjaxToken="",this.msLastEventSkinFamily=null,this.miErrorLogs=0,this.miWarningLogs=0,this.moEffects={},this.mbIsInit=!0,this.mbSelectionCommand=!1,this.moPendingAjax={},this.moAjaxWaitingToProcessResponse={},this.moPendingLoadDeferred={},this.moUninterruptiblePendingAjax=[],this.mbHasPendingAjax=!1,this.msPreventAbortOnVFormID=null,this.moAjaxEventWithTriggingProperty={},this.mbIsParameterPage=!1,this.maNodeToExtract=[],this.moPopupsInProcessOfClosing={},this.moPopupsSendingEventInsteadOfClosing={},typeof UseBootstrap=="undefined"&&(UseBootstrap=!1),this.miIE8PageForceRefreshCnt=0,Utils.IsStorageAvailable()&&(Matrix3.RemoveMatrixTraceOldEntries(),sessionStorage.setItem("MatrixTrace",sessionStorage.getItem("MatrixTrace")+"["+new Date+"] Page loaded: "+window.location.href+"\r\n"),$("body").click(function(n){for(var t=n.target;t!=null&&!t.id;)t=t.parentNode;t!=null&&(Matrix3.RemoveMatrixTraceOldEntries(),sessionStorage.setItem("MatrixTrace",sessionStorage.getItem("MatrixTrace")+"["+new Date+"] Clicked on: "+t.id+"\r\n"))})),oIDWait=$('[id="'+Matrix3.Const.ID_WAIT_MSG_CLOSE+'"]'),oIDWait.removeAttr("href").css("cursor","pointer"),oIDWait.click(function(){Matrix3.HideWaitMsg(!0)}),oBody=$("body"),oBody.attr("oncontextmenu")==="return false;"&&(oBody.removeAttr("oncontextmenu"),oBody.contextmenu(function(n){n.preventDefault()})),oForm1=$("[id='"+Matrix3.Const.ID_FORM+"']"),oForm1.length>0&&oForm1.attr("onsubmit")==="return false;"&&(oForm1.removeAttr("onsubmit"),oForm1.submit(function(n){n.preventDefault()})),oXML=document.createElement("div"),oViewState=document.getElementById(Matrix3.Const.HIDDENFIELDS),oViewState&&oXML.appendChild(oViewState),oVForms=$Elt(Matrix3.Const.LAYER_VFORMS),oVForms){for(oNodes=[],oChildren=oVForms.childNodes,i=0,len=oChildren.length;i<len;i++)oNodes.push(oChildren[i]);for(i=0,len=oNodes.length;i<len;i++)oXML.appendChild(oNodes[i])}ResizeMgr.GetInstance().ExportScreenToLists();ControlMgr.GetInstance().CreateControl(null);Utils.IsIE()||CacheMgr.GetInstance().LoadCache();var self=this,iCallbackTime=25,iMaxWaitForFont=3e3/iCallbackTime,iM
161axWaitForWebComponent=3e4/iCallbackTime,url=new URL(window.location);Utils.IsInIFrame()&&!url.searchParams.has("CMS5_RO")&&(iMaxWaitForFont=3e4/iCallbackTime,document.fonts.forEach(function(n){n.load()}));function pollResources(){var i,t,n,r;try{if(jQuery.browser.safari&&document.readyState!="complete"&&document.readyState!="interactive")throw"Waiting Loading";if(document.fonts&&document.fonts.status!="loaded"&&iMaxWaitForFont-->0)throw"Waiting for font";if(i=Array.from(document.querySelectorAll(":not(:defined)")).filter(function(n){return n.tagName&&n.tagName.toUpperCase().startsWith("CX-")}),i.length>0&&iMaxWaitForWebComponent-->0)throw"Wait for web components";for(t=document.styleSheets,n=0,r=t.length;n<r;n++)Utils.StartsWith(t[n].href,HistoryMgr.GetBaseURL())&&t[n].cssRules;window.setTimeout(function(){var t,n;Utils.ClearViewPortCache();t=Matrix3.PreRender(oXML);Matrix3.Render(t);n=self;$(document).keydown(function(t){return n.KeyPressCallback(t,!1)}).click(function(t){return n.KeyPressCallback(t,!0)}).on("focus focusin input",function(t){return n.InputFocusCallback(t)});Utils.IsFirefox()||document.addEventListener("copy",function(n){var f="",i,r,u,t;if(typeof monaco!="undefined"&&(i=monaco.editor.getEditors(),i.length!==0))for(r=0;r<i.length;r++)if(u=i[r],u.hasTextFocus()){f=u.getModel().getValueInRange(u.getSelection());break}t=f;Utils.IsStringFilled(t)||(t=window.getSelection().toString());t=t.replace(/[\u00A0]+\s*$/,"");n.clipboardData.setData("text/plain",t);const e=window.getSelection(),o=e.rangeCount?e.getRangeAt(0).cloneContents():null;if(o){const t=document.createElement("div");t.appendChild(o);n.clipboardData.setData("text/html",Matrix3.StripMatrix5ClipboardHtml(t))}Utils.IsStringFilled(t)&&n.preventDefault()});self.msLastViewportSize=Utils.GetViewportWidth()+"x"+Utils.GetViewportHeight();Utils.AddEvent(window,"resize",function(){var n,t,i;if(Utils.ClearViewPortCache(),n=Utils.GetViewportWidth()+"x"+Utils.GetViewportHeight(),n!=Matrix3.msLastViewportSize){Matrix3.msLastViewportSize=n;DragDropMgr.RefreshCache();ResizeMgr.SendResToServer();t=!1;for(i in Matrix3.moPopupTable){t=!0;break}t||Matrix3.mbBlockReloadOnResize||(Matrix3.miReloadTimeout&&clearTimeout(Matrix3.miReloadTimeout),Matrix3.miReloadTimeout=setTimeout(function(){ResizeMgr.SendResToServerImmediate();window.location.href=Matrix3.msURL},500))}});Utils.AddEvent(window,"mousemove",function(n){Utils.GetMousePosition(n)});Utils.AddEvent(document.body,"click",function(n){var t,i;n=$.event.fix(n);t=n.target;t&&t.nodeName==="INPUT"&&(i=t.parentNode,i!=null&&($RemoveClass(i,"I"),t.checked?$AddClass(i,"Checked"):$RemoveClass(i,"Checked")));Matrix3.miLastClickX=n.clientX;Matrix3.miLastClickY=n.clientY});HistoryMgr.GetInstance().Init();Utils.AddEvent(window,"resize",ResizeMgr.GetInstance().Resize,ResizeMgr.GetInstance())},50)}catch(u){window.setTimeout(pollResources,iCallbackTime)}}window.setTimeout(pollResources,5);iKeepAliveRate=54e4;function KeepSessionAlive(){var n=+new Date,t;Utils.IsStorageAvailable()?(t=sessionStorage.getItem("LastMatrixKeepAlive"),(!t||t<=n-iKeepAliveRate+1e3)&&(sessionStorage.setItem("LastMatrixKeepAlive",n),window.hasOwnProperty("uxpHostName")?$.ajax({type:"GET",url:"htm/AlterSession.aspx?KeepAlive="+n+"&UxpHostName="+window.uxpHostName}):$.ajax({type:"GET",url:"htm/AlterSession.aspx?KeepAlive="+n}))):$.ajax({type:"GET",url:"htm/AlterSession.aspx?KeepAlive="+n})}oDisableKeepSessionAliveElement=$("#dska");oDisableKeepSessionAliveElement&&oDisableKeepSessionAliveElement.val()&&oDisableKeepSessionAliveElement.val().toUpperCase()=="TRUE"||setInterval(KeepSessionAlive,iKeepAliveRate);this.HandleBlankNavigationTarget();this.mbPageWillUnload=!1;this.mbDontShowUnsavedChangesPopup=!1;this.HandlePageUnload();Utils.Form1().addEventListener("scroll",function(){this.scrollLeft=0});this.miPostInitTime=(new Date).getTime();Popup.HandleCloseContextMenuPopup();DraggableItem.PreventClickWhileDragging();TextBoxCtrl.HandleNumericInputWheelEvent()}catch(e){Matrix3.LogError(e)}window.console&&window.console.info&&window.console.info("If like us you are fascinated by elegant technology, you might consider joining us to build more of it. https://www.orangelogic.com")},HandleBlankNavigationTarget:function(){typeof MutationObserver!="undefined"&&(this.moBlankNavigationObserver&&this.moBlankNavigationObserver.disconnect(),this.moBlankNavigationObserver=new MutationObserver(function(n){for(var t,r,i=0;i<n.length;i++)t=n[i],t.attributeName==="target"&&t.target.getAttribute("target")==="_blank"&&(r=t.target.getAttribute("rel")||"",t.target.setAttribute("rel",r+" noopener noreferrer"))}),this.moBlankNavigationObserver.observe(document.body,{attributes:!0,attributeFilter:["target"],subtree:!0}),$('[target="_blank"]').each(function(){var n=this.getAttribute("rel")||"";$(this).attr("rel",n+" noopener noreferrer")}))},HandlePageUnload:function(){var n=this,t=ControlMgr.FindRootControl().id;window.addEventListener("beforeunload",function(i){if(n.mbPageWillUnload=!0,!n.mbDontShowUnsavedChangesPopup&&!Matrix3.mbPostBackRequested){var r=[],f=n.moCollection.GetVFormList(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING),u="";f.forEach(function(i){var f=!0,e,o,s,h;Utils.IsStringFilled(i)||(f=!1);f=f&&$PI(i);f&&(e=n.moVFormTable[i],e||(f=!1));f&&(o=e[VFormInfoItem.Const.FIELD_ACTIONLIST],o&&o.find(function(n){return n[VFormInfoItem.Const.ACTIONLIST_ACTION]===VFormInfoItem.Const.ACTIONLIST_ACTION_REMOVE}
161)&&(f=!1));f&&(s=Utils.GetRootOrPopupId(i),h=n.moPopupTable[s],t===s||h&&h.moJNode.css("visibility")!=="hidden"||(f=!1));f?u=i:r.push(i)});r.forEach(function(t){n.moCollection.Remove(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING,t)});Utils.IsStringFilled(u)&&(i.preventDefault(),i.returnValue="",n.mbPageWillUnload=!1)}})},SetCustomRedirectHandler:function(n){Matrix3.moCustomRedirectHandler=n},GetTriggerTable:function(){return this.moTriggerTable},StartCMS:function(){typeof CMS!="undefined"&&(this.moCMS=new CMS,this.moCMS.Start())},RefreshCMS:function(){typeof this.moCMS!="undefined"?this.moCMS.Refresh():typeof CMS!="undefined"&&this.StartCMS()},RefreshVUCButtons:function(n){n?(this.moVUCButtons===undefined&&(this.moVUCButtons=VUCButtons.GetInstance()),this.moVUCButtons.SetStateVUCEditor(!0),this.moVUCButtons.Refresh()):this.moVUCButtons&&(this.moVUCButtons.SetStateVUCEditor(!1),this.moCMS===undefined&&this.moVUCButtons.HideVUCButtons())},GetSelectGroupCommandEventTable:function(n,t,i,r,u,f,e){var g=new EventTable,c="",b,l,a,h,v,nt,s,o,tt,y,k,p,it,rt,ut,d,w;for(Matrix3.IsPopup(n)&&this.moPopupTable[n].msReferenceVFormID!=null?c=Utils.GetRootOrPopupId(this.moPopupTable[n].msReferenceVFormID):(b=Matrix3.GetVFormInfoItem(n),l=b?b.GetVFormParent():null,c=Matrix3.IsPopup(l)&&this.moPopupTable[l].msReferenceVFormID!=null?Utils.GetRootOrPopupId(this.moPopupTable[l].msReferenceVFormID):Utils.GetRootOrPopupId(n)),a=[],f&&(a=f.split(",")),h=MultipleSelectionMgr.GetInstance(),v=0,nt=a.length;v<nt;v++)if((s=Utils.Trim(a[v]),Utils.IsStringFilled(s))&&(o=[],tt=h.GetObjects(s,MultipleSelectionMgr.Const.FLAG_SELECTED),this.CollectSelectionItems(o,e,c,s,tt,!0),!o.length&&(h.IsInFullSelectionMode(s)||h.HasStatedItems(s))&&(y=h.GetObjects(s,MultipleSelectionMgr.Const.FLAG_NOT_SELECT),y&&y.length&&(k=y.filter(function(n){var t=n.GetID();return!!document.getElementById(t)}),k.length>0&&this.CollectSelectionItems(o,e,c,s,[k[0]],!1))),o.length>0))for(p=0,it=o.length;p<it;p++)rt=o[p],ut=new EventItem(n,t,i,rt[Matrix3.Const.ARG_VFORMID],Matrix3.Const.EVENT_SELECT,r,u),g.AddEventItem(ut);return d=JSON.stringify(o),o&&o.length==0&&Utils.IsString(e)&&Utils.IsStringFilled(e)&&(d=e),w={},w[Matrix3.Const.COMMAND_EVENT]=g,w[Matrix3.Const.COMMAND_ARGS]=d,w},CollectSelectionItems:function(n,t,i,r,u){var e,p,o,w,f,h,a,v,c,l,y,b;if(u!=null&&u.length)for(e=MultipleSelectionMgr.GetInstance(),p=n.length==0,o=0,w=u.length;o<w;o++){var k=u[o],s=k.GetID(),d=Utils.GetRootOrPopupId(s);document.getElementById(s)&&d==i&&(f={},h=s.split(Matrix3.Const.SEPARATOR_CONTROL),f[Matrix3.Const.ARG_VFORMID]=h[0],h.length>0&&(f[Matrix3.Const.ARG_CONTROL]=h[1]),s in e.moItemIDToGroups&&(a=e.moItemIDToGroups[s],a!=null&&(v=a.GetArray(),v.length>0&&(f[Matrix3.Const.ARG_GROUPS]=v.join(",")))),p&&o===0&&(Utils.IsString(t)&&Utils.IsStringFilled(t)&&(f[Matrix3.Const.EVENT_ARGS]=t),e.IsInFullSelectionMode(r)&&(f[Matrix3.Const.ARG_FULL]=!0),e.HasStatedItems(r)&&(c=e.GetStatedItemsEIDInGroup(r),l=[],c.forEach(function(n,t){l.push(t)}),l.sort(function(n,t){return c.get(n)-c.get(t)}),f[Matrix3.Const.STATED_ITEMS]=l,y=[],b=e.GetStatedItemsEIDToDynamicGroupID(r),b.forEach(function(n){y.push(n)}),f[Matrix3.Const.DYNAMIC_GROUP_ITEMS]=y)),n.push(f))}},GetDragCommandEventTable:function(n,t,i,r,u,f){var s=new EventTable,e,c,l,h,o;if(Utils.IsArray(f))for(e=0,c=f.length;e<c;e++)for(l=new EventItem(n,t,i,f[e],Matrix3.Const.EVENT_DRAG,r,u),s.AddEventItem(l),h=this.moTriggerTable.GetEventTable(f[e],Matrix3.Const.EVENT_DRAG,i,u,this.moCollection,undefined,undefined,undefined,undefined),o=0;o<h.moEventList.length;o++)s.AddEventItem(h.moEventList[o]);return s},GetReorderCommandEventTable:function(n,t,i,r,u,f){var o=new EventTable,s,e,c,h,l;if(Utils.IsArray(f)){for(s=!1,e=0,c=f.length;e<c;e++)h=this.moTriggerTable.GetEventTable(f[e],t,i,u,this.moCollection),h!=null&&(o.Merge(h),s=!0),e==0&&s||(l=new EventItem(f[e],t,i,f[e],t,r,u),o.AddEventItem(l));this.mbReorderOptimization=!0}return o},FinishLoad:function(){this.miNumberOfAction--;this.miNumberOfAction==0&&Matrix3.PostRender()},LoadEffects:function(n){var r,t,u,i;if(this.moEffects={},n)for(r=n.split(Matrix3.Const.SEPARATOR_EFFECT),t=0,u=r.length;t<u;t++)i=r[t].split(Matrix3.Const.SEPARATOR_EFFECT_FUNCTION),i.length==2&&(this.moEffects[i[0]]=i[1])},ShowWaitMsg:function(n,t,i,r){var h=this,s=Utils.GetOptions(i),c=1500,e,o,u,f;
161if(s&&"delay"in s&&(c=s.delay),!r){this.showWaitMsgTimeout&&clearTimeout(this.showWaitMsgTimeout);h.showWaitMsgTimeout=setTimeout(function(){h.ShowWaitMsg(n,t,i,!0)},c);return}if(n&&$S(Matrix3.Const.ID_WAIT_MSG,"display")=="none"){document.body.style.cursor="wait";$Elt(Matrix3.Const.ID_WAIT_MSG_CONTENT).innerHTML=n;u=0;f=0;$SetStyle(Matrix3.Const.ID_WAIT_MSG,"visibility","hidden");$SetStyle(Matrix3.Const.ID_WAIT_MSG,"display","block");Utils.IsSafari()&&t==Matrix3.Const.WAITMSG_MODE_POSTBACK&&$SetStyle(Matrix3.Const.ID_WAIT_MSG_CLOSE,"display","block");e=Utils.GetAbsoluteWidth(Matrix3.Const.ID_WAIT_MSG);o=Utils.GetAbsoluteHeight(Matrix3.Const.ID_WAIT_MSG);switch(t){case Matrix3.Const.WAITMSG_MODE_MOUSE:u=Utils.GetMousePositionX();f=Utils.GetMousePositionY();break;default:u=(Utils.GetViewportWidth()-e)/2+document.body.scrollLeft;f=(Utils.GetViewportHeight()-o)/2+document.body.scrollTop}u+e>Utils.GetViewportWidth()&&(u=Utils.GetViewportWidth()-e);f+o>Utils.GetViewportHeight()&&(f=Utils.GetViewportHeight()-o);$SetStyle(Matrix3.Const.ID_WAIT_MSG,"left",u+"px");$SetStyle(Matrix3.Const.ID_WAIT_MSG,"top",f+"px");$SetStyle(Matrix3.Const.ID_WAIT_MSG,"visibility","visible")}},HideWaitMsg:function(n){this.showWaitMsgTimeout&&clearTimeout(this.showWaitMsgTimeout);$SetStyle(Matrix3.Const.ID_WAIT_MSG,"display","none");document.body.style.cursor="auto";$SetStyle(Matrix3.Const.ID_WAIT_MSG_CLOSE,"display","none");n&&(Matrix3.RemoveLoading(),this.mbSelectionCommand=!1)},IsSeletionEvent:function(n){var t=!1;switch(n){case Matrix3.Const.COMMAND_MULTIPLE_SELECT_F:case Matrix3.Const.COMMAND_MULTIPLE_SELECT_VS:t=!0}return t},CollectTargetVFormsAndEvents:function(n){for(var i,r=new Set,u=n.GetEventList(),t=0;t<u.length;t++)i=u[t],r.add(i.msTargetVForm+"_"+i.msTargetEvent);return r},RefreshSimilarVFormsByTriggingProperty:function(n){if(n){var t=$E(n).data(TriggerTable.Const.DATA_TRIGGING_PROPERTIES);t&&this.TriggerRefreshVFormsThatMatchedTriggingProperties(JSON.stringify(t),[])}},TriggerRefreshVFormsThatMatchedTriggingProperties:function(n,t){var r,i;n&&(r=$("div[data-vf='ObjectsRefreshTrigger_VForm']"),r.length!=0)&&(i=r[0],i)&&(i.setAttribute(TriggerTable.Const.ATTR_DATA_TRIGGING_PROPERTIES,n),Matrix3.AddEventUsingDTO({sourceVForm:i.id,sourceEvent:"REFRESH",sourceType:"F",eventDelay:Matrix3.Const.DELAY_IMMEDIAT,vFormsToSilence:t,skipPostRenderFunction:!0}))},AddEventUsingDTO:function(n){var t=n.sourceType||Matrix3.Const.RETURNTYPE_VIEWSTATE,i=n.eventDelay||Matrix3.Const.DELAY_IMMEDIAT;return this.AddEvent(n.sourceVForm,n.sourceEvent,t,i,n.args,n.command,n.commandArgs,n.virtualID,n.preload,n.vformEffects,n.force,n.waitMsg,n.history,n.pageVirtualID,n.waitMsgMode,n.blockMouseEventsDuringRequest,n.event,n.allowParallel,n.successCallback,n.vformToRemove,n.forcedPosition,n.hideLoading,n.vFormsToSilence,n.skipPostRenderFunction,n.noWarningIfInputNotValidated,n.skipValidation,n.callbacks)},AddEvent:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k,d,g,nt,tt,it,rt,ut,ft){var fi,vi,et,wt,yi,st,kt,di,pi,gi,ei,dt,lt,wi,oi,ot,ht,at,ni,gt,bi,si,hi,ti,ci,vt,ct,bt,tr,li,er,yt,pt,ii,ai,ri,sr,hr,cr,ui;try{if(t==Matrix3.Const.IE8_PAGE_REFRESH_EVENT_NAME&&this.miIE8PageForceRefreshCnt++,fi=u,(Utils.StartsWith(u,Matrix3.Const.DYNAMIC_ARGS_SYNCHRONIZER)||Utils.StartsWith(u,Matrix3.Const.DYNAMIC_ARGS_FUNCTION))&&typeof Synchronizer=="undefined")return;if(vi=t=="LOAD_DEFERRED",et=g,et||(et={x:Utils.GetMousePositionX(w),y:Utils.GetMousePositionY(w)}),et.sx=Utils.Form1().scrollLeft,et.sy=Utils.Form1().scrollTop,w&&w.target?(wt=Utils.GetNodeCortexID(w.target),wt=wt||Utils.FindClosestNodeID(w.target),wt&&(et.sx=Utils.GetMainParentContainerScrollLeft(wt),et.sy=Utils.GetMainParentContainerScrollTop(wt))):n&&(et.sx=Utils.GetMainParentContainerScrollLeft(n),et.sy=Utils.GetMainParentContainerScrollTop(n)),yi=Utils.GetMetaKey(w),st=null,!this.mbPreloading){if(kt=this.HasPendingEventOnParentOrSelf(n),vi&&this.mbHasPendingAjax&&this.moPendingLoadDeferred[n]&&(this.AbortRequestsOnID(n,!0),kt=!1),kt&&this.IsSeletionEvent(f)){st=this.moTriggerTable.GetEventTable(n,t,i,r,this.moCollection,u,undefined,undefined,et,yi,null,b,tt);di=this.CollectTargetVFormsAndEvents(st);for(dt in this.moPendingAjax)lt=this.moPendingAjax[dt],lt&<.RequestInfo&<.RequestInfo.TargetVFormsEvent&&(pi=!0,lt.RequestInfo.TargetVFormsEvent.forEach(function(n){di.has(n)||(pi=!1)}
161),pi&&(this.AbortRequest(dt),kt=!1))}if(kt){if(gi=$E(n).attr("data-eq"),gi=="true"){ei=null;for(dt in this.moPendingAjax)if(lt=this.moPendingAjax[dt],lt){ei=lt;break}if(ei)return gt=arguments,ei.always(function(){return Matrix3.AddEvent.apply(Matrix3,gt)}),!0}if(this.msPreventAbortOnVFormID===n)this.msPreventAbortOnVFormID=null;else{ft&&ft.fail&&ft.fail();ft&&ft.always&&ft.always();return}}else if(this.TryDeferUntilSharedStateApplied(n,arguments))return!0;if(Utils.IsStorageAvailable()&&(Matrix3.RemoveMatrixTraceOldEntries(),sessionStorage.setItem("MatrixTrace",sessionStorage.getItem("MatrixTrace")+"["+new Date+"] Event triggered: "+t+"\r\n")),ParamMgr.mbHasUnsavedChanges&&Utils.IsInTopLevelPopup(n)){if(w&&ParamMgr.IsInsideClosePopupParamBtn(w.target)){ParamMgr.ShakeSaveButtons();ft&&ft.fail&&ft.fail();ft&&ft.always&&ft.always();return}ParamMgr.QueueSaveEvents()}c||r==Matrix3.Const.DELAY_BUFFERED||(wi=WaitingPopupMgr.GetInstance(),nt||wi.IsActive()||wi.Has(n,t)||this.AddLoading(p),LoadingAjaxMgr.GetInstance().DisplayAll());r!=Matrix3.Const.DELAY_BUFFERED&&(Matrix3.ShowWaitMsg(l,y),t!="LOAD_DEFERRED"&&this.AbortRequestsOnID(n))}if(oi=$PI(n),oi&&oi!=null){for(ot=oi,ht=ot.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS);(!ht||ht==null)&&ot&&ot!=null;)ot=ot.moParent,ot&&ot!=null&&(ht=ot.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS),!ht&&ot.classList.contains(Popup.Const.CONTAINER_CLASS)&&ot.classList.forEach(function(n){var i=n.indexOf(Popup.Const.CONTAINER_CLASS),t;i>0&&(t=n.substr(0,i),t&&(ht=t))}));this.msLastEventSkinFamily=ht&&ht!=null?ht:ControlMgr.GetInstance().moRootPositionItem.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS)}if(this.LoadEffects(h),at=!0,Utils.IsString(n)||(this.mbHistory&&window.location.reload(!0),at=!1),Utils.IsString(t)||(at=!1),i!=Matrix3.Const.RETURNTYPE_FULL&&i!=Matrix3.Const.RETURNTYPE_VIEWSTATE&&(at=!1),r!=Matrix3.Const.DELAY_BUFFERED&&r!=Matrix3.Const.DELAY_IMMEDIAT&&(at=!1),Utils.IsString(u)){if(Utils.StartsWith(u,Matrix3.Const.DYNAMIC_ARGS_SYNCHRONIZER)||Utils.StartsWith(u,Matrix3.Const.DYNAMIC_ARGS_FUNCTION))try{if(ni=Utils.EvalScriptsWithResult(decodeURIComponent(u.replace(/\+/g," ")).substring(1)),ni&&typeof ni.then=="function")return gt=arguments,ni.then(function(n){var t=JSON.stringify(n);return t=encodeURIComponent(t.substring(1,t.length-1)),gt[4]=t,Matrix3.AddEvent.apply(Matrix3,gt)}).catch(function(n){Matrix3.LogError("Failed to evaluate async dynamic arguments: "+n);Matrix3.RemoveLoading();Matrix3.ShowNotification("An error occurred while processing the request.",{notificationType:"error"})}),!0;bi=JSON.stringify(ni);u=encodeURIComponent(bi.substring(1,bi.length-1))}catch(nr){Matrix3.LogError(nr)}}else u=null;if(u===Matrix3.Const.ARG_TOP_LEVEL_POPUP_ID?u=Utils.GetTopLevelPopup():u===Matrix3.Const.ARG_OBJECT_ID_OR_TOP_LEVEL_POPUP_ID&&(si=Utils.GetTopLevelPopup(),u=si,hi="div[data-vf='DamView_Results_VForm'] .FocusedCell",si&&(hi="div[id='"+si+"'] "+hi),ti=$(hi)[0],ti&&(ti=$(ti).parent(),ci=TriggerTableHelper.GetTriggingProperties(ti),ci&&ci.ID&&(u=ci.ID))),!f||f==""||Utils.IsString(f)&&f==Matrix3.Const.COMMAND_MULTIPLE_SELECT_F||Utils.IsString(f)&&f==Matrix3.Const.COMMAND_MULTIPLE_SELECT_VS||Utils.IsString(f)&&f==Matrix3.Const.COMMAND_DROP_VS||Utils.IsString(f)&&f==Matrix3.Const.COMMAND_DROP_F||Utils.IsString(f)&&f==Matrix3.Const.COMMAND_REORDER||(at=!1),at){vt=null;ct=null;f!=Matrix3.Const.COMMAND_REORDER&&(ct=st!=null?st:this.moTriggerTable.GetEventTable(n,t,i,r,this.moCollection,u,undefined,undefined,et,yi,null,b,tt),u=null);switch(f){case Matrix3.Const.COMMAND_MULTIPLE_SELECT_F:st=ct;bt=this.GetSelectGroupCommandEventTable(n,t,i,Matrix3.Const.RETURNTYPE_FULL,r,e,fi);vt=bt[Matrix3.Const.COMMAND_EVENT];u=bt[Matrix3.Const.COMMAND_ARGS];break;case Matrix3.Const.COMMAND_MULTIPLE_SELECT_VS:st=ct;bt=this.GetSelectGroupCommandEventTable(n,t,i,Matrix3.Const.RETURNTYPE_VIEWSTATE,r,e,fi);vt=bt[Matrix3.Const.COMMAND_EVENT];u=bt[Matrix3.Const.COMMAND_ARGS];break;case Matrix3.Const.COMMAND_DROP_F:vt=this.GetDragCommandEventTable(n,t,i,Matrix3.Const.RETURNTYPE_FULL,r,e);break;case Matrix3.Const.COMMAND_DROP_VS:vt=this.GetDragCommandEventTable(n,t,i,Matrix3.Const.RETURNTYPE_VIEWSTATE,r,e);break;case Matrix3.Const.COMMAND_REORDER:vt=this.GetReorderCommandEventTable(n,t,i,Matrix3.Const.RETURNTYPE_FULL,r,e)}if(vt!=null&&this.moEventTable.Merge(vt),r==Matrix3.Const.DELAY_IMMEDIAT){if(tr=new CustomEvent("MatrixEventAdded",{detail:{name:t}}),document.dispatchEvent(tr),this.mbSelectionCommand=f==Matrix3.Const.COMMAND_MULTIPLE_SELECT_F||f==Matrix3.Const.COMMAND_MULTIPLE_SELECT_VS,ct!=null){var ir=new EventTable,rr=new EventTable,ur=ct.GetEventList()[0],fr=this.moEventTable.GetEventList();for(li=0,er=fr.length;li<er;li++)yt=fr[li],yt.msEventDelay===Matrix3.Const.DELAY_BUFFERED?ir.AddEventItem(yt):yt.msEventDelay===Matrix3.Const.DELAY_IMMEDIAT&&(yt.GetID()!==ur.GetID()||yt.msArgs!==ur.msArgs)&&rr.AddEventItem(yt);this.moEventTable=new EventTable;this.moEventTable.Merge(ir);this.moEventTable.Merge(ct);this.moEventTable.Merge(rr)}if(pt={},ii={},this.GetControlInput(pt,ii),ai=ut||this.ValidateControlInput(pt),!ai&&this.ResetInvalidDate
161Controls(pt)&&(pt={},ii={},this.GetControlInput(pt,ii),this.ShowNotification("The invalid date was reset to its last valid value.",{notificationType:"warning"}),ai=!0),ai){var lr=this.moEventTable.GetVFormWithTriggingPropertyTable(),or=[],ki=this.moEventTable.GetEventList();for(ri=0;ri<ki.length;ri++)or.push({vformId:ki[ri].msTargetVForm,eventName:ki[ri].msTargetEvent});sr=this.GetPostBody(u,!0,pt,ii,!1,o);this.mbPreloading||it||(PostRenderMgr.GetInstance().ExecuteFunctions(!0),this.maAfterPreRenderCalls=[]);hr=function(){k&&k();ft&&ft.success&&ft.success();d&&(Matrix3.RemovePopup(d)||Matrix3.RemoveVForm(d))};cr=function(){WaitingPopupMgr.GetInstance().Show(n,t,et)};AjaxEventMgr.Fire("start",{vformId:n,eventName:t,args:fi,targets:or});ui=this.SendRequest(sr,n,t,{success:hr,fail:ft?ft.fail:undefined,abort:ft?ft.abort:undefined,always:ft?ft.always:undefined},cr,lr);ui&&st&&(ui.RequestInfo={TargetVFormsEvent:this.CollectTargetVFormsAndEvents(st)});this.mbPreloading?this.moUninterruptiblePendingAjax.push(ui):(this.moPendingAjax[n]=ui,vi&&(this.moPendingLoadDeferred[n]=!0),this.mbHasPendingAjax=!0)}else rt||this.ShowNotification("Your submission has invalid values. Please fix them.",{notificationType:"warning"}),this.RemoveLoading(),this.MakeNotClosedPopupsVisible(),this.AbortRequest(n),this.moEventTable=new EventTable}else r==Matrix3.Const.DELAY_BUFFERED&&ct&&this.moEventTable.Merge(ct)}}catch(nr){Matrix3.LogError(nr)}return at},ExtractElementIdsWithDataStateId:function(){var t=$("[data-state-id]"),n={};return t.each(function(){var t=$(this),i=t.attr("id"),r=t.attr("data-state-id"),u=t.is("[data-state-deep]");i&&r&&(n[i]={stateID:r,deep:u})}),n},GetAncestorStateIDs:function(n,t){var u=new Set,i,r;for(i in t)r=t[i],(n===i||r.deep&&Utils.StartsWith(n,i+Matrix3.Const.SEPARATOR_HIERARCHY))&&u.add(r.stateID);return u},FindStateSharingVFormID:function(n,t){var r=this.ExtractElementIdsWithDataStateId(),u=this.GetAncestorStateIDs(n,r),i,f,e;if(u.size===0)return null;for(i in t)if(t[i]&&(f=this.GetAncestorStateIDs(i,r),e=Array.from(u).some(function(n){return f.has(n)}),e))return i;return null},TryDeferUntilSharedStateApplied:function(n,t){var u=this.FindStateSharingVFormID(n,this.moAjaxWaitingToProcessResponse),f=u?this.moAjaxWaitingToProcessResponse[u]:null,i,r;return f?(i=!1,r=function(){if(!i)return i=!0,Matrix3.AddEvent.apply(Matrix3,t)},f.then(r,r),!0):!1},DoPostBack:function(n,t,i,r){var e=!0,y,h,c,f,u,a,v,o,b,s;if(Matrix3.mbProducingPostBack=!0,Matrix3.mbPostBackRequested=!0,Matrix3.moPostBackSwappedIDValueElements=[],LoadingPostBackMgr.GetInstance().DisplayAll(),Matrix3.ShowWaitMsg(r,Matrix3.Const.WAITMSG_MODE_POSTBACK),Utils.IsString(n)||(e=!1),Utils.IsString(t)||(e=!1),Utils.IsString(i)||(i=null),e){y=this.moTriggerTable.GetEventTable(n,t,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,this.moCollection);this.moEventTable.Merge(y);h={};c={};this.GetControlInput(h,c);var p=this.GetPostBody(i,!1,h,c),l=[],w=document.getElementById(Matrix3.Const.ID_FORM);for(f in p)u=$Elt(f),u?u.tagName=="DIV"&&(u=document.createElement("input"),u.name=f,u.type="hidden",w.appendChild(u)):(u=document.createElement("input"),u.id=f,u.name=f,u.type="hidden",w.appendChild(u)),l.push(u),u.value=p[f];for(typeof HistoryMgr!="undefined"?HistoryMgr.GetInstance().DisablePopupState():parent.HistoryMgr&&parent.HistoryMgr.GetInstance().DisablePopupState(),window.addEventListener("beforeunload",function(){Matrix3.mbPostBackRequested=!1},{once:!0}),a=document.getElementById(Matrix3.Const.ID_FORM),v=HistoryMgr.GetInstance().GetCurrentURL(),Utils.IsStringFilled(v)&&a.setAttribute("action",v),a.submit(),o=0,b=l.length;o<b;o++)s=$(l[o]),s&&typeof s[0]=="object"&&s.remove();Matrix3.PostRender(!0)}return Matrix3.mbProducingPostBack=!1,Matrix3.moPostBackSwappedIDValueElements=null,e},AddLoading:function(n){var i,t;return this.mbIsLoading?!1:(this.mbIsLoading=!0,n&&(AutoCompletionMgr&&AutoCompletionMgr.DisableAll(),$SetStyle(Matrix3.Const.LOADING_MASK_ID,"width","100%"),$SetStyle(Matrix3.Const.LOADING_MASK_ID,"height","100%"),$SetStyle(Matrix3.Const.LOADING_MASK_ID,"display","block"),i=function(){$SetStyle(Matrix3.Const.LOADING_MASK_ID,"width","100%");$SetStyle(Matrix3.Const.LOADING_MASK_ID,"height","100%")},window.setTimeout(i,1)),typeof this.moCMS!="undefined"&&typeof CMSLoader!="undefined"?CMSLoader.Show():(t=$Elt(Matrix3.Const.LOADING_PANEL_ID),Utils.HasTopLayer()&&Utils.ShowPopover($(t)[0]),$(t).css("display","block").stop().fadeTo(0,0).delay(1e3).fadeTo(250,1)),!0)},AddPopup:function(n){var r=!1,u,i,t;return n!=null&&n.id!=null&&n.id!=undefined&&n.id!=""&&(u=$Elt(n.id),u!=null&&this.RemovePopup(n.id,!0),n=this.EvalScript(n),i=this.msLastEventSkinFamily,$HasClass(n,Matrix3.Const.POPUP_CLASS_SKIN_FAMILY_SET)===!0&&(i=null),t=new Popup(n,i),t.Show(),this.moPopupTable[t.msID]=t,this.maPopupStack.push(t.msID),t.mbIsForceCenteringEnabled==!0&&this.maPopupForceCenteringStack.push(t.msID),r=!0),Matrix3.FinishLoad(),r},ValidateNonceAlt:function(n){return typeof UtilsValidateNonceAlt!="undefined"?UtilsValidateNonceAlt(n):!0}
161,ValidateNonce:function(n){return typeof UtilsValidateNonce!="undefined"?UtilsValidateNonce(n):!0},LoadPopup:function(n){if(typeof n=="string"&&n!=null&&n!=""){var t=document.getElementById(n);Matrix3.AddPopup(t)}},EvalScript:function(n){var s=!0,i,u,r,h,t,f,e,o;if(n!=null&&Utils.IsObject(n)&&n.childNodes||(s=!1),s){if(i=n.getElementsByTagName("script"),u=document.getElementById(Matrix3.Const.DIRECT_POPUP_CONTAINER),!u||!u.contains(n))for(r=0,h=i.length;r<h;r++)t=i.item(r).innerHTML,Utils.IsString(t)&&t!=""&&(f="",e="",i.item(r).hasAttribute("nonce-alt")&&(f=i.item(r).getAttribute("nonce-alt")),i.item(r).hasAttribute("nonce")&&(e=i.item(r).getAttribute("nonce")),o=this.ValidateNonceAlt(f)||this.ValidateNonce(e),o&&t&&(t.indexOf(Matrix3.Const.POST_RENDER_FUNCTION)!=-1?this.msScript+=" "+t.substring(0,t.length-2)+",true);":t.indexOf(Matrix3.Const.PRE_RENDER_FUNCTION)!=-1?Utils.EvalScripts(t):this.msScript+=" "+Matrix3.Const.POST_RENDER_FUNCTION+t+"},true);"),!o&&t&&console.error("Script is blocked: "+t.substring(0,20)+" ... "));while(i.length!=0)i.item(0).parentNode.removeChild(i.item(0))}return n},AddVForm:function(n,t,i,r,u,f,e){var v,y,b,h,it,s,p,k,d,c,w,o,l,g,a,nt,tt;if(!this.IsTriggingPropertyValidWhenAddingVForm(n,e))return Matrix3.FinishLoad(),!1;if(v=!1,y=!0,(n==null||n.id==null||n.id==undefined||n.id=="")&&(y=!1),Utils.IsString(t)||t==null||(y=!1),i==null||Utils.IsString(i)||(y=!1),b=!1,i=="*"&&(i=null,b=!0),$SetStyle(n,"visibility","hidden"),$(n).addClass("FreshVF"),y)if(h=$PI(n.id),this.mbFullPage)Utils.IsIE8()===!0?(it=new HTMLElement($Elt("BodyContent")),it.GetNode().appendChild(n)):$Elt("BodyContent").GetNode().appendChild(n),ControlMgr.GetInstance().moRootPositionItem=h,Matrix3.FinishLoad();else{if(o=ControlMgr.GetInstance().GetPositionItem(n.id,!0),o!=null){for(s=o.moParent,s!=null&&document.getElementById(s.GetId())!=s&&$PI(s.GetId())!=null&&(s=$PI(s.GetId())),p=o.nextSibling;p!=null&&i==null;)i=p.id,p=p.nextSibling,i==""&&(i=null);k=$(n);d=k.attr("class");(d==null||d.indexOf("CCC")===-1)&&k.attr("class",$(o.GetNode()).attr("class"))}if(s==null&&o==null&&Utils.IsString(t)&&(s=$PI(t)),s!=null){if(i!=null)if(c=$PI(i),c==null&&(c=$Elt(i)),c!=null){if(o=ControlMgr.GetInstance().GetPositionItem(n.id,!0),o!=null&&o.moParent===s&&(this.NewRefreshCaches(o.GetId()),o.CopyDependenciesTo(h),a=o.GetNode(),a.parentNode&&a.parentNode.removeChild(a),o.RecursiveRemove()),c=$Elt(i),c==null&&(l=s.moContainerForChildrens,l))for(w=0;c==null&&w<l.length;)l[w].msId!=n.id&&(c=l[w]),w++;s.AddControl(h,o,c);VFormEffects[VFormEffects.Const.EFFECT_NONE].call(this,n,s.GetNode(),c);s.FixAddDependency(h);v=!0}else this.EvalScript(n),Matrix3.FinishLoad();else o=ControlMgr.GetInstance().GetPositionItem(n.id,!0),b&&(l=s.moContainerForChildrens,l&&l.length>0&&(c=l[0])),s.AddControl(h,o,c),o!=null&&o.moParent===s?(g=Matrix3.IsPopup(o.GetId()),g&&$AddClass(n,"PopupContentClass"),this.NewRefreshCaches(o.GetId()),o.CopyDependenciesTo(h),o.RecursiveRemove(),a=o.GetNode(),a.parentNode&&a.parentNode.replaceChild(n,a),s!=null&&s.moParent!=null&&s.moParent.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_TABLE&&(PositionMgr.GetInstance().AddToDirtyXList(s.moParent),PositionMgr.GetInstance().AddToDirtyYList(s.moParent)),this.EvalScript(n),g&&this.moPopupTable[n.id]&&this.moPopupTable[n.id].StickContextMenuToOriginalPosition(),Matrix3.FinishLoad()):(VFormEffects[VFormEffects.Const.EFFECT_NONE].call(this,n,s.GetNode()),s.FixAddDependency(h)),v=!0;s!=null&&(s.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL||s.msCtrlType==PositionItem.Const.CONTROL_TYPE_PANEL_TABLE)&&(s.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyXList(s),PositionMgr.GetInstance().AddToDirtyYList(s));this.Animate(r,h,s,o)}else o!=null?(this.NewRefreshCaches(o.GetId()),o.CopyDependenciesTo(h),o.RecursiveRemove(),o.GetNode().parentNode&&o.GetNode().parentNode.replaceChild(n,o.GetNode()),this.EvalScript(n)):(ControlMgr.GetInstance().GetReference("DebugSummary")&&(Utils.IsString(t)?this.LogWarning("Matrix3.AddVForm() : _sParentID ( "+t+" ) not found for VForm "+n.id):this.LogWarning("Matrix3.AddVForm() : VForm with id "+n.id+" is not found in the page and its parent is not given. The VForm cannot be added...")),ControlMgr.GetInstance().RemoveOrphanNewPositionItem(h.msId),h.RecursiveRemove(),this.CleanUpChildVForm(h.GetVFormId(),h.msId),nt=this.maNodeToExtract.indexOf(h),nt>-1&&this.maNodeToExtract.splice(nt,1)),v=!0,Matrix3.FinishLoad();o&&(tt=Matrix3.GetPopupTable()[o.GetId()],tt&&tt.RefreshPositionItemNode())}return v},Animate:function(n,t,i,r){var u,f;if(n&&n!=""&&i){u=400;r&&this.RemoveIDs(r.GetNode());var e=[],o=[],h=[],s=[];if(AddTransformTansition=function(n,t,i,r,f,s){n.style.webkitTransform=t;n.style.MozTransform=i;n.style.msTransform=i;n.style.OTransform=i;
161Utils.IsIE9()||(n.style.webkitTransition="-webkit-transform "+u+"ms "+s,n.style.MozTransition="-moz-transform "+u+"ms "+s,n.style.msTransition="-ms-transform "+u+"ms "+s,n.style.OTransition="-o-transform "+u+"ms "+s);e.push(n);o.push(r);h.push(f)},AddOpacityTansition=function(n,t,i,r){n.style.opacity=t.toString();Utils.IsIE9()||(n.style.webkitTransition="opacity "+u+"ms "+r,n.style.MozTransition="opacity "+u+"ms "+r);e.push(n);s.push(i)},Utils.IsIE9())$(r).hide(),$(t).show();else switch(n){case"CFR":r&&i.GetNode().insertBefore(r.GetNode(),t.GetNode());AddTransformTansition(t.GetNode(),"translate3D("+i.GetWidth()+"px, 0, 0)","translate("+i.GetWidth()+"px, 0)","translate3d(0, 0, 0)","translate(0, 0)","ease-out");break;case"UTR":r&&(i.GetNode().appendChild(r.GetNode()),AddTransformTansition(r.GetNode(),"translate3D(0px, 0, 0)","translate(0px, 0)","translate3D("+i.GetWidth()+"px, 0, 0)","translate("+i.GetWidth()+"px, 0)","ease-in"));break;case"PFP":r&&(i.GetNode().appendChild(r.GetNode()),f=i.GetWidth()/2,AddTransformTansition(r.GetNode(),"perspective(3000) translate3d(0, 0, 0px) rotate3d(0, 1, 0, 0deg)","translate(0, 0)","perspective(3000) translate3d("+f+"px, 0, "+f+"px) rotate3d(0, 1, 0, 90deg)","translate("+i.GetWidth()+"px, 0)","ease-in"));break;case"PFN":r&&(i.GetNode().insertBefore(r.GetNode(),t.GetNode()),f=i.GetWidth()/2,AddTransformTansition(t.GetNode(),"perspective(3000) translate3d("+f+"px, 0, "+f+"px) rotate3d(0, 1, 0, 90deg)","translate("+i.GetWidth()+"px, 0)","perspective(3000) translate3d(0, 0, 0px) rotate3d(0, 1, 0, 0deg)","translate(0, 0)","ease-in"));break;case"STL":r&&(i.GetNode().appendChild(r.GetNode()),AddTransformTansition(r.GetNode(),"translate3d(0, 0, 0)","translate(0, 0)","translate3D(-"+i.GetWidth()+"px, 0, 0)","translate(-"+i.GetWidth()+"px, 0)","ease-out"));AddTransformTansition(t.GetNode(),"translate3D("+i.GetWidth()+"px, 0, 0)","translate("+i.GetWidth()+"px, 0)","translate3d(0, 0, 0)","translate(0, 0)","ease-out");break;case"STR":r&&(i.GetNode().appendChild(r.GetNode()),AddTransformTansition(r.GetNode(),"translate3D(0px, 0, 0)","translate(0px, 0)","translate3D("+i.GetWidth()+"px, 0, 0)","translate("+i.GetWidth()+"px, 0)","ease-out"));AddTransformTansition(t.GetNode(),"translate3D(-"+i.GetWidth()+"px, 0, 0)","translate(-"+i.GetWidth()+"px, 0)","translate3D(0px, 0, 0)","translate(0px, 0)","ease-out");break;case"CF":r&&(i.GetNode().insertBefore(r.GetNode(),t.GetNode()),AddOpacityTansition(r.GetNode(),1,0,"ease-out"));AddOpacityTansition(t.GetNode(),0,1,"ease-out");break;case"FI":r&&(r.GetNode().style.visiblity="hidden");AddOpacityTansition(t.GetNode(),0,1,"ease-out")}e.length>0&&setTimeout(function(){for(var n,t;e.length>0;)n=e.pop(),o.length>0&&(t=h.pop(),n.style.webkitTransform=o.pop(),n.style.MozTransform=t,n.style.OTransform=t,n.style.msTransform=t),s.length>0&&(n.style.opacity=s.pop().toString());r&&(setTimeout(function(){r.GetNode().style.visiblity="hidden"},u),setTimeout(function(){r.GetNode().parentNode&&r.GetNode().parentNode.removeChild(r.GetNode())},u+200))},0)}},RemoveIDs:function(n){for(var t,r=CacheMgr.GetInstance(),i=0;i<n.childNodes.length;i++)t=n.childNodes[i],Matrix3.RemoveIDs(t),t.id&&(r.RefreshNode(t.id),t.id=null)},RefreshNode:function(n){var i=!1,t;if(n.type=="hidden"&&n.name==Matrix3.Const.CONTROL_REFERENCE)t=n.value,n=$Elt(t),n||(n=document.createElement("div"),n.id=t),this.RefreshCaches(n.id),i=!0;else if(n.id){n=n.id;try{MultipleSelectionMgr.GetInstance().RefreshNode(n)}catch(r){}try{CacheMgr.GetInstance().RefreshNode(n)}catch(r){}try{ControlMgr.GetInstance().RefreshNode(n)}catch(r){}try{StyleMgr.GetInstance().RefreshNode(n)}catch(r){}try{CtrlEventMgr.GetInstance().RefreshNode(n)}catch(r){}try{WysiwygProperties.RefreshNode(n)}catch(r){}try{LoadingPostBackMgr.GetInstance().RefreshNode(n)}catch(r){}try{WindowExitEvent.RefreshNode(n)}catch(r){}try{DragFilesInBrowserEvent.RefreshNode(n)}catch(r){}try{MapCtrl.RefreshNode(n)}catch(r){}try{PositionGroupProperties.RefreshNode(n)}catch(r){}try{SequenceLoadingProperties.GetInstance().RefreshNode(n)}catch(r){}try{AutoScroll.RefreshNode(n)}catch(r){}}i&&n.parentNode&&n.parentNode.removeChild(n)},RegisterInCache:function(n,t){var i=function(){t.GetInstance?t.GetInstance().RefreshNode(n):t.RefreshNode(n)};this.RegisterForCleanup(n,t.Const.MGR_NAME,i)},RegisterForCleanup:function(n,t,i){var r,f=n.indexOf(Matrix3.Const.SEPARATOR_CONTROL),u;for(r=f==-1?n:n.substring(0,f),(r in this.moMgrCache)||(this.moMgrCache[r]={}),this.moMgrCache[r][n+t]=i;r!="";)f=r.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),f!=-1?(u=r.substring(0,f),u in this.moMgrCache||(this.moMgrCache[u]={}),Matrix3.Const.CHILD_VFORM in this.moMgrCache[u]||(this.moMgrCache[u][Matrix3.Const.CHILD_VFORM]={}
161),this.moMgrCache[u][Matrix3.Const.CHILD_VFORM][r]=!0):u="",r=u},RemoveCleanupCallback:function(n,t){var i=Utils.GetVFormId(n),r;this.moMgrCache.hasOwnProperty(i)&&(r=n+t,this.moMgrCache[i].hasOwnProperty(r))&&(this.moMgrCache[i][r](),delete this.moMgrCache[i][r])},NewRefreshCaches:function(n){var i,u,r,t;if(this.AbortRequestsOnID(n,!0),n=n.split(Matrix3.Const.SEPARATOR_CONTROL)[0],n in this.moMgrCache){for(i in this.moMgrCache[n])if(i==Matrix3.Const.CHILD_VFORM)for(u in this.moMgrCache[n][i])this.NewRefreshCaches(u);else this.moMgrCache[n][i]();delete this.moMgrCache[n];for(r in this.moReferences[n])t=$Elt(r),t&&t.parentNode&&(!("isConnected"in Node.prototype)||t.isConnected)?t.parentNode.removeChild(t):(t=$PI(r),t&&t.GetNode().parentNode&&(!("isConnected"in Node.prototype)||t.isConnected)&&t.GetNode().parentNode.removeChild(t.GetNode()));delete this.moReferences[n]}PubSub.publishSync(Utils.GetSignalName(n,Matrix3.Const.SIGNAL_NODE_REMOVED))},RefreshCaches:function(n){var i,t,r;if(n=$Elt(n),n){if(this.RefreshNode(n),n.className&&n.className.indexOf(Matrix3.Const.CLASS_DONOTFOLLOW)!=-1)return;for(i=n.getElementsByTagName("div"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("span"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("input"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("textarea"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("select"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("img"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("a"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("table"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t));for(i=n.getElementsByTagName("tr"),t=0,r=i.length;t<r;t++)this.RefreshNode(i.item(t))}},AjaxFailure:function(n,t,i,r){AjaxEventMgr.Fire("error",{vformId:r||null});var u=!1,f=!0;return Utils.IsObject(i)&&i!=null&&Utils.IsString(i.responseText)||(f=!1),f?u=this.ProcessFailure(i.responseText):(Matrix3.mbPostBackRequested||n&&!n.getAllResponseHeaders()||(this.LogError("Received an invalid ajax response with status "+t+" ("+(n&&n.status!=null?n.status:i.status)+") and body: "+i.responseText+". It is possible that the request has timed out.",!0),this.ShowNotification("An error has happened. It is possible that the request has timed out.",{notificationType:"error"})),Matrix3.mbPostBackRequested=!1),this.RemoveLoading(),u},AjaxSuccessFullPage:function(n,t,i,r,u){return Matrix3.AjaxSuccess(n,t,i,r,u,!0)},AjaxPreRenderWebComponent_V1:function(n){var u=new DOMParser,i=u.parseFromString(n,"text/html"),r,t;return i.querySelectorAll("script").forEach(function(n){n.remove()}),i.querySelectorAll("img, video").forEach(function(n){n.removeAttribute("src")}),i.querySelectorAll(".ABS").forEach(function(n){n.setAttribute("__id",n.id);n.removeAttribute("id");n.removeAttribute("data-vu")}),i.querySelectorAll("#"+Matrix3.Const.HIDDENFIELDS).forEach(function(n){n.remove()}),i.querySelectorAll("*").forEach(function(n){customElements.get(n.tagName.toLowerCase())&&n.setAttribute("pre-render","")}),r=i.body.innerHTML,t=$("<div>"),t.addClass($("#BodyContent>.VF").attr("class")),t.html(r),$("#PreRenderContent").append(t),{ComponentPreloader:function(n){if(n&&typeof customElements!="undefined")for(var i=0;i<n.length;i++){if(!customElements.get(n[i]))return n[i];t[0].isConnected&&t.find(n[i]).each(function(){if(!this.hasUpdated&&(!this.shadowRoot||this.shadowRoot.children.length===0))return n[i];WebComponentCtrl.PreFillNodePosition(this)})}t.remove()},PreBuiltXML:null}},AjaxPreRenderWebComponent_V2:function(n,t){var i=$("<div>"),r,u;return i.html('<span style="display:none;"><br /><\/span>'+n),i.__updating={},r=function(n){return!!n.tagName&&Matrix3.Const.VALID_WEBCOMPONENT_NAME_REGEX.test(n.tagName.toLowerCase())},i.__descendantComponents={},i.find("*").each(function(){var t,n;if(this.id&&r(this))for(t=this,n=this.parentNode;n;n=n.parentNode)n.id&&r(n)&&(i.__descendantComponents[n.id]=i.__descendantComponents[n.id]||[]).push(t)}),u=function(n){return new Promise(function(t,i){n.updateComplete.then(function(){var r,f,e;if(!n.constructor.dependencies||n.constructor.dependencies.length<=0){t();return}r=[];f=n.shadowRoot||n;for(e in n.constructor.dependencies)f.querySelectorAll(e).forEach(function(n){typeof n.enableUpdating=="function"?n.enableUpdating(!0):customElements.upgrade(n);var t=u(n);
161r.push(t)});if(r.length<=0){t();return}Promise.allSettled(r).then(t).catch(i)}).catch(i)})},{ComponentPreloader:function(n){for(var h,r,o,f,s={},e=0;e<(n||[]).length;e++)s[n[e]]=!0;if(h=function(n){var r=i.__descendantComponents[n.id],t,u;if(!r)return!1;for(t=0;t<r.length;t++)if(u=r[t],s[u.tagName.toLowerCase()]&&i.__updating[u.id]!==!1)return!0;return!1},n&&typeof customElements!="undefined")for(r=0;r<n.length;r++)if(customElements.get(n[r])){i.find(n[r]).each(function(){if(this.hasUpdated||this.shadowRoot&&this.shadowRoot.children.length!==0){if(this.id&&typeof i.__updating[this.id]=="undefined"){if(h(this)){f=this.id;return}var n={};t&&t[this.id]&&(n=t[this.id],delete t[this.id]);i.__updating[this.id]=!0;this.updateComplete.then(function(){var i,t;WebComponentCtrl.PreProcessNodeProperties(this,n);for(i in n)t=n[i],typeof t!="undefined"&&t!==null&&(this[i]=t)}.bind(this)).then(function(){u(this).then(function(){i.__updating[this.id]=!1}.bind(this))}.bind(this))}}else f=this.tagName.toLowerCase(),typeof this.enableUpdating=="function"?this.enableUpdating(!0):customElements.upgrade(this)});for(o in i.__updating)if(i.__updating[o]){f=o;break}}else f=n[r];return f},PreBuiltXML:i}},AjaxPreRenderWebComponent:function(n,t){return Param.PreloadWebComponentV2?this.AjaxPreRenderWebComponent_V2(n,t):this.AjaxPreRenderWebComponent_V1(n)},AjaxSuccess:function(n,t,i,r,u,f,e,o){var lt,nt,s,v,at,vt,h,a,tt,y,p,w,it,b,rt,ut,l,ft,c,et,ot,k,st,d,ht,ct;if(Matrix3.mbFullPage&&!f)return o&&o(),!0;if(this.miSuspendResponsesUntil>(new Date).getTime())setTimeout(function(){Matrix3.AjaxSuccess(n,t,i,r,u,f,e,o)},this.miSuspendResponsesUntil-(new Date).getTime());else{AjaxEventMgr.Fire("success",{vformId:r});try{if(lt=!1,nt=!0,Utils.IsObject(i)&&i!=null&&Utils.IsString(i.responseText)||(nt=!1),nt){if(PostRenderMgr.GetInstance().ExecuteFunctions(!0),s=n,this.maNextResponseReplacements&&(!r||r===this.maNextResponseReplacements.SourceVFormID)){for(v in this.maNextResponseReplacements)this.maNextResponseReplacements.hasOwnProperty(v)&&(at=v.replace(/[.*+?^${}()|[\]\\-]/g,"\\$&"),vt=new RegExp("ClientTag\\["+at+"\\]","g"),s=s.replace(vt,this.maNextResponseReplacements[v]));this.maNextResponseReplacements=null}if(h=!1,tt=Matrix3.Const.LOAD_CSS_AJAX_RESPONSE_REGEX,tt&&(y=tt.exec(s),y)){for(a=y[1].split("|"),p=0;p<a.length;p++)Utils.InsertCSS(a[p]);s=s.replace(y[0],"");h=!0}if(it=Matrix3.Const.LOAD_SCRIPTS_AJAX_RESPONSE_REGEX,it&&(b=it.exec(s),b&&(w=b[1].split("|"),Utils.LoadScript(w,null,null,!0),s=s.replace(b[0],""),h=!0)),rt=Matrix3.Const.LOAD_FONTS_AJAX_RESPONSE_REGEX,rt&&(c=rt.exec(s),c&&(ut=c[1].split("|"),ut.length>0&&(Utils.PreloadFonts(ut),h=!0),s=s.replace(c[0],""))),ft=Matrix3.Const.LOAD_COMPONENTS_AJAX_RESPONSE_REGEX,ft&&(c=ft.exec(s),c&&(l=c[1].split("|").filter(function(n){return Matrix3.Const.VALID_WEBCOMPONENT_NAME_REGEX.test(n)}),l.length>0&&(Utils.PreloadComponents(l),h=!0),s=s.replace(c[0],""))),et={},ot=Matrix3.Const.LOAD_COMPONENTS_PROPERTIES_AJAX_RESPONSE_REGEX,ot&&(k=ot.exec(s),k&&(et=Utils.EvalScriptsWithResult(k[1]),s=s.replace(k[0],""))),l&&l.length>0&&(s.startsWith("<div")||s.startsWith("<table")||s.startsWith(Matrix3.Const.RETURN_VALIDMARKER)
161)&&(ht=this.AjaxPreRenderWebComponent(s,et),st=ht.ComponentPreloader,d=ht.PreBuiltXML),h||(h=document.fonts&&document.fonts.status!=="loaded"),ct=$(".FreshVF"),ct.removeClass("FreshVF"),h)try{this.AjaxSuccessWaitResources(a,w,l,st);h=!1}catch(yt){}if(h==!1)ct.length>0?setTimeout(function(){Matrix3.AjaxSuccessProcess(s,u,d);e&&e()},0):(Matrix3.AjaxSuccessProcess(s,u,d),e&&e());else{var pt=this,g=10,wt=3e4/g;function n(){var t=!1;try{pt.AjaxSuccessWaitResources(a,w,l,st);t=!0}catch(i){wt-->0?setTimeout(n,g):t=!0}t==!0&&setTimeout(function(){Matrix3.AjaxSuccessProcess(s,u,d);e&&e()},g)}setTimeout(n,g)}}else o&&o()}catch(yt){Matrix3.LogError(yt);o&&o()}}return lt},AjaxSuccessWaitResources:function(n,t,i,r){var p=!document.fonts||document.fonts.status==="loaded",f,a,h,v,y,u,o,s,c;if(!p)throw"Waiting Loading Fonts";if(n){if(jQuery.browser.safari&&document.readyState!="complete"&&document.readyState!="interactive")throw"Waiting Loading CSS";var l=0,e=document.styleSheets,w=HistoryMgr.GetBaseURL();for(f=0,a=e.length;f<a;f++){if(h=e[f].href,h!=null)for(u=0,o=n.length;u<o;u++)h.indexOf(n[u])!=-1&&l++;Utils.StartsWith(e[f].href,w)&&e[f].cssRules}if(l<n.length)throw"Waiting Loading CSS";}if(t)for(v=Matrix3.moLoadedScripts,y=Matrix3.moLoadingScripts,u=0,o=t.length;u<o;u++)if(s=t[u],!v[s])if(y[s])throw"Waiting Loading JS";else Matrix3.LogError("Script "+s+" failed to load",!0);if(i&&typeof r=="function"&&(c=r(i),c))throw"Waiting Loading Web Component "+c;},AjaxSuccessProcess:function(n,t,i){var u,f,r;n!=null&&(n.startsWith("<div")||n.startsWith("<table")||n.startsWith(Matrix3.Const.RETURN_VALIDMARKER)?(u=i,u||(u=$("<div>"),u.html('<span style="display:none;"><br /><\/span>'+n)),f=Matrix3.PreRender(u[0]),PostRenderMgr.GetInstance().ExecuteAfterPreRenderOnAjaxSuccess(),Matrix3.Render(f,t),bResult=!0):n.substr(0,Matrix3.Const.REDIRECT_MARKER.length)==Matrix3.Const.REDIRECT_MARKER?(this.mbDontShowUnsavedChangesPopup=!0,r=n.substr(Matrix3.Const.REDIRECT_MARKER.length),r.indexOf("VP3=")==-1||Utils.IsInIFrame()||(r+="&"+Matrix3.Const.MARKER_RESOLUTION_WIDTH+"="+Utils.GetViewportWidth(),r+="&"+Matrix3.Const.MARKER_RESOLUTION_HEIGHT+"="+Utils.GetViewportHeight()),setTimeout(function(){Matrix3.moCustomRedirectHandler&&typeof Matrix3.moCustomRedirectHandler=="function"?Matrix3.moCustomRedirectHandler(r):document.location=r},1),Matrix3.PostRender(),bResult=!0):(Matrix3.ProcessFailure(n),Matrix3.RemoveLoading(),Matrix3.ShowNotification("Your action could not be completed successfully.",{notificationType:"error"})))},RegisterDefaultAction:function(n,t){this.moVFormTable[n]&&(this.moVFormTable[n][VFormInfoItem.Const.FIELD_DEFAULTACTION]=t)},ExecuteDefaultAction:function(n){var r=!1,u=!0,t,i,f;return Utils.IsString(n)||(u=!1),u&&n in this.moVFormTable&&(VFormInfoItem.Const.FIELD_DEFAULTACTION in this.moVFormTable[n]?(t=this.moVFormTable[n][VFormInfoItem.Const.FIELD_DEFAULTACTION],typeof t=="function"?t():Utils.EvalScripts(t),r=!0):DefaultActionProperties.ExecuteDefaultAction(n)||(i=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),i!=-1&&(f=n.substring(0,i),this.ExecuteDefaultAction(f)))),r},GetVFormInfoItem:function(n){var o=null,t,s,r,i,f,e;if(Utils.IsString(n)&&(t=n,Utils.IsObject(Matrix3.moVFormTable[t])&&Matrix3.moVFormTable[t]!=null)){s=Matrix3.moVFormTable[t][VFormInfoItem.Const.FIELD_PERSISTANT];r=null;Matrix3.moVFormTable[t].hasOwnProperty(VFormInfoItem.Const.FIELD_SUB_ID)&&(r=Matrix3.moVFormTable[t][VFormInfoItem.Const.FIELD_SUB_ID]);var h=null,u=null,c=t.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),l=Matrix3.IsPopup(t);!l&&c>0?h=t.substr(0,c):l&&(u=Matrix3.Const.POPUP_LAYER_ID);i=$Elt(t);i!=null&&i.parentNode!=null&&(f=i.parentNode.id,e=f.indexOf(Matrix3.Const.SEPARATOR_CONTROL),e>0&&(u=f.substr(e+1)),o=new VFormInfoItem(t,r,s,h,u))}return o},GetPostBody:function(n,t,i,r,u,f){var rt=!0,e="",s={},p=new VFormInfoTable,l=i,w=r,b,k,d,ut,v,c,g,y,h,nt,tt,o,it,a;if(Utils.IsString(n)||n==null||(rt=!1),rt){Utils.IsIE9()&&$(".placeholder").each(function(){this.value=""});Utils.IsIE9()&&$(".placeholder").each(function(){$(this).trigger("blur.placeholder")});b={};for(h in w)(k=Matrix3.moVFormTable[h],k)&&(d=k[VFormInfoItem.Const.FIELD_ACTIONLIST],d&&d.find(function(n){return n[VFormInfoItem.Const.ACTIONLIST_ACTION]===VFormInfoItem.Const.ACTIONLIST_ACTION_REMOVE}))&&(b[h]=!0);for(h in b)delete w[h];for(h in w)ut=this.GetVFormInfoItem(h),p.AddVFormInfoItem(ut);if(v=this.moBindableScopeTable.GetScopeTableForVForms(Object.keys(w)),t)window.Param&&window.Param.UseAjaxFormBuilderV2&&Utils.ParseBool(window.Param.UseAjaxFormBuilderV2)?(o=new FormData,window.cortexMetrics&&window.cortexMetrics.tryFlush(),o.set(Matrix3.Const.TRIGGER_LIST,this.moEventTable.Serialize()),o.set(Matrix3.Const.BINDABLE_SCOPE_TABLE,v.Serialize()),o.set(Matrix3.Const.ID_GENERATOR_MAPPING,this.moIDGeneratorMappingJSON),o.set(Matrix3.Const.VFORM_TABLE,p.Serialize()),Utils.HashToFormData(o,l),n!=null&&o.set(Matrix3.Const.ARGUMENTS,n),a=[],$('link[href*="SkinFamily"]').map(function(){var n=$(this).attr("href");n=n.substring(n.lastIndexOf("/")+1);n=n.substring(0,n.indexOf("SkinFamily")-1);a.push(n)}),o.set(Matrix3.Const.LOADED_SKIN_FAMILIES,JSON.stringify(a)),o.set(Matrix3.Const.AJAX_MARKER,"1"),o.set(Matrix3.Const.AJAX_TOKEN_MARKER,this.msAjaxToken),o.set(Matrix3.Const.PRELOAD_MARKER,u?"1":"0"),f&&o.set(Matrix3.Const.VIRTUALID_MARKER,f),Utils.IsInIFrame()||(o.set(Matrix3.Const.MARKER_RESOLUTION_WIDTH,Utils.GetViewportWidth()),o.set(Matrix3.Const.MARKER_RESOLUTION_HEIGHT,Utils.GetViewportHe
161ight())),this.mbPreloading&&o.set(Matrix3.Const.PRELOADV2_MARKER,"1"),e=new URLSearchParams(o).toString()):(window.cortexMetrics&&window.cortexMetrics.tryFlush(),e+=Matrix3.Const.TRIGGER_LIST+"="+this.moEventTable.Serialize(),e+="&"+Matrix3.Const.BINDABLE_SCOPE_TABLE+"="+v.Serialize(),e+="&"+Matrix3.Const.ID_GENERATOR_MAPPING+"="+encodeURIComponent(this.moIDGeneratorMappingJSON),e+="&"+Matrix3.Const.VFORM_TABLE+"="+p.Serialize(),it=Utils.HashToParameters(l),it!=""&&(e+="&"+it),n!=null&&(e+="&"+Matrix3.Const.ARGUMENTS+"="+n),a=[],$('link[href*="SkinFamily"]').map(function(){var n=$(this).attr("href");n=n.substring(n.lastIndexOf("/")+1);n=n.substring(0,n.indexOf("SkinFamily")-1);a.push(n)}),e+="&"+Matrix3.Const.LOADED_SKIN_FAMILIES+"="+JSON.stringify(a),e+="&"+Matrix3.Const.AJAX_MARKER+"=1",e+="&"+Matrix3.Const.AJAX_TOKEN_MARKER+"="+this.msAjaxToken,e+="&"+Matrix3.Const.PRELOAD_MARKER+"="+(u?"1":"0"),f&&(e+="&"+Matrix3.Const.VIRTUALID_MARKER+"="+f),Utils.IsInIFrame()||(e+="&"+Matrix3.Const.MARKER_RESOLUTION_WIDTH+"="+Utils.GetViewportWidth(),e+="&"+Matrix3.Const.MARKER_RESOLUTION_HEIGHT+"="+Utils.GetViewportHeight()),this.mbPreloading&&(e+="&_PRELOADV2_=1"));else if(s[Matrix3.Const.TRIGGER_LIST]=this.moEventTable.Serialize(),s[Matrix3.Const.VFORM_TABLE]=p.Serialize(),s[Matrix3.Const.BINDABLE_SCOPE_TABLE]=v.Serialize(),s[Matrix3.Const.ID_GENERATOR_MAPPING]=this.moIDGeneratorMappingJSON,s[Matrix3.Const.ARGUMENTS]=n,s[Matrix3.Const.DOPOSTBACK_MARKER]="1",Utils.IsInIFrame()||(s[Matrix3.Const.MARKER_RESOLUTION_WIDTH]=Utils.GetViewportWidth(),s[Matrix3.Const.MARKER_RESOLUTION_HEIGHT]=Utils.GetViewportHeight()),l instanceof Object)for(c in l)if(g=$Elt(c),g)g.tagName=="DIV"&&(s[c]=l[c]);else{if(y=c.split(Matrix3.Const.SEPARATOR_CONTROL),!y||y.length!==2)continue;if(h=y[0],nt=y[1],!Utils.IsStringFilled(h)||!Utils.IsStringFilled(nt))continue;tt=v.GetScopeDefinedByVForm(h);Utils.IsStringFilled(tt)&&BindableElementsMgr.GetInstance().ContainsElement(tt,nt)&&(s[c]=l[c])}}return this.moEventTable=new EventTable,t?e:s},GetControlInput:function(n,t){for(var i,s,f,e,r,u={},h=this.moEventTable.GetEventList(),o=0;o<h.length;o++)i=h[o],i.GetSourceVForm()in u||i.GetSourceVForm()in t||(i.GetSourceType()!=Matrix3.Const.RETURNTYPE_VIEWSTATE?this.GetVFormControls($Elt(i.GetSourceVForm()),n,u):t[i.GetSourceVForm()]=i.GetSourceVForm()),i.GetTargetVForm()!=null&&(i.GetTargetVForm()in u||i.GetTargetVForm()in t||(i.GetTargetType()!=Matrix3.Const.RETURNTYPE_VIEWSTATE?this.GetVFormControls($Elt(i.GetTargetVForm()),n,u):t[i.GetTargetVForm()]=i.GetTargetVForm()));for(s in u)t[s]=s;f=WysiwygManager.SetValueOnRealTextareas();for(r in f)typeof n[r]!="undefined"&&(n[r]=f[r][0],n[r+Matrix3.Const.WYSIWYG_SUFFIX]=f[r][1]);e=WysiwygManager.GetWebComponentWysiwygValues();for(r in e)typeof n[r]!="undefined"&&(n[r]=e[r][0],n[r+Matrix3.Const.WYSIWYG_SUFFIX]=e[r][1])},ValidateControlInput:function(n){var t=!0;return t=this.ValidateDateControlInput(n),this.ValidateNumericControlInput(n)||(t=!1),t},ValidateNumericControlInput:function(n){var i=!0,r,t;for(r in n)if(t=document.getElementById(r),t&&t.tagName==="INPUT"&&t.type==="number"&&t.validity&&t.validity.badInput){t.reportValidity();i=!1;break}return i},ValidateDateControlInput:function(n){var i=!0,t,u,f,r;for(t in n){if(t.endsWith(DateCtrl.Const.ADVANCED_DATE_INTERVAL_TYPE)){if($PI(t).classList.contains("Warned")){i=!1;break}continue}if(t.endsWith(DateCtrl.Const.FULL_DATE_FROM)){u=t.length-DateCtrl.Const.FULL_DATE_FROM.length;f=t.slice(0,u);try{if(r=$Control(f),r.HasErrors()&&r.moOptions.enabled){i=!1;break}}catch(e){continue}}}return i},ResetInvalidDateControls:function(n){var r=[],t,u,f,i;for(t in n){if(t.endsWith(DateCtrl.Const.ADVANCED_DATE_INTERVAL_TYPE)){if($PI(t).classList.contains("Warned"))return!1;continue}if(t.endsWith(DateCtrl.Const.FULL_DATE_FROM)){u=t.length-DateCtrl.Const.FULL_DATE_FROM.length;f=t.slice(0,u);try{if(i=$Control(f),i.HasErrors()&&i.moOptions.enabled){if(!i.moOptions.autoRevertInvalidDate)return!1;r.push(i)}}catch(e){continue}}}return r.forEach(function(n){n.RevertToLastValidValue()}),r.length>0},GetVFormControls:function(n,t,i){var a=!0,ht=!1,k,d,g,nt,ct,tt,h,it,lt,r,v,at,y,vt,o,c,ut,ft,e,l,et,ot,u,f,st,p,w,b,s;if((n==null||n.childNodes==undefined)&&(a=!1),Utils.IsObject(t)&&t!=null||(a=!1),Utils.IsObject(i)&&i!=null||(a=!1),a){if($HasClass(n,Matrix3.Const.CLASS_DONOTFOLLOW))return;if(n.id!=null&&n.id!=""&&n.id.indexOf(Matrix3.Const.SEPARATOR_CONTROL)==-1){if(n.id in i)return!0;
161if(i[n.id]=n.id,k=this.moBindableScopeTable.GetScopeDefinedByVForm(n.id),Utils.IsStringFilled(k)){d=BindableElementsMgr.GetInstance().GetElementsDataInScope(k);for(g in d)(nt=d[g],nt instanceof HTMLElement)||(t[n.id+Matrix3.Const.SEPARATOR_CONTROL+g]=JSON.stringify(nt))}if(n.id in this.moReferences){ct=this.moReferences[n.id];for(tt in ct)h=$Elt(tt),h?this.GetVFormControls(h,t,i):(h=$PI(tt),h&&this.GetVFormControls(h,t,i))}}for(it=n.childNodes,e=0,lt=it.length;e<lt;e++){r=it[e];switch(r.nodeName.toLowerCase()){case"input":v=r.type.toLowerCase();r&&r.getAttribute("data-acvf")?(at=r.getAttribute("data-acvf"),y=document.getElementById(r.name+at),y&&(t[r.name]=y.value!=AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE?y.value:r.value,Matrix3.mbProducingPostBack&&(Matrix3.moPostBackSwappedIDValueElements.push(r.id),$E(r.id+"_Value").attr("id",r.id),$E(r.id).attr("name",r.id),r.id=r.id+"_Value",r.name=r.id))):v=="radio"?r.checked==!0&&r.name&&(t[r.name]=r.value):v=="checkbox"&&r.name?t[r.name]=r.indeterminate==!0?"":r.checked==!0?"true":"false":v=="hidden"&&r.name==Matrix3.Const.CONTROL_REFERENCE?this.GetVFormControls($Elt(r.value),t,i):r.id&&(u=r.value,o=$PI(r.id),o&&(o.HasProperty("RT")?(c=o.GetProperty("RT"),u=Utils.replaceAll(u,c)):o.hasAttribute("data-rv")&&(u=o.getAttribute("data-rv"))),t[r.id]=u,r.hasAttribute("ac-create-entry-text")&&(vt=r.getAttribute("ac-create-entry-text"),r.removeAttribute("ac-create-entry-text"),t[r.id+"_CreateEntryText"]=vt));break;case"textarea":if(r.id){if(u=r.value,o=$PI(r.id),o&&o.HasProperty("RT")&&(c=o.GetProperty("RT"),c)){var rt={},pt=0,yt=Object.keys(c).sort(function(n,t){return t.length-n.length});for(e=0;e<yt.length;e++)l=yt[e],ut="_SYSTEM_TAG_"+pt++,rt[ut]=c[l],u=u.split(l).join(ut);for(ft=Object.keys(rt).sort(function(n,t){return t.length-n.length}),e=0;e<ft.length;e++)l=ft[e],u=u.split(l).join(rt[l])}t[r.id]=u}break;case"select":r.id&&(t[r.id]=r.value);break;case"object":if((!Utils.IsIE()&&r.type.toLowerCase()=="application/x-shockwave-flash"||Utils.IsIE())&&r.parentNode.id)try{t[r.parentNode.id]=r.Matrix_GetControlValue()}catch(wt){Utils.IsIE()&&this.GetVFormControls(r,t,i)}else this.GetVFormControls(r,t,i);break;case"div":if(r.msCtrlType&&r.id)r.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&r.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING)?(et=SequenceLoadingMgr.GetInstance().Get(r.GetVFormId()),et!=null&&(t[r.id]=et.GetSelectedIndex())):r.msCtrlType==PositionItem.Const.CONTROL_TYPE_DATATABLE?t[r.id]=$(r.GetNode()).find("input[type=search]").val()||"":r.msCtrlType==PositionItem.Const.CONTROL_TYPE_VIDEO&&(ot=$(r.GetNode()).find("video").get(0),ot&&(t[r.id]=ot.currentTime.toString()));else if(r.classList.contains("code_editor")){typeof CodeEditor!="undefined"&&(f=CodeEditor.Instances[r.id.substr(12)],f&&(u=null,f.moOptions&&f.moOptions.diff_mode&&Utils.ParseBool(f.moOptions.diff_mode)||f.moEditor&&f.moEditor.getValue&&(u=f.moEditor.getValue()),t[f.msVFormID+":EditorHTML"]=u));continue}else if(r.classList.contains("matrix_spreadsheet")){typeof SpreadSheet!="undefined"&&(f=SpreadSheet.Instances[r.id],f&&(t[f.GetVFormID()+":Editor"]=f.GetJSONValue()));continue}else if(r.classList.contains("FreeHtml")&&(st=$E(Utils.GetVFormId(r.parentNode.GetId())).data("vf"),st&&st.startsWith("ReactHost_")))continue;this.GetVFormControls(r,t,i);break;default:if(r.msCtrlType===WebComponentCtrl.Const.CONTROL_NAME&&r.id){if(p=WebComponentCtrl.GetPreservedProperties(r.id),p.length>0){for(w={},b=0;b<p.length;b++)s=p[b],typeof r[s]!="undefined"?w[s]=r[s]:r.hasAttribute(s)&&(w[s]=r.getAttribute(s));t[r.id]=JSON.stringify(w)}}else r.nodeName.toLowerCase()==="cx-checkbox"&&r.name&&(t[r.name]=r.indeterminate==!0?"":r.checked==!0?"true":"false");this.GetVFormControls(r,t,i)}}ht=!0}return ht},IsPopup:function(n){var t=!1,i=!0;return Utils.IsString(n)||(i=!1),i&&(t=n in Matrix3.moPopupTable),t},KeyPressCallback:function(n,t){var h=!1,r,u,o,f,c,i,y,l,s,p,w,e,a,v;if(t){if(n.screenX!==0||n.screenY!==0||n.offsetX!==0||n.offsetY!==0||n.originalEvent&&n.originalEvent.isSynthetic)return;i=$(document.activeElement);document.activeElement===document.body&&(i=$(n.target));i!=null&&i.length&&Utils.IsObject(i[0])&&(i[0].type==="textbox"||i[0].type==="checkbox"||i[0].type==="text"||i[0].type==="password")||(r=13)}else n.keyCode?r=n.keyCode:n.which&&(r=n.which);if(n.target?u=n.target:n.srcElement&&(u=n.srcElement),u!=null&&Utils.IsObject(u)&&u.type!="textarea"&&((r==38||r==40||r==9)&&(i=$(document.activeElement),i.is("[role=menu] a, [role=menu] [role=menuitem], [role=menu] [role=button]")&&i.closest("[role=menu]")[0]&&!i.closest("[role=menu]")[0].tagName.startsWith("
161CX-")&&(o=i.closest("[role=menu]").find("[role=menuitem],[role=button]").filter(":focusable"),f=o.index(i),r==38||r==9&&n.shiftKey?f--:r!=40&&(r!=9||n.shiftKey)||f++,f<0?f=o.size()-1:f>=o.size()&&(f=0),c=o[f],c&&c!==i[0]&&($(c).focus(),h=!0))),r==13||r==32))if(i=$(document.activeElement),i.is("[role=menuitem],[role=button],[role=checkbox]")||i[0].tagName==="A"&&i.parent().is(".CT.Button:not(.Disabled)")||i.is(".CT.Panel[tabindex=0]:not(.Disabled)")&&r===13)(i[0].tagName!="A"||i[0].href=="")&&(y=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0,detail:1,button:0,clientX:$(i).offset().left+$(i).width()/2,clientY:$(i).offset().top+$(i).height()/2}),y.isSynthetic=!0,customElements.get(i[0].tagName.toLowerCase())&&i[0].tagName.startsWith("CX-")||i[0].dispatchEvent(y)),l=i.attr("aria-controls"),typeof l!=typeof undefined&&l!==!1&&$E(l).find("[role=menuitem],[role=button]").first().focus(),r==32&&(h=!0);else if(r==13&&(s=u.id,Utils.IsString(s)&&Utils.IsStringFilled(s)))if(p=s.indexOf(Matrix3.Const.SEPARATOR_CONTROL),p>0)w=s.substring(0,p),w!=""&&this.ExecuteDefaultAction(w);else if(e=this.maPopupStack[this.maPopupStack.length-1],e)if(this.moVFormTable[e]&&VFormInfoItem.Const.FIELD_DEFAULTACTION in this.moVFormTable[e])this.ExecuteDefaultAction(e);else for(a in this.moVFormTable)if(VFormInfoItem.Const.FIELD_DEFAULTACTION in this.moVFormTable[a]&&a.substring(0,e.length)===e){this.ExecuteDefaultAction(a);break}return r==27&&u!=null&&Utils.IsObject(u)&&(u.type=="textarea"||u.type=="text"?u.blur():this.maPopupStack.length>0&&$(".context-menu-list").size()==0&&$("img.medium-zoom-image.medium-zoom-image--opened").length<=0&&(v=Utils.GetTopLevelPopup(!0),v&&v.length>0&&this.RemovePopup(v,!1,!0,!0))),(typeof this.moCMS!="undefined"||this.mbIsParameterPage==!0)&&r==83&&n.ctrlKey&&(ParamMgr.SaveAll(),h=!0),h?(n.stopImmediatePropagation(),n.stopPropagation(),n.preventDefault(),!1):void 0},InputFocusCallback:function(n){var t=Utils.FindClosestNodeID(n.target);Matrix3.msLastFocusedElt!=t&&(Matrix3.msLastFocusedElt=t,$(n.target).parents("div .CT.Panel").each(function(){var t=$PI(this.id),u,i,r;t&&t.GetProperty("Fold")==FoldProperties.Const.CLOSE&&!t.inert&&(u=$(t).find(".ShowOnFoldedState"),u.toArray().some(function(t){return t.contains(n.target)})||(i=$Control(this.id,PanelAdvancedCtrl.Const.CONTROL_NAME),r=i.GetClickableHeader(),r.length!==0&&r[0].contains(n.target)||i.Action_OpenFold()))}))},PostRender:function(_bDoPostBack){var iStart=(new Date).getTime(),i,sID,oEl,bIsInit,oDebugSummary,sSummaryContent;if(_bDoPostBack&&Matrix3.moPostBackSwappedIDValueElements)for(i=0;i<Matrix3.moPostBackSwappedIDValueElements.length;i++)sID=Matrix3.moPostBackSwappedIDValueElements[i],oEl=$E(sID),$E(sID+"_Value").attr({id:sID,name:sID}),oEl.attr({id:sID+"_Value",name:sID+"_Value"});try{Utils.EvalScripts(this.msScript)}catch(oEx){console.log("Cannot eval the script"+this.msScript);try{eval(this.msScript)}catch(oEx){Matrix3.LogError(oEx)}}if(ControlMgr.GetInstance().ClearOldInstance(),FreeHtmlContainer.ClearDisconnectedInstances(),_bDoPostBack||(LoadingPostBackMgr.GetInstance().HideAll(),this.HasEventsInProgress()||LoadingAjaxMgr.GetInstance().HideAll()),PostRenderMgr.GetInstance().AddFunction(function(){MultipleSelectionMgr.GetInstance().PostRenderRefreshSelection()},!0),setTimeout(function(){PostRenderMgr.GetInstance().ExecuteFunctions()},5),this.msScript="",!DragDropMgr.mbIsReorder,_bDoPostBack||this.RemoveLoading(),bIsInit=this.mbIsInit,this.mbIsInit?this.mbIsInit=!1:(DragDropMgr.RefreshCache(),MultipleSelectionMgr.GetInstance().Refresh()),this.mbHistory=!1,this.mbSelectionCommand=!1,_bDoPostBack&&Utils.IsSafari()||this.HasEventsInProgress()||Matrix3.HideWaitMsg(),this.mbFullPage=!1,oDebugSummary=ControlMgr.GetInstance().GetReference("DebugSummary"),oDebugSummary){this.miEndTime=(new Date).getTime();var dServerTime=this.mdServerPageTime||0,dPreparationTime=(this.miPostInitTime-this.miStartTime)/1e3,dClientTime=(this.miEndTime-this.miRequestEndTime)/1e3,dTotalTime=(this.miEndTime-this.miStartTime)/1e3,sTransferTime;sTransferTime=bIsInit?"Unknown":(dTotalTime-dPreparationTime-dServerTime-dClientTime).toFixed(2)+"s";sSummaryContent="Preparation time: "+dPreparationTime.toFixed(2)+"s<br/>Server time: "+dServerTime.toFixed(2)+"s."+this.msServerTimeSplit+"<br/>Transfer time: "+sTransferTime+"<br/>Client time: "+dClientTime.toFixed(2)+"s<br/>Total: "+dTotalTime.toFixed(2)+"s";$Control(oDebugSummary.msId,LabelCtrl.Const.CONTROL_NAME).SetValue(sSummaryContent,!0);Utils.HasDisabledFocusLayer()&&Utils.DisableFocus(Utils.GetVFormId(oDebugSummary.id),!0)}return Utils.IsIE9()&&($("input[placeholder]").placeholder(),$("textarea[placeholder]").placeholder()),$("["+VFormInfoItem.Const.ATTR_FORCED_RENDER_POSITION+"]").removeAttr(VFormInfoItem.Const.ATTR_FORCED_RENDER_POSITION),Utils.FireFrameEvent("DocumentLoaded"),!0},PreRender:function(n){var tt,r,v,u,h,y,d,w,f,c,t,g,b,k,l,a,nt,o,i;if(this.miRequestEndTime=(new Date).getTime(),tt=(new Date).getTime(),this.mbFullPage&&(r=$Elt(Matrix3.Const.ID_PANEL_MAIN).firstChild,Utils.IsIE8()==!0?(r=new HTMLElement(r),this.NewRefreshCaches(r.id),r.GetParentNode().removeChild(r.moDOMNode),r.RecursiveRemove()):(this.NewRefreshCaches(r.id),r.parentNode.removeChild(r),r.RecursiveRemove()),$Elt(Matrix3.Const.POPUP_LAYER_ID).innerHTML="",this.moEventTable=new EventTable,this.moTriggerTable=new TriggerTable,this.moVFormTable={},this.moPopupTable={},this.maPopupStack=[],this.maPopupForceCenteringStack=[],this.moCollection=new Collection,this.maPrePositionCalls=[],this.maAfterPreRenderCalls=[],this.moEffects={},CacheMgr.GetInstance().Refresh(),ControlMgr.GetInstance().ReInit(),PositionMgr.GetInstance().ReInit(),ResizeMgr.GetInstance().ReInit(),ResizeMgr.GetInstance().ExportScreenToLists()),v=!0,u=null,this.maNodeToExtract=[],(n==null||n.nodeName==null||n.nodeName==""||n.nodeName==undefined)&&(v=!1),h=document.getElementById(Matrix3.Const.DIRECT_POPUP_CONTAINER),h&&typeof h!="undefined")for(y=h.childNodes,f=0,c=y.length;f<c;f++)t=y[f],t instanceof HTMLElement&&(o=ControlMgr.GetInstance().CreateControl(t),PositionMgr.GetInstance().AddToDirtyXList(o),PositionMgr.GetInstance().AddToDirtyYList(o));if(v){u={};var e=null,s=n.childNodes,p=s[s.length-1];for(p.id==Matrix3.Const.PRELOAD_IMAGES&&(p=s[s.length-2]),e=Matrix3.SetupClientInfo(p.value),d=ControlMgr.GetInstance(),w=PositionMgr.GetInstance(),f=0,c=s.length-1;f<c;f++)if(t=s[f],t&&t.nodeName.toUpperCase()!="SPAN"){if(t.id=="script"){this.EvalScript(t);continue}for(g=t.innerHTML;t!=null&&!t.id;)t=t.firstChild;if(t==null){Matrix3.LogWarning("Can't find the valid node inside this parent response node. HTML: \n"+g);continue}i=t.id;i!=Matrix3.Const.HIDDENFIELDS&&(u[i]={},u[i][VFormInfoItem.Const.FIELD_XMLCONTENT]=t,b=null,k=e!=null?e[i]:null,k!=null&&(l=k[VFormInfoItem.Const.FIELD_ACTIONLIST],l!=null&&l.length>0&&(a=l[0],a!=null&&a.hasOwnProperty(VFormInfoItem.Const.ACTIONLIST_PARENT)&&(b=a[VFormInfoItem.Const.ACTIONLIST_PARENT]))),nt=this.GetVFormInsertionDepth(i,b),o=d.CreateControl(t,null,nt),w.AddToDirtyXList(o),w.AddToDirtyYList(o),this.maNodeToExtract.push(o))}if(WebComponentCtrl.ApplyRegisteredProperties(n),TextAreaCtrl.ApplyRegisteredValues(n),e!=null)for(i in e)i in u||(u[i]={}),u[i][VFormInfoItem.Const.FIELD_ACTIONLIST]=e[i][VFormInfoItem.Const.FIELD_ACTIONLIST],u[i][VFormInfoItem.Const.ACTIONLIST_EFFECT]=e[i][VFormInfoItem.Const.ACTIONLIST_EFFECT],u[i][VFormInfoItem.Const.ACTIONLIST_VIRTUALID]=e[i][VFormInfoItem.Const.ACTIONLIST_VIRTUALID];else u=null}return this.ProcessAfterPreRenderCalls(),u},ProcessFailure:function(n){var t=!0;return Utils.IsString(n)||(t=!1),t&&!this.mbDebug&&(document.write(n),document.close()),t},RemoveClientInfo:function(n){var t=!0,i=!1;return Utils.IsString(n)||(t=!1),t&&(i=!0),i},RemoveLoading:function(){if(!Matrix3.HasEventsInProgress()||Matrix3.IsInit()){typeof this.moCMS!="undefined"&&typeof CMSLoader!="undefined"&&CMSLoader.Hide();var n=$('[id="'+Matrix3.Const.LOADING_PANEL_ID+'"]').stop();n.css("display","none");
161$E(Matrix3.Const.LOADING_MASK_ID).css("display","none");n.length>0&&Utils.HidePopover(n[0]);this.mbIsLoading=!1;AutoCompletionMgr.EnableAll()}},RemoveVForm:function(n,t,i,r){var e=!0,o=!1,u,f;return Utils.IsString(n)||(e=!1),e&&(u=$Elt(n),u!=null&&(this.NewRefreshCaches(u.id),u.parentNode.removeChild(u),Utils.IsIE()?(oNodePI=$PI(u.id),oNodePI.RecursiveRemove()):u.RecursiveRemove(),Utils.IsIE8()&&(u=new HTMLElement(u)),oParentNode=u.moParent,oParentNode!=null&&oParentNode.msCtrlType&&(f=Utils.IndexOf(oParentNode.GetContainerForChildren(),u),f!=-1&&oParentNode.GetContainerForChildren().splice(f,1),PositionMgr.GetInstance().AddToDirtyXList(oParentNode),PositionMgr.GetInstance().AddToDirtyYList(oParentNode)),o=Matrix3.RemoveClientInfo(n))),r||Matrix3.FinishLoad(),o},RemovePopup:function(n,t,i,r,u){var e=!1,f;return Utils.IsString(n)&&(f=this.moPopupTable[n],f instanceof Popup&&((!r||f.AllowToCloseByESC())&&(f.Remove(t,i,null,u,null,r),e=Matrix3.RemoveClientInfo(n)),e=!0)),Matrix3.FinishLoad(),e},RemovePanel:function(n){var i,t,r;n&&n.length&&(Utils.ParseBool(n.data("keep-alive"))?n.removeData("keep-alive"):(i=n[0],i.parentNode.removeChild(i),i.RecursiveRemove(),t=i.moParent,t&&t.msCtrlType&&(r=Utils.IndexOf(t.GetContainerForChildren(),i),r!=-1&&t.GetContainerForChildren().splice(r,1),PositionMgr.GetInstance().AddToDirtyXList(t),PositionMgr.GetInstance().AddToDirtyYList(t))))},UnfoldPanel:function(n,t){if(n&&n.length>0){var r=n[0],i=$Control(r.GetId(),PanelAdvancedCtrl.Const.CONTROL_NAME);i&&i.Action_OpenFold&&i.Action_OpenFold();t&&(i.mbIgnoreActions=!0)}},FoldPanel:function(n,t){if(n&&n.length>0){var r=n[0],i=$Control(r.GetId(),PanelAdvancedCtrl.Const.CONTROL_NAME);i&&i.Action_CloseFold&&i.Action_CloseFold();t&&(i.mbIgnoreActions=!0)}},ForceFoldPanel:function(n){if(n&&n.length>0){var t=$Control(n,PanelAdvancedCtrl.Const.CONTROL_NAME),i=t.mbIgnoreActions;t.mbIgnoreActions=!1;t&&t.Action_CloseFold&&t.Action_CloseFold();t.mbIgnoreActions=i}},KeepPanelAlive:function(n){n&&n.length&&n.data("keep-alive","true")},Render:function(n,t){function at(){for(var i,f,r,u,n,e,t,o,s;lt-->=0;)try{if(!document.fonts||document.fonts.status==="loaded")break}catch(h){}if(PositionMgr.GetInstance().CalculatePosition(),!a.mbIsInit){i=EditableTable.GetAllTables();for(f in i)r=i[f],u=r.moTable.closest('[data-vf="DamView_Results_VForm"]'),u[0]&&u[0].classList.contains("ExpandMode")&&r.UpdatePositionAfterExpand();for(n=0,e=a.maNodeToExtract.length;n<e;n++)t=a.maNodeToExtract[n].GetNode(),$(t).hasClass(StyleMgr.Const.CLASS_INVISIBLE)?$SetStyle(t,"visibility",""):$SetStyle(t,"visibility","inherit")}ControlMgr.GetInstance().ApplyPropertyQueue();DOMChangesQueue.GetInstance().ApplyQueue();ScrollbarMgr.GetInstance().ReloadScrollPos();AdvancedVisibilityMgr.GetInstance().ApplyPendings();AdvancedVisibilityMgr.GetInstance().EvaluateAdvancedVisibilityExp();VisibilityObserverMgr.GetInstance().TriggerAllObservers();EditableTable.mbDisableFreeze=!1;PostRenderMgr.GetInstance().AddFunction(function(){var t=!1,i,n;for(i in l)n=l[i],n.HasFrozenColumns()||(n.FreezeColumns(null,!0),n.RefineFreezeAfterResize(),n.moTable&&n.moTable[0]&&typeof n.moTable[0].ForceHasChanged=="function"&&(PositionMgr.InvalidateNodeAndAncestors(n.moTable[0]),t=!0));t&&PositionMgr.CalculatePositionDebounced()},!0);setTimeout(function(){PreloadMgr.LaunchPreloadCall()},200);for(o in a.moPopupTable)s=a.moPopupTable[o],s.CenterIfNeeded();document.body.style.opacity=null;PostRenderMgr.GetInstance().AddFunction(function(){DynamicChildrenVisibilityMgr.GetInstance().ForceExecutePanels()},!0);a.miNumberOfAction--;a.miNumberOfAction<=0&&Matrix3.PostRender()}var vt=(new Date).getTime(),et=!0,ut=!1,k,d,ct,l,u,s,v,p,ot,st,b,tt,it,y,c,h,g,w,i,r,rt,nt,e,o,ft,f,ht;if(Utils.IsObject(n)&&n!=null||(et=!1),k=document.getElementById(Matrix3.Const.DIRECT_POPUP_CONTAINER),k&&typeof k!="undefined")for(d=k.childNodes;d.length>0;)o=$PI(d[0].id),PositionMgr.GetInstance().AddToDirtyXList(o),PositionMgr.GetInstance().AddToDirtyYList(o),o.ExtractDependences(),Matrix3.LoadPopup(d[0].id);if(this.miNumberOfAction=0,ct=[],l=EditableTable.GetFrozenTables(),EditableTable.mbDisableFreeze=!0,et){u=[];
161for(i in n)u.push(i);for(u.sort(function(t,i){for(var o,s,h,c,l,a,u=0,f=t.split("."),e=i.split("."),r=0;r<f.length;r++)if(e.length<=r){u=1;break}else{if(o=n[t][VFormInfoItem.Const.FIELD_XMLCONTENT],s=n[i][VFormInfoItem.Const.FIELD_XMLCONTENT],typeof o!="undefined"&&o&&typeof s!="undefined"&&s&&(h=o.getAttribute(VFormInfoItem.Const.ATTR_FORCED_RENDER_POSITION),c=s.getAttribute(VFormInfoItem.Const.ATTR_FORCED_RENDER_POSITION),typeof h!="undefined"&&h&&typeof c!="undefined"&&c))if(parseInt(h)<parseInt(c)){u=-1;break}else{u=1;break}if(e[r]==f[r])continue;else if(l=!isNaN(f[r]),a=!isNaN(e[r]),l&&a)if(parseInt(f[r])<parseInt(e[r])){u=-1;break}else{u=1;break}else if(f[r]<e[r]){u=-1;break}else{u=1;break}}return u}),s=0;s<u.length;)i=u[s],r=n[i][VFormInfoItem.Const.FIELD_ACTIONLIST],r instanceof Array&&r.length>0&&r[0][VFormInfoItem.Const.ACTIONLIST_ACTION]==VFormInfoItem.Const.ACTIONLIST_ACTION_ADD&&(v=r[0][VFormInfoItem.Const.ACTIONLIST_NEXTVFORM],v&&n.hasOwnProperty(v)&&(p=Utils.IndexOf(u,v),p!=-1&&(ot=n[v][VFormInfoItem.Const.FIELD_ACTIONLIST],st=ot[0][VFormInfoItem.Const.ACTIONLIST_ACTION],(st==VFormInfoItem.Const.ACTIONLIST_ACTION_REMOVE&&p<s||p>s)&&(u[s]=v,u[p]=i,s--)))),s++;for(this.miNumberOfAction=u.length,this.miNumberOfAction++,h=0,g=u.length;h<g;h++)if(i=u[h],r=n[i][VFormInfoItem.Const.FIELD_ACTIONLIST],r instanceof Array){for(b=n[i][VFormInfoItem.Const.FIELD_XMLCONTENT],f=0,nt=r.length;f<nt;f++)if(e=r[f],e[VFormInfoItem.Const.ACTIONLIST_ACTION]===VFormInfoItem.Const.ACTIONLIST_ACTION_ADD&&b!=null&&b.nodeName!=null&&b.nodeName!=undefined&&b.nodeName!=""&&e[VFormInfoItem.Const.ACTIONLIST_LAYOUT]!==VFormInfoItem.Const.ACTIONLIST_LAYOUT_POPUP){tt=$E(e[VFormInfoItem.Const.ACTIONLIST_PARENT])[0];for(y in l)c=$E(y)[0],c&&tt&&(c===tt||c.contains(tt))&&l[y].UnFreezeColumns(!0)}}else{it=$E(i)[0];for(y in l)c=$E(y)[0],c&&it&&(c===it||c.contains(it))&&l[y].UnFreezeColumns(!0)}for(h=0,g=u.length;h<g;h++)if(i=u[h],r=n[i][VFormInfoItem.Const.FIELD_ACTIONLIST],r instanceof Array)for(w=n[i][VFormInfoItem.Const.ACTIONLIST_EFFECT],rt=n[i][VFormInfoItem.Const.ACTIONLIST_VIRTUALID],this.miNumberOfAction+=r.length-1,f=0,nt=r.length;f<nt;f++){e=r[f];switch(e[VFormInfoItem.Const.ACTIONLIST_ACTION]){case VFormInfoItem.Const.ACTIONLIST_ACTION_ADD:n[i][VFormInfoItem.Const.FIELD_XMLCONTENT]!=null&&n[i][VFormInfoItem.Const.FIELD_XMLCONTENT].nodeName!=null&&n[i][VFormInfoItem.Const.FIELD_XMLCONTENT].nodeName!=undefined&&n[i][VFormInfoItem.Const.FIELD_XMLCONTENT].nodeName!=""?(e[VFormInfoItem.Const.ACTIONLIST_LAYOUT]==VFormInfoItem.Const.ACTIONLIST_LAYOUT_POPUP?Matrix3.AddPopup(n[i][VFormInfoItem.Const.FIELD_XMLCONTENT]):Matrix3.AddVForm(n[i][VFormInfoItem.Const.FIELD_XMLCONTENT],e[VFormInfoItem.Const.ACTIONLIST_PARENT],e[VFormInfoItem.Const.ACTIONLIST_NEXTVFORM],w,rt,null,t),Matrix3.AbortRequestsOnID(i,!0)):Matrix3.FinishLoad();break;case VFormInfoItem.Const.ACTIONLIST_ACTION_REMOVE:Matrix3.IsPopup(i)?Matrix3.RemovePopup(i,null,null,null,!0):Matrix3.RemoveVForm(i,w,rt);Matrix3.AbortRequestsOnID(i,!0)}ut=!0}else w=this.moVFormTable[i]?this.moVFormTable[i][VFormInfoItem.Const.ACTIONLIST_EFFECT]:"",Matrix3.AddVForm(n[i][VFormInfoItem.Const.FIELD_XMLCONTENT],null,null,w,rt,null,t),ut=!0;Matrix3.MakeNotClosedPopupsVisible()}if(this.mbIsInit)o=ControlMgr.GetInstance().GetRootPositionItem(),PositionMgr.GetInstance().AddToDirtyXList(o),PositionMgr.GetInstance().AddToDirtyYList(o),o.ExtractDependences();else for(ft=this.maNodeToExtract,f=0,ht=ft.length;f<ht;f++)ft[f].ExtractDependences();typeof Synchronizer!="undefined"&&Synchronizer.PostMatrixEvent();this.ProcessPrePositionCalls();Param.EnableInhibitPositioning&&(Matrix3.mbInhibitPositioning=!1);ControlMgr.GetInstance().GetRootPositionItem()||ControlMgr.GetInstance().CreateControl(null);var a=this,lt=120;return at(),ut},AbortRequestsOnID:function(n,t){var u,i,r;if(this.msPreventAbortOnVFormID&&this.msPreventAbortOnVFormID.startsWith(n))this.msPreventAbortOnVFormID=null;else{u=this.mbHasPendingAjax;for(i in this.moPendingAjax)r=this.moPendingLoadDeferred[i],((!r||t)&&i==n||!r&&Utils.StartsWith(i,n+Matrix3.Const.SEPARATOR_HIERARCHY))&&this.AbortRequest
161(i);this.mbHasPendingAjax=this.moPendingAjax?Object.keys(this.moPendingAjax).length>0:!1;u&&!this.mbHasPendingAjax&&this.RemoveLoading()}},AbortRequest:function(n){var t=this.mbHasPendingAjax;typeof this.moPendingAjax[n]!="undefined"&&this.moPendingAjax[n].abort();delete this.moPendingAjax[n];delete this.moPendingLoadDeferred[n];this.mbHasPendingAjax=this.moPendingAjax?Object.keys(this.moPendingAjax).length>0:!1;t&&!this.mbHasPendingAjax&&this.RemoveLoading()},AbortAllRequests:function(){for(var n in this.moPendingAjax)this.moPendingAjax[n].abort();this.moUninterruptiblePendingAjax.forEach(function(n){n.abort()});this.moPendingAjax={};this.moPendingLoadDeferred={};this.moUninterruptiblePendingAjax=[];this.mbHasPendingAjax=!1;this.RemoveLoading()},PreventEventCancellation:function(n){this.msPreventAbortOnVFormID=n},HasEventsInProgress:function(){return this.mbHasPendingAjax||this.mbIsInit},IsInit:function(){return this.mbIsInit},HasPendingEventOnParentOrSelf:function(n){var i=!1,t,r;if(this.mbHasPendingAjax)for(t in this.moPendingAjax)if(r=this.moPendingLoadDeferred[t],!r&&(t==n||Utils.StartsWith(n,t+Matrix3.Const.SEPARATOR_HIERARCHY))){i=!0;break}return i},HasPendingEventOnSelf:function(n){var t=!1,i;if(this.mbHasPendingAjax)for(i in this.moPendingAjax)if(i==n){t=!0;break}return t},ProcessPrePositionCalls:function(){for(var n in this.maPrePositionCalls)this.maPrePositionCalls[n]();this.maPrePositionCalls=[]},AddPrePositionCalls:function(n){this.maPrePositionCalls||(this.maPrePositionCalls=[]);this.maPrePositionCalls.push(n)},ProcessAfterPreRenderCalls:function(){for(var n in this.maAfterPreRenderCalls)this.maAfterPreRenderCalls[n]();this.maAfterPreRenderCalls=[]},AddAfterPreRenderCalls:function(n){this.maAfterPreRenderCalls||(this.maAfterPreRenderCalls=[]);this.maAfterPreRenderCalls.push(n)},SendRequest:function(n,t,i,r,u,f){var p=!0,e=null,l,o,c,v,s,w,h,b,k,d;if(Utils.IsString(n)||(p=!1),p){l=this.mbPreloading;c=new Promise(function(n){o=n});l||(Matrix3.moAjaxWaitingToProcessResponse[t]=c,v=function(){Matrix3.moAjaxWaitingToProcessResponse[t]===c&&delete Matrix3.moAjaxWaitingToProcessResponse[t]},c.then(v,v));var y=function(){try{r&&r.success&&typeof r.success=="function"&&r.success()}finally{o()}},g=function(){try{r&&r.fail&&typeof r.fail=="function"&&r.fail()}finally{o()}},nt=function(){try{r&&r.abort&&typeof r.abort=="function"&&r.abort()}finally{o()}},tt=function(){r&&r.always&&typeof r.always=="function"&&r.always(c)},a=function(){l?PreloadMgr.moInProgress=null:(delete Matrix3.moPendingAjax[t],delete Matrix3.moPendingLoadDeferred[t],Matrix3.mbHasPendingAjax=Object.keys(Matrix3.moPendingAjax).length>0)};this.mbIsRefreshObjectsTriggered=$E(t).attr("data-vf")==="ObjectsRefreshTrigger_VForm";s={success:function(n,i,r){if(Matrix3.mbFullPage){o();return}a();Matrix3.AjaxSuccess(n,i,r,t,f,undefined,y,o)}};l?(w=PreloadMgr.moInProgress,s.success=function(n,t,i){Matrix3.mbFullPage||(PreloadMgr.SetResponse(w,i.responseText),a(),y())}):s.failure=function(n,i){if(Matrix3.mbFullPage){o();return}a();i!=="abort"&&(n.status<200||n.status>=499)?(Matrix3.AjaxFailure(n.responseText,i,n,t),g()):i==="abort"?nt():Matrix3.AjaxSuccess(n.responseText,i,n,t,f,undefined,y,o)};s.complete=function(){(this.mbIsRefreshObjectsTriggered=!1,Matrix3.mbFullPage)||WaitingPopupMgr.GetInstance().Hide(t,i)}.bind(this);try{this.mbPreloading||this.mbIsRefreshObjectsTriggered||(this.miStartTime=(new Date).getTime());u&&typeof u=="function"&&u();h=new URL(HistoryMgr.GetInstance().GetCurrentURL());this.previewDevice&&(h.searchParams.set("previewDevice",this.previewDevice),h.searchParams.set("PDW",Utils.GetViewportWidth()),h.searchParams.set("PDH",Utils.GetViewportHeight()));h=h.toString();b=(new Date).toString();k=window.navigator.onLine;e=$.ajax({type:"POST",url:h,data:n,success:s.success,error:s.failure,complete:s.complete,context:this}).always(function(n,t,r){var u,f;(tt(),u=(new Date).toString(),Matrix3.mbFullPage)||t==="error"&&(e.status<200||e.status>=499)&&(a(),f=function(){return window.navigator.connection?JSON.stringify({type:window.navigator.connection.type,effectiveType:window.navigator.connection.effectiveType,rtt:window.navigator.connection.rtt,downlink:window.navigator.connection.downlink,saveData:window.navigator.connection.saveData}):"Not available"},Matrix3.LogError("Ajax error with status '"+t+"' and error: "+r+" and body: "+e.responseText+".\nPage unload: "+Matrix3.mbPageWillUnload+".\nConnected to network (before): "+k+".\nConnected to network (after): "+window.navigator.onLine+".\nSource event: "+i+".\nSent at: "+b+".\nResolved at: "+u+".\nReady state: "+e.readyState+".\nStatus code: "+e.status+".\nAll response headers: "+e.getAllResponseHeaders()+".\nNetwork connection: "+f(),!0),Matrix3.ShowNotification("An error has happened. Please try again.",{notificationType:"error"}),Matrix3.RemoveLoading())}).always(function(){this.mbHasPendingAjax=this.moPendingAjax?Object.keys(this.moPendingAjax).length>0:!1;var n=this.moUninterruptiblePendingAjax.indexOf(e);n>-1&&this.moUninterruptiblePendingAjax.splice(n,1)});d=e.abort.bind(e);e=e.then(function(n){return c.then(function(){return n})});e.abort=function(){d()};this.mbPreloading||this.mbIsRefreshObjectsTriggered||(this.miPostInitTime=(new Date).getTime())}catch(it){o()}}return e},LoadFullPage:function(n){this.mbFullPage=!0;this.AbortAllRequests();this.ResetGlobalStructures();PostRenderMgr.GetInstance().Clear();var t=this,i=$.ajax({type:"POST",url:n,data:"_FPA_=1",success:this.AjaxSuccessFullPage,error:this.AjaxFailure}).always(function(){delete Matrix3.moPendingAjax.Page;this.mbHasPendingAjax=Object.keys(t.moPendingAjax).length>0});this.moPendingAjax.Page=i;this.mbHasPendingAjax=!0},SetupClientInfo:function(n){var ut=!0,s=null,ft,t,vt,h,p,g,e,st,o,ht,w,nt,b,tt,k,it,u,r,a,ct,rt,d,lt,f,l,i,c;if(Utils.IsString(n)||(ut=!1),ut){if(ft=decodeURIComponent(n),t=null,t=JSON.parse(ft),this.mbBlockReloadOnResize=t.hasOwnProperty(Matrix3.Const.BLOCK_RELOAD_O
161N_RESIZE),t.hasOwnProperty(Matrix3.Const.MIN_RES_WIDTH)&&ResizeMgr.GetInstance().SetMinScreenWidth(t[Matrix3.Const.MIN_RES_WIDTH]),t.hasOwnProperty(Matrix3.Const.RESOLUTION_VALIDITY_BOUNDARIES)){var v=t[Matrix3.Const.RESOLUTION_VALIDITY_BOUNDARIES][0],y=t[Matrix3.Const.RESOLUTION_VALIDITY_BOUNDARIES][1],et=Utils.GetViewportWidth(),ot=Utils.GetViewportHeight(),at=v[0]!=-1&&et<v[0]||v[1]!=-1&&ot<v[1]||y[0]!=-1&&et>y[0]||y[1]!=-1&&ot>y[1];at&&(vt={success:function(){window.location.reload()},failure:null,scope:this},$.ajax({type:"GET",url:"htm/Resolution.aspx?W="+Utils.GetViewportWidth()+"&H="+Utils.GetViewportHeight()+"&dummy="+(new Date).getTime(),success:function(){Matrix3.mbBlockReloadOnResize||window.location.reload()},context:this}),Matrix3.mbBlockReloadOnResize||(h=document.createElement("div"),h.id="ReloadingMask",document.getElementById(Matrix3.Const.ID_FORM).appendChild(h),$SetStyle(h,"background-color","#FFF"),$SetStyle(h,"width",Utils.GetViewportWidth()+"px"),$SetStyle(h,"height",Utils.GetViewportHeight()+"px")))}if(p=t[Matrix3.Const.TRIGGER_LIST],p!=null){for(g=new TriggerTable,e=TriggerItem.Const,i=0,st=p.length;i<st;i++)o=p[i],ht=new TriggerItem(o[e.SOURCE_VFORM],o[e.SOURCE_EVENT],o[e.TARGET_VFORM],o[e.TARGET_EVENT],o[e.TARGET_TYPE],o[e.COMMON_PROPERTY]),g.AddTriggerItem(ht);this.moTriggerTable.Merge(g)}if(w=t[Matrix3.Const.TRIGGING_PROPERTY_DATA_POINTS_HASH_TABLE],w!=null)for(nt in w)this.moHashedTrackingPoints[nt]=w[nt];if(b=t[Matrix3.Const.ID_GENERATOR_MAPPING],b!=null){for(tt in b)this.moIDGeneratorMapping[tt]=b[tt];this.moIDGeneratorMappingJSON=JSON.stringify(this.moIDGeneratorMapping)}if(k=t[Matrix3.Const.BINDABLE_SCOPE_TABLE],k!=null&&(it=new BindableScopeTable,Object.keys(k).forEach(function(n){it.AddScopeItem(n,JSON.parse(k[n]))}),this.moBindableScopeTable.Merge(it)),u=t[Matrix3.Const.VFORM_TABLE],u!=null){s={};for(r in u)this.moVFormTable[r]=u[r],VFormInfoItem.Const.FIELD_ACTIONLIST in u[r]&&(s[r]={},s[r][VFormInfoItem.Const.FIELD_ACTIONLIST]=u[r][VFormInfoItem.Const.FIELD_ACTIONLIST],s[r][VFormInfoItem.Const.ACTIONLIST_EFFECT]=u[r][VFormInfoItem.Const.ACTIONLIST_EFFECT],s[r][VFormInfoItem.Const.ACTIONLIST_VIRTUALID]=Utils.TransformVirtualID(u[r][VFormInfoItem.Const.ACTIONLIST_VIRTUALID]))}if(Matrix3.Const.VERSION in t&&(this.miVersion=t[Matrix3.Const.VERSION]),Matrix3.Const.URL in t&&(this.msURL=t[Matrix3.Const.URL],FramesMgr.GetInstance().SetURL(decodeURIComponent(this.msURL))),Matrix3.Const.EURL in t&&(a=t[Matrix3.Const.EURL],(this.mbFullPage||this.mbIsInit)&&a&&!a.includes("#")&&(ct=window.location.hash,a+=ct),HistoryMgr.GetInstance().UpdateHash(a,!0)),Matrix3.Const.PROFILE_NAME in t?HistoryMgr.GetInstance().UpdateParameter("TP",t[Matrix3.Const.PROFILE_NAME]):HistoryMgr.GetInstance().UpdateParameter("TP",null),"PGT"in t&&(rt=parseFloat(t.PGT),this.mbIsRefreshObjectsTriggered?(typeof this.mdServerPageTime=="undefined"&&(this.mdServerPageTime=0),this.mdServerPageTime+=rt):this.mdServerPageTime=rt,"PGD"in t&&(this.msServerTimeSplit=t.PGD)),Matrix3.Const.AJAX_TOKEN_CLIENT_INFO_FIELD in t&&(this.msAjaxToken=t[Matrix3.Const.AJAX_TOKEN_CLIENT_INFO_FIELD]),Matrix3.Const.COLLECTIONS_TO_CLEAR in t&&(d=t[Matrix3.Const.COLLECTIONS_TO_CLEAR],d instanceof Array))for(lt=this.moCollection,i=0,c=d.length;i<c;i++)lt.ClearCollection(d[i]);if(Matrix3.Const.COLLECTIONS_TO_REMOVE_FROM in t)for(f in t[Matrix3.Const.COLLECTIONS_TO_REMOVE_FROM])if(t[Matrix3.Const.COLLECTIONS_TO_REMOVE_FROM][f]instanceof Array)for(l=t[Matrix3.Const.COLLECTIONS_TO_REMOVE_FROM][f],i=0,c=l.length;i<c;i++)this.moCollection.Remove(f,l[i]);if(Matrix3.Const.COLLECTION in t)for(f in t[Matrix3.Const.COLLECTION])if(t[Matrix3.Const.COLLECTION][f]instanceof Array)for(l=t[Matrix3.Const.COLLECTION][f],i=0,c=l.length;i<c;i++)this.moCollection.Add(f,l[i])}return s},GetVFormInsertionDepth:function(n,t){var i=0,u=ControlMgr.GetInstance().GetPositionItem(n),r;return u!=null?i=u.miDeep:t!=null&&(r=ControlMgr.GetInstance().GetPositionItem(t),r!=null&&(i=r.miDeep+1)),i},LogSlowRequest:function(n,t){var i="Data request is taking longer than "+Matrix3.Const.SLOW_REQ_LOG_THRESHOLD/1e3+"s.\nRequest summary: \nUrl: "+encodeURIComponent(this.msURL)+"\nParameters: "+encodeURIComponent(t)+"\n";Matrix3.LogWarning(i)},LogError:function(n,t){var i="",u,f,r,s,e,o;this.miErrorLogs++;try{if(u=n,f=null,n!==null&&typeof n=="object"&&String(n).indexOf("[object")===0){if(n.readyState!==undefined&&n.status!==undefined)u="Non-Error object (jqXHR-like): status="+n.status+", readyState="+n.readyState+", statusText="+n.statusText+", body="+n.responseText;else try{u="Non-Error object: "+JSON.stringify(n)}catch(h){}f=(new Error).stack}i="Message: "+encodeURIComponent(u);r="";try{r=n.stack;!r&&f&&(r=f);i+=". Stack: "+encodeURIComponent(r)}catch(h){}}catch(h){i=encodeURIComponent(n.ToString())}i.indexOf("Object's getDefaultValue() method returned an object")==-1&&(console.log("Error: "+i),Utils.IsStorageAvailable()&&sessionStorage.getItem("MatrixTrace")&&(Matrix3.RemoveMatrixTraceOldEntries(),i+=" Matrix JS trace="+encodeURIComponent(sessionStorage.getItem("MatrixTrace"))),s="RM=Javascript2&EM="+i,e=!Param||!Param.MaxErrorLog||isNaN(parseInt(Param.MaxErrorLog))?0:parseInt(Param.MaxErrorLog),(!t||!e||this.miErrorLogs<=e)&&$.ajax({type:"POST",url:"htm/LogError.aspx",data:s}),t||(o=!1,typeof ResumableUpload!="undefined"&&ResumableUpload&&ResumableUpload.GetTheFirstOnGoingUploadSession()&&(o=!0),o||(navigator.userAgent.indexOf("JavaFX")!=-1?setTimeout(location.reload,100):setTimeout(function(){document.location="C.aspx?VP3=ErrorPage"},100))))},LogWarning:function(n){var t,i;this.miWarningLogs++;t=!Param||!Param.MaxWarningLog||isNaN(parseInt(Param.MaxWarningLog))?0:parseInt(Param.MaxWarningLog);(!t||this.miWarningLogs<=t)&&(i="RM=Javascript2&WM="+n,$.ajax({type:"POST",url:"htm/LogError.aspx",data:i}))},ConsoleLog:function(n,t){if(window.DEBUG_MODE_ALL){console.log(t);return}if(n){var i=window.DEBUG_MODE_CONTROL_ID_PREFIX;i&&n.startsWith(i)&&console.log(t)}},IsConsoleLogActive:function(n){if(window.DEBUG_MODE_ALL)return!0;
161if(!n)return!1;var t=window.DEBUG_MODE_CONTROL_ID_PREFIX;return!!(t&&n.startsWith(t))},RefreshDebugLogVForm:function(){var t=ControlMgr.GetInstance().GetReference(Matrix3.Const.DEBUGLOG_FLASHID),n;if(t)n=t.GetVFormId(),n&&typeof n=="string"&&n!=""&&Matrix3.AddEvent(n,Matrix3.Const.DEBUGLOG_REFRESH_EVENT,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT);else return!1},SuspendResponseHandling:function(n){this.miSuspendResponsesUntil=(new Date).getTime()+n},IsParameterPage:function(){this.mbIsParameterPage=!0},GetPopupsInProcessOfClosing:function(){return this.moPopupsInProcessOfClosing},GetPopupsSendingEventInsteadOfClosing:function(){return this.moPopupsSendingEventInsteadOfClosing},MakeNotClosedPopupsVisible:function(){for(var n in Matrix3.moPopupsInProcessOfClosing)Matrix3.moPopupsInProcessOfClosing.hasOwnProperty(n)&&this.moPopupTable.hasOwnProperty(n)&&this.moPopupTable[n]&&this.moPopupTable[n].ShowHiddenPopup()},ShowNotification:function(n,t,i){var r={},e,f,s,u,o;if($.extend(r,Matrix3.moDefaultNotificationOptions),typeof n=="object"?$.extend(r,n):(typeof t=="object"?$.extend(r,t):$.extend(r,i),typeof n=="string"&&(r.message=n),typeof t=="string"&&(r.title=t)),typeof r.theme=="undefined"&&(r.theme="light"),r.buttons)for(e=0;e<r.buttons.length;e++)if(f=r.buttons[e],s=f[1],typeof s=="string"){u=f[2];o=u&&u.CloseNotificationOnClick==="1";switch(s){case"Copy":var c=u&&u.Link?u.Link:"",v=r.theme,h=function(n,t){o&&n.hide({transitionOut:"fadeOutRight"},t);Utils.CopyToClipboard(c,null,!1,v)};f=[f[0],h];break;case"Link":var c=u&&u.Link?u.Link:"",y=u&&u.NavigationType?u.NavigationType:"_self",h=function(n,t){o&&n.hide({transitionOut:"fadeOutRight"},t);window.open(c,y)};f=[f[0],h];break;default:var p=u&&u.VFormIdToCall?u.VFormIdToCall:"",w=u&&u.EventToTrigger?u.EventToTrigger:"",b=u&&u.EventArguments?u.EventArguments:"",h=function(n,t){o&&n.hide({transitionOut:"fadeOutRight"},t);Matrix3.AddEvent(p,w,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,b,null,null,null,null,null,null,null,null,null,null,null,null,!1,null)};f=[f[0],h]}r.buttons[e]=f}var l=r.notificationType==="error"||r.notificationType==="warning",k=l?"alert":"status",d=r.ariaLive||(l?"assertive":"polite"),a=typeof r.onOpening=="function"?r.onOpening:null;r.onOpening=function(n,t){var r=t.querySelector(".iziToast-texts")||t,u,i;r.setAttribute("role",k);r.setAttribute("aria-live",d);r.setAttribute("aria-atomic","true");u=t.querySelector(".iziToast-icon");u&&u.setAttribute("aria-hidden","true");i=t.querySelector(".iziToast-close");i&&!i.getAttribute("aria-label")&&i.setAttribute("aria-label","Close notification");a&&a.apply(this,arguments)};switch(r.notificationType){case"error":iziToast.error(r);break;case"success":iziToast.success(r);break;case"warning":iziToast.warning(r);break;case"info":iziToast.info(r);break;default:iziToast.show(r)}},HideNotifications:function(n,t){document.querySelectorAll(n).forEach(function(n){iziToast.hide(t,n);setTimeout(function(){n.remove()},1e4)})},AnchorNavigationForPageLoad:function(){$(document).ready(function(){window.location.hash&&setTimeout(function(){var n=$(window.location.hash);typeof n!="undefined"&&n&&n[0].scrollIntoView()},300)})},RemoveMatrixTraceOldEntries:function(){var t,n;typeof sessionStorage!="undefined"&&(t=sessionStorage.getItem("MatrixTrace"),t&&(n=t.split("\r\n"),n.length>15&&(n=n.slice(n.length-15),sessionStorage.setItem("MatrixTrace",n.join("\r\n")))))},GetPopupTable:function(){return this.moPopupTable},IsTriggingPropertyValidWhenAddingVForm:function(n,t){var u,f,r,i,e,o;if(!n||!n.id||!t||(u=TriggerTableHelper.GetTriggingProperties(n),!u)||(f=TriggerTableHelper.GetTriggingProperties(n.id),!f)||(r=t[n.id],!r))return!0;for(i in r)if(r.hasOwnProperty(i)&&(e=f[i],o=u[i],TriggerTableHelper.VerifyTwoTriggingProperties(i,e,o)))return!0;return!1},GetCollection:function(){return this.moCollection},RemoveFromCollection:function(n,t){var i,r;n&&t&&(i=Matrix3.GetCollection().moCollectionToVForm,i)&&(r=i[n],r)&&r.RemoveIfExists(t)},FindScope:function(n){var t=Matrix3.Const.GLOBAL_BINDABLE_SCOPE_ID;return this.moBindableScopeTable&&(t=this.moBindableScopeTable.FindScope(n)),t},FindScopeWithName:function(n,t){for(var f,e,u=null,r=this.moBindableScopeTable.GetScopesList(n),i=0;i<r.length;i++)if(f=r[i].ID,e=r[i].Name,e===t){u=f;break}return u},FindScopeWithBindableElement:function(n,t,i,r){var f=Matrix3.Const.GLOBAL_BINDABLE_SCOPE_ID,e,u,o;if(r){for(e=this.moBindableScopeTable.GetScopesList(n),u=0;u<e.length;u++)if(o=e[u].ID,BindableElementsMgr.GetInstance().ContainsElement(o,t,i)){f=o;break}}else f=this.FindScope(n);return f},FindAndUseBindableElement:function(n,t){var r=this.FindScopeWithBindableElement(n,t,null,!0),i=BindableElementsMgr.GetInstance().UseElement(r,t);return i&&this.RegisterForCleanup(n,"Matrix3_FindAndUseBindableElement"+t+(new Date).getTime(),function(){i.removeUsage()}),i},CleanUpChildVForm:function(n,t){this.moMgrCache[n]&&this.moMgrCache[n][Matrix3.Const.CHILD_VFORM]&&delete this.moMgrCache[n][Matrix3.Const.CHILD_VFORM][t]},MarkUnsavedChanges:function(n){Matrix3.GetCollection().Add(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING,n)},ClearUnsavedChanges:function(n){Matrix3.GetCollection().Remove(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING,n)},HasUnsavedChanges:function(n){Matrix3.GetCollection().IsVFormInCollection(n,Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING)}},Matrix3.moDefaultNotificationOptions={notificationType:"default",timeout:5e3,close:!1,closeOnClick:!1,displayMode:2,layout:2,progressBar:!1,animateInside:!1,transitionIn:"fadeInUp",transitionOut:"fadeOutDown",position:"bottomRight",pauseOnHover:!0},Matrix3.Const={DELAY_BUFFERED:"B",DELAY_IMMEDIAT:"I",DELAY_PARALLEL:"P",RETURNTYPE_FULL:"F",RETURNTYPE_VIEWSTATE:"VS",SEPARATOR_HIERARCHY:".",TRIGGER_LIST:"TL",TRIGGING_PROPERTY_DATA_POINTS_HASH_TABLE:"THB",ID_GENERATOR_MAPPING:"IDGM",BINDABLE_SCOPE_TABLE:"BSCT",GLOBAL_BINDABLE_SCOPE_ID:"ID_GLOBAL_BINDABLE_SCOPE",GLOBAL_BINDABLE_SCOPE_NAME:"GLOBAL_BINDABLE_SCOPE",VFORM_TABLE:"VFT",RESOLUTION_VALIDITY_BOUNDARIES:"RVB",MIN_RES_WIDTH:"MRW",BLOCK_RELOAD_O
161N_RESIZE:"BRR",URL:"URL",EURL:"EURL",PROFILE_NAME:"PPN",VERSION:"V",SEPARATOR_CONTROL:":",HIDDENFIELDS:"HIDDENFIELDS",DIRECT_POPUP_CONTAINER:"DirectPopups",PRELOAD_IMAGES:"PRELOAD_IMAGES",LOADING_PANEL_ID:"LoadingPopupID",LOADING_MASK_ID:"LoadingPopupMask",POSITIONING_MASK_ID:"PositioningMask",RETURN_VALIDMARKER:'<input type="hidden" name="HIDDENFIELDS" id="HIDDENFIELDS" value="',POPUP_LAYER_ID:"PopupLayer",SUFFIX_POPUP:"_Popup",COLLECTION:"CL",COLLECTIONS_TO_CLEAR:"CTL",COLLECTIONS_TO_REMOVE_FROM:"CLRF",ARGUMENTS:"ARGS",POSITION:"POS",AJAX_MARKER:"_AJAX_",AJAX_TOKEN_MARKER:"_AJTOK_",LOADED_SKIN_FAMILIES:"_LSF_",AJAX_TOKEN_CLIENT_INFO_FIELD:"AJTOK",DOPOSTBACK_MARKER:"_PB_",COMMAND_MULTIPLE_SELECT_VS:"GroupSelectionVS",COMMAND_MULTIPLE_SELECT_F:"GroupSelectionFULL",COMMAND_DROP_VS:"DropVS",COMMAND_DROP_F:"DropFULL",EVENT_DROP:"DROP",EVENT_DRAG:"DRAG",EVENT_SELECT:"SELECT",ARG_VFORMID:"V",ARG_CONTROL:"C",ARG_PANEL:"Pnl",ARG_GROUPS:"G",ARG_POSITION:"P",ARG_NEXT_VFORMID:"N",ARG_PREVIOUS_VFORMID:"PVF",ARG_COORDX:"X",ARG_COORDY:"Y",ARG_CTRL_KEY:"CtrlKey",ARG_FULL:"F",STATED_ITEMS:"SI",COMMAND_EVENT:"ET",COMMAND_ARGS:"A",EVENT_ARGS:"EA",COMMAND_REORDER:"Reorder",EVENT_REORDER:"REORDER",REDIRECT_MARKER:"REDIRECT=",LOADING_BORDER:10,FORM:"Form1",PRELOAD_MARKER:"_PRELOAD_",PRELOADV2_MARKER:"_PRELOADV2_",VIRTUALID_MARKER:"_VI_",MARKER_RESOLUTION_WIDTH:"RW",MARKER_RESOLUTION_HEIGHT:"RH",FIELD_PRELOAD:"P",FIELD_VIRTUALID:"VI",EVENT_FROM_PRELOAD:"P",EVENT_FROM_USER:"U",SEPARATOR_EFFECT:",",SEPARATOR_EFFECT_FUNCTION:":",SEPARATOR_VIRTUALID:";",LAYER_VFORMS:"LAYERVFORMS",RETRY_DELAY:200,SLOW_REQ_LOG_THRESHOLD:15e3,POST_RENDER_FUNCTION:"PostRenderMgr.GetInstance().AddFunction(function(){",PRE_RENDER_FUNCTION:"PreRenderMgr.GetInstance().AddFunction(function(){",ID_PANEL_MAIN:"BodyContent",CONTROL_REFERENCE:"Ref",CLASS_DONOTFOLLOW:"DoNotFollow",ID_WAIT_MSG:"WaitMsg",ID_WAIT_MSG_CLOSE:"WaitMsgClose",ID_WAIT_MSG_CONTENT:"WaitMsgContent",ID_FORM:"Form1",WAITMSG_MODE_MOUSE:"mouse",WAITMSG_MODE_POSTBACK:"postback",PROPERTY_HTTPS_VFORM:"Https",CLASS_PNG:"png",ID_CONSOLE:"Console",SAFARI_HIDE_MSG_DELAY:3e3,INFO_IMAGE_BASE:"Info_ImageBase",CHILD_VFORM:"CVF",LOAD_CSS_AJAX_RESPONSE_REGEX:/##LOADCSS:([^#]*)##/,LOAD_SCRIPTS_AJAX_RESPONSE_REGEX:/##LOADSCRIPTS:([^#]*)##/,LOAD_FONTS_AJAX_RESPONSE_REGEX:/##LOADFONTS:([^#]*)##/,LOAD_COMPONENTS_AJAX_RESPONSE_REGEX:/##LOADCOMPONENTS:([^#]*)##/,LOAD_COMPONENTS_PROPERTIES_AJAX_RESPONSE_REGEX:/<LOADCOMPONENTPROPERTIES>(.*)<\/LOADCOMPONENTPROPERTIES>/,VALID_WEBCOMPONENT_NAME_REGEX:/^[a-z][^\0\t\n\f\r\u0020/>A-Z]*-[^\0\t\n\f\r\u0020/>A-Z]*$/u,VFORM_PROPERTY_SKIN_FAMILY_ALIAS:"sfa",POPUP_CLASS_SKIN_FAMILY_SET:"SFA",DYNAMIC_ARGS_SYNCHRONIZER:"%24Synchronizer.",DYNAMIC_ARGS_FUNCTION:"%24(function",PLEASEWAITMSG_OPTION_SHOW_CLOSE:"ShowClose",DEBUGLOG_FLASHID:"DEBUGLOG_VFORM",DEBUGLOG_REFRESH_EVENT:"REFRESH",IE8_PAGE_REFRESH_EVENT_NAME:"PageChange",IE8_PAGE_REFRESH_MAX_COUNTER:20,ARG_TOP_LEVEL_POPUP_ID:"TOP_LEVEL_POPUP_ID",ARG_OBJECT_ID_OR_TOP_LEVEL_POPUP_ID:"OBJECT_ID_OR_TOP_LEVEL_POPUP_ID",WYSIWYG_SUFFIX:"_WYSIWYG_RAW",COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING:"TO_CONFIRM_ON_PAGE_UNLOADING_COLLECTION",SIGNAL_NODE_REMOVED:"NODE_REMOVED",DYNAMIC_GROUP_ITEMS:"DGI",DYNAMIC_GROUP_ID:"DGID",DYNAMIC_GROUP_COUNT:"DGC"},sLocH=window.location.hash,sLocH!=""&&sLocH.substring(0,2)=="#/"&&(sNewUrl=HistoryMgr.GetURLFromH(sLocH.substring(2)),oNewUrl=new URL(sNewUrl),HistoryMgr.GetBaseURL().indexOf(oNewUrl.origin)===0)){window.location.href=sNewUrl;throw"";}Matrix3.moMgrCache={};Matrix3.moReferences={};Matrix3.mbDebug=!0;$(document).ready(function(){Matrix3.Init();Utils.FireFrameEvent("DocumentLoaded")});PreloadMgr=function(){};PreloadMgr.Register=function(n){var t,i;n.isConnected&&(PreloadMgr.aoPreloadStack||(PreloadMgr.aoPreloadStack=[],PreloadMgr.oPresenceHash={}),t=n.GetProperty("PID"),PreloadMgr.oPresenceHash.hasOwnProperty(t)||(PreloadMgr.aoPreloadStack.length>2&&(i=PreloadMgr.aoPreloadStack[0].msPreloadID,PreloadMgr.aoPreloadStack.unshift(),delete PreloadMgr.oPresenceHash[i]),PreloadMgr.aoPreloadStack.push({msResponse:null,moPreloadControl:n,msPreloadID:t,mbRequested:!1}),PreloadMgr.oPresenceHash[t]=!0,Matrix3.HasEventsInProgress()||PreloadMgr.LaunchPreloadCall(),Matrix3.RegisterForCleanup(n.GetId(),"PreloadMgr|"+t,function(){PreloadMgr.Invalid(t)})))};PreloadMgr.LaunchPreloadCall=function(){var i,f,n,t,u,r,e;if(PreloadMgr.moInProgress==null&&PreloadMgr.aoPreloadStack)for(i=0,f=PreloadMgr.aoPreloadStack.length;i<f;i++)if(n=PreloadMgr.aoPreloadStack[i],n.msPreloadID!=null&&n.msResponse==null&&!n.mbRequested&&(PreloadMgr.moInProgress=n,n.mbRequested=!0,t=n.moPreloadControl.GetNode().getElementsByTagName("a"),t.length>0))if(u=$(t[0]),r=u.attr("data-preload-src"),r&&r.trim()!=="")Utils.EvalScripts("Matrix3.mbPreloading = true; try{ "+r+" } catch (_eExp){throw(_eExp);}finally{Matrix3.mbPreloading = false;}"),u.removeAttr("data-preload-src");else{Matrix3.mbPreloading=!0;try{t[0].isConnected&&(e=new MouseEvent("click"),t[0].dispatchEvent(e))}catch(o){throw o;}finally{Matrix3.mbPreloading=!1}}};
161PreloadMgr.SetResponse=function(n,t){var r,u,e,i,s,h,c;if(n!=null)if(n.msResponse=t,n.mbExecuteWhenReceived)r={},r.responseText=t,Matrix3.AjaxSuccess(t,null,r,null);else if(t.indexOf("ClientTag[")==-1){u=$("<div>");u.html('<span style="display:none;"><br /><\/span>'+t);var l=u[0],o=l.childNodes,f=o[o.length-1];if(f.id==Matrix3.Const.PRELOAD_IMAGES&&f.value)for(e=f.value.split("\n"),i=0,s=e.length;i<s;i++)h=e[i],c=new Image,c.src=h}};PreloadMgr.Reset=function(n,t){var i,c,l,u,f,e,a,o,r,s,h;if(PreloadMgr.aoPreloadStack)if(n){for(i=0,c=PreloadMgr.aoPreloadStack.length;i<c;i++){if(l=PreloadMgr.aoPreloadStack[i],u=!0,Utils.IsStringFilled(t)){if(f=!1,e=l.moPreloadControl.GetNode().getElementsByTagName("a"),e.length>0)for(a=$(e[0]),o=a.parents(),r=0;r<o.length;r++)if(s=Utils.GetNodeCortexID(o[r]),Utils.IsStringFilled(s)&&(h=Utils.GetRootOrPopupId(s),Utils.IsStringFilled(h))){f=h===t;break}u=f}u&&(PreloadMgr.aoPreloadStack[i].msResponse=null,PreloadMgr.aoPreloadStack[i].mbRequested=!1)}PreloadMgr.LaunchPreloadCall()}else PreloadMgr.aoPreloadStack=[],PreloadMgr.oPresenceHash={}};PreloadMgr.Invalid=function(n){if(PreloadMgr.oPresenceHash&&PreloadMgr.oPresenceHash.hasOwnProperty(n)){var t=PreloadMgr.GetConfigIndex(n);PreloadMgr.aoPreloadStack.splice(t,1);delete PreloadMgr.oPresenceHash[n]}};PreloadMgr.GetConfigIndex=function(n){var i=null,t,r;if(PreloadMgr.oPresenceHash&&PreloadMgr.oPresenceHash.hasOwnProperty(n))for(t=0,r=PreloadMgr.aoPreloadStack.length;t<r;t++)if(PreloadMgr.aoPreloadStack[t].msPreloadID==n){i=t;break}return i};PreloadMgr.GetEventResponse=function(n){var r=null,t=n.GetProperty("PID"),i;return PreloadMgr.oPresenceHash&&PreloadMgr.oPresenceHash.hasOwnProperty(t)&&(i=PreloadMgr.GetConfigIndex(t),r=PreloadMgr.aoPreloadStack[i].msResponse,PreloadMgr.aoPreloadStack.splice(i,1),delete PreloadMgr.oPresenceHash[t]),r};PreloadMgr.ControlEventFired=function(n){var t=!1,i=n.GetProperty("PID");return PreloadMgr.moInProgress&&PreloadMgr.moInProgress.msPreloadID==i&&(t=!0,PreloadMgr.moInProgress.mbExecuteWhenReceived=!0),t};TriggerItem.Const={SEPARATOR:"|",SOURCE_VFORM:"SVF",SOURCE_EVENT:"SE",TARGET_VFORM:"TVF",TARGET_EVENT:"TE",TARGET_TYPE:"TRT",DELAY:"D",COMMON_PROPERTY:"CP"};TriggerItem.CreateID=function(n,t,i,r){var u=new StringBuilder;return u.append(n),t!=null&&(u.append(TriggerItem.Const.SEPARATOR),u.append(t)),i!=null&&(u.append(TriggerItem.Const.SEPARATOR),u.append(i)),r!=null&&(u.append(TriggerItem.Const.SEPARATOR),u.append(r)),u.toString()};TriggerItem.prototype={GetID:function(){return this.msID},GetSourceVForm:function(){return this.msSourceVForm},GetSourceEvent:function(){return this.msSourceEvent},GetTargetVForm:function(){return this.msTargetVForm},GetTargetEvent:function(){return this.msTargetEvent},GetTargetType:function(){return this.msTargetType},CommonTriggingProperty:function(){return this.msCommonTriggingProperty}};TriggerTable.Const={MAX_RECURSE:50,VFORM_NOT_MATCH:-2,VFORM_MATCH:-1,DATA_TRIGGING_PROPERTIES:"trigprops",ATTR_DATA_TRIGGING_PROPERTIES:"data-trigprops",DATA_TRIGGING_PROPERTIES_HASHED:"tpointhashed",ATTR_DATA_TRIGGING_PROPERTIES_HASHED:"data-tpointhashed",CHILD_ALL:"[*]",CHILD_DESCENDANTS:"[.]",WILDCARD:"*"};TriggerTable._reCollectionExpr=/^([^\]{[*#}]*)([{[][*#.][\]}])(.*)$/;TriggerTable.prototype={AddTriggerItem:function(n){var t=!1;return n instanceof TriggerItem&&!(n.GetID()in this.moTriggerTable)&&(this.moTriggerList.push(n),this.moTriggerTable[n.GetID()]=this.moTriggerList.length-1,t=!0),t},GetTriggerList:function(){return this.moTriggerList},Merge:function(n){var f,u,i,t,r;if(n instanceof TriggerTable){for(f=n.GetTriggerList(),t=0,r=f.length;t<r;t++){if(u=f[t],u.GetID()in this.moTriggerTable)for(this.moTriggerList.splice(this.moTriggerTable[u.GetID()],1),i=0;i<this.moTriggerList.length;i++)this.moTriggerTable[this.moTriggerList[i].GetID()]=i;this.moTriggerList.push(u)}for(t=0,r=this.moTriggerList.length;t<r;t++)this.moTriggerTable[this.moTriggerList[t].GetID()]=t}return!1},CheckMatchingVForm:function(n,t,i,r){var f=TriggerTable.Const.VFORM_NOT_MATCH,o=!0,s,a,e,v,u;if((n==null||!Utils.IsString(n)||n.indexOf("[")>=0)&&(o=!1),Utils.IsString(t)||(o=!1),i==null||i instanceof Collection||(o=!1),o){var y=Matrix3.Const.SEPARATOR_HIERARCHY,l=t.
161split(y),h=null,c=t.indexOf("{*}");if(c>=0&&c<l[0].length&&(h=t.substr(0,c)),h!=null){if(i!=null&&(s=i.GetVFormList(h),s!=null))for(a=t.substr(l[0].length),e=0,v=s.length;f<0&&e<v;e++)u=s[e]+a,u.indexOf(TriggerTable.Const.CHILD_ALL)!=-1?(u=u.replace(/\./g,"\\."),u=u.replace(/\[\*]/g,"\\.[0-9a-zA-Z_]+"),u="^"+u+"$",new RegExp(u).test(n)&&(f=e)):u.indexOf(TriggerTable.Const.CHILD_DESCENDANTS)!=-1?(u=u.replace(/\./g,"\\."),u=u.replace(/\[\\.\]/g,"(\\.[0-9a-zA-Z_]+)+"),u="^"+u+"$",new RegExp(u).test(n)&&(f=e)):u==n&&(f=e)}else t=="*"&&r?f=TriggerTable.Const.VFORM_MATCH:(u=t,u.indexOf(TriggerTable.Const.CHILD_ALL)!=-1?(u=u.replace(/\./g,"\\."),u=u.replace(/\[\*]/g,"\\.[0-9a-zA-Z_]+"),u="^"+u+"$",new RegExp(u).test(n)&&(f=TriggerTable.Const.VFORM_MATCH)):u.indexOf(TriggerTable.Const.CHILD_DESCENDANTS)!=-1?(u=u.replace(/\./g,"\\."),u=u.replace(/\[\\.\]/g,"(\\.[0-9a-zA-Z_]+)+"),u="^"+u+"$",new RegExp(u).test(n)&&(f=TriggerTable.Const.VFORM_MATCH)):u==n&&(f=TriggerTable.Const.VFORM_MATCH))}return f},FindAllIndex:function(n,t,i,r){var o=[],u,s,f,e,l;if(n!=null&&Utils.IsString(n)&&!(n.indexOf("[")>=0)&&(t==null||Utils.IsString(t))&&(i==null||i instanceof Collection))for(Utils.IsUndefined(t)&&(t=null),u=0,s=this.moTriggerList.length;u<s;u++){var h=this.moTriggerList[u],a=h.GetSourceVForm(),c=h.GetSourceEvent();(t==c||c==null)&&(f=this.CheckMatchingVForm(n,a,i,r),f>=TriggerTable.Const.VFORM_MATCH&&(e=null,l=u,f>=0&&(e=f),o.push([l,e])))}return o},GetEventTable:function(n,t,i,r,u,f,e,o,s,h,c,l,a){var w=new EventTable,d,g,k,st,v,nt,rt,it,ct,y,ut,ft,b,et,ot,lt;if(Utils.IsUndefined(o)&&(o=0),Utils.IsBoolean(e)||(e=!0),u instanceof Collection||(u=new Collection),Utils.IsString(n)&&$Elt(n)&&(Utils.IsString(t)||t==null)&&!(o>TriggerTable.Const.MAX_RECURSE)&&Utils.IsString(n)&&(r==Matrix3.Const.DELAY_BUFFERED||r==Matrix3.Const.DELAY_IMMEDIAT)&&(i==Matrix3.Const.RETURNTYPE_FULL||i==Matrix3.Const.RETURNTYPE_VIEWSTATE)){for(g=this.FindAllIndex(n,t,u,e),k=0,st=g.length;k<st;k++)if(v=this.moTriggerList[g[k][0]],nt=this.GetComponents(v.GetTargetVForm(),u,g[k][1],n),nt!=null){var ht=new EventTable,p=v.CommonTriggingProperty(),tt=null;for(p&&(rt=TriggerTableHelper.GetTriggingProperties(n),rt&&(tt=rt[p])),it=0,ct=nt.length;it<ct;it++)y=nt[it],$Elt(y)&&!TriggerTableHelper.WillVFormBeSilent(y,a,"VFormRemoved")&&(ut=null,p&&(ft=TriggerTableHelper.GetTriggingProperties(y),ft&&(ut=ft[p])),b=!p,b||(b=TriggerTableHelper.VerifyTwoTriggingProperties(p,tt,ut,y,a)),et=n+"_"+y+"_"+v.GetTargetEvent()+"_"+v.GetTargetType(),b&&c&&(b=!c[et]),b&&(c=c||{},c[et]=!0,ot=Matrix3.Const.DELAY_IMMEDIAT,(t=="SAVE_PARAMETER"||t=="RESET_PARAMETER"||t=="PASTE"||t=="DELETE_CELL"||t=="CELL_SAVE"||t=="BACKGROUND_SAVE")&&(ot=r),d=new EventItem(n,t,i,y,v.GetTargetEvent(),v.GetTargetType(),ot,f,s,h,l),w.AddEventItem(d),p&&tt&&w.MarkVFormTriggeredByTriggingProperty(y,p,tt),(y!=n||v.GetTargetEvent()!=t||v.GetTargetType()!=i)&&(lt=this.GetEventTable(y,v.GetTargetEvent(),v.GetTargetType(),r,u,f,!1,o+1,s,null,c,l,a)),ht.Merge(lt)));w.Merge(ht)}e&&w.moEventList.length==0&&(d=new EventItem(n,t,i,null,null,null,r,f,s,h,l,a),w.AddEventItem(d))}return w},GetComponents:function(n,t,i,r){var l=!0,o=null,u,y,a,f,h,s,c,p,w,v;if(Utils.IsString(n)||(l=!1),t instanceof Collection||(l=!1),Utils.IsNumber(i)||(i=null),l){if(o=[],u=!1,n=="_parent")y=r.substr(0,r.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY)),o=new Array(y),u=!0;else if(a=TriggerTable._reCollectionExpr,n.match(a)){f=a.exec(n);h=f[1].lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY);h>0?(sStart=f[1].substr(0,h),sIdentifier=f[1].substring(h+1,f[1].length)):(sStart="",sIdentifier=f[1]);var b=f[2],k=f[3],e=null;switch(b){case"{*}":sStart==""&&(e=t.GetVFormList(sIdentifier),u=!0);break;case TriggerTable.Const.CHILD_ALL:e=this.GetChildVForms(f[1],!1);e!=null&&(u=!0);break;case TriggerTable.Const.CHILD_DESCENDANTS:e=this.GetChildVForms(f[1],!0);e!=null&&(u=!0);break;case"{#}":i!=null&&(s=t.GetVFormList(sIdentifier)[i],Utils.IsString(s)&&(e=new Array(s),u=!0));break;case"[#]":i!=null&&(s=this.GetChilds(sIdentifier)[i],Utils.IsString(s)&&(e=new Array(s),u=!0))}if(u&&e!=null)for(c=0,p=e.length;c<p;c++)w=e[c]+k,v=this.GetComponents(w,t),v!=null?o=o.concat(v):u=!1}else n.match("^[^\\]{[*#}]*$")&&(o.push(n),u=!0);u||(o=null)}return o},GetChilds:function(n,t){var s=!0,f=null,u,r,i,h,e,o,c;if(Utils.IsString(n)||(s=!1),s&&(u=$Elt(n),u!=null&&u.id!=null&&u.id!=undefined&&u.id!=""))for(r=u.childNodes,f=[],i=0,h=r.length;i<h;i++)if(r[i]!=null&&r[i].id!=null&&r[i].id!=undefined&&r[i].id!=""&&(f.push(r[i].id),t&&(e=this.GetChilds(r[i].id,!0),e!=null)))for(o=0,c=e.length;o<c;o++)f.push(e[o]);return f},GetChildVForms:function(n,t){var r=null,i;return Utils.IsString(n)?(i=$Elt(n),i!=null&&i.id!=null&&i.id!=undefined&&i.id!=""&&(r=[],this.CollectChildVForms(i,t,r)),r):null},CollectChildVForms:function(n,t,i){var u=n.GetContainerForChildren?n.GetContainerForChildren():null,f,e,r;for((u==null||u.length==0)&&(u=n.children),f=0,e=u.length;f<e;f++)(r=u[f],r!=null)&&(r.id&&Matrix3.moVFormTable[r.id]!==undefined?(i.push(r.i
161d),t&&this.CollectChildVForms(r,t,i)):this.CollectChildVForms(r,t,i))}};TriggerTableHelper={GetTriggingProperties:function(n){var i,t,r;if(!n)return null;if(Utils.IsString(n))if(i=$E(n),i.length)n=i[0];else return null;return t=n.getAttribute(TriggerTable.Const.ATTR_DATA_TRIGGING_PROPERTIES),typeof t=="string"&&(t=t.replace(/"/g,'"'),t=JSON.parse(t)),r=n.getAttribute(TriggerTable.Const.ATTR_DATA_TRIGGING_PROPERTIES_HASHED),r&&t&&t.TPoints&&(t.TPoints=this.ReplaceHashedTriggingProperty(t.TPoints),n.setAttribute(TriggerTable.Const.ATTR_DATA_TRIGGING_PROPERTIES,JSON.stringify(t)),n.removeAttribute(TriggerTable.Const.ATTR_DATA_TRIGGING_PROPERTIES_HASHED)),t},VerifyTwoTriggingProperties:function(n,t,i,r,u){var f,o,s,h,e;if(n==="TPoints")return f=TriggerTableHelper.VerifyChangeBroadcastingTriggerProperties(t,i),f&&r&&(u?TriggerTableHelper.WillVFormBeSilent(r,u)&&(f=!1):(o=$Elt(r),o&&o.classList.contains("FreshVF")&&(f=!1))),f;if(!t||!i)return!1;if(t==i)return!0;for(s=i.toLowerCase().split(" "),h=new Set(t.toLowerCase().split(" ")),e=0;e<s.length;e++)if(h.has(s[e]))return!0;return!1},VerifyChangeBroadcastingTriggerProperties:function(n,t){var c,o,u,s,l,f,i,e,h;if(!n||!t)return!1;if(n==t)return!0;var a=TriggerTableHelper.ConvertTriggerPropertyValueToMap(n),y=TriggerTableHelper.ConvertTriggerPropertyValueToMap(t),v=a.map,r=y.map,p=a.allIdentifiers;if(TriggerTable.Const.WILDCARD in r){if(TriggerTableHelper.MatchWildcardIdentifiers(p,r[TriggerTable.Const.WILDCARD]))return!0;if(Object.keys(r).length===1)return!1;c={};for(o in r)o!=TriggerTable.Const.WILDCARD&&(c[o]=r[o]);r=c}u=!1;for(s in v)if(s in r){if(l=v[s],f=r[s],l["*"]||f["*"]){u=!0;break}for(i in l){if(f[i]){u=!0;break}if(i.length>1){if(f[i[0]+"*"]||f[i[0]+i[1]+"*"]){u=!0;break}if(e=i.lastIndexOf("."),e>0){if(h=i.substring(0,e+1),f[h+"*"]){u=!0;break}if(e=i.lastIndexOf(".",e-1),e>0&&(h=i.substring(0,e+1),f[h+"*"])){u=!0;break}}}}if(u)break}return u},ConvertTriggerPropertyValueToMap:function(n){var t;if(TriggerTableHelper.Cache==null&&(TriggerTableHelper.Cache={}),t=TriggerTableHelper.Cache[n],!t){var i={},r={},u=n.split(";");u.forEach(function(n){var t=n.split(":"),u=t[0],f=t[1].split(",");i[u]=f.reduce(function(n,t){return n[t]=!0,r[t]=!0,n},{})});t={map:i,allIdentifiers:r};TriggerTableHelper.Cache[n]=t}return t},MatchWildcardIdentifiers:function(n,t){if(!n||!t)return!1;for(var i in t)if(n[i])return!0;return!1},ReplaceHashedTriggingProperty:function(n){if(n!=null&&Matrix3.moHashedTrackingPoints!=null)for(var t in Matrix3.moHashedTrackingPoints)n.indexOf(t)>-1&&(n=n.replace(t,Matrix3.moHashedTrackingPoints[t]));return n},WillVFormBeSilent:function(n,t,i){var r,u,f;if(t&&n){if(r={},i)for(u in t)t[u].Type===i&&(r[u]=t[u]);else r=t;if(r[n])return!0;for(f in r)if(n.indexOf(f+".")>=0)return!0}return!1}};VFormInfoItem.Const={FIELD_PERSISTANT:"VS",FIELD_ACTIONLIST:"AL",FIELD_COLLECTIONLIST:"CL",ACTIONLIST_PARENT:"P",FIELD_VFORMPARENT:"PV",FIELD_VFORMPANEL:"PP",FIELD_INDEX:"I",ACTIONLIST_NEXTVFORM:"N",ACTIONLIST_ACTION:"A",ACTIONLIST_ACTION_ADD:"A",ACTIONLIST_ACTION_REMOVE:"R",ACTIONLIST_LAYOUT:"L",ACTIONLIST_LAYOUT_INLINE:"I",ACTIONLIST_LAYOUT_POPUP:"P",ACTIONLIST_ID:"ID",ACTIONLIST_EFFECT:"E",ACTIONLIST_VIRTUALID:"VI",FIELD_DEFAULTACTION:"DA",FIELD_REFRESHLIST:"RL",FIELD_XMLCONTENT:"X",FIELD_SUB_ID:"S",ATTR_FORCED_RENDER_POSITION:"data-frp"};VFormInfoItem.prototype={GetObjectToSerialize:function(){var n={};return n[VFormInfoItem.Const.FIELD_PERSISTANT]=this.msPersistant,n[VFormInfoItem.Const.FIELD_SUB_ID]=this.msSubID,n[VFormInfoItem.Const.FIELD_VFORMPARENT]=this.msVFormParent,n[VFormInfoItem.Const.FIELD_VFORMPANEL]=this.msVFormPanel,n[VFormInfoItem.Const.FIELD_INDEX]=$E(this.msVFormID).index().toString(),n[VFormInfoItem.Const.FIELD_COLLECTIONLIST]=Matrix3.moCollection.GetVFormIndexes(this.msVFormID),n},GetID:function(){return this.msVFormID},GetSubID:function(){return this.msSubID},GetVFormPanel:function(){return this.msVFormPanel},GetSubID:function(){return this.msSubID},GetPersistant:function(){return this.msPersistant},GetVFormParent:function(){return this.msVFormParent}};VFormInfoTable.prototype={AddVFormInfoItem:function(n){var t=!1;return n instanceof VFormInfoItem&&(this.moVFormInfoTable[n.GetID()]=n,t=!0),t},Serialize:function(){var n={};for(var t in this.moVFormInfoTable)n[t]=this.moVFormInfoTable[t].GetObjectToSerialize();return JSON.stringify(n)}}; 162/*! 163 * jQuery UI Autocomplete 1.13.2 164 * http://jqueryui.com 165 * 166 * Copyright jQuery Foundation and other contributors 167 * Released under the MIT license. 168 * http://jquery.org/license 169 */ 170$.widget("ui.autocomplete",{version:"1.13.2",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var n,t,i,r=this.element[0].nodeName.toLowerCase(),u=r==="textarea",f=r==="input",e;this.isMultiLine=u||!f&&this._isContentEditable(this.element);this.valueMethod=this.element[u||f?"val":"text"];this.isNewMenu=!0;this._addClass("ui-autocomplete-input");this.element.attr({autocomplete:"off",role:"combobox","aria-autocomplete":"list","aria-expanded":"false","aria-haspopup":"listbox"});this._on(this.element,{keydown:function(r){if(this.element.prop("readOnly")){n=!0;i=!0;t=!0;return}n=!1;i=!1;t=!1;var u=$.ui.keyCode;switch(r.keyCode){case u.PAGE_UP:n=!0;this._move("previousPage",r);break;case u.PAGE_DOWN:n=!0;this._move("nextPage",r);break;case u.UP:n=!0;this._keyEvent("previous",r);break;case u.DOWN:n=!0;this._keyEvent("next",r);break;case u.ENTER:this.menu.active&&(n=!0,r.preventDefault(),this.menu.select(r));break;case u.TAB:this.menu.active&&this.menu.select(r);break;case u.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(r),r.preventDefault());break;default:t=!0;this._searchTimeout(r)}},keypress:function(i){if(n){n=!1;(!this.isMultiLine||this.menu.element.is(":visible"))&&i.preventDefault();return}if(!t){var r=$.ui.keyCode;
170switch(i.keyCode){case r.PAGE_UP:this._move("previousPage",i);break;case r.PAGE_DOWN:this._move("nextPage",i);break;case r.UP:this._keyEvent("previous",i);break;case r.DOWN:this._keyEvent("next",i)}}},input:function(n){if(i){i=!1;n.preventDefault();return}this._searchTimeout(n)},focus:function(){this.selectedItem=null;this.previous=this._value()},blur:function(n){this._change(n)}});this._initSource();this.menu=$("<ul>").appendTo(this._appendTo()).menu({role:"listbox"}).hide().attr({unselectable:"on"}).menu("instance");this._addClass(this.menu.element,"ui-autocomplete","ui-front");this.element.attr("aria-controls",this.menu.element.attr("id"));this.options.messages&&this.options.messages.listLabel&&this.menu.element.attr("aria-label",this.options.messages.listLabel);e=this.options.appendTo?this.options.appendTo:this.menu.element;this._on(e,{mousedown:function(n){n.preventDefault()},menufocus:function(n,t){var i,r,u;if(this.isNewMenu&&(this.isNewMenu=!1,n.originalEvent&&/^mouse/.test(n.originalEvent.type))){this.menu.blur();this.document.one("mousemove",function(){$(n.target).trigger(n.originalEvent)});return}i=t.item.data("ui-autocomplete-item");!1!==this._trigger("focus",n,{item:i})&&i&&n.originalEvent&&/^key/.test(n.originalEvent.type)&&this._value(i.value);r=t.item.children(".ui-menu-item-wrapper");u=r.attr("id");u&&(this.menu.element.find(".ui-menu-item-wrapper[aria-selected]").removeAttr("aria-selected"),r.attr("aria-selected","true"),this.element.attr("aria-activedescendant",u))},menuselect:function(n,t){var i=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==$.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r;this.selectedItem=i}));!1!==this._trigger("select",n,{item:i})&&this._value(i.value);this.term=this._value();this.close(n);this.selectedItem=i}});this.liveRegion=$("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body);this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible");this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching);this.element.removeAttr("autocomplete");this.menu.element.remove();this.liveRegion.remove();this._off(this.window,"beforeunload")},_setOption:function(n,t){this._super(n,t);n==="source"&&this._initSource();n==="appendTo"&&this.menu.element.appendTo(this._appendTo());n==="disabled"&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(n){var t=this.menu.element[0],r,i;return t&&(r=$(t).parent(),i=$(".FooterRow",r),i&&i.length>0&&$.contains(i[0],n.target))?!0:n.target===this.element[0]||n.target===t||$.contains(t,n.target)},_closeOnClickOutside:function(n){this._isEventTargetInWidget(n)||this.close()},_appendTo:function(){var n=this.options.appendTo;return n&&(n=n.jquery||n.nodeType?$(n):this.document.find(n).eq(0)),n&&n[0]||(n=this.element.closest(".ui-front, dialog")),n.length||(n=this.document[0].body),n},_initSource:function(){var t,i,n=this;Array.isArray(this.options.source)?(t=this.options.source,this.source=function(n,i){i($.ui.autocomplete.filter(t,n.term))}):typeof this.options.source=="string"?(i=this.options.source,this.source=function(t,r){n.xhr&&n.xhr.abort();n.xhr=$.ajax({url:i,data:t,dataType:"json",success:function(n){r(n)},error:function(){r([])}})}):this.source=this.options.source},_searchTimeout:function(n){clearTimeout(this.searching);this.searching=this._delay(function(){var t=(this.term||"")===(this._value()||""),i=this.menu.element.is(":visible"),r=n.altKey||n.ctrlKey||n.metaKey||n.shiftKey;t&&(!t||i||r)||(this.selectedItem=null,this.search(null,n))},this.options.delay)},search:function(n,t){return(n=n!=null?n:this._value(),this.term=this._value(),n.length<this.options.minLength)?this.close(t):this._trigger("search",t)===!1?void 0:this._search(n)},_search:function(n){this.pending++;this._addClass("ui-autocomplete-loading");this.cancelSearch=!1;this.source({term:n},this._response())},_response:function(){var n=++this.requestIndex;return function(t){n===this.requestIndex&&this.__response(t);this.pending--;this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(n){n&&(n=this._normalize(n));this._trigger("response",null,{content:n});!this.options.disabled&&n&&n.length&&!this.cancelSearch?(this._suggest(n),this._trigger("open"),this._resizeMenu()):this._close()},close:function(n){this.cancelSearch=!0;this._close(n)},_close:function(n){this._off(this.document,"mousedown");this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this.element.attr("aria-expanded","fal
170se").removeAttr("aria-activedescendant"),this.menu.element.find(".ui-menu-item-wrapper[aria-selected]").removeAttr("aria-selected"),this._trigger("close",n))},_change:function(n){this.previous!==this._value()&&this._trigger("change",n,{item:this.selectedItem})},_normalize:function(n){return n.length&&n[0].label&&n[0].value?n:$.map(n,function(n){return typeof n=="string"?{label:n,value:n}:$.extend({},n,{label:n.label||n.value,value:n.value||n.label})})},_suggest:function(n){var t=this.menu.element.empty();this._renderMenu(t,n);this.isNewMenu=!0;this.menu.refresh();t.show();this.element.attr("aria-expanded","true");this._resizeMenu();t.position($.extend({"of":this.element},this.options.position));this.options.autoFocus&&this.menu.next();this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var n=this.menu.element,t=parseFloat(n.attr("data-cols-width"));t||(t=n.width("").outerWidth()-45);n.outerWidth(Math.max(t+45,n.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,t){var i=this;$.each(t,function(t,r){i._renderItemData(n,r)})},_renderItemData:function(n,t){return this._renderItem(n,t).data("ui-autocomplete-item",t)},_renderItem:function(n,t){return $("<li>").append($("<div>").text(t.label)).appendTo(n)},_move:function(n,t){if(!this.menu.element.is(":visible")){this.search(null,t);return}if(this.menu.isFirstItem()&&/^previous/.test(n)||this.menu.isLastItem()&&/^next/.test(n)){this.isMultiLine||this._value(this.term);this.menu.blur();return}this.menu[n](t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(n,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(n,t),t.preventDefault())},_isContentEditable:function(n){if(!n.length)return!1;var t=n.prop("contentEditable");return t==="inherit"?this._isContentEditable(n.parent()):t==="true"}});$.extend($.ui.autocomplete,{escapeRegex:function(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(n,t){var i=new RegExp($.ui.autocomplete.escapeRegex(t),"i");return $.grep(n,function(n){return i.test(n.label||n.value||n)})}});$.widget("ui.autocomplete",$.ui.autocomplete,{options:{messages:{listLabel:"Suggestions",noResults:"No search results.",results:function(n){return n+(n>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(n){var t;(this._superApply(arguments),this.options.disabled||this.cancelSearch)||(t=n&&n.length?this.options.messages.results(n.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html($("<div>").text(t))},100))}});widgetsAutocomplete=$.ui.autocomplete,function(n){ 171/*! 172 * jQuery UI Menu 1.13.2 173 * http://jqueryui.com 174 * 175 * Copyright jQuery Foundation and other contributors 176 * Released under the MIT license. 177 * http://jquery.org/license 178 */ 179var t=n.widget("ui.menu",{version:"1.13.2",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element;this.mouseHandled=!1;this.lastMousePosition={x:null,y:null};this.element.uniqueId().attr({role:this.options.role,tabIndex:0});this._addClass("ui-menu","ui-widget ui-widget-content");this._on({"mousedown .ui-menu-item":function(n){n.preventDefault();this._activateItem(n)},"click .ui-menu-item":function(t){var i=n(t.target),r=n(n.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&r.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&this.active.parents(".ui-menu").length===1&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(n,t){var i=this.active||this._menuItems().first();t||this.focus(n,i)},blur:function(t){this._delay(function(){var i=!n.contains(this.element[0],n.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(t)}
179)},keydown:"_keydown"});this.refresh();this._on(this.document,{click:function(n){this._closeOnDocumentClick(n)&&this.collapseAll(n,!0);this.mouseHandled=!1}})},_activateItem:function(t){if(!this.previousFilter&&(t.clientX!==this.lastMousePosition.x||t.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:t.clientX,y:t.clientY};var r=n(t.target).closest(".ui-menu-item"),i=n(t.currentTarget);r[0]===i[0]&&(i.is(".ui-state-active")||i.children(".ui-menu-item-wrapper").hasClass("ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i)))}},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=t.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show();i.children().each(function(){var t=n(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var i,u,r,f,e=!0;switch(t.keyCode){case n.ui.keyCode.PAGE_UP:this.previousPage(t);break;case n.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case n.ui.keyCode.HOME:this._move("first","first",t);break;case n.ui.keyCode.END:this._move("last","last",t);break;case n.ui.keyCode.UP:this.previous(t);break;case n.ui.keyCode.DOWN:this.next(t);break;case n.ui.keyCode.LEFT:this.collapse(t);break;case n.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case n.ui.keyCode.ENTER:case n.ui.keyCode.SPACE:this._activate(t);break;case n.ui.keyCode.ESCAPE:this.collapse(t);break;default:e=!1;u=this.previousFilter||"";f=!1;r=t.keyCode>=96&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode);clearTimeout(this.filterTimer);r===u?f=!0:r=u+r;i=this._filterMenuItems(r);i=f&&i.index(this.active.next())!==-1?this.active.nextAll(".ui-menu-item"):i;i.length||(r=String.fromCharCode(t.keyCode),i=this._filterMenuItems(r));i.length?(this.focus(t,i),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}e&&t.preventDefault()},_activate:function(n){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(n):this.select(n))},refresh:function(){var u,t,f,r,e,i=this,s=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length);f=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=n(this),r=t.prev(),u=n("<span>").data("ui-menu-submenu-caret",!0);i._addClass(u,"ui-menu-icon","ui-icon "+s);r.attr("aria-haspopup","true").prepend(u);t.attr("aria-labelledby",r.attr("id"))});this._addClass(f,"ui-menu","ui-widget ui-widget-content ui-front");u=o.add(this.element);t=u.find(this.options.items);
179t.not(".ui-menu-item").each(function(){var t=n(this);i._isDivider(t)&&(i._addClass(t,"ui-menu-divider","ui-widget-content"),i._addClass(t,"ui-menu-item"))});r=t.not(".ui-menu-item, .ui-menu-divider");e=r.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()});this._addClass(r,"ui-menu-item")._addClass(e,"ui-menu-item-wrapper");t.filter(".ui-state-disabled").attr("aria-disabled","true");this.active&&!n.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(n,t){if(n==="icons"){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,t.submenu)}this._super(n,t)},_setOptionDisabled:function(n){this._super(n);this.element.attr("aria-disabled",String(n));this._toggleClass(null,"ui-state-disabled",!!n)},focus:function(n,t){var r,i,u;this.blur(n,n&&n.type==="focus");t.hasClass("ui-menu-item-create")||t.css("position")==="sticky"||this._scrollIntoView(t);this.active=t.first();i=this.active.children(".ui-menu-item-wrapper");this._addClass(i,null,"ui-state-active");this._addClass(i,null,"ui-state-focus");this.options.role&&this.element.attr("aria-activedescendant",i.attr("id"));u=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper");this._addClass(u,null,"ui-state-active");n&&n.type==="keydown"?this._close():this.timer=this._delay(function(){this._close()},this.delay);r=t.children(".ui-menu");r.length&&n&&/^mouse/.test(n.type)&&this._startOpening(r);this.activeMenu=t.parent();this._trigger("focus",n,{item:t})},_scrollIntoView:function(t){var o,s,i,f,r,u,e;this._hasScroll()&&(o=parseFloat(n.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(n.css(this.activeMenu[0],"paddingTop"))||0,i=t.offset().top-this.activeMenu.offset().top-o-s,f=this.activeMenu.scrollTop(),r=this.activeMenu.height(),e=this.activeMenu.find(".ui-menu-item-create.ui-menu-item"),e.css("position")==="sticky"&&(r-=e.outerHeight()),u=t.outerHeight(),i<0||u>r?this.activeMenu.scrollTop(f+i):i+u>r&&this.activeMenu.scrollTop(f+i-r+u))},blur:function(n,t){(t||clearTimeout(this.timer),this.active)&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-focus"),this._trigger("blur",n,{item:this.active}),this.active=null)},_startOpening:function(n){(clearTimeout(this.timer),n.attr("aria-hidden")==="true")&&(this.timer=this._delay(function(){this._close();this._open(n)},this.delay))},_open:function(t){var i=n.extend({"of":this.active},this.options.position);clearTimeout(this.timer);this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true");t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer);this.timer=this._delay(function(){var r=i?this.element:n(t&&t.target).closest(this.element.find(".ui-menu"));r.length||(r=this.element);this._close(r);this.blur(t);this._removeClass(r.find(".ui-state-active"),null,"ui-state-active");this.activeMenu=r},i?0:this.delay)},_close:function(n){n||(n=this.active?this.active.parent():this.element);n.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(t){return!n(t.target).closest(".ui-menu").length},_isDivider:function(n){return!/[^\-\u2014\u2013\s]/.test(n.text())},collapse:function(n){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(n,t))},expand:function(n){var t=this.active&&this._menuItems(this.active.children(".ui-menu")).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(n,t)}))},next:function(n){this._move("next","first",n)},previous:function(n){this._move("prev","last",n)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(n){return(n||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(n,t,i){var r;this.active&&(r=n==="first"||n==="last"?this.active[n==="first"?"prevAll":"nextAll"](".ui-menu-item").last():this.active[n+"All"](".ui-menu-item").first());r&&r.length&&this.active||(r=this._menuItems(this.activeMenu)[t]());this.focus(i,r)},nextPage:function(t){var i,u,r;if(!this.active){this.next(t);return}this.isLastItem()||(this._hasScroll()?(u=this.active.offset().top,r=this.element.innerHe
vendor: 11,935 bytes, lines 179-188
179ight(),n.fn.jquery.indexOf("3.2.")===0&&(r+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-u-r<0}),this.focus(t,i)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]()))},previousPage:function(t){var i,u,r;if(!this.active){this.next(t);return}this.isFirstItem()||(this._hasScroll()?(u=this.active.offset().top,r=this.element.innerHeight(),n.fn.jquery.indexOf("3.2.")===0&&(r+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return i=n(this),i.offset().top-u+r>0}),this.focus(t,i)):this.focus(t,this._menuItems(this.activeMenu).first()))},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||n(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0);this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),r=new RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return r.test(String.prototype.trim.call(n(this).children(".ui-menu-item-wrapper").text()))})}})}(jQuery),function(n){ 180/*! 181 * jQuery UI Draggable 1.13.2 182 * http://jqueryui.com 183 * 184 * Copyright jQuery Foundation and other contributors 185 * Released under the MIT license. 186 * http://jquery.org/license 187 */ 188n.widget("ui.draggable",n.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){this.options.helper==="original"&&this._setPositionRelative();this.options.addClasses&&this._addClass("ui-draggable");this._setHandleClassName();this._mouseInit()},_setOption:function(n,t){this._super(n,t);n==="handle"&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=!0;return}this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||n(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),!this.handle)?!1:(this._blurActiveElement(t),this._blockFrames(i.iframeFix===!0?"iframe":i.iframeFix),!0)},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=n(this);return n("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var i=n.ui.safeActiveElement(this.document[0]),r=n(t.target);r.closest(i).length||n.ui.safeBlur(i)},_mouseStart:function(t){var i=this.options;return(this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),n.ui.ddmanager&&(n.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter(function(){return n(this).css("position")==="fixed"}).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1)?(this._clear(),!1):(this._cacheHelperProportions(),n.ui.ddmanager&&!i.dropBehaviour&&n.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),n.ui.ddmanager&&n.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(n){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()};this.offset.click={left:n.pageX-this.offset.left,top:n.pageY-this.offset.top}},_mouseDrag:function(t,i){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!i){var r=this._uiHash();if(this._trigger("drag",t,r)===!1)return this._mouseUp(new n.Event("mouseup",t)),!1;this.position=r.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",n.ui.ddmanager&&n.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var r=this,i=!1;return n.ui.ddmanager&&!this.options.dropBehaviour&&(i=n.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),this.options.revert==="invalid"&&!i||this.options.revert==="valid"&&i||this.options.revert===!0||typeof this.options.revert=="function"&&this.options.revert.call(this.element,i)?n(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){r._trigger("stop",t)!==!1&&r._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),n.ui.ddmanager&&n.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),n.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new n.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return this.options.handle?!!n(t.target).closest(this.element.find(this.options.handle)).length:!0},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var r=this.options,u=typeof r.helper=="function",i=u?n(r.helper.apply(this.element[0],[t])):r.helper==="clone"?this.element.clone().removeAttr("id"):this.element;return i.parents("body").length||i.appendTo(r.appendTo==="parent"?this.element[0].parentNode:r.appendTo),u&&i[0]===this.element[0]&&this._setPositionRelative(),i[0]===this.element[0]||/(fixed|absolute)/.test(i.css("position"))||i.css("position","absolute"),i},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(n){typeof n=="string"&&(n=n.split(" "));Array.isArray(n)&&(n={left:+n[0],top:+n[1]||0});"left"in n&&(this.offset.click.left=n.left+this.margins.left);"right"in n&&(this.offset.click.left=this.helperProportions.width-n.right+this.margins.left);"top"in n&&(this.offset.click.top=n.top+this.margins.top);"bottom"in n&&(this.offset.click.top=this.helperProportions.height-n.bottom+this.margins.top)},_isRootNode:function(n){return/(html|body)/i.test(n.tagName)||n===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),i=this.document[0];return this.cssPosition==="absolute"&&this.scrollParent[0]!==i&&n.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative")return{top:0,left:0};var n=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:n.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:n.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var f,t,i,r=this.options,u=this.document[0];if(this.relativeContainer=null,!r.containment){this.containment=null;return}if(r.containment==="window"){this.containment=[n(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,n(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,n(window).scrollLeft()+n(window).width()-this.helperProportions.width-this.margins.left,n(window).scrollTop()+(n(window).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment==="document"){this.containment=[0,0,n(u).width()-this.helperProportions.width-this.margins.left,(n(u).height()||u.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(r.containment.constructor===Array){this.containment=r.containment;return}(r.containment==="parent"&&(r.containment=this.helper[0].parentNode),t=n(r.containment),i=t[0],i)&&(f=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(f?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)},_convertPositionTo:function(n,t){t||(t=this.position);var i=n==="absolute"?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*i+this.offset.parent.top*i-(this.cssPosition==="fixed"?-this.offset.scroll.top:r?0:this.offset.scroll.top)*i,left:t.left+this.offset.relative.left*i+this.offset.parent.left*i-(this.cssPosition==="fixed"?-this.offset.scroll.left:r?0:this.offset.scroll.left)*i}},_generatePosition:function(n,t){var i,s,u,f,r=this.options,h=this._isRootNode(this.scrollParent[0]),e=n.pageX,o=n.pageY;return h&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(this.relativeContainer?(s=this.relativeContainer.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,n.pageX-this.offset.click.left<i[0]&&(e=i[0]+this.offset.click.left),n.pageY-this.offset.click.top<i[1]&&(o=i[1]+this.offset.click.top),n.pageX-this.offset.click.left>i[2]&&(e=i[2]+this.offset.click.left),n.pageY-this.offset.click.top>i[3]&&(o=i[3]+this.offset.click.top)),r.grid&&(u=r.grid[1]?this.originalPageY+Math.round((o-this.originalPageY)/r.grid[1])*r.grid[1]:this.originalPageY,o=i?u-this.offset.click.top>=i[1]||u-this.offset.click.top>i[3]?u:u-this.offset.click.top>=i[1]?u-r.grid[1]:u+r.grid[1]:u,f=r.grid[0]?this.originalPageX+Math.round((e-this.originalPageX)/r.grid[0])*r.grid[0]:this.originalPageX,e=i?f-this.offset.click.left>=i[0]||f-this.offset.click.left>i[2]?f:f-this.offset.click.left>=i[0]?f-r.grid[0]:f+r.grid[0]:f),r.axis==="y"&&(e=this.originalPageX),r.axis==="x"&&(o=this.originalPageY)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:h?0:this.offset.scroll.top),left
188:e-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging");this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove();this.helper=null;this.cancelHelperRemoval=!1;this.destroyOnClear&&this.destroy()},_trigger:function(t,i,r){return r=r||this._uiHash(),n.ui.plugin.call(this,t,[i,r,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),r.offset=this.positionAbs),n.Widget.prototype._trigger.call(this,t,i,r)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});n.ui.plugin.add("draggable","connectToSortable",{start:function(t,i,r){var u=n.extend({},i,{item:r.element});r.sortables=[];n(r.options.connectToSortable).each(function(){var i=n(this).sortable("instance");i&&!i.options.disabled&&(r.sortables.push(i),i.refreshPositions(),i._trigger("activate",t,u))})},stop:function(t,i,r){var u=n.extend({},i,{item:r.element});r.cancelHelperRemoval=!1;n.each(r.sortables,function(){var n=this;n.isOver?(n.isOver=0,r.cancelHelperRemoval=!0,n.cancelHelperRemoval=!1,n._storedCSS={position:n.placeholder.css("position"),top:n.placeholder.css("top"),left:n.placeholder.css("left")},n._mouseStop(t),n.options.helper=n.options._helper):(n.cancelHelperRemoval=!0,n._trigger("deactivate",t,u))})},drag:function(t,i,r){n.each(r.sortables,function(){var f=!1,u=this;u.positionAbs=r.positionAbs;u.helperProportions=r.helperProportions;u.offset.click=r.offset.click;u._intersectsWith(u.containerCache)&&(f=!0,n.each(r.sortables,function(){return this.positionAbs=r.positionAbs,this.helperProportions=r.helperProportions,this.offset.click=r.offset.click,this!==u&&this._intersectsWith(this.containerCache)&&n.contains(u.element[0],this.element[0])&&(f=!1),f}));f?(u.isOver||(u.isOver=1,r._parent=i.helper.parent(),u.currentItem=i.helper.appendTo(u.element).data("ui-sortable-item",!0),u.options._helper=u.options.helper,u.options.helper=function(){return i.helper[0]},t.target=u.currentItem[0],u._mouseCapture(t,!0),u._mouseStart(t,!0,!0),u.offset.click.top=r.offset.click.top,u.offset.click.left=r.offset.click.left,u.offset.parent.left-=r.offset.parent.left-u.offset.parent.left,u.offset.parent.top-=r.offset.parent.top-u.offset.parent.top,r._trigger("toSortable",t),r.dropped=u.element,n.each(r.sortables,function(){this.refreshPositions()}),r.currentItem=r.element,u.fromOutside=r),u.currentItem&&(u._mouseDrag(t),i.position=u.position)):u.isOver&&(u.isOver=0,u.cancelHelperRemoval=!0,u.options._revert=u.options.revert,u.options.revert=!1,u._trigger("out",t,u._uiHash(u)),u._mouseStop(t,!0),u.options.revert=u.options._revert,u.options.helper=u.options._helper,u.placeholder&&u.placeholder.remove(),i.helper.appendTo(r._parent),r._refreshOffsets(t),i.position=r._generatePosition(t,!0),r._trigger("fromSortable",t),r.dropped=!1,n.each(r.sortables,function(){this.refreshPositions()}))})}});n.ui.plugin.add("draggable","cursor",{start:function(t,i,r){var u=n("body"),f=r.options;u.css("cursor")&&(f._cursor=u.css("cursor"));u.css("cursor",f.cursor)},stop:function(t,i,r){var u=r.options;u._cursor&&n("body").css("cursor",u._cursor)}});n.ui.plugin.add("draggable","opacity",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("opacity")&&(f._opacity=u.css("opacity"));u.css("opacity",f.opacity)},stop:function(t,i,r){var u=r.options;u._opacity&&n(i.helper).css("opacity",u._opacity)}});n.ui.plugin.add("draggable","scroll",{start:function(n,t,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1));i.scrollParentNotHidden[0]!==i.document[0]&&i.scrollParentNotHidden[0].tagName!=="HTML"&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,i,r){var u=r.options,o=!1,e=r.scrollParentNotHidden[0],f=r.document[0];e!==f&&e.tagName!=="HTML"?(u.axis&&u.axis==="x"||(r.overflowOffset.top+e.offsetHeight-t.pageY<u.scrollSensitivity?e.scrollTop=o=e.scrollTop+u.scrollSpeed:t.pageY-r.overflowOffset.top<u.scrollSensitivity&&(e.scrollTop=o=e.scrollTop-u.scrollSpeed)),u.axis&&u.axis==="y"||(r.overflowOffset.left+e.offsetWidth-t.pageX<u.scrollSensitivity?e.scrollLeft=o=e.scrollLeft+u.scrollSpeed:t.pageX-r.overflowOffset.left<u.scrollSensitivity&&(e.scrollLeft=o=e.scrollLeft-u.scrollSpeed))):(u.axis&&u.axis==="x"||(t.pageY-n(f).scrollTop()<u.scrollSensitivity?o=n(f).scrollTop(n(f).scrollTop()-u.scrollSpeed):n(window).height()-(t.pageY-n(f).scrollTop())<u.scrollSensitivity&&(o=n(f).scrollTop(n(f).scrollTop()+u.scrollSpeed))),u.axis&&u.axis==="y"||(t.pageX-n(f).scrollLeft()<u.scrollSensitivity?o=n(f).scrollLeft(n(f).scrollLeft()-u.scrollSpeed):n(window).width()-(t.pageX-n(f).scrollLeft())<u.scrollSensitivity&&(o=n(f).scrollLeft(n(f).scrollLeft()+u.scrollSpeed))));o!==!1&&n.ui.ddmanager&&!u.dropBehaviour&&n.ui.ddmanager.prepareOffsets(r,t)}});n.ui.plugin.add("draggable","snap",{start:function(t,i,r){var u=r.options;r.snapElements=[];n(u.snap.constructor!==String?u.snap.items||":data(ui-draggable)":u.snap).each(function(){var t=n(this),i=t.offset();this!==r.element[0]&&r.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:i.top,left
vendor: 8,424 bytes, lines 188-197
188:i.left})})},drag:function(t,i,r){for(var e,o,s,h,c,a,l,v,w,b=r.options,f=b.snapTolerance,y=i.offset.left,k=y+r.helperProportions.width,p=i.offset.top,d=p+r.helperProportions.height,u=r.snapElements.length-1;u>=0;u--){if(c=r.snapElements[u].left-r.margins.left,a=c+r.snapElements[u].width,l=r.snapElements[u].top-r.margins.top,v=l+r.snapElements[u].height,k<c-f||y>a+f||d<l-f||p>v+f||!n.contains(r.snapElements[u].item.ownerDocument,r.snapElements[u].item)){r.snapElements[u].snapping&&r.options.snap.release&&r.options.snap.release.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=!1;continue}b.snapMode!=="inner"&&(e=Math.abs(l-d)<=f,o=Math.abs(v-p)<=f,s=Math.abs(c-k)<=f,h=Math.abs(a-y)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l-r.helperProportions.height,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c-r.helperProportions.width}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a}).left));w=e||o||s||h;b.snapMode!=="outer"&&(e=Math.abs(l-p)<=f,o=Math.abs(v-d)<=f,s=Math.abs(c-y)<=f,h=Math.abs(a-k)<=f,e&&(i.position.top=r._convertPositionTo("relative",{top:l,left:0}).top),o&&(i.position.top=r._convertPositionTo("relative",{top:v-r.helperProportions.height,left:0}).top),s&&(i.position.left=r._convertPositionTo("relative",{top:0,left:c}).left),h&&(i.position.left=r._convertPositionTo("relative",{top:0,left:a-r.helperProportions.width}).left));!r.snapElements[u].snapping&&(e||o||s||h||w)&&r.options.snap.snap&&r.options.snap.snap.call(r.element,t,n.extend(r._uiHash(),{snapItem:r.snapElements[u].item}));r.snapElements[u].snapping=e||o||s||h||w}}});n.ui.plugin.add("draggable","stack",{start:function(t,i,r){var f,e=r.options,u=n.makeArray(n(e.stack)).sort(function(t,i){return(parseInt(n(t).css("zIndex"),10)||0)-(parseInt(n(i).css("zIndex"),10)||0)});u.length&&(f=parseInt(n(u[0]).css("zIndex"),10)||0,n(u).each(function(t){n(this).css("zIndex",f+t)}),this.css("zIndex",f+u.length))}});n.ui.plugin.add("draggable","zIndex",{start:function(t,i,r){var u=n(i.helper),f=r.options;u.css("zIndex")&&(f._zIndex=u.css("zIndex"));u.css("zIndex",f.zIndex)},stop:function(t,i,r){var u=r.options;u._zIndex&&n(i.helper).css("zIndex",u._zIndex)}});var t=n.ui.draggable}(jQuery),function(n){ 189/*! 190 * jQuery UI Droppable 1.13.2 191 * http://jqueryui.com 192 * 193 * Copyright jQuery Foundation and other contributors 194 * Released under the MIT license. 195 * http://jquery.org/license 196 */ 197n.widget("ui.droppable",{version:"1.13.2",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var n,t=this.options,i=t.accept;this.isover=!1;this.isout=!0;this.accept=typeof i=="function"?i:function(n){return n.is(i)};this.proportions=function(){if(arguments.length)n=arguments[0];else return n?n:n={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight}};this._addToManager(t.scope);t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(t){n.ui.ddmanager.droppables[t]=n.ui.ddmanager.droppables[t]||[];n.ui.ddmanager.droppables[t].push(this)},_splice:function(n){for(var t=0;t<n.length;t++)n[t]===this&&n.splice(t,1)},_destroy:function(){var t=n.ui.ddmanager.droppables[this.options.scope];this._splice(t)},_setOption:function(t,i){if(t==="accept")this.accept=typeof i=="function"?i:function(n){return n.is(i)};else if(t==="scope"){var r=n.ui.ddmanager.droppables[this.options.scope];this._splice(r);this._addToManager(i)}this._super(t,i)},_activate:function(t){var i=n.ui.ddmanager.current;this._addActiveClass();i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=n.ui.ddmanager.current;this._removeActiveClass();i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._addHoverClass(),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=n.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this._removeHoverClass(),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var r=i||n.ui.ddmanager.current,u=!1;return!r||(r.currentItem||r.element)[0]===this.element[0]?!1:(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var i=n(this).droppable("instance");if(i.options.greedy&&!i.options.disabled&&i.options.scope===r.options.scope&&i.accept.call(i.element[0],r.currentItem||r.element)&&n.ui.intersect(r,n.extend(i,{offset:i.element.offset()}),i.options.tolerance,t))return u=!0,!1}),u)?!1:this.accept.call(this.element[0],r.currentItem||r.element)?(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(r)),this.element):!1},ui:function(n){return{draggable:n.currentItem||n.element,helper:n.helper,position:n.position,offset:n.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});n.ui.intersect=function(){function n(n,t,i){return n>=t&&n<t+i}return function(t,i,r,u){if(!i.offset)return!1;var o=(t.positionAbs||t.position.absolute).left+t.margins.left,s=(t.positionAbs||t.position.absolute).top+t.margins.top,h=o+t.helperProportions.width,c=s+t.helperProportions.height,f=i.offset.left,e=i.offset.top,l=f+i.proportions().width,a=e+i.proportions().height;switch(r){case"fit":return f<=o&&h<=l&&e<=s&&c<=a;case"intersect":return f<o+t.helperProportions.width/2&&h-t.helperProportions.width/2<l&&e<s+t.helperProportions.height/2&&c-t.helperProportions.height/2<a;case"pointer":return n(u.pageY,e,i.proportions().height)&&n(u.pageX,f,i.proportions().width);case"touch":return(s>=e&&s<=a||c>=e&&c<=a||s<e&&c>a)&&(o>=f&&o<=l||h>=f&&h<=l||o<f&&h>l);default:return!1}}}();n.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var r,f,u=n.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,e=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();n:for(r=0;r<u.length;r++)if(!u[r].options.disabled&&(!t||u[r].accept.call(u[r].element[0],t.currentItem||t.element))){for(f=0;f<e.length;f++)if(e[f]===u[r].element[0]){u[r].proportions().height=0;continue n}(u[r].visible=u[r].element.css("display")!=="none",u[r].visible)&&(o==="mousedown"&&u[r]._activate.call(u[r],i),u[r].offset=u[r].element.offset(),u[r].proportions({width:u[r].element[0].offsetWidth,height:u[r].element[0].offsetHeight}))}},drop:function(t,i){var r=!1;return n.each((n.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&n.ui.intersect(t,this,this.options.tolerance,i)&&(r=this._drop.call(this,i)||r),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),r},dragStart:function(t,i){t.element.parentsUntil("body").on("scroll.droppable",function(){t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&n.ui.ddmanager.prepareOffsets(t,i);n.each(n.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var r,e,f,o=n.ui.intersect(t,this,this.options.tolerance,i),u=!o&&this.isover?"isout":o&&!this.isover?"isover":null;u&&(this.options.greedy&&(e=this.options.scope,f=this.element.parents(":data(ui-droppable)").filter(function(){return n(this).droppable("instance").options.scope===e}),f.length&&(r=n(f[0]).droppable("instance"),r.greedyChild=u==="isover")),r&&u==="isover"&&(r.isover=!1,r.isout=!0,r._out.call(r,i)),this[u]=!0,this[u==="isout"?"isover":"isout"]=!1,this[u==="isover"?"_over":"_out"].call(this,i),r&&u==="isout"&&(r.isout=!1,r.isover=!0,r._over.call(r,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").off("scroll.droppable");t.options.refreshPositions||n.ui.ddmanager.prepareOffsets(t,i)}};n.uiBackCompat!==!1&&n.widget("ui.droppable",n.ui.droppable,{options:{hoverClass:!1,activeClass:!1}
197,_addActiveClass:function(){this._super();this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super();this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super();this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super();this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});var t=n.ui.droppable}(jQuery);!function(n,t){"function"==typeof define&&define.amd?define([],t(n)):"object"==typeof exports?module.exports=t(n):n.iziToast=t(n)}("undefined"!=typeof global?global:window||this.window||this.global,function(){"use strict";var t={},n="iziToast",f=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),v=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),y="undefined"!=typeof InstallTrigger,e="ontouchstart"in document.documentElement,a=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],o=568,s={},h,l;t.children={};h={id:null,"class":"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,closeOnClick:!1,displayMode:0,position:"bottomRight",target:"",targetFirst:!0,timeout:5e3,rtl:!1,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof CustomEvent)&&(l=function(n,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(n,t.bubbles,t.cancelable,t.detail),i},l.prototype=window.Event.prototype,window.CustomEvent=l);var i=function(n,t,i){var u,r,f;if("[object Object]"===Object.prototype.toString.call(n))for(u in n)Object.prototype.hasOwnProperty.call(n,u)&&t.call(i,n[u],u,n);else if(n)for(r=0,f=n.length;f>r;r++)t.call(i,n[r],r,n)},r=function(n,t){var r={};return i(n,function(t,i){r[i]=n[i]}),i(t,function(n,i){r[i]=t[i]}),r},c=function(n){var i=document.createDocumentFragment(),t=document.createElement("div");for(t.innerHTML=n;t.firstChild;)i.appendChild(t.firstChild);return i},p=function(n){var t=btoa(encodeURIComponent(n));return t.replace(/=/g,"")},w=function(n){return"#"==n.substring(0,1)||"rgb"==n.substring(0,3)||"hsl"==n.substring(0,3)},b=function(n){try{return btoa(atob(n))==n}catch(t){return!1}},u=function(){return{move:function(t,i,u,f){var e,o=.3,s=180;0!==f&&(t.classList.add(n+"-dragged"),t.style.transform="translateX("+f+"px)",f>0?(e=(s-f)/s,o>e&&i.hide(r(u,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag")):(e=(s+f)/s,o>e&&i.hide(r(u,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag")),t.style.opacity=e,o>e&&((v||y)&&(t.style.left=f+"px"),t.parentNode.style.opacity=o,this.stopMoving(t,null)))},startMoving:function(n,t,i,r){var s,f,o;r=r||window.event;s=e?r.touches[0].clientX:r.clientX;f=n.style.transform.replace("px)","");f=f.replace("translateX(","");o=s-f;i.transitionIn&&n.classList.remove(i.transitionIn);i.transitionInMobile&&n.classList.remove(i.transitionInMobile);n.style.transition="";e?document.ontouchmove=function(r){r.preventDefault();r=r||window.event;var f=r.touches[0].clientX,e=f-o;u.move(n,t,i,e)}:document.onmousemove=function(r){r.preventDefault();r=r||window.event;var f=r.clientX,e=f-o;u.move(n,t,i,e)}},stopMoving:function(t){e?document.ontouchmove=function(){}:document.onmousemove=function(){};t.style.opacity="";t.style.transform="";t.classList.contains(n+"-dragged")&&(t.classList.remove(n+"-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout(function(){t.style.transition=""},400))}}}();return t.setSetting=function(n,i,r){t.children[n][i]=r},t.getSetting=function(n,i){return t.children[n][i]},t.destroy=function(){i(document.querySelectorAll("."+n+"-overlay"),function(n){n.remove()});i(document.querySelectorAll("."+n+"-wrapper"),function(n){n.remove()});i(document.querySelectorAll("."+n),function(n){n.remove()});this.children={};document.removeEventListener(n+"-opened",{},!1);document.removeEventListener(n+"-opening",{},!1);document.removeEventListener(n+"-closing",{},!1);document.removeEventListener(n+"-closed",{},!1);document.removeEventListener("keyup",{},!1);s={}},t.settings=function(n){t.destroy();s=n;
197h=r(h,n||{})},i({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},function(n,i){t[i]=function(t){var i=r(s,t||{});i=r(n,i||{});this.show(i)}}),t.progress=function(t,i,u){var o=this,s=i.getAttribute("data-iziToast-ref"),f=r(this.children[s],t||{}),e=i.querySelector("."+n+"-progressbar div");return{start:function(){"undefined"==typeof f.time.REMAINING&&(i.classList.remove(n+"-reseted"),null!==e&&(e.style.transition="width "+f.timeout+"ms "+f.progressBarEasing,e.style.width="0%"),f.time.START=(new Date).getTime(),f.time.END=f.time.START+f.timeout,f.time.TIMER=setTimeout(function(){clearTimeout(f.time.TIMER);i.classList.contains(n+"-closing")||(o.hide(f,i,"timeout"),"function"==typeof u&&u.apply(o))},f.timeout),o.setSetting(s,"time",f.time))},pause:function(){if("undefined"!=typeof f.time.START&&!i.classList.contains(n+"-paused")&&!i.classList.contains(n+"-reseted")){if(i.classList.add(n+"-paused"),f.time.REMAINING=f.time.END-(new Date).getTime(),clearTimeout(f.time.TIMER),o.setSetting(s,"time",f.time),null!==e){var t=window.getComputedStyle(e),r=t.getPropertyValue("width");e.style.transition="none";e.style.width=r}"function"==typeof u&&setTimeout(function(){u.apply(o)},10)}},resume:function(){"undefined"!=typeof f.time.REMAINING?(i.classList.remove(n+"-paused"),null!==e&&(e.style.transition="width "+f.time.REMAINING+"ms "+f.progressBarEasing,e.style.width="0%"),f.time.END=(new Date).getTime()+f.time.REMAINING,f.time.TIMER=setTimeout(function(){clearTimeout(f.time.TIMER);i.classList.contains(n+"-closing")||(o.hide(f,i,"timeout"),"function"==typeof u&&u.apply(o))},f.time.REMAINING),o.setSetting(s,"time",f.time)):this.start()},reset:function(){clearTimeout(f.time.TIMER);delete f.time.REMAINING;o.setSetting(s,"time",f.time);i.classList.add(n+"-reseted");i.classList.remove(n+"-paused");null!==e&&(e.style.transition="none",e.style.width="100%");"function"==typeof u&&setTimeout(function(){u.apply(o)},10)}}},t.hide=function(t,i,u){var s,e,h,c;"object"!=typeof i&&(i=document.querySelector(i));s=this;e=r(this.children[i.getAttribute("data-iziToast-ref")],t||{});e.closedBy=u||null;delete e.time.REMAINING;i.classList.add(n+"-closing"),function(){var i=document.querySelector("."+n+"-overlay"),t,r;null!==i&&(t=i.getAttribute("data-iziToast-ref"),t=t.split(","),r=t.indexOf(String(e.ref)),-1!==r&&t.splice(r,1),i.setAttribute("data-iziToast-ref",t.join()),0===t.length&&(i.classList.remove("fadeIn"),i.classList.add("fadeOut"),setTimeout(function(){i.remove()},700)))}();e.transitionIn&&i.classList.remove(e.transitionIn);e.transitionInMobile&&i.classList.remove(e.transitionInMobile);f||window.innerWidth<=o?e.transitionOutMobile&&i.classList.add(e.transitionOutMobile):e.transitionOut&&i.classList.add(e.transitionOut);h=i.parentNode.offsetHeight;i.parentNode.style.height=h+"px";i.style.pointerEvents="none";(!f||window.innerWidth>o)&&(i.parentNode.style.transitionDelay="0.2s");try{c=new CustomEvent(n+"-closing",{detail:e,bubbles:!0,cancelable:!0});document.dispatchEvent(c)}catch(l){console.warn(l)}setTimeout(function(){i.parentNode.style.height="0px";i.parentNode.style.overflow="";setTimeout(function(){delete s.children[e.ref];i.parentNode.remove();try{var t=new CustomEvent(n+"-closed",{detail:e,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(r){console.warn(r)}"undefined"!=typeof e.onClosed&&e.onClosed.apply(null,[e,i,u])},1e3)},200);"undefined"!=typeof e.onClosing&&e.onClosing.apply(null,[e,i,u])},t.show=function(l){var k=this,v=r(s,l||{}),y,d,g;if(v=r(h,v),v.time={},null===v.id&&(v.id=p(v.title+v.message+v.color)),1===v.displayMode||"once"==v.displayMode)try{if(document.querySelectorAll("."+n+"#"+v.id).length>0)return!1}catch(tt){console.warn("["+n+"] Could not find an element with this selector: #"+v.id+". Try to set an valid id.")}if(2===v.displayMode||"replace"==v.displayMode)try{i(document.querySelectorAll("."+n+"#"+v.id),function(n){k.hide(v,n,"replaced")})}catch(tt){console.warn("["+n+"] Could not find an element with this selector: #"+v.id+". Try to set an valid id.")}v.ref=(new Date).getTime()+Math.floor(1e7*Math.random()+1);t.children[v.ref]=v;y={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:v.iconUrl?document.createElement("img"):document.createElement("i"),wrapper:null};y.toast.setAttribute("data-iziToast-ref",v.ref);y.toast.appendChild(y.toastBody);y.toastCapsule.appendChild(y.toast),function(){if(y.toast.classList.add(n),y.toast.classList.add(n+"-opening"),y.toastCapsule.classList.add(n+"-capsule"),y.toastBody.classList.add(n+"-body"),y.toastTexts.classList.add(n+"-texts"),f||window.innerWidth<=o?v.transitionInMobile&&y.toast.classList.add(v.transitionInMobile):v.transitionIn&&y.toast.classList.add(v.transitionIn),v["class"]){var t=v["class"].split(" ");i(t,function(n){y.toast.classList.add(n)})}v.id&&(y.toast.id=v.id);v.rtl&&(y.toast.classList.add(n+"-rtl"),y.toast.setAttribute("dir","rtl"));v.layout>1&&y.toast.classList.add(n+"-layout"+v.layout);v.balloon&&y.toast.classList.add(n+"-balloon");v.maxWidth&&(y.toast.style.maxWidth=isNaN(v.maxWidth)?v.maxWidth:v.maxWidth+"px");""===v.theme&&"light"===v.theme||y.toast.classList.add(n+"-theme-"+v.theme);v.color&&(w(v.color)?y.toast.style.background=v.color:y.toast.classList.add(n+"-color-"+v.color));v.backgroundColor&&(y.toast.style.background=v.backgroundColor,v.balloon&&(y.toast.style.borderColor=v.backgroundColor))}(),function(){v.image&&(y.cover.classList.add(n+"-cover"),y.cover.style.width=v.imageWidth+"px",y.cover.style.backgroundImage=b(v.image.replace(/ /g,""))?"url(data:image/png;base64,"+v.image.replace(/ /g,"")+")":"url("+v.image+")",v.rtl?y.toastBody.style.marginRight=v.imageWidth+10+"px":y.toastBody.style.marginLeft=v.imageWidth+10+"px",y.toast.appendChild(y.cover))}(),function(){v.close?(y.buttonClose=document.createElement("button"),y.buttonClose.type="button",y.buttonClose.classList.add(n+"-close"),y.buttonClose.addEventListener("click",function(n){n.target;k.hide(v,y.toast,"button")}),y.toast.appendChild(y.buttonClose)):v.rtl?y.toast.style.paddingLeft="18px":y.toast.style.paddingRight="18px"}(),function(){v.progressBar&&(y.progressBar=document.createElement("div"),y.progressBarDiv=document.createElement("div"),y.progressBar.classList.add(n+"-progressbar"),y.progressBarDiv.style.background=v.progressBarColor,y.progressBar.appendChild(y.progressBarDiv),y.toast.appendChild(y.progressBar));v.timeout&&(v.pauseOnHover&&!v.resetOnHover&&(y.toast.addEventListener("mouseenter",function(){k.progress(v,y.toast).pause()}),y.toast.addEventListener("mouseleave",function(){k.progress(v,y.toast).resume()})),v.resetOnHover&&(y.toast.addEventListener("mouseenter",function(){k.progress(v,y.toast).reset()}),y.toast.addEventListener("mouseleave",function(){k.progress(v,y.toast).start()})))}(),function(){v.iconUrl?(y.icon.setAttribute("class",n+"-icon"),y.icon.setAttribute("src",v.iconUrl)):v.icon&&(y.icon.setAttribute("class",n+"-icon "+v.icon),v.iconText&&y.icon.appendChild(document.createTextNode(v.iconText)),v.iconColor&&(y.icon.style.color=v.iconColor));(v.icon||v.iconUrl)&&(v.rtl?y.toastBody.style.paddingRight="33px":y.toastBody.style.paddingLeft="33px",y.toastBody.appendChild(y.icon))}(),function(){v.title.length>0&&(y.strong=document.createElement("strong"),y.strong.classList.add(n+"-title"),y.strong.appendChild(c(v.title)),y.toastTexts.appendChild(y.strong),v.titleColor&&(y.strong.style.color=v.titleColor),v.titleSize&&(y.strong.style.fontSize=isNaN(v.titleSize)?v.titleSize:v.titleSize+"px"),v.titleLineHeight&&(y.strong.style.lineHeight=isNaN(v.titleSize)?v.titleLineHeight:v.titleLineHeight+"px"));v.message.length>0&&(y.p=document.createElement("p"),y.p.classList.add(n+"-message"),y.p.appendChild(c(v.message)),y.toastTexts.appendChild(y.p),v.messageColor&&(y.p.style.color=v.messageColor),v.messageSize&&(y.p.style.fontSize=isNaN(v.titleSize)?v.messageSize:v.messageSize+"px"),v.messageLineHeight&&(y.p.style.lineHeight=isNaN(v.titleSize)?v.messageLineHeight:v.messageLineHeight+"px"));v.title.length>0&&v.message.length>0&&(v.rtl?y.strong.style.marginLeft="10px":2===v.layout||v.rtl||(y.strong.style.marginRight="10px"))}();y.toastBody.appendChild(y.toastTexts);!function(){v.inputs.length>0&&(y.inputs.classList.add(n+"-inputs"),i(v.inputs,function(t,i){y.inputs.appendChild(c(t[0]));d=y.inputs.childNodes;d[i].classList.add(n+"-inputs-child");t[3]&&setTimeout(function(){d[i].focus()},300);d[i].addEventListener(t[1],function(n){var i=t[2];return i(k,y.toast,this,n)})}),y.toastBody.appendChild(y.inputs))}(),function(){v.buttons.length>0&&(y.buttons.classList.add(n+"-buttons"),i(v.buttons,function(t,i){y.buttons.appendChild(c(t[0]));var r=y.buttons.childNodes;r[i].classList.add(n+"-buttons-child");t[2]&&setTimeout(function(){r[i].focus()},300);r[i].addEventListener("click",function(n){n.preventDefault();var i=t[1];return i(k,y.toast,this,n,d)})}));y.toastBody.appendChild(y.buttons)}();v.message.length>
1970&&(v.inputs.length>0||v.buttons.length>0)&&(y.p.style.marginBottom="0");(v.inputs.length>0||v.buttons.length>0)&&(v.rtl?y.toastTexts.style.marginLeft="10px":y.toastTexts.style.marginRight="10px",v.inputs.length>0&&v.buttons.length>0&&(v.rtl?y.inputs.style.marginLeft="8px":y.inputs.style.marginRight="8px")),function(){y.toastCapsule.style.visibility="hidden";setTimeout(function(){var r=y.toast.offsetHeight,i=y.toast.currentStyle||window.getComputedStyle(y.toast),t=i.marginTop,n;t=t.split("px");t=parseInt(t[0]);n=i.marginBottom;n=n.split("px");n=parseInt(n[0]);y.toastCapsule.style.visibility="";y.toastCapsule.style.height=r+n+t+"px";setTimeout(function(){y.toastCapsule.style.height="auto";v.target&&(y.toastCapsule.style.overflow="visible")},500);v.timeout&&k.progress(v,y.toast).start()},100)}(),function(){var t=v.position;if(v.target)y.wrapper=document.querySelector(v.target),y.wrapper.classList.add(n+"-target"),v.targetFirst?y.wrapper.insertBefore(y.toastCapsule,y.wrapper.firstChild):y.wrapper.appendChild(y.toastCapsule);else{if(-1==a.indexOf(v.position))return void console.warn("["+n+"] Incorrect position.\nIt can be › "+a);t=f||window.innerWidth<=o?"bottomLeft"==v.position||"bottomRight"==v.position||"bottomCenter"==v.position?n+"-wrapper-bottomCenter":"topLeft"==v.position||"topRight"==v.position||"topCenter"==v.position?n+"-wrapper-topCenter":n+"-wrapper-center":n+"-wrapper-"+t;y.wrapper=document.querySelector("."+n+"-wrapper."+t);y.wrapper||(y.wrapper=document.createElement("div"),y.wrapper.classList.add(n+"-wrapper"),y.wrapper.classList.add(t),document.body.appendChild(y.wrapper));"topLeft"==v.position||"topCenter"==v.position||"topRight"==v.position?y.wrapper.insertBefore(y.toastCapsule,y.wrapper.firstChild):y.wrapper.appendChild(y.toastCapsule)}isNaN(v.zindex)?console.warn("["+n+"] Invalid zIndex."):y.wrapper.style.zIndex=v.zindex}(),function(){v.overlay&&(null!==document.querySelector("."+n+"-overlay.fadeIn")?(y.overlay=document.querySelector("."+n+"-overlay"),y.overlay.setAttribute("data-iziToast-ref",y.overlay.getAttribute("data-iziToast-ref")+","+v.ref),isNaN(v.zindex)||null===v.zindex||(y.overlay.style.zIndex=v.zindex-1)):(y.overlay.classList.add(n+"-overlay"),y.overlay.classList.add("fadeIn"),y.overlay.style.background=v.overlayColor,y.overlay.setAttribute("data-iziToast-ref",v.ref),isNaN(v.zindex)||null===v.zindex||(y.overlay.style.zIndex=v.zindex-1),document.querySelector("body").appendChild(y.overlay)),v.overlayClose?(y.overlay.removeEventListener("click",{}),y.overlay.addEventListener("click",function(){k.hide(v,y.toast,"overlay")})):y.overlay.removeEventListener("click",{}))}(),function(){var r,t;v.animateInside&&(y.toast.classList.add(n+"-animateInside"),r=[200,100,300],"bounceInLeft"!=v.transitionIn&&"bounceInRight"!=v.transitionIn||(r=[400,200,400]),v.title.length>0&&setTimeout(function(){y.strong.classList.add("slideIn")},r[0]),v.message.length>0&&setTimeout(function(){y.p.classList.add("slideIn")},r[1]),(v.icon||v.iconUrl)&&setTimeout(function(){y.icon.classList.add("revealIn")},r[2]),t=150,v.buttons.length>0&&y.buttons&&setTimeout(function(){i(y.buttons.childNodes,function(n){setTimeout(function(){n.classList.add("revealIn")},t);t+=150})},v.inputs.length>0?150:0),v.inputs.length>0&&y.inputs&&(t=150,i(y.inputs.childNodes,function(n){setTimeout(function(){n.classList.add("revealIn")},t);t+=150})))}();v.onOpening.apply(null,[v,y.toast]);try{g=new CustomEvent(n+"-opening",{detail:v,bubbles:!0,cancelable:!0});document.dispatchEvent(g)}catch(nt){console.warn(nt)}setTimeout(function(){y.toast.classList.remove(n+"-opening");y.toast.classList.add(n+"-opened");try{var t=new CustomEvent(n+"-opened",{detail:v,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(i){console.warn(i)}v.onOpened.apply(null,[v,y.toast])},1e3);v.drag&&(e?(y.toast.addEventListener("touchstart",function(n){u.startMoving(this,k,v,n)},!1),y.toast.addEventListener("touchend",function(n){u.stopMoving(this,n)},!1)):(y.toast.addEventListener("mousedown",function(n){n.preventDefault();u.startMoving(this,k,v,n)},!1),y.toast.addEventListener("mouseup",function(n){n.preventDefault();u.stopMoving(this,n)},!1)));v.closeOnEscape&&document.addEventListener("keyup",function(n){n=n||window.event;27==n.keyCode&&k.hide(v,y.toast,"esc")});v.closeOnClick&&y.toast.addEventListener("click",function(){k.hide(v,y.toast,"toast")});k.toast=y.toast},t}); 198/*! jQuery Migrate v3.0.1 | (c) jQuery Foundation and other contributors | jquery.org/license */ 199void 0===jQuery.migrateMute&&(jQuery.migrateMute=!0),function(n){"function"==typeof define&&define.amd?define(["jquery"],window,n):"object"==typeof module&&module.exports?module.exports=n(require("jquery"),window):n(jQuery,window)}(function(n,t){"use strict";function i(i){var r=t.console;e[i]||(e[i]=!0,n.migrateWarnings.push(i),r&&r.warn&&!n.migrateMute&&(r.warn("JQMIGRATE: "+i),n.migrateTrace&&r.trace&&r.trace()))}function f(n,t,r,u){Object.defineProperty(n,t,{configurable:!0,enumerable:!0,get:function(){return i(u),r},set:function(n){i(u);r=n}})}function r(n,t,r,u){n[t]=function(){return i(u),r.apply(this,arguments)}}var e,s,l,h,u,a,v,y,p,w,c,b;n.migrateVersion="3.0.1",function(){}();e={};n.migrateWarnings=[];void 0===n.migrateTrace&&(n.migrateTrace=!0);n.migrateReset=function(){e={};n.migrateWarnings.length=0};"BackCompat"===t.document.compatMode&&i("jQuery is not compatible with Quirks Mode");var k=n.fn.init,d=n.isNumeric,o=n.find,g=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/,nt=/\[(\s*[-\w]+\s*)([~|^$*]?=)\s*([-\w#]*?#[-\w#]*)\s*\]/g;n.fn.init=function(n){var t=Array.prototype.slice.call(arguments);return"string"==typeof n&&"#"===n&&(i("jQuery( '#' ) is not a valid selector"),t[0]=[]),k.apply(this,t)};n.fn.init.prototype=n.fn;n.find=function(n){var r=Array.prototype.slice.call(arguments);if("string"==typeof n&&g.test(n))try{t.document.querySelector(n)}catch(u){n=n.replace(nt,function(n,t,i,r){return"["+t+i+'"'+r+'"]'});try{t.document.querySelector(n);i("Attribute selector with '#' must be quoted: "+r[0]);r[0]=n}catch(n){i("Attribute selector with '#' was not fixed: "+r[0])}}return o.apply(this,r)};for(s in o)Object.prototype.hasOwnProperty.call(o,s)&&(n.find[s]=o[s]);n.fn.size=function(){return i("jQuery.fn.size() is deprecated and removed; use the .length property"),this.length};n.parseJSON=function(){return i("jQuery.parseJSON is deprecated; use JSON.parse"),JSON.parse.apply(null,arguments)};n.isNumeric=function(t){var u=d(t),r=function(t){var i=t&&t.toString();return!n.isArray(t)&&i-parseFloat(i)+1>=0}(t);return u!==r&&i("jQuery.isNumeric() should not be called on constructed objects"),r};r(n,"holdReady",n.holdReady,"jQuery.holdReady is deprecated");r(n,"unique",n.uniqueSort,"jQuery.unique is deprecated; use jQuery.uniqueSort");f(n.expr,"filters",n.expr.pseudos,"jQuery.expr.filters is deprecated; use jQuery.expr.pseudos");f(n.expr,":",n.expr.pseudos,"jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos");
199l=n.ajax;n.ajax=function(){var n=l.apply(this,arguments);return n.promise&&(r(n,"success",n.done,"jQXHR.success is deprecated and removed"),r(n,"error",n.fail,"jQXHR.error is deprecated and removed"),r(n,"complete",n.always,"jQXHR.complete is deprecated and removed")),n};var tt=n.fn.removeAttr,it=n.fn.toggleClass,rt=/\S+/g;n.fn.removeAttr=function(t){var r=this;return n.each(t.match(rt),function(t,u){n.expr.match.bool.test(u)&&(i("jQuery.fn.removeAttr no longer sets boolean properties: "+u),r.prop(u,!1))}),tt.apply(this,arguments)};n.fn.toggleClass=function(t){return void 0!==t&&"boolean"!=typeof t?it.apply(this,arguments):(i("jQuery.fn.toggleClass( boolean ) is deprecated"),this.each(function(){var i=this.getAttribute&&this.getAttribute("class")||"";i&&n.data(this,"__className__",i);this.setAttribute&&this.setAttribute("class",i||!1===t?"":n.data(this,"__className__")||"")}))};h=!1;n.swap&&n.each(["height","width","reliableMarginRight"],function(t,i){var r=n.cssHooks[i]&&n.cssHooks[i].get;r&&(n.cssHooks[i].get=function(){var n;return h=!0,n=r.apply(this,arguments),h=!1,n})});n.swap=function(n,t,r,u){var e,f,o={};h||i("jQuery.swap() is undocumented and deprecated");for(f in t)o[f]=n.style[f],n.style[f]=t[f];e=r.apply(n,u||[]);for(f in t)n.style[f]=o[f];return e};u=n.data;n.data=function(t,r,f){var o,s,e;if(r&&"object"==typeof r&&2===arguments.length){o=n.hasData(t)&&u.call(this,t);s={};for(e in r)e!==n.camelCase(e)?(i("jQuery.data() always sets/gets camelCased names: "+e),o[e]=r[e]):s[e]=r[e];return u.call(this,t,s),r}return r&&"string"==typeof r&&r!==n.camelCase(r)&&(o=n.hasData(t)&&u.call(this,t))&&r in o?(i("jQuery.data() always sets/gets camelCased names: "+r),arguments.length>2&&(o[r]=f),o[r]):u.apply(this,arguments)};a=n.Tween.prototype.run;v=function(n){return n};n.Tween.prototype.run=function(){n.easing[this.easing].length>1&&(i("'jQuery.easing."+this.easing.toString()+"' should use only one argument"),n.easing[this.easing]=v);a.apply(this,arguments)};n.fx.interval=n.fx.interval||13;t.requestAnimationFrame&&f(n.fx,"interval",n.fx.interval,"jQuery.fx.interval is deprecated");var ut=n.fn.load,ft=n.event.add,et=n.event.fix;return n.event.props=[],n.event.fixHooks={},f(n.event.props,"concat",n.event.props.concat,"jQuery.event.props.concat() is deprecated and removed"),n.event.fix=function(t){var f,e=t.type,u=this.fixHooks[e],r=n.event.props;if(r.length)for(i("jQuery.event.props are deprecated and removed: "+r.join());r.length;)n.event.addProp(r.pop());if(u&&!u._migrated_&&(u._migrated_=!0,i("jQuery.event.fixHooks are deprecated and removed: "+e),(r=u.props)&&r.length))for(;r.length;)n.event.addProp(r.pop());return f=et.call(this,t),u&&u.filter?u.filter(f,t):f},n.event.add=function(n,r){return n===t&&"load"===r&&"complete"===t.document.readyState&&i("jQuery(window).on('load'...) called after load event occurred"),ft.apply(this,arguments)},n.each(["load","unload","error"],function(t,r){n.fn[r]=function(){var n=Array.prototype.slice.call(arguments,0);return"load"===r&&"string"==typeof n[0]?ut.apply(this,n):(i("jQuery.fn."+r+"() is deprecated"),n.splice(0,0,r),arguments.length?this.on.apply(this,n):(this.triggerHandler.apply(this,n),this))}}),n.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,r){n.fn[r]=function(n,t){return i("jQuery.fn."+r+"() event shorthand is deprecated"),arguments.length>0?this.on(r,null,n,t):this.trigger(r)}}),n(function(){n(t.document).triggerHandler("ready")}),n.event.special.ready={setup:function(){this===t.document&&i("'ready' event is deprecated")}},n.fn.extend({bind:function(n,t,r){return i("jQuery.fn.bind() is deprecated"),this.on(n,null,t,r)},unbind:function(n,t){return i("jQuery.fn.unbind() is deprecated"),this.off(n,null,t)},delegate:function(n,t,r,u){return i("jQuery.fn.delegate() is deprecated"),this.on(t,n,r,u)},undelegate:function(n,t,r){return i("jQuery.fn.undelegate() is deprecated"),1===arguments.length?this.off(n,"**"):this.off(t,n||"**",r)},hover:function(n,t){return i("jQuery.fn.hover() is deprecated"),this.on("mouseenter",n).on("mouseleave",t||n)}}),y=n.fn.offset,n.fn.offset=function(){var u,r=this[0],f={top:0,left:0};return r&&r.nodeType?(u=(r.ownerDocument||t.document).documentElement,n.contains(u,r)?y.apply(this,arguments):(i("jQuery.fn.offset() requires an element connected to a document"),f)):(i("jQuery.fn.offset() requires a valid DOM element"),f)},p=n.param,n.param=function(t,r){var u=n.ajaxSettings&&n.ajaxSettings.traditional;return void 0===r&&u&&(i("jQuery.param() no longer uses jQuery.ajaxSettings.traditional"),r=u),p.call(this,t,r)},w=n.fn.andSelf||n.fn.addBack,n.fn.andSelf=function(){return i("jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()"),w.apply(this,arguments)},c=n.Deferred,b=[["resolve","done",n.Callbacks("once memory"),n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory"),n.Callbacks("memory")]],n.Deferred=function(t){var r=c(),u=r.promise();return r.pipe=u.pipe=function(){var t=arguments;return i("deferred.pipe() is deprecated"),n.Deferred(function(i){n.each(b,function(f,e){var o=n.isFunction(t[f])&&t[f];r[e[1]](function(){var t=o&&o.apply(this,arguments);t&&n.isFunction(t.promise)?t.promise().done(i.resolve).fail(i.reject).progress(i.notify):i[e[0]+"With"](this===u?i.promise():this,o?[t]:arguments)})});t=null}).promise()},t&&t.call(r,r),r},n.Deferred.exceptionHook=c.exceptionHook,n}); 200/*! http://mths.be/placeholder v2.0.7 by @mathias 201* 202* An event on the window unload was deleted for Orange logic version 203*/ 204(function(n,t,i){function l(n){var t={},r=/^jQuery\d+$/;return i.each(n.attributes,function(n,i){i.specified&&!r.test(i.name)&&(t[i.name]=i.value)}),t}function f(n,r){var f=this,u=i(f);if(f.value==u.attr("placeholder")&&u.hasClass("placeholder"))if(u.data("placeholder-password")){if(u=u.hide().next().show().attr("id",u.removeAttr("id").data("placeholder-id")),n===!0)return u[0].value=r;u.focus()}else f.value="",u.removeClass("placeholder"),f==t.activeElement&&f.select()}function s(){var t,r=this,n=i(r),e=n,u=this.id;if(r.value==""){if(r.type=="password"){if(!n.data("placeholder-textinput")){try{t=n.clone().attr({type:"text"})}catch(o){t=i("<input>").attr(i.extend(l(this),{type:"text"}))}t.removeAttr("name").data({"placeholder-password":!0,"placeholder-id":u}).bind("focus.placeholder",f);n.data({"placeholder-textinput":t,"placeholder-id":u}).before(t)}n=n.removeAttr("id").hide().prev().attr("id",u).show()}n.addClass("placeholder");n[0].value=n.attr("placeholder")}else n.removeClass("placeholder")}var u="placeholder"in t.createElement("input"),e="placeholder"in t.createElement("textarea"),h=i.fn,c=i.valHooks,o,r;u&&e?(r=h.placeholder=function(){return this}
204,r.input=r.textarea=!0):(r=h.placeholder=function(){var n=this;return n.filter((u?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":f,"blur.placeholder":s}).data("placeholder-enabled",!0).trigger("blur.placeholder"),n},r.input=u,r.textarea=e,o={get:function(n){var t=i(n);return t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":n.value},set:function(n,r){var u=i(n);return u.data("placeholder-enabled")?(r==""?(n.value=r,n!=t.activeElement&&s.call(n)):u.hasClass("placeholder")?f.call(n,!0,r)||(n.value=r):n.value=r,u):n.value=r}},u||(c.input=o),e||(c.textarea=o),i(function(){i(t).delegate("form","submit.placeholder",function(){var n=i(".placeholder",this).each(f);setTimeout(function(){n.each(s)},10)})}))})(this,document,jQuery);!function(n){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;t.store=n()}}(function(){return function n(t,i,r){function u(f,o){var h,c,s;if(!i[f]){if(!t[f]){if(h="function"==typeof require&&require,!o&&h)return h(f,!0);if(e)return e(f,!0);c=new Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}s=i[f]={exports:{}};t[f][0].call(s.exports,function(n){var i=t[f][1][n];return u(i?i:n)},s,s.exports,n,t,i,r)}return i[f].exports}for(var e="function"==typeof require&&require,f=0;f<r.length;f++)u(r[f]);return u}({1:[function(n,t){"use strict";var i=n("../src/store-engine"),r=[n("../storages/localStorage"),n("../storages/sessionStorage"),n("../storages/cookieStorage"),n("../storages/memoryStorage")];t.exports=i.createStore(r,[])},{"../src/store-engine":2,"../storages/cookieStorage":4,"../storages/localStorage":5,"../storages/memoryStorage":6,"../storages/sessionStorage":7}],2:[function(n,t){"use strict";function s(){var n="undefined"==typeof console?null:console,t;n&&(t=n.warn?n.warn:n.log,t.apply(n,arguments))}function u(n,t,i){var p,u;i||(i="");n&&!f(n)&&(n=[n]);t&&!f(t)&&(t=[t]);var y=i?"__storejs_"+i+"_":"",w=i?new RegExp("^"+y):null;if(!/^[a-zA-Z0-9_\-]*$/.test(i))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");return p={_namespacePrefix:y,_namespaceRegexp:w,_testStorage:function(n){var t,i;try{return t="__storejs__test__",n.write(t,t),i=n.read(t)===t,n.remove(t),i}catch(r){return!1}},_assignPluginFnProp:function(n,t){var i=this[t];this[t]=function(){function f(){if(i)return r(arguments,function(n,i){t[i]=n}),i.apply(u,t)}var t=h(arguments,0),u=this,e=[f].concat(t);return n.apply(u,e)}},_serialize:function(n){return JSON.stringify(n)},_deserialize:function(n,t){if(!n)return t;var i="";try{i=JSON.parse(n)}catch(r){i=n}return void 0!==i?i:t},_addStorage:function(n){this.enabled||this._testStorage(n)&&(this.storage=n,this.enabled=!0)},_addPlugin:function(n){var i=this,u,t;if(f(n))return void r(n,function(n){i._addPlugin(n)});if(u=c(this.plugins,function(t){return n===t}),!u){if(this.plugins.push(n),!e(n))throw new Error("Plugins must be function values that return objects");if(t=n.call(this),!v(t))throw new Error("Plugins must return an object of function properties");r(t,function(t,r){if(!e(t))throw new Error("Bad plugin property: "+r+" from plugin "+n.name+". Plugins should only return functions.");i._assignPluginFnProp(t,r)})}},addStorage:function(n){s("store.addStorage(storage) is deprecated. Use createStore([storages])");this._addStorage(n)}},u=a(p,o,{plugins:[]}),u.raw={},r(u,function(n,t){e(n)&&(u.raw[t]=l(u,n))}),r(n,function(n){u._addStorage(n)}),r(t,function(n){u._addPlugin(n)}),u}var i=n("./util"),h=i.slice,c=i.pluck,r=i.each,l=i.bind,a=i.create,f=i.isList,e=i.isFunction,v=i.isObject,o;t.exports={createStore:u};o={version:"2.0.12",enabled:!1,get:function(n,t){var i=this.storage.read(this._namespacePrefix+n);return this._deserialize(i,t)},set:function(n,t){return void 0===t?this.remove(n):(this.storage.write(this._namespacePrefix+n,this._serialize(t)),t)},remove:function(n){this.storage.remove(this._namespacePrefix+n)},each:function(n){var t=this;this.storage.each(function(i,r){n.call(t,t._deserialize(i),(r||"").replace(t._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(n){return this._namespacePrefix=="__storejs_"+n+"_"},createStore:function(){return u.apply(this,arguments)},addPlugin:function(n){this._addPlugin(n)},namespace:function(n){return u(this.storage,this.plugins,n)}}},{"./util":3}],3:[function(n,t){(function(n){"use strict";function o(){return Object.assign?Object.assign:function(n){for(var t=1;t<arguments.length;t++)e(Object(arguments[t]),function(t,i){n[i]=t});return n}}function s(){if(Object.create)return function(n){var t=i(arguments,1
204);return f.apply(this,[Object.create(n)].concat(t))};var n=function(){};return function(t){var r=i(arguments,1);return n.prototype=t,f.apply(this,[new n].concat(r))}}function h(){return String.prototype.trim?function(n){return String.prototype.trim.call(n)}:function(n){return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function c(n,t){return function(){return t.apply(n,Array.prototype.slice.call(arguments,0))}}function i(n,t){return Array.prototype.slice.call(n,t||0)}function e(n,t){r(n,function(n,i){return t(n,i),!1})}function l(n,t){var i=u(n)?[]:{};return r(n,function(n,r){return i[r]=t(n,r),!1}),i}function r(n,t){var i,r;if(u(n)){for(i=0;i<n.length;i++)if(t(n[i],i))return n[i]}else for(r in n)if(n.hasOwnProperty(r)&&t(n[r],r))return n[r]}function u(n){return null!=n&&"function"!=typeof n&&"number"==typeof n.length}function a(n){return n&&"[object Function]"==={}.toString.call(n)}function v(n){return n&&"[object Object]"==={}.toString.call(n)}var f=o(),y=s(),p=h(),w="undefined"!=typeof window?window:n;t.exports={assign:f,create:y,trim:p,bind:c,slice:i,each:e,map:l,pluck:r,isList:u,isFunction:a,isObject:v,Global:w}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],4:[function(n,t){"use strict";function o(n){if(!n||!f(n))return null;var t="(?:^|.*;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(i.cookie.replace(new RegExp(t),"$1"))}function r(n){for(var r=i.cookie.split(/; ?/g),t=r.length-1;t>=0;t--)if(l(r[t])){var u=r[t].split("="),f=unescape(u[0]),e=unescape(u[1]);n(e,f)}}function s(n,t){n&&(i.cookie=escape(n)+"="+escape(t)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function u(n){n&&f(n)&&(i.cookie=escape(n)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function h(){r(function(n,t){u(t)})}function f(n){return new RegExp("(?:^|;\\s*)"+escape(n).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(i.cookie)}var e=n("../src/util"),c=e.Global,l=e.trim,i;t.exports={name:"cookieStorage",read:o,write:s,each:r,remove:u,clearAll:h};i=c.document},{"../src/util":3}],5:[function(n,t){"use strict";function i(){return h.localStorage}function r(n){return i().getItem(n)}function u(n,t){return i().setItem(n,t)}function f(n){for(var u,t=i().length-1;t>=0;t--)u=i().key(t),n(r(u),u)}function e(n){return i().removeItem(n)}function o(){return i().clear()}var s=n("../src/util"),h=s.Global;t.exports={name:"localStorage",read:r,write:u,each:f,remove:e,clearAll:o}},{"../src/util":3}],6:[function(n,t){"use strict";function r(n){return i[n]}function u(n,t){i[n]=t}function f(n){for(var t in i)i.hasOwnProperty(t)&&n(i[t],t)}function e(n){delete i[n]}function o(){i={}}t.exports={name:"memoryStorage",read:r,write:u,each:f,remove:e,clearAll:o};var i={}},{}],7:[function(n,t){"use strict";function i(){return h.sessionStorage}function r(n){return i().getItem(n)}function u(n,t){return i().setItem(n,t)}function f(n){for(var u,t=i().length-1;t>=0;t--)u=i().key(t),n(r(u),u)}function e(n){return i().removeItem(n)}function o(){return i().clear()}var s=n("../src/util"),h=s.Global;t.exports={name:"sessionStorage",read:r,write:u,each:f,remove:e,clearAll:o}},{"../src/util":3}]},{},[1])(1)});ImageAnnotator.Load=function(n,t,i){var r=ImageAnnotator.IsInCombinedWidget;switch(Param.ImageAnnotatorVersion){case"V1":Utils.LoadScript(["Include/MediaCollaboration/ImageAnnotatorV1.js"],function(){ImageAnnotator=ImageAnnotatorV1;ImageAnnotator.Load=function(n){n()};n()},t,!0);break;case"V2":case"Marker":Utils.LoadScript(["Include/MediaCollaboration/MediaAnnotatorCommentUtils.js"],function(){Utils.LoadScript(["Include/MediaCollaboration/ImageAnnotatorV1.js","Include/MediaCollaboration/ImageMarkerAnnotatorV1.js","Include/MediaCollaboration/ImageMarkerAnnotatorV2.js","Include/MediaCollaboration/MarkerJS2.js"],function(){MarkerJS2.EnsureMarkerJS3().then(function(){Utils.LoadScript(MarkerJS2.ScriptsToLoad,function(){function u(n,t,i){ImageAnnotator=r(i)?ImageMarkerAnnotatorV2:ImageMarkerAnnotatorV1;ImageAnnotator.Load=u;n()}u(n,t,i)},t,!0)})},t,!0)},t,!0);break;default:Matrix3.LogError("Unknown ImageAnnotator version: "+Param.ImageAnnotatorVersion,!1)}};ImageAnnotator.IsInCombinedWidget=function(n){var t,i;
204return typeof n!="string"?!1:n.indexOf("InCombinedWidget")>=0?!0:typeof $E!="function"?!1:(t=$E(n),t.length===0)?!1:(i=t.attr("data-vf"),i&&i.indexOf("InCombinedWidget")>=0||t.closest("[data-vf*='InCombinedWidget']").length>0)};VideoAnnotator.Load=function(n,t,i){var r=VideoAnnotator.IsInCombinedWidget;switch(Param.VideoAnnotatorVersion){case"V2":Utils.LoadScript(["Include/MediaCollaboration/VideoAnnotatorV2.js"],function(){VideoAnnotator=VideoAnnotatorV2;VideoAnnotator.Load=function(n){n()};n()},t,!0);break;case"V3":Utils.LoadScript(["Include/MediaCollaboration/MediaAnnotatorCommentUtils.js"],function(){Utils.LoadScript(["Include/MediaCollaboration/VideoMarkerAnnotatorV1.js","Include/MediaCollaboration/VideoMarkerAnnotatorV2.js","Include/MediaCollaboration/MarkerJS2.js"],function(){MarkerJS2.EnsureMarkerJS3().then(function(){Utils.LoadScript(MarkerJS2.ScriptsToLoad,function(){function u(n,t,i){VideoAnnotator=r(i)?VideoMarkerAnnotatorV2:VideoMarkerAnnotatorV1;VideoAnnotator.Load=u;n()}u(n,t,i)},t,!0)})},t,!0)},t,!0);break;default:Matrix3.LogError("Unknown VideoAnnotator version: "+Param.VideoAnnotatorVersion,!1)}};VideoAnnotator.IsInCombinedWidget=function(n){var t,i;return typeof n!="string"?!1:n.indexOf("InCombinedWidget")>=0?!0:typeof $E!="function"?!1:(t=$E(n),t.length===0)?!1:(i=t.attr("data-vf"),i&&i.indexOf("InCombinedWidget")>=0||t.closest("[data-vf*='InCombinedWidget']").length>0)};CookieConsentTools._canAccessThirdPartyCookieCache=!0;CookieConsentTools.RemoveRejectedDataFromStoragesAsync=async function(n,t,i,r){n||(RemoveAndPreventRejectedDataInStorage(localStorage,t,"LocalStorage"),RemoveAndPreventRejectedDataInStorage(sessionStorage,i,"SessionStorage"),await RemoveAndPreventRejectedDataInIndexedDBAsync(r))};const RemoveAndPreventRejectedDataInIndexedDBAsync=async function(n){const i=indexedDB.open;indexedDB.open=function(t,r){if(IsAcceptedKey(t,n))return i.call(indexedDB,t,r);else{console.warn(`Blocked opening rejected IndexedDB database: ${t}`);const n={};return setTimeout(()=>{if(n.onerror)n.onerror({target:{error:new DOMException("Blocked rejected IndexedDB access","BlockedError")}})},0),n}};const r=await indexedDB.databases();for(const i of r)if(i.name&&!IsAcceptedKey(i.name,n)){var t=indexedDB.deleteDatabase(i.name);t.onerror=function(n){console.error(`Error deleting IndexedDB database ${i.name}:`,n)};t.onsuccess=function(){console.warn(`Deleted rejected IndexedDB database: ${i.name}`)}}},RemoveAndPreventRejectedDataInStorage=function(n,t,i){Object.keys(n).forEach(r=>{IsAcceptedKey(r,t)||(n.removeItem(r),console.warn(`Removed rejected ${i} key: ${r}`))});const r=n.setItem;n.setItem=function(u,f){IsAcceptedKey(u,t)?r.call(n,u,f):console.warn(`Blocked setting rejected ${i} key: ${u}`)}},IsAcceptedKey=function(n,t){if(t.has(n))return!0;for(const i of t)if(i.includes("*")){const t=i.replace(/\*/g,".*"),r=new RegExp(`^${t}$`);if(r.test(n))return!0}return!1};CookieConsentTools.DetectThirdPartyCookieAccess=async function(){const n=typeof document!="undefined"&&"hasStorageAccess"in document&&"requestStorageAccess"in document;if(!n){console.warn("[CookieConsent] Storage Access API not available. Using synchronous fallback.");return}try{const n=await document.hasStorageAccess();CookieConsentTools._canAccessThirdPartyCookieCache=n}catch(t){console.error("[CookieConsent] Storage Access API check failed:",t)}};DragDropMgr={moDraggablesInstances:[],moDroppablesInstances:[],msLastDroppableID:"",masRulers:[],moCurrentHRuler:null,moCurrentVRuler:null,msCurrentDroppableOverItemID:null,moDDObjects:{},moCachedRects:{},miCacheRectsExpirationTime:null,DraggableSubscribe:function(n,t){this.moDraggablesInstances[n]=t},DraggableUnsubscribe:function(n){delete this.moDraggablesInstances[n]},DroppableSubscribe:function(n,t){this.moDroppablesInstances[n]=t},DroppableUnsubscribe:function(n){delete this.moDroppablesInstances[n]},GetGroupsClass:function(n){var t=[],i,r;if(Utils.IsUndefined(n)||!Utils.IsObject(n)||n.length==0)return t.push(DragDropMgr.Const.GROUP_CLASS_ALL),t;for(i=0,r=n.length;i<r;i++)t.push(DragDropMgr.Const.GROUP_CLASS_PREFIX+n[i]);return t},IsDrag:function(){return this.mbIsDrag},SetDrag:function(n){this.mbIsDrag=n},RefreshCache:function(){this.RefreshParams()},RefreshParams:function(){DragDropMgr.msLastDroppableID=""},RefreshNode:function(){DragDropMgr.RefreshParams()},AddRuler:function(n,t,i){var r,u;t.toLowerCase()=="horizontal"?(r=Utils.GetY(i)+parseInt(n),this.masRulers.push([r,t,i])):(u=Utils.GetX(i)+parseInt(n),this.masRulers.push([u,t,i]))},GetCurrentVRuler:function(){return this.moCurrentVRuler},GetCurrentHRuler:function(){return this.moCurrentHRuler},ClearRulers:function(){this.masRulers=[]},CleanCurrentHRuler:function(){this.moCurrentHRuler&&($RemoveClass(this.moCurrentHRuler[2],DragDropMgr.Const.CLASS_HRULER_OVER),this.moCurrentHRuler=null)},CleanCurrentVRuler:function(){this.moCurrentVRuler&&($RemoveClass(this.moCurrentVRuler[2],DragDropMgr.Const.CLASS_VRULER_OVER),this.moCurrentVRuler=null)}
204,GetRulers:function(){return this.masRulers},UpdateHRuler:function(n){var t=!1;return this.moCurrentHRuler!=n&&(this.moCurrentHRuler&&$RemoveClass(this.moCurrentHRuler[2],DragDropMgr.Const.CLASS_HRULER_OVER),$AddClass(n[2],DragDropMgr.Const.CLASS_HRULER_OVER),t=!0,this.moCurrentHRuler=n),t},UpdateVRuler:function(n){var t=!1;return this.moCurrentVRuler!=n&&(this.moCurrentVRuler&&$RemoveClass(this.moCurrentVRuler[2],DragDropMgr.Const.CLASS_VRULER_OVER),$AddClass(n[2],DragDropMgr.Const.CLASS_VRULER_OVER),t=!0,this.moCurrentVRuler=n),t},AddDDObject:function(n){this.moDDObjects[n]=n},GetDDObject:function(n){return this.moDDObjects[n]},GetHelper:function(n){return n?$("img",this.oDragItem).first().clone():$('<div class="'+this.GetHelperClass()+'"><\/div>')},GetHelperClass:function(){return DragDropMgr.Const.FEEDBACK_CLASS+" "+DragDropMgr.Const.FEEDBACK_INVALID_CLASS},ResetHelper:function(n){n.html("");n.addClass(this.GetHelperClass())},GetHelperWithBox:function(){var n=$('<div class="'+DragDropMgr.Const.CLASS_DRAG_DROP_HELPER+'"><\/div>');return n.html(this.GetHelperInnerHtmlWithBox())},GetHelperInnerHtmlWithBox:function(){return'<span id="'+DragDropMgr.Const.ID_HELPER_TEXT+'" class="'+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE+'"><\/span><span class="'+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE+" "+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_MULTIPLE+'"><\/span><span class="'+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_COUNT+'"><\/span>'},ResetHelperWithBox:function(n){n.html(this.GetHelperInnerHtmlWithBox());n.addClass(DragDropMgr.Const.CLASS_DRAG_DROP_HELPER)},CleanUpClassOfHelperWithoutBox:function(n){n.removeClass(DragDropMgr.Const.FEEDBACK_INVALID_CLASS);n.removeClass(DragDropMgr.Const.FEEDBACK_CLASS)},UpdateHelperBox:function(n,t,i,r){var u=r;Utils.IsStringFilled(u)||(u=t.data(DragDropMgr.Const.RESEQUENCE_HELPER_TEXT));this.UpdateHelperBoxText(n,u);i>1?($("."+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_COUNT,n).text(i),$("."+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_MULTIPLE,n).removeClass(DragDropMgr.Const.CLASS_INVISIBLE),$("."+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_COUNT,n).removeClass(DragDropMgr.Const.CLASS_INVISIBLE)):($("."+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_MULTIPLE,n).addClass(DragDropMgr.Const.CLASS_INVISIBLE),$("."+DragDropMgr.Const.CLASS_DRAG_DROP_MESSAGE_COUNT,n).addClass(DragDropMgr.Const.CLASS_INVISIBLE))},UpdateHelperBoxText:function(n,t){t?($("#"+DragDropMgr.Const.ID_HELPER_TEXT,n).text(t),n.removeClass(DragDropMgr.Const.CLASS_INVISIBLE)):n.addClass(DragDropMgr.Const.CLASS_INVISIBLE)},RemoveInsertClass:function(n){var t=$E(DragDropReorderMgr.msLastIndicatorID);t.length>0&&(t.removeClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS),t.removeClass(DragDropReorderMgr.Const.INSERT_MIDDLE_CLASS),t.removeClass(DragDropReorderMgr.Const.INSERT_AFTER_CLASS),n&&t.find("."+MultipleSelectionMgr.Const.REORDER_PNL_CLASS).first().removeClass(DragDropReorderMgr.Const.INSERT_MIDDLE_CLASS))},GetVFormElementByChildId:function(n){return $E(Utils.GetVFormId(n))},GetPositionWithScroll:function(n,t,i){return PositionItem.IsInPopup(n)?[t,i]:[t+Utils.Form1().scrollLeft,i+Utils.Form1().scrollTop]},IsPointInElementListViewport:function(n,t,i){for(var f,u=n.map(function(n){return DragDropMgr.GetVFormElementByChildId(n)[0]}),e=Date.now(),r=0;r<u.length;r++)if(f=u[r],this.IsPointInElementViewport(f,t,i,e))return!0;return!1}
204,GetElementViewport:function(n,t){t===undefined&&(t=Date.now());this.miCacheRectsExpirationTime&&t>this.miCacheRectsExpirationTime&&(this.moCachedRects={},this.miCacheRectsExpirationTime=null);var i=this.moCachedRects[n.id];return i||(i=n.getBoundingClientRect(),this.moCachedRects[n.id]=i),this.miCacheRectsExpirationTime||(this.miCacheRectsExpirationTime=t+DragDropMgr.Const.CACHE_RECTS_DURATION),i},IsPointInElementViewport:function(n,t,i,r){var u=this.GetElementViewport(n,r);return t>=u.left&&t<=u.right&&i>=u.top&&i<=u.bottom},IsInDraggingItemZone:function(n,t){return DragDropMgr.moDraggablesInstances[n].masMultiSelectionGroup.some(function(n){return Utils.GetVFormId(n)===Utils.GetVFormId(t)})},AddHighlightOverItemClass:function(n){var t=DragDropMgr.GetVFormElementByChildId(n);t.addClass(DragDropMgr.Const.CLASS_HIGHLIGHT_OVER_ITEM)}};DragDropMgr.Const={MGR_NAME:"DragDropMgr",GROUP_CLASS_PREFIX:"DDMGroup_",GROUP_CLASS_ALL:"DDMGroupALL",SUFFIX_PROXY:"_Proxy",FEEDBACK_CLASS:"DragDrop_Feedback",FEEDBACK_INVALID_CLASS:"DragDrop_FeedbackInvalid",PROXY_CLASS:"DragDrop_Proxy",DRAGELEMENT_ID:"DragDrop_DragElement",ISDRAG_CLASS:"DragDrop_IsDrag",KEY_NEXT_VFORM_ID:"NextVFormID",KEY_PREVIOUS_VFORM_ID:"PreviousVFormID",INSERT_AFTER_CLASS:"InsertAfter",INSERT_PREVIOUS_CLASS:"InsertBefore",CONTROL_IMAGEPANEL:"ImagePanel",CLASS_OVERTARGET:"OverTarget",CLASS_OVERTARGET_REORDER:"OverTarget_Reorder",CLASS_DRAG_DROP_HORIZONTAL:"DragDrop_Feedback_H",CLASS_DRAG_DROP_VERTICAL:"DragDrop_Feedback_V",CLASS_DRAG_DROP_HELPER:"DragDropHelper",CLASS_DRAG_DROP_MESSAGE:"DragDropMessage",CLASS_DRAG_DROP_MESSAGE_MULTIPLE:"Multiple",CLASS_DRAG_DROP_MESSAGE_COUNT:"Count",CLASS_INVISIBLE:"InvisibleC",CLASS_HIGHLIGHT_OVER_ITEM:"HighlightOverItem",PROXY_IMAGE_SIZE:100,PROXY_MODE_IMAGE:"Image",CLASS_PROXY:"Proxy",ID_PROXY_MESSAGE:"DragProxyMessage",ID_HELPER_TEXT:"DragHelperText",REORDER_MODE_VERTICAL:"vertical",REORDER_MODE_HIERARCHY:"hierarchy",REORDER_MODE_CUSTOM_INDEX:"customIndex",CLASS_DRAG_DROP_NO_MESSAGE:"DragDropNoMessage",RESEQUENCE_HELPER_TEXT:"resequence-helper-text",ATTR_CUSTOM_INDEX:"custom-index",CACHE_RECTS_DURATION:500};DragDropReorderMgr={moDroppableVForm:null,msLastInsertID:"",msLastIndicatorID:"",mbInsertBefore:!0,mbInsertAfter:!1,miLastX:0,miLastY:0,GetFirstAndLastItemInSelection:function(n,t){var i=DragDropMgr.moDraggablesInstances[n].masMultiSelectionGroup,f=i.map(DragDropMgr.GetVFormElementByChildId),r,u;return i.length>1?(r=f[0][0],u=f[i.length-1][0]):(r=t[0],u=t[0]),[r,u]},UpdateInsertIndicator:function(n,t,i){var a,r,o,f,e,u;if(this.msLastInsertID&&(a=n,r=$PI(this.msLastInsertID),r)){o=PositionItem.getAbsoluteXY(r,!0);f=DragDropMgr.GetPositionWithScroll(r,n.pageX,n.pageY);PositionItem.IsInPopup(this)==!1&&(f[0]+=Utils.Form1().scrollLeft,f[1]+=Utils.Form1().scrollTop);this.mbInsertBefore=t?f[1]<o[1]+r.GetHeight()/2:f[0]<o[0]+r.GetWidth()/2;var s=i[0].id,v=DragDropMgr.GetVFormElementByChildId(s),c=this.GetFirstAndLastItemInSelection(s,v),y=c[0],p=c[1],w=this.moDroppableVForm[0].previousElementSibling,b=this.moDroppableVForm[0].nextElementSibling,k=!this.mbInsertBefore&&y===b,d=this.mbInsertBefore&&p===w,g=DragDropMgr.IsInDraggingItemZone(s,this.msLastInsertID),nt=g||k||d;if(!nt&&(t&&this.moDroppableVForm.addClass(DragDropMgr.Const.REORDER_MODE_VERTICAL),this.mbInsertBefore?(this.moDroppableVForm.removeClass(DragDropReorderMgr.Const.INSERT_AFTER_CLASS),this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS)):(this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_AFTER_CLASS),this.moDroppableVForm.removeClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS)),this.msLastIndicatorID=this.moDroppableVForm[0].id,e=$(this).closest(".ABS.PanelTable"),e&&e[0]&&(u=ControlMgr.GetInstance().GetControl(e[0].id),u&&u.mbExpandable&&u.mbCanBeReorder))){var l=this.moDroppableVForm[0]?u.moLevelDict[this.moDroppableVForm[0].getAttribute("data-rid")]:0,h=this.moDroppableVForm[0]&&this.moDroppableVForm[0].nextElementSibling?u.moLevelDict[this.moDroppableVForm[0].nextElementSibling.getAttribute("data-rid")]:0,tt=l<h?h:this.mbInsertAfter?l:h;this.moDroppableVForm[0].style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_OFFSET,tt*28+"px")}}},UpdateInsertIndicatorWithNewRelation:function(n,t,i,r,u){var c=!1,h=u[0].id,l=DragDropMgr.GetVFormElementByChildId(h),a=l.parent()[0],e,s,f,o;if(DragDropMgr.RemoveInsertClass(i),c=this.msLastInsertID&&DragDropMgr.msCurrentDroppableOverItemID!==a.id?!0:this.UpdateDroppableItemForParentElement(a,t,n.clientX,n.clientY,h)&&!i,c&&(e=$PI(this.msLastInsertID),e)){s=PositionItem.getAbsoluteXY(e,!0);f=DragDropMgr.GetPositionWithScroll(e,n.pageX,n.pageY);PositionItem.IsInPopup(this)==!1&&(f[0]+=Utils.Form1().scrollLeft,f[1]+=Utils.Form1().scrollTop);t?(o=e.GetHeight()/4,this.mbInsertBefore=f[1]<s[1]+o,this.mbInsertAfter=!this.mbInsertBefore&&f[1]>
204s[1]+3*o):(o=e.GetWidth()/4,this.mbInsertBefore=f[0]<s[0]+o,this.mbInsertAfter=!this.mbInsertBefore&&f[0]>s[0]+3*o);var v=this.GetFirstAndLastItemInSelection(h,l),w=v[0],b=v[1],y=this.moDroppableVForm[0].previousElementSibling,p=this.moDroppableVForm[0].nextElementSibling,k=this.mbInsertAfter&&w===p,d=this.mbInsertBefore&&b===y,g=DragDropMgr.IsInDraggingItemZone(u[0].id,this.msLastInsertID),nt=g||k||d;nt?this.ResetDragDropObjects():this.UpdateDroppableAttributes(t,i,r,y,p,h)}},UpdateDroppableItemForParentElement:function(n,t,i,r,u){var f=!1,e=NearestItemFinder.GetNearestChildId(n,i,r);return e&&!DragDropMgr.IsInDraggingItemZone(u,e)&&(DragDropReorderMgr.UpdateDragDropObjects(e),f=!0),f||this.ResetDragDropObjects(),f},UpdateDroppableAttributes:function(n,t,i,r,u,f){var l=this.moDroppableVForm[0].getBoundingClientRect(),e=0,a,v,y,p,c,w,b,k,d,g,o,nt,tt,s,h;if(this.msLastIndicatorID=this.moDroppableVForm[0].id,DragDropMgr.moDroppablesInstances[this.msLastInsertID].mbIsReorder=!0,this.mbInsertBefore?r&&r.classList.contains(DragDropReorderMgr.Const.CLASS_VFORM)?(a=r.getBoundingClientRect(),e=n?(l.top-a.bottom)/2:(l.left-a.right)/2,!n&&this.moDroppableVForm[0].y>r.y?(this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS),this.msLastIndicatorID=this.moDroppableVForm[0].id):($(r).addClass(DragDropReorderMgr.Const.INSERT_AFTER_CLASS),this.msLastIndicatorID=r.id)):this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS):this.mbInsertAfter?(this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_AFTER_CLASS),u&&(v=u.getBoundingClientRect(),e=n?(v.top-l.bottom)/2:(v.left-l.right)/2)):t?(y=!1,i&&(p=this.moDroppableVForm[0].getElementsByClassName(MultipleSelectionMgr.Const.REORDER_PNL_CLASS),c=null,p.length>0&&(c=p[0].getAttribute(DragDropMgr.Const.ATTR_CUSTOM_INDEX)),w=document.getElementById(f),b=w?w.getAttribute(DragDropMgr.Const.ATTR_CUSTOM_INDEX):null,c&&b&&(k=c.split("."),d=b.split("."),d.length===k.length+1&&d.slice(0,k.length).join(".")===c&&(y=!0))),y?this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_PREVIOUS_CLASS):(this.moDroppableVForm.find("."+MultipleSelectionMgr.Const.REORDER_PNL_CLASS).first().addClass(DragDropReorderMgr.Const.INSERT_MIDDLE_CLASS),DragDropMgr.moDroppablesInstances[this.msLastInsertID].mbIsReorder=!1)):(this.moDroppableVForm.addClass(DragDropReorderMgr.Const.INSERT_MIDDLE_CLASS),DragDropMgr.moDroppablesInstances[this.msLastInsertID].mbIsReorder=!1),g=this.moDroppableVForm.parent().data("r"),e!=0&&g&&Math.abs(e)<g.FloatSpacing?(e=e+DragDropReorderMgr.Const.WIDTH_INDICATOR_BORDER/2,e=parseFloat(e.toFixed(1))):e=0,o=$PI(this.msLastIndicatorID),n){if($(o).addClass(DragDropMgr.Const.REORDER_MODE_VERTICAL),nt=!1,tt=$(o).closest(".ABS.PanelTable"),tt.length>0&&(s=DragDropReorderMgr.mbInsertBefore?r:u?u.previousSibling:null,h=EditableTable.GetTable(tt[0].id),h&&h.mbExpandable&&h.mbCanBeReorder)){nt=!0;this.mbInsertBefore?o.style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_TOP,e+2+"px"):o.style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_TOP,e+"px");var rt=s&&s.getAttribute("data-rid")?h.moLevelDict[s.getAttribute("data-rid")]:0,it=s&&s.nextElementSibling&&s.nextElementSibling.getAttribute("data-rid")?h.moLevelDict[s.nextElementSibling.getAttribute("data-rid")]:0,ut=rt<it?it:this.mbInsertAfter?rt:it;o.style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_OFFSET,ut*28+"px")}nt||o.style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_TOP,e+"px")}else o.style.setProperty(DragDropReorderMgr.Const.ATTRIBUTE_INDICATOR_LEFT,e+"px")},UpdateDragDropObjects:function(n){this.msLastInsertID=n;this.moDroppableVForm=DragDropMgr.GetVFormElementByChildId(n)},ResetDragDropObjects:function(){this.msLastInsertID=null;this.moDroppableVForm=null}};DragDropReorderMgr.Const={INSERT_AFTER_CLASS:"InsertAfter",INSERT_PREVIOUS_CLASS:"InsertBefore",INSERT_MIDDLE_CLASS:"InsertMiddle",CLASS_DRAG_DROP_HORIZONTAL:"DragDrop_Feedback_H",CLASS_DRAG_DROP_VERTICAL:"DragDrop_Feedback_V",CLASS_VFORM:"VF",ATTRIBUTE_INDICATOR_TOP:"--indicator-top",ATTRIBUTE_INDICATOR_OFFSET:"--indicator-offset",ATTRIBUTE_INDICATOR_LEFT:"--indicator-left",WIDTH_INDICATOR_BORDER:3};DraggableItem.Const={SUFFIX_PROXY:"_Proxy",PROXY_CLASS:"DragDrop_Proxy",DRAGELEMENT_ID:"DragDrop_DragElement",ISDRAG_CLASS:"DragDrop_IsDrag",KEY_NEXT_VFORM_ID:"NextVFormID",KEY_PREVIOUS_VFORM_ID:"PreviousVFormID",INSERT_AFTER_CLASS:"InsertAfter",INSERT_PREVIOUS_CLASS:"InsertBefore",CONTROL_IMAGEPANEL:"ImagePanel",CLASS_DRAG_DROP_HORIZONTAL:"DragDrop_Feedback_H",CLASS_DRAG_DROP_VERTICAL:"DragDrop_Feedback_V",PROXY_IMAGE_SIZE:100,CLASS_PROXY:"Proxy",ID_PROXY_MESSAGE:"DragProxyMessage"};DraggableItem.DefaultOptions={ReturnType:Matrix3.Const.COMMAND_DROP_VS,VFormEffects:"",PleaseWaitMsg:"",PageVirtualID:"",ProxyMode:DragDropMgr.Const.PROXY_MODE_IMAGE,ProxyMessage:"",ProxyOpacity:.8,CursorAtOfHelper:{left:0,top:0},CursorType:"pointer",RevertMode:"invalid",RevertDuration:250,ReorderMode:"",DontMoveWhenReorder:!1,DragWithHelperBox:!1,ReorderWithNewRelation:!1,HighlightOverItem:!1};DraggableItem.CurrentHelper=null;DraggableItem.IsDragging=!1;DraggableItem.PreventClickWhileDragging=function(){document.addEventListener("click",function(n){DraggableItem.IsDragging&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation())},!0)};DraggableItem.prototype._SetDraggableProperty=function(){var n=this;this.moOptions.HighlightOverItem&&DragDropMgr.AddHighlightOverItemClass(this.msID);this.oDragItem.draggable({scroll:!1,refreshPositions:function(){return Utils.IsIE8()?!1:!0},appendTo:"body",opacity:n.moOptions.ProxyOpacity,zIndex:99999,distance:5,cursorAt:n.moOptions.CursorAtOfHelper,helper:function(){var t=n.moOptions.ProxyMode==DragDropMgr.Const.PROXY_MODE_IMAGE;return DraggableItem.CurrentHelper==null?DraggableItem.CurrentHelper=n.moOptions.DragWithHelperBox?DragDropMgr.GetHelperWithBox():DragDropMgr.GetHelper(t):n.moOptions.DragWithHelperBox?DragDropMgr.ResetHelperWithBox(DraggableItem.CurrentHelper):DragDropMgr.ResetHelper(DraggableItem.CurrentHelper),DraggableItem.CurrentHelper},revert:n.moOptions.RevertMode,revertDuration:n.moOptions.RevertDuration,cursor:n.moOptions.CursorType,create:function(t,i){n.SpecificCreate(t,i,$(this))},start:function(t,i){var r,c,e,a,s,v,h,p;DraggableItem.IsDragging=!0;typeof $!="undefined"&&$.fn&&$.fn.tipsy&&$(".tipsy").detach();n.Clean();var w=Utils.GetVFormId(n.msID),u=MultipleSelectionMgr.GetInstance(),b=!1,o=null,f=u.GetItemsFromGroupsIn(w,n.mbIsReorder);
204if(f!=null&&f.length>0){for(r=0,c=f.length;r<c;r++)if(e=f[r],!e.mbIsSelected){n.msNotAPartSelectedItemID=e.GetID();break}for(r=0,c=f.length;r<c;r++)if(e=f[r],n.msNotAPartSelectedItemID==null||e.GetID()===n.msNotAPartSelectedItemID){var y=!1,l=e.GetID(),k=Utils.GetVFormId(l);for(a=0;a<n.masMultiSelectionGroup.length;a++)if(Utils.GetVFormId(n.masMultiSelectionGroup[a])===k){y=!0;break}k!==w||y||(b=!0);y||(o||(o=u.GetGroupIDsFromControlID(l)),n.masMultiSelectionGroup.push(l));$E(Utils.GetVFormId(l)).addClass(DragDropMgr.Const.ISDRAG_CLASS)}}b||n.masMultiSelectionGroup.push(n.msID);o&&o.length&&(n.msNotAPartSelectedItemID!==null?(s=u.GetEIDInfo(n.msNotAPartSelectedItemID),v=s.ID,n.moStatedItemsEID=new Map,n.moStatedItemsEID.set(v,0),n.moStatedItemsEIDToDynamicGroupID=new Map,s.DGID&&n.moStatedItemsEIDToDynamicGroupID.set(v,{DEID:v,DGID:s.DGID,DGC:s.DGC})):(h=o[0],n.mbSelectedFull=u.IsInFullSelectionMode(h),u.HasStatedItems(h)&&(n.moStatedItemsEID=u.GetStatedItemsEIDInGroup(h),n.moStatedItemsEIDToDynamicGroupID=u.GetStatedItemsEIDToDynamicGroupID(h))));n.moOptions.DragWithHelperBox?(p=n.masMultiSelectionGroup.length,n.moStatedItemsEIDToDynamicGroupID&&n.moStatedItemsEIDToDynamicGroupID.forEach(function(n){p+=n.DGC-1}),DragDropMgr.UpdateHelperBox(i.helper,$(n.oDragItem),p)):i.helper.addClass(DragDropMgr.Const.FEEDBACK_INVALID_CLASS+" "+DragDropMgr.Const.FEEDBACK_CLASS+" "+DragDropMgr.Const.CLASS_DRAG_DROP_NO_MESSAGE);$Control(n.msID,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_StartDrag&&$Control(n.msID,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_StartDrag.Fire();$(".tipsy").on("remove",function(){$(".tipsy .tipsy-inner").removeClass(DragDropMgr.Const.CLASS_INVISIBLE)});n.SpecificStart(t,i,$(this))},drag:function(t,i){$(".tipsy .tipsy-inner").addClass(DragDropMgr.Const.CLASS_INVISIBLE);n.moOptions.HighlightOverItem?(n.moOptions.DragWithHelperBox&&DragDropMgr.CleanUpClassOfHelperWithoutBox(i.helper),(!DragDropMgr.msCurrentDroppableOverItemID||DragDropMgr.IsPointInElementListViewport(n.masMultiSelectionGroup,t.clientX,t.clientY))&&DragDropReorderMgr.ResetDragDropObjects()):DragDropMgr.msCurrentDroppableOverItemID||i.helper.addClass(DragDropMgr.Const.FEEDBACK_INVALID_CLASS);n.mbIsReorder&&n.SpecificDragReorder(t,i,$(this));n.SpecificDrag(t,i,$(this))},stop:function(t,i){var f,o,e,s,r,u;for($(".tipsy .tipsy-inner").removeClass(DragDropMgr.Const.CLASS_INVISIBLE),DraggableItem.IsDragging=!1,typeof $!="undefined"&&$.fn&&$.fn.tipsy&&$.fn.tipsy.revalidate&&$.fn.tipsy.revalidate(),f=0,o=n.masMultiSelectionGroup.length;f<o;f++)e=n.masMultiSelectionGroup[f],$E(Utils.GetVFormId(e)).removeClass(DragDropMgr.Const.ISDRAG_CLASS),$E(e).removeClass(MultipleSelectionMgr.Const.ITEM_OVER_CLASS);!Utils.IsStringFilled(DragDropMgr.msLastDroppableID)||n.moOptions.HighlightOverItem&&DragDropMgr.IsInDraggingItemZone(n.msID,DragDropMgr.msLastDroppableID)||(s=DragDropMgr.moDroppablesInstances[DragDropMgr.msLastDroppableID],n.ExecuteDrop(t,i,s),r=$Control(n.msID,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_EndDragOnItem,r&&(isNaN(r.miDelay)?r.Fire():window.setTimeout(function(){!DragDropMgr.IsDrag()&&r&&r.Fire()},r.miDelay)));DragDropMgr.RemoveInsertClass(this.mbIsHierarchy);u=$Control(n.msID,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_EndDrag;u&&(isNaN(u.miDelay)?u.Fire():window.setTimeout(function(){!DragDropMgr.IsDrag()&&u&&u.Fire()},u.miDelay));n.SpecificStop(t,i,$(this))}})};DraggableItem.prototype.Clean=function(){this.masMultiSelectionGroup=[];this.mbSelectedFull=!1;this.moStatedItemsEID=null;this.msNotAPartSelectedItemID=null;DragDropMgr.RefreshParams()};DraggableItem.prototype.AddDragGroups=function(n){this.msGroupsStringList!=""&&(this.msGroupsStringList+=Utils.Const.GROUP_SEPARATOR);this.msGroupsStringList+=n.join(Utils.Const.GROUP_SEPARATOR);this.maDragGroups=this.maDragGroups.concat(n);this.RefreshDragClasses()};DraggableItem.prototype.RefreshDragClasses=function(){for(var t=DragDropMgr.GetGroupsClass(this.maDragGroups),n=0,i=t.length;n<i;n++)this.oDragItem.hasClass(t[n])||this.oDragItem.addClass(t[n])};DraggableItem.prototype.ExecuteDrop=function(n,t,i){this.mbIsReorder?this.ExecuteDropReorder(n,t,i
204):this.SimpleDrop(n,t,i)};DraggableItem.prototype.SimpleDrop=function(n,t,i,r,u,f,e){for(var ut,o,c,et,ot,l,a,y,k,d,g,s,st,v,p,w,nt,tt,b=[],it=[],rt=!1,ht=i.GetID().split(Matrix3.Const.SEPARATOR_CONTROL)[1],ct=MultipleSelectionMgr.GetInstance(),h=0,lt=this.masMultiSelectionGroup.length;h<lt;h++)if(ut=$E(this.masMultiSelectionGroup[h]),ut!=null){s=this.masMultiSelectionGroup[h].split(Matrix3.Const.SEPARATOR_CONTROL);o={};o[Matrix3.Const.ARG_VFORMID]=s[0];o[Matrix3.Const.ARG_PANEL]=ht;it.push(s[0]);s.length>=1&&(o[Matrix3.Const.ARG_CONTROL]=s[1]);o[Matrix3.Const.ARG_GROUPS]=this.msGroupsStringList;var ft=Utils.GetMousePosition(n),at=Utils.GetX(i.GetID()),vt=Utils.GetY(i.GetID()),yt=ft[0]-at,pt=ft[1]-vt;o[Matrix3.Const.ARG_COORDX]=""+Math.round(yt);o[Matrix3.Const.ARG_COORDY]=""+Math.round(pt);c=$E(i.GetID().split(Matrix3.Const.SEPARATOR_CONTROL)[0]);et=c.next()?c.next().attr("id"):null;o[Matrix3.Const.ARG_NEXT_VFORMID]=et;ot=c.prev()?c.prev().attr("id"):null;o[Matrix3.Const.ARG_PREVIOUS_VFORMID]=ot;l=ct.GetSelectedItemByID(this.masMultiSelectionGroup[h]);l!=null&&(l.IsKeepSelected()||l.DeselectItem(),o[Matrix3.Const.ARG_POSITION]=""+l.GetIndex());(n.ctrlKey||n.metaKey||n.altKey)&&(o[Matrix3.Const.ARG_CTRL_KEY]="1");b.length===0&&(this.mbSelectedFull&&(o[Matrix3.Const.ARG_FULL]=this.mbSelectedFull),a=this.moStatedItemsEID,a&&(y=[],a.forEach(function(n,t){y.push(t)}),y.sort(function(n,t){return a.get(n)-a.get(t)}),o[Matrix3.Const.STATED_ITEMS]=y),k=this.moStatedItemsEIDToDynamicGroupID,k&&(d=[],k.forEach(function(n){d.push(n)}),o[Matrix3.Const.DYNAMIC_GROUP_ITEMS]=d));b.push(o)}rt?g=rt:(s=i.GetID().split(Matrix3.Const.SEPARATOR_CONTROL),g=s[0]);st=this.moOptions.ReturnType==Matrix3.Const.RETURNTYPE_FULL?Matrix3.Const.COMMAND_DROP_F:Matrix3.Const.COMMAND_DROP_VS;v=!0;n&&n.target&&n.target.id&&(p=Utils.GetVFormId(i.GetID()),w=Utils.GetVFormId(n.target.id),p==w?v=!1:(nt=$E(i.GetID()),nt.hasClass("DropAfter")?v=$E(p).next().attr("id")!=w:nt.hasClass("DropBefore")&&(v=$E(w).next().attr("id")!=p)));v&&DropProperties.AnimateDrop(n);tt=JSON.stringify(b);(typeof f!="undefined"||typeof e!="undefined"||typeof r!="undefined"||typeof u!="undefined")&&(tt+=`|${f}|${e}|${r}|${u}`);Matrix3.AddEvent(g,Matrix3.Const.EVENT_DROP,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,tt,st,it,this.moOptions.VirtualID,"",this.moOptions.VFormEffects,!1,this.moOptions.PleaseWaitMsg,!1,this.moOptions.PageVirtualID,undefined,undefined,n)};DraggableItem.prototype.GetID=function(){return this.msID};DraggableItem.prototype.SpecificCreate=function(){};DraggableItem.prototype.SpecificStart=function(){};DraggableItem.prototype.SpecificDrag=function(){};DraggableItem.prototype.SpecificStop=function(){};DraggableItem.prototype.SpecificDragReorder=function(n,t,i){var r,s;if(this.moOptions.ReorderWithNewRelation){var h=i[0].id,c=DragDropMgr.GetVFormElementByChildId(h),f=c.parent()[0];f.style.position==="static"&&(f=f.closest(".Panel"));(DragDropMgr.IsPointInElementViewport(f,n.clientX,n.clientY)||this.mbIsHierarchy)&&DragDropReorderMgr.UpdateInsertIndicatorWithNewRelation(n,this.mbIsVertical,this.mbIsHierarchy,this.mbIsCustomIndex,i)}else DragDropReorderMgr.UpdateInsertIndicator(n,this.mbIsVertical,i);var u=DragDropMgr.GetRulers(),e=!1,o=!1;for(r=0,s=u.length;r<s;r++)!e&&u[r][1].toLowerCase()=="horizontal"&&iY>u[r][0]&&iY<u[r][0]+DragDropMgr.Const.RULER_ATTRACTION&&(DragDropMgr.UpdateHRuler(u[r],DragDropMgr.Const.CLASS_HRULER_OVER)&&t.helper.addClass(DragDropReorderMgr.Const.CLASS_DRAG_DROP_HORIZONTAL),t.helper.css("top",u[r][0]-19+"px"),e=!0),!o&&u[r][1].toLowerCase()=="vertical"&&iX>u[r][0]&&iX<u[r][0]+DragDropMgr.Const.RULER_ATTRACTION&&(DragDropMgr.UpdateVRuler(u[r],DragDropMgr.Const.CLASS_VRULER_OVER)&&t.helper.addClass(DragDropReorderMgr.Const.CLASS_DRAG_DROP_VERTICAL),t.helper.css("left",u[r][0]-19+"px"),o=!0);e||(DragDropMgr.CleanCurrentHRuler(),t.helper.removeClass(DragDropReorderMgr.Const.CLASS_DRAG_DROP_HORIZONTAL));o||(DragDropMgr.CleanCurrentVRuler(),t.helper.removeClass(DragDropReorderMgr.Const.CLASS_DRAG_DROP_VERTICAL))};DraggableItem.prototype.ExecuteDropReorder=function(n,t,i){var o,r,u,s;if(typeof DragDropReorderMgr.moDroppableVForm!="undefined"&&DragDropReorderMgr.moDroppableVForm!=null&&i.mbIsReorder)if(
204o=DragDropReorderMgr.moDroppableVForm[0].closest('[data-vf="DamView_Results_VForm"]'),o&&o.classList&&o.classList.contains("ExpandMode")){if(r=DragDropReorderMgr.mbInsertBefore?DragDropReorderMgr.moDroppableVForm[0].previousSibling:DragDropReorderMgr.moDroppableVForm[0],u=r.nextSibling,!r.getAttribute("data-rid"))if(r.getAttribute("data-vf")=="DamView_DataGridHeader_VForm")u=r.nextSibling,r=null;else return;var v=$(r).closest(".ABS.PanelTable"),a=ControlMgr.GetInstance().GetControl(v[0].id),h=a.moLevelDict[r.getAttribute("data-rid")],c=a.moLevelDict[u.getAttribute("data-rid")],y,f,e,l;h>c?DragDropReorderMgr.mbInsertAfter?(f=r.getAttribute("data-tbp"),e=`${parseFloat(f)+1}`):(l=Array.from(r.parentElement.querySelectorAll(".PanelLine")).filter(function(n){return!!n.getAttribute("data-parent")&&n.getAttribute("data-parent")==u.getAttribute("data-parent")&&(!u||n.getAttribute("data-rid")!=u.getAttribute("data-rid"))}).reduce(function(n,t){return!n||parseFloat(n.getAttribute("data-tbp"))<parseFloat(t.getAttribute("data-tbp"))&&u&&parseFloat(u.getAttribute("data-tbp"))>parseFloat(t.getAttribute("data-tbp"))?t:n},null),l&&(f=l.getAttribute("data-tbp"),e=u.getAttribute("data-tbp"))):(r&&(f=r.getAttribute("data-tbp")),u&&(y=u.msId,e=u.getAttribute("data-tbp")),parseFloat(f)>parseFloat(e)&&(f=e-1));s=i;c<h&&DragDropReorderMgr.mbInsertBefore||c>h&&DragDropReorderMgr.mbInsertAfter?s=DragDropMgr.moDroppablesInstances[u.querySelector(".ReorderItem").id]:r&&(s=DragDropMgr.moDroppablesInstances[r.querySelector(".ReorderItem").id]);DragDropReorderMgr.mbInsertBefore=!0;this.SimpleDrop(n,t,s,f,e,!0,!r)}else this.ReorderDrop(n,t,i);else this.SimpleDrop(n,t,i)};DraggableItem.prototype.ReorderDrop=function(n,t,i){for(var l,y,p,w,b,k,f,a,o,s,e,r,g,h,v=[],d={},u=0,c=this.masMultiSelectionGroup.length;u<c;u++)o=this.masMultiSelectionGroup[u].split(Matrix3.Const.SEPARATOR_CONTROL),s=MultipleSelectionMgr.GetInstance().GetSelectedItemByID(this.masMultiSelectionGroup[u]),d[o[0]]=s.GetIndex();if(l=[],!this.mbIsCustomIndex&&(y=MultipleSelectionMgr.GetInstance().Sort(this.masMultiSelectionGroup,DragDropReorderMgr.msLastInsertID,DragDropReorderMgr.mbInsertBefore,!0),this.masMultiSelectionGroup=y[0],i.moOptions.ReorderWithNewRelation))for(p=y[1],w=Object.keys(p),u=0,c=w.length;u<c;u++)b=w[u],this.masMultiSelectionGroup.includes(b)||(k=p[b],l.push(k.msVFormID),v.push(k));for(f=DragDropReorderMgr.mbInsertBefore?DragDropReorderMgr.moDroppableVForm[0]:DragDropReorderMgr.moDroppableVForm[0].nextSibling,a=!0,u=0,c=this.masMultiSelectionGroup.length;u<c;u++)if(o=this.masMultiSelectionGroup[u].split(Matrix3.Const.SEPARATOR_CONTROL),l.push(o[0]),s=MultipleSelectionMgr.GetInstance().GetSelectedItemByID(this.masMultiSelectionGroup[u]),s.IsKeepSelected()||s.DeselectItem(),e={},e.msVFormID=o[0],e.miPosition=s.GetIndex(),e.miOriginalPosition=d[o[0]],e.mbInsertBefore=DragDropReorderMgr.mbInsertBefore,e.msParentVFormID=DragDropReorderMgr.moDroppableVForm.attr("id").substring(0,DragDropReorderMgr.moDroppableVForm.attr("id").lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY)),e.msBeforeVFormID=null,e.msAfterVFormID=null,f&&(e.msBeforeVFormID=f.id,e.msAfterVFormID=f.previousSibling==null?null:f.previousSibling.id),v.push(e),!this.moOptions.DontMoveWhenReorder)if(r=$E(o[0]),typeof r[0]!="undefined"&&typeof r.parent().get(0)!="undefined"&&r.parent().get(0)){if(f==null||Utils.IsUndefined(f))DragDropReorderMgr.moDroppableVForm.parent().append(r);else if(r[0].id!=f.id)r.insertBefore($E(f.id));else{a=!1;break}Utils.IsIE8()?(g=$PI(r.parent().attr("id")),g.AddControl($PI(r.attr("id")),$PI(r.attr("id")),$PI($(f).attr("id")))):r.parent().get(0).AddControl(r.get(0),r.get(0),f);f=r.get(0).nextSibling}else a=!1;if(!a)return!1;h=$PI(DragDropReorderMgr.moDroppableVForm.parent().attr("id"));PositionMgr.GetInstance().AddToDirtyXList(h);PositionMgr.GetInstance().AddToDirtyYList(h);h.ForceHasChanged();h.ForceHasChangedMaskBypassingChildren();h.ExtractDependences();PositionMgr.GetInstance().CalculatePosition();NearestItemFinder.ResetSearchTree();DragDropMgr.RemoveInsertClass(this.mbIsHierarchy);Matrix3.AddEvent("reorder",Matrix3.Const.EVENT_REORDER,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(v),Matrix3.Const.COMMAND_REORDER,l,this.moOptions.VirtualID,"",this.moOptions.VFormEffects,!1,this.moOptions.PleaseWaitMsg,!1,this.moOptions.PageVirtualID)};DroppableItem.DefaultOptions={ReorderWithNewRelation:!1,DropWithHelperBox:!1};DroppableItem.prototype._BindMouseMoveOnParent=function(){var t=this,n;this.moPI.moParent&&(n=$(this.moPI.moParent),this._parentMouseoverHandler=function(){t._EnableDroppableProperty()},this._parentElement=n,n.bind("mouseover",this._parentMouseoverHandler))};DroppableItem.prototype._EnableDroppableProperty=function(){this.mbIsDroppable==null?this._SetDroppableProperty():this.mbIsDroppable===!1&&(this.oDropItem.droppable("enable"),this.mbIsDroppable=!0)};DroppableItem.prototype._DisableDroppableProperty=function(){this.mbIsDroppable===!0&&(this.oDropItem.droppable("disable"),this.mbIsDroppable=!1)};DroppableItem.prototype._SetDroppableProperty=function(){var n=this;this.mbIsDroppable=!0;this.moOptions.HighlightOverItem&&DragDropMgr.AddHighlightOverItemClass(this.msID);this.oDropItem.droppable({hoverClass:DragDropMgr.Const.CLASS_OVERTARGET,tolerance:"pointer",accept:n.GetAcceptGroups(n.maGroups),greedy:n.moOptions.ExclusiveDropZone,over:function(t,i){var r=DragDropMgr.moDraggablesInstances[i.draggable[0].msId],e,u,f;DragDropMgr.RemoveInsertClass();n.mbIsDropAllowed&&(n.moOptions.HighlightOverItem&&Utils.IsStringFilled(DragDropMgr.msCurrentDroppableOverItemID)&&DragDropMgr.moDroppablesInstances[DragDropMgr.msCurrentDroppableOverItemID]&&$(DragDropMgr.moDroppablesInstances[DragDropMgr.msCurrentDroppableOverItemID].moPI).removeClass(DragDropMgr.Const.CLASS_OVERTARGET),DragDropMgr.msCurrentDroppableOverItemID=n.msID,e=DragDropMgr.GetVFormElementByChildId(i.draggable[0].id).parent()[0],n.msID===e.id&&$(n.moPI).removeClass(DragDropMgr.Const.CLASS_OVERTARGET),n.moOptions.HighlightOverItem&&(!n.mbIsReorder||n.moOptions.ReorderWithNewRelation)&&DragDropMgr.GetVFormElementByChildId(i.draggable.parent()[0].id).parent()[0].id!==n.msID&&!DragDropMgr.IsInDraggingItemZone(i.draggable[0].msId,n.oDropItem[0].id)&&(u=DragDropMgr.GetVFormElementByChildId(n.msID),u.addClass(DragDropReorderMgr.Const.INSERT_MIDDLE_CLASS),DragDropReorderMgr.msLastIndicatorID=u[0].id,DragDropReorderMgr.Upd
204ateDragDropObjects(n.msID)));r.moOptions.DragWithHelperBox?(DragDropMgr.ResetHelperWithBox(i.helper),DragDropMgr.CleanUpClassOfHelperWithoutBox(i.helper),f=r.masMultiSelectionGroup.length,r.moStatedItemsEIDToDynamicGroupID&&r.moStatedItemsEIDToDynamicGroupID.forEach(function(n){f+=n.DGC-1}),DragDropMgr.UpdateHelperBox(i.helper,i.draggable,f,n.msMessage)):(DragDropMgr.ResetHelper(i.helper),n.mbIsDropAllowed?i.helper.removeClass(DragDropMgr.Const.FEEDBACK_INVALID_CLASS):i.helper.addClass(DragDropMgr.Const.FEEDBACK_INVALID_CLASS),i.helper.text(n.msMessage),n.msMessage?i.helper.removeClass(DragDropMgr.Const.CLASS_DRAG_DROP_NO_MESSAGE):i.helper.addClass(DragDropMgr.Const.CLASS_DRAG_DROP_NO_MESSAGE));n.mbIsReorder&&n.SpecificOverReorder(t,i,$(this));n.SpecificOver(t,i,$(this))},out:function(t,i){if(n.msID===DragDropMgr.msCurrentDroppableOverItemID&&(DragDropMgr.msCurrentDroppableOverItemID="",DragDropMgr.RemoveInsertClass()),n.moOptions.ReorderWithNewRelation){var r=DragDropMgr.GetVFormElementByChildId(i.draggable[0].id).parent()[0];DragDropMgr.IsPointInElementViewport(r,t.clientX,t.clientY)&&(DragDropMgr.msCurrentDroppableOverItemID=r.id)}n.mbIsReorder&&n.SpecificOutReorder(t,i,$(this));n.SpecificOut(t,i,$(this));Utils.IsIE8()==!1&&n._DisableDroppableProperty()},drop:function(){n.mbIsDropAllowed&&(DragDropMgr.msLastDroppableID=n.moOptions.ReorderWithNewRelation?DragDropReorderMgr.msLastInsertID:n.msID)}})};DroppableItem.prototype.GetAcceptGroups=function(n){var r,i,t,u;if(typeof n!="object"||n.length==0)return"*";for(r=DragDropMgr.GetGroupsClass(n),i="",t=0,u=r.length;t<u;t++)t>0&&(i+=","),i+="."+r[t];return i};DroppableItem.prototype.AddDropGroups=function(n){this.maGroups=this.maGroups?this.maGroups.concat(n):n;this.mbIsDroppable===!0&&this.oDropItem.droppable("option","accept",this.GetAcceptGroups(this.maGroups))};DroppableItem.prototype.GetID=function(){return this.msID};DroppableItem.prototype.SpecificCreate=function(){};DroppableItem.prototype.SpecificActivate=function(){};DroppableItem.prototype.SpecificDesactivate=function(){};DroppableItem.prototype.SpecificOver=function(){};DroppableItem.prototype.SpecificOut=function(){};DroppableItem.prototype.SpecificDrop=function(){};DroppableItem.prototype.SpecificOverReorder=function(n,t,i){i.addClass(DragDropMgr.Const.CLASS_OVERTARGET_REORDER);var r=i.attr("id");DragDropReorderMgr.UpdateDragDropObjects(r)};DroppableItem.prototype.SpecificOutReorder=function(n,t,i){i.removeClass(DragDropMgr.Const.CLASS_OVERTARGET_REORDER);var r=i.attr("id").split(Matrix3.Const.SEPARATOR_CONTROL);DragDropReorderMgr.moDroppableVForm&&DragDropReorderMgr.moDroppableVForm.attr("id")==r[0]&&DragDropReorderMgr.ResetDragDropObjects()};NearestItemFinder={moCachedItemPoints:{},miParentHeight:0,miNumberOfChildren:0,GetNearestChildId:function(n,t,i){var u=this._CreateSearchTree(n),r=DragDropMgr.GetElementViewport(n),f=t-r.left,e=i-r.top,o=u.nearest({x:f,y:e},1);return o[0][0].id},ResetSearchTree:function(){this.moCachedItemPoints={}},_InitSearchTree:function(n){(this.miParentHeight!=n.GetHeight()||this.miNumberOfChildren!=n.children.length)&&this.ResetSearchTree();Object.keys(this.moCachedItemPoints).length===0&&(this.miParentHeight=n.GetHeight(),this.miNumberOfChildren=n.children.length)},_DistanceFunction:function(n,t){return Math.pow(n.x-t.x,2)+Math.pow(n.y-t.y,2)},_CreateSearchTree:function(n){var u,r,t,i,o,s;for(this._InitSearchTree(n),u=Array.from(n.children),r=0;r<u.length;r++)if((t=u[r],i=t.querySelector("."+MultipleSelectionMgr.Const.REORDER_PNL_CLASS),i)&&!this.moCachedItemPoints[i.id]){var f=t.offsetLeft,e=t.offsetTop,h=Object.keys(this.moCachedItemPoints).length!==0&&f==0&&e==0;h||(o=f+t.GetWidth()/2,s=e+t.GetHeight()/2,this.moCachedItemPoints[i.id]={x:o,y:s,id:i.id})}return new kdTree(Object.values(this.moCachedItemPoints),this._DistanceFunction,["x","y"])}};TranslationMode={Start:function(){$.contextMenu({selector:"."+TranslationMode.Const.CLASS,callback:function(){var n=$(this[0]),t=n.attr("data-vf"),i=n.attr("data-vc");window.open("C.aspx?VP3=ParamTranslate&M="+t+"&PO=true&P="+i,"Translate",config="height=600, width=1150, toolbar=no, menubar=no, scrollbars=yes, resizable=yes, location=no, directories=no, status=no")},items:{translate:{name:"Translate",icon:"translate"}}})}};TranslationMode.Const={CLASS:"TT"};addthis_share={url_transforms:{shorten:{twitter:"bitly"}},shorteners:{bitly:{}}};AutoSizeObserver.Const={MGR_NAME:"AutoSizeObserver"};AutoSizeObserver.ResizeObserver=new ResizeObserver(function(n){for(var t,i=0;i<n.length;i++)(t=n[i],t.target.matches&&t.target.matches("[style*='display: none'] *"))||t.target.mbAutoWidth&&Math.abs(t.contentRect.width-t.target.miWidth)<=1&&t.target.mbAutoHeight&&Math.abs(t.contentRect.height-t.target.miHeight)<=1||(t.target.ForceHasChanged(),t.target.mbAutoWidth&&PositionMgr.GetInstance().AddToDirtyXList(t.target),t.target.mbAutoHeight&&PositionMgr.GetInstance().AddToDirtyYList(t.target),PositionMgr.CalculatePositionDebounced())});AutoSizeObserver.Activate=function(n){(n.mbAutoWidth||n.mbAutoHeight||n.GetId())&&(AutoSizeObserver.ResizeObserver.observe(n),Matrix3.RegisterForCleanup(n.GetId(),"AutoSizeObserver",function(){AutoSizeObserver.ResizeObserver.unobserve(n)}))};BindableElementsMgr.moSingleton=null;BindableElementsMgr.Const={MGR_NAME:"BindableElements",FINAL_ID_SEPARATOR:"|",BEHAVIOR_IDENTIFIER:"identifier",BEHAVIOR_RAW:"raw",BEHAVIOR_LIST:"list",BEHAVIOR_ACTION:"action",BEHAVIOR_SELECTOR:"selector",BEHAVIOR_EVENT:"event",BEHAVIOR_COMPOSITE:"composite",SIGNAL_ELEMENTS_ON_BEFORE_REMOVED:"ELEMENT_ON_BEFORE_REMOVED",SIGNAL_ELEMENT_ON_REMOVED:"ELEMENT_ON_REMOVED",SIGNAL_ELEMENT_ON_BEFORE_CHANGED:"ELEMENT_ON_BEFORE_CHANGED",SIGNAL_SET_ELEMENT:"SET_ELEMENT",SIGNAL_ELEMENT_ON_CHANGED:"ELEMENT_ON_CHANGED",SIGNAL_LIST_ITEM_ADDED:"LIST_ITEM_ADDED",SIGNAL_LIST_ITEM_REMOVED:"LIST_ITEM_REMOVED",SIGNAL_SELECTION_CHANGED:"SELECTION_CHANGED",SIGNAL_EVENT_FIRED:"EVENT_FIRED"};BindableElementsMgr.GetInstance=function(){return BindableElementsMgr.moSingleton||(BindableElementsMgr.moSingleton=new BindableElementsMgr),BindableElementsMgr.moSingleton};BindableElementsMgr.GetElementSignal=function(n,t,i){var r=n+"|"+t;return r+"$"+i};BindableElementsMgr.moTokens={};BindableElementsMgr.prototype={SetupElement:function(n,t,i,r){var e=!0,u,o,f;if(this.moElementsStore[n]||(this.moElementsStore[n]={}),this.moElementsStore[n][t]||(this.moElementsStore[n][t]={},e=!1),u=this.moElementsStore[n][t],e&&u.msBehavior===i){switch(i){case BindableElementsMgr.Const.BEHAVIOR_IDENTIFIER:this._InternalUpdateElementData_Identifier(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_LIST:this._InternalUpdateElementData_List(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_ACTION:this._InternalUpdateElementData_Action(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_RAW:this._InternalUpdateElementData_Raw(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_SELECTOR:this._InternalUpdateElementData_Selector(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_EVENT:this._InternalUpdateElementData_Event(u,r);break;case BindableElementsMgr.Const.BEHAVIOR_COMPOSITE:this._InternalUpdateElementData_Composite(u,r);break;default:throw new Error("Unknown behavior of Bindable Element ID=["+n+"], Name=["+t+"], Behavior=["+i+"]");}u.mbSkipCleanup=!0}
204else e&&(this.CleanupElement(n,t,!0),this.moElementsStore[n][t]={},u=this.moElementsStore[n][t]),u.msScopeID=n,u.msName=t,u.moData=r,u.msBehavior=i,u.miUsageCount=0,o=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n,t,BindableElementsMgr.Const.SIGNAL_SET_ELEMENT),function(i,r){r!==u.moData&&(PubSub.publishSync(BindableElementsMgr.GetElementSignal(n,t,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_BEFORE_CHANGED),r),u.moData=r,PubSub.publishSync(BindableElementsMgr.GetElementSignal(n,t,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_CHANGED),r))}),this._AddSubscriptionTokenForCleanup(n,t,o);if(u.msBehavior===BindableElementsMgr.Const.BEHAVIOR_COMPOSITE)for(f in r.elements)this.SetupElement(n,t+">>"+f,r.elements[f].behavior,r.elements[f].initialValue);return u},ContainsElement:function(n,t,i){return this.moElementsStore[n]&&this.moElementsStore[n][t]&&(!i||this.moElementsStore[n][t].msBehavior===i)},UseElement:function(n,t,i){if(!this.moElementsStore[n]||!this.moElementsStore[n][t])return Matrix3.LogWarning("Element not found: ID=["+n+"], Name=["+t+"]"),null;var r=this.moElementsStore[n][t];return i&&r.msBehavior!==i?(Matrix3.LogWarning("Mismatch behavior: wanted=["+i+"], got=["+r.msBehavior+"]"),null):(r.miUsageCount++,this._BuildPublicInterface(r))},GetElementsDataInScope:function(n){var i={},e={},r,f,u,t;if(this.moElementsStore[n])for(t in this.moElementsStore[n])if(r=this.moElementsStore[n][t],r.msBehavior===BindableElementsMgr.Const.BEHAVIOR_COMPOSITE){i[t]={};for(f in r.moData.elements)u=t+">>"+f,this.moElementsStore[n][u]&&(i[t][f]=this.moElementsStore[n][u].moData,e[u]=!0)}else i[t]=r.moData;for(t in e)delete i[t];return i},CleanupElement:function(n,t,i){var r,u,f;if(this.moElementsStore[n]&&this.moElementsStore[n][t]){if(r=this.moElementsStore[n][t],r.miUsageCount>0&&!i)return!1;if(r.mbSkipCleanup)return r.mbSkipCleanup=!1,!1;if(PubSub.publishSync(BindableElementsMgr.GetElementSignal(n,t,BindableElementsMgr.Const.SIGNAL_ELEMENTS_ON_BEFORE_REMOVED)),r.msBehavior===BindableElementsMgr.Const.BEHAVIOR_COMPOSITE)for(u in r.moData.elements)f=t+">>"+u,this.CleanupElement(n,f,i);delete this.moElementsStore[n][t];PubSub.publishSync(BindableElementsMgr.GetElementSignal(n,t,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_REMOVED));this._CleanupSubscriptionTokens(n,t)}return!0},_AddSubscriptionTokenForCleanup:function(n,t,i){BindableElementsMgr.moTokens[n]||(BindableElementsMgr.moTokens[n]={});BindableElementsMgr.moTokens[n][t]||(BindableElementsMgr.moTokens[n][t]=[]);BindableElementsMgr.moTokens[n][t].push(i)},_CleanupSubscriptionTokens:function(n,t){BindableElementsMgr.moTokens[n]&&(t&&BindableElementsMgr.moTokens[n][t]?BindableElementsMgr.moTokens[n][t].forEach(function(n){PubSub.unsubscribe(n)}):Object.keys(BindableElementsMgr.moTokens[n]).forEach(function(t){BindableElementsMgr.moTokens[n][t].forEach(function(n){PubSub.unsubscribe(n)})}))},_InternalUpdateElementData_Base:function(n,t){PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SET_ELEMENT),t)},_InternalUpdateElementData_Identifier:function(n,t){this._InternalUpdateElementData_Base(n,t)},_InternalUpdateElementData_List:function(n,t){this._InternalUpdateElementData_Base(n,t)},_InternalUpdateElementData_Action:function(n,t){this._InternalUpdateElementData_Base(n,t)},_InternalUpdateElementData_Raw:function(n,t){this._InternalUpdateElementData_Base(n,t)},_InternalUpdateElementData_Selector:function(n,t){var r=[],u=[];for(var i in t.selection)!n.moData.selection[i]&&t.selection[i]?r.push(i):n.moData.selection[i]&&!t.selection[i]&&u.push(i);n.moData=t;(r.length>0||u.length>0)&&PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),{newlySelected:r,newlyDeselected:u})},_InternalUpdateElementData_Event:function(){},_InternalUpdateElementData_Composite:function(){},_InternalSetupElementMethods_Identifier:function(n,t){var i=this;t.setEntityId=function(t){i._InternalUpdateElementData_Identifier(n,t)};t.onChanged=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_CHANGED),function(n,t){r(t)});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})};t.onBeforeChanged=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_BEFORE_CHANGED),function(n,t){r(t)});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})};t.getEntityId=function(){return n.moData}},_InternalSetupElementMethods_List:function(n,t){var i=this;t.add=function(t){n.moData.items=n.moData.items.concat(t)};t.remove=function(t){n.moData.items=n.moData.items.filter(function(n){return!t.includes(n)})};t.update=function(t){n.moData.items=t};t.setData=function(t){i._InternalUpdateElementData_List(n,t)};Object.defineProperty(t,"items",{get:function(){return n.moData.items},set:function(t){n.moData.items=t},enumerable:!0});Object.defineProperty(t,"id",{get:function(){return n.moData.id},set:function(t){n.moData.id=t},enumerable:!0});Object.defineProperty(t,"title",{get:function(){return n.moData.title},set:function(t){n.moData.title=t},enumerable:!0});t.id=n.moData.id;t.title=n.moData.title},_InternalSetupElementMethods_Action:function(n,t){t.execute=function(t){n.moData&&typeof n.moData=="function"&&n.moData(t)};Object.defineProperty(t,"doNothing",{get:function(){return!n.moData||typeof n.moData!="function"},enumerable:!0})},_InternalSetupElementMethods_Raw:function(n,t){var i=this;t.setValue=function(t){i._InternalUpdateElementData_Raw(n,t)};t.onChanged=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_CHANGED),function(n,t){r(t)});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})};t.onBeforeChanged=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_BEFORE_CHANGED),function(n,t){r(t)});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})};t.getValue=function(){return n.moData};Object.defineProperty(t,"value",{get:function(){return n.moData},set:function(n){t.setValue(n)},enumerable:!0})},_InternalSetupElementMethods_Selector:function(n,t){var i=this;t.select=function(t){var i,r,u;for(t=t||[],i=[],r=0;r<t.length;r++)u=t[r],n.moData.selection[u]||i.push(u),n.moData.selection[u]=!0;i.length>0&&PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),{newlySelected:i,newlyDeselected:[]})};t.selectExclusively=function(t){var r=[],u=[];for(var i in n.moData.selection)i==t?(n.moData.selection[i]||r.push(i),n.moData.selection[i]=!0):n.moData.selection[i]&&(u.push(i),n.moData.selection[i]=!1);(r.length>0||u.length>0)&&PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),{newlySelected:r,newlyDeselected:u})};t.deselect=function(t){var i,r,u;for(t=t||[],i=[],r=0;r<t.length;r++)u=t[r],n.moData.selection[u]&&i.push(u),n.moData.selection[u]=!1;i.length>0&&PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),{newlySelected:[],newlyDeselected:i})};t.deselectAll=function(){var t=[];for(var i in n.moData.selection)n.moData.selection[i]&&t.push(i),n.moData.selection[i]=!1;t.length>0&&PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),{newlySelected:[],newlyDeselected:t})};t.onSelectionChanged=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_SELECTION_CHANGED),function(n,t){r(t)});return t.moTokensToCleanup.push(u),i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),CleanupFunction(function(){PubSub.unsubscribe(u)})};t.getSelection=function(){return n.moData.selection}},_InternalSetupElementMethods_Event:function(n,t){var i=this;t.fire=function(t){PubSub.publishSync(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_EVENT_FIRED),t)};t.onFired=function(r,u){var f=null;return f=u&&u.once?PubSub.subscribeOnce(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_EVENT_FIRED),function(n,t){r(t)}):PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_EVENT_FIRED),function(n,t){r(t)}),t.moTokensToCleanup.push(f),i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,f),CleanupFunction(function(){PubSub.unsubscribe(f)})}},_InternalSetupElementMethods_Composite:function(n,t){for(var i in n.moData.elements)t[i]=this.UseElement(n.msScopeID,n.msName+">>"+i,n.moData.elements[i].behavior)},_BuildPublicInterface:function(n){var t={},i;t.moTokensToCleanup=[];switch(n.msBehavior){case BindableElementsMgr.Const.BEHAVIOR_IDENTIFIER:this._InternalSetupElementMethods_Identifier(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_LIST:this._InternalSetupElementMethods_List(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_ACTION:this._InternalSetupElementMethods_Action(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_RAW:this._InternalSetupElementMethods_Raw(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_SELECTOR:this._InternalSetupElementMethods_Selector(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_EVENT:this._InternalSetupElementMethods_Event(n,t);break;case BindableElementsMgr.Const.BEHAVIOR_COMPOSITE:this._InternalSetupElementMethods_Composite(n,t);break;default:throw new Error("Unknown behavior of Bindable Element ID=["+n.msScopeID+"], Name=["+n.msName+"], Behavior=["+n.msBehavior+"]");}return t.unsubscribeAll=function(){t.moTokensToCleanup.forEach(function(n){PubSub.unsubscribe(n)});t.moTokensToCleanup=[]},i=this,t.onBeforeRemoved=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENTS_ON_BEFORE_REMOVED),function(){r()});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})},t.onRemoved=function(r){var u=PubSub.subscribe(BindableElementsMgr.GetElementSignal(n.msScopeID,n.msName,BindableElementsMgr.Const.SIGNAL_ELEMENT_ON_REMOVED),function(){r()});return i._AddSubscriptionTokenForCleanup(n.msScopeID,n.msName,u),t.moTokensToCleanup.push(u),CleanupFunction(function(){PubSub.unsubscribe(u)})},t.removeUsage=function(){var r,i;if(t.unsubscribeAll(),Object.keys(t).forEach(function(n){t[n]instanceof Function&&(t[n]=n.startsWith("on")?function(){return CleanupFunction(function(){})}:function(){})}),n.miUsageCount--,n.msBehavior==BindableElementsMgr.Const.BEHAVIOR_COMPOSITE)for(r in n.moData.elements)i=t[r],i&&i.removeUsage&&i.removeUsage()},t}};BreadcrumbPositionMgr.FoldBreadcrumb=function(n,t,i,r){var e,u,f;if(r||(r=0),e=$E(n),e[0]){u=!1;f=function(){var c,s,o,w,f;if(u){u=!1;return}var h=$E(n+":"+t),l=$E(n+":"+i),e=$E(n+":Flow").find("[data-opn='IW']"),y=$E(n+":InvisibleFlow").find("[data-opn='IW']"),b=$E(n+":FullAvailableWidth"),a=b[0]?b[0].GetWidth():0,p=!1,v=a-(h[0]?h[0].GetWidth():0);for(f=e.length-1;f>=0;f--){c=null;try{c=$Control(e[f].GetId())}catch(k){}
204if(c){if(c.msMode===FoldProperties.Const.CLOSE&&v>e[f].GetChildrenWidth()){p=!0;break}else if(c.msMode===FoldProperties.Const.OPEN&&v<e[f].GetChildrenWidth()){p=!0;break}v-=e[f].GetChildrenWidth();f!==e.length-1&&(v-=r)}}if(p){for(s=0,o=e.length-1;o>=0&&s<a&&s+e[o].GetChildrenWidth()<=a;)s=s+e[o].GetChildrenWidth(),o!==e.length-1&&(s+=r),o--;if(o>=0){while(o<e.length&&s+(h[0]?h[0].GetChildrenWidth():0)>a)s=s-e[o].GetChildrenWidth(),o!==e.length-1&&(s-=r),o++;for(h[0]&&$Control(h[0].GetId()).Action_OpenFold(!1,!0),w=[],f=0;f<e.length;f++)f<=o?(w.push($(e[f]).find(".Item>[role='button']").text()),$Control(e[f].GetId()).Action_CloseFold(!1,!0),$Control(y[f].GetId()).Action_CloseFold(!1,!0)):($Control(e[f].GetId()).Action_OpenFold(!1,!0),$Control(y[f].GetId()).Action_OpenFold(!1,!0));l.attr("title",w.join(" / "));l.tipsy&&typeof l.tipsy=="function"&&l.tipsy({gravity:"n"})}else for(h[0]&&$Control(h[0].GetId()).Action_CloseFold(!1,!0),f=0;f<e.length;f++)$Control(e[f].GetId()).Action_OpenFold(!1,!0),$Control(y[f].GetId()).Action_OpenFold(!1,!0);PositionMgr.InvalidateNodeAndAncestors($PI(n+":Flow")||$PI(n));u=!0;PositionMgr.GetInstance().CalculatePosition()}};f();$(document).on("PositioningCompleted."+n,f);Matrix3.RegisterForCleanup(n,"BreadCrumb",function(){try{$(document).off("PositioningCompleted."+n)}catch(t){}})}};MatrixDebug={EnableHightlight:function(n){$("<style id='FreshVF' type='text/css'>.FreshVF{border: 1px solid blue; background-color: rgba(128, 128, 255, 0.1);}<\/style>").appendTo("head");n||Utils.IsStorageAvailable()&&sessionStorage.setItem("MatrixDebug.FreshVF",1)},DisableHightlight:function(){$("#FreshVF").remove();Utils.IsStorageAvailable()&&sessionStorage.removeItem("MatrixDebug.FreshVF")},RestorePreferences:function(){Utils.IsStorageAvailable()&&sessionStorage.getItem("MatrixDebug.FreshVF")&&this.EnableHightlight()},EnableReorderDebug:function(){Utils.IsStorageAvailable()&&sessionStorage.setItem("MatrixDebug.ReorderDbg",1)},DisableReorderDebug:function(){Utils.IsStorageAvailable()&&sessionStorage.removeItem("MatrixDebug.ReorderDbg")}};Effect={Pulse:function(n,t){var i=$Elt(n,!0),u,r;return Utils.IsIPad()&&(t=0),isNaN(t)&&(t=Effect.Const.DEFAULT_DURATION),i!=null&&$S(i,"display")=="block"&&(u=$E(n),r=function(){u.fadeTo(t*1e3,.5).fadeTo(t*1e3,1,r)},r()),i},Fade:function(n,t,i){Utils.IsIPad()&&(t=0);(t==null||isNaN(t))&&(t=Effect.Const.DEFAULT_DURATION);var r=$E(n);return r.stop(!0).fadeOut(t*1e3,i),r},Appear:function(n,t,i){var r=null;return r=typeof n=="string"?$E(n):$(n),Utils.IsIPad()&&(t=0),(t==null||isNaN(t))&&(t=Effect.Const.DEFAULT_DURATION),r.removeClass(StyleMgr.Const.CLASS_INVISIBLE),r.stop(!0).fadeTo(0,0).fadeTo(t*1e3,1,i),r},Highlight:function(){},Show:function(n){$SetStyle(n,"display","block")},Hide:function(n){$SetStyle(n,"display","none")},SlideBottom:function(){}};Effect.Const={EFFECT_NONE:"None",SEPARATOR_DURATION:"|",DEFAULT_DURATION:1};FramesMgr.Const={FRAME_PARAMETER_START:"&FRM=",FRAME_PARAMETER_END:"&",FRAME_PAIR_SEPARATOR:",",FRAME_NAME_CONTENT_SEPARATOR:":"};FramesMgr.moSingleton=null;FramesMgr.GetInstance=function(){return FramesMgr.moSingleton||(FramesMgr.moSingleton=new FramesMgr),FramesMgr.moSingleton};FramesMgr.prototype={SetURL:function(n){var u,t,f,e,i,o,s,r;if(this.moFrames={},u=n.indexOf(FramesMgr.Const.FRAME_PARAMETER_START),u!=-1)for(t=n.substr(u+FramesMgr.Const.FRAME_PARAMETER_START.length),f=t.indexOf(FramesMgr.Const.FRAME_PARAMETER_END),f!=-1&&(t=t.substr(0,f)),e=t.split(FramesMgr.Const.FRAME_PAIR_SEPARATOR),i=0,o=e.length;i<o;i++)s=e[i],r=s.split(FramesMgr.Const.FRAME_NAME_CONTENT_SEPARATOR),r.length==2&&(this.moFrames[r[0]]=r[1])},GetFrameContent:function(n){var t=null;return this.moFrames.hasOwnProperty(n)&&(t=this.moFrames[n]),t},CurrentFramesString:function(){var n=new StringBuilder,t="",r=!1,i;if(this.moFrames!=null){n.append(FramesMgr.Const.FRAME_PARAMETER_START);for(i in this.moFrames)r=!0,n.append(i),n.append(FramesMgr.Const.FRAME_NAME_CONTENT_SEPARATOR),n.append(this.moFrames[i]),n.append(FramesMgr.Const.FRAME_PAIR_SEPARATOR)}return r&&(t=n.toString(),t=t.substr(0,t.length-1)),t}},function(){"use strict";function u(){return window.Param&&window.Param.HtmlSanitize||{}}function e(n){if(!n||n.length===0)return/^(?:[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i;var t=n.map(function(n){return String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});return new RegExp("^(?:(?:"+t.join("|")+"):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))","i")}function o(n){var i=Object.create(null),t,r;if(!n||!n.length)return i;for(t=0;t<n.length;t++)r=String(n[t]).trim().toLowerCase(),r&&(i[r]=!0);return i}function s(n,t){var u,f,r,i,e,o;if(n==null||n==="")return"";for(u=String(n).split(";"),f=[],r=0;r<u.length;r++)(i=u[r].trim(),i)&&((e=i.indexOf(":"),e<=0)||(o=i.substring(0,e).trim().toLowerCase(),t[o]&&f.push(i)));return f.join("; ")}function h(){window.DOMPurify&&typeof window.DOMPurify.addHook=="function"&&n._hookedDOMPurify!==window.DOMPurify&&(window.DOMPurify.addHook("uponSanitizeAttribute",function(n,t){if(t&&t.attrName==="style"){var i=s(t.attrValue,r);i.length===0?(t.keepAttr=!1,t.attrValue=""):t.attrValue=i}}),n._hookedDOMPurify=window.DOMPurify)}function c(){if(t!==null)return t;var i=u().Config,s=!!i,n=s?i:f;return r=o(n.allowedCssProperties),h(),t={ALLOWED_TAGS:n.allowedTags||[],ALLOWED_ATTR:n.allowedAttributes||[],ALLOWED_URI_REGEXP:e(n.allowedSchemes),FORBID_CONTENTS:["script","iframe","object","embed","style"],RETURN_TRUSTED_TYPE:!1}}function l(n){if(i||(i=!0,window.console&&typeof console.warn=="function"&&console.warn("[HtmlSanitize] DOMPurify is not loaded; falling back to plain-text rendering. Check Include/Matrix5/Static/1-lib/9-dompurify.min.js is being served.")),n==null)return"";var t=document.createElement("div");return t.textContent=String(n),t.innerHTML}var i;window.HtmlSanitize=window.HtmlSanitize||{};var n=window.HtmlSanitize,f={allowedTags:["p","strong","em","b","i","u","a","ul","ol","li","br","code","pre","blockquote","span"],allowedAttributes:["href","title","class"],allowedSchemes:["http","https","mailto"],allowedCssProperties:[]},t=null,r=Object.create(null);n._hookedDOMPurify=n._hookedDOMPurify||null;i=!1;n.sanitizeRichText=function(n){return n==null?"":u().Enabled===!1?n:typeof DOMPurify=="undefined"||!window.DOMPurify||typeof window.DOMPurify.sanitize!="function"?l(n):window.DOMPurify.sanitize(n,c())};n.resetConfigCache=function(){t=null}}();InlineUploaderMgr.Instances={};InlineUploaderMgr.__createHiddenInput=function(n){var t=document.createElement("input");return t.setAttribute("type","file"),t.style.display="none",n.appendChild(t),t};InlineUploaderMgr.SetupDropZone=function(n,t,i,r,u,f,e){var h=Utils.GetVFormId(n),o,s,c,v,y,l,a,p,w,b;if(!h){console.error("Cannot find parent VForm of panel with ID = "+n);return}if(o=$E(n)[0],!o){console.log("Cannot find panel with ID = "+n);return}s=InlineUploaderMgr.__createHiddenInput(o);i&&i.length>=1&&s.setAttribute("accept",i.map(function(n){return n=n.replace(/\s/g,"").toLowerCase(),n.match(/^[^.][^/]+$/)&&(n="."+n),n}).join(","));c=function(n){n.preventDefault();r&&r(o)};o.addEventListener("dragover",c);o.addEventListener("dragenter",c);v=function(n){n.preventDefault();var t=$(o).offset();(!o.contains(n.target)||n.clientX<=t.left||n.clientX>=t.left+o.clientWidth||n.clientY<=t.top||n.clientY>=t.top+o.clientHeight)&&u&&u(o)};o.addEventListener("dragleave",v);y=function(n){n.preventDefault();f&&f(o);n.dataTransfer&&n.dataTransfer.files&&(n.dataTransfer.files.length>1?Matrix3.ShowNotification(e,{notificationType:"warning"}):(s.files=n.dataTransfer.files,Matrix3.AddEvent(h,t,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT)))};o.addEventListener("drop",y);l=function(){$(document.body).addClass("IsDragging")};document.addEventListener("dragover",l);document.addEventListener("dragenter",l);a=function(n){(n.type==="drop"||n.clientX<=0||n.clientX>=document.body.clientWidth||n.clientY<=0||n.clientY>=document.body.clientHeight)&&$(document.body).removeClass("IsDragging")};document.addEventListener("dragleave",a);document.addEventListener("drop",a);p=function(){s.style.opacity=0;s.style.display="block";s.focus();s.click();s.style.display="none"};o.addEventListener("click",p);w=function(n){n.target&&n.target.files&&(n.target.files.length>1?Matrix3.ShowNotification(e,{notificationType:"warning"}):(s.files=n.target.files,Matrix3.AddEvent(h,t,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT)))};s.addEventListener("change",w);b=function(n){n.stopPropagation()};s.addEventListener("click",b);Matrix3.RegisterForCleanup(h,"InlineUploader",function(){try{o.removeEventListener("dragover",c);o.removeEventListener("dragenter",c);o.removeEventListener("dragleave",v);o.removeEventListener("drop",y);document.removeEventListener("dragover",l);document.removeEventListener("dragenter",l);document.removeEventListener("dragleave",a);document.removeEventListener("drop",a);o.removeEventListener("click",p);s.removeEventListener("change",w);s.removeEventListener("click",b)}catch(n){}});InlineUploaderMgr.Instances[h]={GetFiles:function(){return s.files}}};IntervalTreeUtils={BuildBinarySearchTree:function(n,t,i){if(t>=i)return undefined;var r=Math.floor((i+t)/2);return{data:n[r],right:IntervalTreeUtils.BuildBinarySearchTree(n,r+1,i),left:IntervalTreeUtils.BuildBinarySearchTree(n,t,r)}},FindHighestEndForNode:function(n){if(!n)return undefined;var t=function(n){return arguments.length<=0||arguments[0]===undefined?-Infinity:n.high},i=n.left,r=n.right,u=n.data;return IntervalTreeUtils.FindHighestEndForNode(i),IntervalTreeUtils.FindHighestEndForNode(r),n.high=Math.max(t(i),t(r),u.end),n},GetIntervalTree:function(n){var i=function(n,t){return n===t?0:n<t?-1:1},t=n.slice(0).sort(function(n,t){return i(n.start,t.start)}),r=IntervalTreeUtils.BuildBinarySearchTree(t,0,t.length);return IntervalTreeUtils.FindHighestEndForNode(r)},FindIntervalsFromNodeRecursive:function(n,t,i){var u,f,r;return n&&(u=t.start,f=t.end,n.high>=u&&(r=n.data,r.start<=f&&(r.end>=u&&i.push(r),IntervalTreeUtils.FindIntervalsFromNodeRecursive(n.right,t,i)),IntervalTreeUtils.FindIntervalsFromNodeRecursive(n.left,t,i))),i},FindIntervalsFromNode:function(n,t){return IntervalTreeUtils.FindIntervalsFromNodeRecursive(n,t,[])}};typeof JSON!="object"&&(JSON={}),function(){"use strict";function i(n){return n<10?"0"+n:n}function o(n){return e.lastIndex=0,e.test(n)?'"'+n.replace(e,function(n){var t=s[n];return typeof t=="string"?t:"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+n+'"'}function u(i,f){var c,l,s,a,v=n,h,e=f[i];e&&typeof e=="object"&&typeof e.toJSON=="function"&&(e=e.toJSON(i));typeof t=="function"&&(e=t.call(f,i,e));switch(typeof e){case"string":return o(e);case"number":return isFinite(e)?String(e):"null";case"boolean":case"null":return String(e);case"object":if(!e)return"null";if(n+=r,h=[],Object.prototype.toString.apply(e)==="[object Array]"){for(a=e.length,c=0;c<a;c+=1)h[c]=u(c,e)||"null";return s=h.length===0?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+v+"]":"["+h.join(",")+"]",n=v,s}if(t&&typeof t=="object")for(a=t.length,c=0;c<a;c+=1)l=t[c],typeof l=="string"&&(s=u(l,e),s&&h.push(o(l)+(n?": ":":")+s));else for(l in e)Object.prototype.hasOwnProperty.call(e,l)&&(s=u(l,e),s&&h.push(o(l)+(n?": ":":")+s));return s=h.length===0?"{}":n?"{\n"+n+h.join(",\n"+n)+"\n"+v+"}":"{"+h.join(",")+"}",n=v,s}}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+i(this.getUTCMonth()+1)+"-"+i(this.getUTCDate())+"T"+i(this.getUTCHours())+":"+i(this.getUTCMinutes())+":"+i(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()});var f=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,e=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,n,r,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t;typeof JSON.stringify!="function"&&(JSON.stringify=function(i,f,e){var o;if(n="",r="",typeof e=="number")for(o=0;o<e;o+=1)r+=" ";else typeof e=="string"&&(r=e);if(t=f,f&&typeof f!="function"&&(typeof f!="object"||typeof f.length!="number"))throw new Error("JSON.stringify");return u("",{"":i})});typeof JSON.parse!="function"&&(JSON.parse=function(n,t){function r(n,i){var f,e,u=n[i];if(u&&typeof u=="object")for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(e=r(u,f),e!==undefined?u[f]=e:delete u[f]);return t.call(n,i,u)}var i;if(n=String(n),f.lastIndex=0,f.test(n)&&(n=n.replace(f,function(n){return"\\u"+("0000"+n.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(n.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return i=Utils.EvalScripts("("+n+")"),typeof t=="function"?r({"":i},""):i;throw new SyntaxError("JSON.parse");})}();M3PrepareLBPicker=function(n,t){var l,k,i,s,e,u,r,a,v;if(!Matrix3.mbPreloading){var y=Utils.GetVFormId(n.parentElement.id),nt=$(n.parentElement).hasClass("damview-selectionbar-action"),p=MultipleSelectionMgr.GetInstance(),h=p.GetObjects(t,MultipleSelectionMgr.Const.FLAG_SELECTED),w=p.IsInFullSelectionMode(t),f=[],b;const tt='[data-pv*="\\"EID\\""]';if(h&&h.length>0)for(u=0;
204u<h.length;u++)l=h[u],k=Utils.GetVFormId(l.msID),Utils.StartsWith(y,k+".")&&(b=!0),f.push($($($PI(l.msID)).closest(tt)));if(b||nt||(f=[],f.push($($(n).closest(tt)))),i={},s=0,f.length===1){i=f[0].data("pv");s=1;i.SingleItemVisibleClass="";i.MultipleItemsVisibleClass="InvisibleC";var d=0,c="",g=function(){var n=$(this).width()*$(this).height();n>d&&(d=n,c=$(this).attr("poster")?$(this).attr("poster"):$(this).attr("src"))},o=i.IID;Utils.IsStringFilled(o)?(f[0].find(".AR img[src*='"+o+".jpg'], .AR img[src*='"+o+".gif'], video[poster*='"+o+".jpg']").each(g),c==""&&$(document).find(".AR img[src*='"+o+".jpg'], .AR img[src*='"+o+".gif'], video[poster*='"+o+".jpg']").each(g),c!=""&&(i.TempImage=c)):i.RepresentativeVisibleClass="InvisibleC";i.hasOwnProperty("GAK")||(i.GAK="",i.RepresentativeVisibleClass="InvisibleC");r=f[0].data("pv");r&&r.hasOwnProperty("EID")&&(i.EIDS=r.EID)}else{if(e="",w){for(u=0;u<f.length;u++)if(r=f[u].data("pv"),r&&r.hasOwnProperty("EID")&&e.length<=0){i=r;break}e="true"}else for(u=0;u<f.length;u++)r=f[u].data("pv"),r&&r.hasOwnProperty("EID")&&(s++,e.length>0?e=e+"|":i=r,e=e+r.EID);i.EIDS=e;i.SingleItemVisibleClass="InvisibleC";i.MultipleItemsVisibleClass="";i.TempImage=""}w?(a="data-selectioncount-"+t,v=parseInt($("a["+a+"]").attr(a)),i.SC=isNaN(v)?s:v):i.SC=s;i.SourceVFormID=y;Matrix3.maNextResponseReplacements=i}};MultipleSelectionMgr.Const={MGR_NAME:"MultipleSelection",FLAG_NONE:0,FLAG_NOT_SELECT:1,FLAG_SELECTED:16,FLAG_ALL:17,ITEM_OVER_CLASS:"Over",DOUBLE_CLICK_INTERVAL:500,REORDER_PNL:"ReorderPnl",REORDER_PNL_CLASS:"ReorderItem",ACTION_TYPE_SELECT_FULL:"SelectFull",ACTION_TYPE_DESELECT_FULL:"DeselectFull",ACTION_TYPE_DESELECT_SOME:"DeselectSome",ACTION_TYPE_SELECT_ALL:"SelectAll",ACTION_TYPE_SELECT_FULL_RESULT:"SelectFullResult",ACTION_TYPE_DESELECT_FULL_RESULT:"DeselectFullResult",SELECTION_RESULT_SUFFIX:"_SelectionResult",FLAG_COUNT_HIDDEN:"H"};MultipleSelectionMgr.moSingleton=null;MultipleSelectionMgr.GetInstance=function(){return MultipleSelectionMgr.moSingleton||(MultipleSelectionMgr.moSingleton=new MultipleSelectionMgr),MultipleSelectionMgr.moSingleton};MultipleSelectionMgr.miTimer=0;MultipleSelectionMgr.miLastID="";MultipleSelectionMgr.Click=function(n,t){var u=Utils.IsAndroid()||Utils.IsIPad(),r=t.GetID(),i;r!=null&&(!n.target||u&&MultipleSelectionMgr.GetInstance().IsNodeInActiveSelectionGroup($PI(r))||$(n.target).closest("a").length==0&&$(n.target).closest(".Input").length==0)&&(MultipleSelectionMgr.GetInstance().ClickOn(t,n.ctrlKey||n.metaKey,n.shiftKey),i=(new Date).getTime(),t.moSrcObj.Event_DoubleClick&&i-MultipleSelectionMgr.miTimer<=MultipleSelectionMgr.Const.DOUBLE_CLICK_INTERVAL&&MultipleSelectionMgr.miLastID==t.msID&&t.moSrcObj.Event_DoubleClick.Fire(),MultipleSelectionMgr.miTimer=i,MultipleSelectionMgr.miLastID=t.msID)};MultipleSelectionMgr.Over=function(n,t){DragDropMgr.IsDrag()||(this.moLastOver&&$RemoveClass(this.moLastOver,MultipleSelectionMgr.Const.ITEM_OVER_CLASS),$AddClass(t.GetID(),MultipleSelectionMgr.Const.ITEM_OVER_CLASS),this.moLastOver=t.GetID())};MultipleSelectionMgr.Out=function(n,t){$RemoveClass(t.GetID(),MultipleSelectionMgr.Const.ITEM_OVER_CLASS)};MultipleSelectionMgr.prototype={Add:function(n,t,i,r){var l=!0,p=!1,f,e,s,a,o,h,u,v,y,c,k;if(Utils.IsString(n)||(l=!1),t instanceof SelectionItem||(l=!1),l){if(this.moFromItems[n]=i,this.moToItems[n]=r,f=t.GetID(),e=$PI(f),!e)return;if(s=t.GetIndex(),n in this.moGroupToItems||(this.moGroupToItems[n]=new FastArray),f in this.moItemIDToGroups||(this.moItemIDToGroups[f]=new FastArray),p=this.moGroupToItems[n].Push(t)&&this.moItemIDToGroups[f].Push(n),Matrix3.RegisterInCache(f,MultipleSelectionMgr),this.moItems[f]=t,!isNaN(s)){if(a=!1,o=this.moLastElements[n],o!=null)if(o instanceof SelectionItem&&o.miIndex<s)o.miNextItem=t,t.miPreviousItem=o,this.moLastElements[n]=t;else{for(h=o,u=o.miPreviousItem;u!=null&&u.GetIndex()>s;)h=u,u=u.miPreviousItem;u!=null&&u.GetIndex()==s?(u.miNextItem!=null&&(u.miNextItem.miPreviousItem=t),u.miPreviousItem!=null&&(u.miPreviousItem.miNextItem=t)):(h.miPreviousItem=t,t.miNextItem=h,u!=null&&(t.miPreviousItem=u,u.miNextItem=t));a=!0}else this.moLastElements[n]=t;a&&this.moGroupToItems[n].Sort(this.SortByIndex);t.DebugTools_DisplayPosition()}if(v=e.GetProperty(ConstProperties.Const.HANDLE),v!=null&&(y=$PI(e.GetBrotherId(v)),y!=null&&(e=y)),t.mbDeferSelect&&(t.mbIsSelected=!1,this.ChangeItemState({Group:n,Item:t,Selecting:!0})),Utils.AddEvent(e,"click",function(n){MultipleSelectionMgr.Click(n,t)}),Utils.IsIE()||(Utils.AddEvent(e,"mouseover",function(n){MultipleSelectionMgr.Over(n,t)}),Utils.AddEvent(e,"mouseout",function(n){MultipleSelectionMgr.Out(n,t)})),c=$(`[id='${f}']`).closest(".PanelLine"),c.length>0){var d=$(c[0]).closest(".ABS.PanelTable"),w=EditableTable.GetTable(d[0].id),b=c[0].getAttribute("data-rid");b&&w&&(k=w.moLevelDict[b],k>0&&(this.moExtraGroupItems[n]||(this.moExtraGroupItems[n]=[]),this.moExtraGroupItems[n].push(t)))}}return p},RemoveExtraItem:function(n,t){this.moExtraGroupItems[n]&&(this.moExtraGroupItems[n]=this.moExtraGroupItems[n].filter(n=>t!=n.GetID()))},ClickOn:function(n,t,i){var u=n.GetID(),o,k,r,a,e,v,y,s,p;if(u in this.moItemIDToGroups){var w=!1,h=!n.IsSelected(),b=this.moItemIDToGroups[u].GetArray();for(o=0,k=b.length;o<k;o++){if(r=b[o],i&&!n.IsShiftClickDisabled()){var f=-1,c=this.moGroupToItems[r].GetArray(),l=this.moGroupToLastSelectedItemID[r];if(l&&Utils.GetRootOrPopupId(u)===Utils.GetRootOrPopupId(l))for(a in c)if(c[a].GetID()===l){f=a;break}if(this.moGroupToLastSelectedItemID[r]=u,f>=0){if(e=this.moGroupToItems[r].moHash[n],e>=0)for(v=f,y=e,f>e&&(v=e,y=f),s=v;s<=y;s++)p=c[s],Utils.IsInTopLevelPopup(p.GetID())&&this.ChangeItemState({Group:r,Item:p,Selecting:h});w=!0}}w||(this.moGroupToLastSelectedItemID[r]=u,t||n.IsForceControl()?this.ChangeItemState({Group:r,Item:n,Selecting:h}):this.DeselectGroup(r,n));this.GuessTheFullState(r,h);this.UpdateUIState(r)}}},HasSelectedItems:function(n){return this.IsInFullSelectionMode(n)?!0:this.HasStatedItems(n)},HasUnselectedItems:function(n){var t,i;return this.IsInFullSelectionMode(n)?this.HasStatedItems(n):(t=this.GetTotalItems(n),t<=0?(i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_NOT_SELECT,null),i&&i.length):!this.HasStatedItems(n)||this.GetStatedItemsEIDInGroup(n).size!=t)},DeselectGroup:function(n,t){var u=!0,e=!1,r,f,i,o;if(Utils.IsString(n)&&n in this.moGroupToItems||(u=!1),t instanceof SelectionItem||t==null||(u=!1),u){for(delete this.moGroupToFullSelectedState[n],r=this.moGroupToItems[n].GetArray(),f=0,i=0,o=r.length;i<o;i++)t!=r[i]&&r[i].IsSelected()&&(this.ChangeItemState({Group:n,Item:r[i],Selecting:!1}),f++);t!=null&&(t.IsSelected()?f==0&&t.IsSelected()&&this.ChangeItemState({Group:n,Item:t,Selecting:!1}):this.ChangeItemState({Group:n,Item:t,Selecting:!0}));this.UpdateUIState(n);e=!0}return e},Remove:function(n,t){var r=!0,u=!1,i,f,e;return Utils.IsString(n)||(r=!1),t instanceof SelectionItem||(r=!1),r&&(i=t.GetID(),n in this.moGroupToItems&&i in this.moItemIDToGroups&&(f=this.moGroupToItems[n].Remove(t),e=this.moItemIDToGroups[i].Remove(n),u=f&&e,this.moGroupToItems[n].Get
204Size()==0&&(delete this.moGroupToItems[n],delete this.moLastElements[n],delete this.moGroupToLastSelectedItemID[n]),this.moItemIDToGroups[i].GetSize()==0&&delete this.moItemIDToGroups[i],delete this.moItems[i])),u},GetObjects:function(n,t,i,r,u){var h=!0,e=null,o,l,f,s;if(Utils.IsString(n)||(h=!1),Utils.IsNumber(t)||(t=MultipleSelectionMgr.Const.FLAG_ALL),h&&(e=[],n in this.moGroupToItems)){var c=this.moGroupToItems[n].GetArray(),a=(t&MultipleSelectionMgr.Const.FLAG_SELECTED)==MultipleSelectionMgr.Const.FLAG_SELECTED,v=(t&MultipleSelectionMgr.Const.FLAG_NOT_SELECT)==MultipleSelectionMgr.Const.FLAG_NOT_SELECT;for(o=0,l=c.length;o<l;o++)(f=c[o],!u||f.GetID().includes("SelectPnl")||f.GetID().includes("SelectCkb")||f.GetID().includes("MainImgPnl"))&&(s=!0,r&&(s=Utils.IsStringFilled(i)?Utils.GetRootOrPopupId(i)==Utils.GetRootOrPopupId(f.GetID()):Utils.IsInTopLevelPopup(f.GetID())),s&&(i==f.GetID()?e.push(f):a&&f.IsSelected()?e.push(f):v&&!f.IsSelected()&&e.push(f)))}return e},GetItemsFromGroupsIn:function(n,t){var h=!0,r=null,f,u,e,o,c,s;if(Utils.IsString(n)||(h=!1),h)for(r=[],f=this.GetTargetSelectionsInVForm(n,t),u=0;u<f.length;u++)for(e=f[u],o=this.moItemIDToGroups[e].GetArray(),i=0,c=o.length;i<c;i++)s=this.GetObjects(o[i],MultipleSelectionMgr.Const.FLAG_SELECTED,e),s!=null&&(r=r.concat(s));return r},GetTargetSelectionsInVForm:function(n,t){for(var o=Object.keys(this.moItemIDToGroups),r=[],u=[],f=0,s=o.length,i,e;f<s;f++)i=o[f],Utils.StartsWith(i,n)&&Utils.GetVFormId(i)==n&&(e=Utils.EndsWith(i,MultipleSelectionMgr.Const.REORDER_PNL)||$E(i).hasClass(MultipleSelectionMgr.Const.REORDER_PNL_CLASS),t?e&&r.push(i):e||r.push(i),r.includes(i)||u.push(i));return t&&r.length===0&&u.length>0&&(r=[],r.push(u[0])),r},Contains:function(n,t){var i=!0,r=!1;return Utils.IsString(n)||(i=!1),t instanceof SelectionItem||(i=!1),i&&n in this.moGroupToItems&&this.moGroupToItems[n].Exists(t)&&(r=!0),r},SelectFull:function(n,t){Utils.IsString(n)&&(this.ChangeFullState(n,!0),this.SelectAll(n,t))},DeSelectFull:function(n,t){this.ChangeFullState(n,!1);this.DeselectAll(n,t)},SelectAll:function(n,t){var r,f,u;if(!Utils.IsString(n))return!1;var o=this.moFromItems[n],s=this.moToItems[n],e=s-o+1,i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_ALL,null,t,!0);if(i&&i.length){if(e&&i.length<e){Matrix3.ShowNotification(Param.SelectAllWhenBatchLoadingMessage,{notificationType:"warning"});return}for(r=0,f=i.length;r<f;r++)(u=i[r],this.mbRestoring&&u.IsVisited())||this.ChangeItemState({Group:n,Item:u,Selecting:!0})}else if(i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_ALL,null,t),i&&i.length)for(r=0,f=i.length;r<f;r++)if((u=i[r],!u.mbDeactivateSelection)&&this.ChangeItemState({Group:n,Item:u,Selecting:!0,ForceEvent:!0}))break;this.GuessTheFullState(n,!0);this.UpdateUIState(n,!0)},SelectAllIfEmpty:function(n,t){if(!Utils.IsString(n))return!1;var i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_SELECTED,null,t);i&&i.length||this.SelectAll(n,t)},GuessTheFullState:function(n,t){var r,i;this.mbRestoring||(r=!1,t?!this.IsInFullSelectionMode(n)&&this.HasStatedItems(n)&&(r=!0):this.IsInFullSelectionMode(n)&&this.HasStatedItems(n)&&(r=!0),r&&(i=this.GetTotalItems(n),i<=0&&(i=this.moGroupToItems[n].moArray.length),i>0&&this.GetStatedItemsEIDInGroup(n).size==i&&this.ChangeFullState(n,t)))},RestoreSelection:function(n){var t,i,r,u;if(!Utils.IsString(n))return!1;if(t=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_NOT_SELECT,null,!0),t&&t.length)for(i=0,r=t.length;i<r;i++)u=t[i],this.ChangeItemState({Group:n,Item:u,Selecting:!0})},DeselectAll:function(n,t){var i,r,u,f;if(!Utils.IsString(n))return!1;if(i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_SELECTED,null,t),i&&i.length)for(r=0,u=i.length;r<u;r++)this.ChangeItemState({Group:n,Item:i[r],Selecting:!1});else if(i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_ALL,null,t),i&&i.length)for(r=0,u=i.length;r<u;r++)if((f=i[r],!f.mbDeactivateSelection)&&this.ChangeItemState({Group:n,Item:f,Selecting:!1,ForceEvent:!0}))break;this.UpdateUIState(n,!0)},SelectAllRemainingForSelectedGroups:function(){try{this.mbRestoring=!0;for(var n in this.moGroupToItems)this.RestoreSelection(n)}finally{this.mbRestoring=!1}},GetEID:function(n){return this.GetEIDInfo(n).ID},GetEIDInfo:function(n){var t=$E(Utils.GetVFormId(n)).data("pv");if(typeof t=="string")try{t=JSON.parse(t)}catch(i){t=null}return t?{ID:t.EID,IsID:!0,DGID:t.DGID,DGC:t.DGC}:{ID:n}},HasStatedItems:function(n){var t=this.moGroupToStatedItemsEID[n];return t&&t.size>0}
204,GetStatedItemsEIDInGroup:function(n){return n in this.moGroupToStatedItemsEID||(this.moGroupToStatedItemsEID[n]=new Map),this.moGroupToStatedItemsEID[n]},IsInFullSelectionMode:function(n){return this.moGroupToFullSelectedState[n]},ChangeItemState:function(n){var t=n.Group,i=n.Item,c=n.Selecting,s=n.DisableEvent,v=n.ForceEvent,y=this.IsInFullSelectionMode(t),l=i.GetID(),e=this.GetEIDInfo(l),r=e.ID,o=!1,f=!0,u,h,a;if(c){if((i.IsSelected()||i.mbDeactivateSelection)&&(f=!1),f&&this.mbRestoring&&(f=!1,this.mbRestoring&&e.IsID&&(f=y?!this.HasSelectedItems(t)||!this.GetStatedItemsEIDInGroup(t).has(r):this.HasSelectedItems(t)&&this.GetStatedItemsEIDInGroup(t).has(r))),f){i.SelectItem(s);for(u in this.moItems)h=this.GetEID(u),h!=r||u==l||this.moItems[u].IsSelected()||this.moItems[u].SelectItem(!0);o=!0}}else if((!i.IsSelected()||i.mbDeactivateSelection)&&(f=!1),f){i.DeselectItem(s);for(u in this.moItems)h=this.GetEID(u),h==r&&u!=l&&this.moItems[u].IsSelected()&&this.moItems[u].DeselectItem(!0);o=!0}return!o&&v&&(i.IsSelected()?i.SelectItem(s):i.DeselectItem(s),o=!0),f&&r&&(a=!1,a=this.IsInFullSelectionMode(t)?!c:c,a?(this.GetStatedItemsEIDInGroup(t).set(r,i.GetIndex()),e.DGID&&this.GetStatedItemsEIDToDynamicGroupID(t).set(r,{DEID:r,DGID:e.DGID,DGC:e.DGC})):this.HasStatedItems(t)&&(this.GetStatedItemsEIDInGroup(t).delete(r),this.GetStatedItemsEIDToDynamicGroupID(t).delete(r))),o},ResetSelectionState:function(){this.ClearFullSelectionData();this.HideRefreshPnl()},InvertAll:function(n,t){var u,i,r,e,f;if(!Utils.IsString(n))return!1;if(u=!1,this.ChangeFullState(n,!this.moGroupToFullSelectedState[n],!0),i=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_ALL,null,t),i!=null){for(r=0,e=i.length;r<e;r++)f=i[r],this.ChangeItemState({Group:n,Item:f,Selecting:!f.IsSelected()});this.UpdateUIState(n);u=!0}return u},RefreshNode:function(n){for(var i=this.moItemIDToGroups[n].GetArray(),t=0,r=i.length;t<r;t++)this.Remove(i[t],this.moItems[n])},GetSelectedItemByID:function(n){return this.moItems[n]},GetGroupIDsFromControlID:function(n){var t=this.moItemIDToGroups[n];return t?t.GetArray():[]},IsNodeInActiveSelectionGroup:function(n){var t,i,r;if(!n||!this.moItemIDToGroups||!this.moGroupToStatedItemsEID)return!1;for(t=n,i=this.moGroupToStatedItemsEID;t&&t!==document.body;){if(t.id&&t.id in this.moItemIDToGroups)return r=this.GetGroupIDsFromControlID(t.id),r.some(function(n){var t=i[n];return t&&t.size>0});t=t.parentNode}return!1},GetPositionToInsertBefore:function(n){var i=this.GetSelectedItemByID(n),r,t,u;if(i&&Utils.IsNumber(i.miIndex)){for(r=i.miIndex,t=i.miPreviousItem;t&&Utils.GetVFormId(t.GetID())===Utils.GetVFormId(i.GetID());)t=t.miPreviousItem;return u=t?t.miIndex:i.miIndex-2,(u+r)/2}return null},GetPositionToInsertAfter:function(n){var t=this.GetSelectedItemByID(n),i,r,u;if(t&&Utils.IsNumber(t.miIndex)){for(i=t.miNextItem;i&&Utils.GetVFormId(i.GetID())===Utils.GetVFormId(t.GetID());)i=i.miNextItem;return r=t.miNextItem?t.miNextItem.miIndex:t.miIndex+2,u=t.miIndex,(u+r)/2}return null},Sort:function(n,t,i,r){var o=this.GetSelectedItemByID(t),p,nt,l,w,f,e,c,b,k,s,a,u,v,y,h,g,tt;if(o||(p=this.GetTargetSelectionsInVForm(Utils.GetVFormId(t),!0),p&&p.length>0&&(nt=this.GetTargetSelectionsInVForm(Utils.GetVFormId(t),!0)[0],o=this.GetSelectedItemByID(nt))),l=0,o&&Utils.IsNumber(o.miIndex)){if(i){for(e=o,w=o.miIndex,f=o.miPreviousItem;f&&Utils.GetVFormId(f.GetID())===Utils.GetVFormId(o.GetID());)f=f.miPreviousItem;l=f?f.miIndex:o.miIndex-2}else{for(e=o.miNextItem;e&&Utils.GetVFormId(e.GetID())===Utils.GetVFormId(o.GetID());)e=e.miNextItem;w=e?e.miIndex:o.miIndex+2;
204f=o;l=o.miIndex}for(b=(w-l)/(n.length+1),c=[],f&&(c.push(f),f.miNextItem&&c.push(f.miNextItem),f.miPreviousItem&&c.push(f.miPreviousItem)),e&&(c.push(e),e.miNextItem&&c.push(e.miNextItem),e.miPreviousItem&&c.push(e.miPreviousItem)),k={},s=0,a=c.length;s<a;s++){var d=c[s],it=Utils.GetVFormId(d.msID),u={};u.msVFormID=it;u.miOriginalPosition=d.miIndex;u.mbIsAnchorItem=!0;k[d.msID]=u}for(s=0,a=n.length;s<a;s++)u=this.GetSelectedItemByID(n[s]),u&&u!=f&&(u.miIndex=l+b*(s+1),r&&(u!=e?(u.miPreviousItem&&(u.miPreviousItem.miNextItem=u.miNextItem),u.miNextItem&&(u.miNextItem.miPreviousItem=u.miPreviousItem),u.miPreviousItem=f,u.miNextItem=e,f&&(f.miNextItem=u),u.miNextItem&&(u.miNextItem.miPreviousItem=u),f=u):s+1<n.length&&(f=e,e=e.miNextItem)),u.DebugTools_DisplayPosition());if(v=l+b+"",v=v.substring(0,15),y=l+"",y=y.substring(0,15),parseFloat(v)==parseFloat(y)){for(h=o;h.miPreviousItem;)h=h.miPreviousItem;n=[];g=1;do h.miIndex=g,h.DebugTools_DisplayPosition(),g+=1,n.push(h.GetID()),h=h.miNextItem;while(h)}for(tt in this.moGroupToItems)this.moGroupToItems[tt].Sort(this.SortByIndex)}return[n,k]},Refresh:function(){for(var n in this.moGroupsSelectionBarVisible)this.UpdateTopSelectionBarOnSelection(n)},SortByIndex:function(n,t){return isNaN(n.miIndex)||isNaN(t.miIndex)?0:n.miIndex-t.miIndex},GetActionButtons:function(n,t,i){if(!this.moGroupToTypeToActions[n]){if(i)return;this.moGroupToTypeToActions[n]={}}if(!this.moGroupToTypeToActions[n][t]){if(i)return;this.moGroupToTypeToActions[n][t]={}}return this.moGroupToTypeToActions[n][t]},IsSelectionV2:function(n){return!!(this.moGroupToMasterCheckboxID&&this.moGroupToMasterCheckboxID[n])},ParseGroupSuffix:function(n){var t=MultipleSelectionMgr.Const.SELECTION_RESULT_SUFFIX;return Utils.IsStringFilled(t)&&n.indexOf(t,n.length-t.length)!==-1?{realGroup:n.slice(0,n.length-t.length),isResultPanel:!0}:{realGroup:n,isResultPanel:!1}},RegisterSelectAllBtn:function(n,t){this.GetActionButtons(t,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_ALL)[n.GetId()]=!0;Utils.AddEvent(n,"click",function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=MultipleSelectionMgr.GetInstance();n.IsSelectionV2(t)?n.V2_SelectAll(t,!0):n.SelectAll(t,!0)})})},RegisterDeselecteAllBtn:function(){},RegisterSelectFullForGroup:function(n,t){var i=this.ParseGroupSuffix(t),r=i.isResultPanel?MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_FULL_RESULT:MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_FULL;this.GetActionButtons(i.realGroup,r)[n.GetId()]=!0;Utils.AddEvent(n,"click",function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=MultipleSelectionMgr.GetInstance();i.isResultPanel||n.IsSelectionV2(i.realGroup)?n.V2_SelectFull(i.realGroup,!0,i.isResultPanel):n.SelectFull(i.realGroup,!0)})})},RegisterDeselectFullForGroup:function(n,t){var i=this.ParseGroupSuffix(t),r=i.isResultPanel?MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_FULL_RESULT:MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_FULL;this.GetActionButtons(i.realGroup,r)[n.GetId()]=!0;Utils.AddEvent(n,"click",function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=MultipleSelectionMgr.GetInstance();i.isResultPanel||n.IsSelectionV2(i.realGroup)?n.V2_DeSelectFull(i.realGroup,!0):n.DeSelectFull(i.realGroup,!0)})})},RegisterDeselecteSomeBtn:function(n,t){this.GetActionButtons(t,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_SOME)[n.GetId()]=!0;Utils.AddEvent(n,"click",function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=MultipleSelectionMgr.GetInstance();n.IsSelectionV2(t)?n.V2_DeselectPageOnly(t,!0):n.DeselectAll(t,!0)})})},RegisterVisibleIfSelection:function(n,t){this.moVisibleIfSelected[t]?this.moVisibleIfSelected[t].push(n):this.moVisibleIfSelected[t]=[n]},RegisterVisibleWhenSelectSome:function(n,t){this.moVisibleWhenSelectSome[t]?this.moVisibleWhenSelectSome[t].push(n.GetId()):this.moVisibleWhenSelectSome[t]=[n.GetId()]},RegisterVisibleWhenSelectAll:function(n,t){this.moVisibleWhenSelectAll[t]?this.moVisibleWhenSelectAll[t].push(n.GetId()):this.moVisibleWhenSelectAll[t]=[n.GetId()]},RegisterEnableIfSelection:function(n,t){var f,u;this.moEnableIfSelected[t]?this.moEnableIfSelected[t].indexOf(n)<0&&this.moEnableIfSelected[t].push(n):this.moEnableIfSelected[t]=[n];f=$Control(n,ButtonCtrl.Const.CONTROL_NAME);f.Action_Enable_Setup();var i=$E(n),r=i.find("a"),e="EIS_PS";i.hasClass(e)||(r.length>0&&(u=r[0].onclick),this.moEnableIfSelectedFuncs[t]||(this.moEnableIfSelectedFuncs[t]={}),this.moEnableIfSelectedFuncs[t][n]=u,u&&r.removeAttr("onclick"),i.addClass(e))},ChangeFullState:function(n,t,i){t?this.moGroupToFullSelectedState[n]=!0:delete this.moGroupToFullSelectedState[n];i||(delete this.moGroupToStatedItemsEID[n],delete this.moStatedItemsEIDToDynamicGroupID[n])},ClearFullSelectionData:function(){for(var n in this.moGroupToItems)this.DeselectAll(n,!1);if(this.moGroupToFullSelectedState={},this.moGroupToStatedItemsEID={},this.moStatedItemsEIDToDynamicGroupID={},this.moGroupToItems)for(n in this.moGroupToItems)this.UpdateUIState(n)},SyncVisibleIfSelected:function(n,t,i){if(this.moVisibleIfSelected[n]){var r="InvisibleC";
204this.moVisibleIfSelected[n].forEach(function(n){if(Utils.IsInTopLevelPopup(n)===!0){var u=$E(n);$(".DamView_SelectionBar",u).length!==0&&(t?i&&u.removeClass(r).show():u.hasClass("ForcedVisible")||u.addClass(r))}})}},SyncEnableIfSelected:function(n,t){if(this.moEnableIfSelected[n]){var i="Disabled",r=this;this.moEnableIfSelected[n].forEach(function(u){if(Utils.IsInTopLevelPopup(u)===!0){var f=$E(u),e=f.find("a"),o=$Control(u,ButtonCtrl.Const.CONTROL_NAME);t?(o.Action_Enable(),f.removeClass(i),e.length>0&&e.off("click").click(r.moEnableIfSelectedFuncs[n][u])):(o.Action_Disable(),f.addClass(i),e.off("click"))}})}},UpdateUIState:function(n,t){var h,o,b,k,s,l;if(this.IsSelectionV2(n)){this.V2_UpdateUIState(n);h=this.HasSelectedItems(n);this.SyncVisibleIfSelected(n,h,t);this.SyncEnableIfSelected(n,h);return}var a="InvisibleC",u=[],f=[],r=function(n,t,i){if(Utils.IsInTopLevelPopup(n)===!0&&(t?(f.push(n),$E(n).find("a").attr("role","button"),$E(n).find("a").attr("tabindex",0),$E(n).removeClass(a).show()):($E(n).find("a").attr("tabindex",-1),$E(n).addClass(a).hide()),$E(n)[0]&&$E(n)[0].contains(document.activeElement)&&u.push(n)),i){var r=$E(n)[0];r&&($(r).css("width",""),r.miTextWidth=null,r.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(r),PositionMgr.GetInstance().AddToDirtyXList(r))}},i=this.HasSelectedItems(n),e=this.HasUnselectedItems(n),v=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_FULL,!0),y=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_FULL,!0),p=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_SOME,!0),w=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_ALL,!0),c=!1;if(v&&Object.keys(v).forEach(function(n){r(n,!i)}),y&&Object.keys(y).forEach(function(n){r(n,i&&!e)}),p&&Object.keys(p).forEach(function(n){r(n,i&&e)}
204),w&&Object.keys(w).forEach(function(n){r(n,!i)}),this.moVisibleWhenSelectSome[n]&&(this.moVisibleWhenSelectSome[n].forEach(function(n){r(n,i&&e,!0)}),c=!0),this.moVisibleWhenSelectAll[n]&&(this.moVisibleWhenSelectAll[n].forEach(function(n){r(n,!e,!0)}),c=!0),this.SyncVisibleIfSelected(n,i,t),this.SyncEnableIfSelected(n,i),c&&PositionMgr.GetInstance().CalculatePosition(),u.length>0&&f.length>0)for(o=0;o<u.length;o++)for(b=u[o],k=Utils.GetVFormId(b),s=0;s<f.length;s++)if(l=f[s],l.startsWith(k)){$E(l).find("a")[0].focus();break}},PostRenderRefreshSelection:function(){for(var n in this.moGroupToItems)this.UpdateUIState(n,!0);this.SelectAllRemainingForSelectedGroups()},IsGroupInTopPopup:function(n){var t=this.moGroupToTypeToActions[n],i,r;if(t)for(i in t)for(r in t[i])if(Utils.IsInTopLevelPopup(r))return!0;return!1},GetSelectionBarForGroup:function(n){var t=$(".Specific_SelectionBar"),i;return!t.length&&(t=$(".DamView_SelectionBar"),!t.length)?null:(i=t.filter(function(){var i=$(this).attr("data-pv"),t;return i?(t=JSON.parse(i),t["prop-sel-group"]&&t["prop-sel-group"]===n):!1}),i.length||(i=t.filter(function(){return Utils.IsInTopLevelPopup($(this).attr("id"))})),!i.length)?null:i[0]},GetTotalItems:function(n){var i=this.GetSelectionBarForGroup(n),t,r;return i?(t=$(i).attr("data-pv"),!t)?0:(r=JSON.parse(t),parseInt(r["prop-tic"])||0):0},UpdateTopSelectionBarOnSelection:function(n){var t=this.GetSelectionBarForGroup(n),i,f,p,l,a,u,s,h,v,y;if(!t)return 0;if(t=$(t),i=t.parent(),f=t.attr("data-pv"),f=typeof f!="undefined"?JSON.parse(f):{},p=this.moVisibleIfSelected.hasOwnProperty(n)&&this.moVisibleIfSelected[n].length>0&&this.moVisibleIfSelected[n].indexOf(i.attr("id"))>=0,p){var g=this.HasStatedItems(n)?this.GetStatedItemsEIDInGroup(n):new Map,c=g.size,w=this.GetStatedItemsEIDToDynamicGroupID(n);w&&(l=0,w.forEach(function(n){l+=n.DGC-1}),c+=l);var o=!1,e=!1,b=f["prop-tic"],nt=b==MultipleSelectionMgr.Const.FLAG_COUNT_HIDDEN,k=0;if(nt)$('.damview-selectionbar-selectioncontrolspnl [id$="SelectedInfoLbl"]',t).addClass("InvisibleC"),$(".damview-selectionbar-count",t).addClass("InvisibleC"),s=$(".SelectionBarContainer",t),s.removeClass("InvisibleC");else{var tt=parseInt(b),r=this.IsInFullSelectionMode(n)?tt-c:c,d=0;this.moExtraGroupItems[n]&&(d=this.moExtraGroupItems[n].filter(t=>this.IsInFullSelectionMode(n)?!this.GetStatedItemsEIDInGroup(n).get(t):!!this.GetStatedItemsEIDInGroup(n).get(t)).length);r+=d;a=this.moGroupsSelectionBarVisible[n]&&r<=0;o=!this.moGroupsSelectionBarVisible[n]&&r>0;e=o||a;this.moGroupsSelectionBarVisible[n]=r>0;u=$(".damview-selectionbar-count",t);u.text(r);u.css("width","auto");u.removeClass("InvisibleC");k=u.offset().left+u.width()+5;r>0&&(s=$(".SelectionBarContainer",t),s.removeClass("InvisibleC"))}if(h=$(".damview-selectionbar-selectioncontrolspnl",t),v=h.offset(),v.left=k,h.offset(v),h.removeClass("InvisibleC"),!e){this.moGroupsSelectionBarVisible[n]&&i.removeClass("InvisibleC");return}(o?(y=$(".StandaloneRefreshPnl",t),y.hasClass("InvisibleC")?(i.addClass("InvisibleC"),i[0].hasAttribute("data-no-animation")||i.css({top:Utils.GetPageHeight()}),i.removeClass("InvisibleC"),i.show()):(y.addClass("InvisibleC"),e=!1)):$(".RefreshViewboxBtn",t).hasClass("InvisibleC")||($('div[id$=":MainItemsHolderPnl"]',t).find("*").addClass("InvisibleC"),$('div[id$=":RefreshPnl"]',t).removeClass("InvisibleC"),$('div[id$=":RefreshPnl"]',t).find("*").removeClass("InvisibleC"),e=!1),e)&&this.AnimateSelectionBar(i,o,a)}},AnimateSelectionBar:function(n,t,i){var r=function(){n.length>0&&(n.each(function(n,t){PositionMgr.GetInstance().AddToDirtyYList($PI(t.id))}),PositionMgr.GetInstance().CalculatePosition())};n[0].hasAttribute("data-no-animation")||n.animate({top:t?"-=70":i?"+=70":"+=0"},300,function(){n.css({top:Utils.GetPageHeight()-70});i&&n.addClass("InvisibleC");r()})},UpdateTopSelectionBarAfterMoved:function(n){var u=$(".DamView_SelectionBar"),t,f,i,e,r;u.length>0&&(t=u.filter(function(){return Utils.IsInTopLevelPopup($(this).attr("id"))}),t.length>0&&(f=$(".SelectionBarContainer",t),f.removeClass("InvisibleC"),i=t.parent(),this.moVisibleIfSelected.hasOwnProperty(n)&&this.moVisibleIfSelected[n].length>0&&this.moVisibleIfSelected[n].indexOf(i.attr("id"))>=0&&(i.addClass("ForcedVisible"),this.HasStatedItems(n)&&(this.moGroupToStatedItemsEID[n].clear(),this.moStatedItemsEIDToDynamicGroupID[n].clear()),e=i.hasClass("InvisibleC"),r=i[0].hasAttribute("data-no-animation"),e?($('div[id$=":MainItemsHolderPnl"]',t).find("*").addClass("InvisibleC"),r||i.css({top:Utils.GetPageHeight()}),i.removeClass("InvisibleC"),i.show(),$('div[id$=":RefreshPnl"]',t).removeClass("InvisibleC"),$('div[id$=":RefreshPnl"]',t).find("*").removeClass("InvisibleC"),$(".StandaloneRefreshPnl",t).removeClass("InvisibleC"),$(".RefreshViewboxBtn",t).removeClass("InvisibleC"),r||i.animate({top:"-=70"},300,function(){i.css({top:Utils.GetPageHeight()-70})})):($(".StandaloneRefreshPnl",t).removeClass("InvisibleC"),$(".RefreshViewboxBtn",t).removeClass("InvisibleC")))))},UpdateTopSelectionBarAfterViewboxRefreshed:function(n){var r=$(".DamView_SelectionBar"),t,i;r.length>0&&(t=r.filter(function(){return Utils.IsInTopLevelPopup($(this).attr("id"))}),t.length>0&&(i=t.parent(),this.moVisibleIfSelected.hasOwnProperty(n)&&this.moVisibleIfSelected[n].length>0&&this.moVisibleIfSelected[n].indexOf(i.attr("id"))>=0&&(i.removeClass("ForcedVisible"),this.moGroupToItems[n]||delete this.moGroupsSelectionBarVisible[n])))},HideRefreshPnl:function(){var t=!1,i,r,n,u;for(i in this.moGroupsSelectionBarVisible)if(this.moGroupsSelectionBarVisible[i]){t=!0;break}t&&(r=$(".DamView_SelectionBar"),n=r.filter(function(){return Utils.IsInTopLevelPopup($(this).attr("id"))}),n.length!==0)&&($('div[id$=":RefreshPnl"]',n).addClass("InvisibleC"),$(".StandaloneRefreshPnl",n).addClass("InvisibleC"),$(".RefreshViewboxBtn",n).addClass("InvisibleC"),u=n.parent(),this.AnimateSelectionBar(u,!1,!0))},HasVisibleSelectionBar:function(){for(var n in this.moGroupsSelectionBarVisible)if(this.moGroupsSelectionBarVisible[n])return!0;return!1},HighLightAssetsInView:function(n,t){var f,i,r,u;if(n&&t){f=new Set(n.split(","));for(i in this.moItems)r=this.GetEID(i),f.has(r)&&(u=$('div[data-pv*="'+r+'"]').filter(function(){return Utils.IsInTopLevelPopup(i)}),u.length&&u.addClass(t));PreloadMgr.Reset(!1)}},UnHighLightAssetsInView:function(n,t){var f,r,u,i;if(n&&t){f=new Set(n.split(","));for(r in this.moItems)u=this.GetEID(r),f.has(u)&&(i=$('div[data-pv*="'+u+'"]').filter(function(){return Utils.IsInTopLevelPopup(r)}),i.length&&!i.attr("data-hlp")&&i.removeClass(t));PreloadMgr.Reset(!1)}},HighLightAssetsInViewPermanent:function(n,t){var f,r,u,i;if(n&&t){f=new Set(n.split(","));for(r in this.moItems)u=this.GetEID(r),f.has(u)&&(i=$('div[data-pv*="'+u+'"]').filter(function(){return Utils.IsInTopLevelPopup(r)}),i.length&&(i.addClass(t),i.attr("data-hlp","1")))}},UnHighLightAssetsInViewPermanent:function(n,t){var f,r,u,i;if(n&&t){f=new Set(n.split(","));for(r in this.moItems)u=this.GetEID(r),f.has(u)&&(i=$('div[data-pv*="'+u+'"]').filter(function(){return Utils.IsInTopLevelPopup(r)}),i.length&&(i.removeClass(t),i.removeAttr("data-hlp")));PreloadMgr.Reset(!1)}},ForceUnHighlightAllAssets:function(n,t){$("div[data-hlp='1']").removeClass(t);$("div[data-hlp='1']").removeAttr("data-hlp");this.UnHighLightAssetsInView(n,t)},ForceUnHighlightAllAssetsInView:function(n){$("."+n+"").removeClass(""+n+"")},GetStatedItemsEIDToDynamicGroupID:function(n){return n in this.moStatedItemsEIDToDynamicGroupID||(this.moStatedItemsEIDToDynamicGroupID[n]=new Map),this.moStatedItemsEIDToDynamicGroupID[n]},RemoveItemsFromSelection:function(n,t){var i,r,u;
204if(t&&n)try{if(i=JSON.parse(t),!i)return;r=this.GetStatedItemsEIDInGroup(n);u=this.GetStatedItemsEIDToDynamicGroupID(n);i.forEach(function(n){r.delete(n);u.delete(n)})}catch(f){Matrix3.LogError(f,!0)}}};SelectionItem.Const={CLASS_SELECTED:"Selected"};SelectionItem.prototype={IsSelected:function(){return this.mbIsSelected},IsForceControl:function(){return this.mbForceCtrl},IsKeepSelected:function(){return this.mbKeepSelected},IsVisited:function(){return this.mbVisited},ChangeState:function(n){this.mbIsSelected?this.DeselectItem(n):this.SelectItem(n)},GetID:function(){return this.msID},SelectItem:function(n){var i=!0,t;this.mbDeactivateSelection&&(i=!1);i&&($AddClass(Utils.GetVFormId(this.GetID()),SelectionItem.Const.CLASS_SELECTED),!n&&$Control(this.GetID(),PanelAdvancedCtrl.Const.CONTROL_NAME).Event_SelectionChange&&(ClipboardProperties.msCache="1",t=$Control(this.GetID(),PanelAdvancedCtrl.Const.CONTROL_NAME),ClickDeferredMgr.GetInstance().Add(t.Event_SelectionChangeArgs,t.Event_SelectionChange)),this.mbIsSelected=!0,this.mbVisited=!0)},DeselectItem:function(n){var i=!0,t;this.mbDeactivateSelection&&(i=!1);i&&($RemoveClass(Utils.GetVFormId(this.GetID()),SelectionItem.Const.CLASS_SELECTED),!n&&$Control(this.GetID(),PanelAdvancedCtrl.Const.CONTROL_NAME).Event_SelectionChange&&(ClipboardProperties.msCache="0",t=$Control(this.GetID(),PanelAdvancedCtrl.Const.CONTROL_NAME),ClickDeferredMgr.GetInstance().Add(t.Event_SelectionChangeArgs,t.Event_SelectionChange)),this.mbIsSelected=!1,this.mbVisited=!0)},GetIndex:function(){return this.miIndex},IsShiftClickDisabled:function(){return this.mbDisableShiftClick},toString:function(){return this.msID},DebugTools_DisplayPosition:function(n){if(ControlMgr.GetInstance().GetReference("DebugSummary")&&Utils.IsStorageAvailable()&&sessionStorage.getItem("MatrixDebug.ReorderDbg")){var t="Position = "+this.miIndex;$E(this.GetID()).find(".debug").remove();$E(this.GetID()).append("<div class='debug' style='color:green; word-wrap:break-word; background-color: rgba(255,255,255,0.7); font-size:10px; '>Debug info:<br/>"+t+"<\/div>");n==null&&(this.miPreviousItem&&this.miPreviousItem.DebugTools_DisplayPosition(!0),this.miNextItem&&this.miNextItem.DebugTools_DisplayPosition(!0))}}},function(){var n=MultipleSelectionMgr.prototype,t="Page",i="AllPages";n.V2_GetCountSelectedOnCurrentPage=function(n){for(var i,r,u,o,s=this.moFromItems[n],h=this.moToItems[n],c=this.GetStatedItemsEIDInGroup(n),l=this.IsInFullSelectionMode(n),f=this.moGroupToItems[n]?this.moGroupToItems[n].GetArray():[],e=0,t=0;t<f.length;t++)(i=f[t],r=i.GetIndex(),r<s||r>h)||(u=c.has(this.GetEID(i.GetID())),o=l?!u:u,o&&e++);return e};n.V2_SelectFull=function(n,t,i){Utils.IsString(n)&&(this.moGroupFullSelectedViaPanel||(this.moGroupFullSelectedViaPanel={}),this.moGroupFullSelectedViaPanel[n]=!!i,!i&&this.moGroupPageSelectedViaCheckbox&&(this.moGroupPageSelectedViaCheckbox[n]=!1),this.SelectFull(n,t),this.UpdateTopSelectionBarOnSelection(n))};n.V2_DeSelectFull=function(n,t){Utils.IsString(n)&&(this.moGroupFullSelectedViaPanel&&(this.moGroupFullSelectedViaPanel[n]=!1),this.DeSelectFull(n,t))};n.V2_SelectAll=function(n,t){if(!Utils.IsString(n))return!1;if(this.IsInFullSelectionMode(n)){var r=this.moFromItems[n],u=this.moToItems[n],i=u-r+1,f=i>0&&this.V2_GetCountSelectedOnCurrentPage(n)>=i;f&&this.DeSelectFull(n,t)}this.V2_SelectPageOnly(n,t)};n.V2_SelectPageOnly=function(n,t,i){var u,f,e,o;if(!Utils.IsString(n))return!1;var s=this.moFromItems[n],h=this.moToItems[n],c=h-s+1,r=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_ALL,null,t,!0);if(r&&r.length&&c&&r.length<c){Matrix3.ShowNotification(Param.SelectAllWhenBatchLoadingMessage,{notificationType:"warning"});return}for(u=0;r&&u<r.length;u++)(f=r[u],e=f.GetIndex(),e<s||e>h)||this.ChangeItemState({Group:n,Item:f,Selecting:!0});o=this.GetTotalItems(n);o>0&&this.GetStatedItemsEIDInGroup(n).size>=o&&this.ChangeFullState(n,!0);this.moGroupPageSelectedViaCheckbox||(this.moGroupPageSelectedViaCheckbox={});this.moGroupPageSelectedViaCheckbox[n]=!!i;this.UpdateUIState(n)};n.V2_DeselectPageOnly=function(n,t){var i,u,f,e;if(!Utils.IsString(n))return!1;var o=this.moFromItems[n],s=this.moToItems[n],r=this.GetObjects(n,MultipleSelectionMgr.Const.FLAG_SELECTED,null,t);for(i=0;r&&i<r.length;i++)(u=r[i],f=u.GetIndex(),f<o||f>s)||this.ChangeItemState({Group:n,Item:u,Selecting:!1});e=this.GetTotalItems(n);this.IsInFullSelectionMode(n)&&e>0&&this.GetStatedItemsEIDInGroup(n).size>=e&&this.ChangeFullState(n,!1);this.UpdateUIState(n)};n.V2_RegisterResultPanel=function(n,t){this.moGroupToResultPanelID||(this.moGroupToResultPanelID={});this.moGroupToResultPanelID[t]=n;var i=$E(n);i.length&&i.addClass(StyleMgr.Const.CLASS_INVISIBLE).hide()};n.V2_RegisterResultLabel=function(n,r,u){this.moGroupToResultLabelID||(this.moGroupToResultLabelID={});this.moGroupToResultLabelID[r]||(this.moGroupToResultLabelID[r]={});var f=u===i?i:t;this.moGroupToResultLabelID[r][f]=n};n.V2_UpdateResultPanel=function(n,r,u,f){var a=this.moGroupToResultPanelID?this.moGroupToResultPanelID[n]:null,h=this.moGroupToResultLabelID?this.moGroupToResultLabelID[n]:null,e,o,l,k,s;if(a&&(e=StyleMgr.Const.CLASS_INVISIBLE,o=$E(a),o.length)){var v=o[0],d=this.moFromItems[n],g=this.moToItems[n],c=g-d+1,y=this.V2_GetCountSelectedOnCurrentPage(n),p=c>0&&y>=c,nt=Utils.IsAndroid()||Utils.IsIPad(),tt=this.GetTotalItems(n)>c,w=f>y,it=this.moGroupPageSelectedViaCheckbox?!!this.moGroupPageSelectedViaCheckbox[n]:!1,rt=this.moGroupFullSelectedViaPanel?!!this.moGroupFullSelectedViaPanel[n]:!1,b=p||w,ut=it&&b,ft=rt&&b,et=!nt&&tt&&(ut||ft);if(!et){o.addClass(e).hide();PositionMgr.InvalidateNodeAndAncestors(v);PositionMgr.GetInstance().CalculatePosition();return}o.removeClass(e).show();l=!r&&p&&!w;k=l?u:f;
204h&&(s=l?t:i,h[s]||(s=t),[t,i].forEach(function(n){var r=h[n],i,t;r&&(i=$E(r),i.length)&&(n===s?(i.removeClass(e).show(),t=$E(r+Utils.Const.SUFFIX_LABEL)[0],t&&(Utils.IsStringFilled(t.msLabelTemplate)||(t.msLabelTemplate=t.textContent),t.textContent=t.msLabelTemplate.replace(new RegExp(Utils.Const.TAG_TOTAL_ITEMS,"g"),k))):i.addClass(e).hide(),PositionMgr.InvalidateNodePosition(i[0]))}));PositionMgr.InvalidateNodeAndAncestors(v);PositionMgr.GetInstance().CalculatePosition()}};n.V2_RegisterMasterSelectionCkb=function(n,t){n&&typeof n.GetId=="function"&&Utils.IsString(t)&&(this.moGroupToMasterCheckboxID||(this.moGroupToMasterCheckboxID={}),this.moGroupToMasterCheckboxID[t]=n.GetId(),Utils.AddEvent(n,"click",function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=MultipleSelectionMgr.GetInstance(),i=n.V2_GetCountSelectedOnCurrentPage(t);i===0?n.V2_SelectPageOnly(t,!0,!0):n.V2_DeselectPageOnly(t,!0)})}))};n.V2_UpdateMasterCheckboxState=function(n){var i=this.moGroupToMasterCheckboxID?this.moGroupToMasterCheckboxID[n]:null,t;if(i&&(t=document.getElementById(i),t)){var f=this.moFromItems[n],e=this.moToItems[n],r=e-f+1,u=this.V2_GetCountSelectedOnCurrentPage(n);r>0&&u>=r?(t.checked=!0,t.indeterminate=!1):u>0?(t.checked=!1,t.indeterminate=!0):(t.checked=!1,t.indeterminate=!1)}};n.V2_UpdateUIState=function(n){var e=this.IsInFullSelectionMode(n),g=this.moFromItems[n],nt=this.moToItems[n],t=nt-g+1,o=this.V2_GetCountSelectedOnCurrentPage(n),tt=t>0&&o>=t,it=o>0,s=this.GetStatedItemsEIDInGroup(n).size,rt=s-o>0,w=t>0&&this.GetTotalItems(n)<=t,h=e&&s===0,ut=!tt,ft=!w&&!h,et=it,ot=!w&&(e||rt),b=StyleMgr.Const.CLASS_INVISIBLE,r=[],i=function(n,t){var u=$E(n),o,i;if(u.length){var e=u[0],s=$(e).closest("cx-menu-item"),f=s.length?s[0]:null;t?(u.removeClass(b).show(),u.find("a").attr("tabindex",0).attr("role","button"),f&&(f.style.display="")):(u.addClass(b).hide(),u.find("a").attr("tabindex",-1),f&&(f.style.display="none"));PositionMgr.InvalidateNodePosition(e);f&&(o=$(e).closest("cx-dropdown"),i=o.length?o[0]:null,i&&(r.indexOf(i)===-1&&r.push(i),i._cxSelectionMgrShowInit||(i._cxSelectionMgrShowInit=!0,i.addEventListener("cx-after-show",function(){Array.prototype.forEach.call(i.querySelectorAll("[id]"),function(n){typeof n.ForceHasChanged=="function"&&PositionMgr.InvalidateNodePosition(n)});PositionMgr.GetInstance().CalculatePosition()}))))}},c=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_ALL,!0),l=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_FULL,!0),a=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_FULL,!0),v=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_SOME,!0),y=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_SELECT_FULL_RESULT,!0),k=this.GetActionButtons(n,MultipleSelectionMgr.Const.ACTION_TYPE_DESELECT_FULL_RESULT,!0),f;c&&Object.keys(c).forEach(function(n){i(n,ut)});l&&Object.keys(l).forEach(function(n){i(n,ft)});a&&Object.keys(a).forEach(function(n){i(n,ot)});v&&Object.keys(v).forEach(function(n){i(n,et)});y&&Object.keys(y).forEach(function(n){i(n,!h)});k&&Object.keys(k).forEach(function(n){i(n,h)});var p=this.GetTotalItems(n),st=new RegExp(Utils.Const.TAG_TOTAL_ITEMS,"g"),u=function(n,t){n&&Object.keys(n).forEach(function(n){var r=$E(n)[0],i;r&&(i=r.querySelector("a"),i)&&(Utils.IsStringFilled(i.msLabelTemplate)||(i.msLabelTemplate=i.textContent),i.textContent=i.msLabelTemplate.replace(st,t))})},d=e?p-s:s;for(u(c,t),u(l,p),u(v,o),u(a,d),u(y,p),f=0;f<r.length;f++)typeof r[f].reposition=="function"&&r[f].reposition();PositionMgr.GetInstance().CalculatePosition();this.V2_UpdateResultPanel(n,e,t,d);this.V2_UpdateMasterCheckboxState(n)}}();(()=>{function fw(n){if(Number.isFinite(n)&&n>0)return n;throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${n}')`);}function ew(n){if(n!=null)return async()=>n}function ow(n,t,i){var r,u,f,e,o,s;return{timeoutMillis:fw((u=(r=n.timeoutMillis)!=null?r:t.timeoutMillis)!=null?u:i.timeoutMillis),concurrencyLimit:(e=(f=n.concurrencyLimit)!=null?f:t.concurrencyLimit)!=null?e:i.concurrencyLimit,compression:(s=(o=n.compression)!=null?o:t.compression)!=null?s:i.
204compression}}function sw(){return{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}}function cw(n){return new hw(n.concurrencyLimit)}function aw(n){function r(n){return f.add(n),!1}function e(n){return u.add(n),!0}var u=new Set([n]),f=new Set,i=n.match(bo),t;return i?(t={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]},t.prerelease!=null)?function(t){return t===n}:function(n){var i,o;return u.has(n)?!0:f.has(n)?!1:(i=n.match(bo),!i)?r(n):(o={major:+i[1],minor:+i[2],patch:+i[3],prerelease:i[4]},o.prerelease!=null||t.major!==o.major?r(n):t.major===0?t.minor===o.minor&&t.patch<=o.patch?e(n):r(n):t.minor<=o.minor?e(n):r(n))}:function(){return!1}}function fi(n,t,i,r){var e,f,u;return(r===void 0&&(r=!1),f=ui[ri]=(e=ui[ri])!==null&&e!==void 0?e:{version:lt},!r&&f[n])?(u=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+n),i.error(u.stack||u.message),!1):f.version!==lt?(u=new Error("@opentelemetry/api: Registration of version v"+f.version+" for "+n+" does not match previously registered API v"+lt),i.error(u.stack||u.message),!1):(f[n]=t,i.debug("@opentelemetry/api: Registered a global for "+n+" v"+lt+"."),!0)}function at(n){var t,i,r=(t=ui[ri])===null||t===void 0?void 0:t.version;if(r&&vw(r))return(i=ui[ri])===null||i===void 0?void 0:i[n]}function ei(n,t){t.debug("@opentelemetry/api: Unregistering a global for "+n+" v"+lt+".");var i=ui[ri];i&&delete i[n]}function oi(n,t,i){var r=at("diag");if(r)return i.unshift(t),r[n].apply(r,ww([],pw(i),!1))}function kw(n,t){function i(i,r){var u=t[i];return typeof u=="function"&&n>=r?u.bind(t):function(){}}return n<l.NONE?n=l.NONE:n>l.ALL&&(n=l.ALL),t=t||{},{error:i("error",l.ERROR),warn:i("warn",l.WARN),info:i("info",l.INFO),debug:i("debug",l.DEBUG),verbose:i("verbose",l.VERBOSE)}}function eb(n){return n===void 0&&(n={}),new rb(new Map(Object.entries(n)))}function ob(n){return typeof n!="string"&&(fb.error("Cannot create baggage metadata from unknown type: "+typeof n),n=""),{__TYPE__:ub,toString:function(){return n}}}function yu(n){return Symbol.for(n)}function sr(){return ko}function ku(n){return n.getValue(bu)||void 0}function lk(){return ku(hr.getInstance().active())}function du(n,t){return n.setValue(bu,t)}function ak(n){return n.deleteValue(bu)}function vk(n,t){return du(n,new si(t))}function is(n){var t;if((t=ku(n))!==null&&t!==void 0)return t.spanContext()}function fs(n){return rs.test(n)&&n!==ns}function yk(n){return us.test(n)&&n!==go}function cr(n){return fs(n.traceId)&&yk(n.spanId)}function pk(n){return new si(n)}function wk(n){return typeof n=="object"&&typeof n.spanId=="string"&&typeof n.traceId=="string"&&typeof n.traceFlags=="number"}function ss(n){return n.getValue(tf)||void 0}function ud(){return ss(hr.getInstance().active())}function fd(n,t){return n.setValue(tf,t)}function ed(n){return n.deleteValue(tf)}function cd(n){return n.setValue(hs,!0)}function ff(n){return n.getValue(hs)===!0}function ld(n){return n.reduce((n,t)=>{let i=`${n}${n!==""?",":""}${t}`;return i.length>8192?n:i},"")}function ad(n){return n.getAllEntries().map(([t,n])=>{let i=`${encodeURIComponent(t)}=${encodeURIComponent(n.value)}`;return n.metadata!==void 0&&(i+=";"+n.metadata.toString()),i})}function vd(n){if(n){let t=n.indexOf(";"),i=t===-1?n:n.substring(0,t),r=i.indexOf("=");if(!(r<=0)){let u=i.substring(0,r).trim(),f=i.substring(r+1).trim();if(u&&f){let e,o;try{e=decodeURIComponent(u);o=decodeURIComponent(f)}catch(h){return}let s;if(t!==-1&&t<n.length-1){let i=n.substring(t+1);s=ob(i)}return{key:e,value:o,metadata:s}}}}}function cs(n,t,i,r){let u=0;for(;u<n.length&&i<180;){let f=n.indexOf(",",u),e=f===-1?n.length:f,o=e-u;if(o<=4096){let f=vd(n.substring(u,e));if(f){let n=(i===0?0:1)+o;if(r+n>8192)break;t[f.key]=f.metadata?{value:f.value,metadata:f.metadata}:{value:f.value};i++;r+=n}}if(f===-1)break;u=f+1}return[i,r]}function ci(n){let i={};if(typeof n!="object"||n==null)return i;for(let r in n)if(Object.prototype.hasOwnProperty.call(n,r)){if(!yd(r)){t.warn(`Invalid attribute key: ${r}`);continue}let u=n[r];if(!as(u)){t.warn(`Invalid attribute value set for key: ${r}`);continue}i[r]=Array.isArray(u)?u.slice():u}return i}function yd(n){return typeof n=="string"&&n!==""}function as(n){return n==null?!0:Array.isArray(n)?pd(n):vs(typeof n)}function pd(n){let t;for(let i of n)if(i!=null){let n=typeof i;if(n!==t){if(!t){if(vs(n)){t=n;continue}return!1}return!1}}return!0}function vs(n){switch(n){case"number":case"boolean":case"string":return!0}return!1}function wd(){return n=>{t.error(bd(n))}}function bd(n){return typeof n=="string"?n:JSON.stringify(kd(n))}function kd(n){let i={},t=n;for(;t!==null;)Object.getOwnPropertyNames(t).forEach(n=>{if(!i[n]){let r=t[n];r&&(i[n]=String(r))}}),t=Object.getPrototypeOf(t);return i}function yr(n){try{ys(n)}catch(t){}}function u(n){let t=n/1e3,i=Math.trunc(t),r=Math.round(n%1e3*gd);return[i,r]}function b(n){let t=u(it.timeOrigin),i=u(typeof n=="number"?n:it.now());return ih(t,i)}function ai(n){if(pf(n))return n;if(typeof n=="number")return n<it.timeOrigin/2?b(n):u(n);if(n instanceof Date)return u(n.getTime());throw TypeError("Invalid input type");}function yf(n,t){let r=t[0]-n[0],i=t[1]-n[1];return i<0&&(r-=1,i+=li),[r,i]}function ot(n){return n[0]*li+n[1]}function pr(n){return n[0]*1e6+n[1]/1e3}function ng(n){return n[0]*1e3+n[1]/1e6}function tg(n){return n[0]+n[1]/li}function pf(n){return Array.isArray(n)&&n.length===2&&typeof n[0]=="number"&&typeof n[1]=="number"}function th(n){return pf(n)||typeof n=="number"||n instanceof Date}function ih(n,t){let i=[n[0]+t[0],n[1]+t[1]];return i[1]>=li&&(i[1]-=li,i[0]+=1),i}function rh(n){return fg.test(n)}function uh(n){return eg.test(n)&&!og.test(n)}function ag(n){let t=lg.exec(n);return!t||t[1]==="00"&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}function vh(n){if(!dg(n)||gg(n)!==vg)return!1;let i=kg(n);if(i===null)return!0;let t=lh.call(i,"constructor")&&i.constructor;return typeof t=="function"&&t instanceof t&&hh.call(t)===bg}function dg(n){return n!=null&&typeof n=="object"}function gg(n){return n==null?n===void 0?pg:yg:pt&&pt in Object(n)?nn(n):tn(n)}function nn(n){let i=lh.call(n,pt),r=n[pt],t=!1;try{n[pt]=void 0;t=!0}catch(f){}let u=ah.call(n);return t&&(i?n[pt]=r:delete n[pt]),u}function tn(n){return ah.call(n)}function rn(...n){let t=n.shift(),i=new WeakMap;for(;n.length>0;)t=ph(t,n.shift(),0,i);return t}function df(n){return wr(n)?n.slice():n}function ph(n,t,i=0,r){let u;if(!(i>yh)){if(i++,br(n)||br(t)||bh(t))u=df(t);
204else if(wr(n)){if(u=n.slice(),wr(t))for(let n=0,i=t.length;n<i;n++)u.push(df(t[n]));else if(vi(t)){let n=Object.keys(t);for(let i=0,r=n.length;i<r;i++){let r=n[i];r==="__proto__"||r==="constructor"||r==="prototype"||(u[r]=df(t[r]))}}}else if(vi(n))if(vi(t)){if(!un(n,t))return t;u=Object.assign({},n);let f=Object.keys(t);for(let e=0,o=f.length;e<o;e++){let o=f[e];if(o!=="__proto__"&&o!=="constructor"&&o!=="prototype"){let s=t[o];if(br(s))typeof s=="undefined"?delete u[o]:u[o]=s;else{let f=u[o],e=s;if(wh(n,o,r)||wh(t,o,r))delete u[o];else{if(vi(f)&&vi(e)){let i=r.get(f)||[],u=r.get(e)||[];i.push({obj:n,key:o});u.push({obj:t,key:o});r.set(f,i);r.set(e,u)}u[o]=ph(u[o],s,i,r)}}}}}else u=t;return u}}function wh(n,t,i){let r=i.get(n[t])||[];for(let i=0,u=r.length;i<u;i++){let u=r[i];if(u.key===t&&u.obj===n)return!0}return!1}function wr(n){return Array.isArray(n)}function bh(n){return typeof n=="function"}function vi(n){return!br(n)&&!wr(n)&&!bh(n)&&typeof n=="object"}function br(n){return typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="undefined"||n instanceof Date||n instanceof RegExp||n===null}function un(n,t){return!(!vh(n)||!vh(t))}function kh(n,t){return typeof t=="string"?n===t:!!n.match(t)}function dh(n,t){if(!t)return!1;for(let i of t)if(kh(n,i))return!0;return!1}function fn(n,t){return new Promise(i=>{f.with(cd(f.active()),()=>{n.export(t,i)})})}function en(n){return Object.prototype.hasOwnProperty.call(n,"partialSuccess")}function on(){return{handleResponse(n){n!=null&&en(n)&&n.partialSuccess!=null&&Object.keys(n.partialSuccess).length!==0&&t.warn("Received Partial Success response:",JSON.stringify(n.partialSuccess))}}}function sn(n,t){return new nc(n.transport,n.serializer,on(),n.promiseHandler,n.metrics,t.timeout)}function hn(n,t,i,r){return sn({transport:r,serializer:t,promiseHandler:cw(n),metrics:i},{timeout:n.timeoutMillis})}function wt(n){return n<0?10:n<128?1:n<16384?2:n<2097152?3:n<268435456?4:n<34359738368?5:n<4398046511104?6:n<562949953421312?7:n<72057594037927940?8:9}function fc(n){return n>=48&&n<=57?n-48:n>=97&&n<=102?n-87:n-55}function pi(n){let t=new Uint8Array(n.length/2),i=0;for(let r=0;r<n.length;r+=2){let u=fc(n.charCodeAt(r)),f=fc(n.charCodeAt(r+1));t[i++]=u<<4|f}return t}function gn(n,t,i){return r=>r===n?t:i}function rt(n,t){let i=t[0],o=t[1],r=1e9,s=i&65535,h=i/65536>>>0,u=s*r,f=h*r,c=u>>>0,l=Math.floor(u/4294967296),a=(f&65535)*65536>>>0,v=f/65536>>>0,e=c+a+o,y=e>>>0,p=Math.floor(e/4294967296),w=l+v+p>>>0;n.writeFixed64(y,w)}function st(n,t,i){for(let r in t)if(Object.prototype.hasOwnProperty.call(t,r)){let u=t[r];n.writeTag(i,2);let f=n.startLengthDelimited(),e=n.pos;rtt(n,r,u);n.finishLengthDelimited(f,n.pos-e)}}function rtt(n,t,i){n.writeTag(1,2);n.writeString(t);n.writeTag(2,2);let r=n.startLengthDelimited(),u=n.pos;gf(n,i);n.finishLengthDelimited(r,n.pos-u)}function gf(n,t){let i=typeof t;if(i==="string")n.writeTag(1,2),n.writeString(t);else if(i==="boolean")n.writeTag(2,0),n.writeVarint(t?1:0);else if(i==="number"){let i=t;Number.isInteger(i)&&i>=lc&&i<ac?(n.writeTag(3,0),n.writeVarint(i)):(n.writeTag(4,1),n.writeDouble(i))}else if(t instanceof Uint8Array)n.writeTag(7,2),n.writeBytes(t);else if(Array.isArray(t)){n.writeTag(5,2);let i=n.startLengthDelimited(),r=n.pos;for(let i of t){n.writeTag(1,2);let t=n.startLengthDelimited(),r=n.pos;gf(n,i);n.finishLengthDelimited(t,n.pos-r)}n.finishLengthDelimited(i,n.pos-r)}else if(i==="object"&&t!=null){n.writeTag(6,2);let r=n.startLengthDelimited(),u=n.pos,i=t;for(let t in i)if(Object.prototype.hasOwnProperty.call(i,t)){let r=i[t];n.writeTag(1,2);let u=n.startLengthDelimited(),f=n.pos;n.writeTag(1,2);n.writeString(t);n.writeTag(2,2);let e=n.startLengthDelimited(),o=n.pos;gf(n,r);n.finishLengthDelimited(e,n.pos-o);n.finishLengthDelimited(u,n.pos-f)}n.finishLengthDelimited(r,n.pos-u)}}function vc(n,t,i){n.writeTag(i,2);let r=n.startLengthDelimited(),u=n.pos;n.writeTag(1,2);n.writeString(t.name);t.version&&(n.writeTag(2,2),n.writeString(t.version));t.attributes&&st(n,t.attributes,3);t.droppedAttributesCount&&(n.writeTag(4,0),n.writeVarint(t.droppedAttributesCount));n.finishLengthDelimited(r,n.pos-u)}function yc(n,t,i){n.writeTag(i,2);let r=n.startLengthDelimited(),u=n.pos;t.attributes&&st(n,t.attributes,1);n.writeTag(2,0);n.writeVarint(0);n.finishLengthDelimited(r,n.pos-u)}function utt(n){let i=n.length,t=0;for(let r=0;r<i;r++){let i=n.charCodeAt(r);i<128?t+=1:i<2048?t+=2:i<55296||i>=57344?t+=3:(r++,t+=4)}return t}function pc(n){let t=Object.keys(n);return t.length===0?"":(t=t.sort(),JSON.stringify(t.map(t=>[t,n[t]])))}function ftt(n){var t,i;return`${n.name}:${(t=n.version)!=null?t:""}:${(i=n.schemaUrl)!=null?i:""}`}function ki(n,t){let i,r=new Promise(function(n,r){i=setTimeout(function(){r(new te("Operation timed out."))},t)});return Promise.race([n,r]).then(n=>(clearTimeout(i),n),n=>{throw clearTimeout(i),n;})}function ett(n,t){if(n.size!==t.size)return!1;for(let i of n)if(!t.has(i))return!1;return!0}function ott(n,t){let i=0,r=n.length-1,u=n.length;for(;r>=i;){let f=i+Math.trunc((r-i)/2);n[f]<t?i=f+1:(u=f,r=f-1)}return u}function stt(n,t){return n.toLowerCase()===t.toLowerCase()}function htt(n){let t=n.map(()=>0);return t.push(0),{buckets:{boundaries:n,counts:t},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}}function dc(n){let t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,n),((t.getUint32(0)&2146435072)>>20)-1023}function gc(n){let t=new DataView(new ArrayBuffer(8));t.setFloat64(0,n);let i=t.getUint32(0),r=t.getUint32(4);return(i&1048575)*Math.pow(2,32)+r}function ue(n,t){return n===0||n===Number.POSITIVE_INFINITY||n===Number.NEGATIVE_INFINITY||Number.isNaN(n)?n:n*Math.pow(2,t)}function ltt(n){return n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,n++,n}function il(n){if(n>tl||n<nl)throw new di(`expected scale >= ${nl} && <= ${tl}, got: ${n}`);return ytt[n+10]}function yl(n){var t,i,r,u;switch(n.type){case v.DEFAULT:return tit;case v.DROP:return cl;case v.SUM:return ll;case v.LAST_VALUE:return al;case v.EXPONENTIAL_HISTOGRAM:{let r=n;return new hl((t=r.options)==null?void 0:t.maxSize,(i=r.options)==null?void 0:i.recordMinMax)}case v.EXPLICIT_BUCKET_HISTOGRAM:{let t=n;return t.options==null?vl:new sl((r=t.options)==null?void 0:r.boun
204daries,(u=t.options)==null?void 0:u.recordMinMax)}default:throw new Error("Unsupported Aggregation");}}function cit(n,t){function f(){i.length>0&&(u.push({resource:n.resource,scopeMetrics:i}),i=[],r=0)}if(!Number.isInteger(t)||t<=0)throw new Error("maxExportBatchSize must be a positive integer");let u=[],r=0,i=[];for(let u of n.scopeMetrics){let n=null;for(let e of u.metrics){let s=e.dataPoints;if(s.length===0){n||(n={scope:u.scope,metrics:[]},i.push(n));n.metrics.push(e);continue}let o=0;for(;o<s.length;){let l=t-r,c=Math.min(l,s.length-o);n||(n={scope:u.scope,metrics:[]},i.push(n));let a=nt(h({},e),{dataPoints:s.slice(o,o+c)});n.metrics.push(a);o+=c;r+=c;r===t&&(f(),n=null)}}}return f(),u}function lit(){if(nu===void 0)try{let n=globalThis.process.argv0;nu=n?`unknown_service:${n}`:"unknown_service"}catch(n){nu="unknown_service"}return nu}function gl(n,t){return dl.FromAttributeList(Object.entries(n),t)}function na(){return gl({[gs]:lit(),[cf]:vf[cf],[lf]:vf[lf],[af]:vf[af]})}function ta(n){return n.map(([i,n])=>ti(n)?[i,n.catch(n=>{t.debug("promise rejection for resource attribute: %s - %s",i,n)})]:[i,n])}function ait(n){if(typeof n=="string"||n===void 0)return n;t.warn("Schema URL must be string or undefined, got %s. Schema URL will be ignored.",n)}function vit(n,i){let r=n==null?void 0:n.schemaUrl,u=i==null?void 0:i.schemaUrl,f=r===void 0||r==="",e=u===void 0||u==="";if(f)return u;if(e||r===u)return r;t.warn('Schema URL merge conflict: old resource has "%s", updating resource has "%s". Resulting resource will have undefined Schema URL.',r,u)}function ht(n,i,r){var u,f,e,o;return wit(n)||t.warn(`Invalid metric name: "${n}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:n,type:i,description:(u=r==null?void 0:r.description)!=null?u:"",unit:(f=r==null?void 0:r.unit)!=null?f:"",valueType:(e=r==null?void 0:r.valueType)!=null?e:yt.DOUBLE,advice:(o=r==null?void 0:r.advice)!=null?o:{}}}function yit(n,t){var i,r;return{name:(i=n.name)!=null?i:t.name,description:(r=n.description)!=null?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}}function pit(n,t){return stt(n.name,t.name)&&n.unit===t.unit&&n.type===t.type&&n.valueType===t.valueType}function wit(n){return ra.test(n)}function he(n){return n instanceof iu}function frt(n){return Array.from(n.entries())}function sa(n,t){let i="";return n.unit!==t.unit&&(i+=` - Unit '${n.unit}' does not match '${t.unit}' 205`),n.type!==t.type&&(i+=` - Type '${n.type}' does not match '${t.type}' 206`),n.valueType!==t.valueType&&(i+=` - Value Type '${n.valueType}' does not match '${t.valueType}' 207`),n.description!==t.description&&(i+=` - Description '${n.description}' does not match '${t.description}' 208`),i}function ert(n,t){return` - use valueType '${n.valueType}' on instrument creation or use an instrument name other than '${t.name}'`}function ort(n,t){return` - use unit '${n.unit}' on instrument creation or use an instrument name other than '${t.name}'`}function srt(n,t){let i={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(i);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${r}'`}function hrt(n,t){let r={name:t.name,type:t.type,unit:t.unit},i=JSON.stringify(r);return` - create a new view with a name other than '${n.name}' and InstrumentSelector '${i}' 209 - OR - create a new view with the name ${n.name} and description '${n.description}' and InstrumentSelector ${i} 210 - OR - create a new view with the name ${t.name} and description '${n.description}' and InstrumentSelector ${i}`}function ha(n,t){return n.valueType!==t.valueType?ert(n,t):n.unit!==t.unit?ort(n,t):n.type!==t.type?srt(n,t):n.description!==t.description?hrt(n,t):""}function tut(){return rut}function iut(n){return new nut(n)}function eut(n){return n.instrumentName==null&&n.instrumentType==null&&n.instrumentUnit==null&&n.meterName==null&&n.meterVersion==null&&n.meterSchemaUrl==null}function out(n){if(eut(n))throw new Error("Cannot create view with no selector arguments supplied");if(n.name!=null&&((n==null?void 0:n.instrumentName)==null||ca.hasWildcard(n.instrumentName)))throw new Error("Views with a specified name must be declared with an instrument selector that selects at most one instrument per meter.");}function va(n,t,i){let r=n.startLengthDelimited(),u=n.pos;n.writeTag(2,1);rt(n,t.startTime);n.writeTag(3,1);rt(n,t.endTime);i===yt.INT?(n.writeTag(6,1),n.writeSfixed64(t.value)):(n.writeTag(4,1),n.writeDouble(t.value));t.attributes&&st(n,t.attributes,7);n.finishLengthDelimited(r,n.pos-u)}function sut(n,t){let r=n.startLengthDelimited(),u=n.pos,i=t.value;if(n.writeTag(2,1),rt(n,t.startTime),n.writeTag(3,1),rt(n,t.endTime),n.writeTag(4,1),n.writeFixed64
210(i.count>>>0,i.count/4294967296>>>0),i.sum!==void 0&&(n.writeTag(5,1),n.writeDouble(i.sum)),i.buckets.counts.length>0){n.writeTag(6,2);let t=n.startLengthDelimited(),r=n.pos;for(let t of i.buckets.counts)n.writeFixed64(t>>>0,t/4294967296>>>0);n.finishLengthDelimited(t,n.pos-r)}if(i.buckets.boundaries.length>0){n.writeTag(7,2);let t=n.startLengthDelimited(),r=n.pos;for(let t of i.buckets.boundaries)n.writeDouble(t);n.finishLengthDelimited(t,n.pos-r)}t.attributes&&st(n,t.attributes,9);i.min!==void 0&&(n.writeTag(11,1),n.writeDouble(i.min));i.max!==void 0&&(n.writeTag(12,1),n.writeDouble(i.max));n.finishLengthDelimited(r,n.pos-u)}function ya(n,t,i){let r=n.startLengthDelimited(),u=n.pos;if(t!==0&&(n.writeTag(1,0),n.writeSint32(t)),i.length>0){n.writeTag(2,2);let t=n.startLengthDelimited(),r=n.pos;for(let t of i)n.writeVarint(t);n.finishLengthDelimited(t,n.pos-r)}n.finishLengthDelimited(r,n.pos-u)}function hut(n,t){let r=n.startLengthDelimited(),u=n.pos,i=t.value;t.attributes&&st(n,t.attributes,1);n.writeTag(2,1);rt(n,t.startTime);n.writeTag(3,1);rt(n,t.endTime);n.writeTag(4,1);n.writeFixed64(i.count>>>0,i.count/4294967296>>>0);i.sum!==void 0&&(n.writeTag(5,1),n.writeDouble(i.sum));i.scale!==0&&(n.writeTag(6,0),n.writeSint32(i.scale));n.writeTag(7,1);n.writeFixed64(i.zeroCount>>>0,i.zeroCount/4294967296>>>0);n.writeTag(8,2);ya(n,i.positive.offset,i.positive.bucketCounts);n.writeTag(9,2);ya(n,i.negative.offset,i.negative.bucketCounts);i.min!==void 0&&(n.writeTag(12,1),n.writeDouble(i.min));i.max!==void 0&&(n.writeTag(13,1),n.writeDouble(i.max));n.finishLengthDelimited(r,n.pos-u)}function cut(n,t){let i=n.startLengthDelimited(),r=n.pos;switch(n.writeTag(1,2),n.writeString(t.descriptor.name),t.descriptor.description&&(n.writeTag(2,2),n.writeString(t.descriptor.description)),t.descriptor.unit&&(n.writeTag(3,2),n.writeString(t.descriptor.unit)),t.dataPointType){case k.GAUGE:n.writeTag(5,2);lut(n,t);break;case k.SUM:n.writeTag(7,2);aut(n,t);break;case k.HISTOGRAM:n.writeTag(9,2);vut(n,t);break;case k.EXPONENTIAL_HISTOGRAM:n.writeTag(10,2);yut(n,t);break;default:{let n=t}}n.finishLengthDelimited(i,n.pos-r)}function lut(n,t){let i=n.startLengthDelimited(),r=n.pos;for(let i of t.dataPoints)n.writeTag(1,2),va(n,i,t.descriptor.valueType);n.finishLengthDelimited(i,n.pos-r)}function aut(n,t){let r=n.startLengthDelimited(),u=n.pos;for(let i of t.dataPoints)n.writeTag(1,2),va(n,i,t.descriptor.valueType);let i=ce(t.aggregationTemporality);i!==0&&(n.writeTag(2,0),n.writeVarint(i));t.isMonotonic&&(n.writeTag(3,0),n.writeVarint(1));n.finishLengthDelimited(r,n.pos-u)}function vut(n,t){let r=n.startLengthDelimited(),u=n.pos;for(let i of t.dataPoints)n.writeTag(1,2),sut(n,i);let i=ce(t.aggregationTemporality);i!==0&&(n.writeTag(2,0),n.writeVarint(i));n.finishLengthDelimited(r,n.pos-u)}function yut(n,t){let r=n.startLengthDelimited(),u=n.pos;for(let i of t.dataPoints)n.writeTag(1,2),hut(n,i);let i=ce(t.aggregationTemporality);i!==0&&(n.writeTag(2,0),n.writeVarint(i));n.finishLengthDelimited(r,n.pos-u)}function put(n,t){let i=n.startLengthDelimited(),r=n.pos;vc(n,t.scope,1);for(let i of t.metrics)n.writeTag(2,2),cut(n,i);t.scope.schemaUrl&&(n.writeTag(3,2),n.writeString(t.scope.schemaUrl));n.finishLengthDelimited(i,n.pos-r)}function pa(n,t){let i=n.startLengthDelimited(),r=n.pos;yc(n,t.resource,1);for(let i of t.scopeMetrics)n.writeTag(2,2),put(n,i);t.resource.schemaUrl&&(n.writeTag(3,2),n.writeString(t.resource.schemaUrl));n.finishLengthDelimited(i,n.pos-r)}function ce(n){switch(n){case y.DELTA:return 1;case y.CUMULATIVE:return 2;default:return 0}}function wut(n){let t=new ne;t.writeTag(1,2);pa(t,n);let i=new uc(t.pos);return i.writeTag(1,2),pa(i,n),i.finish()}function but(n){let t=new bi(n),i={};for(;!t.isAtEnd();){let{fieldNumber:r,wireType:n}=t.readTag();switch(r){case 1:n===0?i.rejectedDataPoints=t.readVarint():t.skip(n);break;case 2:n===2?i.errorMessage=t.readString():t.skip(n);break;default:t.skip(n)}}return i}function kut(n){let t=new bi(n),i={};for(;!t.isAtEnd();){let{fieldNumber:r,wireType:n}=t.readTag();switch(r){case 1:n===2?i.partialSuccess=but(t.readBytes()):t.skip(n);break;default:t.skip(n)}}return i}function wa(n,t){let i=n&255|gut;return t&&(i|=nft),i}function tft(n,t){let i=n.startLengthDelimited(),r=n.pos;t.message&&(n.writeTag(2,2),n.writeString(t.message));n.writeTag(3,0);n.writeVarint(t.code);n.finishLengthDelimited(i,n.pos-r)}function ift(n,t){let i=n.startLengthDelimited(),r=n.pos;n.writeTag(1,1);rt(n,t.time);n.writeTag(2,2);n.writeString(t.name);t.attributes&&st(n,t.attributes,3);n.writeTag(4,0);n.writeVarint(t.droppedAttributesCount||0);n.finishLengthDelimited(i,n.pos-r)}function rft(n,t){var r;let e=n.startLengthDelimited(),o=n.pos,i=t.context;n.writeTag(1,2);n.writeBytes(pi(i.traceId));n.writeTag(2,2);n.writeBytes(pi(i.spanId));let u=(r=i.traceState)==null?void 0:r.serialize();u&&(n.writeTag(3,2),n.writeString(u));t.attributes&&st(n,t.attributes,4);n.writeTag(5,0);n.writeVarint(t.droppedAttributesCount||0);let f=wa(i.traceFlags,i.isRemote);f&&(n.writeTag(6,5),n.writeFixed32(f));n.finishLengthDelimited(e,n.pos-o)}function uft(n,t){var r,u,f;let h=n.startLengthDelimited(),c=n.pos,i=t.spanContext();n.writeTag(1,2);n.writeBytes(pi(i.traceId));n.writeTag(2,2);n.writeBytes(pi(i.spanId));let e=(r=i.traceState)==null?void 0:r.serialize();e&&(n.writeTag(3,2),n.writeString(e));(u=t.parentSpanContext)!=null&&u.spanId&&(n.writeTag(4,2),n.writeBytes(pi(t.parentSpanContext.spanId)));n.writeTag(5,2);n.writeString(t.name);let o=t.kind==null?0:t.kind+1;o!==0&&(n.writeTag(6,0),n.writeVarint(o));n.writeTag(7,1);rt(n,t.startTime);n.writeTag(8,1);rt(n,t.endTime);t.attributes&&st(n,t.attributes,9);n.writeTag(10,0);n.writeVarint(t.droppedAttributesCount);for(let i of t.events)n.writeTag(11,2),ift(n,i);n.writeTag(12,0);n.writeVarint(t.droppedEventsCount);for(let i of t.links)n.writeTag(13,2),rft(n,i);n.writeTag(14,0);n.writeVarint(t.droppedLinksCount);n.writeTag(15,2);tft(n,t.status);let s=wa(i.traceFlags,(f=t.parentSpanContext)==null?void 0:f.isRemote);s&&(n.writeTag(16,5),n.writeFixed32(s));n.finishLengthDelimited(h,n.pos-c)}function fft(n,t,i){let r=n.startLengthDelimited(),u=n.pos;vc(n,t,1);for(let t of i)n.writeTag(2,2),uft(n,t);t.schemaUrl&&(n.writeTag(3,2),n.writeString(t.schemaUrl));n.finishLengthDelimited(r,n.pos-u)}function ba(n,t,i){let r=n.startLengthDelimited(),u=n.pos;yc(n,t,1);for(let t of i.values()){n.writeTag(2,2);let i=t[0].instrumentationScope;fft(n,i,t)}t.schemaUrl&&(n.writeTag(3,2),n.writeString(t.schemaUrl));n.finishLengthDelimited(r,n.pos-u)}function eft(n){let t=new Map;for(let i of n){let u=i.resource,f=i.instrumentationScope,n=t.get(u);n||(n=new Map,t.set(u,n));let r=n.get(f);r||(r=[],n.set(f,r));r.push(i)}return t}function oft(n){let r=eft(n),t=new ne;for(let[n,i]of r)t.writeTag(1,2),ba(t,n,i);let i=new uc(t.pos);for(let[n,t]of r)i.writeTag(1,2),ba(i,n,t);return i.finish()}function sft(n){let t=new bi(n),i={};for(;!t.isAtEnd();){let{fieldNumber:r,wireType:n}=t.readTag();switch(r){case 1:n===0?i.rejectedSpans=t.readVarint():t.skip(n);break;case 2:n===2?i.errorMessage=t.readString():t.skip(n);break;default:t.skip(n)}}return i}function hft(n){let t=new bi(n),i={};for(;!t.isAtEnd();){let{fieldNumber:r,wireType:n}=t.readTag();switch(r){case 1:n===2?i.partialSuccess=sft(t.readBytes()):t.skip(n);break;default:t.skip(n)}}return i}function yft(){return Math.random()*2*ka-ka}function pft(n){return new da(n.transport)}function wft(n){return n===429||n===502||n===503||n===504}function bft(n){if(n!=null){let t=Number.parseInt(n,10);if(Number.isInteger(t))return t>0?t*1e3:-1;let i=new Date(n).getTime()-Date.now();return i>=0?i:0}}function net(n){return new gft(n)}function tet(n){return n instanceof TypeError&&!n.cause}function iet(n,t,i){return hn(n,t,i,pft({transport:net(n)}))}function ret(n){let i={};return Object.entries(n!=null?n:{}
210).forEach(([r,n])=>{typeof n!="undefined"?i[r]=String(n):t.warn(`Header "${r}" has invalid value (${n}) and will be ignored`)}),i}function uet(n,t,i){return async()=>{let u=h({},await i()),r={};return t!=null&&Object.assign(r,await t()),n!=null&&Object.assign(r,ret(await n())),Object.assign(r,u)}}function fet(n){var t;if(n!=null)try{let i=(t=globalThis.location)==null?void 0:t.href;return new URL(n,i).href}catch(i){throw new Error(`Configuration: Could not parse user-provided export URL: '${n}'`);}}function eet(n,t,i){var r,u;return nt(h({},ow(n,t,i)),{headers:uet(n.headers,t.headers,i.headers),url:(u=(r=fet(n.url))!=null?r:t.url)!=null?u:i.url})}function oet(n,t){return nt(h({},sw()),{headers:async()=>n,url:"http://localhost:4318/"+t})}function set(n){return typeof n.headers=="function"?n.headers:ew(n.headers)}function het(n,t,i){return eet({url:n.url,timeoutMillis:n.timeoutMillis,headers:set(n),concurrencyLimit:n.concurrencyLimit},{},oet(i,t))}function ga(n,t,i,r){return new wn({componentType:n,metricsHelper:t,url:i,meterProvider:r,responseAttributesFromError:n=>{if(!n)return{[tc]:200};if(!(n instanceof Error))return{};if(n.message.startsWith("Fetch request failed with non-retryable status ")){let t=n.message.substring(47);return{[tc]:Number(t)}}return{}}})}function nv(n,t,i,r,u,f,e){let o=het(n,f,e);return iet(o,t,ga(i,r,o.url,n.selfObsMeterProvider))}function yet(){var i;let n=((i=void 0)!=null?i:"cumulative").toLowerCase();return n==="cumulative"?ve:n==="delta"?tv:n==="lowmemory"?iv:(t.warn(`OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '${n}', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead.`),ve)}function pet(n){return n!=null?n===ii.DELTA?tv:n===ii.LOWMEMORY?iv:ve:yet()}function wet(n){var t;return(t=n==null?void 0:n.aggregationPreference)!=null?t:()=>rv}function det(n,t,i,r){for(let u=0,f=n.length;u<f;u++){let f=n[u];t&&f.setTracerProvider(t);i&&f.setMeterProvider(i);r&&f.setLoggerProvider&&f.setLoggerProvider(r);f.getConfig().enabled||f.enable()}}function get(n){n.forEach(n=>n.disable())}function not(n){var t,i;let u=n.tracerProvider||o.getTracerProvider(),f=n.meterProvider||os.getMeterProvider(),e=n.loggerProvider||cc.getLoggerProvider(),r=(i=(t=n.instrumentations)==null?void 0:t.flat())!=null?i:[];return det(r,u,f,e),()=>{get(r)}}function nr(n,t,i){let r=!!n[t]&&Object.prototype.propertyIsEnumerable.call(n,t);Object.defineProperty(n,t,{configurable:!0,enumerable:r,writable:!0,value:i})}function fu(n){n&&n.logger&&(typeof n.logger!="function"?c("new logger isn't a function, not replacing"):c=n.logger)}function be(n,t,i){let r,u;try{u=n()}catch(f){r=f}finally{if(t(r,u),r&&!i)throw r;return u}}function ke(n){var i;let t={};for(let[u,r]of n.getRawAttributes())typeof(r==null?void 0:r.then)!="function"&&r!=null&&((i=t[u])!=null||(t[u]=r));return t}function de(n,t,i,r,u){if(typeof i=="number"&&i<0){let t=`[${n}]`;return r!=null&&r.stylize?r.stylize(t,"special"):t}if(typeof u!="function"||!r)return t;let f=nt(h({},r),{depth:r.depth==null?r.depth:r.depth-1});return`${n} ${u(t,f)}`}function fot(n){return n?n.isRemote?"remote":"local":"none"}function eot(n){switch(n){case d.RECORD_AND_SAMPLED:return"RECORD_AND_SAMPLE";case d.RECORD:return"RECORD_ONLY";case d.NOT_RECORD:return"DROP"}}function vv(n){for(let t=0;t<n.length;t++)n[t]=Math.random()*256>>>0;for(let t=0;t<n.length;t++)if(n[t]>0)return;n[n.length-1]=1}function yv(n){let t="";for(let i=0;i<n.length;i++)t+=cot[n[i]];return t}function lot(){var n,t,i,r,u,f,e,o;return{sampler:aot(),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(n=void 0)!=null?n:1/0,attributeCountLimit:(t=void 0)!=null?t:128},spanLimits:{attributeValueLengthLimit:(i=void 0)!=null?i:1/0,attributeCountLimit:(r=void 0)!=null?r:128,linkCountLimit:(u=void 0)!=null?u:128,eventCountLimit:(f=void 0)!=null?f:128,attributePerEventCountLimit:(e=void 0)!=null?e:128,attributePerLinkCountLimit:(o=void 0)!=null?o:128}}}function aot(){var n;let i=(n=void 0)!=null?n:g.ParentBasedAlwaysOn;switch(i){case g.AlwaysOn:return new dt;case g.AlwaysOff:return new ou;case g.ParentBasedAlwaysOn:return new tr({root:new dt});case g.ParentBasedAlwaysOff:return new tr({root:new ou});case g.TraceIdRatio:return new no(wv());case g.ParentBasedTraceIdRatio:return new tr({root:new no(wv())});default:return t.error(`OTEL_TRACES_SAMPLER value "${i}" invalid, defaulting to "${g.ParentBasedAlwaysOn}".`),new tr({root:new dt})}}function wv(){let n=void 0;return n==null?(t.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${ir}.`),ir):n<0||n>1?(t.error(`OTEL_TRACES_SAMPLER_ARG=${n}
210 was given, but it is out of range ([0..1]), defaulting to ${ir}.`),ir):n}function vot(n){var i,r,u,f,e,o,s,h,c,l,a,v;let t=Object.assign({},n.spanLimits);return t.attributeCountLimit=(o=(e=(f=(u=(i=n.spanLimits)==null?void 0:i.attributeCountLimit)!=null?u:(r=n.generalLimits)==null?void 0:r.attributeCountLimit)!=null?f:void 0)!=null?e:void 0)!=null?o:bv,t.attributeValueLengthLimit=(v=(a=(l=(c=(s=n.spanLimits)==null?void 0:s.attributeValueLengthLimit)!=null?c:(h=n.generalLimits)==null?void 0:h.attributeValueLengthLimit)!=null?l:void 0)!=null?a:void 0)!=null?v:kv,Object.assign({},n,{spanLimits:t})}function yot(n){if(n!==null){if(n===void 0){let n=new gv;n.enable();f.setGlobalContextManager(n);return}n.enable();f.setGlobalContextManager(n)}}function pot(n){if(n!==null){if(n===void 0){w.setGlobalPropagator(new ig({propagators:[new sh,new ls]}));return}w.setGlobalPropagator(n)}}function wot(){return to||(to=document.createElement("a")),to}function bot(n,t){return t in n}function ut(n,t,i,r=!0){if(bot(i,t)&&typeof i[t]=="number"&&!(r&&i[t]===0))return n.addEvent(t,i[t])}function su(n,t,i=!1,r,u){if(r===void 0&&(r=t[s.START_TIME]!==0),i||(ut(n,s.FETCH_START,t,r),ut(n,s.DOMAIN_LOOKUP_START,t,r),ut(n,s.DOMAIN_LOOKUP_END,t,r),ut(n,s.CONNECT_START,t,r),ut(n,s.SECURE_CONNECTION_START,t,r),ut(n,s.CONNECT_END,t,r),ut(n,s.REQUEST_START,t,r),ut(n,s.RESPONSE_START,t,r),ut(n,s.RESPONSE_END,t,r)),!u){let i=t[s.ENCODED_BODY_SIZE];i!==void 0&&n.setAttribute(ty,i);let r=t[s.DECODED_BODY_SIZE];r!==void 0&&i!==r&&n.setAttribute(iy,r)}}function kot(n){return n.slice().sort((n,t)=>{let i=n[s.FETCH_START],r=t[s.FETCH_START];return i>r?1:i<r?-1:0})}function ry(){if(typeof location!="undefined")return location.origin}function uy(n,t,i,r,u=new WeakSet,f){let h=ct(n);n=h.toString();let e=got(n,t,i,r,u,f);if(e.length===0)return{mainRequest:void 0};if(e.length===1)return{mainRequest:e[0]};let o=kot(e);if(h.origin!==ry()&&o.length>1){let n=o[0],t=dot(o,n[s.RESPONSE_END],i),r=n[s.RESPONSE_END];return t[s.FETCH_START]<r&&(t=n,n=void 0),{corsPreFlightRequest:n,mainRequest:t}}return{mainRequest:e[0]}}function dot(n,t,i){let f=ot(i),e=ot(ai(t)),u=n[1],r,o=n.length;for(let t=1;t<o;t++){let i=n[t],h=ot(ai(i[s.FETCH_START])),c=ot(ai(i[s.RESPONSE_END])),o=f-c;h>=e&&(!r||o<r)&&(r=o,u=i)}return u}function got(n,t,i,r,u,f){let o=ot(t),h=ot(i),e=r.filter(t=>{let i=ot(ai(t[s.FETCH_START])),r=ot(ai(t[s.RESPONSE_END]));return t.initiatorType.toLowerCase()===(f||"xmlhttprequest")&&t.name===n&&i>=o&&r<=h});return e.length>0&&(e=e.filter(n=>!u.has(n))),e}function ct(n){if(typeof URL=="function")return new URL(n,typeof document!="undefined"?document.baseURI:typeof location!="undefined"?location.href:void 0);let t=wot();return t.href=n,t}function fy(n,t){let i=t||[];return(typeof i=="string"||i instanceof RegExp)&&(i=[i]),ct(n).origin===ry()?!0:i.some(t=>kh(n,t))}function nst(...n){if(n[0]instanceof URL||typeof n[0]=="string"){let t=n[1];if(!(t!=null&&t.body))return Promise.resolve();if(t.body instanceof ReadableStream){let{body:n,length:i}=tst(t.body);return t.body=n,i}return Promise.resolve(rst(t.body))}else{let t=n[0];return t!=null&&t.body?t.clone().text().then(n=>ro(n)):Promise.resolve()}}function tst(n){if(!n.pipeThrough)return io.warn("Platform has ReadableStream but not pipeThrough!"),{body:n,length:Promise.resolve(void 0)};let t=0,i,r=new Promise(n=>{i=n}),u=new TransformStream({start(){},async transform(n,i){let r=await n;t+=r.byteLength;i.enqueue(n)},flush(){i(t)}});return{body:n.pipeThrough(u),length:r}}function ist(n){return typeof Document!="undefined"&&n instanceof Document}function rst(n){if(ist(n))return(new XMLSerializer).serializeToString(document).length;if(typeof n=="string")return ro(n);if(n instanceof Blob)return n.size;if(n instanceof FormData)return ust(n);if(n instanceof URLSearchParams)return ro(n.toString());if(n.byteLength!==void 0)return n.byteLength;io.warn("unknown body type")}function ro(n){return oy.encode(n).byteLength}function ust(n){let t=0;for(let[r,i]of n.entries())t+=r.length,t+=i instanceof Blob?i.size:i.length;return t}function fst(n){let i=est(),t=n.toUpperCase();return t in i?t:"_OTHER"}function est(){if(rr===void 0){let n=void 0;n&&n.length>0?(rr={}
210,n.forEach(n=>{rr[n]=!0})):rr=sy}return rr}function ost(n){let t=Number(n.port||hy[n.protocol]);if(t&&!isNaN(t))return t}function lst(n){return typeof Document!="undefined"&&n instanceof Document}function ast(n){if(lst(n))return(new XMLSerializer).serializeToString(document).length;if(typeof n=="string")return yy(n);if(n instanceof Blob)return n.size;if(n instanceof FormData)return vst(n);if(n instanceof URLSearchParams)return yy(n.toString());if(n.byteLength!==void 0)return n.byteLength;ay.warn("unknown body type")}function yy(n){return vy.encode(n).byteLength}function vst(n){let t=0;for(let[r,i]of n.entries())t+=r.length,t+=i instanceof Blob?i.size:i.length;return t}function yst(n){let i=pst(),t=n.toUpperCase();return t in i?t:"_OTHER"}function pst(){if(ur===void 0){let n=void 0;n&&n.length>0?(ur={},n.forEach(n=>{ur[n]=!0})):ur=py}return ur}function wst(n){let t=Number(n.port||wy[n.protocol]);if(t&&!isNaN(t))return t}function eo(n){return n===!0||n==="true"||n==="True"}function tp(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ip(n){return typeof n!="string"?[]:n.split(/[;\r\n]+/).map(n=>n.trim()).filter(n=>n.length>0)}function rp(n){if(typeof n!="string"||n.trim().length===0)return ky;let t=n.split(",").map(n=>parseFloat(n.trim()));return t.length>0&&t.every(n=>Number.isFinite(n)&&n>0)&&t.every((n,i)=>i===0||n>t[i-1])?t:(console.warn("Ignoring WebInstrumentationMetricsBucketBoundariesSeconds - expected an ascending list of positive numbers"),ky)}function tht(n){let t=[];for(let i of ip(n)){let r=i.indexOf("=");if(!(r<=0)){let n=i.substring(0,r).trim(),u=i.substring(r+1).trim();if(!(!n||!u)){for(n.startsWith("/")||(n=`/${n}`);n.length>1&&n.endsWith("/");)n=n.slice(0,-1);t.push({prefix:n.toLowerCase(),label:u})}}}return t.length>fo&&(console.warn(`WebInstrumentationPageTypeMap declares more than ${fo} rules, ignoring the rest`),t.length=fo),t.sort((n,t)=>t.prefix.length-n.prefix.length)}function up(){return fr===null&&(fr=tht(r.PAGE_TYPE_MAP),oo=new Set([...fr.map(n=>n.label),dy])),fr}function so(n){return up(),oo.has(n)?n:uo}function cu(n){let i;try{i=new URL(n,window.location.origin)}catch(u){return uo}let t=i.pathname.toLowerCase();for(let n of up())if(t===n.prefix||t.startsWith(`${n.prefix}/`))return so(n.label);let r=i.searchParams.get("VP3");return r&&/^[A-Za-z0-9_]{1,40}$/.test(r)?so(`VPage: ${r}`):t==="/"||t===""?so(dy):uo}function iht(n){return{"export":(t,i)=>{if(ao()){i({code:a.SUCCESS});return}n.export(t,n=>{n.code===a.SUCCESS?lo(0):dp(n.error||new Error("Metrics export failed")),i(n)})},forceFlush:()=>n.forceFlush(),shutdown:()=>n.shutdown(),selectAggregation:t=>n.selectAggregation(t),selectAggregationTemporality:t=>n.selectAggregationTemporality(t)}}function cp(n){if(!(n.instrument||!lu))try{n.instrument=n.kind==="counter"?lu.createExternalCounter(n.name,n.options):lu.createExternalHistogram(n.name,n.options)}catch(t){console.warn(`Failed to create external instrument ${n.name}:`,t)}}function lp(n,t,i){if(!(!n.instrument||!Number.isFinite(t)||t<0))try{n.kind==="counter"?n.instrument.add(t,i):n.instrument.record(t,i)}catch(r){console.warn(`Failed to record external metric ${n.name}:`,r)}}function ap(n,t,i){if(n.instrument){lp(n,t,i);return}if(!op){if(au.length>=fp){sp||(sp=!0,console.warn(`Buffered external metric samples hit ${fp} before telemetry initialised, dropping the rest`));return}au.push({attributes:i,spec:n,value:t})}}function vp(n,t,i){let r={instrument:null,kind:n,name:t,options:i||{}};return ep.push(r),cp(r),r}function er(n){lu=n;n&&ep.forEach(cp);let t=au;au=[];op=!0;n&&t.forEach(n=>lp(n.spec,n.value,n.attributes));hp(n!==null)}function yp(n){return h({[gst]:n,"ol.cortex.tenant.id":r.CLIENT_NAME_SHORT,"ol.cortex.service":r.SERVICE,"ol.global.environment":r.DEPLOYMENT_ENVIRONMENT},hu)}function ho(n,t=null){try{return sessionStorage.getItem(n)||t}catch(i){return t}}function co(n,t){try{sessionStorage.setItem(n,t)}catch(i){}}function eht(){return parseInt(ho(pp,"0"),10)}function lo(n){co(pp,n.toString())}function ao(){return ho(wp)==="true"}function oht(n){co(wp,n.toString())}function sht(){let n=ho(bp);return n!==null?n==="true":null}function kp(n){co(bp,n.toString())}function dp(n){let t=eht()+1;lo(t);console.warn(`Telemetry export failed (${t}/${r.MAX_EXPORT_FAILURES})`,n);t>=r.MAX_EXPORT_FAILURES&&(oht(!0),console.warn("Telemetry disabled for this session due to repeated export failures"))}function hht(){return gl({[gs]:r.SERVICE_NAME,"deployment.environment":r.DEPLOYMENT_ENVIRONMENT})}function cht(n){return new vet({url:n,timeoutMillis:r.TIMEOUT_MS})}function lht(n){return n.endsWith("/v1/traces")?`${n.slice(0,-10)}/v1/metrics`:r.DEFAULT_METRICS_ENDPOINT}function aht(n){if(!eo(r.TRACE_PROPAGATION_IS_ENABLED))return console.debug("OpenTelemetry trace propagation is disabled via config"),!1;let t=[...nht];r.FORCE_ENDPOINT&&t.push(new RegExp(tp(r.FORCE_ENDPOINT),"i"));let u=ip(r.TRACE_PROPAGATION_CORS_URLS).map(n=>new RegExp(tp(n),"i")),i={ignoreUrls:t,propagateTraceHeaderCorsUrls:u};return not({tracerProvider:n,instrumentations:[new hst(nt(h({},i),{clearTimingResources:!1})),new kst(h({},i))]}),!0}function vht(n,t){if(!eo(r.METRICS_IS_ENABLED))return console.debug("OpenTelemetry browser metrics are disabled via config"),null;try{return new uht(n,lht(t))}catch(i){return console.warn("Failed to initialise browser metrics:",i),null}}async function yht(){let n=sht();if(n!==null)return console.debug(`Using cached health check result: ${n}`),n;try{let i=new AbortController,u=setTimeout(()=>i.abort(),r.HEALTH_CHECK_TIMEOUT),n=await fetch(r.DEFAULT_HEALTH_CHECK_ENDPOINT,{method:"GET",cac
210he:"no-cache",signal:i.signal});clearTimeout(u);let t=n.status>=200&&n.status<300;return kp(t),t||console.warn(`OpenTelemetry health check failed (${n.status}), disabling telemetry`),t}catch(t){return console.warn("OpenTelemetry health check failed:",t.message||t,"- disabling telemetry"),kp(!1),!1}}async function pht(){if(!eo(Param.WebInstrumentationIsEnabled)){console.debug("OpenTelemetry is disabled via config");er(null);return}if(window.cortexMetrics)return window.cortexMetrics;if(ao()){console.debug("OpenTelemetry disabled - previous export failures exceeded limit");er(null);return}let n;if(r.FORCE_ENDPOINT)n=r.FORCE_ENDPOINT,console.debug("Using forced endpoint:",n);else{if(!await yht()){console.debug("OpenTelemetry disabled - health check failed");er(null);return}n=r.DEFAULT_ENDPOINT}if(!window.cortexMetrics){if(!performance||!performance.getEntriesByType){console.warn("Navigation Timing API not supported");er(null);return}let i=hht(),f=cht(n),e=new gp(f),t=new ny({resource:i,idGenerator:new ge,spanProcessors:[e],forceFlushTimeoutMillis:r.TIMEOUT_MS});t.register({propagator:new sh});aht(t);let u=vht(i,n),o=new fht(t,u);window.cortexMetrics=o;er(u)}return window.cortexMetrics}var nw=Object.defineProperty,tw=Object.defineProperties,iw=Object.getOwnPropertyDescriptors,yo=Object.getOwnPropertySymbols,rw=Object.prototype.hasOwnProperty,uw=Object.prototype.propertyIsEnumerable,vu=(n,t,i)=>t in n?nw(n,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[t]=i,h=(n,t)=>{for(var i in t||(t={}))rw.call(t,i)&&vu(n,i,t[i]);if(yo)for(i of yo(t))uw.call(t,i)&&vu(n,i,t[i]);return n},nt=(n,t)=>tw(n,iw(t)),n=(n,t,i)=>vu(n,typeof t!="symbol"?t+"":t,i),po=class{constructor(t){n(this,"_delegate");this._delegate=t}export(n,t){this._delegate.export(n,t)}forceFlush(){return this._delegate.forceFlush()}shutdown(){return this._delegate.shutdown()}setMetrics(n){this._delegate.setMetrics(n)}},wo=class extends Error{constructor(t,i,r){super(t);n(this,"code");n(this,"name","OTLPExporterError");n(this,"data");this.data=r;this.code=i}},hw=class{constructor(t){n(this,"_concurrencyLimit");n(this,"_sendingPromises",[]);this._concurrencyLimit=t}pushPromise(n){if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(n);let t=()=>{let t=this._sendingPromises.indexOf(n);this._sendingPromises.splice(t,1)};n.then(t,t)}hasReachedLimit(){return this._sendingPromises.length>=this._concurrencyLimit}async awaitAll(){await Promise.all(this._sendingPromises)}},lw=typeof globalThis=="object"?globalThis:typeof self=="object"?self:typeof window=="object"?window:typeof global=="object"?global:{},lt="1.9.0",bo=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,vw=aw(lt),yw=lt.split(".")[0],ri=Symbol.for("opentelemetry.js.api."+yw),ui=lw,pw=function(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{for(;(t===void 0||t-->0)&&!(u=r.next()).done;)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error;}}return f},ww=function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},bw=function(){function n(n){this._namespace=n.namespace||"DiagComponentLogger"}return n.prototype.debug=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oi("debug",this._namespace,t)},n.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oi("error",this._namespace,t)},n.prototype.info=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oi("info",this._namespace,t)},n.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oi("warn",this._namespace,t)},n.prototype.verbose=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return oi("verbose",this._namespace,t)},n}(),l,yt,rs,us,lr,gu,hi,tt,vr,ls,ys,a,yh,gh,nc,lc,ac,ne,bi,y,i,k,te,bt,wc,fl,gr,el,oe,ol,se,kl,nu,ti,dl,ia,ra,oa,la,aa,da,rv,c,ov,we,sv,eu,hv,d,ge,gt,pv,no,g,ir,bv,kv,dv,gv,ny,s,ty,iy,to,ey,io,oy,sy,rr,hy,ay,vy,py,ur,wy,fr,oo,vo,gp;(function(n){n[n.NONE=0]="NONE";n[n.ERROR=30]="ERROR";n[n.WARN=50]="WARN";n[n.INFO=60]="INFO";n[n.DEBUG=70]="DEBUG";n[n.VERBOSE=80]="VERBOSE";n[n.ALL=9999]="ALL"})(l||(l={}));var dw=function(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{for(;(t===void 0||t-->0)&&!(u=r.next()).done;)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error;}}return f},gw=function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},nb="diag",p=function(){function n(){function t(n){return function(){for(var i,r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];return i=at("diag"),i?i[n].apply(i,gw([],dw(r),!1)):void 0}}var n=this,i=function(t,i){var r,u,f,e,o,s,h;return(i===void 0&&(i={logLevel:l.INFO}),t===n)?(e=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation"),n.error((r=e.stack)!==null&&r!==void 0?r:e.message),!1):(typeof i=="number"&&(i={logLevel:i}
210),o=at("diag"),s=kw((u=i.logLevel)!==null&&u!==void 0?u:l.INFO,t),o&&!i.suppressOverrideMessage&&(h=(f=(new Error).stack)!==null&&f!==void 0?f:"<failed to generate stacktrace>",o.warn("Current logger will be overwritten from "+h),s.warn("Current logger will overwrite one already registered from "+h)),fi("diag",s,n,!0))};n.setLogger=i;n.disable=function(){ei(nb,n)};n.createComponentLogger=function(n){return new bw(n)};n.verbose=t("verbose");n.debug=t("debug");n.info=t("info");n.warn=t("warn");n.error=t("error")}return n.instance=function(){return this._instance||(this._instance=new n),this._instance},n}(),tb=function(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{for(;(t===void 0||t-->0)&&!(u=r.next()).done;)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error;}}return f},ib=function(n){var t=typeof Symbol=="function"&&Symbol.iterator,i=t&&n[t],r=0;if(i)return i.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&r>=n.length&&(n=void 0),{value:n&&n[r++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.");},rb=function(){function n(n){this._entries=n?new Map(n):new Map}return n.prototype.getEntry=function(n){var t=this._entries.get(n);if(t)return Object.assign({},t)},n.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(n){var t=tb(n,2),i=t[0],r=t[1];return[i,r]})},n.prototype.setEntry=function(t,i){var r=new n(this._entries);return r._entries.set(t,i),r},n.prototype.removeEntry=function(t){var i=new n(this._entries);return i._entries.delete(t),i},n.prototype.removeEntries=function(){for(var u,o,e,r,t,s,f=[],i=0;i<arguments.length;i++)f[i]=arguments[i];e=new n(this._entries);try{for(r=ib(f),t=r.next();!t.done;t=r.next())s=t.value,e._entries.delete(s)}catch(h){u={error:h}}finally{try{t&&!t.done&&(o=r.return)&&o.call(r)}finally{if(u)throw u.error;}}return e},n.prototype.clear=function(){return new n},n}(),ub=Symbol("BaggageEntryMetadata"),fb=p.instance();var sb=function(){function n(t){var i=this;i._currentContext=t?new Map(t):new Map;i.getValue=function(n){return i._currentContext.get(n)};i.setValue=function(t,r){var u=new n(i._currentContext);return u._currentContext.set(t,r),u};i.deleteValue=function(t){var r=new n(i._currentContext);return r._currentContext.delete(t),r}}return n}
210(),ni=new sb,vt=function(){var n=function(t,i){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i])},n(t,i)};return function(t,i){function r(){this.constructor=t}if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");n(t,i);t.prototype=i===null?Object.create(i):(r.prototype=i.prototype,new r)}}(),hb=function(){function n(){}return n.prototype.createGauge=function(){return kb},n.prototype.createHistogram=function(){return db},n.prototype.createCounter=function(){return bb},n.prototype.createUpDownCounter=function(){return gb},n.prototype.createObservableGauge=function(){return tk},n.prototype.createObservableCounter=function(){return nk},n.prototype.createObservableUpDownCounter=function(){return ik},n.prototype.addBatchObservableCallback=function(){},n.prototype.removeBatchObservableCallback=function(){},n}(),or=function(){function n(){}return n}(),cb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t.prototype.add=function(){},t}(or),lb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t.prototype.add=function(){},t}(or),ab=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t.prototype.record=function(){},t}(or),vb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t.prototype.record=function(){},t}(or),pu=function(){function n(){}return n.prototype.addCallback=function(){},n.prototype.removeCallback=function(){},n}(),yb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t}(pu),pb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t}(pu),wb=function(n){function t(){return n!==null&&n.apply(this,arguments)||this}return vt(t,n),t}(pu),ko=new hb,bb=new cb,kb=new ab,db=new vb,gb=new lb,nk=new yb,tk=new pb,ik=new wb;(function(n){n[n.INT=0]="INT";n[n.DOUBLE=1]="DOUBLE"})(yt||(yt={}));var rk={get:function(n,t){if(n!=null)return n[t]},keys:function(n){return n==null?[]:Object.keys(n)}},uk={set:function(n,t,i){n!=null&&(n[t]=i)}},fk=function(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{for(;(t===void 0||t-->0)&&!(u=r.next()).done;)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error;}}return f},ek=function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},ok=function(){function n(){}return n.prototype.active=function(){return ni},n.prototype.with=function(n,t,i){for(var u=[],r=3;r<arguments.length;r++)u[r-3]=arguments[r];return t.call.apply(t,ek([i],fk(u),!1))},n.prototype.bind=function(n,t){return t},n.prototype.enable=function(){return this},n.prototype.disable=function(){return this},n}(),sk=function(n,t){var i=typeof Symbol=="function"&&n[Symbol.iterator],r,u,f,e;if(!i)return n;r=i.call(n);f=[];try{for(;(t===void 0||t-->0)&&!(u=r.next()).done;)f.push(u.value)}catch(o){e={error:o}}finally{try{u&&!u.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error;}}return f},hk=function(n,t,i){if(i||arguments.length===2)for(var r=0,f=t.length,u;r<f;r++)!u&&r in t||(u||(u=Array.prototype.slice.call(t,0,r)),u[r]=t[r]);return n.concat(u||Array.prototype.slice.call(t))},wu="context",ck=new ok,hr=function(){function n(){}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalContextManager=function(n){return fi(wu,n,p.instance())},n.prototype.active=function(){return this._getContextManager().active()},n.prototype.with=function(n,t,i){for(var u,f=[],r=3;r<arguments.length;r++)f[r-3]=arguments[r];return(u=this._getContextManager()).with.apply(u,hk([n,t,i],sk(f),!1))},n.prototype.bind=function(n,t){return this._getContextManager().bind(n,t)},n.prototype._getContextManager=function(){return at(wu)||ck},n.prototype.disable=function(){this._getContextManager().disable();ei(wu,p.instance())},n}(),et;(function(n){n[n.NONE=0]="NONE";n[n.SAMPLED=1]="SAMPLED"})(et||(et={}));var go="0000000000000000",ns="00000000000000000000000000000000",ts={traceId:ns,spanId:go,traceFlags:et.NONE},si=function(){function n(n){n===void 0&&(n=ts);this._spanContext=n}return n.prototype.spanContext=function(){return this._spanContext},n.prototype.setAttribute=function(){return this},n.prototype.setAttributes=function(){return this},n.prototype.addEvent=function(){return this},n.prototype.addLink=function(){return this},n.prototype.addLinks=function(){return this},n.prototype.setStatus=function(){return this},n.prototype.updateName=function(){return this},n.prototype.end=function(){},n.prototype.isRecording=function(){return!1},n.prototype.recordException=function(){},n}(),bu=yu("OpenTelemetry Context Key SPAN");rs=/^([0-9a-f]{32})$/i;us=/^[0-9a-f]{16}$/i;lr=hr.getInstance();gu=function(){function n(){}return n.prototype.startSpan=function(n,t,i){var u,r;return(i===void 0&&(i=lr.active()),u=!!(t!=null&&t.root),u)?new si:(r=i&&is(i),wk(r)&&cr(r)?new si(r):new si)},n.prototype.startActiveSpan=function(n,t,i,r){var f,e,u;if(!(arguments.length<2)){arguments.length===2?u=t:arguments.length===3?(f=t,u=i):(f=t,e=i,u=r);var o=e!=null?e:lr.active(),s=this.startSpan(n,f,o),h=du(o,s);return lr.with(h,u,void 0,s)}},n}();var bk=new gu,kk=function(){function n(n,t,i,r){this._provider=n;this.name=t;this.version=i;this.options=r}return n.prototype.startSpan=function(n,t,i){return this._getTracer().startSpan(n,t,i)},n.prototype.startActiveSpan=function(){var n=this._getTracer();return Reflect.apply(n.startActiveSpan,n,arguments)},n.prototype._getTracer=function(){if(this._delegate)return this._delegate;var n=this._provider.getDelegateTracer(this.name,this.version,this.options);return n?(this._delegate=n,this._delegate):bk},n}(),dk=function(){function n(){}return n.prototype.getTracer=function(){return new gu},n}(),gk=new dk,es=function(){function n(){}return n.prototype.getTracer=function(n,t,i){var r;
210return(r=this.getDelegateTracer(n,t,i))!==null&&r!==void 0?r:new kk(this,n,t,i)},n.prototype.getDelegate=function(){var n;return(n=this._delegate)!==null&&n!==void 0?n:gk},n.prototype.setDelegate=function(n){this._delegate=n},n.prototype.getDelegateTracer=function(n,t,i){var r;if((r=this._delegate)!==null&&r!==void 0)return r.getTracer(n,t,i)},n}(),ar;(function(n){n[n.NOT_RECORD=0]="NOT_RECORD";n[n.RECORD=1]="RECORD";n[n.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ar||(ar={})),function(n){n[n.INTERNAL=0]="INTERNAL";n[n.SERVER=1]="SERVER";n[n.CLIENT=2]="CLIENT";n[n.PRODUCER=3]="PRODUCER";n[n.CONSUMER=4]="CONSUMER"}(hi||(hi={})),function(n){n[n.UNSET=0]="UNSET";n[n.OK=1]="OK";n[n.ERROR=2]="ERROR"}(tt||(tt={}));var f=hr.getInstance(),t=p.instance(),nd=function(){function n(){}return n.prototype.getMeter=function(){return ko},n}(),td=new nd,nf="metrics",id=function(){function n(){}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalMeterProvider=function(n){return fi(nf,n,p.instance())},n.prototype.getMeterProvider=function(){return at(nf)||td},n.prototype.getMeter=function(n,t,i){return this.getMeterProvider().getMeter(n,t,i)},n.prototype.disable=function(){ei(nf,p.instance())},n}(),os=id.getInstance(),rd=function(){function n(){}return n.prototype.inject=function(){},n.prototype.extract=function(n){return n},n.prototype.fields=function(){return[]},n}(),tf=yu("OpenTelemetry Baggage Key");var rf="propagation",od=new rd,sd=function(){function n(){this.createBaggage=eb;this.getBaggage=ss;this.getActiveBaggage=ud;this.setBaggage=fd;this.deleteBaggage=ed}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalPropagator=function(n){return fi(rf,n,p.instance())},n.prototype.inject=function(n,t,i){return i===void 0&&(i=uk),this._getGlobalPropagator().inject(n,t,i)},n.prototype.extract=function(n,t,i){return i===void 0&&(i=rk),this._getGlobalPropagator().extract(n,t,i)},n.prototype.fields=function(){return this._getGlobalPropagator().fields()},n.prototype.disable=function(){ei(rf,p.instance())},n.prototype._getGlobalPropagator=function(){return at(rf)||od},n}(),w=sd.getInstance(),uf="trace",hd=function(){function n(){this._proxyTracerProvider=new es;this.wrapSpanContext=pk;this.isSpanContextValid=cr;this.deleteSpan=ak;this.getSpan=ku;this.getActiveSpan=lk;this.getSpanContext=is;this.setSpan=du;this.setSpanContext=vk}return n.getInstance=function(){return this._instance||(this._instance=new n),this._instance},n.prototype.setGlobalTracerProvider=function(n){var t=fi(uf,this._proxyTracerProvider,p.instance());return t&&this._proxyTracerProvider.setDelegate(n),t},n.prototype.getTracerProvider=function(){return at(uf)||this._proxyTracerProvider},n.prototype.getTracer=function(n,t){return this.getTracerProvider().getTracer(n,t)},n.prototype.disable=function(){ei(uf,p.instance());this._proxyTracerProvider=new es},n}(),o=hd.getInstance(),hs=yu("OpenTelemetry SDK Context Key SUPPRESS_TRACING");vr="baggage";ls=(class{inject(n,t,i){let r=w.getBaggage(n);if(r&&!ff(n)){let f=ad(r).filter(n=>n.length<=4096).slice(0,180),u=ld(f);u.length>0&&i.set(t,vr,u)}}extract(n,t,i){let r=i.get(t,vr);if(!r)return n;let f={},u=0,e=0;if(Array.isArray(r))for(let n=0;n<r.length;n++)[u,e]=cs(r[n],f,u,e);else[u]=cs(r,f,u,e);return u===0?n:w.setBaggage(n,w.createBaggage(f))}fields(){return[vr]}});ys=wd();var ef="error.type",sf="exception.message",dd="exception.stacktrace",hf="exception.type",ps="http.request.method",ws="http.request.method_original",bs="http.response.status_code",ks="server.address",ds="server.port",gs="service.name",cf="telemetry.sdk.language",lf="telemetry.sdk.name",af="telemetry.sdk.version",nh="url.full",vf={[lf]:"opentelemetry",["process.runtime.name"]:"browser",[cf]:"webjs",[af]:"2.10.0"},it=performance,gd=Math.pow(10,6),li=Math.pow(10,9);(function(n){n[n.SUCCESS=0]="SUCCESS";n[n.FAILED=1]="FAILED"})(a||(a={}));var ig=class{constructor(t={}){n(this,"_propagators");n(this,"_fields");var i;this._propagators=(i=t.propagators)!=null?i:[];let r=new Set;for(let n of this._propagators){let t=typeof n.fields=="function"?n.fields():[];for(let n of t)r.add(n)}this._fields=Array.from(r)}inject(n,i,r){for(let u of this._propagators)try{u.inject(n,i,r)}catch(f){t.warn(`Failed to inject with ${u.constructor.name}. Err: ${f.message}`)}}extract(n,i,r){return this._propagators.reduce((n,u)=>{try{return u.extract(n,i,r)}catch(f){t.warn(`Failed to extract with ${u.constructor.name}. Err: ${f.message}`)}return n},n)}fields(){return this._fields.slice()}},wf="[_0-9a-z-*/]",rg=`[a-z]${wf}{0,255}`,ug=`[a-z0-9]${wf}{0,240}@[a-z]${wf}{0,13}`,fg=new RegExp(`^(?:${rg}|${ug})$`),eg=/^[ -~]{0,255}[!-~]$/,og=/,|=/;var sg=32,fh=512,eh=",",oh="=",hg=class t{constructor(t){n(this,"_length");n(this,"_rawTraceState");n(this,"_internalState");this._rawTraceState=typeof t=="string"?t:"";this._length=this._rawTraceState.length}
210set(n,t){if(!rh(n)||!uh(t))return this;let i=this._getState(),f=i.get(n),r=this._length;if(r+=typeof f=="string"?t.length-f.length:n.length+t.length+(i.size>0?2:1),r>fh)return this;let u=new Map(i);return u.delete(n),u.set(n,t),this._fromState(u,r)}unset(n){let t=this._getState(),r=t.get(n);if(typeof r!="string")return this;let i=this._length-(n.length+r.length+1);t.size>1&&(i=i-1);let u=new Map(t);return u.delete(n),this._fromState(u,i)}get(n){return this._getState().get(n)}serialize(){let n="",t=0;for(let i of this._getState())t>0&&(n=eh+n),n=`${i[0]}${oh}${i[1]}`+n,t++;return n}_getState(){if(this._internalState)return this._internalState;let i=this._rawTraceState.split(eh),n=new Map,t=0;for(let r of i){let i=r.trim(),u=i.indexOf(oh);if(u!==-1){let f=i.slice(0,u),e=i.slice(u+1);if(rh(f)&&uh(e)){let o=t+i.length+(n.size>0?1:0);if(!(o>fh)&&(n.set(f,e),t=o,n.size>=sg))break}}}return this._length=t,this._internalState=new Map(Array.from(n.entries()).reverse()),this._internalState}_fromState(n,i){let r=Object.create(t.prototype);return r._internalState=n,r._length=i,r}},bf="traceparent",kf="tracestate",cg="00",lg=new RegExp(`^\\s?(${"(?!ff)[\\da-f]{2}"})-(${"(?![0]{32})[\\da-f]{32}"})-(${"(?![0]{16})[\\da-f]{16}"})-(${"[\\da-f]{2}"})(-.*)?\\s?$`);var sh=class{inject(n,t,i){let r=o.getSpanContext(n);if(r&&!ff(n)&&cr(r)){let u=`${cg}-${r.traceId}-${r.spanId}-0${Number(r.traceFlags||et.NONE).toString(16)}`;i.set(t,bf,u);r.traceState&&i.set(t,kf,r.traceState.serialize())}}extract(n,t,i){let r=i.get(t,bf);if(!r)return n;let e=Array.isArray(r)?r[0]:r;if(typeof e!="string")return n;let u=ag(e);if(!u)return n;u.isRemote=!0;let f=i.get(t,kf);if(f){let n=Array.isArray(f)?f.join(","):f;u.traceState=new hg(typeof n=="string"?n:void 0)}return o.setSpanContext(n,u)}fields(){return[bf,kf]}},vg="[object Object]",yg="[object Null]",pg="[object Undefined]",wg=Function.prototype,hh=wg.toString,bg=hh.call(Object),kg=Object.getPrototypeOf,ch=Object.prototype,lh=ch.hasOwnProperty,pt=Symbol?Symbol.toStringTag:void 0,ah=ch.toString;yh=20;gh={_export:fn};nc=(class{constructor(i,r,u,f,e,o){n(this,"_metrics");n(this,"_diagLogger");n(this,"_transport");n(this,"_serializer");n(this,"_responseHandler");n(this,"_promiseQueue");n(this,"_timeout");this._transport=i;this._serializer=r;this._responseHandler=u;this._promiseQueue=f;this._timeout=o;this._diagLogger=t.createComponentLogger({namespace:"OTLPExportDelegate"});this._metrics=e}export(n,t){if(this._diagLogger.debug("items to be sent",n),this._promiseQueue.hasReachedLimit()){t({code:a.FAILED,error:new Error("Concurrent export limit reached")});return}let r=this._serializer.serializeRequest(n);if(r==null){t({code:a.FAILED,error:new Error("Nothing to send")});return}let i=this._metrics.startExport(n);this._promiseQueue.pushPromise(this._transport.send(r,this._timeout).then(n=>{var r;if(n.status==="success"){if(i(void 0),n.data!=null)try{this._responseHandler.handleResponse(this._serializer.deserializeResponse(n.data))}catch(u){this._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",u,n.data)}t({code:a.SUCCESS});return}if(n.status==="failure"&&n.error){i(n.error);t({code:a.FAILED,error:n.error});return}n.status==="retryable"?(i("export_max_retries"),t({code:a.FAILED,error:(r=n.error)!=null?r:new wo("Export failed with retryable status")})):(i("export_failed"),t({code:a.FAILED,error:new wo("Export failed with unknown error")}))},n=>{i(n),t({code:a.FAILED,error:n})}))}forceFlush(){return this._promiseQueue.awaitAll()}setMetrics(n){this._metrics=n}async shutdown(){this._diagLogger.debug("shutdown started");await this.forceFlush();this._transport.shutdown()}});var tc="http.response.status_code",cn="otel.component.name",ln="otel.component.type",an="server.address",vn="server.port",yn="error.type",pn="0.221.0",ic=new Map,wn=class{constructor(t){n(this,"inflight");n(this,"exported");n(this,"duration");n(this,"standardAttrs");n(this,"responseAttributesFromError");n(this,"helper");var f;let{componentType:i,metricsHelper:s,meterProvider:e,url:r,responseAttributesFromError:h}=t;this.responseAttributesFromError=h;let u=e?e.getMeter("@opentelemetry/otlp-exporter",pn):sr(),o=(f=ic.get(i))!=null?f:0;if(ic.set(i,o+1),this.standardAttrs={[ln]:i,[cn]:`${i}/${o}`},r){let n=r;r.includes("://")||(n=`http://${r}`);try{let t=new URL(n);this.standardAttrs[an]=t.hostname;let i;t.port?i=Number(t.port):t.protocol==="http:"?i=80:t.protocol==="https:"&&(i=443);typeof i=="number"&&(this.standardAttrs[vn]=i)}catch(t){}}this.helper=s;this.inflight=u.createUpDownCounter(`otel.sdk.exporter.${this.helper.name}.inflight`,{unit:`{${this.helper.name}}`,description:`The number of ${this.helper.name}s which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).`});this.exported=u.createCounter(`otel.sdk.exporter.${this.helper.name}.exported`,{unit:`{${this.helper.name}}`,description:`The number of ${this.helper.name}s for which the export has finished, either successful or failed.`});this.duration=u.createHistogram("otel.sdk.exporter.operation.duration",{unit:"s",description:"The duration of exporting a batch of telemetry records.",advice:{explicitBucketBoundaries:[]}})}startExport(n){let t=this.helper.countItems(n),i=b();return this.inflight.add(t,this.standardAttrs),n=>{let u=b();this.inflight.add(-t,this.standardAttrs);let r=n?nt(h({},this.standardAttrs),{[yn]:n instanceof Error?n.name:"export_failed"}):this.standardAttrs;this.exported.add(t,r);let f=h(h({},r),this.responseAttributesFromError(n)),e=ng(yf(i,u))/1e3;this.duration.record(e,f)}}},rc={name:"metric_data_point",countItems:n=>{let t=0;for(let i of n.scopeMetrics)for(let n of i.metrics)t+=n.dataPoints.length;return t}},bn={name:"span",countItems:n=>n.length};var kn="ProtobufWriter: estimated size was too small, growing buffer.",yi=1,uc=class{constructor(t=65536){n(this,"_buffer");n(this,"_textEncoder");n(this,"_dataView");n(this,"pos",0);this._buffer=new Uint8Array(t);this._textEncoder=new TextEncoder;this._dataView=new DataView(this._buffer.buffer,this._buffer.byteOffset)}_ensureCapacity(n){let r=this.pos+n;
210if(!(r<=this._buffer.length)){t.debug(kn);let i=this._buffer.length*2;for(;i<r;)i*=2;let u=new Uint8Array(i);u.set(this._buffer);this._buffer=u;this._dataView=new DataView(this._buffer.buffer,this._buffer.byteOffset)}}finish(){return this._buffer.subarray(0,this.pos)}startLengthDelimited(){let n=this.pos;return this._ensureCapacity(yi),this.pos+=yi,n}finishLengthDelimited(n,t){let i=t>>>0,u=wt(i);if(u>yi){let t=u-yi;this._ensureCapacity(t);this._buffer.copyWithin(n+u,n+yi,this.pos);this.pos+=t}let r=n;i<128?this._buffer[r]=i:i<16384?(this._buffer[r++]=i&127|128,this._buffer[r]=i>>>7):i<2097152?(this._buffer[r++]=i&127|128,this._buffer[r++]=i>>>7&127|128,this._buffer[r]=i>>>14):i<268435456?(this._buffer[r++]=i&127|128,this._buffer[r++]=i>>>7&127|128,this._buffer[r++]=i>>>14&127|128,this._buffer[r]=i>>>21):(this._buffer[r++]=i&127|128,this._buffer[r++]=i>>>7&127|128,this._buffer[r++]=i>>>14&127|128,this._buffer[r++]=i>>>21&127|128,this._buffer[r]=i>>>28)}writeSint32(n){this.writeVarint((n<<1^n>>31)>>>0)}writeSfixed64(n){let t,i;if(n>=0)t=n>>>0,i=n/4294967296>>>0;else{let r=Math.abs(n);t=r>>>0;i=r/4294967296>>>0;t=~t>>>0;i=~i>>>0;t=t+1>>>0;t===0&&(i=i+1>>>0)}this.writeFixed64(t,i)}writeVarint(n){if(this._ensureCapacity(wt(n)),n>=0&&n<=4294967295){let t=n>>>0;for(;t>127;)this._buffer[this.pos++]=t&127|128,t>>>=7;this._buffer[this.pos++]=t}else{let t,i;if(n>=0)t=n>>>0,i=n/4294967296>>>0;else{let r=Math.abs(n);t=r>>>0;i=r/4294967296>>>0;t=~t>>>0;i=~i>>>0;t=t+1>>>0;t===0&&(i=i+1>>>0)}for(;i>0||t>127;)this._buffer[this.pos++]=t&127|128,t=(t>>>7|i<<25)>>>0,i>>>=7;this._buffer[this.pos++]=t&127}}writeFixed32(n){this._ensureCapacity(4);let t=n>>>0;this._buffer[this.pos++]=t&255;this._buffer[this.pos++]=t>>>8&255;this._buffer[this.pos++]=t>>>16&255;this._buffer[this.pos++]=t>>>24&255}writeFixed64(n,t){this._ensureCapacity(8);let i=n>>>0,r=t>>>0;this._buffer[this.pos++]=i&255;this._buffer[this.pos++]=i>>>8&255;this._buffer[this.pos++]=i>>>16&255;this._buffer[this.pos++]=i>>>24&255;this._buffer[this.pos++]=r&255;this._buffer[this.pos++]=r>>>8&255;this._buffer[this.pos++]=r>>>16&255;this._buffer[this.pos++]=r>>>24&255}writeBytes(n){this.writeVarint(n.length);this._ensureCapacity(n.length);this._buffer.set(n,this.pos);this.pos+=n.length}writeTag(n,t){this.writeVarint(n<<3|t)}writeDouble(n){this._ensureCapacity(8);this._dataView.setFloat64(this.pos,n,!0);this.pos+=8}writeString(n){let i=!0,t=n.length;for(let r=0;r<t;r++)if(n.charCodeAt(r)>127){i=!1;break}if(i){this.writeVarint(t);this._ensureCapacity(t);for(let i=0;i<t;i++)this._buffer[this.pos++]=n.charCodeAt(i)}else{let t=this._textEncoder.encode(n);this.writeBytes(t)}}};var ec=class{emit(){}enabled(){return!1}},dn=new ec,kr=Symbol.for("io.opentelemetry.js.api.logs"),wi=globalThis;var oc=1,ntt=class{getLogger(){return new ec}},sc=new ntt,ttt=class{constructor(n,t,i,r){this._provider=n;this.name=t;this.version=i;this.options=r}emit(n){this._getLogger().emit(n)}enabled(n){return this._getLogger().enabled(n)}_getLogger(){if(this._delegate)return this._delegate;let n=this._provider._getDelegateLogger(this.name,this.version,this.options);return n?(this._delegate=n,this._delegate):dn}},hc=class{getLogger(n,t,i){var r;return(r=this._getDelegateLogger(n,t,i))!==null&&r!==void 0?r:new ttt(this,n,t,i)}_getDelegate(){var n;return(n=this._delegate)!==null&&n!==void 0?n:sc}_setDelegate(n){this._delegate=n}_getDelegateLogger(n,t,i){var r;if((r=this._delegate)!==null&&r!==void 0)return r.getLogger(n,t,i)}},itt=class n{constructor(){this._proxyLoggerProvider=new hc}static getInstance(){return this._instance||(this._instance=new n),this._instance}setGlobalLoggerProvider(n){return wi[kr]?this.getLoggerProvider():(wi[kr]=gn(oc,n,sc),this._proxyLoggerProvider._setDelegate(n),n)}getLoggerProvider(){var n,t;return(t=(n=wi[kr])===null||n===void 0?void 0:n.call(wi,oc))!==null&&t!==void 0?t:this._proxyLoggerProvider}getLogger(n,t,i){return this.getLoggerProvider().getLogger(n,t,i)}disable(){delete wi[kr];this._proxyLoggerProvider=new hc}},cc=itt.getInstance();lc=-(2**63);ac=2**63;ne=(class{constructor(){n(this,"pos",0)}startLengthDelimited(){return this.pos}finishLengthDelimited(n,t){this.pos+=wt(t)}writeVarint(n){this.pos+=wt(n)}writeSint32(n){this.pos+=wt((n<<1^n>>31)>>>0)}writeSfixed64(){this.pos+=8}writeFixed32(){this.pos+=4}
210writeFixed64(){this.pos+=8}writeBytes(n){this.pos+=wt(n.length);this.pos+=n.length}writeTag(n,t){this.writeVarint(n<<3|t)}writeDouble(){this.pos+=8}writeString(n){let t=utt(n);this.pos+=wt(t);this.pos+=t}});bi=(class{constructor(t){n(this,"pos",0);n(this,"_buf");n(this,"_textDecoder");this._buf=t;this._textDecoder=new TextDecoder}isAtEnd(){return this.pos>=this._buf.length}readTag(){let n=this.readVarint();return{fieldNumber:n>>>3,wireType:n&7}}readVarint(){let n=0,t=0,i=!1;for(;this.pos<this._buf.length;){let r=this._buf[this.pos++];if(n+=(r&127)*Math.pow(2,t),t+=7,(r&128)==0){i=!0;break}}if(!i)throw new Error("Truncated buffer: unexpected end of data while reading varint");return n}readBytes(){let n=this.readVarint();if(this.pos+n>this._buf.length)throw new Error(`Truncated buffer: expected ${n} bytes at position ${this.pos}, but only ${this._buf.length-this.pos} available`);let t=this._buf.subarray(this.pos,this.pos+n);return this.pos+=n,t}readString(){return this._textDecoder.decode(this.readBytes())}skip(n){switch(n){case 0:this.readVarint();break;case 1:this.pos+=8;break;case 2:this.readBytes();break;case 5:this.pos+=4;break;default:throw new Error(`Unknown wire type ${n}, cannot safely skip`);}}}),function(n){n[n.DELTA=0]="DELTA";n[n.CUMULATIVE=1]="CUMULATIVE"}(y||(y={})),function(n){n.COUNTER="COUNTER";n.GAUGE="GAUGE";n.HISTOGRAM="HISTOGRAM";n.UP_DOWN_COUNTER="UP_DOWN_COUNTER";n.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER";n.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE";n.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(i||(i={})),function(n){n[n.HISTOGRAM=0]="HISTOGRAM";n[n.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM";n[n.GAUGE=2]="GAUGE";n[n.SUM=3]="SUM"}(k||(k={}));te=(class n extends Error{constructor(t){super(t);Object.setPrototypeOf(this,n.prototype)}}),function(n){n[n.DROP=0]="DROP";n[n.SUM=1]="SUM";n[n.LAST_VALUE=2]="LAST_VALUE";n[n.HISTOGRAM=3]="HISTOGRAM";n[n.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"}(bt||(bt={}));wc=(class{constructor(){n(this,"kind",bt.DROP)}createAccumulation(){}merge(){}diff(){}toMetricData(){}});var ie=class{constructor(t,i,r=!0,u=htt(i)){n(this,"startTime");n(this,"_boundaries");n(this,"_recordMinMax");n(this,"_current");this.startTime=t;this._boundaries=i;this._recordMinMax=r;this._current=u}record(n){if(!Number.isNaN(n)){this._current.count+=1;this._current.sum+=n;this._recordMinMax&&(this._current.min=Math.min(n,this._current.min),this._current.max=Math.max(n,this._current.max),this._current.hasMinMax=!0);let t=ott(this._boundaries,n);this._current.buckets.counts[t]+=1}}setStartTime(n){this.startTime=n}toPointValue(){return this._current}},bc=class{constructor(t,i){n(this,"kind",bt.HISTOGRAM);n(this,"_boundaries");n(this,"_recordMinMax");this._boundaries=t;this._recordMinMax=i}createAccumulation(n){return new ie(n,this._boundaries,this._recordMinMax)}merge(n,t){let i=n.toPointValue(),r=t.toPointValue(),e=i.buckets.counts,s=r.buckets.counts,o=new Array(e.length);for(let n=0;n<e.length;n++)o[n]=e[n]+s[n];let u=1/0,f=-1/0;return this._recordMinMax&&(i.hasMinMax&&r.hasMinMax?(u=Math.min(i.min,r.min),f=Math.max(i.max,r.max)):i.hasMinMax?(u=i.min,f=i.max):r.hasMinMax&&(u=r.min,f=r.max)),new ie(n.startTime,i.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:i.buckets.boundaries,counts:o},count:i.count+r.count,sum:i.sum+r.sum,hasMinMax:this._recordMinMax&&(i.hasMinMax||r.hasMinMax),min:u,max:f})}diff(n,t){let i=n.toPointValue(),r=t.toPointValue(),u=i.buckets.counts,e=r.buckets.counts,f=new Array(u.length);for(let n=0;n<u.length;n++)f[n]=e[n]-u[n];return new ie(t.startTime,i.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:i.buckets.boundaries,counts:f},count:r.count-i.count,sum:r.sum-i.sum,hasMinMax:!1,min:1/0,max:-1/0})}toMetricData(n,t,r,u){return{descriptor:n,aggregationTemporality:t,dataPointType:k.HISTOGRAM,dataPoints:r.map(([t,r])=>{let f=r.toPointValue(),e=n.type===i.GAUGE||n.type===i.UP_DOWN_COUNTER||n.type===i.OBSERVABLE_GAUGE||n.type===i.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:t,startTime:r.startTime,endTime:u,value:{min:f.hasMinMax?f.min:void 0,max:f.hasMinMax?f.max:void 0,sum:e?void 0:f.sum,buckets:f.buckets,count:f.count}}})}}},kc=class t{constructor(t=new ctt,i=0,r=0,u=0){n(this,"backing");n(this,"indexBase");n(this,"indexStart");n(this,"indexEnd");this.backing=t;this.indexBase=i;this.indexStart=r;this.indexEnd=u}get offset(){return this.indexStart}get length(){return this.backing.length===0||this.indexEnd===this.indexStart&&this.at(0)===0?0:this.indexEnd-this.indexStart+1}counts(){return Array.from({length:this.length},(n,t)=>this.at(t))}at(n){let t=this.indexBase-this.indexStart;return n<t&&(n+=this.backing.length),n-=t,this.backing.countAt(n)}incrementBucket(n,t){this.backing.increment(n,t)}
210decrementBucket(n,t){this.backing.decrement(n,t)}trim(){for(let n=0;n<this.length;n++)if(this.at(n)!==0){this.indexStart+=n;break}else if(n===this.length-1){this.indexStart=this.indexEnd=this.indexBase=0;return}for(let n=this.length-1;n>=0;n--)if(this.at(n)!==0){this.indexEnd-=this.length-n-1;break}this._rotate()}downscale(n){this._rotate();let u=1+this.indexEnd-this.indexStart,t=1<<n,i=0,r=0;for(let n=this.indexStart;n<=this.indexEnd;){let f=n%t;f<0&&(f+=t);for(let e=f;e<t&&i<u;e++)this._relocateBucket(r,i),i++,n++;r++}this.indexStart>>=n;this.indexEnd>>=n;this.indexBase=this.indexStart}clone(){return new t(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)}_rotate(){let n=this.indexBase-this.indexStart;n!==0&&(n>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,n),this.backing.reverse(n,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+n)),this.indexBase=this.indexStart)}_relocateBucket(n,t){n!==t&&this.incrementBucket(n,this.backing.emptyBucket(t))}},ctt=class t{constructor(t=[0]){n(this,"_counts");this._counts=t}get length(){return this._counts.length}countAt(n){return this._counts[n]}growTo(n,t,i){let r=new Array(n).fill(0);r.splice(i,this._counts.length-t,...this._counts.slice(t));r.splice(0,t,...this._counts.slice(0,t));this._counts=r}reverse(n,t){let i=Math.floor((n+t)/2)-n;for(let r=0;r<i;r++){let i=this._counts[n+r];this._counts[n+r]=this._counts[t-r-1];this._counts[t-r-1]=i}}emptyBucket(n){let t=this._counts[n];return this._counts[n]=0,t}increment(n,t){this._counts[n]+=t}decrement(n,t){this._counts[n]>=t?this._counts[n]-=t:this._counts[n]=0}clone(){return new t([...this._counts])}},re=Math.pow(2,-1022);var di=class extends Error{},att=class{constructor(t){n(this,"_shift");this._shift=-t}
210mapToIndex(n){if(n<re)return this._minNormalLowerBoundaryIndex();let t=dc(n),i=this._rightShift(gc(n)-1,52);return t+i>>this._shift}lowerBoundary(n){let t=this._minNormalLowerBoundaryIndex();if(n<t)throw new di(`underflow: ${n} is < minimum lower boundary: ${t}`);let i=this._maxNormalLowerBoundaryIndex();if(n>i)throw new di(`overflow: ${n} is > maximum lower boundary: ${i}`);return ue(1,n<<this._shift)}get scale(){return this._shift===0?0:-this._shift}_minNormalLowerBoundaryIndex(){let n=-1022>>this._shift;return this._shift<2&&n--,n}_maxNormalLowerBoundaryIndex(){return 1023>>this._shift}_rightShift(n,t){return Math.floor(n*Math.pow(2,-t))}},vtt=class{constructor(t){n(this,"_scale");n(this,"_scaleFactor");n(this,"_inverseFactor");this._scale=t;this._scaleFactor=ue(Math.LOG2E,t);this._inverseFactor=ue(Math.LN2,-t)}mapToIndex(n){if(n<=re)return this._minNormalLowerBoundaryIndex()-1;if(gc(n)===0)return(dc(n)<<this._scale)-1;let t=Math.floor(Math.log(n)*this._scaleFactor),i=this._maxNormalLowerBoundaryIndex();return t>=i?i:t}lowerBoundary(n){let i=this._maxNormalLowerBoundaryIndex();if(n>=i){if(n===i)return 2*Math.exp((n-(1<<this._scale))/this._scaleFactor);throw new di(`overflow: ${n} is > maximum lower boundary: ${i}`);}let t=this._minNormalLowerBoundaryIndex();if(n<=t){if(n===t)return re;if(n===t-1)return Math.exp((n+(1<<this._scale))/this._scaleFactor)/2;throw new di(`overflow: ${n} is < minimum lower boundary: ${t}`);}return Math.exp(n*this._inverseFactor)}get scale(){return this._scale}_minNormalLowerBoundaryIndex(){return-1022<<this._scale}_maxNormalLowerBoundaryIndex(){return(1024<<this._scale)-1}},nl=-10,tl=20,ytt=Array.from({length:31},(n,t)=>t>10?new vtt(t-10):new att(t-10));var dr=class t{constructor(t,i){n(this,"low");n(this,"high");this.low=t;this.high=i}static combine(n,i){return new t(Math.min(n.low,i.low),Math.max(n.high,i.high))}},ptt=20,wtt=160,fe=2,btt=class i{constructor(i,r=wtt,u=!0,f=0,e=0,o=0,s=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,c=new kc,l=new kc,a=il(ptt)){n(this,"startTime");n(this,"_maxSize");n(this,"_recordMinMax");n(this,"_sum");n(this,"_count");n(this,"_zeroCount");n(this,"_min");n(this,"_max");n(this,"_positive");n(this,"_negative");n(this,"_mapping");this.startTime=i;this._maxSize=r;this._recordMinMax=u;this._sum=f;this._count=e;this._zeroCount=o;this._min=s;this._max=h;this._positive=c;this._negative=l;this._mapping=a;this._maxSize<fe&&(t.warn(`Exponential Histogram Max Size set to ${this._maxSize}, changing to the minimum size of: ${fe}`),this._maxSize=fe)}record(n){this.updateByIncrement(n,1)}setStartTime(n){this.startTime=n}toPointValue(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}}get sum(){return this._sum}get min(){return this._min}get max(){return this._max}get count(){return this._count}get zeroCount(){return this._zeroCount}get scale(){return this._count===this._zeroCount?0:this._mapping.scale}get positive(){return this._positive}get negative(){return this._negative}updateByIncrement(n,t){if(!Number.isNaN(n)){if(n>this._max&&(this._max=n),n<this._min&&(this._min=n),this._count+=t,n===0){this._zeroCount+=t;return}this._sum+=n*t;n>0?this._updateBuckets(this._positive,n,t):this._updateBuckets(this._negative,-n,t)}}merge(n){this._count===0?(this._min=n.min,this._max=n.max):n.count!==0&&(n.min<this.min&&(this._min=n.min),n.max>this.max&&(this._max=n.max));this.startTime=n.startTime;this._sum+=n.sum;this._count+=n.count;this._zeroCount+=n.zeroCount;let t=this._minScale(n);this._downscale(this.scale-t);this._mergeBuckets(this.positive,n,n.positive,t);this._mergeBuckets(this.negative,n,n.negative,t)}diff(n){this._min=1/0;this._max=-1/0;this._sum-=n.sum;this._count-=n.count;this._zeroCount-=n.zeroCount;let t=this._minScale(n);this._downscale(this.scale-t);this._diffBuckets(this.positive,n,n.positive,t);this._diffBuckets(this.negative,n,n.negative,t)}clone(){return new i(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)}_updateBuckets(n,t,i){let r=this._mapping.mapToIndex(t),u=!1,f=0,e=0;if(n.length===0?(n.indexStart=r,n.indexEnd=n.indexStart,n.indexBase=n.indexStart):r<n.indexStart&&n.indexEnd-r>
210=this._maxSize?(u=!0,e=r,f=n.indexEnd):r>n.indexEnd&&r-n.indexStart>=this._maxSize&&(u=!0,e=n.indexStart,f=r),u){let n=this._changeScale(f,e);this._downscale(n);r=this._mapping.mapToIndex(t)}this._incrementIndexBy(n,r,i)}_incrementIndexBy(n,t,i){if(i!==0){if(n.length===0&&(n.indexStart=n.indexEnd=n.indexBase=t),t<n.indexStart){let i=n.indexEnd-t;i>=n.backing.length&&this._grow(n,i+1);n.indexStart=t}else if(t>n.indexEnd){let i=t-n.indexStart;i>=n.backing.length&&this._grow(n,i+1);n.indexEnd=t}let r=t-n.indexBase;r<0&&(r+=n.backing.length);n.incrementBucket(r,i)}}_grow(n,t){let u=n.backing.length,r=n.indexBase-n.indexStart,f=u-r,i=ltt(t);i>this._maxSize&&(i=this._maxSize);let e=i-r;n.backing.growTo(i,f,e)}_changeScale(n,t){let i=0;for(;n-t>=this._maxSize;)n>>=1,t>>=1,i++;return i}_downscale(n){if(n!==0){if(n<0)throw new Error(`impossible change of scale: ${this.scale}`);let t=this._mapping.scale-n;this._positive.downscale(n);this._negative.downscale(n);this._mapping=il(t)}}_minScale(n){let t=Math.min(this.scale,n.scale),i=dr.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(n.positive,n.scale,t)),r=dr.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(n.negative,n.scale,t));return Math.min(t-this._changeScale(i.high,i.low),t-this._changeScale(r.high,r.low))}_highLowAtScale(n,t,i){if(n.length===0)return new dr(0,-1);let r=t-i;return new dr(n.indexStart>>r,n.indexEnd>>r)}_mergeBuckets(n,t,i,r){let u=i.offset,f=t.scale-r;for(let t=0;t<i.length;t++)this._incrementIndexBy(n,u+t>>f,i.at(t))}_diffBuckets(n,t,i,r){let u=i.offset,f=t.scale-r;for(let t=0;t<i.length;t++){let r=(u+t>>f)-n.indexBase;r<0&&(r+=n.backing.length);n.decrementBucket(r,i.at(t))}n.trim()}},ktt=class{constructor(t,i){n(this,"kind",bt.EXPONENTIAL_HISTOGRAM);n(this,"_maxSize");n(this,"_recordMinMax");this._maxSize=t;this._recordMinMax=i}createAccumulation(n){return new btt(n,this._maxSize,this._recordMinMax)}merge(n,t){let i=t.clone();return i.merge(n),i}diff(n,t){let i=t.clone();return i.diff(n),i}toMetricData(n,t,r,u){return{descriptor:n,aggregationTemporality:t,dataPointType:k.EXPONENTIAL_HISTOGRAM,dataPoints:r.map(([t,r])=>{let f=r.toPointValue(),e=n.type===i.GAUGE||n.type===i.UP_DOWN_COUNTER||n.type===i.OBSERVABLE_GAUGE||n.type===i.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:t,startTime:r.startTime,endTime:u,value:{min:f.hasMinMax?f.min:void 0,max:f.hasMinMax?f.max:void 0,sum:e?void 0:f.sum,positive:{offset:f.positive.offset,bucketCounts:f.positive.bucketCounts},negative:{offset:f.negative.offset,bucketCounts:f.negative.bucketCounts},count:f.count,scale:f.scale,zeroCount:f.zeroCount}}})}}},ee=class{constructor(t,i=0,r=[0,0]){n(this,"startTime");n(this,"_current");n(this,"sampleTime");this.startTime=t;this._current=i;this.sampleTime=r}record(n){this._current=n;this.sampleTime=u(Date.now())}setStartTime(n){this.startTime=n}toPointValue(){return this._current}},dtt=class{constructor(){n(this,"kind",bt.LAST_VALUE)}createAccumulation(n){return new ee(n)}merge(n,t){let i=pr(t.sampleTime)>=pr(n.sampleTime)?t:n;return new ee(n.startTime,i.toPointValue(),i.sampleTime)}diff(n,t){let i=pr(t.sampleTime)>=pr(n.sampleTime)?t:n;return new ee(t.startTime,i.toPointValue(),i.sampleTime)}toMetricData(n,t,i,r){return{descriptor:n,aggregationTemporality:t,dataPointType:k.GAUGE,dataPoints:i.map(([n,t])=>({attributes:n,startTime:t.startTime,endTime:r,value:t.toPointValue()}))}}},gi=class{constructor(t,i,r=0,u=!1){n(this,"startTime");n(this,"monotonic");n(this,"_current");n(this,"reset");this.startTime=t;this.monotonic=i;this._current=r;this.reset=u}record(n){this.monotonic&&n<0||(this._current+=n)}setStartTime(n){this.startTime=n}toPointValue(){return this._current}},rl=class{constructor(t){n(this,"kind",bt.SUM);n(this,"monotonic");this.monotonic=t}createAccumulation(n){return new gi(n,this.monotonic)}merge(n,t){let r=n.toPointValue(),i=t.toPointValue();return t.reset?new gi(t.startTime,this.monotonic,i,t.reset):new gi(n.startTime,this.monotonic,r+i)}diff(n,t){let r=n.toPointValue(),i=t.toPointValue();return this.monotonic&&r>i?new gi(t.startTime,this.monotonic,i,!0):new gi(t.startTime,this.monotonic,i-r)}toMetricData(n,t,i,r){return{descriptor:n,aggregationTemporality:t,dataPointType:k.SUM,dataPoints:i.map(([n,t])=>({attributes:n,startTime:t.startTime,endTime:r,value:t.toPointValue()})),isMonotonic:this.monotonic}}},ul=class n{createAggregator(){return n.DEFAULT_INSTANCE}};n(ul,"DEFAULT_INSTANCE",new wc);fl=ul;gr=(class n{createAggregator(t){switch(t.type){case i.COUNTER:case i.OBSERVABLE_COUNTER:case i.HISTOGRAM:return n.MONOTONIC_INSTANCE;default:return n.NON_MONOTONIC_INSTANCE}}});n(gr,"MONOTONIC_INSTANCE",new rl(!0));n(gr,"NON_MONOTONIC_INSTANCE",new rl(!1));el=gr;oe=(class n{createAggregator(){return n.DEFAULT_INSTANCE}});n(oe,"DEFAULT_INSTANCE",new dtt);ol=oe;se=(class n{createAggregator(){return n.DEFAULT_INSTANCE}});n(se,"DEFAULT_INSTANCE",new bc([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0));var gtt=se,sl=class{constructor(t,i=!0){if(n(this,"_boundaries"),n(this,"_recordMinMax"),t==null)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");t=t.concat();t=t.sort((n,t)=>n-t);let u=t.lastIndexOf(-1/0),r=t.indexOf(1/0);r===-1&&(r=void 0);this._boundaries=t.slice(u+1,r);this._recordMinMax=i}createAggregator(){return new bc(this._boundaries,this._recordMinMax)}},hl=class{constructor(t=160,i=!0){n(this,"_maxSize");n(this,"_recordMinMax");this._maxSize=t;this._recordMinMax=i}createAggregator(){return new ktt(this._maxSize,this._recordMinMax)}},nit=class{_resolve(n){switch(n.type){case i.COUNTER:case i.UP_DOWN_COUNTER:case i.OBSERVABLE_COUNTER:case i.OBSERVABLE_UP_DOWN_COUNTER:return ll;case i.GAUGE:case i.OBSERVABLE_GAUGE:return al;case i.HISTOGRAM:return n.advice.explicitBucketBoundaries?new sl(n.advice.explicitBucketBoundaries):vl}
210return t.warn(`Unable to recognize instrument type: ${n.type}`),cl}createAggregator(n){return this._resolve(n).createAggregator(n)}},cl=new fl,ll=new el,al=new ol,vl=new gtt,wht=new hl,tit=new nit,v;(function(n){n[n.DEFAULT=0]="DEFAULT";n[n.DROP=1]="DROP";n[n.SUM=2]="SUM";n[n.LAST_VALUE=3]="LAST_VALUE";n[n.EXPLICIT_BUCKET_HISTOGRAM=4]="EXPLICIT_BUCKET_HISTOGRAM";n[n.EXPONENTIAL_HISTOGRAM=5]="EXPONENTIAL_HISTOGRAM"})(v||(v={}));var iit=()=>({type:v.DEFAULT}),rit=()=>y.CUMULATIVE,uit="otel.component.name",fit="otel.component.type",eit="periodic_metric_reader",oit="otel.sdk.metric_reader.collection.duration",sit="error.type",pl=new Map,wl=class{constructor(t,i){n(this,"collectionDuration");n(this,"standardAttrs");var r;let u=(r=pl.get(t))!=null?r:0;pl.set(t,u+1);this.standardAttrs={[fit]:t,[uit]:`${t}/${u}`};this.collectionDuration=i.createHistogram(oit,{unit:"s",description:"The duration of the collect operation of the metric reader.",advice:{explicitBucketBoundaries:[]}})}recordCollection(n,t){let i=t?nt(h({},this.standardAttrs),{[sit]:t}):this.standardAttrs;this.collectionDuration.record(n,i)}},hit="2.10.0",bl=class{constructor(t){n(this,"_shutdown",!1);n(this,"_metricProducers");n(this,"_sdkMetricProducer");n(this,"_selfObsMetrics");n(this,"_aggregationTemporalitySelector");n(this,"_aggregationSelector");n(this,"_cardinalitySelector");n(this,"_otelComponentType");var i,r,u,f;this._aggregationSelector=(i=t==null?void 0:t.aggregationSelector)!=null?i:iit;this._aggregationTemporalitySelector=(r=t==null?void 0:t.aggregationTemporalitySelector)!=null?r:rit;this._metricProducers=(u=t==null?void 0:t.metricProducers)!=null?u:[];this._cardinalitySelector=t==null?void 0:t.cardinalitySelector;this._otelComponentType=(f=t==null?void 0:t.otelComponentType)!=null?f:this.constructor.name;this._selfObsMetrics=new wl(this._otelComponentType,sr())}setMetricProducer(n){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=n;this.onInitialized()}_setSelfObsMeterProvider(n){let t=n.getMeter("@opentelemetry/sdk-metrics",hit);this._selfObsMetrics=new wl(this._otelComponentType,t)}selectAggregation(n){return this._aggregationSelector(n)}selectAggregationTemporality(n){return this._aggregationTemporalitySelector(n)}selectCardinalityLimit(n){return this._cardinalitySelector?this._cardinalitySelector(n):2e3}onInitialized(){}async collect(n){var r;if(this._sdkMetricProducer===void 0)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");let f=b(),[t,...u]=await Promise.all([this._sdkMetricProducer.collect({timeoutMillis:n==null?void 0:n.timeoutMillis}),...this._metricProducers.map(t=>t.collect({timeoutMillis:n==null?void 0:n.timeoutMillis}))]),e=b(),i=t.errors.concat(u.flatMap(n=>n.errors)),o=tg(yf(f,e));this._selfObsMetrics.recordCollection(o,i.length>0?(r=i[0].name)!=null?r:"collect_error":void 0);let s=t.resourceMetrics.resource,h=t.resourceMetrics.scopeMetrics.concat(u.flatMap(n=>n.resourceMetrics.scopeMetrics));return{resourceMetrics:{resource:s,scopeMetrics:h},errors:i}}async shutdown(n){if(this._shutdown){t.error("Cannot call shutdown twice.");return}(n==null?void 0:n.timeoutMillis)==null?await this.onShutdown():await ki(this.onShutdown(),n.timeoutMillis);this._shutdown=!0}async forceFlush(n){if(this._shutdown){t.warn("Cannot forceFlush on already shutdown MetricReader.");return}if((n==null?void 0:n.timeoutMillis)==null){await this.onForceFlush();return}await ki(this.onForceFlush(),n.timeoutMillis)}};kl=(class extends bl{constructor(r){var s,c;let{exporter:u,exportIntervalMillis:f=6e4,metricProducers:l,cardinalityLimits:a,maxExportBatchSize:o}=r,{exportTimeoutMillis:e=3e4}=r;if(super({aggregationSelector:(s=u.selectAggregation)==null?void 0:s.bind(u),aggregationTemporalitySelector:(c=u.selectAggregationTemporality)==null?void 0:c.bind(u),otelComponentType:eit,metricProducers:l,cardinalitySelector:n=>{var r,u,f,e,o,s,c;let t=h({"default":2e3},a);switch(n){case i.COUNTER:return(r=t.counter)!=null?r:t.default;case i.GAUGE:return(u=t.gauge)!=null?u:t.default;case i.HISTOGRAM:return(f=t.histogram)!=null?f:t.default;case i.OBSERVABLE_COUNTER:return(e=t.observableCounter)!=null?e:t.default;case i.OBSERVABLE_UP_DOWN_COUNTER:return(o=t.observableUpDownCounter)!=null?o:t.default;case i.OBSERVABLE_GAUGE:return(s=t.observableGauge)!=null?s:t.default;case i.UP_DOWN_COUNTER:return(c=t.upDownCounter)!=null?c:t.default;default:return t.default}}}),n(this,"_interval"),n(this,"_exporter"),n(this,"_exportInterval"),n(this,"_exportTimeout"),n(this,"_maxExportBatchSize"),n(this,"_ongoingExportPromise",null),f<=0)throw Error("exportIntervalMillis must be greater than 0");if(e<=0)throw Error("exportTimeoutMillis must be greater than 0");if(o!==void 0&&(!Number.isInteger(o)||o<=0))throw Error("maxExportBatchSize must be a positive integer");if(f<e){if("exportIntervalMillis"in r&&"exportTimeoutMillis"in r)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");t.info(`Timeout of ${e} exceeds the interval of ${f}. Clamping timeout to interval duration.`);e=f}this._exportInterval=f;this._exportTimeout=e;this._exporter=u;this._maxExportBatchSize=o}async _runOnce(){try{await this._doRun()}catch(n){yr(n)}}async _doRun(){if(this._ongoingExportPromise){t.debug("PeriodicExportingMetricReader: exp
210ort already in progress, skipping");return}let n=async()=>{var r,u;let{resourceMetrics:n,errors:f}=await this.collect({timeoutMillis:this._exportTimeout});if(f.length>0&&t.error("PeriodicExportingMetricReader: metrics collection errors",...f),n.resource.asyncAttributesPending)try{await((u=(r=n.resource).waitForAsyncAttributes)==null?void 0:u.call(r))}catch(e){t.debug("Error while resolving async portion of resource: ",e);yr(e)}if(n.scopeMetrics.length!==0){let o=this._maxExportBatchSize?cit(n,this._maxExportBatchSize):[n],i=null;for(let r of o)try{let n=await ki(gh._export(this._exporter,r),this._exportTimeout);n.code!==a.SUCCESS&&(i=new Error(`PeriodicExportingMetricReader: metrics export failed (error ${n.error})`))}catch(n){if(n instanceof te){t.error(`PeriodicExportingMetricReader: metrics export timed out after ${this._exportTimeout}ms`);break}else t.error("PeriodicExportingMetricReader: metrics export threw error",n),i=n instanceof Error?n:new Error(String(n))}if(i)throw i;}};this._ongoingExportPromise=n();try{await this._ongoingExportPromise}finally{this._ongoingExportPromise=null}}onInitialized(){this._interval=setInterval(()=>{this._runOnce()},this._exportInterval);typeof this._interval!="number"&&this._interval.unref()}async onForceFlush(){await this._awaitOngoingExport();this._ongoingExportPromise?await this._awaitOngoingExport():await this._runOnce();await this._exporter.forceFlush()}async _awaitOngoingExport(){if(this._ongoingExportPromise){t.debug("PeriodicExportingMetricReader: export already in progress, awaiting ongoing export");try{await this._ongoingExportPromise}catch(n){}}}async onShutdown(){this._interval&&clearInterval(this._interval);await this.onForceFlush();await this._exporter.shutdown()}});ti=n=>n!==null&&typeof n=="object"&&typeof n.then=="function";dl=(class i{constructor(t,i){n(this,"_rawAttributes");n(this,"_asyncAttributesPending",!1);n(this,"_schemaUrl");n(this,"_memoizedAttributes");var r;let u=(r=t.attributes)!=null?r:{};this._rawAttributes=Object.entries(u).map(([n,t])=>(ti(t)&&(this._asyncAttributesPending=!0),[n,t]));this._rawAttributes=ta(this._rawAttributes);this._schemaUrl=ait(i==null?void 0:i.schemaUrl)}static FromAttributeList(n,t){let r=new i({},t);return r._rawAttributes=ta(n),r._asyncAttributesPending=n.filter(([,n])=>ti(n)).length>0,r}get asyncAttributesPending(){return this._asyncAttributesPending}async waitForAsyncAttributes(){if(this.asyncAttributesPending){for(let n=0;n<this._rawAttributes.length;n++){let[i,t]=this._rawAttributes[n];this._rawAttributes[n]=[i,ti(t)?await t:t]}this._asyncAttributesPending=!1}}get attributes(){var i;if(this.asyncAttributesPending&&t.error("Accessing resource attributes before async attributes settled"),this._memoizedAttributes)return this._memoizedAttributes;let n={};for(let[r,u]of this._rawAttributes){if(ti(u)){t.debug(`Unsettled resource attribute ${r} skipped`);continue}u!=null&&((i=n[r])!=null||(n[r]=u))}return this._asyncAttributesPending||(this._memoizedAttributes=n),n}getRawAttributes(){return this._rawAttributes}get schemaUrl(){return this._schemaUrl}merge(n){if(n==null)return this;let t=vit(this,n),r=t?{schemaUrl:t}:void 0;return i.FromAttributeList([...n.getRawAttributes(),...this.getRawAttributes()],r)}});ia=(class{constructor(){n(this,"_registeredViews",[])}addView(n){this._registeredViews.push(n)}findViews(n,t){return this._registeredViews.filter(i=>this._matchInstrument(i.instrumentSelector,n)&&this._matchMeter(i.meterSelector,t))}_matchInstrument(n,t){return(n.getType()===void 0||t.type===n.getType())&&n.getNameFilter().match(t.name)&&n.getUnitFilter().match(t.unit)}_matchMeter(n,t){return n.getNameFilter().match(t.name)&&(t.version===void 0||n.getVersionFilter().match(t.version))&&(t.schemaUrl===void 0||n.getSchemaUrlFilter().match(t.schemaUrl))}});ra=/^[a-z][a-z0-9_.\-/]{0,254}$/i;var tu=class{constructor(t,i){n(this,"_writableMetricStorage");n(this,"_descriptor");this._writableMetricStorage=t;this._descriptor=i}_record(n,i={},r){if(typeof n!="number"){t.warn(`non-number value provided to metric ${this._descriptor.name}: ${n}`);return}(this._descriptor.valueType!==yt.INT||Number.isInteger(n)||(t.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),n=Math.trunc(n),Number.isInteger(n)))&&this._writableMetricStorage.record(n,i,r,Date.now())}},bit=class extends tu{add(n,t,i){this._record(n,t,i)}},kit=class extends tu{add(n,i,r){if(n<0){t.warn(`negative value provided to counter ${this._descriptor.name}: ${n}`);return}this._record(n,i,r)}},dit=class extends tu{record(n,t,i){this._record(n,t,i)}},git=class extends tu{record(n,i,r){if(n<0){t.warn(`negative value provided to histogram ${this._descriptor.name}: ${n}`);return}this._record(n,i,r)}},iu=class{constructor(t,i,r){n(this,"_metricStorages");n(this,"_descriptor");n(this,"_observableRegistry");this._descriptor=t;this._metricStorages=i;this._observableRegistry=r}addCallback(n){this._observableRegistry.addCallback(n,this)}removeCallback(n){this._observableRegistry.removeCallback(n,this)}},nrt=class extends iu{},trt=class extends iu{},irt=class extends iu{};var rrt=class{constructor(t){n(this,"_meterSharedState");this._meterSharedState=t}createGauge(n,t){let r=ht(n,i.GAUGE,t),u=this._meterSharedState.registerMetricStorage(r);return new dit(u,r)}createHistogram(n,t){let r=ht(n,i.HISTOGRAM,t),u=this._meterSharedState.registerMetricStorage(r);return new git(u,r)}createCounter(n,t){let r=ht(n,i.COUNTER,t),u=this._meterSharedState.registerMetricStorage(r);return new kit(u,r)}createUpDownCounter(n,t){let r=ht(n,i.UP_DOWN_COUNTER,t),u=this._meterSharedState.registerMetricStorage(r);return new bit(u,r)}createObservableGauge(n,t){let r=ht(n,i.OBSERVABLE_GAUGE,t),u=this._meterSharedState.registerAsyncMetricStorage(r);return new trt(r,u,this._meterSharedState.observableRegistry)}createObservableCounter(n,t){let r=ht(n,i.OBSERVABLE_COUNTER,t),u=this._meterSharedState.registerAsyncMetricStorage(r);return new nrt(r,u,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(n,t){let r=ht(n,i.OBSERVABLE_UP_DOWN_COUNTER,t),u=this._meterSharedState.registerAsyncMetricStorage(r);return new irt(r,u,this._meterSharedState.observableRegistry)}addBatchObservableCallback(n,t){this._meterSharedState.observableRegistry.addBatchCallback(n,t)}removeBatchObservableCallback(n,t){this._meterSharedState.observableRegistry.removeBatchCallback(n,t)}},ua=class{constructor(t){n(this,"_instrumentDescriptor");this._instrumentDescriptor=t}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(n){this._instrumentDescriptor=ht(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:n,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}},urt=class{constructor(t){n(this,"_valueMap",new Map);n(this,"_keyMap",new Map);n(this,"_hash");this._hash=t}get(n,t){return t!=null||(t=this._hash(n)),this._valueMap.get(t)}getOrDefault(n,t){let i=this._hash(n);if(this._valueMap.has(i))return this._valueMap.get(i);let r=t();return this._keyMap.has(i)||this._keyMap.set(i,n),this._valueMap.set(i,r),r}set(n,t,i){i!=null||(i=this._hash(n));this._keyMap.has(i)||this._keyMap.set(i,n);this._valueMap.set(i,t)}has(n,t){return t!=null||(t=this._hash(n)),this._valueMap.has(t)}*keys(){let t=this._keyMap.entries(),n=t.next();for(;n.done!==!0;)yield[n.value[1],n.value[0]],n=t.next()}*entries(){let t=this._valueMap.entries(),n=t.next();for(;n.done!==!0;)yield[this._keyMap.get(n.value[0]),n.value[1],n.value[0]],n=t.next()}get size(){return this._valueMap.size}},kt=class extends urt{constructor(){super(pc)}},fa=class{constructor(t,i){n(this,"_activeCollectionStorage",new kt);n(this,"_cumulativeMemoStorage",new kt);n(this,"_cardinalityLimit");n(this,"_overflowAttributes",{"otel.metric.overflow":!0});n(this,"_overflowHashCode");n(this,"_aggregator");this._aggregator=t;this._cardinalityLimit=(i!=null?i:2e3)-1;this._overflowHashCode=pc(this._overflowAttributes)}record(n,t,i){let r=this._activeCollectionStorage.get(t);if(!r){let f=u(i);if(this._activeCollectionStorage.size>=this._cardinalityLimit){let t=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,()=>this._aggregator.createAccumulation(f));t==null||t.record(n);return}r=this._aggregator.createAccumulation(f);this._activeCollectionStorage.set(t,r)}r==null||r.record(n)}batchCumulate(n,t){for(let[i,r,u]of n.entries()){let n=i,f=u,e=this._aggregator.createAccumulation(t);e==null||e.record(r);let o=e;if(this._cumulativeMemoStorage.has(n,f)){let t=this._cumulativeMemoStorage.get(n,f);o=this._aggregator.diff(t,e)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(n=this._overflowAttributes,f=this._overflowHashCode,this._cumulativeMemoStorage.has(n,f))){let t=this._cumulativeMemoStorage.get(n,f);o=this._aggregator.diff(t,e)}if(this._activeCollectionStorage.has(n,f)){let t=this._activeCollectionStorage.get(n,f);o=this._aggregator.merge(t,o)}this._cumulativeMemoStorage.set(n,e,f);this._activeCollectionStorage.set(n,o,f)}}collect(){let n=this._activeCollectionStorage;return this._activeCollectionStorage=new kt,n}},ea=class t{constructor(t,i){n(this,"_aggregator");n(this,"_unreportedAccumulations",new Map);n(this,"_reportHistory",new Map);this._aggregator=t;
210i.forEach(n=>{this._unreportedAccumulations.set(n,[])})}buildMetrics(n,i,r,u){this._stashAccumulations(r);let o=this._getMergedUnreportedAccumulations(n),e=o,f;if(this._reportHistory.has(n)){let i=this._reportHistory.get(n),r=i.collectionTime;f=i.aggregationTemporality;e=f===y.CUMULATIVE?t.merge(i.accumulations,o,this._aggregator):t.calibrateStartTime(i.accumulations,o,r)}else f=n.selectAggregationTemporality(i.type);this._reportHistory.set(n,{accumulations:e,collectionTime:u,aggregationTemporality:f});let s=frt(e);if(s.length!==0)return this._aggregator.toMetricData(i,f,s,u)}_stashAccumulations(n){let t=this._unreportedAccumulations.keys();for(let i of t){let t=this._unreportedAccumulations.get(i);t===void 0&&(t=[],this._unreportedAccumulations.set(i,t));t.push(n)}}_getMergedUnreportedAccumulations(n){let i=new kt,r=this._unreportedAccumulations.get(n);if(this._unreportedAccumulations.set(n,[]),r===void 0)return i;for(let n of r)i=t.merge(i,n,this._aggregator);return i}static merge(n,t,i){let r=n,f=t.entries(),u=f.next();for(;u.done!==!0;){let[t,o,e]=u.value;if(n.has(t,e)){let u=n.get(t,e),f=i.merge(u,o);r.set(t,f,e)}else r.set(t,o,e);u=f.next()}return r}static calibrateStartTime(n,t,i){for(let[r,u]of n.keys()){let n=t.get(r,u);n==null||n.setStartTime(i)}return t}};oa=(class extends ua{constructor(t,i,r,u,f){super(t);n(this,"_aggregationCardinalityLimit");n(this,"_deltaMetricStorage");n(this,"_temporalMetricStorage");n(this,"_attributesProcessor");this._aggregationCardinalityLimit=f;this._deltaMetricStorage=new fa(i,this._aggregationCardinalityLimit);this._temporalMetricStorage=new ea(i,u);this._attributesProcessor=r}record(n,t){if(this._attributesProcessor===void 0){this._deltaMetricStorage.batchCumulate(n,t);return}let i=new kt;for(let[t,r]of n.entries())i.set(this._attributesProcessor.process(t),r);this._deltaMetricStorage.batchCumulate(i,t)}collect(n,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,t)}});var crt=class i{constructor(){n(this,"_sharedRegistry",new Map);n(this,"_perCollectorRegistry",new Map)}static create(){return new i}getStorages(n){let t=[];for(let n of this._sharedRegistry.values())t=t.concat(n);let i=this._perCollectorRegistry.get(n);if(i!=null)for(let n of i.values())t=t.concat(n);return t}register(n){this._registerStorage(n,this._sharedRegistry)}registerForCollector(n,t){let i=this._perCollectorRegistry.get(n);i==null&&(i=new Map,this._perCollectorRegistry.set(n,i));this._registerStorage(t,i)}findOrUpdateCompatibleStorage(n){let t=this._sharedRegistry.get(n.name);return t===void 0?null:this._findOrUpdateCompatibleStorage(n,t)}findOrUpdateCompatibleCollectorStorage(n,t){let i=this._perCollectorRegistry.get(n);if(i===void 0)return null;let r=i.get(t.name);return r===void 0?null:this._findOrUpdateCompatibleStorage(t,r)}_registerStorage(n,t){let i=n.getInstrumentDescriptor(),r=t.get(i.name);if(r===void 0){t.set(i.name,[n]);return}r.push(n)}_findOrUpdateCompatibleStorage(n,i){let r=null;for(let u of i){let i=u.getInstrumentDescriptor();pit(i,n)?(i.description!==n.description&&(n.description.length>i.description.length&&u.updateDescription(n.description),t.warn("A view or instrument with the name ",n.name,` has already been registered, but has a different description and is incompatible with another registered view. 211`,`Details: 212`,sa(i,n),`The longer description will be used. 213To resolve the conflict:`,ha(i,n))),r=u):t.warn("A view or instrument with the name ",n.name,` has already been registered and is incompatible with another registered view. 214`,`Details: 215`,sa(i,n),`To resolve the conflict: 216`,ha(i,n))}return r}},lrt=class{constructor(t){n(this,"_backingStorages");n(this,"hasAttributeProcessor");this._backingStorages=t;this.hasAttributeProcessor=t.some(n=>n.hasAttributeProcessor)}record(n,t,i,r){this.hasAttributeProcessor&&i===void 0&&(i=f.active());let u=this._backingStorages;for(let f=0;f<u.length;f++)u[f].record(n,t,i,r)}},art=class{constructor(t,i){n(this,"_buffer",new kt);n(this,"_instrumentName");n(this,"_valueType");this._instrumentName=t;this._valueType=i}observe(n,i={}){if(typeof n!="number"){t.warn(`non-number value provided to metric ${this._instrumentName}: ${n}`);return}(this._valueType!==yt.INT||Number.isInteger(n)||(t.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),n=Math.trunc(n),Number.isInteger(n)))&&this._buffer.set(i,n)}},vrt=class{constructor(){n(this,"_buffer",new Map)}observe(n,i,r={}){if(he(n)){let u=this._buffer.get(n);if(u==null&&(u=new kt,this._buffer.set(n,u)),typeof i!="number"){t.warn(`non-number value provided to metric ${n._descriptor.name}: ${i}`);return}(n._descriptor.valueType!==yt.INT||Number.isInteger(i)||(t.warn(`INT value type cannot accept a floating-point value for ${n._descriptor.name}, ignoring the fractional digits.`),i=Math.trunc(i),Number.isInteger(i)))&&u.set(r,i)}}},yrt=class{constructor(){n(this,"_callbacks",[]);n(this,"_batchCallbacks",[])}addCallback(n,t){this._findCallback(n,t)>=0||this._callbacks.push({callback:n,instrument:t})}removeCallback(n,t){let i=this._findCallback(n,t);i<0||this._callbacks.splice(i,1)}addBatchCallback(n,i){let r=new Set(i.filter(he));if(r.size===0){t.error("BatchObservableCallback is not associated with valid instruments",i);return}this._findBatchCallback(n,r)>=0||this._batchCallbacks.push({callback:n,instruments:r})}removeBatchCallback(n,t){let r=new Set(t.filter(he)),i=this._findBatchCallback(n,r);i<0||this._batchCallbacks.splice(i,1)}async observe(n,t){let i=this._observeCallbacks(n,t),r=this._observeBatchCallbacks(n,t);return(await Promise.allSettled([...i,...r])).filter(n=>n.status==="rejected").map(n=>n.reason)}_observeCallbacks(n,t){return this._callbacks.map(async({callback:i,instrument:r})=>{let f=new art(r._descriptor.name,r._descriptor.valueType),u=Promise.resolve(i(f));t!=null&&(u=ki(u,t));await u;
216r._metricStorages.forEach(t=>{t.record(f._buffer,n)})})}_observeBatchCallbacks(n,t){return this._batchCallbacks.map(async({callback:i,instruments:r})=>{let f=new vrt,u=Promise.resolve(i(f));t!=null&&(u=ki(u,t));await u;r.forEach(t=>{let i=f._buffer.get(t);i!=null&&t._metricStorages.forEach(t=>{t.record(i,n)})})})}_findCallback(n,t){return this._callbacks.findIndex(i=>i.callback===n&&i.instrument===t)}_findBatchCallback(n,t){return this._batchCallbacks.findIndex(i=>i.callback===n&&ett(i.instruments,t))}},prt=class extends ua{constructor(t,i,r,u,f){super(t);n(this,"_aggregationCardinalityLimit");n(this,"_deltaMetricStorage");n(this,"_temporalMetricStorage");n(this,"_attributesProcessor");n(this,"hasAttributeProcessor");this._aggregationCardinalityLimit=f;this._deltaMetricStorage=new fa(i,this._aggregationCardinalityLimit);this._temporalMetricStorage=new ea(i,u);this._attributesProcessor=r;this.hasAttributeProcessor=r!==void 0}record(n,t,i,r){this._attributesProcessor!==void 0&&(t=this._attributesProcessor.process(t,i!=null?i:f.active()));this._deltaMetricStorage.record(n,t,r)}collect(n,t){let i=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(n,this._instrumentDescriptor,i,t)}},wrt=class{constructor(t,i){n(this,"metricStorageRegistry",new crt);n(this,"observableRegistry",new yrt);n(this,"meter");n(this,"_meterProviderSharedState");n(this,"_instrumentationScope");this.meter=new rrt(this);this._meterProviderSharedState=t;this._instrumentationScope=i}registerMetricStorage(n){let t=this._registerMetricStorage(n,prt);return t.length===1?t[0]:new lrt(t)}registerAsyncMetricStorage(n){return this._registerMetricStorage(n,oa)}async collect(n,t,i){let u=await this.observableRegistry.observe(t,i==null?void 0:i.timeoutMillis),f=this.metricStorageRegistry.getStorages(n);if(f.length===0)return null;let r=[];return f.forEach(i=>{let u=i.collect(n,t);u!=null&&r.push(u)}),r.length===0?{errors:u}:{scopeMetrics:{scope:this._instrumentationScope,metrics:r},errors:u}}_registerMetricStorage(n,t){let i=this._meterProviderSharedState.viewRegistry.findViews(n,this._instrumentationScope).map(i=>{let r=yit(i,n),u=this.metricStorageRegistry.findOrUpdateCompatibleStorage(r);if(u!=null)return u;let e=i.aggregation.createAggregator(r),f=new t(r,e,i.attributesProcessor,this._meterProviderSharedState.metricCollectors,i.aggregationCardinalityLimit);return this.metricStorageRegistry.register(f),f});if(i.length===0){let r=this._meterProviderSharedState.selectAggregations(n.type).map(([i,r])=>{let u=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(i,n);if(u!=null)return u;let e=r.createAggregator(n),o=i.selectCardinalityLimit(n.type),f=new t(n,e,void 0,[i],o);return this.metricStorageRegistry.registerForCollector(i,f),f});i=i.concat(r)}return i}},brt=class{constructor(t){n(this,"viewRegistry",new ia);n(this,"metricCollectors",[]);n(this,"meterSharedStates",new Map);n(this,"resource");this.resource=t}getMeterSharedState(n){let i=ftt(n),t=this.meterSharedStates.get(i);return t==null&&(t=new wrt(this,n),this.meterSharedStates.set(i,t)),t}selectAggregations(n){let t=[];for(let i of this.metricCollectors)t.push([i,yl(i.selectAggregation(n))]);return t}},krt=class{constructor(t,i){n(this,"_sharedState");n(this,"_metricReader");this._sharedState=t;this._metricReader=i}async collect(n){let r=u(Date.now()),t=[],i=[],f=Array.from(this._sharedState.meterSharedStates.values()).map(async u=>{let f=await u.collect(this,r,n);(f==null?void 0:f.scopeMetrics)!=null&&t.push(f.scopeMetrics);(f==null?void 0:f.errors)!=null&&i.push(...f.errors)});return await Promise.all(f),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:t},errors:i}}async forceFlush(n){await this._metricReader.forceFlush(n)}async shutdown(n){await this._metricReader.shutdown(n)}selectAggregationTemporality(n){return this._metricReader.selectAggregationTemporality(n)}selectAggregation(n){return this._metricReader.selectAggregation(n)}selectCardinalityLimit(n){var t,i,r;return(r=(i=(t=this._metricReader).selectCardinalityLimit)==null?void 0:i.call(t,n))!=null?r:2e3}},drt=/[\^$\\.+?()[\]{}|]/g,ca=class t{constructor(i){n(this,"_matchAll");n(this,"_regexp");i==="*"?(this._matchAll=!0,this._regexp=/.*/):(this._matchAll=!1,this._regexp=new RegExp(t.escapePattern(i)))}match(n){return this._matchAll?!0:this._regexp.test(n)}static escapePattern(n){return`^${n.replace(drt,"\\$&").replace("*",".*")}$`}static hasWildcard(n){return n.includes("*")}},ru=class{constructor(t){n(this,"_matchAll");n(this,"_pattern");this._matchAll=t===void 0;this._pattern=t}match(n){return!!(this._matchAll||n===this._pattern)}},grt=class{process(n){return n}},nut=class{constructor(t){n(this,"_processors");this._processors=t}process(n,t){let i=n;for(let n of this._processors)i=n.process(i,t);return i}};var rut=new grt,uut=class{constructor(t){n(this,"_nameFilter");n(this,"_type");
216n(this,"_unitFilter");var i;this._nameFilter=new ca((i=t==null?void 0:t.name)!=null?i:"*");this._type=t==null?void 0:t.type;this._unitFilter=new ru(t==null?void 0:t.unit)}getType(){return this._type}getNameFilter(){return this._nameFilter}getUnitFilter(){return this._unitFilter}},fut=class{constructor(t){n(this,"_nameFilter");n(this,"_versionFilter");n(this,"_schemaUrlFilter");this._nameFilter=new ru(t==null?void 0:t.name);this._versionFilter=new ru(t==null?void 0:t.version);this._schemaUrlFilter=new ru(t==null?void 0:t.schemaUrl)}getNameFilter(){return this._nameFilter}getVersionFilter(){return this._versionFilter}getSchemaUrlFilter(){return this._schemaUrlFilter}};la=(class{constructor(t){n(this,"name");n(this,"description");n(this,"aggregation");n(this,"attributesProcessor");n(this,"instrumentSelector");n(this,"meterSelector");n(this,"aggregationCardinalityLimit");var i;out(t);this.attributesProcessor=t.attributesProcessors!=null?iut(t.attributesProcessors):tut();this.name=t.name;this.description=t.description;this.aggregation=yl((i=t.aggregation)!=null?i:{type:v.DEFAULT});this.instrumentSelector=new uut({name:t.instrumentName,type:t.instrumentType,unit:t.instrumentUnit});this.meterSelector=new fut({name:t.meterName,version:t.meterVersion,schemaUrl:t.meterSchemaUrl});this.aggregationCardinalityLimit=t.aggregationCardinalityLimit}});aa=(class{constructor(t){n(this,"_sharedState");n(this,"_shutdown",!1);var i;if(this._sharedState=new brt((i=t==null?void 0:t.resource)!=null?i:na()),(t==null?void 0:t.views)!=null&&t.views.length>0)for(let n of t.views)this._sharedState.viewRegistry.addView(new la(n));if((t==null?void 0:t.readers)!=null&&t.readers.length>0)for(let n of t.readers){let i=new krt(this._sharedState,n);n.setMetricProducer(i);this._sharedState.metricCollectors.push(i);t.sdkMetricsEnabled&&n instanceof bl&&n._setSelfObsMeterProvider(this)}}getMeter(n,i="",r={}){return this._shutdown?(t.warn("A shutdown MeterProvider cannot provide a Meter"),sr()):this._sharedState.getMeterSharedState({name:n,version:i,schemaUrl:r.schemaUrl}).meter}async shutdown(n){if(this._shutdown){t.warn("shutdown may only be called once per MeterProvider");return}this._shutdown=!0;await Promise.all(this._sharedState.metricCollectors.map(t=>t.shutdown(n)))}async forceFlush(n){if(this._shutdown){t.warn("invalid attempt to force flush after MeterProvider shutdown");return}await Promise.all(this._sharedState.metricCollectors.map(t=>t.forceFlush(n)))}});var dut={serializeRequest:n=>wut(n),deserializeResponse:n=>kut(n)},gut=256,nft=512;var cft={serializeRequest:n=>oft(n),deserializeResponse:n=>hft(n)},le=5,lft=1e3,aft=5e3,vft=1.5,ka=.2;da=(class{constructor(t){n(this,"_transport");this._transport=t}retry(n,t,i){return new Promise((r,u)=>{setTimeout(()=>{this._transport.send(n,t).then(r,u)},i)})}async send(n,i){var e;let u=le,f=lft,o=Date.now()+i,r=await this._transport.send(n,i);for(;r.status==="retryable"&&u>0;){u--;let h=Math.max(Math.min(f*(1+yft()),aft),0);f=f*vft;let i=(e=r.retryInMillis)!=null?e:h,s=o-Date.now();if(i>s)return t.info(`Export retry time ${Math.round(i)}ms exceeds remaining timeout ${Math.round(s)}ms, not retrying further.`),r;t.verbose(`Scheduling export retry in ${Math.round(i)}ms`);r=await this.retry(n,s,i)}return r.status==="success"?t.verbose(`Export succeeded after ${le-u} retry attempts.`):r.status==="retryable"?t.info(`Export failed after maximum retry attempts (${le}).`):t.info(`Export failed with non-retryable error: ${r.error}`),r}shutdown(){return this._transport.shutdown()}});var kft=61440,dft=9,ae=0,uu=0,gft=class{constructor(t){n(this,"_parameters");this._parameters=t}async send(n,i){let o=new AbortController,h=setTimeout(()=>o.abort(),i),u=globalThis.fetch;typeof u.__original=="function"&&(u=u.__original);let f=n.byteLength,s=ae+f>kft,c=uu>=dft,e=!s&&!c;if(e)ae+=f,uu++;else{let n=s?"size limit":"count limit";t.debug(`keepalive disabled: ${(f/1024).toFixed(1)}KB payload, ${uu} pending (${n})`)}try{let r=new URL(this._parameters.url),i=await u(r.href,{method:"POST",headers:await this._parameters.headers(),body:n,signal:o.signal,keepalive:e,mode:globalThis.location?globalThis.location.origin===r.origin?"same-origin":"cors":"no-cors"});if(i.status>=200&&i.status<=299)return t.debug(`export response success (status: ${i.status})`),{status:"success"};
216if(wft(i.status)){t.warn(`export response retryable (status: ${i.status})`);let n=i.headers.get("Retry-After");return{status:"retryable",retryInMillis:bft(n)}}return t.error(`export response failure (status: ${i.status})`),{status:"failure",error:new Error(`Fetch request failed with non-retryable status ${i.status}`)}}catch(r){return tet(r)?(t.warn(`export request retryable (network error: ${r})`),{status:"retryable",error:new Error("Fetch request encountered a network error",{cause:r})}):(t.error(`export request failure (error: ${r})`),{status:"failure",error:new Error("Fetch request errored",{cause:r})})}finally{clearTimeout(h);e&&(ae-=f,uu--)}}shutdown(){}};var cet="otlp_http_span_exporter",aet="v1/traces",vet=class extends po{constructor(n={}){super(nv(n,cft,cet,bn,n.selfObsMeterProvider,aet,{"Content-Type":"application/x-protobuf"}))}},ii;(function(n){n[n.DELTA=0]="DELTA";n[n.CUMULATIVE=1]="CUMULATIVE";n[n.LOWMEMORY=2]="LOWMEMORY"})(ii||(ii={}));var ve=()=>y.CUMULATIVE,tv=n=>{switch(n){case i.COUNTER:case i.OBSERVABLE_COUNTER:case i.GAUGE:case i.HISTOGRAM:case i.OBSERVABLE_GAUGE:return y.DELTA;case i.UP_DOWN_COUNTER:case i.OBSERVABLE_UP_DOWN_COUNTER:return y.CUMULATIVE}},iv=n=>{switch(n){case i.COUNTER:case i.HISTOGRAM:return y.DELTA;case i.GAUGE:case i.UP_DOWN_COUNTER:case i.OBSERVABLE_UP_DOWN_COUNTER:case i.OBSERVABLE_COUNTER:case i.OBSERVABLE_GAUGE:return y.CUMULATIVE}};rv=Object.freeze({type:v.DEFAULT});var bet=class extends po{constructor(t,i){super(t);n(this,"_aggregationTemporalitySelector");n(this,"_aggregationSelector");this._aggregationSelector=wet(i);this._aggregationTemporalitySelector=pet(i==null?void 0:i.temporalityPreference)}selectAggregation(n){return this._aggregationSelector(n)}selectAggregationTemporality(n){return this._aggregationTemporalitySelector(n)}},uv="otlp_http_metric_exporter",ket=class extends bet{constructor(t={}){super(nv(t,dut,uv,rc,t==null?void 0:t.selfObsMeterProvider,"v1/metrics",{"Content-Type":"application/x-protobuf"}),t);n(this,"_url");this._url=t.url}setSelfObsMeterProvider(n){this.setMetrics(ga(uv,rc,this._url,n))}};c=console.error.bind(console);var ye=(n,t,i)=>{if(!n||!n[t]){c("no original function "+String(t)+" to wrap");return}if(!i){c("no wrapper function");c((new Error).stack);return}let u=n[t];if(typeof u!="function"||typeof i!="function"){c("original object and wrapper must be functions");return}let r=i(u,t);return nr(r,"__original",u),nr(r,"__unwrap",()=>{n[t]===r&&nr(n,t,u)}),nr(r,"__wrapped",!0),nr(n,t,r),r},fv=(n,t,i)=>{if(n)Array.isArray(n)||(n=[n]);else{c("must provide one or more modules to patch");c((new Error).stack);return}if(!(t&&Array.isArray(t))){c("must provide one or more functions to wrap on modules");return}n.forEach(n=>{t.forEach(t=>{ye(n,t,i)})})},pe=(n,t)=>{if(!n||!n[t]){c("no function to unwrap.");c((new Error).stack);return}let i=n[t];if(i.__unwrap){i.__unwrap();return}c("no original to unwrap to -- has "+String(t)+" already been unwrapped?")},ev=(n,t)=>{if(n)Array.isArray(n)||(n=[n]);else{c("must provide one or more modules to patch");c((new Error).stack);return}if(!(t&&Array.isArray(t))){c("must provide one or more functions to unwrap on modules");return}n.forEach(n=>{t.forEach(t=>{pe(n,t)})})};fu.wrap=ye;fu.massWrap=fv;fu.unwrap=pe;fu.massUnwrap=ev;ov=(class{constructor(i,r,u){n(this,"_config",{});n(this,"_tracer");n(this,"_meter");n(this,"_logger");n(this,"_diag");n(this,"instrumentationName");n(this,"instrumentationVersion");n(this,"_wrap",ye);n(this,"_unwrap",pe);n(this,"_massWrap",fv);n(this,"_massUnwrap",ev);this.instrumentationName=i;this.instrumentationVersion=r;this.setConfig(u);this._diag=t.createComponentLogger({namespace:i});this._tracer=o.getTracer(i,r);this._meter=os.getMeter(i,r);this._logger=cc.getLogger(i,r);this._updateMetricInstruments()}get meter(){return this._meter}setMeterProvider(n){this._meter=n.getMeter(this.instrumentationName,this.instrumentationVersion);this._updateMetricInstruments()}get logger(){return this._logger}setLoggerProvider(n){this._logger=n.getLogger(this.instrumentationName,this.instrumentationVersion)}getModuleDefinitions(){var t;let n=(t=this.init())!=null?t:[];return Array.isArray(n)?n:[n]}_updateMetricInstruments(){}getConfig(){return this._config}setConfig(n){this._config=h({enabled:!0},n)}setTracerProvider(n){this._tracer=n.getTracer(this.instrumentationName,this.instrumentationVersion)}get tracer(){return this._tracer}_runSpanCustomizationHook(n,t,i,r){if(n)try{n(i,r)}catch(u){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},u)}}});
216we=(class extends ov{constructor(n,t,i){super(n,t,i);this._config.enabled&&this.enable()}});sv="exception";eu=Symbol.for("nodejs.util.inspect.custom");hv=(class{constructor(t){n(this,"_spanContext");n(this,"kind");n(this,"parentSpanContext");n(this,"attributes",{});n(this,"links",[]);n(this,"events",[]);n(this,"startTime");n(this,"resource");n(this,"instrumentationScope");n(this,"_droppedAttributesCount",0);n(this,"_droppedEventsCount",0);n(this,"_droppedLinksCount",0);n(this,"_attributesCount",0);n(this,"name");n(this,"status",{code:tt.UNSET});n(this,"endTime",[0,0]);n(this,"_ended",!1);n(this,"_duration",[-1,-1]);n(this,"_spanProcessor");n(this,"_spanLimits");n(this,"_attributeValueLengthLimit");n(this,"_recordEndMetrics");n(this,"_performanceStartTime");n(this,"_performanceOffset");n(this,"_startTimeProvided");var i,r;let u=Date.now();if(this._spanContext=t.spanContext,this._performanceStartTime=it.now(),this._performanceOffset=u-(this._performanceStartTime+it.timeOrigin),this._startTimeProvided=t.startTime!=null,this._spanLimits=t.spanLimits,this._attributeValueLengthLimit=(i=this._spanLimits.attributeValueLengthLimit)!=null?i:0,this._spanProcessor=t.spanProcessor,this.name=t.name,this.parentSpanContext=t.parentSpanContext,this.kind=t.kind,t.links)for(let n of t.links)this.addLink(n);this.startTime=this._getTime((r=t.startTime)!=null?r:u);this.resource=t.resource;this.instrumentationScope=t.scope;this._recordEndMetrics=t.recordEndMetrics;t.attributes!=null&&this.setAttributes(t.attributes);this._spanProcessor.onStart(this,t.context)}spanContext(){return this._spanContext}setAttribute(n,i){if(i==null||this._isSpanEnded())return this;if(n.length===0)return t.warn(`Invalid attribute key: ${n}`),this;if(!as(i))return t.warn(`Invalid attribute value set for key: ${n}`),this;let{attributeCountLimit:r}=this._spanLimits,u=!Object.prototype.hasOwnProperty.call(this.attributes,n);return r!==void 0&&this._attributesCount>=r&&u?(this._droppedAttributesCount++,this):(this.attributes[n]=this._truncateToSize(i),u&&this._attributesCount++,this)}setAttributes(n){for(let t in n)Object.prototype.hasOwnProperty.call(n,t)&&this.setAttribute(t,n[t]);return this}addEvent(n,i,r){if(this._isSpanEnded())return this;let{eventCountLimit:u}=this._spanLimits;if(u===0)return t.warn("No events allowed."),this._droppedEventsCount++,this;u!==void 0&&this.events.length>=u&&(this._droppedEventsCount===0&&t.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++);th(i)&&(th(r)||(r=i),i=void 0);let f=ci(i),{attributePerEventCountLimit:e}=this._spanLimits,o={},s=0,h=0;for(let n in f)if(Object.prototype.hasOwnProperty.call(f,n)){let t=f[n];if(e!==void 0&&h>=e){s++;continue}o[n]=this._truncateToSize(t);h++}return this.events.push({name:n,attributes:o,time:this._getTime(r),droppedAttributesCount:s}),this}addLink(n){if(this._isSpanEnded())return this;let{linkCountLimit:i}=this._spanLimits;if(i===0)return this._droppedLinksCount++,this;i!==void 0&&this.links.length>=i&&(this._droppedLinksCount===0&&t.debug("Dropping extra links."),this.links.shift(),this._droppedLinksCount++);let{attributePerLinkCountLimit:o}=this._spanLimits,r=ci(n.attributes),s={},u=0,f=0;for(let n in r)if(Object.prototype.hasOwnProperty.call(r,n)){let t=r[n];if(o!==void 0&&f>=o){u++;continue}s[n]=this._truncateToSize(t);f++}let e={context:n.context};return f>0&&(e.attributes=s),u>0&&(e.droppedAttributesCount=u),this.links.push(e),this}addLinks(n){for(let t of n)this.addLink(t);return this}setStatus(n){if(this._isSpanEnded()||n.code===tt.UNSET||this.status.code===tt.OK)return this;let i={code:n.code};return n.code===tt.ERROR&&(typeof n.message=="string"?i.message=n.message:n.message!=null&&t.warn(`Dropping invalid status.message of type '${typeof n.message}', expected 'string'`)),this.status=i,this}updateName(n){return this._isSpanEnded()?this:(this.name=n,this)}end(n){var i;if(this._isSpanEnded()){t.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);return}this.endTime=this._getTime(n);this._duration=yf(this.startTime,this.endTime);this._duration[0]<0&&(t.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]);this._droppedEventsCount>0&&t.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);this._droppedLinksCount>0&&t.warn(`Dropped ${this._droppedLinksCount} links because linkCountLimit reached`);this._spanProcessor.onEnding&&this._spanProcessor.onEnding(this);(i=this._recordEndMetrics)==null||i.call(this);this._ended=!0;this._spanProcessor.onEnd(this)}_getTime(n){if(typeof n=="number"&&n<=it.now())return b(n+this._performanceOffset);if(typeof n=="number")return u(n);if(n instanceof Date)return u(n.getTime());if(pf(n))return n;if(this._startTimeProvided)return u(Date.now());let t=it.now()-this._performanceStartTime;return ih(this.startTime,u(t))}isRecording(){return this._ended===!1}
216recordException(n,i){let r={};typeof n=="string"?r[sf]=n:n&&(n.code?r[hf]=n.code.toString():n.name&&(r[hf]=n.name),n.message&&(r[sf]=n.message),n.stack&&(r[dd]=n.stack));r[hf]||r[sf]?this.addEvent(sv,r,i):t.warn(`Failed to record an exception ${n}`)}get duration(){return this._duration}get ended(){return this._ended}get droppedAttributesCount(){return this._droppedAttributesCount}get droppedEventsCount(){return this._droppedEventsCount}get droppedLinksCount(){return this._droppedLinksCount}_isSpanEnded(){if(this._ended){let n=new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);t.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`,n)}return this._ended}_truncateToLimitUtil(n,t){return n.length<=t?n:n.substring(0,t)}_truncateToSize(n){let i=this._attributeValueLengthLimit;return i<=0?(t.warn(`Attribute value limit must be positive, got ${i}`),n):typeof n=="string"?this._truncateToLimitUtil(n,i):Array.isArray(n)?n.map(n=>typeof n=="string"?this._truncateToLimitUtil(n,i):n):n}[eu](n,t,i){let r={name:this.name,kind:this.kind,spanContext:this._spanContext,parentSpanContext:this.parentSpanContext,status:this.status,startTime:this.startTime,endTime:this.endTime,duration:this._duration,ended:this._ended,attributes:this.attributes,events:this.events,links:this.links,droppedAttributesCount:this._droppedAttributesCount,droppedEventsCount:this._droppedEventsCount,droppedLinksCount:this._droppedLinksCount,instrumentationScope:this.instrumentationScope,resource:{attributes:ke(this.resource)}};return de("SpanImpl",r,n,t,i)}}),function(n){n[n.NOT_RECORD=0]="NOT_RECORD";n[n.RECORD=1]="RECORD";n[n.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(d||(d={}));var tot="otel.span.parent.origin",cv="otel.span.sampling_result",iot="otel.sdk.span.live",rot="otel.sdk.span.started",uot=class{constructor(t){n(this,"startedSpans");n(this,"liveSpans");this.startedSpans=t.createCounter(rot,{unit:"{span}",description:"The number of created spans."});this.liveSpans=t.createUpDownCounter(iot,{unit:"{span}",description:"The number of currently live spans."})}startSpan(n,t){let i=eot(t);if(this.startedSpans.add(1,{[tot]:fot(n),[cv]:i}),t===d.NOT_RECORD)return()=>{};let r={[cv]:i};return this.liveSpans.add(1,r),()=>{this.liveSpans.add(-1,r)}}};var oot="2.10.0",sot=class{constructor(t,i){n(this,"_sampler");n(this,"_spanLimits");n(this,"_idGenerator");n(this,"instrumentationScope");n(this,"_resource");n(this,"_spanProcessor");n(this,"_tracerMetrics");this.instrumentationScope=t;this._sampler=i.sampler;this._spanLimits=i.spanLimits;this._resource=i.resource;this._idGenerator=i.idGenerator;this._spanProcessor=i.spanProcessor;let r=i.meterProvider.getMeter("@opentelemetry/sdk-trace",oot);this._tracerMetrics=new uot(r)}startSpan(n,i={},r=f.active()){var c,l,a;i.root&&(r=o.deleteSpan(r));let v=o.getSpan(r);if(ff(r))return t.debug("Instrumentation suppressed, returning Noop Span"),o.wrapSpanContext(ts);let u=v==null?void 0:v.spanContext(),d=this._idGenerator.generateSpanId(),y,s,h;!u||!o.isSpanContextValid(u)?s=this._idGenerator.generateTraceId():(s=u.traceId,h=u.traceState,y=u);let p=(c=i.kind)!=null?c:hi.INTERNAL,w=((l=i.links)!=null?l:[]).map(n=>({context:n.context,attributes:ci(n.attributes)})),b=ci(i.attributes),e=this._sampler.shouldSample(r,s,n,p,b,w),g=this._tracerMetrics.startSpan(u,e.decision);h=(a=e.traceState)!=null?a:h;let nt=e.decision===ar.RECORD_AND_SAMPLED?et.SAMPLED:et.NONE,k={traceId:s,spanId:d,traceFlags:nt,traceState:h};if(e.decision===ar.NOT_RECORD)return t.debug("Recording is off, propagating context in a non-recording span"),o.wrapSpanContext(k);let tt=ci(Object.assign(b,e.attributes));return new hv({resource:this._resource,scope:this.instrumentationScope,context:r,spanContext:k,name:n,kind:p,links:w,parentSpanContext:y,attributes:tt,startTime:i.startTime,spanProcessor:this._spanProcessor,spanLimits:this._spanLimits,recordEndMetrics:g})}startActiveSpan(n,t,i,r){let e,s,u;if(!(arguments.length<2)){arguments.length===2?u=t:arguments.length===3?(e=t,u=i):(e=t,s=i,u=r);let h=s!=null?s:f.active(),c=this.startSpan(n,e,h),l=o.setSpan(h,c);return f.with(l,u,void 0,c)}}[eu](n,t,i){let r={instrumentationScope:this.instrumentationScope,resource:{attributes:ke(this._resource)},spanLimits:this._spanLimits};return de("Tracer",r,n,t,i)}},hot=class{constructor(t){n(this,"_spanProcessors");this._spanProcessors=t}forceFlush(){let n=[];for(let t of this._spanProcessors)n.push(t.forceFlush());return new Promise(t=>{Promise.all(n).then(()=>{t()}).catch(n=>{yr(n||new Error("MultiSpanProcessor: forceFlush failed")),t()})})}onStart(n,t){for(let i of this._spanProcessors)i.onStart(n,t)}onEnding(n){for(let t of this._spanProcessors)t.onEnding&&t.onEnding(n)}onEnd(n){for(let t of this._spanProcessors)t.onEnd(n)}shutdown(){let n=[];for(let t of this._spanProcessors)n.push(t.shutdown());return new Promise((t,i)=>{Promise.all(n).then(()=>{t()},i)})}},ou=class{shouldSample(){return{decision:d.NOT_RECORD}}toString(){return"AlwaysOffSampler"}},dt=class{shouldSample(){return{decision:d.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}},tr=class{constructor(t){n(this,"_root");n(this,"_remoteParentSampled");n(this,"_remoteParentNotSampled");n(this,"_localParentSampled");n(this,"_localParentNotSampled");var i,r,u,f;this._root=t.root;this._root||(yr(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new dt);this._remoteParentSampled=(i=t.remoteParentSampled)!=null?i:new dt;this._remoteParentNotSampled=(r=t.remoteParentNotSampled)!=null?r:new ou;this._localParentSampled=(u=t.localParentSampled)!=null?u:new dt;this._localParentNotSampled=(f=t.localParentNotSampled)!=null?f:new ou}shouldSample(n,t,i,r,u,f){let e=o.getSpanContext(n);return!e||!cr(e)?this._root.shouldSample(n,t,i,r,u,f):e.isRemote?e.traceFlags&et.SAMPLED?this._remoteParentSampled.shouldSample(n,t,i,r,u,f):this._remoteParentNotSampled.shouldSample(n,t,i,r,u,f):e.traceFlags&et.SAMPLED?this._localParentSampled.shouldSample(n,t,i,r,u,f):this._localParentNotSampled.shouldSample(n,t,i,r,u,f)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}},lv=new Uint8Array(16),av=new Uint8Array(8),cot=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));ge=(class{generateTraceId(){return vv(lv),yv(lv)}generateSpanId(){return vv(av),yv(av)}}),function(n){n[n.resolved=0]="resolved";n[n.timeout=1]="timeout";n[n.error=2]="error";n[n.unresolved=3]="unresolved"}(gt||(gt={}));pv=(class{constructor(t={}){n(this,"_resource");
216n(this,"_activeSpanProcessor");n(this,"_forceFlushTimeoutMillis");n(this,"_tracerOptions");n(this,"_tracers",new Map);var i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k;this._forceFlushTimeoutMillis=(i=t.forceFlushTimeoutMillis)!=null?i:3e4;this._resource=(r=t.resource)!=null?r:na();let d=(u=t.spanProcessors)!=null?u:[];this._activeSpanProcessor=new hot(d);this._tracerOptions={resource:this._resource,sampler:(f=t.sampler)!=null?f:new tr({root:new dt}),spanLimits:{attributeCountLimit:(o=(e=t.spanLimits)==null?void 0:e.attributeCountLimit)!=null?o:128,attributeValueLengthLimit:(h=(s=t.spanLimits)==null?void 0:s.attributeValueLengthLimit)!=null?h:1/0,eventCountLimit:(l=(c=t.spanLimits)==null?void 0:c.eventCountLimit)!=null?l:128,linkCountLimit:(v=(a=t.spanLimits)==null?void 0:a.linkCountLimit)!=null?v:128,attributePerEventCountLimit:(p=(y=t.spanLimits)==null?void 0:y.attributePerEventCountLimit)!=null?p:128,attributePerLinkCountLimit:(b=(w=t.spanLimits)==null?void 0:w.attributePerLinkCountLimit)!=null?b:128},idGenerator:t.idGenerator||new ge,spanProcessor:this._activeSpanProcessor,meterProvider:(k=t.meterProvider)!=null?k:{getMeter(){return sr()}}}}getTracer(n,t,i){let r=`${n}@${t||""}:${(i==null?void 0:i.schemaUrl)||""}`;return this._tracers.has(r)||this._tracers.set(r,new sot({name:n,version:t,schemaUrl:i==null?void 0:i.schemaUrl},this._tracerOptions)),this._tracers.get(r)}forceFlush(){let n=this._forceFlushTimeoutMillis,t=this._activeSpanProcessor._spanProcessors.map(t=>new Promise(i=>{let r,u=setTimeout(()=>{i(new Error(`Span processor did not completed within timeout period of ${n} ms`)),r=gt.timeout},n);t.forceFlush().then(()=>{clearTimeout(u),r!==gt.timeout&&(r=gt.resolved,i(r))}).catch(n=>{clearTimeout(u),r=gt.error,i(n)})}));return new Promise((n,i)=>{Promise.all(t).then(t=>{let r=t.filter(n=>n!==gt.resolved);r.length>0?i(r):n()}).catch(n=>i([n]))})}shutdown(){return this._activeSpanProcessor.shutdown()}[eu](n,t,i){let r=this._activeSpanProcessor._spanProcessors,u={resource:{attributes:ke(this._resource)},tracers:Array.from(this._tracers.keys()),spanProcessors:r.map(n=>{var t,i;return(i=(t=n.constructor)==null?void 0:t.name)!=null?i:"SpanProcessor"})};return de("TracerProvider",u,n,t,i)}});no=(class{constructor(t=0){n(this,"_ratio");n(this,"_upperBound");this._ratio=this._normalize(t);this._upperBound=this._ratio===1?4294967296:Math.floor(this._ratio*4294967295)}shouldSample(n,t){return{decision:fs(t)&&this._accumulate(t)<this._upperBound?d.RECORD_AND_SAMPLED:d.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(n){return typeof n!="number"||isNaN(n)?0:n>=1?1:n<=0?0:n}_accumulate(n){let t=0;for(let i=0;i<32;i+=8){let r=0;for(let t=0;t<8;t++){let u=n.charCodeAt(i+t),f=u<58?u-48:u<71?u-55:u-87;r=r<<4|f}t=(t^r)>>>0}return t}}),function(n){n.AlwaysOff="always_off";n.AlwaysOn="always_on";n.ParentBasedAlwaysOff="parentbased_always_off";n.ParentBasedAlwaysOn="parentbased_always_on";n.ParentBasedTraceIdRatio="parentbased_traceidratio";n.TraceIdRatio="traceidratio"}(g||(g={}));ir=1;bv=128;kv=1/0;dv=(class extends pv{constructor(n={}){let t=rn({},lot(),vot(n));delete t.generalLimits;super(t)}});gv=(class{constructor(){n(this,"_enabled",!1);n(this,"_currentContext",ni)}_bindFunction(n=ni,t){let r=this,i=function(...i){return r.with(n,()=>t.apply(this,i))};return Object.defineProperty(i,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),i}active(){return this._currentContext}bind(n,t){return n===void 0&&(n=this.active()),typeof t=="function"?this._bindFunction(n,t):t}disable(){return this._currentContext=ni,this._enabled=!1,this}enable(){return this._enabled?this:(this._enabled=!0,this._currentContext=ni,this)}with(n,t,i,...r){let u=this._currentContext;this._currentContext=n||ni;try{return t.call(i,...r)}finally{this._currentContext=u}}});ny=(class extends dv{constructor(n={}){super(n)}register(n={}){o.setGlobalTracerProvider(this);pot(n.propagator);yot(n.contextManager)}}),function(n){n.CONNECT_END="connectEnd";n.CONNECT_START="connectStart";n.DECODED_BODY_SIZE="decodedBodySize";n.DOM_COMPLETE="domComplete";n.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd";n.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart";n.DOM_INTERACTIVE="domInteractive";n.DOMAIN_LOOKUP_END="domainLookupEnd";n.DOMAIN_LOOKUP_START="domainLookupStart";n.ENCODED_BODY_SIZE="encodedBodySize";n.FETCH_START="fetchStart";n.LOAD_EVENT_END="loadEventEnd";n.LOAD_EVENT_START="loadEventStart";n.NAVIGATION_START="navigationStart";n.REDIRECT_END="redirectEnd";n.REDIRECT_START="redirectStart";n.REQUEST_START="requestStart";n.RESPONSE_END="responseEnd";n.RESPONSE_START="responseStart";n.SECURE_CONNECTION_START="secureConnectionStart";n.START_TIME="startTime";n.UNLOAD_EVENT_END="unloadEventEnd";n.UNLOAD_EVENT_START="unloadEventStart"}(s||(s={}));ty="http.response_content_length";iy="http.response_content_length_uncompressed";ey="http.request.body.size";io=t.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});oy=new TextEncoder;sy={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0};hy={"https:":"443","http:":"80"};var cy="0.221.0",sst=300,ly=typeof PerformanceObserver!="undefined",hst=class extends we{constructor(t={}){super("@opentelemetry/instrumentation-fetch",cy,t);n(this,"component","fetch");n(this,"version",cy);n(this,"moduleName",this.component);n(this,"_usedResources",new WeakSet);n(this,"_tasksCount",0)}init(){}_addChildSpan(n,t){let i=this.tracer.startSpan("CORS Preflight",{startTime:t[s.FETCH_START]},o.setSpan(f.active(),n));su(i,t,this.getConfig().ignoreNetworkEvents,void 0,!0);i.end(t[s.RESPONSE_END])}_addFinalSpanAttributes(n,t){let i=ct(t.url);n.setAttribute(bs,t.status);n.setAttribute(ks,i.hostname);let r=ost(i);r&&n.setAttribute(ds,r)}_addHeaders(n,t){if(!fy(t,this.getConfig().propagateTraceHeaderCorsUrls)){let n={};w.inject(f.active(),n);Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}if(n instanceof Request)w.inject(f.active(),n.headers,{set:(n,t,i)=>n.set(t,typeof i=="string"?i:String(i))});else{let t=new Headers(n.headers);w.inject(f.active(),t,{set:(n,t,i)=>n.set(t,typeof i=="string"?i:String(i))});n.headers=t}}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)}_createSpan(n,t={}){if(dh(n,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let i={},u=t.method,r=fst(t.method||"GET"),f=r;return i[ps]=r,r!==u&&(i[ws]=u),i[nh]=n,this.tracer.startSpan(f,{kind:hi.CLIENT,attributes:i})}_findResourceAndAddNetworkEvents(n,t,i){let r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}let u=uy(t.spanUrl,t.startTime,i,r,this._usedResources,"fetch");if(u.mainRequest){let i=u.mainRequest;this._markResourceAsUsed(i);let t=u.corsPreFlightRequest;t&&(this._addChildSpan(n,t),this._markResourceAsUsed(t));su(n,i,this.getConfig().ignoreNetworkEvents,void 0,!0)}}_markResourceAsUsed(n){this._usedResources.add(n)}_endSpan(n,t,i){let r=u(Date.now()),f=b();this._addFinalSpanAttributes(n,i);i.status>=400&&(n.setStatus({code:tt.ERROR}),n.setAttribute(ef,String(i.status)));setTimeout(()=>{var i;(i=t.observer)==null||i.disconnect();this._findResourceAndAddNetworkEvents(n,t,f);this._tasksCount--;this._clearResources();n.end(r)},sst)}_patchConstructor(){return n=>{let t=this;return function(...i){function c(n,i){t._applyAttributesAfterFetch(n,r,i);t._endSpan(n,s,{status:i.status||0,statusText:i.message,url:u})}function l(n,i){t._applyAttributesAfterFetch(n,r,i);i.status>=200&&i.status<400?t._endSpan(n,s,i):t._endSpan(n,s,{status:i.status,statusText:i.statusText,url:u})}function a(n,i){try{let t=i.clone().body;
216if(t){let u=t.getReader(),r=()=>{u.read().then(({done:t})=>{t?l(n,i):r()},t=>{c(n,t)})};r()}else l(n,i)}catch(r){t._diag.error("Failed to read fetch response body",r);t._endSpan(n,s,{status:0,url:u})}return i}function v(n,i){try{c(n,i)}catch(r){t._diag.error("Failed to end span on fetch error",r);t._endSpan(n,s,{status:i.status||0,url:u})}throw i;}if(!t._isEnabled)return n.apply(this,i);let h=this,u=ct(i[0]instanceof Request?i[0].url:String(i[0])).href,r;r=i[0]instanceof Request?i[1]!=null?new Request(i[0],i[1]):i[0]:i[1]||{};let e=t._createSpan(u,r);if(!e)return n.apply(this,i);let s=t._prepareSpanData(u);return t.getConfig().measureRequestSize&&nst(...i).then(n=>{n&&e.setAttribute(ey,n)}).catch(n=>{t._diag.warn("getFetchBodyLength",n)}),f.with(o.setSpan(f.active(),e),()=>(t._callRequestHook(e,r),t._addHeaders(r,u),t._tasksCount++,n.apply(h,r instanceof Request?[r]:[u,r]).then(a.bind(h,e),v.bind(h,e))))}}}_applyAttributesAfterFetch(n,t,i){let r=this.getConfig().applyCustomAttributesOnSpan;r&&be(()=>r(n,t,i),n=>{n&&this._diag.error("applyCustomAttributesOnSpan",n)},!0)}_callRequestHook(n,t){let i=this.getConfig().requestHook;i&&be(()=>i(n,t),n=>{n&&this._diag.error("requestHook",n)},!0)}_prepareSpanData(n){let i=b(),t=[];if(typeof PerformanceObserver!="function")return{entries:t,startTime:i,spanUrl:n};let r=new PerformanceObserver(i=>{i.getEntries().forEach(i=>{i.initiatorType==="fetch"&&i.name===n&&t.push(i)})});return r.observe({entryTypes:["resource"]}),{entries:t,observer:r,startTime:i,spanUrl:n}}enable(){if(!ly){this._diag.warn("this instrumentation is intended for web usage only, it does not instrument server-side fetch()");return}if(!this._isEnabled){if(this._isFetchPatched){this._diag.debug("fetch constructor already patched");this._isEnabled=!0;return}try{this._wrap(globalThis,"fetch",this._patchConstructor());this._isFetchPatched=!0;this._isEnabled=!0}catch(n){this._diag.warn("Failed to patch globalThis.fetch; instrumentation will not be enabled. Another script may have locked globalThis.fetch via Object.defineProperty.",n)}}}disable(){ly&&this._isEnabled&&(this._isEnabled=!1,this._usedResources=new WeakSet)}},cst="http.request.body.size",ft;(function(n){n.METHOD_OPEN="open";n.METHOD_SEND="send";n.EVENT_ABORT="abort";n.EVENT_ERROR="error";n.EVENT_LOAD="loaded";n.EVENT_TIMEOUT="timeout"})(ft||(ft={}));ay=t.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});vy=new TextEncoder;py={CONNECT:!0,DELETE:!0,GET:!0,HEAD:!0,OPTIONS:!0,PATCH:!0,POST:!0,PUT:!0,TRACE:!0,QUERY:!0};wy={"https:":"443","http:":"80"};var by="0.221.0",bst=300,kst=class extends we{constructor(t={}){super("@opentelemetry/instrumentation-xml-http-request",by,t);n(this,"component","xml-http-request");n(this,"version",by);n(this,"moduleName",this.component);n(this,"_tasksCount",0);n(this,"_xhrMem",new WeakMap);n(this,"_usedResources",new WeakSet)}init(){}_addHeaders(n,t){let r=ct(t).href;if(!fy(r,this.getConfig().propagateTraceHeaderCorsUrls)){let n={};w.inject(f.active(),n);Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy");return}let i={};w.inject(f.active(),i);
216Object.keys(i).forEach(t=>{n.setRequestHeader(t,String(i[t]))})}_addChildSpan(n,t){f.with(o.setSpan(f.active(),n),()=>{let n=this.tracer.startSpan("CORS Preflight",{startTime:t[s.FETCH_START]});su(n,t,this.getConfig().ignoreNetworkEvents,void 0,!0);n.end(t[s.RESPONSE_END])})}_addFinalSpanAttributes(n,t){t.status&&n.setAttribute(bs,t.status)}_applyAttributesAfterXHR(n,t){let i=this.getConfig().applyCustomAttributesOnSpan;typeof i=="function"&&be(()=>i(n,t),n=>{n&&this._diag.error("applyCustomAttributesOnSpan",n)},!0)}_addResourceObserver(n,t){let i=this._xhrMem.get(n);i&&typeof PerformanceObserver=="function"&&typeof PerformanceResourceTiming=="function"&&(i.createdResources={observer:new PerformanceObserver(n=>{let r=n.getEntries(),u=ct(t);r.forEach(n=>{n.initiatorType==="xmlhttprequest"&&n.name===u.href&&i.createdResources&&i.createdResources.entries.push(n)})}),entries:[]},i.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){this._tasksCount===0&&this.getConfig().clearTimingResources&&(it.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(n,t,i,r,u){if(i&&r&&u&&n.createdResources){let f=n.createdResources.entries;f&&f.length||(f=it.getEntriesByType("resource"));let e=uy(ct(i).href,r,u,f,this._usedResources);if(e.mainRequest){let i=e.mainRequest;this._markResourceAsUsed(i);let n=e.corsPreFlightRequest;n&&(this._addChildSpan(t,n),this._markResourceAsUsed(n));su(t,i,this.getConfig().ignoreNetworkEvents,void 0,!0)}}}_cleanPreviousSpanInformation(n){let t=this._xhrMem.get(n);if(t){let i=t.callbackToRemoveEvents;i&&i();this._xhrMem.delete(n)}}_createSpan(n,t,i){let u=ct(t);if(dh(u.href,this.getConfig().ignoreUrls)){this._diag.debug("ignoring span as url matches ignored url");return}let r={},o=i,f=yst(i),h=f;r[ps]=f;f!==o&&(r[ws]=o);r[nh]=u.toString();r[ks]=u.hostname;let s=wst(u);s&&(r[ds]=s);let e=this.tracer.startSpan(h,{kind:hi.CLIENT,attributes:r});return e.addEvent(ft.METHOD_OPEN),this._cleanPreviousSpanInformation(n),this._xhrMem.set(n,{span:e,spanUrl:t}),e}_markResourceAsUsed(n){this._usedResources.add(n)}_patchOpen(){return n=>{let t=this;return function(...i){if(!t._isEnabled)return n.apply(this,i);let r=i[0],u=i[1];return t._createSpan(this,u,r),n.apply(this,i)}}}_patchSend(){function s(t,i,r,u){let e=i.callbackToRemoveEvents;typeof e=="function"&&e();let{span:f,spanUrl:o,sendStartTime:s}=i;f&&(n._findResourceAndAddNetworkEvents(i,f,o,s,r),f.addEvent(t,u),n._addFinalSpanAttributes(f,i),f.end(u),n._tasksCount--);n._clearResources()}function t(t,i,r,u){let f=n._xhrMem.get(i);if(f){if(f.status=i.status,f.statusText=i.statusText,n._xhrMem.delete(i),f.span){let t=f.span;n._applyAttributesAfterXHR(t,i);r?u&&(t.setStatus({code:tt.ERROR,message:u}),t.setAttribute(ef,u)):f.status&&f.status>=400&&(t.setStatus({code:tt.ERROR}),t.setAttribute(ef,String(f.status)))}let e=b(),o=Date.now();setTimeout(()=>{s(t,f,e,o)},bst)}}function i(){t(ft.EVENT_ERROR,this,!0,"error")}function r(){t(ft.EVENT_ABORT,this,!1)}function u(){t(ft.EVENT_TIMEOUT,this,!0,"timeout")}function e(){this.status<299?t(ft.EVENT_LOAD,this,!1):t(ft.EVENT_ERROR,this,!1)}function h(t){t.removeEventListener("abort",r);t.removeEventListener("error",i);t.removeEventListener("load",e);t.removeEventListener("timeout",u);let f=n._xhrMem.get(t);f&&(f.callbackToRemoveEvents=void 0)}let n=this;return t=>function(...s){if(!n._isEnabled)return t.apply(this,s);let c=n._xhrMem.get(this);if(!c)return t.apply(this,s);let l=c.span,a=c.spanUrl;if(l&&a){if(n.getConfig().measureRequestSize&&s!=null&&s[0]){let t=s[0],n=ast(t);n!==void 0&&l.setAttribute(cst,n)}f.with(o.setSpan(f.active(),l),()=>{n._tasksCount++,c.sendStartTime=b(),l.addEvent(ft.METHOD_SEND),this.addEventListener("abort",r),this.addEventListener("error",i),this.addEventListener("load",e),this.addEventListener("timeout",u),c.callbackToRemoveEvents=()=>{h(this),c.createdResources&&c.createdResources.observer.disconnect()},n._addHeaders(this,a),n._addResourceObserver(this,a)})}return t.apply(this,s)}}enable(){if(!this._isEnabled){if(this._isXhrPatched){this._diag.debug("reactivating existing patch on",this.moduleName,this.version);this._isEnabled=!0;return}try{this._diag.debug("applying patch to",this.moduleName,this.version);this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen());this._wrap(XMLHttpRequest.prototype,"send",this._patchSend());this._isXhrPatched=!0;this._isEnabled=!0}catch(n){this._unwrap(XMLHttpRequest.prototype,"open");this._unwrap(XMLHttpRequest.prototype,"send");this._diag.warn("Failed to patch globalThis.XMLHttpRequest; instrumentation will not be enabled. Another script may have locked globalThis.XMLHttpRequest via Object.defineProperty.",n)}}}disable(){this._isEnabled&&(this._isEnabled=!1,this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}},r={SERVICE_NAME:"Cortex-Web",SERVICE:"Web",TRACER_NAME:"custom-cortex-browser-metrics",CLIENT_NAME_SHORT:Param.ClientNameShort,TRACER_VERSION:"1.0.0",MIN_TRACE_DURATION_MS:parseInt(Param.WebInstrumentationMinDurationMs)||1,TIMEOUT_MS:parseInt(Param.WebInstrumentationTimeoutMs)||5e3,FINALIZE_DELAY_MS:parseInt(Param.WebInstrumentationFinalizeDelayMs)||5e3,FINALIZE_HARD_CAPS_MS:parseInt(Param.WebInstrumentationFinalizeHardCapsMs)||1e4,FINALIZE_SPA_MS:parseInt(Param.WebInstrumentationFinalizeSPAMs)||1e4,SPA_RESOURCE_BUFFER_MS:parseInt(Param.WebInstrumentationSpaResourceBufferMs)||10,DEPLOYMENT_ENVIRONMENT:Param.WebInstrumentationEnvironment||"Production",ROOT_SPAN:Param.WebInstrumentationRootSpan,SPA_SPAN:Param.WebInstrumentationSpaSpan,DEFAULT_ENDPOINT:"/webapi/monitoring/otlp-http/v1/traces",DEFAULT_METRICS_ENDPOINT:"/webapi/monitoring/otlp-http/v1/metrics",DEFAULT_HEALTH_CHECK_ENDPOINT:"/webapi/framework/monitoring/httpcheck/canselfaccessoverhttp_4c1_v1",FORCE_ENDPOINT:Param.WebInstrumentationExporterEndpointForce||null,HEALTH_CHECK_TIMEOUT:Param.WebInstrumentationHealthCheckTimeoutMs||500,MAX_EXPORT_FAILURES:Param.WebInstrumentationMaxExportFailures||5,METRICS_IS_ENABLED:Param.WebInstrumentationMetricsIsEnabled,METRICS_EXPORT_INTERVAL_MS:parseInt(Param.WebInstrumentationMetricsExportIntervalMs)||6e4,METRICS_BUCKET_BOUNDARIES:Param.WebInstrumentationMetricsBucketBoundariesSeconds,METRICS_TEMPORALITY:Param.WebInstrumentationMetricsTemporality,PAGE_TYPE_MAP:Param.WebInstrumentationPageTypeMap,TRACE_PROPAGATION_IS_ENABLED:Param.WebInstrumentationTracePropagationIsEnabled,TRACE_PROPAGATION_CORS_URLS:Param.WebInstrumentationTracePropagationCorsUrls},ky=[.05,.1,.25,.5,.75,1,1.5,2,2.5,3,4,5,8,13,21,34],dst=[.01,.05,.1,.15,.25,.5,1,2,5],e={PAGE_LOAD:"olcortex_browser_page_load_duration_seconds",TTFB:"olcortex_browser_ttfb_seconds",FRONTEND:"olcortex_browser_frontend_duration_seconds",FRONTEND_RENDER:"olcortex_browser_frontend_render_duration_seconds",DOM_COMPLETE:"olcortex_browser_dom_complete_seconds",LCP:"olcortex_browser_largest_contentful_paint_seconds",INP:"olcortex_browser_interaction_to_next_paint_seconds",CLS:"olcortex_browser_cumulative_layout_shift",SPA_NAVIGATION:"olcortex_browser_spa_navigation_duration_seconds"},gst="ol.cortex_request_type",uo="VPage: Other",fo=50,dy="VPage: HomePage",gy=8,np=32,hu={},nht=[/\/webapi\/monitoring\/otlp-http\//i,/canselfaccessoverhttp/i];fr=null;oo=null;var fp=200,ep=[],lu=null,op=!1,au=[],sp=!1,hp,rht=new Promise(n=>{hp=n});
216window.OLTelemetry={declareAttribute(n,t){return typeof n!="string"||typeof t!="string"?!1:!(n in hu)&&Object.keys(hu).length>=gy?(console.warn(`Ignoring declared telemetry attribute ${n}: already at ${gy}`),!1):t.length>np?(console.warn(`Ignoring declared telemetry attribute ${n}: value longer than ${np}`),!1):(hu[n]=t,!0)},commonAttributes(){return yp(cu(window.location.href))},createCounter(n,t){let i=vp("counter",n,t);return{add:(n,t)=>ap(i,n,t)}},createHistogram(n,t){let i=vp("histogram",n,t);return{record:(n,t)=>ap(i,n,t)}},defaultBoundaries(){return[...rp(r.METRICS_BUCKET_BOUNDARIES)]},ready:rht,version:1};var uht=class{constructor(n,t){let f=rp(r.METRICS_BUCKET_BOUNDARIES),o=(n,t)=>({instrumentName:n,aggregation:{type:v.EXPLICIT_BUCKET_HISTOGRAM,options:{boundaries:t,recordMinMax:!0}}}),u=n=>o(n,f);this.exporter=iht(new ket({url:t,timeoutMillis:r.TIMEOUT_MS,temporalityPreference:r.METRICS_TEMPORALITY==="cumulative"?ii.CUMULATIVE:ii.DELTA}));this.reader=new kl({exporter:this.exporter,exportIntervalMillis:r.METRICS_EXPORT_INTERVAL_MS,exportTimeoutMillis:Math.min(r.TIMEOUT_MS,r.METRICS_EXPORT_INTERVAL_MS)});this.provider=new aa({resource:n,readers:[this.reader],views:[u(e.PAGE_LOAD),u(e.TTFB),u(e.FRONTEND),u(e.FRONTEND_RENDER),u(e.DOM_COMPLETE),u(e.LCP),u(e.INP),u(e.SPA_NAVIGATION),o(e.CLS,dst)]});let i=this.provider.getMeter(r.TRACER_NAME,r.TRACER_VERSION);this.meter=i;this.boundaries=f;this.instruments={[e.PAGE_LOAD]:i.createHistogram(e.PAGE_LOAD,{unit:"s",description:"Browser page load, navigation start to load event end"}),[e.TTFB]:i.createHistogram(e.TTFB,{unit:"s",description:"Browser time to first byte"}),[e.FRONTEND]:i.createHistogram(e.FRONTEND,{unit:"s",description:"Client-side share of a page load, first byte to load event end"}),[e.FRONTEND_RENDER]:i.createHistogram(e.FRONTEND_RENDER,{unit:"s",description:"Client-side render of a page load, first byte to DOM interactive - excludes subresource fetch"}),[e.DOM_COMPLETE]:i.createHistogram(e.DOM_COMPLETE,{unit:"s",description:"Browser navigation start to DOM complete"}),[e.LCP]:i.createHistogram(e.LCP,{unit:"s",description:"Largest Contentful Paint"}),[e.INP]:i.createHistogram(e.INP,{unit:"s",description:"Interaction to Next Paint"}),[e.CLS]:i.createHistogram(e.CLS,{unit:"1",description:"Cumulative Layout Shift score"}),[e.SPA_NAVIGATION]:i.createHistogram(e.SPA_NAVIGATION,{unit:"s",description:"Single page application navigation duration"})}}buildAttributes(n){return yp(n)}createExternalHistogram(n,{unit:r,description:t,boundaries:i}={}){return this.meter.createHistogram(n,{unit:r,description:t,advice:{explicitBucketBoundaries:i!=null?i:this.boundaries}})}createExternalCounter(n,{unit:i,description:t}={}){return this.meter.createCounter(n,{unit:i,description:t})}record(n,t,i){if(!(!Number.isFinite(t)||t<0))try{this.instruments[n].record(t,i)}catch(r){console.warn(`Failed to record browser metric ${n}:`,r)}}increment(n,t){try{this.instruments[n].add(1,t)}catch(i){console.warn(`Failed to increment browser metric ${n}:`,i)}}forceFlush(){return this.provider.forceFlush().catch(n=>{console.warn("Failed to flush browser metrics:",n)})}},fht=class{constructor(t,i=null){n(this,"getNav",()=>performance.getEntriesByType("navigation")[0]);n(this,"waitForNavTiming",(n,t,i=performance.now(),u=r.TIMEOUT_MS)=>{let f=this.getNav();if(f&&f[n]>0)return t(f);if(performance.now()-i>u)return console.warn(`Timeout waiting for navigation timing: ${n}`),t(null);requestAnimationFrame(()=>this.waitForNavTiming(n,t,i,u))});this.provider=t;this._browserMetrics=i;this.tracer=t.getTracer(r.TRACER_NAME,r.TRACER_VERSION);this.spans={};this._collectionComplete=!1;this._currentUrl=window.location.href;this._isSPA=!1;this._spaResourcesFound=!1;this._webVitals={longtasks:[],layoutShifts:[],cumulativeLayoutShift:0,firstContentfulPaint:null,largestContentfulPaint:null,firstInputDelay:null,interactionToNextPaint:null,interactions:[]};window.addEventListener("beforeunload",()=>{this.forceClose()});document.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&(this.recordSessionQualityMetrics(),this._browserMetrics&&this._browserMetrics.forceFlush())});this.setupPageLoadPhase()}setupPageLoadPhase(){this.waitForNavTiming("responseEnd",n=>{if(!n){console.warn("Navigation timing not available, skipping metrics collection");return}this.spans.pageLoad=this.tracer.startSpan(`${r.ROOT_SPAN}: ${this._currentUrl}`,{startTime:u(performance.timeOrigin+n.fetchStart)});this.spans.pageLoad.setAttributes(nt(h({},this.getCommonAttributes()),{"ol.cortex.trace_type":`Browser: ${r.ROOT_SPAN}`}));let t=o.setSpan(f.active(),this.spans.pageLoad);this.spans.network=this.tracer.startSpan("Network Phase",{startTime:u(performance.timeOrigin+n.fetchStart)},t);let i=o.setSpan(f.active(),this.spans.network);this.createNetworkPhase(n,i);this.spans.network.end(u(performance.timeOrigin+n.responseEnd));this.setupDOMPhase()})}createNetworkPhase(n,t){this.createChildSpan("DNS Lookup",n.domainLookupStart,n.domainLookupEnd,t);this.createChildSpan("TCP Connection",n.connectStart,n.connectEnd,t);this.createChildSpan("TTFB",n.requestStart,n.responseStart,t);this.createChildSpan("Response Transfer",n.responseStart,n.responseEnd,t)}setupDOMPhase(){let n=()=>{let n=this.getNav();if(!n||n.domComplete<=0)return!1;
216let t=o.setSpan(f.active(),this.spans.pageLoad);return this.spans.domProcessing=this.tracer.startSpan("DOM Processing Phase",{startTime:u(performance.timeOrigin+n.responseEnd)},t),this.createDomProcessingSpans(),!0};n()||document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&n()},{once:!0})}createDomProcessingSpans(){let n=this.getNav(),t=o.setSpan(f.active(),this.spans.domProcessing);this.spans.blockingResources=this.createChildSpan("Blocking Resources Parsing",n.responseEnd,n.domInteractive,t);this.createChildSpan("DOMContentLoaded (handlers)",n.domContentLoadedEventStart,n.domContentLoadedEventEnd,t);this.spans.nonBlockingInitialResources=this.createChildSpan("Non-blocking Initial Resources Parsing",n.responseEnd,n.domComplete,t);this.spans.domProcessing.end(u(performance.timeOrigin+n.domComplete));this.setupResourcesPhase();this.setupWebVitalsPhase()}setupResourcesPhase(){this._hasAsyncResources=!1;this._resourceContexts={blockingCtx:o.setSpan(f.active(),this.spans.blockingResources),nonBlockingInitialCtx:o.setSpan(f.active(),this.spans.nonBlockingInitialResources),asyncResourcesCtx:null};this.obs=new PerformanceObserver(n=>{try{if(!n||typeof n.getEntries!="function"){console.warn("Invalid PerformanceObserverEntryList");return}let t=n.getEntries();if(!Array.isArray(t)){console.warn("getEntries() did not return an array");return}for(let n of t)if(this.createResourceSpans(n)){let t=this.classifyResource(n,this.getNav());t==="spa"?(this._latestSPAResourceEnd=Math.max(this._latestSPAResourceEnd||0,n.responseEnd),this._spaResourcesFound=!0,this.scheduleSPAFinalization()):(t==="blocking"||t==="non_blocking_initial"||t==="async")&&(this._latestResourceEnd=Math.max(this._latestResourceEnd||0,n.responseEnd),this.schedulePageLoadFinalization())}}catch(t){console.warn("Error in PerformanceObserver callback:",t)}});this.obs.observe({type:"resource",buffered:!0})}createResourceSpans(n){if(!(n.fetchStart>0&&n.responseEnd>0)||this._processedResources&&this._processedResources.has(n.name))return!1;this._processedResources||(this._processedResources=new Set);let r=this.getNav(),e=this.classifyResource(n,r);this._hasAsyncResources||this._isSPA||e!="async"||(this._hasAsyncResources=!0,this.spans.asyncResources=this.tracer.startSpan("Non-blocking Final Resources Parsing",{startTime:u(performance.timeOrigin+r.domComplete)},o.setSpan(f.active(),this.spans.pageLoad)),this._resourceContexts.asyncResourcesCtx=o.setSpan(f.active(),this.spans.asyncResources));let t;switch(e){case"blocking":t=this._resourceContexts.blockingCtx;break;case"non_blocking_initial":t=this._resourceContexts.nonBlockingInitialCtx;break;case"spa":t=o.setSpan(f.active(),this.spans.spaRoot);break;case"async":t=this._resourceContexts.asyncResourcesCtx;break;default:t=f.ROOT_CONTEXT}let s=this.getShortenedResourceName(n.name),i=this.tracer.startSpan(`Resource: ${s}`,{startTime:u(performance.timeOrigin+n.fetchStart)},t),h=o.setSpan(f.active(),i);return this.createNetworkPhase(n,h),i.setAttributes({"resource.url":n.name,"resource.type":n.initiatorType,"resource.size":n.transferSize||n.encodedBodySize||0,"resource.delivery_type":n.deliveryType,"resource.render_blocking_status":n.renderBlockingStatus}),this._processedResources.add(n.name),i.end(u(performance.timeOrigin+n.responseEnd)),!0}schedulePageLoadFinalization(){this._pageLoadFinalizationTimer&&clearTimeout(this._pageLoadFinalizationTimer);let n=this.getNav();n.loadEventEnd>0?this._pageLoadFinalizationTimer=setTimeout(()=>{this.finalizeRootSpan()},r.FINALIZE_DELAY_MS):n.loadEventStart>0?this._pageLoadFinalizationTimer=setTimeout(()=>{this.finalizeRootSpan()},r.FINALIZE_HARD_CAPS_MS):window.addEventListener("load",()=>setTimeout(()=>this.finalizeRootSpan(),r.FINALIZE_DELAY_MS),{once:!0})}finalizeRootSpan(){var t;if(!this._collectionComplete&&!this._isSPA&&this.getNav()&&(t=this.spans)!=null&&t.pageLoad&&!this._collectionComplete){let n=this.getNav();if(!this.spans.loadEvent&&n.loadEventStart>0&&n.loadEventEnd>0){let t=o.setSpan(f.active(),this.spans.pageLoad);this.spans.loadEvent=this.tracer.startSpan("Window Load (handlers)",{startTime:u(performance.timeOrigin+n.loadEventStart)},t);this.spans.loadEvent.end(u(performance.timeOrigin+n.loadEventEnd))}let i=Math.max(n.loadEventEnd||0,this._latestResourceEnd);!this._isSPA&&this.spans.asyncResources&&this.spans.asyncResources.end(u(performance.timeOrigin+this._latestResourceEnd));this.spans.pageLoad.end(u(performance.timeOrigin+(i||performance.now())));this.recordPageLoadMetrics(n,i);this._collectionComplete=!0;this._isSPA=!0;this.tryFlush();this.setupSPATracking()}}recordPageLoadMetrics(n,t){if(this._browserMetrics&&!this._pageLoadMetricsRecorded){this._pageLoadMetricsRecorded=!0;let i=this._browserMetrics.buildAttributes(cu(this._currentUrl)),r=n.fetchStart||0,u=n.loadEventEnd>r?n.loadEventEnd:t;u>r&&this._browserMetrics.record(e.PAGE_LOAD,(u-r)/1e3,i);n.responseStart>0&&n.requestStart>0&&this._browserMetrics.record(e.TTFB,(n.responseStart-n.requestStart)/1e3,i);n.domComplete>r&&this._browserMetrics.record(e.DOM_COMPLETE,(n.domComplete-r)/1e3,i);n.responseStart>0&&u>n.responseStart&&this._browserMetrics.record(e.FRONTEND,(u-n.responseStart)/1e3,i);n.responseStart>0&&n.domInteractive>n.responseStart&&this._browserMetrics.record(e.FRONTEND_RENDER,(n.domInteractive-n.responseStart)/1e3,i);this._webVitals.largestContentfulPaint!==null&&this._browserMetrics.record(e.LCP,this._webVitals.largestContentfulPaint/1e3,i)}}recordSessionQualityMetrics(){if(this._browserMetrics&&!this._sessionQualityMetricsRecorded){this._sessionQualityMetricsRecorded=!0;let t=this._browserMetrics.buildAttributes(cu(this._currentUrl)),n=this.getWebVitalsSummary();this._browserMetrics.record(e.CLS,n.cls,t);n.inp!==null&&this._browserMetrics.record(e.INP,n.inp/1e3,t)}}setupSPATracking(){if(!this._spaListenersSetup){this._spaListenersSetup=!0;let n=this._currentUrl,t=t=>{let i=window.location.href;i!==n&&(this.startSPANavigation(t,n,i),n=i)},i=history.pushState,r=history.replaceState;history.pushState=function(...n){i.apply(this,n);setTimeout(()=>t("pushState"),0)};history.replaceState=function(...n){r.apply(this,n);setTimeout(()=>t("replaceState"),0)};window.addEventListener("popstate",()=>{setTimeout(()=>t("popstate"),0)})}}setupWebVitalsPhase(){this._webVitalsContexts={pageLoadCtx:o.setSpan(f.active(),this.spans.pageLoad)};this.setupLongtaskObserver();this.setupPaintObserver();this.setupEventObserver();this.setupLayoutShiftObserver()}setupLongtaskObserver(){var n;if(!((n=PerformanceObserver.supportedEntryTypes)!=null&&n.includes("longtask"))){console.debug("Long Task API not supported");return}try{this._longtaskObserver=new PerformanceObserver(n=>{try{let t=n.getEntries();for(let n of t){this._webVitals.longtasks.push({startTime:n.startTime,duration:n.duration,attribution:n.attribution});let i=this.getWebVitalsParentContext(),t=this.tracer.startSpan("Long Task",{startTime:u(performance.timeOrigin+n.startTime)},i);if(t.setAttributes({"longtask.duration_ms":n.duration,"longtask.start_time":n.startTime,"longtask.name":n.name,"longtask.entry_type":n.entryType}),n.attribution&&n.attribution.length>0){let i=n.attribution[0];t.setAttributes({"longtask.attribution.name":i.name||"unknown","longtask.attribution.container_type":i.containerType||"unknown","longtask.attribution.container_src":i.containerSrc||"","longtask.attribution.container_id":i.containerId||"","longtask.attribution.container_name":i.containerName||""})}t.end(u(performance.timeOrigin+n.startTime+n.duration))}}catch(t){console.warn("Error in longtask observer callback:",t)}});this._longtaskObserver.observe({type:"longtask",buffered:!0})}catch(t){console.warn("Failed to setup longtask observer:",t)}}setupPaintObserver(){var n,t;if((n=PerformanceObserver.supportedEntryTypes)!=null&&n.includes("paint"))try{this._paintObserver=new PerformanceObserver(n=>{try{for(let t of n.getEntries())t.name==="first-contentful-paint"?(this._webVitals.firstContentfulPaint=t.startTime,this.recordPaintMetric("First Contentful Paint (FCP)",t)):t.name==="first-paint"&&this.recordPaintMetric("First Paint (FP)",t)}catch(t){console.warn("Error in paint observer callback:",t)}});this._paintObserver.observe({type:"paint",buffered:!0})}catch(i){console.warn("Failed to setup paint observer:",i)}if((t=PerformanceObserver.supportedEntryTypes)!=null&&t.includes("largest-contentful-paint"))try{this._lcpObserver=new PerformanceObserver(n=>{try{let i=n.getEntries(),t=i[i.length-1];t&&(this._webVitals.largestContentfulPaint=t.startTime,this.recordLCPMetric(t))}catch(t){console.warn("Error in LCP observer callback:",t)}});this._lcpObserver.observe({type:"largest-contentful-paint",buffered:!0})}catch(i){console.warn("Failed to setup LCP observer:",i)}}recordPaintMetric(n,t){let r=this.getWebVitalsParentContext(),i=this.tracer.startSpan(n,{startTime:u(performance.timeOrigin)},r);i.setAttributes({"paint.name":t.name,"paint.start_time_ms":t.startTime,"paint.entry_type":t.entryType});i.end(u(performance.timeOrigin+t.startTime))}recordLCPMetric(n){var t;let r=this.getWebVitalsParentContext(),i=this.tracer.startSpan("Largest Contentful Paint (LCP)",{startTime:u(performance.timeOrigin)},r);i.setAttributes({"lcp.start_time_ms":n.startTime,"lcp.render_time_ms":n.renderTime||0,"lcp.load_time_ms":n.loadTime||0,"lcp.size":n.size||0,"lcp.element_tag":((t=n.element)==null?void 0:t.tagName)||"unknown","lcp.element_id":n.id||"","lcp.url":n.url||""});i.end(u(performance.timeOrigin+n.startTime))}setupEventObserver(){var n;if(!((n=PerformanceObserver.supportedEntryTypes)!=null&&n.includes("event"))){console.debug("Event Timing API not supported");return}try{this._eventObserver=new PerformanceObserver(n=>{try{for(let t of n.getEntries())this._webVitals.firstInputDelay===null&&t.processingStart>0&&(this._webVitals.firstInputDelay=t.processingStart-t.startTime,this.recordFIDMetric(t)),t.duration>40&&(this._webVitals.interactions.push({name:t.name,duration:t.duration,startTime:t.startTime,processingStart:t.processingStart,processingEnd:t.processingEnd}),this.recordInteractionMetric(t))}catch(t){console.warn("Error in event observer callback:",t)}});this._eventObserver.observe({type:"event",buffered:!0,durationThreshold:16})}catch(t){console.warn("Failed to setup event observer:",t)}}recordFIDMetric(n){var t;let r=this.getWebVitalsParentContext(),f=n.processingStart-n.startTime,i=this.tracer.startSpan("First Input Delay (FID)",{startTime:u(performance.timeOrigin+n.startTime)},r);i.setAttributes({"fid.delay_ms":f,"fid.event_name":n.name,"fid.event_type":n.entryType,"fid.processing_start":n.processingStart,"fid.start_time":n.startTime,"fid.target":((t=n.target)==null?void 0:t.tagName)||"unknown"});i.end(u(performance.timeOrigin+n.processingStart))}recordInteractionMetric(n){var t;let r=this.getWebVitalsParentContext(),i=this.tracer.startSpan(`Interaction: ${n.name}`,{startTime:u(performance.timeOrigin+n.startTime)},r);i.setAttributes({"interaction.name":n.name,"interaction.duration_ms":n.duration,"interaction.processing_start":n.processingStart,"interaction.processing_end":n.processingEnd,"interaction.input_delay_ms":n.processingStart-n.startTime,"interaction.processing_time_ms":n.processingEnd-n.processingStart,"interaction.presentation_delay_ms":n.startTime+n.duration-n.processingEnd,"interaction.target":((t=n.target)==null?void 0:t.tagName)||"unknown","interaction.interactionId":n.interactionId||0});i.end(u(performance.timeOrigin+n.startTime+n.duration))}setupLayoutShiftObserver(){var n;if(!((n=PerformanceObserver.supportedEntryTypes)!=null&&n.includes("layout-shift"))){console.debug("Layout Instability API not supported");return}try{this._layoutShiftObserver=new PerformanceObserver(n=>{try{for(let t of n.getEntries())t.hadRecentInput||(this._webVitals.layoutShifts.push({value:t.value,startTime:t.startTime,sources:t.sources}),this._webVitals.cumulativeLayoutShift+=t.value,this.recordLayoutShiftMetric(t))}catch(t){console.warn("Error in layout-shift observer callback:",t)}});this._layoutShiftObserver.observe({type:"layout-shift",buffered:!0})}catch(t){console.warn("Failed to setup layout-shift observer:",t)}}recordLayoutShiftMetric(n){var i;let r=this.getWebVitalsParentContext(),t=this.tracer.startSpan("Layout Shift",{startTime:u(performance.timeOrigin+n.startTime)},r);if(t.setAttributes({"layout_shift.value":n.value,"layout_shift.cumulative_value":this._webVitals.cumulativeLayoutShift,"layout_shift.had_recent_input":n.hadRecentInput,"layout_shift.start_time":n.startTime,"layout_shift.last_input_time":n.lastInputTime||0}),n.sources&&n.sources.length>0){let r=n.sources[0];t.setAttributes({"layout_shift.source.node":((i=r.node)==null?void 0:i.tagName)||"unknown","layout_shift.source.previous_rect":r.previousRect?`${r.previousRect.x},${r.previousRect.y},${r.previousRect.width},${r.previousRect.height}`:"","layout_shift.source.current_rect":r.currentRect?`${r.currentRect.x},${r.currentRect.y},${r.currentRect.width},${r.currentRect.height}`:""})}t.end(u(performance.timeOrigin+n.startTime+1))}getWebVitalsParentContext(){var n;return this._isSPA&&this.spans.spaRoot?o.setSpan(f.active(),this.spans.spaRoot):((n=this._webVitalsContexts)==null?void 0:n.pageLoadCtx)||f.ROOT_CONTEXT}getWebVitalsSummary(){var n;let t=null;if(this._webVitals.interactions.length>0){let i=[...this._webVitals.interactions].sort((n,t)=>t.duration-n.duration),r=this._webVitals.interactions.length>=50?Math.floor(i.length*.02):0;t=((n=i[r])==null?void 0:n.duration)||null}return{fcp:this._webVitals.firstContentfulPaint,lcp:this._webVitals.largestContentfulPaint,fid:this._webVitals.firstInputDelay,cls:this._webVitals.cumulativeLayoutShift,inp:t,longtaskCount:this._webVitals.longtasks.length,longtaskTotalDuration:this._webVitals.longtasks.reduce((n,t)=>n+t.duration,0),interactionCount:this._webVitals.interactions.length}}startSPANavigation(n,t,i){var e;this.spans.spaRoot&&!this._collectionComplete&&this.finalizeSPANavigation();this._spaStartTime=performance.now();this._collectionComplete=!1;this._spaResourcesFound=!1;this._currentUrl=i;this._latestSPAResourceEnd=0;this.spans.spaRoot=this.tracer.startSpan(`${r.SPA_SPAN}: ${n} ${i}`,{startTime:u(performance.timeOrigin+this._spaStartTime),links:[{context:(e=this.spans.pageLoad)==null?void 0:e.spanContext(),attributes:{"link.type":"follows_from"}}]},f.ROOT_CONTEXT);this.spans.spaRoot.setAttributes(nt(h({},this.getCommonAttributes()),{"ol.cortex.trace_type":`Browser: ${r.SPA_SPAN}`,"ol.cortex.spa.type":n,"ol.cortex.spa.from_url":t,"ol.cortex.spa.to_url":i,"spa.timestamp":Date.now()}))}scheduleSPAFinalization(){this._spaFinalizationTimer&&clearTimeout(this._spaFinalizationTimer);this._spaFinalizationTimer=setTimeout(()=>{this.finalizeSPANavigation()},r.FINALIZE_SPA_MS)}finalizeSPANavigation(){if(!this._collectionComplete&&this.spans.spaRoot){let n=this._latestSPAResourceEnd||performance.now();this.spans.spaRoot.end(u(performance.timeOrigin+n));this._browserMetrics&&n>this._spaStartTime&&this._browserMetrics.record(e.SPA_NAVIGATION,(n-this._spaStartTime)/1e3,this._browserMetrics.buildAttributes(cu(this._currentUrl)));this._collectionComplete=!0;this.tryFlush()}}tryFlush(){this.provider&&this.provider.forceFlush().catch(()=>{console.warn("Failed to flush spans")})}forceClose(){this.provider&&(this.recordSessionQualityMetrics(),this.spans.spaRoot&&!this._collectionComplete?this.finalizeSPANavigation():this._collectionComplete?this.tryFlush():this.finalizeRootSpan(),this._browserMetrics&&this._browserMetrics.forceFlush())}createChildSpan(n,t,i,r){if(!(t<=0)&&!(i<=0)){let f=this.tracer.startSpan(n,{startTime:u(performance.timeOrigin+t)},r);return f.end(u(performance.timeOrigin+(i||t))),f}}getCommonAttributes(){let n=new URL(window.location.href);return{"http.host":n.host,"http.scheme":n.protocol.replace(":",""),"http.url":n.href,"http.user_agent":navigator.userAgent,"ol.cortex.base_url":`${n.protocol}//${n.host}`,"ol.cortex.service_name":r.SERVICE_NAME,"ol.cortex.client_name":r.CLIENT_NAME_SHORT,"ol.cortex.service":r.SERVICE,"ol.cortex.tenant.id":r.CLIENT_NAME_SHORT,"ol.global.environment":r.DEPLOYMENT_ENVIRONMENT,"ol.cortex.page.title":document.title,"ol.cortex.page.referrer":document.referrer,"ol.cortex.page.path":n.pathname,"ol.cortex.page.query":n.search}}
216getShortenedResourceName(n){try{return new URL(n).pathname.split("/").pop()||"unknown"}catch(t){return n.length>50?n.substring(0,47)+"...":n}}classifyResource(n,t){return this._collectionComplete?"async-post-collection":n.renderBlockingStatus==="blocking"?"blocking":n.responseEnd<=t.domComplete?"non_blocking_initial":this._isSPA&&n.fetchStart>t.loadEventEnd&&this._spaStartTime-n.fetchStart<=r.SPA_RESOURCE_BUFFER_MS?"spa":"async"}},pp="otel_consecutive_failures",wp="otel_disabled_due_to_failures",bp="otel_health_check_result";vo=1024;gp=(class{constructor(n){this.spans=[];this._hasWarnedAboutFullBuffer=!1;this.exporter={"export":(t,i)=>{n.export(t,i)}}}onStart(){}onEnd(n){let t=n.startTime,i=n.endTime,u=0;if(t&&i){let n=t[0]*1e3+t[1]/1e6;u=i[0]*1e3+i[1]/1e6-n}if(!(u<=r.MIN_TRACE_DURATION_MS)){if(this.spans.length>=vo){this._hasWarnedAboutFullBuffer||(this._hasWarnedAboutFullBuffer=!0,console.warn(`Span buffer is full (${vo}), dropping spans until the next flush`));return}this.spans.push(n)}}shutdown(){return this.forceFlush()}forceFlush(){if(ao())return console.debug("Telemetry disabled due to export failures, skipping flush"),this.spans=[],Promise.resolve();if(this.spans.length===0)return Promise.resolve();let n=[...this.spans];return this.spans=[],this._hasWarnedAboutFullBuffer=!1,new Promise((t,i)=>{this.exporter.export(n,n=>{if(n.code===a.SUCCESS)lo(0),t();else{let t=n.error||new Error("Export failed");dp(t);i(t)}})})}});window.otelRun=pht})();typeof ResumableUpload=="undefined"&&(ResumableUpload=function(n){this.Params=n||{};for(var t in this.Params)this[t]=this.Params[t]},ResumableUpload.Instances={},fConfirmOngoingUploads=function(){if(Matrix3.mbPostBackRequested)return undefined;var n=ResumableUpload.GetTheFirstOnGoingUploadSession();return n&&typeof n!="undefined"?(ResumableUpload.Unloading=!0,setTimeout(function(){setTimeout(function(){ResumableUpload.Unloading=!1},1e3)},1),n.Params.Vocabularies.NavigatingAwayMessage||"placeholdermessage"):undefined},$(document).ready(function(){var n=function(n){var i,t;if(n||document.visibilityState==="hidden"&&ResumableUpload.Unloading){if(ResumableUpload.Instances&&Object.keys(ResumableUpload.Instances).length>0)for(i in ResumableUpload.Instances)t=ResumableUpload.Instances[i],t.SessionUploadCompleted||t.IsbeingCancelled||(t.IsbeingCancelled=!0,navigator.sendBeacon("API/CortexUploader_BO/v1.0/CancelUploads?UT_RecordID="+t.UploadTransactionID,{Token:t.AuthToken}))}else ResumableUpload.Unloading=!1};$(window).bind("beforeunload",fConfirmOngoingUploads);window.addEventListener("pagehide",function(t){t&&t.persisted||n(!0)});$("body").on("click",".ResumeUpload",function(){var i=$(this).find("a"),t=i.attr("data-rsu-id"),n;return t&&(n=ResumableUpload.Instances[t],n&&n.ResumePausedUpload()),!1})}));ResumableUpload.Consts={};ResumableUpload.GetTheFirstOnGoingUploadSession=function(){var t,n;if(ResumableUpload.Instances&&Object.keys(ResumableUpload.Instances).length>0)for(t in ResumableUpload.Instances)if(n=ResumableUpload.Instances[t],(!n.AcquiredAuthToken||!n.SessionUploadCompleted)&&!n.CompletedSessionProcessed&&n.CortexFiles.length>0)return n;return null};ResumableUpload.CheckAndHideUploadContainer=function(){var t=Object.keys(ResumableUpload.Instances),i=!1,n;if(t.length>0)for(n=0;n<t.length;n++)if(ResumableUpload.Instances[t[n]].IsInMinimizedMode){i=!0;break}i||$("#uploader-container").hide()};ResumableUpload.GetInstanceByVFormID=function(n){for(var t in ResumableUpload.Instances)if(ResumableUpload.Instances[t].VFormID===n)return ResumableUpload.Instances[t];return null};UploadItemStatus={Skip:"Skip",Error:"Error",ToUpload:"ToUpload",Missing:"Missing",AlreadyExists:"AlreadyExists",Duplicated:"Duplicated",Reject:"Reject",UploadCompleted:"UploadCompleted",OnProgressVerify:"OnProgressVerify",ExternallyDuplicated:"ExternallyDuplicated"};ResumableUpload.prototype={SetupContainerForMinimizedUploads:function(){this.UploadContainers=$("#uploader-container");this.UploadContainers.length!==0||this.InlineMode||(this.UploadContainers=$('<div id="uploader-container" style="opacity: 0.0"><div id="uploader-container-header"><div class="overall-progress"><span>'+this.Params.Vocabularies.ActiveUploadLabel+'<\/span><\/div><div class="actions"><a id="uploader-container-toggle-action"><i class="fa fa-chevron-down"><\/i><\/a><\/div><\/div><div id="uploader-container-content"><span><\/span><\/div><\/div>').appendTo($("#PopupLayer")));this.UploadContainersHeader=$("#uploader-container-header");this.UploadContainersContent=$("#uploader-container-content");this.PopupHeader=$('div[id="'+this.RootVFormID+Popup.Const.HEADER_SUFFIX+'"]');var n=this,t=$("#uploader-container-toggle-action");t.off("click").click(function(){n.UploadContainersContent.hasClass("content-minimized")?($("i",t).addClass("fa-chevron-down"),$("i",t).removeClass("fa-chevron-up")):($("i",t).removeClass("fa-chevron-down"),$("i",t).addClass("fa-chevron-up"));n.UploadContainersContent.toggleClass("content-minimized");n.UploadContainersContent.parent().toggleClass("content-minimized")});
216this.WrapperScrollContainer=$('<div class="PopupScrollContainer WrapperContainer" style="display: none"><\/div>').appendTo(this.UploadContainersContent);Matrix3.moPopupTable[n.RootVFormID]&&(Matrix3.moPopupTable[n.RootVFormID].moWrapperJGlobalContainer=this.WrapperScrollContainer);typeof UploadContainerIndexWatcher!="undefined"&&window.UploadContainerIndexWatcher||(window.UploadContainerIndexWatcher=setInterval(function(){var f=$(".DamView_SelectionBar"),t,n,i,r,u,e,o;f.length>0&&(t=f.filter(function(){return Utils.IsInTopLevelPopup($(this).attr("id"))}),n=$("#uploader-container"),t&&t.length>0&&t.is(":visible")?(i=t.parent(),r=i.css("z-index")-1,r!=n.css("z-index")&&(n.css("z-index",r),u=i.closest(".PopupC"),u.length>0&&(n.appendTo(u),n.addClass("Moved")))):(n.css("z-index",""),n.removeClass("Moved"),n.appendTo($("#PopupLayer"))));e=Utils.GetPopupIds();o=$(".MinimizablePopup");e.length===$(".MinimizablePopup:has(div)").length&&o.each(function(n,t){var i=$(t);typeof i.attr("original-z-index")!="undefined"&&i.css("z-index",i.attr("original-z-index"))})},333))},InitialSetup:function(){this.AuthToken=null;this.AuthAccessKey=null;this.DisplayOS=null;this.CortexFiles=[];this.FileTypes=[];this.UploadTransactionID=null;this.ForcedSemiSync=!1;this.UserID="";this.VFormID="";this.RegisterItemStarted=!1;this.MaxFileNumberToRegister=256;this.Resumable=null;this.TotalCompletedSize=0;this.UploadProgressWeight=.7;this.OverallProgressCreepCapPct=85;this.OverallProgressCreepBaseTickMs=800;this.OverallProgressCreepPerAssetTickMs=5;this.OverallProgressCreepMaxTickMs=2e3;this.AlreadyExistsCount=0;this.DuplicatedCount=0;this.ExternallyDuplicatedCount=0;this.SuccessItemCount=0;this.FailureCount=0;this.HasPostUpload=!0;this.StatusToUpload="ToUpload";this.CompletedUploadItemsCount=0;this.WaitMessageForSessionComplete=null;this.ForceAsyncInlineProcess=!1;this.HasFinishedRegisteringUploadItems=!1;for(var n in this.Params)this[n]=this.Params[n]},GetTotalUploadSize:function(){var n=this,t;return n.TotalUploadSize||(t=0,n.CortexFiles.forEach(function(i){i.fileStatus!==undefined&&i.fileStatus.FileStatus===n.StatusToUpload&&(t+=i.length)}),n.TotalUploadSize=t),n.TotalUploadSize},GetPostProcessingProgressWeight:function(){return 1-this.UploadProgressWeight},UpdateOverallProgressBar:function(){var n=this,r,t,u,i,e,f,o,s;try{r=n.GetTotalUploadSize();t=Math.min(100,Math.round(n.TotalCompletedSize/r*100));t>n.LastUpdatedProgress?n.LastUpdatedProgress=t:t=n.LastUpdatedProgress;(n._DisplayedProgress==null||t>n._DisplayedProgress)&&(n._DisplayedProgress=t);u=n.RootVForm.find(".progress-bar");i=n.RootVForm.find(".progress-container");u.css({width:n._DisplayedProgress+"%"});$(".progress-text-percent-all",i).text(""+n._DisplayedProgress+"%");$(".progress-text-size-all",i).text(n.HumanizeFileSize(r));e=Math.round(n.UploadProgressWeight*100);f=n.OverallProgressCreepCapPct;n.LastUpdatedProgress>=e&&n.LastUpdatedProgress<100&&(n._OverallProgressCreepTimer||(o=n.CortexFiles&&n.CortexFiles.length||0,s=Math.min(n.OverallProgressCreepMaxTickMs,n.OverallProgressCreepBaseTickMs+o*n.OverallProgressCreepPerAssetTickMs),n._OverallProgressCreepTimer=setInterval(function(){if(!(n.LastUpdatedProgress>=100)&&!(n._DisplayedProgress>=f)){n._DisplayedProgress=Math.min(f,n._DisplayedProgress+1);var t=n.RootVForm.find(".progress-bar"),i=n.RootVForm.find(".progress-container");t.css({width:n._DisplayedProgress+"%"});$(".progress-text-percent-all",i).text(""+n._DisplayedProgress+"%")}},s)));n.LastUpdatedProgress>=100&&n._OverallProgressCreepTimer&&(clearInterval(n._OverallProgressCreepTimer),n._OverallProgressCreepTimer=null,n._DisplayedProgress=100,u.css({width:"100%"}),$(".progress-text-percent-all",i).text("100%"))}catch(h){Matrix3.LogError(h,!0)}},TrackUploadProgress:function(n){var t=this,e=t.Resumable.progress(),s=t.GetTotalUploadSize()*e,r=Date.now()-t.LastUploadProgressCallback,o,i;if(r&&t.LastUploadProgressCallback&&(t.LastUploadProgressUpdated||!(r<t.ProgressTrackingInterfaceUpdate))&&(!n||!(r<t.ProgressTrackingInterval))&&(o=!t.Resumable.isUploading()||t.TrackingIsPaused,!o||t.SkipTrackingUpload)){var l=Math.max(this.EffectiveUploadTime,r),h=Math.max((s-t.LastTotalUploadedBytes)/r*1e3,0),u=t.AccumulatedAverageSpeed>0?t.AccumulatedAverageSpeed:h;u=t.SpeedSmoothingFactor*h+(1-t.SpeedSmoothingFactor)*u;var a=s,v=t.GetTotalUploadSize()*(1-e),y=t.GetTotalUploadSize()*(e/l)*1e3,c=t.SpeedSmoothingFactor*u+(1-t.SpeedSmoothingFactor)*y,f=v/c*(1+t.RemainingUploadTimeOffset);!isNaN(f)&&isFinite(f)&&f>1&&(this.EffectiveUploadTime+=Date.now()-this.LastUploadProgressCallback,t.RemainingUploadTimeElement.show(),t.LastUploadProgressCallback=Date.now(),t.LastTotalUploadedBytes=a,t.AccumulatedAverageSpeed=u,(!t.LastUploadProgressUpdated||Date.now()-t.LastUploadProgressUpdated>t.ProgressTrackingInterfaceUpdate)&&(o&&t.HidePausedUploadProgress||(i=t.RemainingUploadTimeElementHTMLTemplate,i=i.replace("{%=o.remainingTime%}",t.HumanizeTimeDuration(f)),i=i.replace("{%=o.averageSpeed%}",t.HumanizeFileSize(c,!t.TrackingUsingBitAsUnit,0)),t.RemainingUploadTimeElement.text(i),t.LastUploadProgressUpdated=Date.now())));setTimeout(function(){t.TrackUploadProgress(!0)},this.ProgressTrackingInterval)}},PauseUploadProgressTracking:function(){this.TrackingIsPaused||(this.EffectiveUploadTime+=Date.now()-this.LastUploadProgressCallback);this.TrackingIsPaused=!0;this.LastUploadProgressCallback=Date.now()},StopUploadProgressTracking:function(){this.RemainingUploadTimeElement.hide();this.LastUploadProgressCallback=Date.now()},StartUploadProgressTracking:function(){this.TrackingIsPaused=!1;this.EffectiveUploadTime=this.EffectiveUploadTime||0;this.ProgressTrackingInterval=this.ProgressTrackingInterval||5e3;this.ProgressTrackingInterfaceUpdate=this.ProgressTrackingInterfaceUpdate||2e3;this.SpeedSmoothingFactor=this.SpeedSmoothingFactor||.01;this.LastUploadProgressCallback=this.LastUploadProgressCallback||null;this.LastUploadProgressUpdated=this.LastUploadProgressUpdated||null;this.AccumulatedAverageSpeed=this.AccumulatedAverageSpeed||0;this.LastTotalUploadedBytes=this.LastTotalUploadedBytes||null;this.HidePausedUploadProgress=this.HidePausedUploadProgress===!0||this.HidePausedUploadProgress==="true";this.RemainingUploadTimeOffset=this.RemainingUploadTimeOffset||.1;this.RemainingUploadTimeElementHTMLTemplate=this.Vocabularies.RemainingUploadTimeElementHTMLTemplate||"{%=o.remainingTime%} left ({%=o.averageSpeed%}/s)";this.LastUploadProgressCallback=Date.now();this.RemainingUploadTimeElement.show()},SetupGUI:function(){var n=this,t;Matrix3.moPopupTable[n.RootVFormID]&&(Matrix3.moPopupTable[n.RootVFormID].mbIsForceCenteringEnabled=!0);this.MaskId=this.RootVFormID+Popup.Const.MASK_SUFFIX;this.PopupId=this.RootVFormID+Popup.Const.CONTAINER_SUFFIX;this.MaskId&&this.MaxFilesCount!==1&&!this.ForceShowMask&&$E(this.MaskId).hide();this.PopupElement=$E(this.PopupId);this.PopupContainer=this.PopupElement.parent();n.InlineMode||(this.MaskId&&this.MaxFilesCount!==1&&$E(this.MaskId).hide(),this.PopupElement.css({"z-index":999,position:"fixed"}),this.PopupContainer.addClass("MinimizablePopup"));t=function(){var t=parseInt(n.PopupContainer.css("z-index")),u=!1,i,r;for(i in ResumableUpload.Instances)r=parseInt(ResumableUpload.Instances[i].PopupContainer.css("z-index")),i!==n.InstanceID&&r>t&&(t=r,u=!0);u&&(n.PopupContainer.css("z-index",t+1),n.PopupContainer.attr("original-z-index",t+1))};n.PopupElement.mousedown(t);this.PopupContainer.hasClass(Popup.Const.SCROLLABLE_CONTAINER_CLASS)!==!0||n.InlineMode||(this.PopupContainer.css("overflow","visible !important"),this.PopupContainer.width(1),this.PopupContainer.height(1));Matrix3.moPopupTable[this.RootVFormID]&&Matrix3.moPopupTable[this.RootVFormID].moJNode.draggable("option","containment","window");n.UploadItemContainer=n.RootVForm.find(".resumable-list:first");n.RemainingUploadTimeElement=this.RootVForm.find(".remaining-time-text");$(document).ready(function(){var i=$('[id="'+n.RootVFormID+':_Close"]'),t=$('[id="'+n.VFormID+':MinimizeBtn"]');
216n.InlineMode||(t.prependTo(n.PopupHeader),t.load("Include/Resumable/ToggleButton.svg"),t.removeClass("InvisibleC"),t.click(function(i){t.hasClass("Disabled")||(n.ToggleMinimizeMaximizeMode(),i.stopPropagation(),n.UploadItemContainer.toggle())}.bind(n)));$(".MinimizeUploadBtnFake").hide();i.click(function(){n.IsInMinimizedMode&&!n.CompletedShown&&(n.ToggleMinimizeMaximizeMode(),n.UploadItemContainer.toggle());ResumableUpload.CheckAndHideUploadContainer()});typeof n.PopupContainer.attr("original-z-index")!="undefined"&&n.PopupContainer.attr("original-z-index")||n.PopupContainer.attr("original-z-index",parseInt(n.PopupContainer.css("z-index")))})},ToggleResizeButton:function(){var n=$(".MaximizedPath",this.PopupElement),t=$(".MinimizedPath",this.PopupElement);this.IsInMinimizedMode?(n.show(),t.hide()):(n.hide(),t.show())},MinimizeUploadPopup:function(){var n=this,u=$('[id="'+n.RootVFormID+':PreUploadSettingsPnl"]'),t=$(".ResumableUpload_V2_VForm",n.PopupElement).parent(),r;!u[0]&&t[0]&&(this.miMaximizedUploadPnlYOff=t[0].miYOff,t[0].miYOff+=t[0].moParent.GetPaddingTop()+29,t[0].ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(t[0]),PositionMgr.GetInstance().CalculatePosition());var f=$('[id="'+n.RootVFormID+':PostUploadResultsPnl"]'),e=$(".DefaultPopupClass",n.PopupElement),i=$(".PopupHeaderPnl",n.PopupElement),o=$(".ResumableUpload_V2_VForm",n.PopupElement);try{ControlMgr.GetInstance().GetAllPositionItems()[e.attr("id")].mbForcedSkipUpdatingStyle=!0;ControlMgr.GetInstance().GetAllPositionItems()[o.attr("id")].mbForcedSkipUpdatingStyle=!0}catch(s){}this.IsInMinimizedMode=!0;u.css("opacity",0);i.data("maximized-width",i.outerWidth());i.css("width","");r=$('[id="'+n.VFormID+':ProgressPnl"]');$(".resumable-progress-normal",r).hide();$(".resumable-progress-minimized",r).show().removeClass("InvisibleC");n.ToggleResizeButton();n.UploadContainersContent.scrollTop(n.PopupElement.offset().top);f.css("opacity",0);$('[id$="_Mirror"]',n.PopupElement).hide()},MaximizeUploadPopup:function(){var n=this,c=$('[id="'+n.RootVFormID+':PreUploadSettingsPnl"]'),y=$('[id="'+n.RootVFormID+':PostUploadResultsPnl"]'),p=$(".DefaultPopupClass",n.PopupElement),u=$(".PopupHeaderPnl",n.PopupElement),w=$(".ResumableUpload_V2_VForm",n.PopupElement),t=$(".ResumableUpload_V2_VForm",n.PopupElement).parent(),i,r,f,s,a,v,h;n.IsInMinimizedMode=!1;try{ControlMgr.GetInstance().GetAllPositionItems()[p.attr("id")].mbForcedSkipUpdatingStyle=!1;ControlMgr.GetInstance().GetAllPositionItems()[w.attr("id")].mbForcedSkipUpdatingStyle=!1}catch(b){}i=0;r=0;n.LastPositionOnScreen?(i=n.LastPositionOnScreen.left,r=n.LastPositionOnScreen.top):(i=(Utils.GetViewportWidth()-780)/2,r=(Utils.GetViewportHeight()-540)/2);n.PopupElement.offset({left:i,top:r});n.ToggleResizeButton();t.offset(n.LastUploadPositionOnScreen);f=$('[id="'+n.VFormID+':ProgressPnl"]');$(".resumable-progress-normal",f).show();$(".resumable-progress-minimized",f).hide();c.css("opacity",1);y.css("opacity",1);u.data("maximized-width")&&u.width(u.data("maximized-width"));var e=Utils.GetPopupIds(),l=n.PopupContainer,o=parseInt(l.css("z-index"));if(e.length>1){s=!1;for(a in e)v=$E(e[a]).closest(".PopupC"),h=parseInt(v.css("z-index")),h>o&&(o=h,s=!0);s&&l.css("z-index",o+1)}$('[id$="_Mirror"]',n.PopupElement).show();!c[0]&&t[0]&&(t[0].miYOff=this.miMaximizedUploadPnlYOff||30,t[0].ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(t[0]),PositionMgr.GetInstance().CalculatePosition())},ToggleMinimizeMaximizeMode:function(){var n=this,r=$(".ResumableUpload_V2_VForm",n.PopupElement).parent(),i=$(".DefaultPopupClass",n.PopupElement),t;n.IsInMinimizedMode||(n.LastPositionOnScreen=n.PopupElement.offset(),n.LastSizeOnScreen={width:i.width(),height:i.height(),completedShown:n.CompletedShown},n.LastUploadPositionOnScreen=r.offset());n.PopupElement.toggleClass("minimized-mode");n.IsInMinimizedMode?(n.PopupElement.appendTo(n.PopupContainer),n.WrapperScrollContainer.hide()):(n.WrapperScrollContainer.show(),n.PopupElement.appendTo(n.WrapperScrollContainer));t=$('[id="uploader-container"]');$(".minimized-mode").length===0?t.hide():(t.css("opacity",1),t.show());n.IsInMinimizedMode?n.MaximizeUploadPopup():n.MinimizeUploadPopup()},ResumePausedUpload:function(n){var t=this;t.Resumable.pause();setTimeout(function(){t.StartUploadProgressTracking();t.TrackUploadProgress();t.Resumable.upload()},n||50);t.RootVForm.find(".resumable-progress .progress-resume-link").hide();t.RootVForm.find(".resumable-progress .progress-pause-link").show();t.RootVForm.find(".uploading-icon").css("animation-name","spin")},UpdateRegisterUploadItemsProgress:function(n,t){for(var r,i=this,u=n;u<t;++u)i.totalRegisteredItems++,i.totalRegisteredSize+=i.CortexFiles[u].length;r=i.totalRegisteredItems==1?i.Params.Vocabularies.RegisteringUploadItemsSingularMsg:i.Param
216s.Vocabularies.RegisteringUploadItemsMsg;r=r.replace("[CURRENT_COUNT]",i.totalRegisteredItems).replace("[TOTAL_COUNT]",i.CortexFiles.length).replace("[CURRENT_SIZE]",i.HumanizeFileSize(i.totalRegisteredSize)).replace("[TOTAL_SIZE]",i.HumanizeFileSize(this.Resumable.getSize()));i.RootVForm.find(".progress-file-fetching-metadata").html(r)},SetupEvents:function(){var n=this,t=n.RootVForm.find(".resumable-browse")[0];if(t){n.Resumable.assignDrop(document.body);n.Resumable.assignBrowse(t);n.ResumableProgressContainer=n.RootVForm.find(".resumable-progress");n.Resumable.on("fileAdded",function(t){t.Md5ComputationPromise=n.FileImmediatelyDownloadable?n.ComputeFileMd5(t.file):Promise.resolve("")});n.Resumable.on("startProgress",function(){var t,f,i,r,u,e;n.DataToReset=n.DataToReset||{};n.ResumableProgressContainer.not(".resumable-progress-minimized").show();n.RootVForm.find(".resumable-progress .progress-resume-link").hide();n.RootVForm.find(".resumable-progress .progress-pause-link").show();t=n.RootVForm.find(".resumable-progress-panel");n.DataToReset.ProgressPanelCSS={"border-bottom":t.css("border-bottom")};t.css("border-bottom","1px solid #E2E2E9");n.InlineMode||(f=$('[id="'+n.VFormID+':MinimizeBtn"]'),f.removeClass("InvisibleC Disabled"));n.ShowFullMode=n.ResumableProgressContainer.find(".action-extend");n.ShowCompactMode=n.ResumableProgressContainer.find(".action-compact");i=function(t){return n.CompactDisplayMode=!1,t.stopPropagation(),t.preventDefault(),n.UpdateLargeSizeVisibleItems(!0),!1};n.DataToReset.ShowFullModeOnClick=i;n.ShowFullMode.click(i);r=function(t){return n.CompactDisplayMode=!0,t.stopPropagation(),t.preventDefault(),n.UpdateLargeSizeVisibleItems(!1),!1};n.DataToReset.ShowCompactModeOnClick=r;n.ShowCompactMode.click(r);n.UploadItemContainer.show();n.Resumable.unAssignDrop(document.body);u=n.RootVForm.find(".resumable-drop").find("div[id*=':PreUploadPnl']");n.DataToReset.PreUploadPanelCSS={display:u.css("display")};u.css("display","none");n.RootVForm.find(".prepare-text").show();n.RootVForm.find(".progress-text").hide();n.RootVForm.find(".resumable-progress .progress-pause-link").hide();e=n.Params.Vocabularies.FetchingUploadMsg||'<strong><span>Listing upload items<\/span><i class="fa fa-refresh fa-spin" style="margin-left:8px;"><\/i><\/strong>';n.Params.Vocabularies.RegisteringUploadItemsMsg=n.Params.Vocabularies.RegisteringUploadItemsMsg||'<strong><span>Registering upload items: [CURRENT_COUNT] files ([CURRENT_SIZE])<\/span><i class="fa fa-refresh fa-spin" style="margin-left:8px;"><\/i><\/strong>';n.RootVForm.find(".progress-file-fetching-metadata").html(e).show();n.RootVForm.find(".warning-large-upload").hide();n.RootVForm.find(".warning-large-upload").tipsy()});n.Resumable.opts.fileTypeErrorCallback=function(){};n.PopupElement.find(".PopupCloseC").click(function(){return n.CompletedSessionProcessed||n.Resumable.pause(),!1});n.UploadItemTables={};n.UploadItemListHTML="";n.ItemHTMLTemplate='<li class="resumable-file resumable-file-{%=o.uniqueIdentifier%}"><span title="{%=o.displayName%}" class="resumable-file-name">{%=o.displayName%}<\/span><span class="resumable-file-size">{%=o.displayFilesize%}<\/span><span class="resumable-file-progress"><\/span><span class="resumable-file-status"><\/span><\/li>';n.Resumable.on("fileAdded",function(t){var u,f,i,r;if(!!n.Params.RelativePathSkipPatterns&&(u=n.Params.RelativePathSkipPatterns.split("\n"),f=u.some(function(n){if(!n.trim())return!1;var i=new RegExp(n.trim());return!!t&&!!t.file&&!!t.file.fullPath&&i.test(t.file.fullPath)}),f)){n.Resumable.removeFile(t);return}i={uniqueIdentifier:t.uniqueIdentifier,fileName:t.fileName,relativePath:t.relativePath,length:t.size,blob:t,processed:!1,retryable:!1,lastModified:t.lastModified||(t.lastModifiedDate?t.lastModifiedDate.getTime():"")};iFilePosition=n.CortexFiles.length;n.CortexFiles.push(i);i.displayName=(t.relativePath!==undefined&&t.relativePath!==""?t.relativePath+"/":"")+t.fileName;i.displayFilesize=n.HumanizeFileSize(i.length);r=n.ItemHTMLTemplate;r=r.replace("{%=o.uniqueIdentifier%}",i.uniqueIdentifier);r=r.replaceAll("{%=o.displayName%}",n.EscapeHtml(i.displayName));r=r.replace("{%=o.displayFilesize%}",i.displayFilesize);n.UploadItemListHTML+=r});n.Resumable.on("fileRetry",function(t){var i=t.xhrStatus,r,u,o,f;if(n.Resumable.chunkRetryInterval=Math.min(n.Resumable.chunkRetryInterval*1.5,n.maxChunkRetryInterval),t.sourceFileMissing=!1,t.sourceFileUnReadable=!1,t.connectionFailed=!1,n.S3UploadConfiguration.IsUploadingDirectlyToS3&&i!==0){if(n.Param
216s.LogOnError&&Matrix3.LogError("Error uploading file: "+t.uniqueIdentifier+" - "+i),t.connectionFailed=!0,r=n.GetCortexFileBasedOnUniqueIdentifier(t.uniqueIdentifier),r!==null&&!t.isRefreshingPresignedUrls){t.isRefreshingPresignedUrls=!0;var s=n.Params.presignedURLsRetryLimit||3,h=n.Params.presignedURLsRetryInterval||1e3,e=0;(function c(){$.ajax({type:"GET",url:"webapi/upload/item/getPresignedUrl_4DA_v1",accept:"application/json",dataType:"json",headers:n.CustomHeaders,data:{UploadItemID:r.fileStatus.UIRecordId,TotalLength:r.length,PartSize:r.blob.opts.chunkSize||n.Resumable.opts.chunkSize,UseAccelerateEndpoint:n.Params.UseAccelerateEndpoint},success:function(i){for(var f=r.blob.opts.chunkSize||n.Resumable.opts.chunkSize,e=Math.ceil(r.length/f),u=0;u<e;u++)n.S3UploadConfiguration.URLsByChunk[n.S3URLPrefix+r.uniqueIdentifier+"."+u]=i.urls[u];setTimeout(function(){t.isRefreshingPresignedUrls=!1},5e3)},error:function(){e++;e<=s?setTimeout(function(){c()},h*e):t.isRefreshingPresignedUrls=!1}})})()}}else window.FileReader&&(u=new FileReader,o=t.file.slice(0,1),u.onerror=function(){u.error&&(u.error.name==="NotFoundError"||u.error.code===8?t.sourceFileMissing=!0:t.sourceFileUnReadable=!0)},u.readAsArrayBuffer(o));n.S3UploadConfiguration.IsUploadingDirectlyToS3||t.sourceFileMissing||t.sourceFileUnReadable||(i===0||i===503?n.isPingingServer||(n.isPingingServer=!0,n.Resumable.pause(),function l(){$.ajax({url:"API/QualityControl/v1.0/Ping",type:"GET",headers:n.CustomHeaders,success:function(){n.ResumePausedUpload(n.unreachableRetryInterval);n.Resumable.chunkRetryInterval=n.chunkRetryInterval;n.isPingingServer=!1},dataType:"json",complete:function(i){i&&i.status===200?(n.ResumePausedUpload(n.unreachableRetryInterval),n.Resumable.chunkRetryInterval=n.chunkRetryInterval,t.isPinging=!1):setTimeout(function(){l()},n.unreachableRetryInterval)}})}()):i&&n.IsAuthenticationError(i)&&!n.authRequesting?(n.authRequesting=!0,n.Resumable.pause(),f=function(){n.ResumePausedUpload(n.unreachableRetryInterval);n.authRequesting=!1;n.Resumable.chunkRetryInterval=n.chunkRetryInterval},n.HandleAuthenticationError(i,null,f,f,f)):i&&n.IsForbiddenError(i)&&(t.sourceFileForbidden=!0))});n.Resumable.on("emptyDirectory",function(){n.isUploadComplete=!0;n.StopUploadProgressTracking();n.ProcessUploadSessionComplete();n.RootVForm.find(".resumable-progress .prepare-text").css({display:"none"});n.RootVForm.find(".resumable-progress .progress-file-count-text").css({display:"inline"});n.RootVForm.find(".resumable-progress .progress-file-count-text").html(n.Params.Vocabularies.SkippedEmptyDirectories);n.RootVForm.find(".resumable-progress .progress-text").css({display:"block"});n.RootVForm.find(".resumable-progress .progress-bar").css({width:"100%"});n.RootVForm.find(".progress-text-percent-all").text("100%");Matrix3.ShowNotification(n.Params.Vocabularies.SkippedEmptyDirectories,{notificationType:"warning"})});n.Resumable.on("allFilesAdded",function(){n.Params.ShowConfirmationPopup||Matrix3.AddEvent(n.VFormID,"UploadStarted",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","",null,null,null,!1,null,!1,null,null,!1,null,!1,null);n.StartUploadingAddedFiles()});n.Resumable.on("afterAppendFiles",function(t,i){if(i.length>0){var r=t.length>0,u={FileTypes:n.FileTypes,HasValidFiles:r};Matrix3.AddEvent(n.VFormID,"ShowFileTypeErrorDialog",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(u),"","",null,null,null,!1,null,!1,null,null,!1,null,!1,null)}});n.Resumable.on("chunkingStart",function(t){if(!(t.size/n.Resumable.opts.chunkSize<n.maximumCompliantChunkCount)){var i=Math.ceil(t.size/n.maximumCompliantChunkCount),r=Math.max(n.BYTE_MASK_UNIT,Math.ceil(i/n.BYTE_MASK_UNIT)*n.BYTE_MASK_UNIT);t.opts.chunkSize=clamp(r,n.minimumCompliantChunkSize,n.maximumCompliantChunkSize)}});n.Resumable.on("chunkingComplete",function(){});n.Resumable.on("pause",function(){n.RootVForm.find(".resumable-progress .progress-resume-link").show();n.RootVForm.find(".resumable-progress .progress-pause-link").hide();n.RootVForm.find(".uploading-icon").css("animation-name","none");n._OverallProgressCreepTimer&&(clearInterval(n._OverallProgressCreepTimer),n._OverallProgressCreepTimer=null);n.PauseUploadProgressTracking()});n.Resumable.on("complete",function(){n.MarkUploadSessionComplete()});n.Resumable.on("fileSuccess",function(t){try{n.UploadItemTables[t.uniqueIdentifier].item.addClass("file-progress-processing");n.UploadItemTables[t.uniqueIdentifier].item.removeClass("file-progress");n.UploadItemTables[t.uniqueIdentifier].progress.html("100%");n.TotalCompletedSize+=t.size*n.UploadProgressWeight;n.UpdateOverallProgressBar();n.CompleteUploadItem(t)}catch(i){Matrix3.LogError(i,!0)}});n.Resumable.on("fileError",function(t,i){n.UploadItemTables[t.uniqueIdentifier].item.addClass("file-error");n.UploadItemTables[t.uniqueIdentifier].item.removeClass("file-progress");var r=n.GetCortexFileBasedOnUniqueIdentifier(t.uniqueIdentifier);t.connectionFailed?(n.UploadItemTables[t.uniqueIdentifier].connectionFailed||(n.UploadItemTables[t.uniqueIdentifier].connectionFailed=!0,n.FailureCount++,n.CompletedUploadItemsCount++,n.TotalCompletedSize+=t.size,n.UpdateOverallProgressBar()),r!=null&&(r.fileStatus.uploadStatus=UploadItemStatus.Error),n.FeedbackOnError("CONNECTION_FAILED",r,i)):t.sourceFileMissing||t.sourceFileUnReadable?((!n.UploadItemTables[t.uniqueIdentifier].sourceFileMissing||n.UploadItemTables[t.uniqueIdentifier].sourceFileUnReadable)&&(n.UploadItemTables[t.uniqueIdentifier].sourceFileMissing=t.sourceFileMissing,n.UploadItemTables[t.uniqueIdentifier].sourceFileUnReadable=t.sourceFileUnReadable,n.FailureCount++,n.CompletedUploadItemsCount++,n.TotalCompletedSize+=t.size,n.UpdateOverallProgressBar()),t.sourceFileMissing&&n.FeedbackOnError("SOURCE_FILE_MISSING",r,i),t.sourceFileUnReadable&&n.FeedbackOnError("SOURCE_FILE_UNREADABLE",r,i),r!=null&&(r.processed=!0,r.sourceFileMissing=t.sourceFileMissing,r.sourceFileUnReadable=t.sourceFileUnReadable,r.fileStatus.uploadStatus=UploadItemStatus.Error)):t.sourceFileForbidden?(r.fileStatus.FileStatus=UploadItemStatus.Reject,r.fileStatus.StatusReason="This file type was blocked because it is potentially dangerous",n.AddOrExcludeSpecificFile(r)):n.FeedbackOnError("UNKNOWN_ERROR",r,i);n.UpdateLargeSizeVisibleItems();n.ProcessUploadSessionComplete()});n.Resumable.on("fileProgress",function(t){var i,s,c,e,u,o,f;try{ResumableUpload.Unloading=!1;i=n.UploadItemTables[t.uniqueIdentifier];t.uploadStarted||(n.UploadItemTables[t.uniqueIdentifier].item.addClass("file-progress"),t.uploadStarted=!0,i.item.length>0&&i.item[0].parentNode.prepend(i.item[0]),i.status.html(n.SpinnerIcon),n.UpdateLargeSizeVisibleItems());n.TrackUploadProgress();s=Math.floor(t.progress()*100);i.progress.html(s+"%");var h=n.GetTotalUploadSize(),l=t.progress()*t.size*n.UploadProgressWeight,r=Math.min(100,Math.round((l+n.TotalCompletedSize)/h*100));r>n.LastUpdatedProgress?n.LastUpdatedProgress=r:r=n.LastUpdatedProgress;c=n.RootVForm.find(".progress-bar");e=n.RootVForm.find(".progress-container");c.css({width:r+"%"});$(".progress-text-percent-all",e).text(""+r+"%");$(".progress-text-size-all",e).text(n.HumanizeFileSize(h));u=0;
216n.CortexFiles.forEach(function(t){t.fileStatus!==undefined&&t.fileStatus.FileStatus===n.StatusToUpload&&t.blob&&t.blob._prevProgress>0&&(u+=1)});o=$(".progress-file-count-text",n.PopupElement);o.show();f=n.CortexFiles.length===1?n.Params.Vocabularies.FileCountLabel:n.Params.Vocabularies.FileCountPluralLabel;f=f.replace("[UPLOADING_FILE_COUNT]",""+(u===0?1:u)).replace("[ALL_FILE_COUNT]",""+n.CortexFiles.length);o.html(f)}catch(a){Matrix3.LogError(a,!0)}});n.Resumable.on("cancel",function(t){var i=n.UploadItemTables[t.uniqueIdentifier];i&&i.progress.html(n.Params.Vocabularies.CanceledLabel);n.CancelUploadSession&&n.CancelUploadSession(t)});n.Resumable.on("uploadStart",function(){n.RootVForm.find(".prepare-text").hide();n.RootVForm.find(".progress-text").show();n.RootVForm.find(".progress-file-fetching-metadata").hide();n.UpdateLargeSizeVisibleItems();n.RootVForm.find(".resumable-progress .progress-resume-link").hide();n.RootVForm.find(".resumable-progress .progress-pause-link").show();n.CortexFiles.forEach(function(t){t.processed||n.UploadItemTables[t.uniqueIdentifier].icon.css("animation-name","spin")});n.StartUploadProgressTracking()});n.TrackUploadProgress()}},Cleanup:function(){var n=this;n.Resumable.unAssignDrop(document.body);n._OverallProgressCreepTimer&&(clearInterval(n._OverallProgressCreepTimer),n._OverallProgressCreepTimer=null)},StartUploadingAddedFiles:function(){var n=this,t;n.CortexFiles.length>n.CompactDisplayThreshold&&(n.LargeSizeUploadMode=!0,n.CompactDisplayMode=!0,n.ResumableProgressContainer.addClass("large-upload"));n.UploadItemContainer.append(n.UploadItemListHTML);t=0;n.CortexFiles.forEach(function(i){n.UploadItemsByUniqueID[i.uniqueIdentifier]=i;var r=n.RootVForm.find(".resumable-file-"+i.uniqueIdentifier+":first");n.UploadItemTables[i.uniqueIdentifier]={item:r,status:r.find(".resumable-file-status:first"),progress:r.find(".resumable-file-progress:first"),icon:r.find(".uploading-icon:first")};++t>=n.CompactDisplayThreshold&&r.hide()});n.UpdateLargeSizeVisibleItems=function(t){var f,i,r,u,e;try{n.LargeSizeUploadMode&&(f=!t&&n.CompactDisplayMode,f?(n.ShowCompactMode.hide(),n.ShowFullMode.show(),i=n.RootVForm.find(".resumable-file.file-error"),i.show(),r=n.RootVForm.find(".resumable-file.file-progress:not(.file-error,.file-complete)"),r.show(),u=n.RootVForm.find(".resumable-file:not(.file-error,.file-progress)"),u.hide(),e=Math.max(n.CompactDisplayThreshold-i.length-r.length,0),u.slice(0,e).show()):(n.ShowCompactMode.show(),n.ShowFullMode.hide(),n.RootVForm.find(".resumable-file").show()))}catch(o){Matrix3.LogError(o,!0)}};n.RootVForm.find(".progress-pause-link").off("click").click(function(){return n.Resumable.pause(),!1});n.RootVForm.find(".progress-resume-link").off("click").click(function(){return n.ResumePausedUpload(),!1});n.RootVForm.find(".progress-cancel-link").off("click").click(function(){return n.Resumable.cancel(),!1});n.RegisterUploadItems(n.UploadTransactionID);n.RootVForm.find(".resumable-drop > .BG").addClass("uploading")},MarkUploadSessionComplete:function(n){var t=this;t.isUploadComplete=!0;$(".progress-file-count-text",t.PopupElement).hide();t.RootVForm.find(".warning-large-upload").hide();t.RootVForm.find(".resumable-progress .progress-resume-link, .resumable-progress .progress-pause-link, .resumable-progress .progress-cancel-link").hide();t.RootVForm.find(".resumable-progress .progress-inner-text").html(t.Params.Vocabularies.ProgressProcessingLabel);t.RootVForm.find(".progress-existing-file-count").hide();
216t.UpdateLargeSizeVisibleItems();t.StopUploadProgressTracking();n||t.ProcessUploadSessionComplete()},RegisterUploadItems:function(n){var i=0,t=this,r;for(t.RootVForm.find(".progress-file-fetching-metadata").show(),t.totalRegisteredItems=0,t.totalRegisteredSize=0,t.UpdateRegisterUploadItemsProgress(0,Math.min(this.MaxFileNumberToRegister,t.CortexFiles.length)),t.totalRegisteredItems=0,t.totalRegisteredSize=0;i<t.CortexFiles.length;)r=Math.min(i+this.MaxFileNumberToRegister,t.CortexFiles.length),this.RegisterUploadItemInBatch(n,i,r),i=r},SetStatusForUploadItemsWithMissingSource:function(){var n=[],t=this;t.CortexFiles.forEach(function(t){(t.sourceFileMissing||t.sourceFileUnReadable)&&n.push(t.fileStatus.UIRecordId)});n.length>0&&$.ajax({type:"POST",url:"webapi/upload/item/markItemsFileMissing_213_v1",contentType:"application/json",headers:t.CustomHeaders,data:JSON.stringify({Transaction:t.UploadTransactionID,UploadItemRecordIDs:n})})},NotifyRegisterUploadItemsFinished:function(n){var r=this.Params.completeRegisterRetryLimit||1,u=this.Params.completeRegisterRetryInterval||1e3,t=0,i=this;$.ajax({type:"POST",url:"API/CortexUploader_BO/v1.0/CompleteUploadItemsRegistration",accept:"application/json",dataType:"json",headers:i.CustomHeaders,data:{transaction:n,Token:i.AuthToken},error:function(){if(t++,t<r){var n=this;setTimeout(function(){$.ajax(n)},u*t);return}}})},RefreshExsitingCountLabel:function(){var t=this.RootVForm.find(".progress-existing-file-count"),n;this.AlreadyExistsCount==0?t.hide():(t.show(),n=this.AlreadyExistsCount===1?this.Params.Vocabularies.AlreadyExistCountSingularLabel:this.Params.Vocabularies.AlreadyExistCountPluralLabel,n=n.replace("[EXIST_ASSET_COUNT]",""+this.AlreadyExistsCount),t.find(".progress-existing-file-count-text").html(n).tipsy())},RefreshDuplicatedCountLabel:function(){var t=this.RootVForm.find(".progress-duplicated-file-count"),n;this.DuplicatedCount==0?t.hide():(t.show(),n=this.DuplicatedCount===1?this.Params.Vocabularies.DuplicatedCountSingularLabel:this.Params.Vocabularies.DuplicatedCountPluralLabel,n=n.replace("[DUPLICATED_ASSET_COUNT]",""+this.DuplicatedCount),t.find(".progress-duplicated-file-count-text").html(n).tipsy())},RefreshExternallyDuplicatedCountLabel:function(){var t=this.RootVForm.find(".progress-externally-duplicated-file-count"),n;this.ExternallyDuplicatedCount==0?t.hide():(t.show(),n=this.ExternallyDuplicatedCount===1?this.Params.Vocabularies.ExternallyDuplicatedFileCountSingularLabel:this.Params.Vocabularies.ExternallyDuplicatedFileCountPluralLabel,n=n.replace("[EXTERNALLY_DUPLICATED_COUNT]",""+this.ExternallyDuplicatedCount),t.find(".progress-externally-duplicated-file-count-text").html(n).tipsy())},OnRegisteringUploadItemsFinished:function(n){var t={ProcessedExtensions:{},UnProcessedExtensions:{},InstanceID:this.InstanceID},u=!1,f,r,i;for(f in this.CortexFiles)r=this.CortexFiles[f],i=r.fileName.toLowerCase().split(".").pop(),r.processed?t.ProcessedExtensions.hasOwnProperty(i)?t.ProcessedExtensions[i]+=1:t.ProcessedExtensions[i]=1:(u=!0,t.UnProcessedExtensions.hasOwnProperty(i)?t.UnProcessedExtensions[i]+=1:t.UnProcessedExtensions[i]=1);this.RefreshExsitingCountLabel();this.RefreshDuplicatedCountLabel();this.RefreshExternallyDuplicatedCountLabel();this.Params.ShowConfirmationPopup?($(".ImportUploadV2_DamView_VForm_PopupWrapper").css("opacity",0),Matrix3.AddEvent(this.VFormID,"ShowConfirmation",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(t),"","",null,null,null,!1,null,!1,null,null,!1,null,!1,null)):u?(this.NotifyRegisterUploadItemsFinished(n),this.StartUploadSession()):this.ProcessUploadSessionComplete()},IsFinishedRegisteringUploadItems:function(){var n=function(n){return n.fileStatus!==undefined};return this.CortexFiles.every(n)},RegisterUploadItemInBatch:function(n,t,r){var u=this,o=u.CortexFiles.slice(t,r>u.CortexFiles.length?u.CortexFiles.length:r),s=u.Params.completeUploadRetryLimit||5,h=u.Params.completeUploadRetryInterval||1e3,f=0,c=u.Params.presignedURLsRetryLimit||3,l=u.Params.presignedURLsRetryInterval||1e3,e=0;$.ajax({type:"POST",url:"API/CortexUploader_BO/v1.1/RegisterUploadItems",accept:"application/json",dataType:"json",headers:u.CustomHeaders,data:{format:"JSON",transaction:n,files:JSON.stringify(o,u.HideJsonProperty),clientid:u.UserID,uploader:"Resumable Uploader",update_incomplete_ut:!0,Token:u.AuthToken,cloud_compatible:!0},success:function(f){var s=f.APIResponse.Result.length,o=[];for(i=0;i<s;i++)(function(){var a=t+i,n=u.CortexFiles[a],s,h,r;n.uploadStarted=!1;s=f.APIResponse.Result[i];n.fileStatus=s;u.Params.AllowResolveAmbiguousExtension===!1||n.fileStatus.DocType||n.fileStatus.FileStatus!==u.StatusToUpload||
216(h=n.blob.file.slice(0,131072),r=new FormData,r.append("fileHead",h,n.fileName),$.ajax({type:"POST",url:`webapi/upload/item/resolveAmbiguousExtension_420C_v1?UIRecordId=${n.fileStatus.UIRecordId}&fileName=${n.fileName}`,data:r,processData:!1,contentType:!1,headers:u.CustomHeaders}));n.processed||u.AddOrExcludeSpecificFile(n);u.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.fileStatus.FileStatus===u.StatusToUpload&&o.push(new Promise(function(t,i){$.ajax({type:"GET",url:"webapi/upload/item/getPresignedUrl_4DA_v1",accept:"application/json",dataType:"json",headers:u.CustomHeaders,data:{UploadItemID:n.fileStatus.UIRecordId,TotalLength:n.length,PartSize:n.blob.opts.chunkSize||u.Resumable.opts.chunkSize,UseAccelerateEndpoint:u.Params.UseAccelerateEndpoint},success:function(i){for(var f=n.blob.opts.chunkSize||u.Resumable.opts.chunkSize,e=Math.ceil(n.length/f),r=0;r<e;r++)u.S3UploadConfiguration.URLsByChunk[u.S3URLPrefix+n.uniqueIdentifier+"."+r]=i.urls[r];n.blob.opts.HasPresignedURLs=!0;n.blob.opts.ServerSideEncryption=i.serverSideEncryptionMethod;n.blob.opts.ServerSideEncryptionKeyId=i.serverSideEncryptionKeyManagementServiceKeyId;n.blob.opts.BlobType=i.blobType;t()},error:function(){var n=this;e++;e<=c?setTimeout(function(){$.ajax(n)},l*e):i()}})}))})();Promise.allSettled(o).then(function(){u.UpdateRegisterUploadItemsProgress(t,r);!u.HasFinishedRegisteringUploadItems&&u.IsFinishedRegisteringUploadItems()&&(u.HasFinishedRegisteringUploadItems=!0,u.OnRegisteringUploadItemsFinished(n))})},error:function(n){var t=this;u.HandleAuthenticationError(n.status,null,function(){$.ajax(t)},null,function(){f++;f<=s&&setTimeout(function(){$.ajax(t)},h*f)})}})},HideJsonProperty:function(n,t){return n==="blob"?undefined:t},AddOrExcludeSpecificFile:function(n){var t=this;if(n.fileStatus===undefined)t.FeedbackOnError("NOT_REGISTERED",n);else if(n.fileStatus.FileStatus===UploadItemStatus.AlreadyExists)t.FeedbackOnError("ALREADY_EXISTS",n),t.Resumable.removeFile(n.blob);else if(n.fileStatus.FileStatus===UploadItemStatus.Duplicated)t.FeedbackOnError("DUPLICATED",n),t.Resumable.removeFile(n.blob);else if(n.fileStatus.FileStatus===UploadItemStatus.ExternallyDuplicated)t.FeedbackOnError("EXTERNALLY_DUPLICATED",n),t.Resumable.removeFile(n.blob);else if(n.fileStatus.FileStatus===UploadItemStatus.Skip)t.FeedbackOnError("SKIPPED",n),t.Resumable.removeFile(n.blob);else if(n.fileStatus.FileStatus===UploadItemStatus.Reject)t.FeedbackOnError("REJECT",n),t.Resumable.removeFile(n.blob);else{if(n.fileStatus.FileStatus!==UploadItemStatus.Error&&n.fileStatus.UIRecordId){n.blob.cortexStatus=n.fileStatus;return}t.FeedbackOnError("ERROR",n);t.Resumable.removeFile(n.blob)}n.processed=!0;this.CompletedUploadItemsCount++;this.UpdateOverallProgressBar()},StartUploadSession:function(){var n=this;n.CortexFiles.forEach(function(t){n.UploadItemsByUniqueID[t.uniqueIdentifier]=t;t.fileStatus.uploadStatus=t.fileStatus.FileStatus});n.Resumable.isUploading()||n.RootVForm.find(".resumable-progress .progress-pause-link").show();this.Resumable.upload()},PreProcessUploadItemChunk:function(n){(n.fileObj===undefined||n.fileObj.cortexStatus===undefined)&&console.log("some chunk has errors");n.endByte<n.fileObj.cortexStatus.StartPosition?(n.preprocessState=2,n.markComplete=!0,n.callback("success",n.message()),n.resumableObj.uploadNextChunk()):(n.offset===0&&!n.fileObj.firstReceiveDataOnUpdated&&this.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.fileObj.opts.HasPresignedURLs&&(n.fileObj.firstReceiveDataOnUpdated=!0,$.ajax({type:"POST",url:"API/CortexUploader_BO/v1.1/UpdateFirstReceiveDataOn",accept:"application/json",dataType:"json",headers:this.CustomHeaders,data:{Format:"JSON",Token:this.AuthToken,UIRecordID:n.fileObj.cortexStatus.UIRecordId},error:function(t,i,r){Matrix3.LogError("Failed to update FirstReceiveDataOn for UI "+n.fileObj.cortexStatus.UIRecordId,r)}})),n.preprocessFinished())},TranslateFileChunkToUploadApiFormData:function(n,t){var i=n.opts.chunkSize||this.Resumable.opts.chunkSize;return{Start:t.offset*i,End:Math.min(t.fileObjSize,(t.offset+1)*i)-1,UIRecordId:n.cortexStatus.UIRecordId,FileLength:n.size,Token:this.AuthToken,PartNumber:t.offset+1}},ProcessUploadSessionComplete:function(){var n=this,i,r,u,e;if(!n.CompletedSessionProcessed&&!n.CompletedSessionProcessing&&(i=0,r=!0,n.CortexFiles.forEac
216h(function(n){n.fileStatus.uploadStatus===UploadItemStatus.ToUpload&&i++;n.fileStatus.uploadStatus!==UploadItemStatus.Error||n.sourceFileMissing||(r=!1)}),n.isUploadComplete&&i==0||n.CompletedUploadItemsCount===n.CortexFiles.length)){n.CompletedSessionProcessing=!0;n.SetStatusForUploadItemsWithMissingSource();n.StopUploadProgressTracking();r&&(u=n.RootVForm.find(".progress-bar"),u.css({width:"100%"}));n.RootVForm.find(".progress-inner-text").html(n.Params.Vocabularies.ProgressCompleteLabel);n.RootVForm.find(".resumable-progress .progress-resume-link, .resumable-progress .progress-pause-link, .resumable-progress .progress-cancel-link").hide();var t=n.SuccessItemCount,o=n.FailureCount,f=$('[id="'+n.VFormID+':MinimizeBtn"]');f.addClass("Disabled");n.SessionUploadCompleted=!0;n.AcquiredAuthToken?window.location.assign(n.UploadReportURL):e=setInterval(function(){var u,r,s,i,a;if(!Matrix3.HasEventsInProgress()){u=$(".DefaultPopupClass",n.PopupElement);r=$('[id="'+n.RootVFormID+':PostUploadResultsPnl"]');try{ControlMgr.GetInstance().GetAllPositionItems()[u.attr("id")].mbForcedSkipUpdatingStyle=!1}catch(v){}if(s=function(){try{n.CompletedShown=!0;f.removeClass("Disabled");n.IsInMinimizedMode&&$(document).ready(function(){try{ControlMgr.GetInstance().GetAllPositionItems()[u.attr("id")].mbForcedSkipUpdatingStyle=!0;n.UploadContainersContent.scrollTop(n.PopupElement.offset().top);$(".DoneBtn > a",r).click(function(){ResumableUpload.CheckAndHideUploadContainer()});r.css("opacity",0)}catch(t){}})}catch(t){}},n.HasPostUpload){try{ControlMgr.GetInstance().GetAllPositionItems()[r.attr("id")].mbForcedSkipUpdatingStyle=!1}catch(v){}var h=0,c=0,l=0;for(i=0;i<n.CompletedUploadItemsCount;i++)n.CortexFiles[i].fileStatus.FileStatus===UploadItemStatus.AlreadyExists?h++:n.CortexFiles[i].fileStatus.FileStatus===UploadItemStatus.Duplicated?c++:n.CortexFiles[i].fileStatus.FileStatus===UploadItemStatus.Skip&&l++;a={success:t,failure:o,existing:h,duplicated:c,skipped:l};Matrix3.AddEvent(n.VFormID,"WaitingAfterComplete",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(a),"","",null,null,null,!0,n.WaitMessageForSessionComplete,!1,null,null,!1,null,!0,function(){var i;n.CompletedSessionProcessed=!0;s();t>0?(n.RootVForm.find(".resumable-progress .progress-inner-text").html(n.Params.Vocabularies.ProgressCompleteLabel+":"),i=n.CortexFiles.length===1?n.Params.Vocabularies.UploadedCountLabel:n.Params.Vocabularies.UploadedCountPluralLabel,i=i.replace("[UPLOADED_FILE_COUNT]",""+t).replace("[ALL_FILE_COUNT]",""+n.CortexFiles.length),n.RootVForm.find(".resumable-progress .progress-file-count-text").css({display:"inline"}),n.RootVForm.find(".resumable-progress .progress-file-count-text").html(i)):h+c+l>0&&(n.isUploadComplete||n.MarkUploadSessionComplete(!1),n.RootVForm.find(".resumable-progress .prepare-text").css({display:"none"}),i=n.CortexFiles.length===1?n.Params.Vocabularies.UploadedCountLabel:n.Params.Vocabularies.UploadedCountPluralLabel,i=i.replace("[UPLOADED_FILE_COUNT]",""+t).replace("[ALL_FILE_COUNT]",""+n.CortexFiles.length),n.RootVForm.find(".resumable-progress .progress-file-count-text").css({display:"inline"}),n.RootVForm.find(".resumable-progress .progress-file-count-text").html(i),n.RootVForm.find(".resumable-progress .progress-inner-text").html(n.Params.Vocabularies.ProgressCompleteLabel+":"),n.RootVForm.find(".resumable-progress .progress-inner-text").css({display:"inline"}),n.RootVForm.find(".resumable-progress .progress-text").css({display:"block"}),n.RootVForm.find(".resumable-progress .progress-bar").css({width:"100%"}),n.RootVForm.find(".progress-text-percent-all").text("100%"));n.RootVForm.find(".progress-existing-file-count").show()})}else Matrix3.AddEvent(n.VFormID,"SessionComplete",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","",null,null,null,!0,n.WaitMessageForSessionComplete,!1,null,null,!1,null,!0,function(){n.CompletedSessionProcessed=!0;s();ResumableUpload.CheckAndHideUploadContainer()});clearInterval(e);n.CompletedSessionProcessing=!1}},50)}},RetryFailures:function(){var n=this,t=[];
216n.CortexFiles.forEach(function(i){i.processed&&i.retryable?t.push(i):n.UploadItemTables[i.uniqueIdentifier].item.remove()});n.CortexFiles=t;n.CortexFiles.length>0&&Matrix3.AddEvent(n.VFormID,"UploadStarted",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","",null,null,null,!1,null,!1,null,null,!1,null,!1,null);n.CortexFiles.forEach(function(t){n.UploadItemTables[t.uniqueIdentifier].status.html(n.SpinnerIcon);t.retryable=!1;var i=n.Resumable.getFromUniqueIdentifier(t.uniqueIdentifier);n.CompletedUploadItemsCount=0;n.SuccessItemCount=0;n.AlreadyExistsCount=0;n.DuplicatedCount=0;n.ExternallyDuplicatedCount=0;n.FailureCount=0;n.CompleteUploadItem(i)})},GetRetryWaitingInterval:function(n,t,i,r){return n==0||n==503?this.unreachableRetryInterval:Math.pow(Math.min(t+1,i),1.5)*r},CompleteUploadItem:function(n){function h(r,s){var d=!1,k=!1;$.ajax({type:"POST",url:y,accept:"application/json",dataType:"json",headers:t.CustomHeaders,data:{Format:"JSON",Token:t.AuthToken,UIrecordID:n.cortexStatus.UIRecordId,UTRecordID:t.UploadTransactionID,DigitizedDateInMs:v,DateModified:t.GetLastModifiedDateFromFileItemAsUTC(n.file),ForceSemiSync:"false",ForceFileSizeBasedAsync:!!t.ForceFileSizeBasedAsync,FileImmediatelyDownloadable:!!t.FileImmediatelyDownloadable&&!!s,ForceAsyncInlineProcess:t.ForceAsyncInlineProcess,S3UploadParts:JSON.stringify(a),FileMd5:s},success:function(u){var f=u.APIResponse.ExecutionStatus;u.APIResponse.FileStatus===UploadItemStatus.OnProgressVerify?(d=!0,c++):u.APIResponse.FileStatus===UploadItemStatus.AlreadyExists&&r?(k=!0,t.TotalCompletedSize+=n.size*t.GetPostProcessingProgressWeight(),t.UpdateOverallProgressBar(),t.FeedbackOnError("ALREADY_EXISTS",i),t.RefreshExsitingCountLabel()):u.APIResponse.FileStatus===UploadItemStatus.Duplicated?(k=!0,t.TotalCompletedSize+=n.size*t.GetPostProcessingProgressWeight(),t.UpdateOverallProgressBar(),i.fileStatus.FileStatus=UploadItemStatus.Duplicated,t.FeedbackOnError("DUPLICATED",i),t.RefreshDuplicatedCountLabel()):u.APIResponse.FileStatus===UploadItemStatus.ExternallyDuplicated?(k=!0,t.TotalCompletedSize+=n.size*t.GetPostProcessingProgressWeight(),t.UpdateOverallProgressBar(),i.fileStatus.FileStatus=UploadItemStatus.ExternallyDuplicated,t.FeedbackOnError("EXTERNALLY_DUPLICATED",i),t.RefreshExternallyDuplicatedCountLabel()):u.APIResponse.FileStatus===UploadItemStatus.Reject?(k=!0,t.TotalCompletedSize+=n.size*t.GetPostProcessingProgressWeight(),t.UpdateOverallProgressBar(),t.FeedbackOnError("REJECT",i,null,u.APIResponse.CustomRejectTooltip)):(t.SuccessItemCount++,t.UploadItemTables[i.uniqueIdentifier].status.html(t.SuccessIcon))},error:function(r){var s,h;if(f=r.status,u=!0,f===400&&r.responseJSON&&r.responseJSON.APIResponse&&r.responseJSON.APIResponse.Response&&r.responseJSON.APIResponse.Response.ErrorList&&r.responseJSON.APIResponse.Response.ErrorList.ErrorDetails=="InvalidParts"){if(t.Params.LogOnError)try{s=r.responseJSON.APIResponse.Response.Results[0];s&&s.InvalidPart&&(h=n.chunks[parseInt(s.InvalidPart)-1],Matrix3.LogError("Error completing "+i.uniqueIdentifier+" with "+n.chunks.length+" parts, at part "+s.InvalidPart+". Response headers: "+h.xhr.getAllResponseHeaders()+", URL: "+h.xhr.responseURL))}catch(c){Matrix3.LogError("Error parsing error response for "+i.uniqueIdentifier+" with "+n.chunks.length+" chunks: "+r.responseJSON.APIResponse.Response.Results)}n.retryFullUploadCount||(n.retryFullUploadCount=0);n.retryFullUploadCount++;n.retryFullUploadCount<=e?(l=!0,n.retry()):(u=!1,t.FeedbackOnError("UPLOAD_COMPLETION_ERROR",i,"Error completing "+i.uniqueIdentifier+" with "+n.chunks.length+" parts, at part "+s.InvalidPart+". Response headers: "+h.xhr.getAllResponseHeaders()+", URL: "+h.xhr.responseURL))}else f!==0&&f!==503&&o++,t.HandleAuthenticationError(f,function(){t.Resumable.pause()},function(){u=!1;t.ResumePausedUpload(t.unreachableRetryInterval)},function(){o>e&&(u=!1,t.FeedbackOnError("AUTHENTICATION_ERROR",i))})}}).always(function(){var i;d?setTimeout(function(){h(!1,s)},t.GetRetryWaitingInterval(200,c,w,b)):l||(k?(i=t.GetCortexFileBasedOnUniqueIdentifier(n.uniqueIdentifier),i!=null&&(i.processed=!0,i.fileStatus.uploadStatus=UploadItemStatus.UploadCompleted),t.UploadItemTables[n.uniqueIdentifier].item.addClass("file-complete"),t.UploadItemTables[n.uniqueIdentifier].item.removeClass("file-progress-processing"),t.UploadItemTables[n.uniqueIdentifier].progress.html("100%"),t.CompletedUploadItemsCount++,t.ProcessUploadSessionComplete()):!u||o>e?(i=t.GetCortexFileBasedOnUniqueIdentifier(n.uniqueIdentifier),i!=null&&(i.processed=!0,i.fileStatus.uploadStatus=UploadItemStatus.UploadCompleted),t.TotalCompletedSize+=n.size*t.GetPostProcessingProgressWeight(),t.UploadItemTables[n.uniqueIdentifier].item.addClass("file-complete"),t.UploadItemTables[n.uniqueIdentifier].item.removeClass("file-progress-processing"),t.UploadItemTables[n.uniqueIdentifier].progress.html("100%"),t.UpdateOverallProgressBar(),t.CompletedUploadItemsCount++,t.ProcessUploadSessionComplete()):setTimeout(function(){h(!1,s)},t.GetRetryWaitingInterval(f,o,e,p)));u=!1})}var t=this,v=t.GetLastModifiedDateFromFileItemAsMs(n.file),y="API/CortexUploader_BO/v1.1/PostProcessResumableUpload",i=t.GetCortexFileBasedOnUniqueIdentifier(n.uniqueIdentifier),e=t.Params.completeUploadRetryLimit||3600,p=t.Params.completeUploadRetryInterval||2e3,o=0,w=t.Params.completeUploadOnProgressRetryLimit||1e3,b=t.Params.completeUploadOnProgressRetryInterval||1e4,c=0,u=!1,l=!1,f=0,a=[],s=n.Md5ComputationPromise,r;if(s||!t.FileImmediatelyDownloadable||(s=t.ComputeFileMd5(n.file)),t.S3UploadConfiguration.IsUploadingDirectlyToS3&&n.opts.HasPresignedURLs&&n.chunks.length>1)for(r=0;r<n.chunks.length;r++)n.chunks[r].etag||Matrix3.LogError("Chunk missing ETag: FileName=["+n.fileName+"], UIRecordID=["+n.cortexStatus.UIRecordId+"], ChunkOffset=["+n.chunks[r].offset+"]"),a.push(r+1+"|"+n.chunks[r].etag+"|"+(n.chunks[r].endByte-n.chunks[r].startByte));s.then(function(n){h(!0,n)})},GetLastModifiedDateFromFileItemAsMs:function(n){return n.lastModified||(n.lastModifiedDate?n.lastModifiedDate.getTime():"")},GetLastModifiedDateFromFileItemAsUTC:function(n){return new Date(this.GetLastModifiedDateFromFileItemAsMs(n)).toISOString()},HumanizeFileSize:function(n,t,i){var r,u,f,e;if(t===undefined&&(t=!1),i===undefined&&(i=1),r=1024,u=["KB","MB","GB","TB","PB","EB"],t&&(n=n*8,u=["Kb","Mb","Gb","Tb","Pb","Eb"]),Math.abs(n)<r)return n.toFixed(i)+(t?"b":"B");f=-1;e=Math.pow(10,i);do n/=r,++f;
216while(Math.round(Math.abs(n)*e)/e>=r&&f<u.length-1);return n.toFixed(i)+u[f]},HumanizeTimeDuration:function(n){function f(n,i){return n===1?t[i].singular:t[i].plural}function e(n){return n%1!=0}function i(n,t){return parseInt(n,10)+" "+f(parseInt(n,10),t)}function o(n,i,r){return e(i)?n-parseInt(i,10)*t[r].inSeconds:0}function u(n,i){var r=n/t[i].inSeconds,u=o(n,r,i);return{quantity:parseInt(r),remaining:u}}function s(n){if(n<=10)return r.Vocabularies.AlmostDoneUpload||"A few secs";if(n<=60)return r.Vocabularies.LessThanOneMinuteUpload||"Less than a "+t.minute.singular;if(n<=3600)return i(Math.ceil(n/t.minute.inSeconds),"minute");var f=[],e=u(n,"hour"),o=u(e.remaining,"minute"),s=o.remaining;return e.quantity>0&&f.push(i(e.quantity,"hour")),o.quantity>0&&f.push(i(o.quantity,"minute")),s>0&&f.push(i(s,"second")),f.length>=3?f.slice(0,2).join(" "):f.slice(0,1).join(" ")}var r=this,t;return n=Math.ceil(n),t={hour:{singular:"hr",plural:"hours",inSeconds:3600},minute:{singular:"min",plural:"mins",inSeconds:60},second:{singular:"sec",plural:"secs",inSeconds:1}},s(n)},GetCortexFileBasedOnUniqueIdentifier:function(n){var t=this,i;return n in t.UploadItemsByUniqueID?t.UploadItemsByUniqueID[n]:(t.CortexFiles.forEach(function(r){if(r.uniqueIdentifier==n){i=r;t.UploadItemsByUniqueID[n]=r;return}}),i)},IsAuthenticationError:function(n){return n==401},IsForbiddenError:function(n){return n==403},HandleAuthenticationError:function(n,t,i,r,u){this.IsAuthenticationError(n)?(t&&t(),this.RefreshAccessToken(i,r)):u&&u()},RefreshAccessToken:function(n,t){var s=this.AuthAccessKey,f=this.UserID,h=this.DisplayOS||f,i=this,u;i.AcquiredAuthTokenCache=i.AcquiredAuthTokenCache||{};var e=i.AuthToken,c=i.Params.completeUploadRetryInterval||1e3,o=i.Params.completeUploadRetryLimit||5,r=0;i.AcquiredAuthToken=!1;i.RefreshTokenAttempt=i.RefreshTokenAttempt||0;i.RefreshTokenAttempt+=1;u=0;i.RefreshTokenAttempt>1&&(u=i.unreachableRetryInterval),function l(){setTimeout(function(){i.AcquiredAuthTokenCache[e]?n():$.ajax({type:"POST",url:"API/AccessKeyAuthentication/v1.0/AuthenticateInternal",accept:"application/json",headers:i.CustomHeaders,dataType:"json",data:{format:"JSON",context:"CortexUploader",userEmailHash:s,salt:f,os:h,debugMode:!1,skipIPValidation:!1},success:function(r){r.APIResponse.AuthenticationCode==="SUCCESS"?(i.AuthToken=r.APIResponse.Token,i.AcquiredAuthToken=!0,i.AcquiredAuthTokenCache[e]=r.APIResponse.Token,$.ajax({type:"POST",url:"API/AccessKeyAuthentication/v1.0/UpdateAjaxToken",accept:"application/json",dataType:"json",headers:i.CustomHeaders,data:{Format:"JSON",Token:i.AuthToken,AjaxToken:i.AjaxToken}}),n&&n()):t&&t(r)},error:function(n){if(n.status!==0&&n.status===503&&r++,r<o){var u=i.GetRetryWaitingInterval(n.status,r,o,c);setTimeout(function(){l()},u)}else t&&t(n)}})},u)}()},StartUpload:function(){var n=this;n.Params.ShowConfirmationPopup||Matrix3.AddEvent(n.VFormID,"UploadStarted",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","",null,null,null,!1,null,!1,null,null,!1,null,!1,null);n.StartUploadingAddedFiles()},ResetUploadItems:function(){var n=this,t;n.ResumableProgressContainer.not(".resumable-progress-minimized").hide();n.RootVForm.find(".resumable-progress .progress-resume-link").show();n.RootVForm.find(".resumable-progress-panel").css("border-bottom",n.DataToReset.ProgressPanelCSS["border-bottom"]);t=$('[id="'+n.VFormID+':MinimizeBtn"]');t.addClass("InvisibleC Disabled");n.ShowFullMode=n.ResumableProgressContainer.find(".action-extend");n.ShowCompactMode=n.ResumableProgressContainer.find(".action-compact");n.ShowFullMode.off("click",n.DataToReset.ShowFullModeOnClick);n.ShowCompactMode.off("click",n.DataToReset.ShowCompactModeOnClick);n.UploadItemContainer.hide();n.Resumable.assignDrop(document.body);n.RootVForm.find(".resumable-drop").find("div[id*=':PreUploadPnl']").css("display",n.DataToReset.PreUploadPanelCSS.display);n.RootVForm.find(".prepare-text").hide();n.RootVForm.find(".progress-text").show();n.RootVForm.find(".progress-file-fetching-metadata").hide();n.RootVForm.find(".warning-large-upload").show();n.Resumable.cancel();n.CortexFiles=[];n.UploadItemListHTML="";n._OverallProgressCreepTimer&&(clearInterval(n._OverallProgressCreepTimer),n._OverallProgressCreepTimer=null);n._DisplayedProgress=null;n.LastUpdatedProgress=0},ComputeFileMd5:function(n){return new Promise(function(t){function o(){var t=u*r,f=Math.min(t+r,i);e.readAsArrayBuffer(h.call(n,t,f))}var f=new SparkMD5.ArrayBuffer,e=new FileReader,i=n.size,r=Math.min(5242880,i),u=0,s=Math.ceil(i/r),h=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice;e.onload=function(n){f.append(n.target.result);u++;u<s?o():t(f.end(!1))};o()})},SpinnerIcon:'<svg class="uploading-icon" width="12" height="18" viewBox="0 0 12 18" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M6 4.5V6.75L9 3.75L6 0.75V3C2.685 3 0 5.685 0 9C0 10.1775 0.345 11.2688 0.93 12.195L2.025 11.1C1.69125 10.4738 1.5 9.76125 1.5 9C1.5 6.51375 3.51375 4.5 6 4.5ZM11.07 5.805L9.975 6.9C10.3087 7.52625 10.5 8.23875 10.5 9C10.5 11.4862 8.48625 13.5 6 13.5V11.25L3 14.25L6 17.25V15C9.3
21615 15 12 12.315 12 9C12 7.8225 11.655 6.73125 11.07 5.805Z" fill="#5A5A68"/><\/svg>',SuccessIcon:'<svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.99906 11.17L1.82906 6.99996L0.414062 8.41496L5.99906 14L17.9991 1.99996L16.5841 0.584961L5.99906 11.17Z" fill="#8BD284"/><\/svg>',SkippedIcon:'<i class="ico fa fa-info-circle fa-lg" style="color: #F90;"><\/i>',RejectIcon:'<i class="ico fa fa-times fa-lg" style="color: red;"><\/i>',WarningIcon:'<cx-icon name="error_outline" style="color:var(--cx-color-warning); font-size:1.33333333em; vertical-align:middle;"><\/cx-icon>',WarningTriangleIcon:'<cx-icon name="warning" style="color:var(--cx-color-warning-600); font-size:1.33333333em; vertical-align:middle;"><\/cx-icon>',ErrorIcon:'<svg width="18" height="15" viewBox="0 0 18 15" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.75 14.75H17.25L9 0.5L0.75 14.75ZM9.75 12.5H8.25V11H9.75V12.5ZM9.75 9.5H8.25V6.5H9.75V9.5Z" fill="#EC4D3D"/><\/svg>',FeedbackOnError:function(n,t,i,r){var u=this,e="",f="",o="",s;n==="NOT_REGISTERED"&&(u.FailureCount++,t.retryable=!0);n==="ALREADY_EXISTS"&&(u.AlreadyExistsCount++,f=u.Params.Vocabularies.FileStatusExistTooltip,e=u.Params.Vocabularies.ExistsLabel,o=u.SkippedIcon);n==="DUPLICATED"&&(u.DuplicatedCount++,f=u.Params.Vocabularies.FileStatusDuplicatedTooltip,e=u.Params.Vocabularies.DuplicatedLabel,o=u.SkippedIcon);n==="EXTERNALLY_DUPLICATED"&&(u.ExternallyDuplicatedCount++,f=u.Params.Vocabularies.FileStatusExternallyDuplicatedTooltip,e="",o=u.WarningTriangleIcon);n==="SKIPPED"&&(t.blob.size===0?(f=t.fileStatus.StatusReason??u.Params.Vocabularies.FileStatusSkippedZeroSizeTooltip,e=u.Params.Vocabularies.SkippedZeroSizeLabel):(f=t.fileStatus.StatusReason??u.Params.Vocabularies.FileStatusSkippedTooltip,e=u.Params.Vocabularies.SkippedLabel),o=u.SkippedIcon);n==="REJECT"&&(u.FailureCount++,f=t.fileStatus.StatusReason??u.Params.Vocabularies.FileStatusRejectTooltip,e=u.Params.Vocabularies.RejectLabel,o=u.WarningIcon);n==="ERROR"&&(u.FailureCount++,f=u.Params.Vocabularies.ErrorRegisterFailure,e=u.Params.Vocabularies.ErrorLabel,o=u.ErrorIcon);n==="CONNECTION_FAILED"&&(f=u.Params.Vocabularies.ConnectionErrorTooltip,e=u.Params.Vocabularies.ConnectionErrorLabel,o=u.ErrorIcon);n==="SOURCE_FILE_MISSING"&&(f=u.Params.Vocabularies.SourceFileMissingTooltip,e=u.Params.Vocabularies.SourceFileMissingLabel,o=u.ErrorIcon);n==="SOURCE_FILE_UNREADABLE"&&(f=u.Params.Vocabularies.SourceFileUnReadableTooltip,e=u.Params.Vocabularies.SourceFileUnReadableLabel,o=u.ErrorIcon);n==="UPLOAD_COMPLETION_ERROR"&&(u.FailureCount++,t.retryable=!0,f=u.Params.Vocabularies.UploadCompletionErrorTooltip,e=u.Params.Vocabularies.UploadCompletionErrorLabel,o=u.ErrorIcon);n==="AUTHENTICATION_ERROR"&&(u.FailureCount++,t.retryable=!0,f=u.Params.Vocabularies.AuthenticationErrorTooltip,e=u.Params.Vocabularies.AuthenticationErrorLabel,o=u.ErrorIcon);n==="UNKNOWN_ERROR";f=r||f;e&&u.UploadItemTables[t.uniqueIdentifier].progress.html(e);o&&u.UploadItemTables[t.uniqueIdentifier].status.html(o);f&&(u.UploadItemTables[t.uniqueIdentifier].status.prop("title",f),u.UploadItemTables[t.uniqueIdentifier].status.tipsy());s="Resumable upload error for file: (FileUniqueIdentifier='"+t.uniqueIdentifier+"',FileName='"+t.blob.fileName+"',FullPath='"+t.blob.file.fullPath+"',RelativePath='"+t.blob.file.relativePath+"',FileSize="+t.blob.file.size+") - Error type: "+n+" - Message: "+i;Matrix3.LogWarning(s)},EscapeHtml:function(n){var t={"&":"&","<":"<",">":">",'"':""","'":"'"};return n.replace(/[&<>"']/g,function(n){return t[n]})}};SimpleTooltip={moElements:[],moOptions:[],moCurrentElements:[],miCounter:0,Subscribe:function(n,t){if(n&&n.length>0){this.moElements.push(n);this.moOptions.push(t);for(var i=n[0],r;!r&&i;)r=i.msId,i=i.parentNode;r&&(Matrix3.RegisterForCleanup(r,"SimpleTooltip"+this.miCounter.toString(),function(){var t=n.data("tipsy");t&&t.hide&&t.$tip&&t.$tip.length>0&&t.$tip[0].isConnected&&(t.hide(),t.disable())}),this.miCounter++)}},Setup:function(){var t,n;for(this.DestroyOrphans(),t=this.moElements.length,n=0;n<t;n++)this.moElements[n]&&this.moElements[n].tipsy&&this.moElements[n].tipsy(this.moOptions[n]);this.moCurrentElements=this.moElements},DestroyOrphans:function(){var r=this.moElements,e=this.moOptions,u,n,i;for(this.moElements=[],this.moOptions=[],this.miCounter=0,u=r.length,n=0;n<u;n++){var t=r[n],f=t[0],o=e[n];f&&f.isConnected?(this.moElements.push(t),this.moOptions.push(o),this.miCounter++):(i=t.data("tipsy"),i&&i.validate())}$.fn.tipsy.revalidate()},HideAll:function(){for(var n,i=this.moElements.length,t=0;t<i;t++)n=this.moElements[t].data("tipsy"),n&&(n.hoverState="out",n.hide())},DestroyAll:function(){var n=$(".tipsy");typeof n!="undefined"&&n!=null&&n&&n.remove()}};StackMgr.moSingleton=null;StackMgr.GetInstance=function(){return StackMgr.moSingleton||(StackMgr.moSingleton=new StackMgr),StackMgr.moSingleton};StackMgr.Const={START_INDEX:100,INDEX_INCREMENT:5};StackMgr.prototype={GetIndex:function(){return this.miIndex+=StackMgr.Const.INDEX_INCREMENT,this.miIndex},Increment:function(n){this.miIndex+=n},Decrement:function(n){this.miIndex-=n},GetCurrentIndex:function(){return this.miIndex}};StringBuilder.prototype.append=function(n){n&&this.strings.push(n)};StringBuilder.prototype.clear=function(){this.strings.length=1};StringBuilder.prototype.toString=function(){return this.strings.join("")};String.prototype.endsWith=function(n){var t=this.lastIndexOf(n);return t!=-1&&t+n.length==this.length};StyleMgr.moSingleton=null;StyleMgr.GetInstance=function(){return StyleMgr.moSingleton||(StyleMgr.moSingleton=new StyleMgr),StyleMgr.moSingleton};StyleMgr.Const={CLASS_INVISIBLE:"InvisibleC",CLASS_WARNING:"Warn",MGR_NAME:"Style"};StyleMgr.prototype={HasClass:function(n,t){var r,i;return n=$Elt(n),r=!1,n&&(i=null,t in this.moClassCache?i=this.moClassCache[t]:(i=new RegExp("(?:^|\\s+)"+t+"(?:\\
216s+|$)"),this.moClassCache[t]=i),r=i.test(n.className)),r},AddClass:function(n,t){n=$Elt(n);n&&!this.HasClass(n,t)&&(n.className=n.className+" "+t)},SwitchClass:function(n,t){$HasClass(n,t)?$RemoveClass(n,t):$AddClass(n,t)},RemoveClass:function(n,t){n=$Elt(n);n&&this.HasClass(n,t)&&(n.className=n.className.replace(this.moClassCache[t]," "),n.className=Utils.Trim(n.className))},ReplaceClass:function(n,t,i){this.RemoveClass(n,t);this.AddClass(n,i)},GetStyle:function(n,t,i){var r=$Elt(n),u;return r?(u="",r.id&&this.mbIsActive&&!i?(r.id in this.moStyleCache&&t in this.moStyleCache[r.id]||(r.id in this.moStyleCache||(this.moStyleCache[r.id]={},Matrix3.RegisterInCache(r.id,StyleMgr)),this.moStyleCache[r.id][t]=this._GetStyle(r,t)),u=this.moStyleCache[r.id][t]):u=this._GetStyle(r,t),u):null},RefreshNode:function(n){delete this.moStyleCache[n]},SetStyle:function(n,t,i){var r=$Elt(n);r&&(r.id&&this.mbIsActive&&(r.id in this.moStyleCache||(this.moStyleCache[r.id]={},Matrix3.RegisterInCache(r.id,StyleMgr)),i!=""?this.moStyleCache[r.id][t]=i:delete this.moStyleCache[r.id][t]),this._SetStyle(r,t,i))},Refresh:function(){this.moStyleCache={}}};swfobject=function(){function v(){var i,r,n;if(!c){try{i=t.getElementsByTagName("body")[0].appendChild(h("span"));i.parentNode.removeChild(i)}catch(u){return}for(c=!0,r=w.length,n=0;n<r;n++)w[n]()}}function yt(n){c?n():w[w.length]=n}function pt(n){if(typeof r.addEventListener!=i)r.addEventListener("load",n,!1);else if(typeof t.addEventListener!=i)t.addEventListener("load",n,!1);else if(typeof r.attachEvent!=i)ui(r,"onload",n);else if(typeof r.onload=="function"){var u=r.onload;r.onload=function(){u();n()}}else r.onload=n}function gt(){lt?ni():it()}function ni(){var o=t.getElementsByTagName("body")[0],u=h(f),r,e;u.setAttribute("type",p);r=o.appendChild(u);r?(e=0,function(){if(typeof r.GetVariable!=i){var t=r.GetVariable("$version");t&&(t=t.split(" ")[1].split(","),n.pv=[parseInt(t[0],10),parseInt(t[1],10),parseInt(t[2],10)])}else if(e<10){e++;setTimeout(arguments.callee,10);return}o.removeChild(u);r=null;it()}()):it()}function it(){var y=s.length,r,t,h,c,v;if(y>0)for(r=0;r<y;r++){var f=s[r].id,e=s[r].callbackFn,o={success:!1,id:f};if(n.pv[0]>0){if(t=u(f),t)if(!g(s[r].swfVersion)||n.wk&&n.wk<312)if(s[r].expressInstall&&ut()){h={};h.data=s[r].expressInstall;h.width=t.getAttribute("width")||"0";h.height=t.getAttribute("height")||"0";t.getAttribute("class")&&(h.styleclass=t.getAttribute("class"));t.getAttribute("align")&&(h.align=t.getAttribute("align"));var p={},a=t.getElementsByTagName("param"),w=a.length;for(c=0;c<w;c++)a[c].getAttribute("name").toLowerCase()!="movie"&&(p[a[c].getAttribute("name")]=a[c].getAttribute("value"));ft(h,p,f,e)}else ti(t),e&&e(o);else l(f,!0),e&&(o.success=!0,o.ref=rt(f),e(o))}else l(f,!0),e&&(v=rt(f),v&&typeof v.SetVariable!=i&&(o.success=!0,o.ref=v),e(o))}}function rt(n){var r=null,t=u(n),e;return t&&t.nodeName=="OBJECT"&&(typeof t.SetVariable!=i?r=t:(e=t.getElementsByTagName(f)[0],e&&(r=e))),r}
216function ut(){return!d&&g("6.0.65")&&(n.win||n.mac)&&!(n.wk&&n.wk<312)}function ft(f,e,o,s){var c,v,l,a;d=!0;nt=s||null;at={success:!1,id:o};c=u(o);c&&(c.nodeName=="OBJECT"?(y=et(c),k=null):(y=c,k=o),f.id=ht,(typeof f.width==i||!/%$/.test(f.width)&&parseInt(f.width,10)<310)&&(f.width="310"),(typeof f.height==i||!/%$/.test(f.height)&&parseInt(f.height,10)<137)&&(f.height="137"),t.title=t.title.slice(0,47)+" - Flash Player Installation",v=n.ie&&n.win?"ActiveX":"PlugIn",l="MMredirectURL="+r.location.toString().replace(/&/g,"%26")+"&MMplayerType="+v+"&MMdoctitle="+t.title,typeof e.flashvars!=i?e.flashvars+="&"+l:e.flashvars=l,n.ie&&n.win&&c.readyState!=4&&(a=h("div"),o+="SWFObjectNew",a.setAttribute("id",o),c.parentNode.insertBefore(a,c),c.style.display="none",function(){c.readyState==4?c.parentNode.removeChild(c):setTimeout(arguments.callee,10)}()),ot(f,e,o))}function ti(t){if(n.ie&&n.win&&t.readyState!=4){var i=h("div");t.parentNode.insertBefore(i,t);i.parentNode.replaceChild(et(t),i);t.style.display="none",function(){t.readyState==4?t.parentNode.removeChild(t):setTimeout(arguments.callee,10)}()}else t.parentNode.replaceChild(et(t),t)}function et(t){var u=h("div"),e,i,o,r;if(n.win&&n.ie)u.innerHTML=t.innerHTML;else if(e=t.getElementsByTagName(f)[0],e&&(i=e.childNodes,i))for(o=i.length,r=0;r<o;r++)i[r].nodeType==1&&i[r].nodeName=="PARAM"||i[r].nodeType==8||u.appendChild(i[r].cloneNode(!0));return u}function ot(t,r,e){var v,y=u(e),w,o,k,a,c,s,l;if(n.wk&&n.wk<312)return v;if(y)if(typeof t.id==i&&(t.id=e),n.ie&&n.win){w="";for(o in t)t[o]!=Object.prototype[o]&&(o.toLowerCase()=="data"?r.movie=t[o]:o.toLowerCase()=="styleclass"?w+=' class="'+t[o]+'"':o.toLowerCase()!="classid"&&(w+=" "+o+'="'+t[o]+'"'));k="";for(a in r)r[a]!=Object.prototype[a]&&(k+='<param name="'+a+'" value="'+r[a]+'" />');y.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+w+">"+k+"<\/object>";b[b.length]=t.id;v=u(t.id)}else{c=h(f);c.setAttribute("type",p);for(s in t)t[s]!=Object.prototype[s]&&(s.toLowerCase()=="styleclass"?c.setAttribute("class",t[s]):s.toLowerCase()!="classid"&&c.setAttribute(s,t[s]));for(l in r)r[l]!=Object.prototype[l]&&l.toLowerCase()!="movie"&&ii(c,l,r[l]);y.parentNode.replaceChild(c,y);v=c}return v}function ii(n,t,i){var r=h("param");r.setAttribute("name",t);r.setAttribute("value",i);n.appendChild(r)}function wt(t){var i=u(t);i&&i.nodeName=="OBJECT"&&(n.ie&&n.win?(i.style.display="none",function(){i.readyState==4?ri(t):setTimeout(arguments.callee,10)}()):i.parentNode.removeChild(i))}function ri(n){var t=u(n),i;if(t){for(i in t)typeof t[i]=="function"&&(t[i]=null);t.parentNode.removeChild(t)}}function u(n){var i=null;try{i=t.getElementById(n)}catch(r){}return i}function h(n){return t.createElement(n)}function ui(n,t,i){n.attachEvent(t,i);a[a.length]=[n,t,i]}function g(t){var r=n.pv,i=t.split(".");return i[0]=parseInt(i[0],10),i[1]=parseInt(i[1],10)||0,i[2]=parseInt(i[2],10)||0,r[0]>i[0]||r[0]==i[0]&&r[1]>i[1]||r[0]==i[0]&&r[1]==i[1]&&r[2]>=i[2]?!0:!1}function bt(r,u,o,s){var a,c,l;n.ie&&n.mac||(a=t.getElementsByTagName("head")[0],a)&&(c=o&&typeof o=="string"?o:"screen",s&&(e=null,tt=null),e&&tt==c||(l=h("style"),l.setAttribute("type","text/css"),l.setAttribute("media",c),e=a.appendChild(l),n.ie&&n.win&&typeof t.styleSheets!=i&&t.styleSheets.length>0&&(e=t.styleSheets[t.styleSheets.length-1]),tt=c),n.ie&&n.win?e&&typeof e.addRule==f&&e.addRule(r,u):e&&typeof t.createTextNode!=i&&e.appendChild(t.createTextNode(r+" {"+u+"}")))}function l(n,t){if(vt){var i=t?"visible":"hidden";c&&u(n)?u(n).style.visibility=i:bt("#"+n,"visibility:"+i)}}function kt(n){var t=/[\\\"<>\.;]/.exec(n)!=null;return t&&typeof encodeURIComponent!=i?encodeURIComponent(n):n}var i="undefined",f="object",st="Shockwave Flash",dt="ShockwaveFlash.ShockwaveFlash",p="application/x-shockwave-flash",ht="SWFObjectExprInst",ct="onreadystatechange",r=window,t=document,o=navigator,lt=!1,w=[gt],s=[],b=[],a=[],y,k,nt,at,c=!1,d=!1,e,tt,vt=!0,n=function(){var l=typeof t.getElementById!=i&&typeof t.getElementsByTagName!=i&&typeof t.createElement!=i,e=o.userAgent.toLowerCase(),s=o.platform.toLowerCase(),a=s?/win/.test(s):/win/.test(e),v=s?/mac/.test(s):/mac/.test(e),y=/webkit/.test(e)?parseFloat(e.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,h=!+"\v1",u=[0,0,0],n=null,c;if(typeof o.plugins!=i&&typeof o.plugins[st]==f)n=o.plugins[st].description,!n||typeof o.mimeTypes!=i&&o.mimeTypes[p]&&!o.mimeTypes[p].enabledPlugin||(lt=!0,h=!1,n=n.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),u[0]=parseInt(n.replace(/^(.*)\..*$/,"$1"),10),u[1]=parseInt(n.replace(/^.*\.(.*)\s.*$/,"$1"),10),u[2]=/[a-zA-Z]/.test(n)?parseInt(n.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof r.ActiveXObject!=i)try{c=new ActiveXObject(dt);c&&(n=c.GetVariable("$version"),n&&(h=!0,n=n.split(" ")[1].split(","),u=[parseInt(n[0],10),parseInt(n[1],10),parseInt(n[2],10)]))}catch(w){}return{w3:l,pv:u,wk:y,ie:h,win:a,mac:v}}(),fi=function(){n.w3&&((typeof t.readyState!=i&&t.readyState=="complete"||typeof t.readyState==i&&(t.getElementsByTagName("body")[0]||t.body))&&v(),c||
216(typeof t.addEventListener!=i&&t.addEventListener("DOMContentLoaded",v,!1),n.ie&&n.win&&(t.attachEvent(ct,function(){t.readyState=="complete"&&(t.detachEvent(ct,arguments.callee),v())}),r==top&&function(){if(!c){try{t.documentElement.doScroll("left")}catch(n){setTimeout(arguments.callee,0);return}v()}}()),n.wk&&function(){if(!c){if(!/loaded|complete/.test(t.readyState)){setTimeout(arguments.callee,0);return}v()}}(),pt(v)))}(),ei=function(){n.ie&&n.win&&window.attachEvent("onunload",function(){for(var r,i,u,f,e=a.length,t=0;t<e;t++)a[t][0].detachEvent(a[t][1],a[t][2]);for(r=b.length,i=0;i<r;i++)wt(b[i]);for(u in n)n[u]=null;n=null;for(f in swfobject)swfobject[f]=null;swfobject=null})}();return{registerObject:function(t,i,r,u){if(n.w3&&t&&i){var f={};f.id=t;f.swfVersion=i;f.expressInstall=r;f.callbackFn=u;s[s.length]=f;l(t,!1)}else u&&u({success:!1,id:t})},getObjectById:function(t){if(n.w3)return rt(t)},embedSWF:function(t,r,u,e,o,s,h,c,a,v){var y={success:!1,id:r};n.w3&&!(n.wk&&n.wk<312)&&t&&r&&u&&e&&o?(l(r,!1),yt(function(){var n,b,p,k,w,d;if(u+="",e+="",n={},a&&typeof a===f)for(b in a)n[b]=a[b];if(n.data=t,n.width=u,n.height=e,p={},c&&typeof c===f)for(k in c)p[k]=c[k];if(h&&typeof h===f)for(w in h)typeof p.flashvars!=i?p.flashvars+="&"+w+"="+h[w]:p.flashvars=w+"="+h[w];if(g(o))d=ot(n,p,r),n.id==r&&l(r,!0),y.success=!0,y.ref=d;else{if(s&&ut()){n.data=s;ft(n,p,r,v);return}l(r,!0)}v&&v(y)})):v&&v(y)},switchOffAutoHideShow:function(){vt=!1},ua:n,getFlashPlayerVersion:function(){return{major:n.pv[0],minor:n.pv[1],release:n.pv[2]}
216},hasFlashPlayerVersion:g,createSWF:function(t,i,r){return n.w3?ot(t,i,r):undefined},showExpressInstall:function(t,i,r,u){n.w3&&ut()&&ft(t,i,r,u)},removeSWF:function(t){n.w3&&wt(t)},createCSS:function(t,i,r,u){n.w3&&bt(t,i,r,u)},addDomLoadEvent:yt,addLoadEvent:pt,getQueryParamValue:function(n){var r=t.location.search||t.location.hash,u,i;if(r){if(/\?/.test(r)&&(r=r.split("?")[1]),n==null)return kt(r);for(u=r.split("&"),i=0;i<u.length;i++)if(u[i].substring(0,u[i].indexOf("="))==n)return kt(u[i].substring(u[i].indexOf("=")+1))}return""},expressInstallCallback:function(){if(d){var t=u(ht);t&&y&&(t.parentNode.replaceChild(y,t),k&&(l(k,!0),n.ie&&n.win&&(y.style.display="block")),nt&&nt(at));d=!1}}}}();TemplatesMgr._instance=null;TemplatesMgr.GetInstance=function(){return TemplatesMgr._instance||(TemplatesMgr._instance=new TemplatesMgr),TemplatesMgr._instance};TemplatesMgr.prototype={Highlight:function(n,t){var i=this.GetTemplateEditorByInnerElementID(n.msID);i&&i.HighlightZones&&i.HighlightZones(!0,t)},UnHighlight:function(n,t){var i=this.GetTemplateEditorByInnerElementID(n.msID);i&&i.HighlightZones&&i.HighlightZones(!1,t)},UpdateRenderInfo:function(n,t){var i=this.GetTemplateEditorByID(n);i&&i.UpdateRenderInfo&&i.UpdateRenderInfo(t)},UpdateTargetsColor:function(n,t,i){var r=this.GetTemplateEditorByID(n);
216r&&r.UpdateTargetsColor&&r.UpdateTargetsColor(t,i)},UpdateTargetReferences:function(n,t,i){var r=this.GetTemplateEditorByID(n);r&&r.UpdateTargetReferences&&r.UpdateTargetReferences(t,i)},UpdateTemplate:function(n,t,i){var r=this.GetTemplateEditorByID(n);r&&r.UpdateTemplate&&r.UpdateTemplate(t,i)},UpdatePageConfigButton:function(n,t){var i=this.GetTemplateEditorByID(n);i&&i.UpdatePageConfigButton&&i.UpdatePageConfigButton(t)},GetTemplateEditorByInnerElementID:function(n){var t=$("div[id='"+n+"']").closest(".template-container-main").find(".template-container").attr("id");return this.GetTemplateEditorByID(t)},GetTemplateEditorByID:function(n){if(typeof InDesignTemplate!="undefined")try{return InDesignTemplate.Instances[n]}catch(t){}if(typeof HTMLTemplate!="undefined")try{return HTMLTemplate.Instances[n]}catch(t){}}};UIComponentLoader.ResolveDependencies=function(n,t,i,r){var f,u,c;if(t!=null)for(f=0;f<t.length;f++)if(u=t[f],i[u.name]){var e=i[u.name].scopeName,o=i[u.name].name,s=u.behavior,h;h=Utils.IsStringFilled(e)?Matrix3.FindScopeWithName(n,e):Matrix3.FindScopeWithBindableElement(n,o,s,!0);c=BindableElementsMgr.GetInstance().UseElement(h,o,s);ExecutionContext.BindElement(r,u.name,c)}};UIComponentLoader.LoadComponent=function(n,t,i,r,u,f){Utils.LoadStylesheet(t,function(){},null,!0);Utils.LoadScript(i,function(){$('[id="'+u+'"]').length>0&&typeof window[r]=="function"&&window[r](u,f)},null,!0);Matrix3.RegisterForCleanup(n,"StopUsingBindableElement",function(){Object.keys(f).forEach(function(n){f[n].removeUsage&&f[n].removeUsage()})})};VFormEffects={SlideRight:function(n,t){$SetStyle(t.firstChild,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(t.firstChild,"float","left");$SetStyle(t.parentNode,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(t.parentNode,"overflow","hidden");$SetStyle(n,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(n,"float","left");$SetStyle(t,"width",Utils.GetWidth(t,!0)*2+"px");t.insertBefore(n,t.firstChild);t.parentNode.scrollLeft=Utils.GetWidth(t.parentNode,!0);$E(t.parentNode.id).animate({scrollTop:n.scrollTop,scrollLeft:0},{duration:VFormEffects.Const.DEFAULT_ANIMATION_LENGTH*100,complete:function(){VFormEffects._RemoveVForms(t,n.id);Matrix3.EvalScript(n);$SetStyle(t,"width",Utils.GetWidth(t,!0)/2+"px");$SetStyle(t.parentNode,"width","auto");$SetStyle(t,"width","auto");$SetStyle(t.firstChild,"width","100%");window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)}})},SlideLeft:function(n,t){$SetStyle(t.firstChild,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(t.firstChild,"float","left");$SetStyle(t.parentNode,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(t.parentNode,"overflow","hidden");$SetStyle(n,"width",Utils.GetWidth(t,!0)+"px");$SetStyle(n,"float","left");$SetStyle(t,"width",Utils.GetWidth(t,!0)*2+"px");t.appendChild(n);$E(t.parentNode.id).animate({scrollTop:n.scrollTop,scrollLeft:Utils.GetWidth(t.parentNode,!0)},{duration:VFormEffects.Const.DEFAULT_ANIMATION_LENGTH*100,complete:function(){VFormEffects._RemoveVForms(t,n.id);t.parentNode.scrollLeft=0;Matrix3.EvalScript(n);$SetStyle(t.parentNode,"width","auto");$SetStyle(t,"width","auto");$SetStyle(t.firstChild,"width","100%");window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)}})},SlideTop:function(n,t){var i=Utils.GetPageHeight()-Utils.GetY(t);$SetStyle(t.firstChild,"height",i+"px");$SetStyle(t.parentNode,"height",i+"px");$SetStyle(t.parentNode,"overflow","hidden");$SetStyle(n,"height",i+"px");$SetStyle(t,"height",i*2+"px");t.appendChild(n);$E(t.parentNode.id).animate({scrollTop:i,scrollLeft:n.scrollLeft},{duration:VFormEffects.Const.DEFAULT_ANIMATION_LENGTH*100,complete:function(){VFormEffects._RemoveVForms(t,n.id);t.parentNode.scrollTop=0;Matrix3.EvalScript(n);$SetStyle(t.parentNode,"height","100%");$SetStyle(t,"height","100%");$SetStyle(t.firstChild,"height","100%");window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)}})},SlideBottom:function(n,t){var i=Utils.GetPageHeight()-Utils.GetY(t);$SetStyle(t.firstChild,"height",i+"px");$SetStyle(t.parentNode,"height",i+"px");$SetStyle(t.parentNode,"overflow","hidden");$SetStyle(n,"height",i+"px");$SetStyle(t,"height",i*2+"px");t.insertBefore(n,t.firstChild);t.parentNode.scrollTop=i;$E(t.parentNode.id).animate({scrollTop:0,scrollLeft:n.scrollLeft},{duration:VFormEffects.Const.DEFAULT_ANIMATION_LENGTH*100,complete:function(){VFormEffects._RemoveVForms(t,n.id);Matrix3.EvalScript(n);$SetStyle(t.parentNode,"height","100%");$SetStyle(t,"height","100%");$SetStyle(t.firstChild,"height","100%");window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)}})},Replace:function(n,t){VFormEffects._RemoveVForms(t);t.appendChild(n);Matrix3.EvalScript(n);window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)},None:function(n,t,i){if(i)try{t.insertBefore(n,i)}catch(r){t.appendChild(n);Utils.IsIE11()?window.location.reload():Matrix3.LogError("AddVForm insertBefore failed. Performed an appendChild instead. _oNode.id:"+n.id+", _oNext.id:"+i.id+", _oParent.id"+t.id+", _oNode.innerHTML: "+n.innerHTML+", Exception:"+r.toString(),!0)}else t.appendChild(n);Matrix3.EvalScript(n);window.setTimeout(function(){Matrix3.FinishLoad()},Matrix3.Const.FINISH_LOAD_DELAY)},_RemoveVForms:function(n,t){for(var r=n.childNodes,i=0,u=r.length;i<u;i++)r[i].id&&t!=r[i].id&&Matrix3.RemoveVForm(r[i].id,null,null,!0)}};VFormEffects.Const={EFFECT_NONE:"None",EFFECT_REPLACE:"Replace",DEFAULT_ANIMATION_LENGTH:.3};WaitingPopupMgr.Const={MGR_NAME:"WaitingPopup",DEFAULT_SHOWING_DELAY:1e3,TEARDOWN_FALLBACK_DELAY:4e3};WaitingPopupMgr.moInstance=null;WaitingPopupMgr.GetInstance=function(){return WaitingPopupMgr.moInstance||(WaitingPopupMgr.moInstance=new WaitingPopupMgr),WaitingPopupMgr.moInstance};WaitingPopupMgr.Register=function(n,t,i){WaitingPopupMgr.GetInstance().moItems[n+"_"+t]=i};WaitingPopupMgr.RegisterConfig=function(n,t){WaitingPopupMgr.GetInstance().moConfigItems[n]=t};WaitingPopupMgr.prototype={Has:function(n,t){return!!this.moItems[n+"_"+t]},IsActive:function(){return this.msActiveID!=null},Show:function(n,t,i){var o=this.moItems[n+"_"+t],u,f,e;if((this.mbDebug&&console.log("WaitingPopup.Show",n,t,o),o)&&(u=this.moConfigItems[o],u)){this.Clean();this.msActiveID=n+"_"+t;var r=u.IsContextMenu?Param.TemplateWaitingPPContextMenu:Param.TemplateWaitingPP,h=u.Width||600,s=u.Height||700,c=i.y||0,l=i.x||0;r=r.replace(/\[WIDTH\]/g,h);r=r.replace("[HEIGHT]",s);r=r.replace("[TITLE]",u.Title);r=r.replace("[MESSAGE]",u.Message);r=r.replace("[POS_TOP]",c);r=r.replace("[POS_LEFT]",l);this.moPopup=$(r);f=this;e=parseInt(Param.DelayTimeBeforeShowingWaitingPopup);e=isNaN(e)?WaitingPopupMgr.Const.DEFAULT_SHOWING_DELAY:e;this.miShowPopupTimer=setTimeout(function(){var n=f.moPopup;if(n){u.IsContextMenu?f.MovePopupToViewPort($(n).children().first(),i,s,h):f.ShowMask();Popup.AdjustPopupPositionForDebugVForm(n);$("body").append(n);f.mbWaitingShown=!0;var o=n.find(".PopupHeaderPnl").height()||0,t=parseInt(n.find(".PopupHeaderC").css("margin-bottom"),10)||0,r=n.find(".PopupContentClass"),c=parseInt(r.css("font-size"),10)||0,e=s-o-t,l=(e-t)/2-c;r.css({height:e+"px","padding-top":l+"px"})}},e)}},Hide:function(n,t){if(this.msActiveID&&this.msActiveID==n+"_"+t)if(this.mbDebug&&console.log("WaitingPopup.Hide",n,t),this.mbWaitingShown&&this.moMask&&this.moMask.IsVisible()&&!UseBootstrap&&(!Param.EnableInhibitPositioning||!Matrix3.mbInhibitPositioning)){this.msActiveID=null;clearTimeout(this.miShowPopupTimer);this.miShowPopupTimer=0;this.mbTeardownPending=!0;var i=this;
216clearTimeout(this.miTeardownFallbackTimer);this.miTeardownFallbackTimer=setTimeout(function r(){if(i._IsAnyPopupPendingReveal()){i.miTeardownFallbackTimer=setTimeout(r,WaitingPopupMgr.Const.TEARDOWN_FALLBACK_DELAY);return}i.FinishTeardown()},WaitingPopupMgr.Const.TEARDOWN_FALLBACK_DELAY);$(document).unbind("PositioningCompleted.WaitingPopupTeardown").bind("PositioningCompleted.WaitingPopupTeardown",function(){i.mbTeardownPending&&!i._IsAnyPopupPendingReveal()&&i.FinishTeardown()})}else this.Clean(),this.HideMask()},_IsAnyPopupPendingReveal:function(){var t,n;for(t in Matrix3.moPopupTable)if(n=Matrix3.moPopupTable[t],n&&(n.mbPendingReveal||n.mbMaskHandoverDeferred))return!0;return!1},NotifyPopupRevealed:function(){this.mbTeardownPending&&this.FinishTeardown()},IsHandoverPending:function(){return this.mbTeardownPending&&!!this.moMask&&this.moMask.IsVisible()},FinishTeardown:function(){var t,n;for(t in Matrix3.moPopupTable)n=Matrix3.moPopupTable[t],n&&n.mbMaskHandoverDeferred&&(n.mbMaskHandoverDeferred=!1,n.moMask&&n.moMask.Show());this.Clean();this.HideMask()},Clean:function(){var n=this.moPopup;this.moPopup=null;clearTimeout(this.miShowPopupTimer);this.miShowPopupTimer=0;clearTimeout(this.miTeardownFallbackTimer);this.miTeardownFallbackTimer=0;this.mbTeardownPending=!1;this.mbWaitingShown=!1;$(document).unbind("PositioningCompleted.WaitingPopupTeardown");this.msActiveID=null;n&&n.remove()},ShowMask:function(){this.moMask||(this.moMask=Utils.BuildMask("WaitingPP_Mask",Popup.Const.MASK_CLASS));this.moMask.Show()},HideMask:function(){this.moMask&&this.moMask.Hide()},MovePopupToViewPort:function(n,t,i,r){var e=Utils.GetViewportWidth(),o=Utils.GetViewportHeight(),u=t.x,f=t.y;u+r>e&&(u=e-r-15,u<0&&(u=0));f+i>o&&(f=o-i);$SetCss(n,{left:u+"px",top:f+"px"})}};var _TOOLBAR_TOKEN_MAP={undo:"undo",redo:"redo",bold:"bold",italic:"italic",underline:"underline",strikethrough:"strike",superscript:"superscript",subscript:"subscript",forecolor:"textColor",backcolor:"highlight",hilitecolor:"highlight",lineheightselect:"lineHeight",alignleft:"alignLeft",aligncenter:"alignCenter",alignright:"alignRight",alignjustify:"alignJustify",bullist:"bulletList",numlist:"orderedList",blockquote:"blockquote",outdent:"outdent",indent:"indent",formatselect:"block",styleselect:"styleFormats",fontsizeselect:"fontSize",fontselect:"fontFamily",link:"link",image:"image",media:"video",table:"table",anchor:"anchor",codesample:"codeBlock",code:"code",aside:"aside",spellchecker:"spellcheck",removeformat:"clearTextFormatting"},_MENU_BAR_MAP={edit:"edit",insert:"insert",format:"format",table:"table"},_INLINE_FORMAT_TAGS=new Set(["STRONG","B","EM","I","U","S","STRIKE","SUB","SUP","CODE","SPAN"]),_REMOVED_MENU_ITEM_MAP={pastetext:"pastePlain"};window.addEventListener("beforeunload",function(){window.tinymce&&(Matrix3.mbDontShowUnsavedChangesPopup||Matrix3.mbPostBackRequested)&&tinymce.get().forEach(function(n){n.setDirty(!1)})},!0);WysiwygManager={mbHasNewConfigs:!1,moWysiwygConfigs:{},moEditors:{},moDivLoader:{},moWebComponentConfigs:{},Const:{MGR_NAME:"WysiwygManager",WEB_COMPONENT_NAME:"cx-rich-text",WEB_COMPONENT_WYSIWYG_ID_ATTR:"data-wysiwyg-id",ASSET_PICKER_ZINDEX_BOOST:65535,WEB_COMPONENT_ADD_TO_HISTORY:"addToHistory"},Subscribe:function(n,t){this.moWysiwygConfigs[n]=t;this.mbHasNewConfigs=!0},AddOptions:function(n,t,i){this.moWysiwygConfigs[n][t]=i},Setup:function(){var e,i,o,s,n,r,u,t,f;if(this.InitWebComponents(),this.mbHasNewConfigs===!0){e=this;this.moDivLoader&&this.moDivLoader.parentNode&&this.moDivLoader.parentNode.removeChild(this.moDivLoader);this.moDivLoader=this.AddLoaderDiv();$E(Object.keys(this.moWysiwygConfigs)[0]).parent().parent().append(this.moDivLoader);i=[];o=[];
216for(s in this.moWysiwygConfigs){if(n=this.moWysiwygConfigs[s],"extra_scripts"in n&&(typeof n.extra_scripts=="string"||n.extra_scripts instanceof String))for(r=JSON.parse(n.extra_scripts),Array.isArray(r)||(r=[r]),t=0;t<r.length;t++)n.cache_suffix?i.push(r[t]+n.cache_suffix):i.push(r[t]);if("extra_styles"in n&&(typeof n.extra_styles=="string"||n.extra_styles instanceof String))for(u=JSON.parse(n.extra_styles),Array.isArray(u)||(u=[u]),t=0;t<u.length;t++)o.push(u[t])}f="5.4.2";"tinymce_version"in n&&(f=n.tinymce_version);n.cache_suffix?i.push("Include/Vendors/tinymce_"+f+"/tinymce.min.js"+n.cache_suffix):i.push("Include/Vendors/tinymce_"+f+"/tinymce.min.js");i=i.filter(function(n,t,i){return i.indexOf(n)===t});o=o.filter(function(n,t,i){return i.indexOf(n)===t});typeof tinymce=="undefined"?Utils.LoadScript(i,function(){jQuery().tinymce?e.InitAll():Utils.LoadScript(["Include/Vendors/tinymce_"+f+"/jquery.tinymce.min.js","Include/Matrix5/OnDemand/ImagePaste/ImagePasteAsync.js",],function(){e.InitAll()},null,!0)},null,!0):e.InitAll()}},InitAll:function(){for(var n in this.moWysiwygConfigs)this._InternalSetup(n);this.moWysiwygConfigs={};this.mbHasNewConfigs=!1},_ConstructAutoCompleteCreateEntry:function(n,t){var i=$PI(t).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_TEMPLATE)||"";return{type:"autocompleteitem",value:AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE+"_"+n,text:i.replace(AutoCompletionProperties.Const.CREATE_ENTRY_TAG_TEXT,n),icon:"plus"}},_InternalSetup:function(n){var i=$E(n),c,t,l,a,u,b,v,k,tt,e,o,s,p,w,f,h,r;if(typeof tinymce!="undefined"&&typeof tinymce.get=="function"&&(c=tinymce.get(n),c))try{c.remove()}catch(it){try{c.destroy(!0)}catch(t){}tinymce.get(n)&&console.error("WysiwygManager: failed to remove stale editor "+n,it)}if(t=this.moWysiwygConfigs[n],typeof t!="object"&&(t={}),l=!1,"ice"in t&&(typeof t.ice=="string"||t.ice instanceof String)&&(t.ice=JSON.parse(t.ice),l=typeof TinyMCE_Review!="undefined"),l&&(TinyMCE_Review.Instances[t.field_external_id]=new TinyMCE_Review({ID:n}),TinyMCE_Review.Instances[t.field_external_id].PostSetup(t)),i.css("visibility","visible"),a=$PI(n),a){u="5.4.2";"tinymce_version"in t&&(u=t.tinymce_version);b=$("base").attr("href");tinymce.baseURL=b+"Include/Vendors/tinymce_"+u+"/";tinymce.dom.Event.domLoaded=!0;tinymce.suffix=".min";"width"in t==!1&&(t.width=a.miWidth-2);"height"in t==!1&&(t.height=a.miHeight-(u[0]==="5"?30:150));t.resize="resize"in t==!1?!1:t.resize.toString()==="true";typeof t.plugins=="undefined"&&(t.plugins="");v=t.disable_autosave;v&&(v.toString().toLowerCase()==="true"||v.toString()==="1")&&(t.plugins=t.plugins.split(" ").filter(function(n){return n!=="autosave"}).join(" "));"link_context_toolbar"in t&&t.link_context_toolbar.toLowerCase()==="true"&&(t.plugins+=" autolink link",t.default_link_target="_blank");t.plugins+=" importcss";t.content_css=$.map($('link[rel="stylesheet"]'),function(n){var t=$(n).attr("href");return t&&(t=t.replace(/,/g,"%2C")),t}).join(", ")+", Include/Vendors/tinymce_"+u+"/CortexSpecific/RestoreDefaults.css?v=1";t.cache_suffix&&(t.content_css+=t.cache_suffix);u[0]==="4"&&typeof t.placeholder!="undefined"?t.plugins+=" placeholder":t.plugins.indexOf("textcolor")>=0&&(t.plugins=t.plugins.replace("textcolor",""));t.hasOwnProperty("style_formats")&&(t.style_formats=JSON.parse(t.style_formats));t.importcss_exclusive=!0;k=[];t.hasOwnProperty("filtered_style_formats")&&(k=JSON.parse(t.filtered_style_formats));t.importcss_selector_converter=function(n){var t=[];return function(i){var f=Utils.StartsWith(i,".InLn-"),s=Utils.StartsWith(i,".Blck-"),e,o,r,u;return(f||s)&&i.length>15&&i.indexOf(":")==-1&&i.indexOf(" ")==-1?n.length&&(e=i.substr(6,8),n.indexOf(e)<0)?null:i&&i.toLowerCase().indexOf("zz_deprected")>-1?null:(o=i.substr(15).replace(/-/g," "),r=i.substr(1,13),t.includes(r)?r=i.substr(1):t.push(r),u={title:o,styles:{clop:"auto"},attributes:{"class":r},onmatch:function(n,t,i){return i==="styles"?!0:$(n).hasClass(r)},onformat:function(n,t,i,r){var u=$(r).parents();n.innerHTML==""&&n.nodeName==="SPAN"&&$(r).data("mce-type")==="format-caret"&&t.inline&&u.length>=2&&u[0].nodeName==="SPAN"&&$(u[1]).data("mce-type")==="format-caret"&&$(r).insertAfter(u[1])}},f?u.inline="span":(u.block="div",u.wrapper=!0),u):null}}(k);t.branding=!1;t.relative_urls=!1;t.convert_urls=!1;t.remove_script_host=!1;t.allow_unsafe_link_target=!0;t.forced_root_block=t.hasOwnProperty("forced_root_block")?String(t.forced_root_block)==="true":!1;t.force_br_newlines=t.hasOwnProperty("force_br_newlines")?String(t.force_br_newlines)==="true":!1;t.force_p_newlines=t.hasOwnProperty("force_p_newlines")?String(t.force_p_newlines)==="true":!0;t.convert_newlines_to_brs=t.hasOwnProperty("convert_newlines_to_brs")?String(t.convert_newlines_to_brs)==="true":!1;t.hasOwnProperty("formats")&&(t.formats=JSON.parse(t.formats));t.selector="#"+n.replace(/\./gi,"\\.").replace(/:/gi,"\\:");t.hasOwnProperty("font_formats")||(t.font_formats="Arial=arial,helvetica,sans-serif;Courier New=courier new,courier,monospace;AkrutiKndPadmini=Akpdmi-n");t.fontsize_formats="8px 9px 10px 11px 12px 13px 14px 15px 16px 18px 20px 22px 24px 26px 30px 36px 42px 72px";t.table_default_attributes={"class":"mce-table"};t.table_class_list=[{title:"None",value:"mce-table"},{title:"List of values",value:"mce-table-ValueList"}];t.hasOwnProperty("menubar")&&String(t.menubar).toLowerCase()=="false"&&(t.menubar=!1);t.hasOwnProperty("statusbar")&&String(t.statusbar).toLowerCase()=="false"&&(t.statusbar=!1);t.hasOwnProperty("image_caption")&&(t.image_caption=String(t.image_caption).toLowerCase()=="false"?!1:!0);t.hasOwnProperty("toolbar")&&String(t.toolbar).toLowerCase()=="false"&&(t.toolbar=!1);
216t.hasOwnProperty("media_alt_source")&&String(t.media_alt_source).toLowerCase()=="false"&&(t.media_alt_source=!1);t.hasOwnProperty("media_poster")&&String(t.media_poster).toLowerCase()=="false"&&(t.media_poster=!1);var d={},rt=t.required==="True",g=function(n,t){var s=d[t.id],f=t.getContent(),e,r,o,u;if(f!=s){d[t.id]=f;r=null;e=$E(t.id);try{r=$Control(t.id);r&&(e.addClass("dirty"),WysiwygManager.SetValueOnRealTextareas())}catch(h){}if(o=$(".mce-tinymce.mce-container",i.parent()),rt&&f.length===0?o.css("border-color","#ff9b9b"):o.css("border-color",""),e.keydown(),r&&r.Event_Change)try{t.dom.doc.getElementsByClassName("paste-pending").length===0&&r.ChangeEvent(n,undefined)}catch(c){r.ChangeEvent(n,undefined)}u=null;t&&t.iframeElement&&t.iframeElement.contentWindow&&t.iframeElement.contentWindow.document&&(u=t.iframeElement.contentWindow.document.querySelectorAll('table.mce-table[data-mce-selected="1"]'));u&&u.length>0&&u.forEach(function(n){n.dispatchEvent(new MouseEvent("mouseover",{bubbles:!0}))})}},ut=function(n,t){try{$(n.target.editorContainer).addClass("focused");var i=$Control(t.id);i&&i.Event_Focus&&(i.InternalFocusEvent?i.InternalFocusEvent(n):i.Event_Focus.Fire())}catch(r){}},ft=function(n,t){try{$(n.target.editorContainer).removeClass("focused");var i=$Control(t.id);i&&(i.Event_Blur&&(i.InternalBlurEvent?i.InternalBlurEvent(n):i.Event_Blur.Fire()),i.Event_BlurAdv&&(i.InternalBlurAdvEvent?i.InternalBlurAdvEvent(n):i.Event_BlurAdv.Fire()))}catch(r){}},et=function(n,t){try{var i=$Control(t.id);i.Event_Click&&i.Event_Click.forEach(function(n){n.Fire()})}catch(r){}},nt=t.single_line==="true",y=[];if(t.forbidden_keycode&&t.forbidden_keycode.split(",").forEach(function(n){var t=parseInt(n.trim());isNaN(t)||y.push(t)}),nt&&(y.push(10),y.push(13)),tt=function(n){try{y.indexOf(n.keyCode)>-1&&n.preventDefault()}catch(t){}},e=t.element_id_to_clone_style,e&&delete t.element_id_to_clone_style,t.switchable_to_advanced){o=0;s="";for(p in t)t.hasOwnProperty(p)&&p.indexOf("toolbar")===0&&(o===0&&(s=p),++o);if(t.advanced_tool_bar_count=o,t.hasOwnProperty("base_toolbars"))for(w=JSON.parse(t.base_toolbars),f=0;f<w.length;f++)f===0&&(w[f]+=" | toadvancedmode"),t["toolbar"+(o+f+1)]=w[f];else s="";s.length>0&&(t[s]+=" | tosimplemode");t.has_menu_bar_setup=t.has_menu_bar_setup==="true"}h=this;r=AutoCompletionMgr.Get(n);t.hasOwnProperty("enable_auto_complete")&&String(t.enable_auto_complete).toLowerCase()=="true"&&(t.enable_auto_complete=!0,t.plugins+=" noneditable");t.setup=function(f){if(t.enable_auto_complete&&r&&f.ui.registry.addAutocompleter("specialchars_cardmenuitems",{ch:"@",minChars:1,columns:1,onAction:function(n,t,i){if(f.selection.setRng(t),i.startsWith(AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE)){i=i.replace(AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE+"_","");f.insertContent('<span data-value="%CREATE_ENTRY%" data-type="" class="mceNonEditable">'+i+"<\/span>");var u=r.moEvents.select;Matrix3.AddEvent(u.vform_id,u.name,u.type,u.delay,i,u.comm,u.commargs,null,null,null,null,u.pls_wait_msg,null,null,null,u.block_interaction)}else f.insertContent(i);n.hide()},highlightOn:["bodyText"],maxResults:r.moOptions.iMaxResults,minChars:r.moOptions.iMinLength,fetch:function(t){return new tinymce.util.Promise(function(i){var u=r._GetQueryAppend(t);$.ajax({type:"POST",dataType:"json",timeout:r.moOptions.iQueryTimeout,url:AutoCompletionProperties.Const.URL,data:u,error:function(){i([])},success:function(u){var f=r._GetResultObjectFromQueryResponse(u,"@"+t);if($.isEmptyObject(f))return _ConstructAutoCompleteCreateEntry(t,n);i(f.filter(function(n){return!!n.bodyValue}).map(function(i){return i.bodyValue===AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE?WysiwygManager._ConstructAutoCompleteCreateEntry(t,n):{type:"cardmenuitem",value:'<span data-value="'+i.bodyValue+'" data-type="'+i.type+'" class="mceNonEditable"> @'+i.label+"<\/span>",lable:i.bodyText+"<b> tag: "+i.tag+"<\/b>",items:[{type:"cardcontainer",direction:"horizontal",align:"left",valign:"top",items:[{type:"cardtext",text:i.bodyText,name:"bodyText",classes:["body-text"]},{type:"cardtext",text:i.tag,classes:["body-tag"]}]}]}}))}})})}}),f.settings.switchable_to_advanced){f.ui.registry.addIcon("ol_toggle_on",'<svg width="30" height="18" viewBox="0 0 30 18" fill="none"><rect width="30" height="18" rx="9" fill="#8BD284"/><circle cx="21" cy="9" r="8" fill="white"/><path d="M20.0001 10.39L18.6101 9.00001L18.1384 9.47168L20.0001 11.3333L24.0001 7.33335L23.5284 6.86168L20.0001 10.39Z" fill="#65C366"/><\/svg>');f.ui.registry.addIcon("ol_toggle_off",'<svg width="30" height="18" viewBox="0 0 30 18" fill="none"><rect width="30" height="18" rx="9" fill="#D3D3DE"/><circle cx="9" cy="9" r="8" fill="white"/><path d="M11.3334 7.13834L10.8617 6.66667L9.00008 8.52834L7.13841 6.66667L6.66675 7.13834L8.52841 9.00001L6.66675 10.8617L7.13841 11.3333L9.00008 9.47167L10.8617 11.3333L11.3334 10.8617L9.47175 9.00001L11.3334 7.13834Z" fill="#BEBECB"/><\/svg>');f.ui.registry.addIcon("line-height",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
216<path d="M9.984 12.984v-1.969h12v1.969h-12zM9.984 18.984v-1.969h12v1.969h-12zM9.984 5.016h12v1.969h-12v-1.969zM6 6.984v10.031h2.484l-3.469 3.469-3.516-3.469h2.484v-10.031h-2.484l3.516-3.469 3.469 3.469h-2.484z"><\/path><\/svg>');var o=function(){var r=i.parent(),h=$(".tmce-modeswitcher",r),e=$(".tox-menubar",r),o=h.closest(".tox-toolbar__group"),s,n,u;if(o.css({"margin-left":"auto","border-right":"none"}),o.hide(),s=localStorage.getItem(f.settings.pref_instance_key+"_lastUsedMode"),s==="advanced")e.show(),n=$(".tox-toolbar",r),n&&n.length>t.advanced_tool_bar_count&&n.each(function(n,i){n<t.advanced_tool_bar_count?$(i).show():$(i).hide()});else if(f.settings.has_menu_bar_setup||e.hide(),n=$(".tox-toolbar",r),n&&n.length>t.advanced_tool_bar_count)for(u=0;u<t.advanced_tool_bar_count;u++)$(n[u]).hide()},a=function(){var n=i.parent(),r=$(".tox-toolbar",n);$(".tox-menubar",n).show();r&&r.length>t.advanced_tool_bar_count&&r.each(function(n,i){n<t.advanced_tool_bar_count?$(i).show():$(i).hide()});$(".tmce-simple",n).closest(".tox-toolbar__group").show();$(".tmce-advanced",n).closest(".tox-toolbar__group").hide();localStorage.setItem(f.settings.pref_instance_key+"_lastUsedMode","advanced")},v=function(){var n=i.parent(),r=$(".tox-toolbar",n);f.settings.has_menu_bar_setup||$(".tox-menubar",n).hide();r&&r.length>t.advanced_tool_bar_count&&r.each(function(n,i){n<t.advanced_tool_bar_count?$(i).hide():$(i).show()});$(".tmce-simple",n).closest(".tox-toolbar__group").hide();$(".tmce-advanced",n).closest(".tox-toolbar__group").show();localStorage.setItem(f.settings.pref_instance_key+"_lastUsedMode","simple")};f.ui.registry.addButton("toadvancedmode",{icon:"ol_toggle_off",text:'<span class="tmce-modeswitcher tmce-advanced">Advanced mode<\/span>',tooltip:"Switch to advanced mode",onAction:a,onSetup:o});f.ui.registry.addButton("tosimplemode",{icon:"ol_toggle_on",text:'<span class="tmce-modeswitcher tmce-simple">Advanced mode<\/span>',tooltip:"Switch to simple mode",onAction:v,onSetup:o});f.ui.registry.addMenuButton("lineheightselect",{tooltip:"Line height",icon:"line-height",fetch:function(n){var t=f.settings.lineheight_formats,i=typeof t=="string"?t:"100% 125% 133% 150% 200% 300% 400% 500%",r=i.split(" ").map(function(n){var i=n,r=n,t=n.split("=");return t.length>1&&(i=t[0],r=t[1]),{type:"menuitem",text:i,onAction:function(){f.formatter.apply("lineheight",{value:r});f.fire("change",{})}}});n(r)}})}f.on("change SetContent LoadContent",function(){WysiwygManager.NormalizeInlineSkinSpanOrder(f)});f.on("keyup",function(n){g(n,f)});f.on("change",function(n){g(n,f)});f.on("focus",function(n){ut(n,f)});f.on("blur",function(n){ft(n,f)});f.on("click",function(n){et(n,f)});f.on("AddStyleModifications",function(n){var i=f.settings.style_formats,t;for(i&&Array.isArray(i)||(f.settings.style_formats=[]),t=0;t<n.items.length;t++)f.settings.style_formats.push(n.items[t])});var y=$(".PopupScrollContainer").css("overflow"),s=$("[id$=ShowShortcuts]"),c=$("[id$=_Close]"),p=function(){if(!document.getElementById("WysiwygFullscreenAuxStyle")){var n=document.createElement("style");n.id="WysiwygFullscreenAuxStyle";n.textContent=".tox-tinymce-aux[popover] > * { pointer-events: auto; }";document.head.appendChild(n)}Utils.ShowPopover(f.getContainer());$(".tox-tinymce-aux").each(function(){Utils.ShowPopover(this);this.style.inset="0 auto auto 0";this.style.width="100vw";this.style.height="100vh";this.style.overflow="visible";this.style.pointerEvents="none"})},l=function(){$(".tox-tinymce-aux").each(function(){Utils.HidePopover(this);this.style.inset="";this.style.width="";this.style.height="";this.style.overflow="";this.style.pointerEvents=""});Utils.HidePopover(f.getContainer())};f.on("FullscreenStateChanged",function(n){n.state?(s.addClass("InvisibleC"),c.addClass("InvisibleC"),$(".PopupScrollContainer").css("overflow","hidden"),p()):(s.removeClass("InvisibleC"),c.removeClass("InvisibleC"),$(".PopupScrollContainer").css("overflow",y),l())});f.on("remove",l);f.on("init",function(r){var o=i.parent(),c=$(".tox-menubar",o),l,s,p,e;c.append($(".tmce-simple",o).closest(".tox-toolbar__group"));f.settings.has_menu_bar_setup&&c.append($(".tmce-advanced",o).closest(".tox-toolbar__group"));
216l=localStorage.getItem(f.settings.pref_instance_key+"_lastUsedMode");l==="advanced"?($(".tmce-simple",o).closest(".tox-toolbar__group").show(),$(".tmce-advanced",o).closest(".tox-toolbar__group").hide()):($(".tmce-simple",o).closest(".tox-toolbar__group").hide(),$(".tmce-advanced",o).closest(".tox-toolbar__group").show());f.mode.isReadOnly()&&(f.getBody().style.backgroundColor="var(--cx-color-a--100)");h.moDivLoader.parentNode&&h.moDivLoader.parentNode.removeChild(h.moDivLoader);u[0]==="4"&&(s=parseInt(f.settings.height),f.settings.adaptive_height&&!isNaN(s)&&h.ResizeTextAreaLength(f,s));var v=f.getContent(),y=t.required==="True",a=$(".mce-tinymce.mce-container",i.parent());y&&v.length===0?a.css("border-color","#ff9b9b"):a.css("border-color","");f.settings.hasOwnProperty("charcounter_countType")&&$(f.getElement()).simplyCountable({counter:f.settings.charcounter_counter,countType:f.settings.charcounter_countType,lowerLimit:f.settings.charcounter_lowerLimit,upperLimit:f.settings.charcounter_upperLimit,tinymce:f,endsWithNewLine:f.settings.force_br_newlines,keepHtml:f.settings.charcounter_keepHtml});f.settings.hasOwnProperty("linecounter_countType")&&$(f.getElement()).simplyCountable({counter:f.settings.linecounter_counter,countType:f.settings.linecounter_countType,lowerLimit:f.settings.linecounter_lowerLimit,upperLimit:f.settings.linecounter_upperLimit,tinymce:f,endsWithNewLine:f.settings.force_br_newlines});t.default_font&&r.target.editorCommands.execCommand("fontName",!1,t.default_font);nt&&(p=$(r.target.iframeElement).contents().find("body").addClass("single-line"),$(r.target.iframeElement).attr("scrolling","no"));t.disable_skype_toolbar==="true"&&$(r.target.iframeElement).contents().find("head").append('<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE">');typeof WYSIWYG_ImagePasted_Replace_Handlers=="undefined"&&(WYSIWYG_ImagePasted_Replace_Handlers={});e=Utils.GetVFormId(n);WYSIWYG_ImagePasted_Replace_Handlers[e]=function(n,t,i){var e=tinymce.get(n+":Editor")||tinymce.get(n+":Field")||tinymce.get(n+":Value")||tinyMCE.activeEditor,r,u,f;e&&e.dom&&(r=e.dom,u=$(r.doc.getElementsByClassName(t)),r.setAttrib(u,"src",i),r.removeClass(u,"paste-pending"),r.getAttrib(u,"width")&&r.getAttrib(u,"height")||(f=new Image,f.onload=function(){r.setAttrib(u,"width",f.naturalWidth);r.setAttrib(u,"height",f.naturalHeight)},f.src=i),WysiwygImagePasteUtils.RemoveImageBlobCache(t))};WYSIWYG_ImagePasted_Replace_Handlers[e].VFormID=e;WYSIWYG_ImagePasted_Replace=WYSIWYG_ImagePasted_Replace_Handlers[e];Utils.LoadScript(["Include/Matrix5/OnDemand/ImagePaste/ImagePasteAsync.js"],function(){var t=tinymce.get(e+":Editor")||tinymce.get(e+":Field")||tinymce.get(e+":Value")||tinyMCE.activeEditor,i;t&&t.dom&&(i=t.dom,$(i.doc.getElementsByClassName("paste-pending")).each(function(){var t=$(this),i=t.attr("src"),r;i?(r={uri:i,id:t.attr("id")},WysiwygImagePasteUtils.FetchAndUploadImage(Utils.GetVFormId(n),r,function(){})):t.removeClass("paste-pending")}))},null,!0);f.formatter.register({lineheight:{selector:"p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,aside,pre",styles:{"line-height":"%value"}}})});if(e)f.on("init",function(n){var t=$("div[id='"+e+"'] > span, div[id='"+e+"'] > div"),r,i;t&&t.length!=0||(t=$("[id = '"+e+"']"));t&&t.length&&(r=document.defaultView.getComputedStyle(t[0],null),i=$(n.target.iframeElement).contents().find("body"),$.each(r,function(n,r){if(r=="color"||r=="letter-spacing"||r=="line-height"||Utils.StartsWith(r,"text")||Utils.StartsWith(r,"font")||Utils.StartsWith(r,"word"))if(Utils.StartsWith(r,"text-decoration")&&t.css("text-decoration-line")==="none")i.css("text-decoration","none");else if(r=="line-height"){var u=!!t.find("[style*='font-size']:not([style*='line-height'])").toArray().find(function(n){return $(n).css("font-size")!==t.css("font-size")&&$(n).css("line-height")!==t.css("line-height")});u?i.css(r,parseFloat(t.css(r))/parseFloat(t.css("font-size"))):i.css(r,t.css(r))}else i.css(r,t.css(r))}))});f.on("keydown",function(n){tt(n,f)});f.on("LoadContent",function(){f.contentLoaded=!0;f.dom.run(f.dom.select("span[contenteditable='false']"),function(n){f.dom.setOuterHTML(n,"<span>"+n.outerHTML+"<\/span>")})});f.on("BeforeSetContent",function(n){var t,i;n.paste&&(t=f.selection.getRng(),t.startContainer===t.endContainer&&t.startOffset===t.endOffset&&t.startContainer.nodeType===Node.TEXT_NODE&&(i=t.startContainer.parentNode,i&&i.nodeType===Node.ELEMENT_NODE&&!i.isContentEditable&&(n.preventDefault(),n.stopPropagation())))})};t.document_base_url=b;t.file_picker_types="image media";t.file_picker_callback=function(t,i,r){StackMgr.GetInstance().Increment(65535);WYSIWYG_AssetPicked=function(n,i){StackMgr.GetInstance().Decrement
216(65535);"ERID"in i&&n.indexOf("AssetLink")>=0&&(n+="?erid="+i.ERID);t(n,i);document.addEventListener("loadedmetadata",function(n){n.target.poster=n.target.poster+"?v=1"},!0)};WYSIWYG_AssetPickAborted=function(){StackMgr.GetInstance().Decrement(65535)};r.filetype==="image"?Matrix3.AddEvent(Utils.GetVFormId(n),"WYSIWYG_PICK_IMG",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","",""):r.filetype==="media"&&Matrix3.AddEvent(Utils.GetVFormId(n),"WYSIWYG_PICK_VIDEO",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","")};t.target=i;t.browser_spellcheck=!0;WYSIWYG_ImagePaste_AssetPicked=function(n,t){var i='<img class="paste-pending '+t.id+'" id="'+t.id+'" src="'+n+'" ';if(t)for(attr in t)i+=" "+attr+'="'+t[attr]+'" ';i+=" />";tinymce.activeEditor.insertContent(i)};"disable_image_paste"in t&&t.disable_image_paste||(t.paste_data_images="paste_data_images"in t&&(t.paste_data_images===!0||t.paste_data_images==="true"),t.paste_preprocess=function(t,i){var r=i.content,u;r.indexOf("data-p")!==-1&&(u=$("<div>").html(r),u.find(".CT[data-p]").each(function(){$(this).replaceWith($(this).contents())}),r=u.html(),i.content=r);Utils.StartsWith(r,"<img")&&$(r).attr("src")?(i.preventDefault(),WysiwygImagePasteUtils.HandleSingleImageBlobPaste(Utils.GetVFormId(n),r)):WysiwygImagePasteUtils.IsPastedContentHasEligibleImages(r)&&(i.preventDefault(),WysiwygImagePasteUtils.HandleMultiplePastedImagesContent(Utils.GetVFormId(n),r,!0))}),function(n,t,i){n.auto_focus=n.auto_focus?t:!1;tinyMCE.init(n).then(function(t){i&&TinyMCE_Review.Instances[n.field_external_id].PostInit(tinyMCE,t)})}(t,n,l);this.moEditors[n]=i;Matrix3.RegisterInCache(n,WysiwygManager)}},SetValueOnRealTextareas:function(){var l={},t,r,e,i,o,n,a,u,s,h,c,f;if(typeof this.moEditors=="object"&&typeof tinymce!="undefined")for(t in this.moEditors)if(this.moEditors.hasOwnProperty(t)&&(r=this.moEditors[t],r&&typeof r.tinymce!="undefined"&&typeof r.tinymce()!="undefined"&&(e=document.getElementById(t),e)))try{if(n=r.tinymce(),n.contentLoaded){if(typeof this.moEditors[t].beforeUnloadImagePasteHandlerConfirm=="undefined"&&(this.moEditors[t].beforeUnloadImagePasteHandlerConfirm=function(t){if(n&&n.dom&&n.dom.doc){var i=n.dom.doc.getElementsByClassName("paste-pending").length!==0;if(i)return t.preventDefault(),t.stopPropagation(),"Pending images found"}},$(window).bind("beforeunload",this.moEditors[t].beforeUnloadImagePasteHandlerConfirm)),a=n.dom.doc.getElementsByClassName("paste-pending").length!==0,i=n.settings.content_get_format?n.getContent({format:r.tinymce().settings.content_get_format}):n.getContent(),a){if(u=$('<div style="display:none"><\/div>'),u.hide().append($(i)),u.children().length&&(s=u.children().children("img.paste-pending"),s.length))for(h=0;h<s.length;h++)c=this.moWysiwygConfigs[t],typeof c!="object"&&c.attach_image_only==="true"?s[h].remove():s[h].setAttribute("src",null);i=u.html();u.remove()}e.value=i;o=n.getContent({format:"text"})}else i=e.value,o=e.value;f=$("<div>"+o+"<\/div>");f.find("iframe").css("position","relative");o=f[0].innerHTML;f=$("<div>"+i+"<\/div>");f.find("iframe").css("position","relative");i=f[0].innerHTML;l[t]=[i,o]}catch(v){}return l},ResizeTextAreaLength:function(n,t){var i;if(typeof n.theme.resizeTo!="undefined"&&(i=$(n.getElement()).parent(),i)){var r=i.find(".mce-menubar.mce-toolbar"),u=i.find(".mce-toolbar-grp"),f=i.find(".mce-statusbar"),e=t-(r&&r.length==1?r.outerHeight():0)-(u&&u.length==1?u.outerHeight():0)-(f&&f.length==1?f.outerHeight():0);n.theme.resizeTo(undefined,e>0?e:0)}},_IsExplicitInlineFormatNode:function(n){var i,t,r;if(!_INLINE_FORMAT_TAGS.has(n.nodeName))return!1;for(i=n.attributes,t=0;t<i.length;t++)if(r=i[t].name,r!=="style"&&r!=="data-mce-style")return!1;return n.nodeName!=="SPAN"||n.hasAttribute("style")},NormalizeInlineSkinSpanOrder:function(n){var l=n.getBody?n.getBody():null,s,u,f,h,e,o,c;if(l){for(s=l.querySelectorAll('span[class^="InLn-"], span[class*=" InLn-"]'),u=null,f=0;f<s.length;f++){for(var t=s[f],i=[],r=t.parentNode;r&&r.nodeType===1&&WysiwygManager._IsExplicitInlineFormatNode(r);)i.push(r),r=r.parentNode;if(i.length!==0){for(u===null&&(u=n.selection.getBookmark()),h=t.ownerDocument.createDocumentFragment();t.firstChild;)h.appendChild(t.firstChild);for(e=t,o=i.length-1;o>=0;o--)c=i[o].cloneNode(!1),e.appendChild(c),e=c;e.appendChild(h);n.dom.split(i[i.length-1],t)}}u!==null&&n.selection.moveToBookmark(u)}},RefreshNode:function(n){var u,i,f,t,r,e;if(delete this.moEditors[n],typeof tinymce!="undefined"&&typeof tinymce.get=="function"&&(u=tinymce.get(n),u)){i=null;f=null;try{i=u.getElement()||document.getElementById(n);i&&(f=i.value)}catch(o){}u.remove();i&&f!==null&&(i.value=f)}t=document.querySelector(WysiwygManager.Const.WEB_COMPONENT_NAME+'[data-wysiwyg-id="'+n+'"]');t&&(t._advancedModeChangeHandler&&(t.removeEventListener("cx-rich-text-advanced-mode-change",t._advancedModeChangeHandler),delete t._advancedModeChangeHandler),r=t.editor,r&&!r.isDestroyed&&(e=document.getElementById(n),e&&(e.value=r.getHTML()),r.destroy()))},AddLoaderDiv:function(){var t=document.createElement("div"),n;return t.setAttribute("style","position:absolute;top:0px;width:50%;height:50%;"),n=document.createElement("i"),n.setAttribute("style","position:absolute;bottom:0px;right:0px;"),n.setAttribute("class","fa fa-circle-o-notch fa-spin fa-3x fa-fw"),t.appendChild(n),t},SubscribeWebComponent:function(n,t){this.moWebComponentConfigs[n]=t||{}},InitWebComponents:function(){var n=this.moWebComponentConfigs||{};Object.keys(n).length&&(this.moWebComponentConfigs={},customElements.whenDefined(WysiwygManager.Const.WEB_COMPONENT_NAME).then(function(){WysiwygManager.RichText._ApplyFlatConfig(n)}))},GetWebComponentWysiwygValues:function(){var u={},o,f,n,i,e,s,r,t;if(typeof document=="undefined"||!document.querySelectorAll)return u;for(o=document.querySelectorAll(WysiwygManager.Const.WEB_COMPONENT_NAME+"[data-wysiwyg-id]"),f=0;f<o.length;f++)try{if(n=o[f],i=n.getAttribute("data-wysiwyg-id"),!i)continue;if(r=n.editor,r&&!r.isDestroyed)e=r.getHTML(),s=r.getText();else if(n.hasLoaded)e=typeof n.getValue=="function"?n.getValue():n.innerHTML,s=n.textContent||"";else{t=document.getElementById(i);t&&(u[i]=[t.value,t.value]);continue}t=document.getElementById(i);t&&(t.value=e);u[i]=[e,s]}catch(h){}return u},restoreWebComponentDraft:function(n){function u(){if(!(++i>r)&&document.body.contains(t)){if(!t.hasLoaded){requestAnimationFrame(u);return}t.restoreDraftFromStorage()}}var f=WysiwygManager.Const.WEB_COMPONENT_NAME+"["+WysiwygManager.Const.WEB_COMPONENT_WYSIWYG_ID_ATTR+'="'+n+'"]',t=document.querySelector(f),i,r;t&&typeof t.restoreDraftFromStorage=="function"&&(i=0,r=200,requestAnimationFrame(u))}};WysiwygManager.RichText={ClearWebComponentDraft:function(n,t){if(typeof localStorage!="undefined"){if(!n){
216if(!t)return;n=(typeof location!="undefined"?location.pathname:"")+":"+t}var i="cx-rich-text-autosave-"+n,r="tinymce-autosave-"+n;localStorage.removeItem(i+"-draft");localStorage.removeItem(i+"-time");localStorage.removeItem(r+"-draft");localStorage.removeItem(r+"-time")}},RestoreWebComponentDraft:function(n){function u(){if(!(++i>r)&&document.body.contains(t)){if(!t.hasLoaded){requestAnimationFrame(u);return}t.restoreDraftFromStorage()}}var f=WysiwygManager.Const.WEB_COMPONENT_NAME+"["+WysiwygManager.Const.WEB_COMPONENT_WYSIWYG_ID_ATTR+'="'+n+'"]',t=document.querySelector(f),i,r;t&&typeof t.restoreDraftFromStorage=="function"&&(i=0,r=200,requestAnimationFrame(u))},_TrimWrappingQuotes:function(n){var t,i,r;return typeof n!="string"?"":(t=n.trim(),t.length>=2&&(i=t.charAt(0),r=t.charAt(t.length-1),i==='"'&&r==='"'||i==="'"&&r==="'"))?t.slice(1,-1).trim():t},_MapToolbarToken:function(n){var t=typeof n=="string"?n.trim().toLowerCase():"";return _TOOLBAR_TOKEN_MAP[t]||null},_MapMenuBarMenu:function(n){var t=typeof n=="string"?n.trim().toLowerCase():"";return _MENU_BAR_MAP[t]||null},_MapRemovedMenuItem:function(n){var t=typeof n=="string"?n.trim().toLowerCase():"";return _REMOVED_MENU_ITEM_MAP[t]||null},_ParseToolbarLine:function(n){var i,r,t,u;if(!n||typeof n!="string")return[];for(i=n.split("|"),r=[],t=0;t<i.length;t++)u=i[t].trim().split(/\s+/).map(function(n){return WysiwygManager.RichText._MapToolbarToken(n)}).filter(function(n){return!!n}),u.length>0&&r.push(u);return r},_ParseToolbarRows:function(n){var i=n.toolbar,r=n.toolbar1,u=n.toolbar2,o=typeof i=="string"&&i.length>0,f=typeof r=="string"&&r.length>0,e=typeof u=="string"&&u.length>0,t;return!o&&!f&&!e?null:(t=[],f||e?(f&&t.push(WysiwygManager.RichText._ParseToolbarLine(r)),e&&t.push(WysiwygManager.RichText._ParseToolbarLine(u))):o&&t.push(WysiwygManager.RichText._ParseToolbarLine(i)),t)},_ParseFontFamilies:function(n){var r,t,u,i;if(typeof n!="string"||n.length===0)return[];var f=WysiwygManager.RichText._TrimWrappingQuotes(n).split(";"),e=[],o={};for(r=0;r<f.length;r++)(t=f[r].trim(),t)&&(u=t.indexOf("="),i=u>=0?t.slice(0,u).trim():t,i&&!o[i])&&(o[i]=!0,e.push(i));return e},_NormalizeFontSizePreset:function(n){var t=WysiwygManager.RichText._TrimWrappingQuotes(n),i,e,r;if(!t)return null;var f=t.indexOf("="),o=f>=0?t.slice(0,f).trim():t,u=/^([0-9]+(?:\.[0-9]+)?)(px|pt)?$/i.exec(o);return u?(i=parseFloat(u[1]),!isFinite(i))?null:(e=(u[2]||"px").toLowerCase(),r=e==="pt"?Math.round(i*4/3):Math.round(i),!isFinite(r)||r<=0)?null:r+"px":null},_ParseUniquePresets:function(n,t){var r,i;if(typeof n!="string"||n.length===0)return[];var u=WysiwygManager.RichText._TrimWrappingQuotes(n).split(/\s+/),f=[],e={};for(r=0;r<u.length;r++)(i=t(u[r]),i&&!e[i])&&(e[i]=!0,f.push(i));return f},_ParseFontSizePresets:function(n){return WysiwygManager.RichText._ParseUniquePresets(n,WysiwygManager.RichText._NormalizeFontSizePreset)},_ParseLineHeightPresets:function(n){return WysiwygManager.RichText._ParseUniquePresets(n,function(n){return n||null})},_BuildToolbarSpec:function(n){var e=WysiwygManager.RichText._ParseToolbarRows(n),u,r,t,f,i;if(e===null)return null;if(u={rows:e},r=n.base_toolbars,typeof r=="string"&&r.length>0)try{if(t=JSON.parse(r),Array.isArray(t)){for(f=[],i=0;i<t.length;i++)typeof t[i]=="string"&&t[i].length>0&&f.push(WysiwygManager.RichText._ParseToolbarLine(t[i]));u.simpleRows=f}}catch(o){}return u},_ToolbarRowsContainControl:function(n,t){var i,r,u,f,e;if(!Array.isArray(n)||!t)return!1;for(i=0;i<n.length;i++)if(r=n[i],Array.isArray(r))for(u=0;u<r.length;u++)if(f=r[u],Array.isArray(f))for(e=0;e<f.length;e++)if(f[e]===t)return!0;return!1},_ToolbarSpecContainsControl:function(n,t){return n?WysiwygManager.RichText._ToolbarRowsContainControl(n.rows,t)||WysiwygManager.RichText._ToolbarRowsContainControl(n.simpleRows,t):!1},_BuildMenuBarSpec:function(n){var t=n.menubar,i=n.removed_menuitems,r,u;return t===!1||String(t).toLowerCase()==="false"?null:(r=[],typeof t=="string"&&t.length>0&&(r=t.trim().split(/\s+/).map(function(n){return WysiwygManager.RichText._MapMenuBarMenu(n)}).filter(function(n){return!!n})),u=[],typeof i=="string"&&i.length>0&&(u=i.split(",").map(function(n){return WysiwygManager.RichText._MapRemovedMenuItem(n)}).filter(function(n){return!!n})),{menus:r,removedItems:u})},_ParseStyleFormatSelector:function(n,t,i){var u=Utils.StartsWith(n,".InLn-"),f=Utils.StartsWith(n,".Blck-");if(!u&&!f||n.length<=15||n.indexOf(":")>=0||n.indexOf(" ")>=0||t.length&&t.indexOf(n.substr(6,8))<0||n.toLowerCase().indexOf("zz_deprected")>-1)return null;var e=n.substr(15).replace(/-/g," "),r=n.substr(1,13),o=i[r]?n.substr(1):r;return i[r]=!0,{label:e,className:o}},_BuildStyleFormats:function(n){for(var t,i,e,u=[],o={},f={},r=0;r<document.styleSheets.length;r++){try{t=document.styleSheets[r].cssRules}catch(s){continue}if(t)for(i=0;i<t.length;i++)e=t[i].selectorText||"",e.split(",").forEach(function(t){if(t=t.trim(),!f[t]){f[t]=!0;var i=WysiwygManager.RichText._ParseStyleFormatSelector(t,n,o);i&&u.push(i)}})}return u},_IterateCssRules:function(n){for(var i,r,t=0;t<document.styleSheets.length;t++){try{i=document.styleSheets[t].cssRules}catch(u){continue}if(i)for(r=0;r<i.length;r++)n(i[r])}},_BuildEmailTemplateCssText:function(){var n="";return WysiwygManager.RichText._IterateCssRules(function(t){var i=t.selectorText||"",r;i&&(r=i.split(",").every(function(n){return Utils.StartsWith(n.trim(),".email-template-placeholder")}),r&&(n=t.cssText))}),n},_BuildInlineCssText:function(){var n=[];return WysiwygManager.RichText._IterateCssRules(function(t){var i=t.selectorText||"",r;i&&(r=i.split(",").every(function(n){return Utils.StartsWith(n.trim(),".InLn-")}),r&&n.push(t.cssText))}),n.join("\n")},_BuildBlockCssText:function(){var n=[],t=/^.+\s+(h[1-6]|aside|pre)(\b|[^-]|$)/i;return WysiwygManager.RichText._IterateCssRules(function(i){var f=i.selectorText||"",r,e,o,u,s;if(f){if(r=f.split(","),e=r.every(function(n){return Utils.StartsWith(n.trim(),".Blck-")}),e){n.push(i.cssText);return}o=r.every(function(n){return t.test(n.trim())});o&&(u={},s=r.map(function(n){return n.trim().replace(/^.*\s+((?:h[1-6]|aside).*)$/,"$1")}).filter(function(n){return u[n]?!1:(u[n]=!0,!0)}),n.push(s.join(", ")+" { "+i.style.cssText+" }"))}}),n.join("\n")},_ApplyFlatConfig:function(n){var a,v,r,t,y,k,d,g,s,h,f,p,nt,w,o,c,l,b;n=n||{};a=document.querySelector("base");v=a?a.getAttribute("href"):"";for(r in n)if(n.hasOwnProperty(r)&&(t=document.querySelector(WysiwygManager.Const.WEB_COMPONENT_NAME+'[data-wysiwyg-id="'+r+'"]'),t)){y=t.closest(".TextArea");y&&(y.style.opacity="1");t.dataWysiwygId=r;var i=n[r],u=String(i.plugins||"").toLowerCase(),e=WysiwygManager.RichText._BuildToolbarSpec(i),tt=WysiwygManager.RichText._ToolbarSpecContainsControl(e,"textColor"),it=WysiwygManager.RichText._ToolbarSpecContainsControl(e,"fontSize"),rt=WysiwygManager.RichText._ToolbarSpecContainsControl(e,"fontFamily"),ut=WysiwygManager.RichText._ToolbarSpecContainsControl(e,"styleFormats");if(v&&(t.baseUrl=v),t.featTextColor=tt||u.indexOf("textcolor")>=0,t.featList=u.indexOf("lists")>=0||u.indexOf("advlist")>=0,t.featAnchor=u.indexOf("anchor")>=0,t.featLink=String(i.link_context_toolbar).toLowerCase()==="true"||u.indexOf("link")>=0,t.autolink=u.indexOf("autolink")>=0,t.featImage=u.indexOf("image")>=0,t.featImageCaption=!!i.image_caption,t.featVideo=u.indexOf("media")>=0,t.featTable=u.indexOf("table")>=0,t.featFontSize=it||!!i.fontsize_formats||u.indexOf("fontsize")>=0,t.featFontFamily=rt||!!i.font_formats,t.featLineHeight=!!i.lineheight_formats,t.featSpellcheck=!0,t.featSuggestion=!!i.ice,t.featCodeBlock=u.indexOf("codesample")>=0,t.featFindAndReplace=u.indexOf("searchreplace")>=0,t.showToolbar=i.toolbar!==!1&&String(i.toolbar).toLowerCase()!=="false",t.showMenuBar=!(i.menubar===!1||String(i.menubar).toLowerCase()==="false"),WysiwygManager.RichText._SetupAdvancedModeToggle(t,i),k=WysiwygManager.RichText._ParseFontFamilies(i.font_formats),t.fontFamilies=k,d=WysiwygManager.RichText._ParseFontSizePresets(i.fontsize_formats),t.fontSizePresets=d,g=WysiwygManager.RichText._ParseLineHeightPresets(i.lineheight_formats),t.lineHeightPresets=g,t.fireChangeOnSameContent=!1,t.toolbarSpec=e||undefined,s=WysiwygManager.RichText._BuildMenuBarSpec(i),t.menuBarSpec=s||undefined,i.placeholder&&(t.placeholder=i.placeholder),i.dark_mode&&t.classList.add("cx-dark-mode"),i.default_font&&t.style.setProperty("--rich-text-font-family",String(i.default_font)),h=i.auto_save_unique_id,typeof h=="string"&&h.length>0&&(t.autoSaveUniqueId=h,t.browserDraftAutosave=!0,i.autosave_interval&&(t.autosaveInterval=String(i.autosave_interval)),i.autosave_retention&&(t.autosaveRetention=String(i.autosave_retention))),i.disable_image_paste&&(t.disableImagePaste=!0),f=String(i.content_style||""),f&&(p=f.replace(/[^{]+\{([^}]*)\}/g,"$1").trim(),f=p?".ProseMirror { "+p+" }":""),t.contentCss=WysiwygManager.RichText._BuildInlineCssText()+"\n"+WysiwygManager.RichText._BuildBlockCssText()+"\n"+WysiwygManager.RichText._BuildEmailTemplateCssText()+(f?"\n"+f:""),nt=t.showMenuBar&&s&&s.menus.indexOf("format")>=0,ut||nt){if(w=[],i.filtered_style_formats)try{w=JSON.parse(i.filtered_style_formats)}catch(ft){}t.styleFormats=WysiwygManager.RichText._BuildStyleFormats(w)}if(o=i.cx_rich_text_properties,o)try{c=typeof o=="object"?o:JSON.parse(o);for(l in c)c.hasOwnProperty(l)&&(t[l]=c[l])}catch(ft){}b=String(i.enable_auto_complete).toLowerCase()==="true";b&&WysiwygManager.RichText._SetupWebComponentAutocomplete(r,t);WysiwygManager.RichText._SetupWebComponentChangeSync(r,t);WysiwygManager.RichText._SetupWebComponentUploadBrowse(r,t,"image");WysiwygManager.RichText._SetupWebComponentUploadBrowse(r,t,"video");t.featSuggestion&&WysiwygManager.RichText._SetupWebComponentReview(r,t,i);t.featSuggestion||b||function(n,t){Promise.resolve(t.updateComplete).then(function(){WysiwygManager.RichText._SyncTextareaToWebComponent(n,t)})}(r,t);Matrix3.RegisterInCache(r,WysiwygManager)}},_MergeDeleteAttribs:function(n,t){var i={},e,f,r,u;try{i=JSON.parse(n.dataset.deletion||"{}")}catch(o){}try{e=JSON.parse(t.dataset.deletion||"{}");for(f in e)i[f]||(i[f]=e[f])}catch(o){}r=t.dataset.userid||"";r&&!i[r]&&(i[r]={actionID:t.dataset.cid||t.dataset.action||"",date:parseInt(t.dataset.time||t.dataset.date||"0",10),userId:r,username:t.dataset.username||""});u=n.dataset.userid||"";u&&!i[u]&&(i[u]={actionID:n.dataset.cid||n.dataset.action||"",date:parseInt(n.dataset.time||n.dataset.date||"0",10),userId:u,username:n.dataset.username||""});n.dataset.deletion=JSON.stringify(i)},_LiftInnerDelete:function(n,t){var i,r,e,o;WysiwygManager.RichText._MergeDeleteAttribs(n,t);var u=[],f=[],s=!1;
216Array.from(t.childNodes).forEach(function(t){if(t===n){s=!0;return}(s?f:u).push(t.cloneNode(!0))});i=t.parentNode;r=t.nextSibling;u.length&&(e=t.cloneNode(!1),u.forEach(function(n){e.appendChild(n)}),i.insertBefore(e,r));i.insertBefore(n,r);f.length&&(o=t.cloneNode(!1),f.forEach(function(n){o.appendChild(n)}),i.insertBefore(o,r));i.removeChild(t)},_FlattenNestedDeletes:function(n){for(var r,t,u,i;(r=n.querySelectorAll("delete delete")).length;)for(t=0;t<r.length;t++)(u=r[t],i=u.parentElement,i&&i.nodeName.toLowerCase()==="delete")&&WysiwygManager.RichText._LiftInnerDelete(u,i)},_NormalizeTextAreaValue:function(n){var r=n,i,u,e,f,t,s,o;if(typeof r!="string"||r.length===0)return r;for(i=document.createElement("div"),i.innerHTML=r,u=!0;u;)for(u=!1,e=i.querySelectorAll("span.mention"),f=0;f<e.length;f++)if((t=e[f],s=t.getAttribute("data-value"),!s)&&t.querySelector("span.mention[data-value]")){for(o=t.parentNode;t.firstChild;)o.insertBefore(t.firstChild,t);o.removeChild(t);u=!0}return i.querySelectorAll("span[class]").forEach(function(n){var t=n.getAttribute("class");n.querySelectorAll("span:not([class])").forEach(function(n){n.setAttribute("class",t)})}),i.querySelector("delete delete")&&WysiwygManager.RichText._FlattenNestedDeletes(i),i.innerHTML},_SyncTextareaToWebComponent:function(n,t){var u=document.getElementById(n),r,i,f;u&&(r=WysiwygManager.RichText._NormalizeTextAreaValue(u.value),i=t.editor,i&&!i.isDestroyed?(f=i.getHTML(),r!==f&&i.chain().setContent(r,!1).command(function(n){return n.tr.setStoredMarks([]),n.tr.setMeta(WysiwygManager.Const.WEB_COMPONENT_ADD_TO_HISTORY,!1),!0}).run()):t.content=r)},_WhenEditorReady:function(n,t){function i(){if(document.body.contains(n)){if(!n.editor){requestAnimationFrame(i);return}t()}}requestAnimationFrame(i)},_SetupAdvancedModeToggle:function(n,t){var u=String(t.switchable_to_advanced)==="true",i,f,r;if(n.showModeSwitcher=u,!u){n.advancedMode=!0;return}i=t.pref_instance_key;f=i?localStorage.getItem(i+"_lastUsedMode"):null;n.advancedMode=f==="advanced";i&&(r=function(n){localStorage.setItem(i+"_lastUsedMode",n.detail.advanced?"advanced":"simple")},n._advancedModeChangeHandler=r,n.addEventListener("cx-rich-text-advanced-mode-change",r))},_SetupWebComponentAutocomplete:function(n,t){if(typeof AutoCompletionMgr!="undefined"){var i=AutoCompletionMgr.Get(n);i&&WysiwygManager.RichText._WhenEditorReady(t,function(){var r=i.moOptions.cInvokeWithChar||"@";t.enableAutocomplete={char:r,minLength:i.moOptions.iMinLength||1,maxResults:i.moOptions.iMaxResults,noItemMessage:i.moOptions.sNoItemMessage||"",items:function(t){return new Promise(function(u){var f=i._GetQueryAppend(t.query);$.ajax({type:"POST",dataType:"json",timeout:i.moOptions.iQueryTimeout,url:AutoCompletionProperties.Const.URL,data:f,error:function(){u([])},success:function(f){var e=i._GetResultObjectFromQueryResponse(f,r+t.query),o,s;if(!e||!e.length){u([]);return}o=e.filter(function(n){return!!n.bodyValue});s=o.map(function(i){return i.bodyValue===AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE?WysiwygManager.RichText._BuildWebComponentCreateEntry(t.query,n):{label:i.bodyText||i.label,value:i.bodyValue,type:i.type||"",tag:i.tag||""}});u(s)}})})},onSelect:function(n){if(n.value&&n.value.indexOf(AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE)===0){var r=n.label||"",t=i.moEvents&&i.moEvents.select;t&&Matrix3.AddEvent(t.vform_id,t.name,t.type,t.delay,r,t.comm,t.commargs,null,null,null,null,t.pls_wait_msg,null,null,null,t.block_interaction)}}};WysiwygManager.RichText._SyncTextareaToWebComponentWithAutocomplete(n,t)})}},_SetupWebComponentChangeSync:function(n,t){t.addEventListener("cx-rich-text-change",function(t){if(t&&t.detail){var i=document.getElementById(n);i&&(i.value=t.detail.content,$E(n).addClass("dirty"),$E(n).keydown())}})},_SetupWebComponentUploadBrowse:function(n,t,i){var r=i==="video"?"enableUploadVideoBrowse":"enableUploadImageBrowse",u=i==="video"?"WYSIWYG_PICK_VIDEO":"WYSIWYG_PICK_IMG";WysiwygManager.RichText._WhenEditorReady(t,function(){t[r]=function(t,i){StackMgr.GetInstance().Increment(WysiwygManager.Const.ASSET_PICKER_ZINDEX_BOOST);WYSIWYG_AssetPicked=function(n,i){StackMgr.GetInstance().Decrement
216(WysiwygManager.Const.ASSET_PICKER_ZINDEX_BOOST);"ERID"in i&&n.indexOf("AssetLink")>=0&&(n+="?erid="+i.ERID);t(n)};WYSIWYG_AssetPickAborted=function(){StackMgr.GetInstance().Decrement(WysiwygManager.Const.ASSET_PICKER_ZINDEX_BOOST);i()};Matrix3.AddEvent(Utils.GetVFormId(n),u,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,"","","")}})},_SyncTextareaToWebComponentWithAutocomplete:function(n,t){function i(){if(document.body.contains(t)){var f=t.editor;if(!f||f.isDestroyed){r++<u&&requestAnimationFrame(i);return}WysiwygManager.RichText._SyncTextareaToWebComponent(n,t)}}var r=0,u=120;requestAnimationFrame(i)},_SetupWebComponentReview:function(n,t,i){function f(){document.body.contains(t)&&Promise.resolve(t.updateComplete).then(function(){if(document.body.contains(t)){if(!t.editor){requestAnimationFrame(f);return}WysiwygManager.RichText._SyncTextareaToWebComponent(n,t);var e=function(){TipTap_Review.Instances=TipTap_Review.Instances||{};TipTap_Review.Instances[r]=new TipTap_Review({ID:n,element:t,options:u,fieldExternalId:r});TipTap_Review.Instances[r].PostSetup(i);TipTap_Review.Instances[r].PostInit()};typeof TipTap_Review!="undefined"?e():t._pendingTipTapReviewInit=e}})}var u,r;try{u=typeof i.ice=="string"?JSON.parse(i.ice):i.ice}catch(e){u=undefined}u&&(r=i.field_external_id||"",requestAnimationFrame(f))},_BuildWebComponentCreateEntry:function(n,t){var i=$PI(t).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_TEMPLATE)||"";return{label:i.replace(AutoCompletionProperties.Const.CREATE_ENTRY_TAG_TEXT,n),value:AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE,type:"",tag:""}}};ClearAction.prototype={Action_Clear:function(){var n=$Elt(this.msControlID),t=n.value;n.value="";$(n).trigger("input");t!=""&&this.Event_Change&&this.Event_Change.Fire()}};CloseWindowAction.prototype={Action_CloseWindow:function(){window.close()}};CollapsePanelAction.prototype={SetupToggleCollapseFieldsByPriority:function(n,t,i){var f=i,r,u;(!t||t<=0)&&(t=40);r=$PI(n);r&&(u=r.GetProperty,u===HTMLElement.prototype.GetProperty&&(r.GetProperty=function(n,i){var h,e,s,o;return n==="FoldMinCloseSize"?(h=f,s=r.querySelectorAll(".DisplayFieldPnl.HighPriorityField"),s&&s.length>0&&(e=s[s.length-1]),e||(o=r.querySelector(".DisplayFieldPnl"),o&&(o.length>=2?e=o[1]:o.length===1&&(e=o[0]))),e&&(h=e.offsetTop+e.GetHeight()+t),h):u.call(r,n,i)}),Matrix3.RegisterForCleanup(n,"ToggleCollapseFieldsByPriority",function(){try{r.GetProperty=u}catch(n){}}),r.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(r),PositionMgr.GetInstance().CalculatePosition())}};ExecuteScriptAction.prototype={Action_ExecuteScript:function(_sArgs){if(_sArgs&&_sArgs.length){_sArgs=_sArgs.replaceAll("[VFORMID]",Utils.GetVFormId(this.msID));_sArgs=_sArgs.replaceAll("[ID]",this.msID);var sID=this.msID+"_"+(new Date).getTime();try{typeof objects_actions_execute=="undefined"&&(window.objects_actions_execute={});window.objects_actions_execute[sID]=this;_sArgs=_sArgs.replace(/this/g,'window.objects_actions_execute["'+sID+'"]');typeof objects_actions_execute_event_args=="undefined"&&(window.objects_actions_execute_event_args={});window.objects_actions_execute_event_args[sID]=this.Action_ExecuteScript.moEventArguments;_sArgs=_sArgs.replaceAll("[EVENT_ARGUMENTS]",'window.objects_actions_execute_event_args["'+sID+'"]');CSP.IsEnabled()?Utils.EvalScripts(_sArgs):eval(_sArgs)}finally{window.objects_actions_execute[sID]=undefined;window.objects_actions_execute_event_args[sID]=undefined}}}};ParamValueUpdateAction.prototype={EnableParamRepresentation:function(){$AddEvent(this,"Event_Change","ParamVal",this.msID,"");$AddAction(this,"Action_ParamValueUpdated","ParamVal",this.msID,"")},Action_ParamValueUpdated:function(){var i,u=-1,f,n,t,r;for(t in ParamMgr.moTable)n=t.split(Matrix3.Const.SEPARATOR_CONTROL)[0],(Utils.StartsWith(this.msID,n+Matrix3.Const.SEPARATOR_CONTROL)||Utils.StartsWith(this.msID,n+"."))&&(r=t.split(Matrix3.Const.SEPARATOR_HIERARCHY).length,r>u&&(i=ParamMgr.moTable[t],u=r,f=n));i&&($(i.moControl).addClass("ParamChanged"),ParamMgr.AddControlToNotSavedList(f))}};RefreshMgrAction.prototype={Action_RefreshDragDropMgr:function(){DragDropMgr.RefreshCache()},Action_RefreshCacheResolution:function(){PreloadMgr.GetInstance().ClearResolutionCache()},Action_UpdateUploadStatus:function(n){var t=n.split(Utils.Const.SEPARATOR_VALUE),i=parent.document.getElementById(t[0]+UploadCtrl.Const.SUFFIX_PATH),r=parent.document.getElementById(t[0]+UploadCtrl.Const.SUFFIX_NAME);i&&(i.value=t[1]);r&&(r.value=t[2]);parent.$AddClass(t[0]+UploadFieldCtrl.Const.SUFFIX_LOADING,StyleMgr.Const.CLASS_INVISIBLE);parent.$AddClass(t[0]+UploadCtrl.Const.SUFFIX_CANCEL,StyleMgr.Const.CLASS_INVISIBLE);parent.$RemoveClass(t[0]+UploadCtrl.Const.SUFFIX_IFRAME,UploadCtrl.Const.CLASS_IFRAME_CLOSED);parent.UploadCtrl.miUploadInProgress>0&&(parent.UploadCtrl.miUploadInProgress--,parent.$Control(t[0],UploadCtrl.Const.CONTROL_NAME).Event_UploadCompleted.Fire())}};BlurAdvEvent.Const={OPTION_CHECK_STATE_DELAY:"check_state",OPTION_CLASS:"class",ATTR_TO_CHECK_STATE:"data-_fstate",STATE_CHECK_TIMEOUT:150};BlurAdvEvent.prototype={Event_BlurAdv_Setup:function(n){this.moBlurAdvChangeOption=Utils.GetOptions(n);this.Event_BlurAdv=new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"blur",this.InternalBlurAdvEvent,this)})},InternalBlurAdvEvent:function(n,t){var r,i;window.clearTimeout(this.miEventBlurAdvDeferredID);r=0;r=t?t:this.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CHECK_STATE_DELAY]!=null?parseInt(this.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CHECK_STATE_DELAY]):BlurAdvEvent.Const.STATE_CHECK_TIMEOUT;r<=0?this.Event_BlurAdv.Fire():(t||$E(this.msControlID).attr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE,"1"),i=this,this.miEventBlurAdvDeferredID=setTimeout(function(){var n,t;Matrix3.mbEvent?i.InternalBlurAdvEvent(null,50):(n=$E(i.msControlID),n.attr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE)=="1"&&(n.removeAttr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE),t=i.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CLASS],(!t||n.hasClass(t))&&(i.Event_BlurAdv.Fire(),t&&n.removeClass(t))))},r))}};BlurEvent.Const={OPTION_BYPASS_ESCAPE:"bypassescape",OPTION_PREVENT_OUTSIDE_CLICK_ON_BLUR:"prevent_outside_click_on_blur",OPTION_IGNORE_TARGET_CLASS_NAME:"ignore_target_class_name"};BlurEvent.prototype={Event_Blur_Setup:function(n){this.moBlurChangeOption=Utils.GetOptions(n);this.mbEscapePressed=!1;this.mbMouseDown=!1;this.mbBlurred=!1;this.Event_Blur=new CtrlEvent(this,function(){var n,t,i,r;Utils.AddEvent(this.msID,"keydown",function(n){n.key==="Escape"&&(this.mbEscapePressed=!0)},this);n=$E(this.msID)[0];this instanceof ButtonCtrl&&(t=$(n).find("a")[0],t&&(n=t));Utils.AddEvent(n,"blur",this.InternalBlurEvent,this);Utils.ParseBool(this.moBlurChangeOption[BlurEvent.Const.OPTION_PREVENT_OUTSIDE_CLICK_ON_BLUR])&&(i=function(){this.mbMouseDown=!0}.bind(this),r=function(n){this.mbBlurred&&this.mbMouseDown&&n.stopImmediatePropagation();this.mbBlurred=!1;this.mbMouseDown=!1}.bind(this),document.addEventListener("mousedown",i),document.addEventListener("click",r,!0),Matrix3.RegisterForCleanup(this.msID,"BlurEvent_PreventClickOnBlur"+this.msID,function(){document.removeEventListener("mousedown",i);document.removeEventListener("click",r,!0)}))})},InternalBlurEvent:function(n){var t=Utils.ParseBool(this.moBlurChangeOption[BlurEvent.Const.OPTION_BYPASS_ESCAPE]),i=this.moBlurChangeOption[BlurEvent.Const.OPTION_IGNORE_TARGET_CLASS_NAME],r=!(n.relatedTarget&&n.relatedTarget.className&&n.relatedTarget.className.includes(i));t&&this.mbEscapePressed||!r||this.Event_Blur.Fire();this.mbBlurred=!0;this.mbEscapePressed=!1}};ChangeEvent.Const={OPTION_DELAY:"delay",OPTION_IGNORE_AC_SELECT:"ignore_autocomplete_select",OPTION_KEEP_DELAYED_EVENT:"keep_delayed_event",OPTION_CHECK_STATE_DELAY:"check_state",DELAY_TYPE_CHANGE:"change",ATTR_TO_CHECK_STATE:"data-_fstate",OPTION_CLASS:"class",STATE_CHECK_TIMEOUT:150,NONE_UPDATE_VALUE_KEYCODES:{37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",16:"Shift",17:"Ctrl",18:"Alt",13:"Enter"}};ChangeEvent.prototype={Event_Change_Setup:function(n){var i=Utils.GetOptions(n),t;this.Event_ChangeEventArgs||(this.Event_ChangeEventArgs=[]);this.Event_ChangeEventArgs.push(i);this.Event_Change||(this.Event_Change=[]);t=this.Event_Change.length;this.Event_Change.push(new CtrlEvent(this,function(){if(this.Event_ChangeEventArgs[t][ChangeEvent.Const.OPTION_DELAY]===ChangeEvent.Const.DELAY_TYPE_CHANGE)Utils.AddEvent(this.msControlID,"change",function(n){this.ChangeEvent(n,undefined,t)},this);else{var n=function(n){this.KeyUpEvent(n,t)};
216Utils.AddEvent(this.msControlID,"keyup",n,this);Utils.AddEvent(this.msControlID,"drop",n,this)}}))},ChangeEvent:function(n,t,i){var r,f,o,u,e;i=i>=0?i:0;r=Array.isArray(this.Event_ChangeEventArgs)&&i<this.Event_ChangeEventArgs.length?this.Event_ChangeEventArgs[i]:null;f=!1;r&&(f=!r[ChangeEvent.Const.OPTION_KEEP_DELAYED_EVENT]||!r.miEventChangeDeferredID);o=AutoCompletionMgr.Get(this.msControlID);Utils.ParseBool(r[ChangeEvent.Const.OPTION_IGNORE_AC_SELECT])&&o&&o.IsItemSelected()&&(f=!1);f&&(window.clearTimeout(r.miEventChangeDeferredID),u=-1,t?u=t:r[ChangeEvent.Const.OPTION_CHECK_STATE_DELAY]!=null?u=parseInt(r[ChangeEvent.Const.OPTION_CHECK_STATE_DELAY]):r[ChangeEvent.Const.OPTION_DELAY]!=null&&(u=parseInt(r[ChangeEvent.Const.OPTION_DELAY])),(isNaN(u)||u<0)&&(u=ChangeEvent.Const.STATE_CHECK_TIMEOUT),u<=0?this.ConfirmChangeEvent(i):(t||$E(this.msControlID).attr(ChangeEvent.Const.ATTR_TO_CHECK_STATE,"1"),e=this,r.miEventChangeDeferredID=setTimeout(function(){var n,t;Matrix3.HasEventsInProgress()?e.ChangeEvent(null,50,i):(n=$E(e.msControlID),n.attr(ChangeEvent.Const.ATTR_TO_CHECK_STATE)=="1"&&(n.removeAttr(ChangeEvent.Const.ATTR_TO_CHECK_STATE),t=r[ChangeEvent.Const.OPTION_CLASS],(!t||n.hasClass(t))&&(e.ConfirmChangeEvent(i),t&&n.removeClass(t))))},u)))},KeyUpEvent:function(n,t){var i=this.Event_ChangeEventArgs[t],r,u,f;ChangeEvent.Const.NONE_UPDATE_VALUE_KEYCODES[n.keyCode]||(r=!0,i[ChangeEvent.Const.OPTION_KEEP_DELAYED_EVENT]&&(r=!i.miEventChangeDeferredID),r&&(window.clearTimeout(i.miEventChangeDeferredID),u=0,i[ChangeEvent.Const.OPTION_DELAY]!=null&&(u=parseInt(i[ChangeEvent.Const.OPTION_DELAY])),f=this,i.miEventChangeDeferredID=window.setTimeout(function(){f.ConfirmChangeEvent(t)},u)))},ConfirmChangeEvent:function(n){var t=this.Event_ChangeEventArgs[n];this.Event_Change[n].Fire();t.miEventChangeDeferredID=0}};ClickDeferredMgr.moSingleton=null;ClickDeferredMgr.Const={DELAY:2e3,SEPARATOR_DELAY:","};ClickDeferredMgr.GetInstance=function(){return ClickDeferredMgr.moSingleton||(ClickDeferredMgr.moSingleton=new ClickDeferredMgr),ClickDeferredMgr.moSingleton};ClickDeferredMgr.prototype={Add:function(n,t){if(n){var i=n.split(ClickDeferredMgr.Const.SEPARATOR_DELAY);if(i.length!=2)throw"ClickDeferred must be use with arguments 'group,delay'";i[0]in this.moClickDeferreds&&window.clearTimeout(this.moClickDeferreds[i[0]]);this.moClickDeferreds[i[0]]=window.setTimeout(function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){t.Fire()})},parseInt(i[1]))}else t.Fire()}};ClickDeferredEvent.prototype={Event_ClickDeferred_Setup:function(n){this.Event_ClickDeferred=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"click",function(){ClickDeferredMgr.GetInstance().Add(n,this)},this.Event_ClickDeferred)})}};ClickEvent.Const={ARG_NO_MODIFIER:"NoModifier",ARG_CTRL_PRESSED:"CtrlPressed",ARG_META_PRESSED:"MetaPressed",ARG_SHIFT_PRESSED:"ShiftPressed"};ClickEvent.prototype={Event_Click_Setup:function(n){var t=n.split(Utils.Const.OPTION_SEPARATOR),u=t[0],f=t[1],e=Utils.ParseBool(t[2]),o=Utils.ParseBool(t[3]),s=Utils.ParseBool(t[4]),i=$("[id='"+this.msControlID+"']"),r;f&&i.length>0&&i.hasClass("Disabled")||(this.Event_ClickEventArgs||(this.Event_ClickEventArgs=[]),this.Event_ClickEventArgs.push(u),this.Event_Click||(this.Event_Click=[]),r=this.Event_Click.length,this.Event_Click.push(new CtrlEvent(this,function(){var n=this;$Elt(this.msControlID)||(this.msControlID=this.msID);RegisterControlEvent(this.msControlID,"mousedown",function(){n.mbMouseDownFired=!0});RegisterControlEvent(this.msControlID,"click",function(t){(!s||n.mbMouseDownFired)&&(n.mbMouseDownFired=!1,n.Click(t,r,e,o))})})))},Click:function(n,t,i,r){n.button!==0||(this.Event_ClickEventArgs[t]!=ClickEvent.Const.ARG_NO_MODIFIER||n.ctrlKey||n.metaKey||n.shiftKey)&&this.Event_ClickEventArgs[t]&&(this.Event_ClickEventArgs[t]!=ClickEvent.Const.ARG_CTRL_PRESSED||!n.ctrlKey)&&(this.Event_ClickEventArgs[t]!=ClickEvent.Const.ARG_META_PRESSED||!n.metaKey)&&(this.Event_ClickEventArgs[t]!=ClickEvent.Const.ARG_SHIFT_PRESSED||!n.shiftKey)||(r&&n.preventDefault(),this.Event_Click[t].Fire({domEvent:n}),i&&n.stopPropagation())}};ClickOutEvent.moHandlers={};ClickOutEvent.RefreshNode=function(n){if(ClickOutEvent.moHandlers.hasOwnProperty(n)){var t=ClickOutEvent.moHandlers[n];$(document).unbind("click",t);delete ClickOutEvent.moHandlers[n]}};ClickOutEvent.Const={MGR_NAME:"ClickOutEvent"};ClickOutEvent.prototype={Event_ClickOut_Setup:function(n){Matrix3.RegisterInCache(this.msID,ClickOutEvent);this.Event_ClickOut=new CtrlEvent(this,function(){var t=this,i=function(i){var r,u,f;return $PI(t.msID).IsUnderMouse(i,!0)||(r=!1,Utils.IsFirefox()||(u=window.getSelection(),r=u!==null&&u.toString()!=="",r&&(f=document.getElementById(t.msID),r=f&&f.contains(u.baseNode))),r||t.Event_ClickOut.Fire()),n};$(document).click(i);ClickOutEvent.moHandlers[this.msID]=i})}};DragFilesInBrowserEvent.msControlID=null;DragFilesInBrowserEvent.moCounter={};DragFilesInBrowserEvent.RefreshNode=function(){};DragFilesInBrowserEvent.Const={MGR_NAME:"DragFilesInBrowserEvent"};DragFilesInBrowserEvent.prototype={Event_DragFilesInBrowser_Setup:function(n){var t,i;this.Event_DragFilesInBrowser||(DragFilesInBrowserEvent.msControlID=this.msID,Matrix3.RegisterInCache(this.msID,DragFilesInBrowserEvent),t=this.msID,DragFilesInBrowserEvent.moCounter[t]=DragFilesInBrowserEvent.moCounter[t]||0,i=++DragFilesInBrowserEvent.moCounter[t],this.Event_DragFilesInBrowser=new CtrlEvent(this,function(){var u=this,r,f;this.msID=DragFilesInBrowserEvent.msControlID;r=!1;f=function(t){var h=u.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],f,o,e,s,i;if(!r&&!Matrix3.HasPendingEventOnParentOrSelf(h)){if(r=!0,Matrix3.maPopupStack.length>0){f=[];for(o in Matrix3.maPopupStack)e=$E(Matrix3.maPopupStack[o]+Popup.Const.CONTAINER_SUFFIX),e.length>0&&!e.hasClass("minimized-mode")&&!e.hasClass("NotificationBannerPopup")&&!e.hasClass("VFormEditToolbar_VForm_PopupWrapper")&&f.push(Matrix3.maPopupStack[o]
216);if(f.length>0&&(s=f[f.length-1],!Utils.StartsWith(u.msID,s))){r=!1;return}}if(i=t.originalEvent.dataTransfer,i.types!=null&&(i.types.indexOf?i.types.indexOf("Files")!=-1:i.types.contains("application/x-moz-file")||i.types.contains("Files")))return u.Event_DragFilesInBrowser.Fire(),r=!1,n;r=!1}};$(document).on("dragover",f);Matrix3.RegisterForCleanup(t,DragFilesInBrowserEvent.Const.MGR_NAME+i,function(){try{$(document).off("dragover",f);DragFilesInBrowserEvent.moCounter[t]===i&&delete DragFilesInBrowserEvent.moCounter[t]}catch(n){}})}))}};FocusEvent.Const={};FocusEvent.prototype={Event_Focus_Setup:function(n){var t,i;this.moFocusChangeOption=Utils.GetOptions(n);t=$E(this.msID)[0];this instanceof ButtonCtrl&&(i=$(t).find("a")[0],i&&(t=i));this.Event_Focus=new CtrlEvent(this,function(){Utils.AddEvent(t,"focus",this.InternalFocusEvent,this)})},InternalFocusEvent:function(){this.Event_Focus.Fire()}};ControlKeyboardEvent.Const={BUTTON_LISTENING:"keycode",PHASE:"phase",PHASE_UP:"up",PHASE_DOWN:"down",KEYCODE_ENTER:13,CLEAR_OPTION:"clear"};ControlKeyboardEvent.prototype={Event_Keyboard_Setup:function(n){this.moEventKeyboardOption=Utils.GetOptions(n);var t=this.moEventKeyboardOption[ControlKeyboardEvent.Const.PHASE];t!==ControlKeyboardEvent.Const.PHASE_UP&&t!==ControlKeyboardEvent.Const.PHASE_DOWN&&(t=ControlKeyboardEvent.Const.PHASE_UP);this.Event_Keyboard=t===ControlKeyboardEvent.Const.PHASE_UP?new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"keyup",this.KeyboardUpEvent,this)}):new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"keydown",this.KeyboardUpEvent,this)})},KeyboardUpEvent:function(n){var i=this.moEventKeyboardOption[ControlKeyboardEvent.Const.BUTTON_LISTENING],u=n.keyCode?n.keyCode:n.which,t=!Utils.IsStringFilled(i)||i==u,f=this.moEventKeyboardOption[ControlKeyboardEvent.Const.CLEAR_OPTION],r;t&&f&&(r=n.currentTarget?n.currentTarget.value:"",t=!Utils.IsStringFilled(r));t&&this.Event_Keyboard.Fire()}};MouseDownEvent.Const={OPTION_MODIFIER:"modifier",OPTION_MOUSE:"button",MODIFIER_CONTROL:"CTRL",MODIFIER_SHIFT:"SHIFT",MODIFIER_ALT:"ALT",MODIFIER_META:"META"};MouseDownEvent.prototype={Event_MouseDown_Setup:function(n){this.moEventMouseDownOption=Utils.GetOptions(n);this.Event_MouseDown=new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"mousedown",this.MouseDownEvent,this)})},MouseDownEvent:function(n){var t=this.moEventMouseDownOption[MouseDownEvent.Const.OPTION_MODIFIER],i=this.moEventMouseDownOption[MouseDownEvent.Const.OPTION_MOUSE],r=!1;(!Utils.IsStringFilled(t)||t===MouseDownEvent.Const.MODIFIER_CONTROL&&n.ctrlKey||t===MouseDownEvent.Const.MODIFIER_SHIFT&&n.shiftKey||t===MouseDownEvent.Const.MODIFIER_ALT&&n.altKey||t===MouseDownEvent.Const.MODIFIER_META&&n.metaKey)&&(r=!0);r&&(!Utils.IsStringFilled(i)||n.button.toString()===i)&&this.Event_MouseDown.Fire()}};OrientationChangeEvent.prototype={Event_OrientationChangeEvent_Setup:function(){this.Event_OrientationChangeEvent=ne
216w CtrlEvent(this,function(){Utils.AddEvent(window,"resize",function(n){this._CheckOrientationChange(n)},this)});this.mbIsPortrait=Utils.GetViewportWidth()<Utils.GetViewportHeight()},_CheckOrientationChange:function(){var n=Utils.GetViewportWidth()<Utils.GetViewportHeight();this.mbIsPortrait!=n&&(this.mbIsPortrait=n,this.Event_OrientationChangeEvent.Fire())}};OutEvent.prototype={Event_Out_Setup:function(){this.Event_Out=new CtrlEvent(this,function(){var n=this;Utils.AddEvent(this.msID,"mouseout",function(t){Utils.IsMouseLeaveOrEnter(t,$Elt(n.msID))&&n.Event_Out.Fire()},this.Event_Out)})}};OverEvent.prototype={Event_Over_Setup:function(n){n&&Utils.Trim(n)!=""&&(this.msOverCondition=n);this.Event_Over=new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"mouseover",this.Event_Over_Fire,this)})},Event_Over_Fire:function(){var n=!0;this.msOverCondition&&(DragDropMgr.mbIsDrag&&this.msOverCondition==ClipboardProperties.msCache||(n=!1));n&&this.Event_Over.Fire()},Event_OverAndDrag_Setup:function(n){this.Event_OverAndDrag=new CtrlEvent(this,function(){var t=this;this.miOverAndDragDelay=parseInt(n);isNaN(this.miOverAndDragDelay)||Utils.AddEvent(this.msID,"mouseout",function(){window.clearTimeout(t.moTimeoutOverAndDragDelay)},t);Utils.AddEvent(this.msID,"mouseover",function(){if(DragDropMgr.mbIsDrag)if(isNaN(this.miOverAndDragDelay))n.Event_OverAndDrag.Fire();else{var n=this;this.moTimeoutOverAndDragDelay=window.setTimeout(function(){DragDropMgr.mbIsDrag&&n.Event_OverAndDrag.Fire()},n.miOverAndDragDelay)}},this)})},Event_OverDelay_Setup:function(n){this.miOverDelay=parseInt(n);this.Event_OverDelay=new CtrlEvent(this,function(){var n=this;Utils.AddEvent(this.msID,"mouseover",n.Event_OverDelay_Fire,n);Utils.AddEvent(this.msID,"mouseout",function(){window.clearTimeout(n.moTimeoutOverDelay)},n)})},Event_OverDelay_Fire:function(){var n=this;this.moTimeoutOverDelay=window.setTimeout(function(){n.Event_OverDelay.Fire()},n.miOverDelay)}};ScrollDownEvent.Const={OPTION_OFFSET:"offset"};ScrollDownEvent.prototype={Event_ScrollDown_Setup:function(n){if(this.moScrollDownChangeOption=Utils.GetOptions(n),this.miScrollDownPosition=0,this.Event_ScrollDown=new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"scroll",this.InternalScrollDownEvent,this)}),$E(this.msID).scrollTop()!=0){var t=this;setTimeout(function(){t.InternalScrollDownEvent()},1)}},InternalScrollDownEvent:function(){var n=$E(this.msID).scrollTop(),t;n>this.miScrollDownPosition&&(t=1,this.moScrollDownChangeOption[ScrollDownEvent.Const.OPTION_OFFSET]!=null&&(t=parseInt(this.moScrollDownChangeOption[ScrollDownEvent.Const.OPTION_OFFSET])),n>=t&&this.Event_ScrollDown.Fire());this.miScrollDownPosition=n}};ScrollUpEvent.Const={OPTION_OFFSET:"offset"};ScrollUpEvent.prototype={Event_ScrollUp_Setup:function(n){if(this.moScrollUpChangeOption=Utils.GetOptions(n),this.miScrollUpPosition=0,this.Event_ScrollUp=new CtrlEvent(this,function(){Utils.AddEvent(this.msID,"scroll",this.InternalScrollUpEvent,this)}),$E(this.msID).scrollTop()!=0){var t=this;setTimeout(function(){t.InternalScrollUpEvent()},1)}this.moScrollUpChangeOption[ScrollUpEvent.Const.OPTION_OFFSET]==="height"&&(this.moScrollUpChangeOption[ScrollUpEvent.Const.OPTION_OFFSET]=$E(this.msID).height())},InternalScrollUpEvent:function(){var n=$E(this.msID).scrollTop(),t;n<this.miScrollUpPosition&&(t=0,this.moScrollUpChangeOption[ScrollUpEvent.Const.OPTION_OFFSET]!=null&&(t=parseInt(this.moScrollUpChangeOption[ScrollUpEvent.Const.OPTION_OFFSET])),n<=t&&this.Event_ScrollUp.Fire());this.miScrollUpPosition=n}};ShortcutEvent.Const={SEPARATOR:"|"};ShortcutEvent.prototype={Event_Shortcut_Setup:function(n){var u=this,t,i,r;this.moShortcuts||(this.moShortcuts={});t=n.split(ShortcutEvent.Const.SEPARATOR);i=[];i.push(t.length>1&&t[1]=="1");i.push(t.length>2&&t[2]=="1");i.push(t.length>3&&t[3]=="1");i.push(t.length>4&&t[4]=="1");i.push(t.length>5&&t[5]=="1");this.moShortcuts[t[0]]=i;r=function(n){u.Shortcut(n)};this.Event_Shortcut=new CtrlEvent(this,function(){$(document.body).on("keydown",r);$(document.body).on("keydown","input",r)},function(){$(document.body).off("keydown",r);$(document.body).off("keydown","input",r)})},Shortcut:function(n){var i,r,f,t,u;$Elt(this.msID)&&$S(this.msID,"visibility",!0)!="hidden"&&$S(this.msID,"display",!0)!="none"&&(n.keyCode?i=n.keyCode:n.which&&(i=n.which),n.target?r=n.target:n.srcElement&&(r=n.srcElement),f=["input","textarea","cx-input","c
216x-textarea","cx-select"],i in this.moShortcuts&&(t=this.moShortcuts[i],(t[0]||n.ctrlKey||n.metaKey)&&(!t[0]||!(n.ctrlKey||n.metaKey))||(t[1]||n.shiftKey)&&(!t[1]||!n.shiftKey)||(t[2]||n.altKey)&&(!t[2]||!n.altKey)||!t[3]&&f.includes(r.tagName.toLowerCase())&&r.value.length!=0||(u=Utils.GetTopLevelPopup(),u&&!t[4]?!Utils.StartsWith(this.msID,u)||Matrix3.moCMS&&Matrix3.moCMS.moEditToolbar&&Matrix3.moCMS.moEditToolbar.msId==u||this.Event_Shortcut.Fire():this.Event_Shortcut.Fire())))}};ShowEvent.Const={PROPERTY_DELAY:"delay"};ShowEvent.prototype={Event_Show_Setup:function(n){var r=$PI(this.msID),t,i;r&&(t=Utils.GetOptions(n),i=this,this.Event_Shows||(this.Event_Shows={}),this.Event_ShowTimers||(this.Event_ShowTimers={}),this.Event_Show=new CtrlEvent(this,function(){var r=1;ShowEvent.Const.PROPERTY_DELAY in t&&(r=parseInt(t[ShowEvent.Const.PROPERTY_DELAY]));i.Event_ShowTimers[n]=window.setTimeout(function(){i.Event_Shows[n].Fire()},r)}),this.Event_Shows[n]=this.Event_Show)}};SwipeEvent.moManagers={};SwipeEvent.RefreshNode=function(n){if(SwipeEvent.moManagers.hasOwnProperty(n)){var t=SwipeEvent.moManagers[n];t.off("swipeleft");t.off("swiperight");t.destroy();delete SwipeEvent.moManagers[n]}};SwipeEvent.Const={MGR_NAME:"SwipeEvent"};SwipeEvent.prototype={SetupSwipe:function(n){if(Utils.IsTouchDevice()){Matrix3.RegisterInCache(this.msID,SwipeEvent);var t=new CtrlEvent(this,function(){var t=this;Utils.LoadScript("Include/Matrix5/Mobile/hammer.min.js",function(){var i,r=$Elt(t.msID);SwipeEvent.moManagers.hasOwnProperty(t.msID)?i=SwipeEvent.moManagers[t.msID]:(i=new Hammer(r,{inputClass:Hammer.SUPPORT_POINTER_EVENTS?Hammer.PointerEventInput:Hammer.TouchInput}),SwipeEvent.moManagers[t.msID]=i);r.style.touchAction="pan-y pinch-zoom";i.on("swipe",function(i){var r=$E(Utils.GetRootOrPopupId(t.msID)),u=r.find(".leaflet-container")[0],f=r.find(".leaflet-container > img");(!u||!u.contains(i.target)||!f||f.data("wgmImgViewer2").getZoom()<=1)&&(i.direction==Hammer.DIRECTION_RIGHT&&n?t.Event_SwipeRight.Fire():i.direction!=Hammer.DIRECTION_LEFT||n||t.Event_SwipeLeft.Fire())})},null,!0)});n?this.Event_SwipeRight=t:this.Event_SwipeLeft=t}},Event_SwipeLeft_Setup:function(){this.SetupSwipe(!1)},Event_SwipeRight_Setup:function(){this.SetupSwipe(!0)}};WindowExitEvent.msControlID=null;WindowExitEvent.RefreshNode=function(){window.onbeforeunload=function(){}};WindowExitEvent.Const={MGR_NAME:"WindowExitEvent"};WindowExitEvent.prototype={Event_WindowExit_Setup:function(n){WindowExitEvent.msControlID=this.msID;Matrix3.RegisterInCache(this.msID,WindowExitEvent);this.Event_WindowExit=new CtrlEvent(this,function(){var t=this;window.onbeforeunload=function(){if(!Matrix3.mbClick)return t.Event_WindowExit.Fire(),n}})}};WindowResizeEvent.Const={DELAY:1e3,CLEAR_CACHE:"ClearCache",SEPARATOR_RESOLUTION:"x",SEPARATOR_VALUE:","};WindowResizeEvent.prototype={Event_WindowResize_Setup:function(n){var i=-1,r=-1,u=-1,f=-1,t,e,o;n&&Utils.Trim(n)!=""&&(n=n.toLowerCase(),t=n.split(WindowResizeEvent.Const.SEPARATOR_VALUE),t.length==2&&(e=t[0].split(WindowResizeEvent.Const.SEPARATOR_RESOLUTION),i=parseInt(e[0]),u=parseInt(e[1]),o=t[1].split(WindowResizeEvent.Const.SEPARATOR_RESOLUTION),r=parseInt(o[0]),f=parseInt(o[1])));this.Action_CheckResize=function(){this._CheckWindowResize(null,!0,i,r,u,f)};this.Event_WindowResize=new CtrlEvent(this,function(){Utils.AddEvent(window,"resize",function(n){this._CheckWindowResize(n,!1,i,r,u,f)},this)})},_CheckWindowResize:function(n,t,i,r,u,f){var c,e,o,s,h;window.clearTimeout(this.WindowResizeEventTimeout);t?(e=!0,o=!0,(i>=0||r>=0)&&(s=Utils.GetViewportWidth(),i>=0&&s<i&&(e=!1),r>=0&&s>r&&(e=!1)),(u>=0||f>=0)&&(h=Utils.GetViewportHeight(),u>=0&&h<u&&(o=!1),f>=0&&h>f&&(o=!1)),e&&o&&this.Event_WindowResize.Fire()):(c=this,this.WindowResizeEventTimeout=window.setTimeout(function(){c._CheckWindowResize(n,!0,i,r,u,f)},WindowResizeEvent.Const.DELAY))}},function(){function t(t,u,f){var c,l,e,h,v;if(!n)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");c=f&&f.debug||!1;c&&(l=document.querySelector("#input-textarea-caret-position-mirror-div"),l&&l.parentNode.removeChild(l));e=document.createElement("div");e.id="input-textarea-caret-position-mirror-div";document.body.appendChild(e);var o=e.style,s=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,a=t.nodeName==="INPUT";return o.whiteSpace="pre-wrap",a||(o.wordWrap="break-word"),o.position="absolute",c||(o.visibility="hidden"),i.forEac
216h(function(n){a&&n==="lineHeight"?o.lineHeight=s.height:o[n]=s[n]}),r?t.scrollHeight>parseInt(s.height)&&(o.overflowY="scroll"):o.overflow="hidden",e.textContent=t.value.substring(0,u),a&&(e.textContent=e.textContent.replace(/\s/g," ")),h=document.createElement("span"),h.textContent=t.value.substring(u)||".",e.appendChild(h),v={top:h.offsetTop+parseInt(s.borderTopWidth),left:h.offsetLeft+parseInt(s.borderLeftWidth),height:parseInt(s.lineHeight)},c?h.style.backgroundColor="#aaa":document.body.removeChild(e),v}var i=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],n=typeof window!="undefined",r=n&&window.mozInnerScreenX!=null;typeof module!="undefined"&&typeof module.exports!="undefined"?module.exports=t:n&&(window.getCaretCoordinates=t)}();AutoCompContainer.Const={ID_SUFFIX:"_Mirror",CLASS_SUFFIX:"ACC",GLOBAL_CLASS:"AutoCompACC",PLACE_OVER_CLASS:"ACC_PlaceOver",OPEN_CLASS:"ACC_Open",ADVANED_ACTION_PANEL_CLASS:"ACC_AdvAction",ADVANED_BUTTON_PANEL_CLASS:"ACC_AdvButton",HAS_ADVANED_ACTION_PANEL_CLASS:"ACC_HasAdvAction",SCREEN_MIN_DISTANCE_HEIGHT:30,SCREEN_MIN_DISTANCE_WIDTH:20,MIN_HEIGHT:220};AutoCompContainer.prototype={GetID:function(){return this.msContainerID},GetObj:function(){return this.moContainer},Show:function(){var t,u,c,o,a,v;this.moRootNode.mbIsPopover&&this.moRootNode[0].showPopover();this._RefreshPositionIfOver();Utils.IsIE()&&this.moContainer.addClass(AutoCompContainer.Const.GLOBAL_CLASS);this.moContainer.detach();document.fullscreenElement?$(document.fullscreenElement).append(this.moContainer):this.moRootNode.append(this.moContainer);this.moContainer.css("visibility","visible");this.moContainer.addClass(AutoCompContainer.Const.OPEN_CLASS);this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.OPEN_CLASS);this.mbIsDisplayed=!0;var s=this.moAnchorControl,n=s.offset(),h=n.top,i=$("."+AutoCompletionProperties.Const.HEADER_CLASS,this.moContainer),r=$("."+AutoCompletionProperties.Const.FOOTER_CLASS,this.moContainer),f=0,e=0;if(Utils.IsIE7()==!0?(i&&i.length>0&&(f=i.height()),r&&r.length>0&&(e=r.height())):(i&&i.length>0&&(f=i.outerHeight()),r&&r.length>0&&(e=r.outerHeight())),t=this._GetAdvancedActionPanelPosition(),n.top=s.offset().top+s.outerHeight()+t.height,n.left+this.moContainer.width()>Utils.GetViewportWidth()&&(n.left=Utils.GetViewportWidth()-this.moContainer.width()-32),u=this.moContainer.offset().top,n.top<=u&&n.top+this.moContainer.height()>Utils.GetViewportHeight()){c=$("li",this.moControl.autocomplete("widget"));o=1;c.length>0?c.each(function(n,t){o+=$(t).outerHeight()}):o=1;var w=o+f+e+t.height,y=h-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,p=Utils.GetViewportHeight()-n.top-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,l=p;n.top=u;y>p&&(l=y,n.top=h-this.moContainer.outerHeight()-t.height);w>l&&(a=l-t.height,this.moControl.autocomplete("widget").outerHeight(a-f-e),this.moContainer.outerHeight(a));this.moAdvancedActionPanel[0]&&(v=t.top+h-t.onscreen.top-t.height,this.moAdvancedActionPanel.css("top",v+"px"),this.moAdvancedActionPanel[0].y=this.moAdvancedActionPanel[0].TransformFloatingOffsetY(v));this.moContainer.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS);this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS)}else n.top<=u&&(this.moContainer.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS),this.moAdvancedActionPanel.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS)),n.top=u;this.moContainer.offset(n);this.mbPinActionPnlToBottom&&(this.moAdvancedActionPanel.css("visibility","visible"),this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.ADVANED_BUTTON_PANEL_CLASS))},Hide:function(){if(this.moRootNode.mbIsPopover&&this.moRootNode[0].hidePopover(),Utils.IsIE()&&this.moContainer.removeClass(AutoCompContainer.Const.GLOBAL_CLASS),this.moContainer.css("visibility","hidden"),this.moContainer.removeClass(AutoCompContainer.Const.OPEN_CLASS),this.moAdvancedActionPanel.removeClass(AutoCompContainer.Const.OPEN_CLASS),this.mbIsDisplayed=!1,this.mbPinActionPnlToBottom&&!this.mbClickListenerForActionPnlActive){this.mbClickListenerForActionPnlActive=!0;var n=this,t=function(){n.moAdvancedActionPanel.css("visibility","hidden");n.mbClickListenerForActionPnlActive=!1};document.addEventListener("click",t,{once:!0});Matrix3.RegisterForCleanup(this.msControlID,"AutoCompHideActionPanel",function(){document.removeEventListener("click",t);n.mbClickListenerForActionPnlActive=!1})}},IsDisplayed:function(){return this.mbIsDisplayed},IsHidden:function(){return!this.mbIsDisplayed},Refresh:function(){this._RefreshPosition()},SetForceWidth:function(n){this.miForceWidth=typeof n!="number"||typeof n=="number"&&n<10?"auto":n},SetMinWidth:function(n){this.miMinWidth=typeof n!="number"||typeof n=="number"&&n<10?"auto":n},SetMaxWidth:function(n){this.miMaxWidth=typeof n!="number"||typeof n=="number"&&n<10?"auto":n},_RefreshPosition:function(){var u,i,s,t,f;this.mbLastDisplayIsOver=!1;var n=this._GetControlPosition(),r=this._GetAdvancedActionPanelPosition(),e=n.bottom+r.height,o="auto";this.mbPinActionPnlToBottom&&(e=n.bottom,this.moContainer[0].style.height="auto",this.moContainer[0].GetAutoHeight()>window.innerHeight&&(this.moContainer[0].style.maxHeight="60vh"),u=this.moContainer[0].GetAutoHeight()-r.height,u>r.height&&(o=u+"px"));i={top:0,left:0};document.fullscreenElement&&(i=$(this.moRootNode).offset());this.moContainer.css({top:e+i.top+"px",left:n.left+i.left+"px",width:"auto",height:o});s=this._ResizeHeight(n);t=this._ResizeWidth();this.moAdvancedActionPanel[0]&&(t=this.mbMatchWidthToParent?this.moAdvancedActionPanel.outerWidth():Math.max(t,this.moAdvancedActionPanel.outerWidth()),this.moContainer.outerWidth(t));this._MoveOnX(n.onscreen.left,t);this.mbPinActionPnlToBottom&&(this.moContainer.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS),this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS),f=this.moContainer[0].getBoundingClientRect(),this.moAdvancedActionPanel.css({position:"fixed","z-index":"16777271",left:f.left,top:f.bottom}),this.moControl.autocomplete("widget").css({"max-height":"calc(100% - 5px)"}))},_RefreshPositionIfOver:function(){var t,i;if(this.mbLastDisplayIsOver==!0){this.moContainer.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS);this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS);this.moContainer.css("visibility","hidden");var f=this._GetAdvancedActionPanelPosition(),n=this.moContainer.offset().top+Utils.GetDocument().scrollTop,e=Utils.IsIE7()==!0?this.moContainer.height():this.moContainer.outerHeight();var o=this._GetControlPosition(),r=o.onscreen.top,u=n+e;u!=r&&(t=r-u-f.height,t>0?n+=t:n-=t);this.moRootNode.attr("id")&&this.moRootNode.attr("id").match(/:_Popup$/)&&(n-=this.moRootNode.offset().top+Utils.GetDocument().scrollTop);i={top:0,left:0};document.fullscreenElement&&(i=$(this.moRootNode).offset());this.moContainer.css({top:n+i.top+"px",visibility:"visible"})}else this.moContainer.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS),this.moAdvancedActionPanel.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS)},_ResizeHeight:function(n){var h=this.moControl.autocomplete("widget"),t,r,c,l,s;h.css("height","auto");var i=this._GetAdvancedActionPanelPosition(),u=$("."+AutoCompletionProperties.Const.HEADER_CLASS,this.moContainer),f=$("."+AutoCompletionProperties.Const.FOOTER_CLASS,this.moContainer),e=0,o=0;if(Utils.IsIE7()==!0?(u&&u.length>0&&(e=u.height()),f&&f.length>0&&(o=f.height())):(u&&u.length>0&&(e=u.outerHeight()),f&&f.length>0&&(o=f.outerHeight())),iContainerHeight=Utils.IsIE7()==!0?this.moContainer.height()+i.height:this.moContainer.outerHeight()+i.height,t=iContainerHeight,r=this._CalculateHeightOverAndUnderControl(n),r.over-=i.height,r.under-=i.height,c=!1,r.under>=r.over||r.under-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT>AutoCompContainer.Const.MIN_HEIGHT||iContainerHeight<=r.under){var a=this.moAnchorControl.offset(),w=a.top+this.moAnchorControl.outerHeight()+iContainerHeight-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,y=$(window).scrollTop()+$(window).height()-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT;w>y?(t=y-(a.top+this.moAnchorControl.outerHeight()),(t>=AutoCompContainer.Const.MIN_HEIGHT||iContainerHeight<t)&&(c=!0,Utils.IsIE7()==!0?h.height(t-e-o-i.height):h.outerHeight(t-e-o-i.height))):c=!0;s=i.top+a.top+this.moAnchorControl.height()-i.onscreen.top;this.moAdvancedActionPanel.css("top",s+"px");this.moAdvancedActionPanel[0]&&(this.moAdvancedActionPanel[0].y=this.moAdvancedActionPanel[0].TransformFloatingOffsetY(s));this.moContainer.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS);this.moAdvancedActionPanel.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS)}if(!c){l=n.onscreen.top;this.moRootNode.attr("id")&&this.moRootNode.attr("id").match(/:_Popup$/)&&(l=n.top);var b=n.onscreen.top-iContainerHeight,p=$(window).scrollTop()+Utils.GetDocument().scrollTop+AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,v={top:0,left:0};document.fullscreenElement&&(v=$(this.moRootNode).offset());b<p?(t=n.onscreen.top-p,t<AutoCompContainer.Const.MIN_HEIGHT&&iContainerHeight>t&&(t=Math.min(iContainerHeight,AutoCompContainer.Const.MIN_HEIGHT)),Utils.IsIE7()==!0?h.height(t-e-o-i.height):h.outerHeight(t-e-o-i.height),this.moContainer.css("top",l-t+v.top+"px")):this.moContainer.css("top",l-iContainerHeight+v.top+"px");this.mbLastDisplayIsOver=!0;s=i.top+this.moAnchorControl.offset().top-i.onscreen.top-i.height;this.moAdvancedActionPanel.css("top",s+"px");this.moAdvancedActionPanel[0]&&(this.moAdvancedActionPanel[0].y=this.moAdvancedActionPanel[0].TransformFloatingOffsetY(s));this.moContainer.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS);this.moAdvancedActionPanel.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS)}return t},_CalculateHeightOverAndUnderControl:function(n){var t=Utils.GetDocument().scrollTop,i=$(window).height()+Utils.GetDocument().scrollTop,r
216=n.onscreen.top-t,u=i-n.onscreen.bottom;return{over:r,under:u}},_ResizeWidth:function(){var i=this.moControl.autocomplete("widget"),t=null,n;return(t=Utils.IsIE7()==!0?i.width():i.outerWidth(),n=t,this.miMaxWidth=="auto"&&this.miForceWidth=="auto"&&this.miMinWidth=="auto"&&this.mbUseChildQuery==!1)?t:(typeof this.miForceWidth=="number"?n=this.miForceWidth:(typeof this.miMinWidth=="number"&&t<this.miMinWidth&&(n=this.miMinWidth),typeof this.miMaxWidth=="number"&&t>this.miMaxWidth&&(n=this.miMaxWidth)),this.mbUseChildQuery==!0&&(n+=ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON*2),typeof n=="number"&&(Utils.IsIE7()==!0?(i.width(n),this.moContainer.width(n)):(i.outerWidth(n),this.moContainer.outerWidth(n))),n)},_MoveOnX:function(n,t){var f=$(window).width()+$(window).scrollLeft(),e=n+t,u=f-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_WIDTH,i,r;e>u&&(i=u-t,this.moAdvancedActionPanel[0]&&(i=Math.min(i,this.moAdvancedActionPanel.offset().left)),this.moRootNode.attr("id")&&this.moRootNode.attr("id").match(/:_Popup$/)&&(i-=this.moRootNode.offset().left+Utils.GetDocument().scrollLeft),r={top:0,left:0},document.fullscreenElement&&(r=$(this.moRootNode).offset()),this.moContainer.css("left",i+r.left))},_GetControlPosition:function(){var i=0,t=0,n=0,r=0,o=0,s=0,e=0,u=0,h=0,c=0,l=this.moAnchorControl.offset(),f;return i=l.top+Utils.GetDocument().scrollTop,t=l.left+Utils.GetDocument().scrollLeft,e=i,u=t,this.moRootNode.attr("id")&&this.moRootNode.attr("id").match(/:_Popup$/)&&(i-=this.moRootNode.offset().top+Utils.GetDocument().scrollTop,t-=this.moRootNode.offset().left+Utils.GetDocument().scrollLeft),Utils.IsIE7()==!0?(n=this.moAnchorControl.width(),r=this.moAnchorControl.height()):(n=this.moAnchorControl.outerWidth(),r=this.moAnchorControl.outerHeight()),s=t+n,o=i+r,c=u+n,h=e+r,this.moControl.is("textarea")&&(f=getCaretCoordinates(this.moControl[0],this.moControl[0].selectionEnd),o=i+f.top+20,h=e+f.top+20,t+=f.left,u+=f.left,n=200,s=t+n,c=u+n),{top:i,left:t,width:n,height:r,bottom:o,right:s,onscreen:{top:e,left:u,right:c,bottom:h}}},_GetAdvancedActionPanelPosition:function(){var i=0,r=0,n=0,t=0,o=0,s=0,u=0,f=0,h=0,c=0,e;return this.moAdvancedActionPanel[0]&&(i=this.moAdvancedActionPanel.position().top,r=this.moAdvancedActionPanel.position().left,t=this.moAdvancedActionPanel[0].GetHeight(),n=this.moAdvancedActionPanel[0].GetWidth(),o=i+t,s=r+n,e=this.moAdvancedActionPanel.offset(),u=e.top,f=e.left,h=u+t,c=f+n),{top:i,left:r,width:n,height:t,bottom:o,right:s,onscreen:{top:u,left:f,right:c,bottom:h}}},_GetRootNode:function(){var t=$PI(this.msControlID),n;if(!t)return null;if(t.hasAttribute("use-popover")&&CSS.supports("(overlay: auto)")&&typeof HTMLDivElement.prototype.showPopover=="function")return n=document.createElement("div"),n.classList.add("AutoCompContainer_TopLayer"),n.style.position="absolute",n.style.overflow="visible",n.style.pointerEvents="none",n.setAttribute("popover","manual"),t.appendChild(n),n=$(n),n.mbIsPopover=!0,n;while(t.moParent)t=t.moParent;return $(t.GetNode())},_Create:function(){var r,n,t,i;if((this.moRootNode=this._GetRootNode(),this.moRootNode)&&(this.moContainer=$E(this.msContainerID),this.moContainer.length>0&&this.moContainer.remove(),this.moContainer=$('<div id="'+this.msContainerID+'"><\/div>'),this.moRootNode.append(this.moContainer),this.moContainer.addClass("ClearFixC"),this.moContainer.addClass(AutoCompContainer.Const.GLOBAL_CLASS),this.moAdvancedActionPanel.length>0&&this.moContainer.addClass(AutoCompContainer.Const.HAS_ADVANED_ACTION_PANEL_CLASS),this.msSpecificClass&&this.msSpecificClass!=""&&this.moContainer.addClass(this.msSpecificClass),this.moContainer.css({position:"absolute",visibility:"hidden",width:"auto",height:"auto",overflow:"hidden","max-width":"90vw","pointer-events":"auto"}),r=this.msControlID,n=this,!Utils.IsIE())){t=function(){var h,l,v,u;if(n.mbIsDisplayed){var i=$("."+AutoCompletionProperties.Const.HEADER_CLASS,n.moContainer),r=$("."+AutoCompletionProperties.Const.FOOTER_CLASS,n.moContainer),o=0,s=0;Utils.IsIE7()==!0?(i&&i.length>0&&(o=i.height()),r&&r.length>0&&(s=r.height())):(i&&i.length>0&&(o=i.outerHeight()),r&&r.length>0&&(s=r.outerHeight()));var t=n._GetAdvancedActionPanelPosition(),f=n.moContainer.offset(),c=n.moAnchorControl,e=c.offset();if(f.top=e.top+c.outerHeight()+t.height,f.top+n.moContainer.height()>
216Utils.GetViewportHeight()){h=1;l=$("li",n.moControl.autocomplete("widget"));l.length>0?l.each(function(n,t){h+=$(t).outerHeight()}):h=1;var w=h+o+s+t.height,y=Utils.GetViewportHeight()-f.top-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,p=e.top-t.height-AutoCompContainer.Const.SCREEN_MIN_DISTANCE_HEIGHT,a=y;p>y&&(a=p,f.top=e.top-n.moContainer.outerHeight()-t.height);w>a&&(v=a,n.moControl.autocomplete("widget").outerHeight(v-o-s),n.moContainer.outerHeight(v));n.moAdvancedActionPanel[0]&&(u=t.top+e.top-t.onscreen.top-t.height,n.moAdvancedActionPanel.css("top",u+"px"),n.moAdvancedActionPanel[0].y=n.moAdvancedActionPanel[0].TransformFloatingOffsetY(u));n.moContainer.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS);n.moAdvancedActionPanel.addClass(AutoCompContainer.Const.PLACE_OVER_CLASS)}else n.moAdvancedActionPanel[0]&&(u=t.top+e.top-t.onscreen.top+c.outerHeight(),n.moAdvancedActionPanel.css("top",u+"px"),n.moAdvancedActionPanel[0].y=n.moAdvancedActionPanel[0].TransformFloatingOffsetY(u)),n.moContainer.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS),n.moAdvancedActionPanel.removeClass(AutoCompContainer.Const.PLACE_OVER_CLASS);n.moContainer.offset(f)}};i=$(".ScrollablePanel").add(this.moContainer.parents().toArray()).add(window);$(i).on("scroll",t);Matrix3.RegisterForCleanup(this.msControlID,"AutoCompContainerOffsetUpdate",function(){setTimeout(function(){$(i).off("scroll",t)},100)})}},_GenerateContainerClass:function(n){if(typeof n=="string"&&(n=Utils.Trim(n),n!="")){n=n+AutoCompContainer.Const.CLASS_SUFFIX;var t=new RegExp(" ","g");return n=n.replace(t," "),t=new RegExp(" ","g"),n=n.replace(t,AutoCompContainer.Const.CLASS_SUFFIX+" "),n==AutoCompContainer.Const.GLOBAL_CLASS&&(n=""),n}return""}};AutoCompInvokedWithChar.prototype={_Init:function(){this.msTriggerChar=this.moOptions.cInvokeWithChar;this.msTriggerCharLower=this.msTriggerChar.toLowerCase();this.miCarretPosition=null},_SpecificOnClick:function(){this.moAutoComp._ResetSourceResponseCache()},_SpecificOnKeyUp:function(n){n.keyCode==8&&this.moAutoComp._ResetSourceResponseCache()},SetCarretPosition:function(){this.miCarretPosition=this._GetCarretPosition()},ClearCarretPosition:function(){this.miCarretPosition=null},_GetCarretPosition:function(){var t=this.moAutoComp.moAutoComp[0],n,i;return t.setSelectionRange?n=t.selectionStart:document.selection&&document.selection.createRange&&(i=document.selection.createRange(),n=0-i.duplicate().moveStart("character",-1e5)),n},_GetTermToComplete:function(n){var t=null,r,f,s,c,l,e,o,y,i,a,h;n=this.moAutoComp.moAutoComp.val()+" ";n=n.replace(/(\r\n|\n|\r)/gm," ");var v=this._GetCarretPosition(),u=this.miCarretPosition!==null?this.miCarretPosition:v;return(n=n.replace(/https?:\/\/\S+/g,n=>" ".repeat(n.length)),r=n.slice(0,u).toLowerCase().lastIndexOf(this.msTriggerCharLower),r<0||r>u)?null:(f=null,s=n.slice(0,r).search(/\([^\)]*$|\[[^\]]*$|{[^}]*$/),s>0&&(c=n.slice(s,r).search(/[\(\[{][^\(\[{]*$/),l={"(":")","[":"]","{":"}"},f=l[n[s+c]]),e=-1,f&&(e=n.indexOf(f,r+this.msTriggerChar.length),e>=0&&u>e))?null:(o="",o=e>=0?n.slice(r,Math.min(n.indexOf(" ",u),n.indexOf(f,u))):n.slice(r,n.indexOf(" ",u)),y=o.toLowerCase().lastIndexOf(this.msTriggerCharLower),i=/\S+\s[^\s\.,;:!\?\(\)\{\}\[\]"-]*$/.exec(o),i!=null&&i[0].toLowerCase().startsWith(this.msTriggerCharLower)?t=i[0].substring(this.msTriggerChar.length):(i=/\S[^\s\.,;:!\?\(\)\{\}\[\]"-]*$/.exec(o),i!=null&&i[0].toLowerCase().includes(this.msTriggerCharLower)&&(a=i[0].toLowerCase().indexOf(this.msTriggerCharLower),t=i[0].substring(a+this.msTriggerChar.length))),t!=null&&(h=t.search(/[<>]/),h>=0&&(t=t.substring(0,h)),t=t.replace(/\s+$/g,""),t===""))?null:t},_SpecificItemSelectEventFire:function(n){var k=n.bodyValue,a=n.type,c,l,p,w,i,u,y,r,f,e;a||(a="");var o=this.moAutoComp._CleanBodyTextForInput(n.bodyText),t=this.moAutoComp.moAutoComp.val(),d=this._GetCarretPosition(),s=this.miCarretPosition!==null?this.miCarretPosition:d,h=t.slice(0,s).toLowerCase().lastIndexOf(this.msTriggerCharLower);if(h<0||h>s)return null;for(c=null,l=t.slice(0,h).search(/\([^\)]*$|\[[^\]]*$|{[^}]*$/),l>0&&(p=t.slice(l,h).search(/[\(\[{][^\(\[{]*$/),w={"(":")","[":"]","{":"}"},c=w[t[l+p]]),i=s;i<t.length&&t[i]!=" "&&t[i]!="\r"&&t[i]!="\n"&&(!c||t[i]!==c);)i++;for(u=s;u>0&&!t.slice(u).toLowerCase().startsWith(this.msTriggerCharLower);)u--;var b=t.substring(0,u)+this.msTriggerChar+o+t.substring(i),g=this.msTriggerChar+o,nt='<span data-value="'+k+'" data-type="'+a+'">'+this.msTriggerChar+o+"<\/span>",v=$PI(this.moAutoComp.msID);return v&&(y=v.GetProperty("RT",{}),y[g]=nt,v.SetProperty("RT",y)),this.moAutoComp.moAutoComp.val(b),this.moAutoComp.moAutoComp.trigger("change"),r=this.moAutoComp.moAutoComp[0],f=u+o.length+this.msTriggerChar.length,r.setSelectionRange?(r.setSelectionRange(f,f),r.blur(),r.focus()):r.createTextRange&&(e=r.createTextRange(),e.collapse(!0),e.moveEnd("character",f),e.moveStart("character",f),e.select()),b}};AutoCompletionMgr={oControls:{},Setup:function(n,t){n&&n!=""&&(this.oControls[n]=new AutoCompletionProperties(n),this.oControls[n].Setup(t))},Get:function(n){if(n&&n!=""){if(this.oControls[n])return this.oControls[n];if(this.oControls[n+"_Value"])return this.oControls[n+"_Value"]}return null},DisableAll:function(){for(var n in this.oControls)this.oControls[n].Disable()},EnableAll:function(){for(var n in this.oControls)this.oControls[n].Enable()},HasJustClosedControl:function(){var n,t;for(n in this.oControls)if(t=this.oControls[n],t.mbJustClosed)return!0;return!1}};AutoCompletionProperties.Const={KEYS_SELECTORS:[13,39],DEFAULT_VALUE_FIELD_SUFFIX:"_Value",URL:"htm/AutoCompletion.aspx",QUERYVALUE:"V",QUERYFILE:"Q",QUERYSEARCH:"S",FILTERFILE:"F",PARAMTABLE:"PT",PARAMTABLE_FILTERS:"PTF",ADDITIONALS:"A",FLASH_MODE:"FL",MAXRESULTS:"M",PROPERTIES:"P",VIEWSTATE:"VS",TEXTBOXFIELDS:"C",USE_CHILD_QUERY:"CQ",USE_PARENT_QUERY:"PQ",SQL_PLACEHOLDER1:"SQLPH1",SQL_PLACEHOLDER2:"SQLPH2",ORDERBY:"O",COLSTYLECLASSES:"CSC",JSON_MAXCOUNT:"__M__",JSON_HEADER:"__H__",JSON_COL_NAME:"__N__",JSON_COL_WIDTH:"__W__",JSON_SPECIFIC_CLASS:"__Z__",JSON_QUERY:"__Q__",JSON_SHOW_CHILDREN:"__SC__",JSON_SHOW_PARENT:"__SP__",JSON_TYPE:"TY",JSON_CUSTOMSTYLE:"CS",JSON_RECOMMENDED:"R",JSON_TOOLTIP:"TT",MAX_RESULTS_COMPLEXE_AUTOCOMP_IE:100,MAX_RESULTS_COMPLEXE_AUTOCOMP_OTHERS:null,MAX_RESULTS_IE8:40,EMPTY_LIST_TEXT:"__EL__",EMPTY_VALUE:"[EMPTY]",REQUEST_ALL_QUERY:" ",CLEARFIX_CLASS:"ACClearFix",LOADER_CLASS:"ACLoader",LOADER_IMAGE_CLASS:"img",LOADER_JQUERY_CLASS:"ui-autocomplete-loading",HEADER_CLASS:"HeaderRow",FOOTER_CLASS:"FooterRow",GROUP_HEADER_CLASS:"GroupHeaderRow",EMPTY_ROW_CLASS:"EmptyRow",NO_ITEM_MESSAGE_CLASS:"NoItemMessage",LI_CLASS_FOR_TEXTAREA:"textarea",SUGGEST_CREATE_ENTRY_CLASS:"ui-menu-item-create",PROPERTY_AC_CREATION_LINE_TEMPLATE:"ACCL",PROPERTY_AC_CREATION_LINE_TEMPLATE_NO_ENTE
216RED_TEXT:"ACCLNT",PROPERTY_AC_CREATION_LINE_ADVANCED_ICON:"ACCL_ADV_ICON",CREATE_ENTRY_TAG_TEXT:"[TEXT]",CREATE_ENTRY_RESERVED_VALUE:"%CREATE_ENTRY%",GROUP_HEADER_RESERVED_VALUE:"___GROUP_HEADER___",SCROLLBAR_WIDTH:19,DEFAULT_COLUMN_WIDTH:200,NO_LIMIT_KEYWORD:"NoLimit",PROPERTY_AC_BLANK_PLACEHOLDER:"ACBPH",EVENT_LINE_DETAILS:"AUTOCOMP_LINE_DETAILS",SUFFIX_DROP_DOWN:"_DD",CELL_COMPENSATION_WIDTH:parseInt(window.Param.ACCellCompensationWidth)||6,AC_WIDGET_NAME:"ui-autocomplete"};AutoCompletionProperties.prototype={Setup:function(n){if(typeof n!="object"&&(n={}),this.moOptions=$.extend(this.moBaseDefaultOptions,n),$PI(this.msID)&&document.getElementById(this.msID)&&this._CheckOptions()){if(this._CleanOptions(),this.moOptions.bCxRichText===!0)return;this._InitContainer();this._CheckComplexAutoComp();this._CheckAutoCompMultiEntry();this._CheckAutoCompTextarea();this._CheckAutoCompInvokeWithChar();this._CreateLoader();this._BindAutoCompEvent()}},SetEvent:function(n,t,i,r,u,f,e,o,s,h){this.moEvents[n]={name:i,vform_id:t,type:r,delay:u,args:f,comm:e,commargs:o,pls_wait_msg:s,block_interaction:h}},SetEventSelect:function(n,t,i,r,u,f,e,o){this.SetEvent("select",n,t,i,r,u,f,e,o)},SetEventOption:function(n,t,i,r,u,f,e){this.SetEvent("option",n,t,i,r,u,f,e)},Enable:function(){var n,t;this.mbIsEnabled=!0;n=document.getElementById(this.msID);n&&(t=$.data(n,AutoCompletionProperties.Const.AC_WIDGET_NAME),t&&this.moAutoComp.autocomplete("enable"))},Disable:function(){var n,t;this.msID&&(n=document.getElementById(this.msID),n)&&(t=$.data(n,AutoCompletionProperties.Const.AC_WIDGET_NAME),t)&&(this.mbHasDebugQuery||$(n).is(":focus")||(this.mbIsEnabled=!1,this._HideLoader(),this.moAutoComp.autocomplete("close"),this.moAutoComp.autocomplete("disable"),this.moContainer.Hide()))},DdbClicked:function(){this.moContainer.IsDisplayed()&&(this.mbNextRequestAllIsClose=!0)},RequestAll:function(n,t){var i=this.moAutoComp.attr("disabled"),r=this.moAutoComp.attr("readonly");(typeof i=="undefined"||i===!1)&&(typeof r=="undefined"||r===!1)&&(this.mbNextRequestAllIsClose?(this.mbNextRequestAllIsClose=!1,this.moAutoComp.autocomplete("close")):(this.mbDoNotPreselectOption=!0,this.moCache={},this.mbComplexAutoComp===!0&&this.moComplexAutoComp.reset(),this.moAutoComp.focus(),Utils.IsIE()||this._DisableQueryDelay(),t&&t.length>0?(this.moAutoComp.val(t),this.moAutoComp.trigger("change"),this.moAutoComp.autocomplete("search",t)):(this.moAutoComp.autocomplete("search",AutoCompletionProperties.Const.REQUEST_ALL_QUERY),this.moAutoComp.select()),this.mbDoNotPreselectOption=!1))},GetFieldValueID:function(){return!this.moOptions.sIDFieldValue||this.moOptions.sIDFieldValue==null?this.msID+AutoCompletionProperties.Const.DEFAULT_VALUE_FIELD_SUFFIX:this.moOptions.sIDFieldValue},Action_SelectIndex:function(){},IsItemSelected:function(){return this.mbItemSelected},_CheckOptions:function(){if(this.moOptions.sParamTablePath&&this.moOptions.sParamTablePath!=null||Utils.IsString(this.moOptions.sParamTablePath))return!0;if(!this.moOptions.sQueryFile||this.moOptions.sQueryFile==null||Utils.IsString(this.moOptions.sQueryFile)==!1||!this.moOptions.sQueryFilterFile||this.moOptions.sQueryFilterFile==null||Utils.IsString(this.moOptions.sQueryFilterFile)==!1){if(this.moOptions.oStaticSource==null||this.moOptions.oStaticSourceKeys==null)return!1;this.mbIsStaticSource=!0;this.moStaticSource=this.moOptions.oStaticSource;this.moStaticSourceKeys=this.moOptions.oStaticSourceKeys;this.moStaticSourceKeysRecommended=this.moOptions.oStaticSourceKeysRecommended;this.moStaticSourceTitles=this.moOptions.oStaticSourceTitles;this.moStaticSourceSearchData=this.moOptions.oStaticSourceSearchData;this.moStaticSourceDescriptions=this.moOptions.oStaticSourceDescriptions;this.moStaticSourceGroups=this.moOptions.oStaticSourceGroups;this.mbShowHeader=!1;var n=this.moOptions.oStaticSourceColumnsConfigs,t=this;n&&n.length>0&&n.forEach(function(n){var i=n.split("|"),r=i&&i[0]?i[0]:"";Utils.IsStringFilled(r)&&(t.mbShowHeader=!0);t.moStaticSourceColumnsHeaders.push(r);t.moStaticSourceColumnsSizes.push(i&&i[1]?i[1]:"")});this.moStaticSourceIcons=this.moOptions.oStaticSourceIcons;this.moStaticColorCode=this.moOptions.oStaticColorCode;this.moStaticFontIcons=this.moOptions.oStaticFontIcons;this.moStaticCustomIcons=this.moOptions.oStaticCustomIcons;this.msCustomIconImageElementID=this.moOptions.sCustomIconImageElementID}return!0},_InitContainer:function(){var n=ControlMgr.GetInstance().GetPositionItem($PI(this.msID).GetBrotherId(this.moOptions.sAnchorControl)),t;n==null&&(n=ControlMgr.GetInstance().GetReference(this.moOptions.sAnchorControl));t=this._GetAdvActionPanel();this.moContainer=new AutoCompContainer(this.msID,this.moOptions.sContainerClass,n,t,this.moOptions.bMatchContainerWidthToParent,this.moOptions.bPinActionPnlToBottom);!this.moStaticFontIcons&&this.moStaticSourceIcons&&this.moContainer.moContainer.addClass("IC")},_GetAdvActionPanel:function(){var n=ControlMgr.GetInstance().GetPositionItem($PI(this.msID).GetBrotherId(this.moOptions.sAdvancedActionPanel));return n==null&&(n=ControlMgr.GetInstance().GetReference(this.moOptions.sAdvancedActionPanel)),n},_CheckComplexAutoComp:function(){(this.moOptions.sChildQueryFile&&this.moOptions.sChildQueryFile!=null&&this.moOptions.sChildQueryFile!=""||this.moOptions.sOption&&this.moOptions.sOption!=null&&this.moOptions.sOption!=""||this.moOptions.bAddDetails&&this.moOptions.bAddDetails!=null&&this.moOptions.bAddDetails!="")&&this._ActivComplexAutoComp()},_ActivComplexAutoComp:function(){this.mbComplexAutoComp==!1&&(this.mbComplexAutoComp=!0,this.moComplexAutoComp=new ComplexAutoCompProperties(this,this.moOptions),Utils.IsIE()&&this.moOptions.iMaxResults>AutoCompletionProperties.Const.MAX_RESULTS_COMPLEXE_AUTOCOMP_IE&&(this.moOptions.iMaxResults=AutoCompletionProperties.Const.MAX_RESULTS_COMPLEXE_AUTOCOMP_IE))},_CheckAutoCompTextarea:function(){this.moAutoComp.get(0).tagName.toLowerCase()=="textarea"&&this._ActiveAutoCompTextarea()},_ActiveAutoCompTextarea:function(){this.mbAutoCompTextarea==!1&&(this.mbAutoCompTextarea=!0,this.moAutoCompTextarea=new AutoCompTextarea(this))},_CheckAutoCompMultiEntry:function(){this.moOptions.bAllowMultiEntry==!0&&this.moOptions.sMultiEntrySeparator&&this.moOptions.sMultiEntrySeparator.length>0&&this._ActiveAutoCompMultiEntry()},_ActiveAutoCompMultiEntry:function(){this.mbAutoCompMultiEntry==!1&&(this.mbAutoCompMultiEntry=!0,this.moAutoCompMultiEntry=new AutoCompMultiEntry(this))},_CheckAutoCompInvokeWithChar:function(){this.moOptions.cInvokeWithChar!=null&&this.moOptions.cInvokeWithChar.length>
2160&&this._ActiveAutoCompInvokeWithChar()},_ActiveAutoCompInvokeWithChar:function(){this.mbAutoCompInvokedWithChar==!1&&(this.mbAutoCompInvokedWithChar=!0,this.moAutoCompInvokedWithChar=new AutoCompInvokedWithChar(this))},_CleanOptions:function(){this.moOptions.sIDFieldValue=this.moOptions.sIDFieldValue==null?this.msID+AutoCompletionProperties.Const.VALUEFIELD:Utils.Trim(this.moOptions.sIDFieldValue);this.moFieldValue=$E(this.moOptions.sIDFieldValue);this.moOptions.bForceSelection=Utils.ParseBool(this.moOptions.bForceSelection);this.moOptions.bMatchContainerWidthToParent=Utils.ParseBool(this.moOptions.bMatchContainerWidthToParent);this.moOptions.iMaxResults!=AutoCompletionProperties.Const.NO_LIMIT_KEYWORD&&parseInt(this.moOptions.iMaxResults)>0&&(this.moOptions.iMaxResults=parseInt(this.moOptions.iMaxResults));Utils.IsIE8()&&this.mbIsStaticSource==!1&&(this.moOptions.iMaxResults=AutoCompletionProperties.Const.MAX_RESULTS_IE8);this.moOptions.iMinLength=parseInt(this.moOptions.iMinLength);this.moOptions.iQueryDelay=parseInt(this.moOptions.iQueryDelay);this.moOptions.bAllowCreation=Utils.ParseBool(this.moOptions.bAllowCreation);this.moOptions.bAllowCreationOnEmptyText!=null&&(this.moOptions.bAllowCreationOnEmptyText=Utils.ParseBool(this.moOptions.bAllowCreationOnEmptyText));this.moOptions.bSuggestEmpty=Utils.ParseBool(this.moOptions.bSuggestEmpty);this.moOptions.bAddDetails=Utils.ParseBool(this.moOptions.bAddDetails);this.moOptions.bDropDown=Utils.ParseBool(this.moOptions.bDropDown);this.moOptions.bAllowMultiEntry=Utils.ParseBool(this.moOptions.bAllowMultiEntry);this.moOptions.bPreSelectFirstValue=Utils.ParseBool(this.moOptions.bPreSelectFirstValue);this.moOptions.bHideColumnTitle=Utils.ParseBool(this.moOptions.bHideColumnTitle);this.moOptions.bHideLoaderImage=Utils.ParseBool(this.moOptions.bHideLoaderImage);this.moOptions.bAllowMultiEntryDuplicate=Utils.ParseBool(this.moOptions.bAllowMultiEntryDuplicate);this.moOptions.bAutoFocus=Utils.ParseBool(this.moOptions.bAutoFocus);this.moOptions.bEnlargeTextarea=Utils.ParseBool(this.moOptions.bEnlargeTextarea);this.moOptions.iMaxHeightTextarea=parseInt(this.moOptions.iMaxHeightTextarea);this.moOptions.bRequestAllOnClick=Utils.ParseBool(this.moOptions.bRequestAllOnClick);this.moOptions.bRequestAllOnHover=Utils.ParseBool(this.moOptions.bRequestAllOnHover);this.moOptions.bRequestAllOnCreation=Utils.ParseBool(this.moOptions.bRequestAllOnCreation);this.moOptions.bAutoFillTextOnCreation=Utils.ParseBool(this.moOptions.bAutoFillTextOnCreation);this.moOptions.bSelectAllOnClick=Utils.ParseBool(this.moOptions.bSelectAllOnClick);this.moOptions.bStaticSourceEmpty=Utils.ParseBool(this.moOptions.bStaticSourceEmpty);this.moOptions.bSmartSearchOrder=Utils.ParseBool(this.moOptions.bSmartSearchOrder);this.moOptions.bKeepStaticSource=Utils.ParseBool(this.moOptions.bKeepStaticSource);this.moOptions.bEnableHTML=Utils.ParseBool(this.moOptions.bEnableHTML);this.moOptions.bEnableStructuralElement=Utils.ParseBool(this.moOptions.bEnableStructuralElement);this.moOptions.bAutoWidth=Utils.ParseBool(this.moOptions.bAutoWidth);this.moOptions.bForceAutoWidthImmediately=Utils.ParseBool(this.moOptions.bForceAutoWidthImmediately);this.moOptions.iAutoWidthPadding=parseInt(this.moOptions.iAutoWidthPadding);this.moOptions.bCloseIfControlNotVisible=Utils.ParseBool(this.moOptions.bCloseIfControlNotVisible);this.moOptions.bPinActionPnlToBottom=Utils.ParseBool(this.moOptions.bPinActionPnlToBottom);this.moOptions.bAutoCompLabelVerticalAlignCenter=Utils.ParseBool(this.moOptions.bAutoCompLabelVerticalAlignCenter);this.moOptions.bCxRichText=Utils.ParseBool(this.moOptions.bCxRichText);this.mbIsStaticSource==!0&&(this.moOptions.bRequestAllOnClick=!0,this.moOptions.iMinLength=0);this.moOptions.oStaticSource==null&&(this.moOptions.bPreSelectFirstValue=!1);this.moOptions.sMultiEntrySeparator=String(this.moOptions.sMultiEntrySeparator);this.moOptions.sOneColumnTemplate!=null&&(this.moOptions.sOneColumnTemplate=Utils.Trim(String(this.moOptions.sOneColumnTemplate)),this.moOptions.sOneColumnTemplate!=""?this.moOptions.bUseOneColumnTemplate=!0:this.moOptions.sOneColumnTemplate=null);this.moOptions.iMinWidth!=null&&(this.moOptions.iMinWidth=parseInt(this.moOptions.iMinWidth));this.moOptions.iMaxWidth!=null&&(this.moOptions.iMaxWidth=parseInt(this.moOptions.iMaxWidth));this.moOptions.iForceWidth!=null&&(this.moOptions.iForceWidth=parseInt(this.moOptions.iForceWidth));typeof this.moOptions.sChildQueryFile=="string"&&this.moOptions.sChildQueryFile!=""&&(this.mbUseChildQuery=!0);typeof this.moOptions.sParentQueryFile=="string"&&this.moOptions.sParentQueryFile!=""&&(this.mbUseParentQuery=!0)},_BindAutoCompEvent:function(){var n=this,r=this.moAutoComp.attr("placeholder"),t,i;this.moAutoComp.data("placeholder")||this.moAutoComp.data("placeholder",r);this._SelectDefaultValueStaticSource();this._BindKeyDownForFocus();this.msLatestItemLabel=this.moAutoComp.val();this.msLatestItemValue=this.moFieldValue.val();this.msOriginalItemLabel=this.msLatestItemLabel;
216this.msOriginalItemValue=this.msLatestItemValue;this._BindOnClick();this._BindOnMouseEnter();this._BindOnMouseLeave();this._BindOnKeyUp();this._BindOnFocusOut();this._BindOnCopy();t=this.moAutoComp;this.moAutoComp.autocomplete({minLength:n.moOptions.iMinLength,appendTo:"[id='"+n.moContainer.GetID()+"']",delay:n.moOptions.iQueryDelay,create:function(){n.moOptions.bAutoFillTextOnCreation&&Utils.IsStringFilled(n.msLatestItemValue)&&n._SetSourceResponse({term:AutoCompletionProperties.Const.REQUEST_ALL_QUERY},n.SetAutoCompText)},source:function(t,i){n._SetSourceResponse(t,i)},focus:function(){var t=$(".ui-state-focus",n.moAutoComp.autocomplete("widget")).parent("li");return n.moLastLiFocused!=null&&n.moLastLiFocused.is(t)?!1:(n.moLastLiFocused!=null&&n.moLastLiFocused.length>0&&n.moLastLiFocused.removeClass("focused"),n.moLastLiFocused=t,n.moLastLiFocused.addClass("focused"),n.mbAutoCompMultiEntry==!0||n.mbAutoCompInvokedWithChar==!0?!1:void 0)},search:function(i){if(Utils.IsIE()&&t.attr("placeholder",""),i&&(i.keyCode==17||i.keyCode==91))return!1;n._ShowLoader();n.miLineCounter=0;n.miNumberRealItems=0;n.mbItemSelected=!1},open:function(){if(this.mbLastSearchNoResult=!1,n._HideLoader(),n._RefreshPositionOfWidget(),n.mbFirstShow&&n.moOptions.bRequestAllOnCreation){n.mbFirstShow=!1;var t=n._GetAdvActionPanel();t&&$(t).removeClass("InvisibleC");n.moAutoComp.focus()}typeof n.moOptions.iMinWidth=="number"&&n.moContainer.SetMinWidth(n.moOptions.iMinWidth);typeof n.moOptions.iMaxWidth=="number"&&n.moContainer.SetMaxWidth(n.moOptions.iMaxWidth);typeof n.moOptions.iForceWidth=="number"?n.moContainer.SetForceWidth(n.moOptions.iForceWidth):typeof n.miContainerWidthTotal=="number"&&n.moContainer.SetForceWidth(n.miContainerWidthTotal);
216n.moContainer.Refresh();n.moContainer.Show();n.mbOpenedByKeyboard&&(n.miKeyboardOpenTimeout=setTimeout(function(){var i=$(n.moAutoComp).data("uiAutocomplete"),t,r;i&&i.menu&&(t=i.menu,t.element&&t.element.children().length>0&&(r=t.element.children().first(),t.focus(null,r)));n.mbOpenedByKeyboard=!1;n.miKeyboardOpenTimeout=null},0));Matrix3&&Matrix3.moCMS&&Matrix3.moCMS.RerenderVUCButtons&&Matrix3.moCMS.RerenderVUCButtons();n.moDropDownBtn.off("click");n.moDropDownBtn.one("click",function(n){n.stopPropagation()})},close:function(i){n.moContainer.Hide();n._HideLoader();n.mbJustClosed=!0;setTimeout(function(){n.mbJustClosed=!1},200);Utils.IsIE()&&t.data("placeholder")&&t.attr("placeholder",t.data("placeholder"));Matrix3&&Matrix3.moCMS&&Matrix3.moCMS.RerenderVUCButtons&&Matrix3.moCMS.RerenderVUCButtons();i.originalEvent&&i.originalEvent.type==="keydown"&&i.originalEvent.key==="Escape"&&i.originalEvent.stopImmediatePropagation();n.miKeyboardOpenTimeout&&(clearTimeout(n.miKeyboardOpenTimeout),n.miKeyboardOpenTimeout=null,n.mbOpenedByKeyboard=!1)},select:function(t,i){var r=i.item,f=!1,e=$("<div/>").text(r.value).html(),o="$START_TAG$"+e+"$END_TAG$",u;if(r.bodyValue==="%CREATE_ENTRY%"&&r.value&&r.bodyContent)for(u=0;u<r.bodyContent.length;u++)if(r.bodyContent[u]!==""&&r.bodyContent[u].indexOf(o)===-1){f=!0;break}return(f&&(r.value="",r.bodyText="",r.label=""),!r||r&&n._IsSelectableValue(r)==!1)?!1:(n.mbCreateNewEntry=r.bodyValue==="%CREATE_ENTRY%",n.mbUIValueFilled=r.value!=null&&r.value.length>0,n.mbItemSelected=!0,n._ItemSelectEventFire(r),n.msLatestItemLabel=n.moAutoComp.val(),n.moFieldValue&&(n.msLatestItemValue=n.moFieldValue.val()),t&&t.keyCode&&Utils.IndexOf(n.moKeySelectorsToContinueEvents,t.keyCode)<0&&t.stopImmediatePropagation(),!1)},response:function(){$(".tipsy").remove();n._HideLoader()},change:function(t,i){return Utils.IsStringFilled(this.value)||!n.moOptions.bSuggestEmpty||i.item?!1:(n._SetSourceResponse({term:AutoCompletionProperties.Const.REQUEST_ALL_QUERY},n.FireSelectionEventOnEmptyItem),!0)}}).data("uiAutocomplete")._renderMenu=function(t,i){n._RenderMenu(t,i)};this.moAutoComp.data("uiAutocomplete").menu.options.items=">:not(."+AutoCompletionProperties.Const.GROUP_HEADER_CLASS+")";i=function(){$(".focused",n.moAutoComp.autocomplete("widget")).removeClass("focused")};$(document.body).on("click","input.ui-autocomplete-input",i);if(Matrix3.RegisterForCleanup(this.msID,"AC_RemoveOtherFocus",function(){$(document.body).off("click","input.ui-autocomplete-input",i)}),Matrix3.RegisterForCleanup(this.msID,"AC_Destroy",function(){n.moAutoComp&&n.moAutoComp.autocomplete("instance")&&n.moAutoComp.autocomplete("destroy")}),Matrix3.RegisterForCleanup(this.msID,"AC_Mirror",function(){if(n.moContainer&&n.moContainer.GetID()){var t=document.getElementById(n.moContainer.GetID());t&&t.remove()}}),this.moOptions.bCloseIfControlNotVisible){VisibilityObserverMgr.GetInstance().Add(this.msID);$($PI(this.msID)).on(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,function(t){t.visible||n.moAutoComp.autocomplete("close")})}},FireSelectionEventOnEmptyItem:function(n,t){for(var i,r=0;r<n.length;r++)if(i=n[r],(i.bodyValue===AutoCompletionProperties.Const.EMPTY_VALUE||i.bodyValue==="")&&t._IsSelectableValue(i)){t.mbItemSelected=!0;t._ItemSelectEventFire(i);break}},SetAutoCompText:function(n,t){for(var i,r=0;r<n.length;r++)if(i=n[r],i.bodyValue==t.msLatestItemValue){t.moAutoComp.val(i.label);t.msLatestItemLabel=i.label;t.msOriginalItemLabel=i.label;break}},_Resize:function(){if(this.moOptions.bAutoWidth){this.moAutoComp.attr("size",this.moAutoComp.val().length+this.moOptions.iAutoWidthPadding);var n=$PI(this.msID);n.ForceHasChanged();PositionMgr.GetInstance().AddToDirtyXList(n);this.moOptions.bForceAutoWidthImmediately?PositionMgr.GetInstance().CalculatePosition():Matrix3.HasEventsInProgress()||PositionMgr.GetInstance().CalculatePosition()}},_RenderMenu:function(n,t){var o,s,l,a,v,i,e,c;if(!t||t.length==0){this.moAutoComp.autocomplete("close");return}for(o=0,s=0;s<t.length;s++)o=Math.max(o,t[s].bodyContent.length);o>1&&(this.miNbColumns=t[0].bodyContent.length,this._ActivComplexAutoComp());var h=this,r="",u="",f="";if($("."+AutoCompletionProperties.Const.HEADER_CLASS,this.moContainer.GetObj()).remove(),$("."+AutoCompletionProperties.Const.FOOTER_CLASS,this.moContainer.GetObj()).remove(),this.miNumberRealItems=this._GetNbRealItems(t),this.miNumberRealItems==0)if(this.mbComplexAutoComp==!0&&this.moComplexAutoComp.masSearchLevel.length>0)l=uuidv4(),u+='<div class="'+AutoCompletionProperties.Const.NO_ITEM_MESSAGE_CLASS+'"><span id="'+l+'" class="ACPreviousSearchBtn" style="display: inline-block; top:5px; cursor: pointer;"><\/span><span style="display: inline-block; padding-bottom:10px">'+this.moOptions.sNoChildItemMessage+"<\/span><\/div>",a=this.msID,function(){$(document).ready(function(){$('[id="'+l+'"]').off("
216click").click(function(n){return Utils.StopPropagation(n),n.stopPropagation(),AutoCompletionMgr.Get(a).moComplexAutoComp.PreviousSearch(),!1})})}();else if(this.moOptions.sNoItemMessage&&this.moOptions.sNoItemMessage!=null&&Utils.Trim(this.moOptions.sNoItemMessage)!="")v=Utils.htmlDecode(this.moOptions.sNoItemMessage),u+='<div class="'+AutoCompletionProperties.Const.NO_ITEM_MESSAGE_CLASS+'">'+v+"<\/div>",this.moEvents.option&&this.mbComplexAutoComp==!0&&(i=this.moComplexAutoComp.SpecificRenderMenu(n,t),n=i.ul,this.miScrollTop=i.ulScrollTop,t=i.aoResults,r+=i.sHeader,f+=i.sFooter);else{this.moAutoComp.autocomplete("close");return}else this.mbComplexAutoComp==!0&&(i=this.moComplexAutoComp.SpecificRenderMenu(n,t),n=i.ul,n.addClass("complex"),this.miScrollTop=i.ulScrollTop,t=i.aoResults,r+=i.sHeader,f+=i.sFooter);if(r&&Utils.Trim(r)!=""&&this.moOptions.bHideColumnTitle==!1&&this.moContainer.GetObj().prepend('<div class="ClearFixC '+AutoCompletionProperties.Const.HEADER_CLASS+'">'+r+'<\/div><div class="'+AutoCompletionProperties.Const.CLEARFIX_CLASS+'"><\/div>'),u&&Utils.Trim(u)!=""?n.append("<li role='presentation'>"+u+"<\/li>"):$.each(t,function(i,r){var f,u;(r.bodyValue==AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE||r.bodyText==AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE||h.moOptions.iMaxResults==AutoCompletionProperties.Const.NO_LIMIT_KEYWORD||i-t.slice(0,i).filter(function(n){return n.bodyText===AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE}).length<h.moOptions.iMaxResults)&&(r.bodyText===AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE?(f=$("<li role='presentation' class='"+AutoCompletionProperties.Const.GROUP_HEADER_CLASS+"'>"+r.bodyValue+"<\/li>"),f.appendTo(n)):(u=h._RenderItem(n,r),u&&(r.value=h._CleanBodyTextForInput(r.value),u.data("ui-autocomplete-item",r).appendTo(n))))}),this.moOptions.bAllowCreation&&n.css("padding-bottom","0"),this.moOptions.iMaxWidth&&n.css("max-width",this.moOptions.iMaxWidth),f&&Utils.Trim(f)!=""&&this.moContainer.GetObj().append('<div class="ClearFixC '+AutoCompletionProperties.Const.FOOTER_CLASS+'">'+f+"<\/div>"),this.moComplexAutoComp&&this.moComplexAutoComp.masColWidth){for(e=0,c=0;c<this.moComplexAutoComp.masColWidth.length;c++)e+=parseFloat(this.moComplexAutoComp.masColWidth[c]);(this.moComplexAutoComp.moAutoComp.moContainer.mbUseChildQuery||this.moComplexAutoComp.moAutoComp.moContainer.mbUseParentQuery)&&(e+=ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON*2);e&&n.attr("data-cols-width",e)}Utils.IsSafari()||Utils.IsIE()?n[0].addEventListener("mousewheel",function(n){var t=n.wheelDelta;t<0&&this.scrollHeight-this.offsetHeight-this.scrollTop<-t?(this.scrollTop=this.scrollHeight,n.preventDefault()):t>0&&t>this.scrollTop&&(this.scrollTop=0,n.preventDefault())}):n.css("overscroll-behavior","contain")},_RenderItem:function(n,t){var i=!1,u=t.bodyContent[0],p=t.bodyValue,e="",f,o,h,c,w,r,l,y,s;if((u==""||u==undefined&&p==AutoCompletionProperties.Const.EMPTY_VALUE)&&this.mbComplexAutoComp==!1&&(u=" ",e=AutoCompletionProperties.Const.EMPTY_ROW_CLASS),this._IsVisibleValue(t)==!0&&(f=this.miLineCounter%2?"odd":"even",t.hasOwnProperty("class")&&(f+=" "+t["class"]),t.hasOwnProperty("customStyle")&&(f+=" "+t.customStyle,t.customStyle==="IsStructuralElement"&&(t.isStructuralElement=!0)),t.recommeded&&(f+=" recommended"),o=null,t.fontIcon&&(o='style="color: '+t.colorCode+'"'),i='<div class="l '+f+' DoNotFollow"'+o+">",t.fontIcon?i+='<i class="ico '+t.fontIcon+' ACIcon"'+o+"><\/i>":t.customImgIcon&&(i+='<div class="ColClass"><img part="image" class="ACCustomIcon" alt="'+t.label+'" src="'+t.customImgIcon+'" loading="lazy"><\/div>'),this.mbComplexAutoComp==!0?i+=this.moComplexAutoComp.SpecificRenderItem(n,t):(i+=this.moOptions.bMatchContainerWidthToParent?'<div class="ColClass" style="word-break: break-word;">':this.moOptions.bAutoCompLabelVerticalAlignCenter?'<div class="ColClass ColVerticalAlignCenter">':'<div class="ColClass">',t.recommeded&&(i+='<i class="ico fa fa-star ACIcon ACIconRecommended"><\/i>'),typeof t.tag=="string"&&(i+='<span class="tag">'+this._CleanText(t.tag)+"<\/span>"),i+=this.moOptions.bEnableHTML==!0?u:this._CleanText(u),i+="<\/div>"),p==AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE&&(h=$PI(this.msID).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_ADVANCED_ICON),i=h?i.replace("$BEG_TAG$","<i>"+h+" <\/i> ").replace("$START_TAG$","<span>").replace("$END_TAG$","<\/span>"):i.replace("$BEG_TAG$",'<i class="fa fa-plus-circle fa-lg"> <\/i> ').replace("$START_TAG$","<span>").replace("$END_TAG$","<\/span>"),i=i.replace("$LINE_START_TAG$",'<span style="font-weight:inherit">').replace("$LINE_END_TAG$","<\/span>")),window.Param.IconForItemTooltip&&t.title&&(i+='<i class="ico '+window.Param.IconForItemTooltip+' ACIcon ACIconTooltip"><\/i>'),i+="<\/div>",this.miLineCounter++),i){this.mbAutoCompTextarea==!0&&(e+=" "+AutoCompletionProperties.Const.LI_CLASS_FOR_TEXTAREA);t.bodyValue==AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE&&(e+=" "+AutoCompletionProperties.Const.SUGGEST_CREATE_ENTRY_CLASS);c="";!t.fontIcon&&t.iconUrl&&(c=' style="padding-left: 15px;background-image:url('+t.iconUrl+')"');w=/<a\b/.test(i);r="";w?(this.msLatestItemValue&&this.msLatestItemValue!=AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE&&this.msLatestItemValue===t.bodyValue&&(l=$("<div>").html(i),l.children().addClass("ui-state-selected"),i=l.html()),r=i):(r="<a"+c,this.msLatestItemValue&&this.msLatestItemValue!=AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE&&this.msLatestItemValue===t.bodyValue&&(r+=' class="ui-state-selected"'),r+=">"+i+"<\/a>");var b=this.moOptions.bEnableStructuralElement&&t.isStructuralElement?" ACStructElementRow":"",a=$('<li role="presentation" class="'+e+b+'"><\/li>').html(r),v=a.find(".ACIconTooltip");for(v.length>0&&(v[0].setAttribute("title",t.title),v.tipsy({gravity:window.Param.ItemTooltipOrientation?window.Param.ItemTooltipOrientation:"n",html:!0})),y=$(a[0]).find("[original-title]"),s=0;s<y.length;s++)$(y[s]).tipsy({gravity:"n",html:!0});return a}},_BindOnClick:function(){var n=this,r=n.moOptions.bRequestAllOnClick&&n.moOptions.bDropDown||n.mbIsStaticSource,t,i;if(r||n.moOptions.bSelectAllOnClick){t=!1;i=function(){t=!0;r&&n.moContainer.IsHidden()&&n.RequestAll();n.moOptions.bSelectAllOnClick==!0&&n.moAutoComp.select()};this.moAutoComp.click(i);this.moAutoComp.parent().siblings(".Lbl").click(i);$($PI(this.msID)).on("click",function(r){if(!t){var u=n.moAutoComp.offset().top,f=n.moAutoComp.offset().left,e=n.moAutoComp.outerWidth(),o=n.moAutoComp.outerHeight();r.pageX>f&&r.pageX<f+e&&r.pageY>u&&r.pageY<u+o&&i()}t=!1})}this.mbAutoCompMultiEntry==!0&&this.moAutoComp.click(function(t){n.moAutoCompMultiEntry._SpecificOnClick(t)});this.mbAutoCompInvokedWithChar==!0&&this.moAutoComp.click(function(t){n.moAutoCompInvokedWithChar._SpecificOnClick(t)})},_BindOnMouseEnter:function(){var n=this,t;this.moOptions.bRequestAllOnHover==!0&&(t=function(){n.moOptions.bRequestAllOnHover==!0&&n.moContainer.IsHidden()==!0&&n.RequestAll()},this.moAutoComp.parent().parent().mouseenter(t))},_BindOnMouseLeave:function(){var n=this,t;this.moOptions.bRequestAllOnHover==!0&&(t=function(){n.moOptions.bRequestAllOnHover==!0&&n.moContainer.IsHidden()==!1&&setTimeout(function(){n.moContainer.moContainer.is(":hover")||n.moAutoComp.is(":hover")||n.moContainer.Hide()})},this.moAutoComp.parent().parent().mouseleave(t),this.moContainer.moContainer.mouseleave(t))},_BindKeyDownForFocus:function(){var n=this;this.moAutoComp.bind("keydown.autocomplete",function(t){var r,f,u,i,e,o;if(t.keyCode===9&&n.moContainer.IsDisplayed()===!0&&(t.stopImmediatePropagation(),n.moAutoComp.autocomplete("close")),r=this.value==null||this.selectionStart===this.value.length,!n.moAutoComp.is("textarea")&&(t.keyCode==38||t.keyCode==40||t.keyCode==39)&&n.moContainer.IsDisplayed()==!0){f=$(".ui-menu-item:not(."+AutoCompletionProperties.Const.GROUP_HEADER_CLASS+")",n.moAutoComp.autocomplete("widget"));u=f.index($(".focused",n.moAutoComp.autocomplete("widget")));switch(t.keyCode){case 39:u==-1&&r&&t.stopImmediatePropagation();break;case 38:u==0&&t.stopImmediatePropagation();break;case 40:u==n.miLineCounter-1&&t.stopImmediatePropagation()}}t.keyCode!=13||Utils.Trim(n.moAutoComp.val()||"")!=""||n.moAutoComp.is("textarea")||n.moContainer.IsDisplayed()!=!1||(n.mbOpenedByKeyboard=!0,n.RequestAll(),t.preventDefault());t.keyCode>=37&&t.keyCode<=40?n.moAutoComp.is("textarea")||(t.keyCode==40&&n.moContainer.IsDisplayed()==!1?(n.mbOpenedByKeyboard=!0,n.RequestAll()):n.moContainer.IsDisplayed()==!1&&n.moAutoComp.val()!=null&&n.moAutoComp.val().length>0?t.stopImmediatePropagation():n.moContainer.IsDisplayed()&&(i=$(this).data("uiAutocomplete").menu.active,i&&(t.keyCode===39&&r&&(n.mbComplexAutoComp&&i.find(".ACNextSearchBtn")[0]?(e=i.find(".ACNextSearchBtn")[0],$(e).click(),n.mbIgnoreNextKeyUp=!0,t.preventDefault()):$(".focused a",n.moAutoComp.autocomplete("widget")).trigger("click")),t.keyCode==37&&n.mbComplexAutoComp&&i.find(".ACPreviousSearchBtn")[0]&&(o=i.find(".ACPreviousSearchBtn")[0],$(o).click(),n.mbIgnoreNextKeyUp=!0,t.preventDefault())))):t.keyCode===33||t.keyCode===34||t.keyCode===35||t.keyCode===36?t.stopImmediatePropagation():n.mbComplexAutoComp==!0&&n.moComplexAutoComp.reset();Utils.IndexOf(AutoCompletionProperties.Const.KEYS_SELECTORS,t.keyCode)>-1&&$(this).data("uiAutocomplete").menu.active&&Utils.IndexOf(n.moKeySelectorsToContinueEvents,t.keyCode)<0&&!(t.keyCode===39&&!r)&&t.preventDefault()})},_BindOnFocusOut:function(){var n=this;this.moOptions.bForceSelection==!0&&this.moAutoComp.focusout(function(){n.mbItemSelected==!1&&n.moOptions.bForceSelection==!0&&n.msLatestItemLabel!=n.moAutoComp.val()&&(Utils.Trim(n.moAutoComp.val())==""&&(n.msLatestItemLabel=n.mbIsStaticSource&&n.moStaticSourceKeys.includes("")?n.moStaticSource[""]:"",n.moFieldValue.val("")),n.moAutoComp.val(n.msLatestItemLabel),n.moAutoComp.trigger("change"),Utils.Trim(n.moAutoComp.val())==""&&n._ItemClearEventFire())})},_BindOnCopy:function(){this.moAutoComp.bind("copy",function(n){n.stopImmediatePropagation()})},_BindOnKeyUp:function(){var n=this,t=!1;this.moAutoComp.keyup(function(i){if(!n.mbIgnoreNextKeyUp){n.mbItemSelected=!1;Utils.IndexOf(AutoCompletionProperties.Const.KEYS_SELECTORS,i.keyCode)<=-1&&n.moOptions.bForceSelection==!1&&n.moFieldValue.val(n.moAutoComp.val());var r=$(".focused",n.moAutoComp.autocomplete("widget")).index();!(Utils.IndexOf(AutoCompletionProperties.Const.KEYS_SELECTORS,i.keyCode)>-1)||i.keyCode===39&&!t||n.mbSkipNextSelectionOnKeyUp||r==-1||n.moLoader.is(":visible")||(n.mbItemSelected=!0,n.moAutoComp.focus(),n.moAutoComp.autocomplete("close"));n.moAutoComp.is("textarea")||Utils.Trim(n.moAutoComp.val())!=""||n.moFieldValue.val("");n.mbAutoCompMultiEntry==!0&&n.moAutoCompMultiEntry._SpecificOnKeyUp(i);n.mbAutoCompInvokedWithChar==!0&&n.moAutoCompInvokedWithChar._SpecificOnKeyUp(i)}n.mbIgnoreNextKeyUp=!1;t=this.value==null||this.selectionStart===this.value.length})},_CleanText:function(n){return n!=null&&(n=n.replace(new RegExp("<b>","g"),"##B##"),n=n.replace(new RegExp("<\/b>","g"),"##BE##"),n=n.replace(new RegExp("<","g"),"<"),n=n.replace(new RegExp(">","g"),">"),n=n.replace(new RegExp("##B##","g"),"<b>"),n=n.replace(new RegExp("##BE##","g"),"<\/b>")),n},_CleanBodyTextForInput:function(n){return this.moOptions.bEnableHTML==!0?(n=n.replace(/<[^>]*inputhidden[^>]*>[^<]*<\/.*?>/gm,""),n=n.replace(/<(?:.|\n)*?>/gm,"")):(n=n.replace(new RegExp("<b>","g"),""),n=n.replace(new RegExp("<\/b>","g"),"")),n=n.replace(/</g,"<"),n=n.replace(/>/g,">"),n.replace(/&/g,"&")},_RefreshPositionOfWidget:function(){this.moAutoComp.autocomplete("widget").css({top:"0px",left:"0px"})},_ShowLoader:function(){this.moOptions.bHideLoaderImage==!0?(this.moLoader.hide(),this.moDropDownBtn.show()):(this.moLoader.show(),this.moDropDownBtn.hide())},_HideLoader:function(){var n=this;setTimeout(function(){n.moLoader.hide();n.moDropDownBtn.show()},500)},_CreateLoader:function(){this.moLoader=$('<div class="'+AutoCompletionProperties.Const.LOADER_CLASS+'"><div class="'+AutoCompletionProperties.Const.LOADER_IMAGE_CLASS+'"><\/div><\/div>');this.moAutoComp.parent().append(this.moLoader);this.moDropDownBtn=this.moAutoComp.parent().find("[id='"+this.msID+AutoCompletionProperties.Const.SUFFIX_DROP_DOWN+"']")},_SelectDefaultValueStaticSource:function(){var n=this,t,i,r;this.mbIsStaticSource==!0&&(t=this.moFieldValue.val(),(t!=""||this.moStaticSource[t])&&$.each(this.moStaticSource,function(i,r){if(i=Utils.htmlDecode(i),i==t){n.moAutoComp.val(n._CleanBodyTextForInput(r));n.moAutoComp.trigger("change");n.msLatestItemLabel=n._CleanBodyTextForInput(r);return}}));i="";r="";this.mbIsStaticSource!=!0||this.moOptions.bStaticSourceEmpty||(this.moStaticSourceKeys&&this.moStaticSourceKeys.length>0&&(i=this.moStaticSourceKeys[0],r=this._CleanBodyTextForInput(this.moStaticSource[i])),this.moOptions.bPreSelectFirstValue!=!0||this.moFieldValue.val()!=""||this.moStaticSource[this.moFieldValue.val()]||(this.moAutoComp.val(r),this.moAutoComp.trigger("change"),$E(this.moOptions.sIDFieldValue).val(i)))},_SetEventSelectIfOneResult:function(n){if(n.length>1&&!this._CheckEvent("select")&&this.moOptions.bForceSelection){var t=n[0].bodyText,r=n[0].bodyContent,i=n[0].bodyValue,u=n[1].bodyText,f=n[1].bodyValue;Utils.Trim(t).toUpperCase()==Utils.Trim(this.moAutoComp.val()).toUpperCase()&&this._IsSelectableValue(n[0])&&i&&this._IsSelectableValue(n[1])==!1&&(this.mbItemSelected=!0,this._ItemSelectEventFire(n[0]))}},_GetQueryFileAndQueryFilterFile:function(){return this.mbComplexAutoComp==!0?this.moComplexAutoComp.GetQueryFileAndQueryFilterFile():{sQueryFile:this.moOptions.sQueryFile,sQueryFilterFile:this.moOptions.sQueryFilterFile}},_GetQueryAppend:function(n){var t=null,e=this._GetQueryFileAndQueryFilterFile(),h=e.sQueryFile,c=e.sQueryFilterFile,l=this.moOptions.iMaxResults,a=this.moOptions.sQueryTextboxFields,v=this.moOptions.sQueryAdditionals,y=this.moOptions.sQueryViewState,o="",s="",i,r,u,f;return this.moOptions.sQueryProperties&&(o=JSON.stringify(this.moOptions.sQueryProperties)),this.moOptions.sColStyleClasses&&(s=JSON.stringify(this.moOptions.sColStyleClasses)),i="0",this.mbUseChildQuery===!0&&(i="1"),r="0",this.mbUseParentQuery===!0&&(r="1"),u=this.moOptions.sParamTablePath,u!=null?(t=AutoCompletionProperties.Const.PARAMTABLE+"="+u,f=this.moOptions.sParamTablePathFilters,f&&(t+="&"+AutoCompletionProperties.Const.PARAMTABLE_FILTERS+"="+f)):t=AutoCompletionProperties.Const.FILTERFILE+"="+c+"&"+AutoCompletionProperties.Const.QUERYFILE+"="+h+"&"+AutoCompletionProperties.Const.TEXTBOXFIELDS+"="+a+"&"+AutoCompletionProperties.Const.ADDITIONALS+"="+v+"&"+AutoCompletionProperties.Const.MAXRESULTS+"="+l+"&"+AutoCompletionProperties.Const.VIEWSTATE+"="+y+"&"+AutoCompletionProperties.Const.PROPERTIES+"="+o+"&"+AutoCompletionProperties.Const.FLASH_MODE+"=1&"+AutoCompletionProperties.Const.USE_CHILD_QUERY+"="+i+"&"+AutoCompletionProperties.Const.USE_PARENT_QUERY+"="+r+"&"+AutoCompletionProperties.Const.COLSTYLECLASSES+"="+s,this.moOptions.sQuerySearchField!=null&&(t+="&"+AutoCompletionProperties.Const.QUERYSEARCH+"="+this.moOptions.sQuerySearchField),this.moOptions.sSQLPlaceholder1!=null&&(t+="&"+AutoCompletionProperties.Const.SQL_PLACEHOLDER1+"="+this.moOptions.sSQLPlaceholder1),this.moOptions.sSQLPlaceholder2!=null&&(t+="&"+AutoCompletionProperties.Const.SQL_PLACEHOLDER2+"="+this.moOptions.sSQLPlaceholder2),this.moOptions.sOrderBy!=null&&(t+="&"+AutoCompletionProperties.Const.ORDERBY+"="+this.moOptions.sOrderBy),AutoCompletionProperties.Const.QUERYVALUE+"="+n+"&"+t},_GetResultObjectFromQueryResponse:function(n,t){var r=this,i;return this.mbHasDebugQuery=!1,i=$.map(n.R,function(n){var f=!0,e=null,o=null,s=null,t,i,u;if(typeof n!="undefined"&&n.T==AutoCompletionProperties.Const.JSON_QUERY){Utils.IsIE()==!1&&(r.mbHasDebugQuery=!0,Matrix3.RefreshDebugLogVForm());return}return r.mbAutoCompMultiEntry==!0&&(f=r.moAutoCompMultiEntry._CheckValidItem(n)),f==!0?(typeof n.A=="string"&&(e=n.A),typeof n[AutoCompletionProperties.Const.JSON_TYPE]=="string"&&(o=n[AutoCompletionProperties.Const.JSON_TYPE]),t=!1,typeof n[AutoCompletionProperties.Const.JSON_SHOW_CHILDREN]!="undefined"&&(t=Utils.ParseBool(n[AutoCompletionProperties.Const.JSON_SH
216OW_CHILDREN])),i=!1,typeof n[AutoCompletionProperties.Const.JSON_SHOW_PARENT]!="undefined"&&(i=Utils.ParseBool(n[AutoCompletionProperties.Const.JSON_SHOW_PARENT])),s=n[AutoCompletionProperties.Const.JSON_CUSTOMSTYLE],u=!1,typeof n[AutoCompletionProperties.Const.JSON_RECOMMENDED]!="undefined"&&(u=Utils.ParseBool(n[AutoCompletionProperties.Const.JSON_RECOMMENDED])),{label:n.T,bodyText:n.T,bodyContent:n.C,bodyValue:n.V,toolTip:n.TT,tag:e,type:o,displayShowChildren:t,displayShowParent:i,customStyle:s,recommeded:u}):void 0}),i=this._AddSuggestEmptyValueToTheList(i),i=this._AddSuggestAllowCreationToTheList(i,!1,t),this._CleanResultResponse(i)},_GetResultObjectFromStaticSource:function(n){var c=this.moStaticSource,t,i,o,l,g,u,y,v,p,it,f,ut,b,k,d,ct;if(typeof c=="object"&&c!=null&&this.moStaticSourceKeys){t=this;function yt(n,t){return n.recommeded?t.recommeded?0:1:t.recommeded?-1:n.label>t.label?1:-1}if(i=[],o=Utils.Trim(n)=="",this.moOptions.bStaticSourceEmpty==!0&&o&&(i[0]={label:"",bodyText:"",bodyContent:[""],bodyValue:"",tag:null},this.mbFirstLineIsAnEmptyLine=!0),l=this.moStaticSourceDescriptions&&this.moStaticSourceDescriptions.length>0,g=this.moStaticSourceGroups&&this.moStaticSourceGroups.length>0,g){var a=[],nt=[],tt=Utils.ParseBool(Param.ShowAllResultsForStaticSource)?AutoCompletionProperties.Const.NO_LIMIT_KEYWORD:this.moOptions.iMaxResults;for(u=0;u<this.moStaticSourceGroups.length&&(tt===AutoCompletionProperties.Const.NO_LIMIT_KEYWORD||u<tt);u++)Utils.IsStringFilled(this.moStaticSourceGroups[u])&&this.moStaticSourceGroups[u].trim()!==""?a.indexOf(this.moStaticSourceGroups[u])===-1&&a.push(this.moStaticSourceGroups[u]):nt.push(this.moStaticSourceKeys[u]);for(y=function(r,u){for(var p,w,b,k,rt,s=[],v=[],y=[],h=[],a=0;a<u.length;a++){var ut=new RegExp("^"+t._RegexEscape(Utils.Trim(n))+"$","gi"),ft=new RegExp("^"+t._RegexEscape(Utils.Trim(n))+"","gi"),d=new RegExp(t._RegexEscape(Utils.Trim(n)),"gi"),f=u[a];if(t.mbAutoCompMultiEntry!=!0||t.moAutoCompMultiEntry._CheckValidItemValue(f)){var e=c[f],et=this._CleanBodyTextForInput(e),g=null,nt=null,tt=null,it=null;this.moStaticSourceIcons&&this.moStaticSourceIcons[f]&&(g=this.moStaticSourceIcons[f]);this.moStaticColorCode&&this.moStaticColorCode[f]&&(nt=this.moStaticColorCode[f]);this.moStaticFontIcons&&this.moStaticFontIcons[f]&&(tt=this.moStaticFontIcons[f]);this.moStaticCustomIcons&&this.moStaticCustomIcons[f]&&(it=this.moStaticCustomIcons[f]);p=t.moStaticSourceKeys.indexOf(f);w=p>=0&&t.moStaticSourceSearchData?t.moStaticSourceSearchData[p]:"";(d.test(et)||w&&d.test(w))&&(b=e,this.moOptions.bEnableHTML||(b=t._InjectBoldTags(e,n)),k=[b],l&&(rt=this.moStaticSourceDescriptions[a],k.push(rt)),oDataObject={label:e,bodyText:e,bodyContent:k,bodyValue:f,iconUrl:g,colorCode:nt,fontIcon:tt,customImgIcon:it,tag:null},o===!1&&t.moOptions.bSmartSearchOrder===!0?ut.test(e)?v.push(oDataObject):ft.test(e)?y.push(oDataObject):h.push(oDataObject):h.push(oDataObject))}}o==!1&&t.moOptions.bSmartSearchOrder===!0?(this.mbFirstLineIsAnEmptyLine=!1,v.sort(yt),y.sort(yt),h.sort(yt),s=s.concat(v.concat(y).concat(h))):s=s.concat(h);Utils.IsStringFilled(r)&&r.trim()!==""&&s.length>0&&i.push({label:AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE,bodyText:AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE,bodyValue:r,bodyContent:[r]});i=i.concat(s)}.bind(this),y(null,nt),v=0;v<a.length;v++)p=a[v],it=this.moStaticSourceKeys.filter(function(n,i){return t.moStaticSourceGroups[i]===p}),y(p,it)}else{var s=[],w=[],h=[],rt=o===!1&&t.moOptions.bSmartSearchOrder===!0;for(f=0,ut=this.moStaticSourceKeys.length;f<ut;f++){var lt=new RegExp("^"+t._RegexEscape(Utils.Trim(n))+"$","gi"),at=new RegExp("^"+t._RegexEscape(Utils.Trim(n))+"","gi"),ft=new RegExp(t._RegexEscape(Utils.Trim(n)),"gi"),r=this.moStaticSourceKeys[f];if(t.mbAutoCompMultiEntry!=!0||t.moAutoCompMultiEntry._CheckValidItemValue(r)){var e=c[r],vt=this._CleanBodyTextForInput(e),et=null,ot=null,st=null,ht=null;this.moStaticSourceIcons&&this.moStaticSourceIcons[r]&&(et=this.moStaticSourceIcons[r]);this.moStaticColorCode&&this.moStaticColorCode[r]&&(ot=this.moStaticColorCode[r]);this.moStaticFontIcons&&this.moStaticFontIcons[r]&&(st=this.moStaticFontIcons[r]);this.moStaticCustomIcons&&this.moStaticCustomIcons[r]&&(ht=this.moStaticCustomIcons[r]);b=this.moStaticSourceSearchData?this.moStaticSourceSearchData[f]:"";(ft.test(vt)||b&&ft.test(b))&&(k=e,this.moOptions.bEnableHTML||(k=t._InjectBoldTags(e,n)),d=[k],l&&(ct=this.moStaticSourceDescriptions[f],d.push(ct)),oDataObject={label:e,bodyText:e,bodyContent:d,bodyValue:r,iconUrl:et,colorCode:ot,fontIcon:st,customImgIcon:ht,tag:null,recommeded:this.moStaticSourceKeysRecommended&&this.moStaticSourceKeysRecommended.indexOf(r)>=0,title:this.moStaticSourceTitles[f]},rt?oDataObject.recommeded||lt.test(e)?s.push(oDataObject):at.test(e)?w.push(oDataObject):h.push(oDataObject):oDataObject.recommeded?s.push(oDataObject):h.push(oDataObject))}}rt?(this.mbFirstLineIsAnEmptyLine=!1,s.sort(yt),w.sort(yt),h.sort(yt),i=s.concat(w).c
216oncat(h)):i=i.concat(s.concat(h))}return o&&(i=this._AddSuggestEmptyValueToTheList(i)),i=this._AddSuggestAllowCreationToTheList(i,!0),l&&!this.moOptions.bGroupDescription&&(this.mbShowHeader&&i.push({label:AutoCompletionProperties.Const.JSON_HEADER,bodyText:AutoCompletionProperties.Const.JSON_HEADER,bodyContent:this.moStaticSourceColumnsHeaders,bodyValue:"",displayShowChildren:!1,displayShowParent:!1,tag:null}),i.push({label:AutoCompletionProperties.Const.JSON_COL_WIDTH,bodyText:AutoCompletionProperties.Const.JSON_COL_WIDTH,bodyContent:this.moStaticSourceColumnsSizes.map(function(n){return n}),bodyValue:"",displayShowChildren:!1,displayShowParent:!1,tag:null})),this._CleanResultResponse(i)}return{}},_CleanResultResponse:function(n){var t=this._GetNbRealItems(n);return t<=0||t==1&&this.mbFirstLineIsAnEmptyLine?(this.mbLastSearchNoResult=!0,this.mbComplexAutoComp==!0&&this.moComplexAutoComp.masSearchLevel.length>0&&this.moOptions.sNoChildItemMessage&&this.moOptions.sNoChildItemMessage!=null&&Utils.Trim(this.moOptions.sNoChildItemMessage)!="")?[{label:this.moOptions.sNoChildItemMessage,bodyText:AutoCompletionProperties.Const.EMPTY_LIST_TEXT,bodyContent:[this.moOptions.sNoChildItemMessage],bodyValue:"",tag:null}]:this.moOptions.sNoItemMessage&&this.moOptions.sNoItemMessage!=null&&Utils.Trim(this.moOptions.sNoItemMessage)!=""?[{label:this.moOptions.sNoItemMessage,bodyText:AutoCompletionProperties.Const.EMPTY_LIST_TEXT,bodyContent:[this.moOptions.sNoItemMessage],bodyValue:"",tag:null}]:(this._HideLoader(),{}):n},GetEmptyEntry:function(n){var t={bodyText:"",label:"",bodyValue:AutoCompletionProperties.Const.EMPTY_VALUE};return this.moOptions.sEmptyRowText!=null&&this.moOptions.sEmptyRowText!=""&&(n[0]=this.moOptions.sEmptyRowText,this.moOptions.bShowEmptyTextLabel==!0&&(t.bodyText=this.moOptions.sEmptyRowText)),t.bodyContent=n,t},_AddSuggestEmptyValueToTheList:function(n){var r,i,t;if(this.mbFirstLineIsAnEmptyLine=!1,this.moOptions.bSuggestEmpty==!0&&this.moOptions.bDropDown==!0&&Utils.Trim(n[0].bodyText)!=""&&n[0].bodyValue!=AutoCompletionProperties.Const.EMPTY_VALUE){for(r=n[0].bodyContent.length,i=[],t=0;t<r;t++)i[t]="";n.unshift(this.GetEmptyEntry(i));this.mbFirstLineIsAnEmptyLine=!0}return n},_AddSuggestAllowCreationToTheList:function(n,t,i){var f=i!=null?i:this.moAutoComp.val(),h,s,c,l,a,v,e,r,o,u;if(Utils.Trim(f)==""&&this.moOptions.bAllowCreationOnEmptyText!=!0)return n;if(this.moOptions.bAllowCreation&&(this.moComplexAutoComp==null||this.moComplexAutoComp.mbAtRoot)){if(h=!1,s=0,n.length>0&&(s=n[n.length-1].bodyContent.length),i||this.mbAutoCompInvokedWithChar!=!0||(f=this.moAutoCompInvokedWithChar._GetTermToComplete(f)),f!=null&&Utils.Trim(f)!=""&&this.msLastSearch!=null&&(Utils.Trim(this.msLastSearch)!=""||i!=null&&i!="")){for(c=Utils.Trim(f.toLowerCase()),l=!1,r=0,a=n.length;r<a;r++)if(oEntry=n[r],typeof oEntry.label!="undefined"&&(Utils.Trim(oEntry.label.toLowerCase())==c||oEntry.bodyContent.length>1&&Utils.StartsWith(oEntry.label.toLowerCase(),c+","))){l=!0;break}if(!l){for(v=$PI(this.msID).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_TEMPLATE)||"",e=[],r=0;r<s;r++)e[r]="";var y=$("<div/>").text(f).html(),p="$START_TAG$"+y+"$END_TAG$",w=p.replace(new RegExp(this._RegexEscape("$"),"g"),"$$$$");e[0]="$BEG_TAG$$LINE_START_TAG$"+v.replace(AutoCompletionProperties.Const.CREATE_ENTRY_TAG_TEXT,w)+"$LINE_END_TAG$";u={};u.bodyText=f;u.label=f;u.bodyContent=e;u.bodyValue=AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE;n.splice(this._GetNbRealItems(n),0,u);h=!0}}if(this.moOptions.bDropDown&&!h&&this.moOptions.bAllowCreationOnEmptyText==!0){for(e=[],r=0;r<s;r++)e[r]="";o=$PI(this.msID).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_TEMPLATE_NO_ENTERED_TEXT);o=Utils.IsStringFilled(o)?"$LINE_START_TAG$"+o.replace(AutoCompletionProperties.Const.CREATE_ENTRY_TAG_TEXT,f)+"$LINE_END_TAG$":"";e[0]=$PI(this.msID).GetProperty(AutoCompletionProperties.Const.PROPERTY_AC_CREATION_LINE_ADVANCED_ICON)?"$BEG_TAG$"+o:o;Utils.IsStringFilled(e[0])&&e[0]!="$BEG_TAG$"&&(u={},u.bodyText="",u.label="",u.bodyContent=e,u.bodyValue=AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE,n.splice(this._GetNbRealItems(n),0,u))}}return n},_InjectBoldTags:function(n,t){var u=t.toLowerCase().split(" "),i={},f,r,e;for(f in u)r=Utils.Trim(u[f]),r!=""&&(r=this._RegexEscape(r),i[r]=!0);return i=Object.keys(i),i.length>0&&(e=new RegExp(i.join("|"),"gi"),n=n.replace(e,function(n){return"<b>"+n+"<\/b>"})),n},_RegexEscape:function(n){return n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},_GetNbRealItems:function(n){var i,r,t;if(typeof n!="object")return 0;for(i=n.length,r=i,t=i-1;t>=0;t--)if(this._IsVisibleValue(n[t])==!1)r--;else break;return r},_IsSelectableValue:function(n){var t=n.bodyText,i=n.bodyValue;return typeof t!="undefined"&&typeof i!="undefined"&&i!=null&&t!=null&&!(i==""&&t==AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_HEADER)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_COL_NAME)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_COL_WIDTH)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_SPECIFIC_CLASS)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_MAXCOUNT)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_QUERY)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_SHOW_CHILDREN)&&!(i==""&&t==AutoCompletionProperties.Const.EMPTY_LIST_TEXT)&&!(this.moOptions.bEnableStructuralElement&&n.isStructuralElement)},_IsVisibleValue:function(n){var t=n.bodyText,i=n.bodyValue;return typeof t!="undefined"&&typeof i!="undefined"&&i!=null&&t!=null&&!(i==""&&t==AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_HEADER)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_COL_NAME)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_COL_WIDTH)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_SPECIFIC_CLASS)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_MAXCOUNT)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_QUERY)&&!(i==""&&t==AutoCompletionProperties.Const.JSON_SHOW_CHILDREN)&&!(i==""&&t==AutoCompletionProperties.Const.EMPTY_LIST_TEXT)},_ApplyAutoFocusElement:function(n,t){var r=!1;typeof n!="undefined"&&typeof n.bodyText!="undefined"&&this._IsSelectableValue(n)&&(r=!0);this.moAutoComp.off("autocompleteopen");this.moAutoComp.off("autocompleteclose");var i=this,u=function(){i.mbAutoCompInvokedWithChar&&i.moAutoCompInvokedWithChar.SetCarretPosition();var n=$(this).data("uiAutocomplete").menu,r=$("li",n.element).eq(t);n.focus(null,r)},f=function(){i.mbAutoCompInvokedWithChar&&i.moAutoCompInvokedWithChar.ClearCarretPosition()};if(r){this.moAutoComp.on("autocompleteopen",u);this.moAutoComp.on("autocompleteclose",f)}},_ApplyAutoFocusOnResults:function(n){n&&n[0]&&this.moOptions.bAutoFocus&&!this.mbDoNotPreselectOption&&((n[0].bodyValue===AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE||n[0].bodyText===AutoCompletionProperties.Const.GROUP_HEADER_RESERVED_VALUE||this.mbFirstLineIsAnEmptyLine)&&n[1]&&this._IsSelectableValue(n[1])?this._ApplyAutoFocusElement(n[1],1):this._ApplyAutoFocusElement(n[0],0))},_DisableQueryDelay:function(){this.moAutoComp.autocomplete("option","delay",0)},_EnableQueryDelay:function(){this.moAutoComp.autocomplete("option","delay",this.moOptions.iQueryDelay)}
216,_ResetSourceResponseCache:function(){this.oCache={}},_SetSourceResponse:function(n,t){var r=this,i=n.term,h,f,e,u,c,o,s;if(this.mbAutoCompMultiEntry==!0&&i!==AutoCompletionProperties.Const.REQUEST_ALL_QUERY&&(i=this.moAutoCompMultiEntry._GetLastTerm(i),i==""))return this._HideLoader(),!1;if(this.mbAutoCompInvokedWithChar==!0&&(this.moAutoCompInvokedWithChar.ClearCarretPosition(),i=this.moAutoCompInvokedWithChar._GetTermToComplete(i),i==null))return this._HideLoader(),this.moAutoComp.autocomplete("close"),!1;if(i.length>0&&this.moOptions.sIgnoreTermEndsWith!=null&&(h=i[i.length-1],this.moOptions.sIgnoreTermEndsWith.indexOf(h)!==-1))return this._HideLoader(),!1;if(i.length<this.moOptions.iMinLength){this._HideLoader();return}if(this.mbAutoCompTextarea==!0&&this.mbIsStaticSource==!1&&(i=i.replace(" ","*")),f=new RegExp(" ","gi"),i=i.replace(f,"**SPACE**"),i=encodeURIComponent(i),f=new RegExp("\\*\\*SPACE\\*\\*","gi"),i=i.replace(f," "),e=decodeURIComponent(i),this.msLastSearch=e,i in this.moCache&&typeof this.moCache[i]!="undefined"){u=this.moCache[i];this.mbAutoCompMultiEntry==!0&&(u=this.moAutoCompMultiEntry._RemoveValuesAlreadyEntered(u));this._SetEventSelectIfOneResult(u);this._ApplyAutoFocusOnResults(u);this._HideLoader();t(u,r);this.moContainer.Refresh();return}if(this.mbIsStaticSource===!1){if(c=r.moOptions.sParamTablePath!=null,!c){var l=this._GetQueryFileAndQueryFilterFile(),o=l.sQueryFile,a=l.sQueryFilterFile;if(typeof o!="string"||typeof a!="string"||o==""||a=="")return!1}o=this._GetQueryAppend(i);r.oLastXhr=$.ajax({type:"POST",dataType:"json",timeout:r.moOptions.iQueryTimeout,url:AutoCompletionProperties.Const.URL,data:o,error:function(n,t,i){console.error("AutoCompletion error:",i);r._HideLoader();r.moAutoComp.autocomplete("close")},success:function(n,i,u){var f,o;$PI(r.msID)&&(f=r._GetResultObjectFromQueryResponse(n,e),u===r.oLastXhr&&(r._SetEventSelectIfOneResult(f),r._ApplyAutoFocusOnResults(f),t(f,r),r.moContainer.Refresh(),o=document.querySelector("div[id='"+r.msID+"_Mirror'] ul"),$(o).scrollTop(r.miScrollTop)))},complete:function(){}});return}s=this._GetResultObjectFromStaticSource(e);this.moCache[i]=s;r._HideLoader();r._ApplyAutoFocusOnResults(s);t(s,r);return},_ItemSelectEventFire:function(_oItem){var sItemValue=_oItem.bodyValue,sItemText=this._CleanBodyTextForInput(_oItem.bodyText),oIcon,iPriority,imgElement,bChangeEventFound,i,oOptions,sArguments;if(this.moAutoComp.attr("ac-create-entry-text",null),this.mbAutoCompMultiEntry==!0?sItemValue=this.moAutoCompMultiEntry._SpecificItemSelectEventFire(_oItem):this.mbAutoCompInvokedWithChar==!0?sItemValue=this.moAutoCompInvokedWithChar._SpecificItemSelectEventFire(_oItem):_oItem.bodyValue!==AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE?(this.moAutoComp.val(sItemText),this.moAutoComp.trigger("change")):this.moAutoComp.attr("ac-create-entry-text",sItemText),_oItem.fontIcon){if(this.moAutoComp.parent().parent().addClass("IC"),_oItem.colorCode&&this.moAutoComp.css("color",_oItem.colorCode),oIcon=this.moAutoComp.prev(),oIcon&&oIcon.is("i")){oIcon.css("color",_oItem.colorCode);for(iPriority in this.moStaticFontIcons)oIcon.removeClass(this.moStaticFontIcons[iPriority]);oIcon.addClass(_oItem.fontIcon)}}else if(_oItem.iconUrl)this.moAutoComp.css("background-image","url("+_oItem.iconUrl+")"),this.moAutoComp.parent().parent().addClass("IC");else if(_oItem.customImgIcon)this.msCustomIconImageElementID&&(imgElement=document.getElementById(this.msCustomIconImageElementID),imgElement&&(imgElement.src=_oItem.customImgIcon),this.moAutoComp.parent().parent().addClass("IC"));else{if(this.moAutoComp.css("background-image",""),this.moAutoComp.parent().parent().removeClass("IC"),this.moAutoComp.css("color",""),oIcon=this.moAutoComp.prev(),oIcon&&oIcon.is("i")&&this.moStaticFontIcons)for(iPriority in this.moStaticFontIcons)oIcon.removeClass(this.moStaticFontIcons[iPriority]);imgElement=document.getElementById(this.msCustomIconImageElementID);imgElement&&(imgElement.src="")}if(this.GetFieldValueID()!=this.msID&&typeof this.moFieldValue=="object"&&this.moFieldValue.length>=1&&(this.moOptions.bForceSelection==!0&&this.mbItemSelected==!1?(Utils.Trim(this.moAutoComp.val())==""&&(this.msLatestItemLabel="",this.moFieldValue.val("")),this.moAutoComp.val(this.msLatestItemLabel),this.moAutoComp.trigger("change")):(this.mbIsStaticSource==!0&&(sItemValue=Utils.htmlDecode(sItemValue)),this.moFieldValue.val(sItemValue))),this.moMatrixCtrl=ControlMgr.GetInstance().GetControl(this.msID,AutoCompletionCtrl.Const.CONTROL_NAME),bChangeEventFound=!1,this.moMatrixCtrl.Event_Change)for(i=0;i<this.moMatrixCtrl.Event_Change.length;i++)oOptions=this.moMatrixCtrl.Event_ChangeEventArgs[i],oOptions&&Utils.ParseBool(oOptions[ChangeEvent.Const.OPTION_IGNORE_AC_SELECT])||(bChangeEventFound=!0,this.moMatrixCtrl.Event_Change[i].Fire());bChangeEventFound||this.moAutoComp.trigger("autocomp_select",[_oItem.bodyText,_oItem.bodyValue]);this._CheckEvent("select")!=!0||this.moOptions.bForceSelection&&!this.mbItemSelected||this.mbAutoCompMultiEntry!=!1||(this.moOptions.sEventTrackingCode&&this.moOptions.sEventTrackingCode!=""&&eval(this.msEventSelectTrackingCode),this.moOptions.sPageTrackingCode&&this.moOptions.sPageTrackingCode!=""&&eval(this.msPageTrackingCode),sArguments=this.moEvents.select.args,sArguments==encodeURIComponent(AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE)&&this.mbAutoCompInvokedWithChar==!0&&(sArguments=this.moAutoCompInvokedWithChar._GetTermToComplete()),Matrix3.AddEvent(this.moEvents.select.vform_id,this.moEvents.select.name,this.moEvents.select.type,this.moEvents.select.delay,sArguments,this.moEvents.select.comm,this.moEvents.select.commargs,null,null,null,null,this.moEvents.select.pls_wait_msg,null,null,null,this.moEvents.select.block_interaction));this._Resize()},_ItemClearEventFire:function(){this._CheckEvent("select")==!0&&this.mbAutoCompMultiEntry==!1&&Matrix3.AddEvent(this.moEvents.select.vform_id,"VALUE_CLEAR",this.moEvents.select.type,this.moEvents.select.delay,this.moEvents.select.args,this.moEvents.select.comm,this.moEvents.select.commargs,null,null,null,null,this.moEvents.select.pls_wait_msg,null,null,null,this.moEvents.select.block_interaction)},_CheckEvent:function(n){return typeof n=="string"&&this.moEvents&&this.moEvents[n]&&this.moEvents[n].vform_id&&this.moEvents[n].name&&this.moEvents[n].type&&this.moEvents[n].delay?!0:!1},Action_SetValue:function(n){this.moFieldValue.val(n);this._SelectDefaultValueStaticSource()}
216,Reset:function(){this.moFieldValue=this.msOriginalItemValue;this.moAutocomp=this.msOriginalItemLabel},AllowDefaultEventOnKey:function(n){this.moKeySelectorsToContinueEvents.push(n)}};AutoCompMultiEntry.prototype={_Init:function(){if(this.moOptions.sMultiEntrySeparator.length==0)this.moOptions.sMultiEntrySeparator=",";else{var n=this.moOptions.sMultiEntrySeparator.split(" OR ");n.length>1&&(this.moMultiEntrySeparatorsToConvert=n.slice(1,n.length));this.moOptions.sMultiEntrySeparator=n[0]+" "}this.moOptions.bAutoFocus=!0},_SpecificOnClick:function(){this.moAutoComp._ResetSourceResponseCache()},_SpecificOnKeyUp:function(n){n.keyCode==8&&this.moAutoComp._ResetSourceResponseCache()},_SplitTerms:function(n){n=Utils.Trim(n);var t=new RegExp("["+Utils.Trim(this.moOptions.sMultiEntrySeparator)+this.moMultiEntrySeparatorsToConvert.join("")+"]+"),i=n.split(t);return i.map(function(n){return Utils.Trim(n)})},_GetLastTerm:function(n){if(this.moOptions.sMultiEntrySeparator.length>0){var t=this._SplitTerms(n);return Utils.Trim(t.pop())}return Utils.Trim(n)},_CheckValidItem:function(n){return this.moOptions.bAllowMultiEntry==!0&&this.moOptions.bAllowMultiEntryDuplicate==!1&&this._IsValueAlreadyIncluded(n.V)==!0?!1:!0},_CheckValidItemValue:function(n){return this.moOptions.bAllowMultiEntry==!0&&this.moOptions.bAllowMultiEntryDuplicate==!1&&this._IsValueAlreadyIncluded(n)==!0?!1:!0},_IsValueAlreadyIncluded:function(n){var i,t,r;return n===""?(i=this._SplitTerms(this.moAutoComp.moFieldValue.val()),i.filter(function(n){return n===""}).length>0):(t=!1,r=new RegExp(this.moAutoComp._RegexEscape(n),"g"),this.moAutoComp.moFieldValue.val().match(r)&&(t=!0),t)},_RemoveValuesAlreadyEntered:function(n){for(var t=n.length-1;t>=0;t--)this._IsValueAlreadyIncluded(n[t].bodyValue)==!0&&n.splice(t,1);return n},_SpecificItemSelectEventFire:function(n){var r=n.bodyValue,u=this.moAutoComp._CleanBodyTextForInput(n.bodyText),f,i,t,e;return r===""?(this.moAutoComp.moAutoComp.val(u),this.moAutoComp.moAutoComp.trigger("change"),r):(t=this._SplitTerms(this.moAutoComp.moAutoComp.val()),t.pop(),f=t.join(this.moOptions.sMultiEntrySeparator),Utils.Trim(f)!=""?this.moAutoComp.moAutoComp.val(f+this.moOptions.sMultiEntrySeparator+u+this.moOptions.sMultiEntrySeparator):this.moAutoComp.moAutoComp.val(u+this.moOptions.sMultiEntrySeparator),this.moAutoComp.moAutoComp.trigger("change"),i=this.moAutoComp.moFieldValue.val(),t=this._SplitTerms(i),i=t.join(this.moOptions.sMultiEntrySeparator),e=r,Utils.Trim(i)!=""&&(e=i+this.moOptions.sMultiEntrySeparator+r),e)}};AutoCompTextarea.prototype={_Init:function(){if(typeof this.moOptions.iMaxHeightTextarea=="number"?(this.moOptions.iMaxHeightTextarea=parseInt(this.moOptions.iMaxHeightTextarea),this.moOptions.iMaxHeightTextarea<10&&(this.moOptions.iMaxHeightTextarea=null)):this.moOptions.iMaxHeightTextarea=null,this.moOptions.iQueryDelay<0?this.moOptions.iQueryDelay=0:this.moOptions.iQueryDelay<=300&&(this.moAutoComp.moOptions.iQueryDelay=500),this.miLineWidth=this.moAutoComp.moAutoComp.width(),this.miCharWidth=parseInt(this.moAutoComp.moAutoComp.css("font-size")),this.moOptions.bEnlargeTextarea==!0&&typeof this.miCharWidth=="number"&&this.miCharWidth>5){var n=this.moAutoComp.moAutoComp.attr("data-for-autocomp")=="1";n||(this.moAutoComp.moAutoComp.css("height","auto"),this.moAutoComp.moAutoComp.attr("rows",1),this.miMinHeight=this.moAutoComp.moAutoComp.outerHeight(),this.miCurrentRows=1,this.moOptions.iMaxHeightTextarea!=null&&(this.miMaxRows=Math.ceil(this.moOptions.iMaxHeightTextarea/this.miMinHeight)),this._BindOnKeyUpEvent(),this._CalculateSize())}},_BindScrollEvent:function(){var n=this;this.moAutoComp.moAutoComp.scroll(function(){n._CalculateSize()})},_BindOnKeyUpEvent:function(){var n=this;this.moAutoComp.moAutoComp.keyup(function(){n.miCurrentRows!=n._CalculateNbRows()&&n.miCurrentRows<n.miMaxRows&&n._CalculateSize()})},_CalculateNbRows:function(){var t=this.moAutoComp.moAutoComp.val().length,n=Math.ceil(t*this.miCharWidth/this.miLineWidth);return n<=0&&(n=1),n},_ScrollToBottom:function(){var n=this.moAutoComp.moAutoComp.getSelection().getRangeAt(0).startOffset;n>=this.moAutoComp.moAutoComp.val().length-3&&this.moAutoComp.moAutoComp.scrollTop(this.moAutoComp.moAutoComp.outerHeight())},_CalculateSize:function(){var n=this._CalculateNbRows();n>this.miMaxRows?(this.moAutoComp.moAutoComp.attr("rows",this.miMaxRows),this.miCurrentRows=this.miMaxRows):(this.moAutoComp.moAutoComp.attr("rows",n),this.miCurrentRows=n);PositionMgr.GetInstance().AddToDirtyYList($PI(this.moAutoComp.msID));PositionMgr.GetInstance().CalculatePosition()}};ComplexAutoCompProperties.prototype._GetCompensateWidth=function(){return parseInt($E(this.moAutoComp.msID).css("--sf-specific-cell-compensation-width"))||AutoCompletionProperties.Const.CELL_COMPENSATION_WIDTH};ComplexAutoCompProperties.prototype.SpecificRenderMenu=function(n,t){for(var r,v,w,l,s,f,h,i,o,nt=this,e="",p="",b=t.length-1,u=b;u>=0;u--){if(0)break;switch(t[u].bodyText){case AutoCompletionProperties.Const.JSON_MAXCOUNT:case AutoCompletionProperties.Const.JSON_SPECIFIC_CLASS:break;case AutoCompletionProperties.Const.JSON_COL_WIDTH:if(this.masColWidth=t[u].bodyContent,r=0,this.masColWidth.length>=1){for(i=0;i<this.masColWidth.length;i++)parseInt(this.masColWidth[i])?(this.masColWidth[i]=parseInt(this.masColWidth[i]),r+=this.masColWidth[i]):(r+=this.miDefaultColumnWidth,this.masColWidth[i]=this.miDefaultColumnWidth);if(v=r/(Utils.GetViewportWidth()-30-this.miScrollBarWidth),v>1){for(i=0;i<this.masColWidth.length;i++)this.masColWidth[i]=Math.floor(parseInt(this.masColWidth[i])/v);r=Utils.GetViewportWidth()-30}else r+=this.miScrollBarWidth;if(this.moAutoComp.moContainer.moAdvancedActionPanel.length>0&&this.moAutoComp.moContainer.moAdvancedActionPanel.outerWidth()!=r&&r>0){for(w=this.moAutoComp.moContainer.moAdvancedActionPanel.outerWidth()*1/r,i=0;i<this.masColWidth.length;i++)parseInt(this.masColWidth[i])&&(this.masColWidth[i]=this.masColWidth[i]*w);r=this.moAutoComp.moContainer.moAdvancedActionPanel.outerWidth()}this.moAutoComp.miContainerWidthTotal=r}break;case AutoCompletionProperties.Const.JSON_HEADER:if(l=t[u].bodyContent,l.length>1)for(i=0,o=l.length;i<o;i++){if(s=l[i],typeof s=="undefined"||s==null||Utils.Trim(s)=="")break;f=parseInt(this.miDefaultColumnWidth);this.masColWidth&&(f=parseInt(this.masColWidth[i])-this._GetCompensateWidth(),i==o-1&&this.mbHasNextAndPreviousButtons==!1&&(f-=this._GetCompensateWidth()));f=f;e+='<div class="Col c'+i+'" style="width:'+f+'px;box-sizing:content-box">'+s+"<\/div>"}break;case AutoCompletionProperties.Const.JSON_COL_NAME:if(h=t[u].bodyContent,this.moAutoComp.moColumnName=[],h.length>1)for(i=0,o=h.length;i<o;i++)h[i]!=null&&this.moAutoComp.moColumnName.push(h[i]);break;default:bContinune=!1}}if(this.moAutoComp.moOptions.sOption&&this.moAutoComp.moOptions.sOption!=null&&this.moAutoComp._CheckEvent("option")){var y=(new Date).getTime(),a="",c=this.moAutoComp.moEvents.option;this.moAutoComp.moOptions.sEventTrackingCode!=""&&this.moAutoComp.moOptions.sPageTrackingCode!=""&&(a+=this.moAutoComp.moOptions.sEventTrackingCode.replace('"',"'")+this.moAutoComp.moOptions.sPageTrackingCode.replace('"',"'"));a+="Matrix3.AddEvent('"+c.vform_id+"', '"+c.name+"', '"+c.type+"', '"+c.delay+"', '"+c.args+"');";p+='<div><a id="'+y+'" onclick="'+a+'">'+this.moAutoComp.moOptions.sOption+"<\/a>
216",function(){$("body").off("click",y).on("click","#"+y,function(){Utils.EvalScripts(a)})}()}if(this.moAutoComp.mbUseChildQuery==!0&&e!=""){var k='<div class="Col" style="width: '+ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON+"px; height: "+ComplexAutoCompProperties.Const.HEIGHT_PREVIOUS_NEXT_BUTTON+'px;"><\/div>',d='<div class="Col" style="width: '+ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON+"px; height: "+ComplexAutoCompProperties.Const.HEIGHT_PREVIOUS_NEXT_BUTTON+'px;"><\/div>',g=e;e=k+g+d;this.mbHasNextAndPreviousButtons=!0;this.moAutoComp.moContainer.mbUseChildQuery=!0}return{ul:n,ulScrollTop:this.miScrollTop,aoResults:t,sHeader:e,sFooter:p}};ComplexAutoCompProperties.prototype.SpecificRenderItem=function(n,t){var it=this,i="",f=t.bodyContent,a=t.bodyValue,b=t.toolTip,tt=t.bodyValue==AutoCompletionProperties.Const.CREATE_ENTRY_RESERVED_VALUE,v,y,h,k,d,g,c,r,o,u,e,nt,l,p,w,s;if(this.mbHasNextAndPreviousButtons==!0&&(v=this.moAutoComp.moOptions.sParentQueryFile!=""&&this.masSearchLevel.length>0||t.displayShowParent,i+='<div class="ColClass ACShowChildren'+(v?" ACHasPrevious":"")+'" style="width: '+ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON+"px; height: "+ComplexAutoCompProperties.Const.HEIGHT_PREVIOUS_NEXT_BUTTON+'px;box-sizing:content-box;border: none;">',v&&(y=uuidv4(),i+='<span id="'+y+'" class="ACPreviousSearchBtn" title="Show parent"><\/span>',s=this.moAutoComp.msID,function(){$(document).ready(function(){$('[id="'+y+'"]').off("click").click(function(n){return Utils.StopPropagation(n),n.stopPropagation(),AutoCompletionMgr.Get(s).moComplexAutoComp.PreviousSearch(a),!1})})}()),i+="<\/div>"),tt){for(h=0,r=0,o=f.length;r<o;r++)e=this.miDefaultColumnWidth,this.masColWidth&&(e=this.masColWidth[r]),h+=parseInt(e);h-=this._GetCompensateWidth()*2;u=f[0];Utils.Trim(u)==""&&(u=" ");i+='<div class="c0 ColClass" ';i+='style="border: none;">';i+='<div class="t" style="width: '+h+'px;word-break: break-word;">'+this.moAutoComp._CleanText(u)+"<\/div>";i+="<\/div>"}else if(this.moAutoComp.moOptions.bGroupDescription)u=f[0],k=f[1],d=this.moAutoComp.moOptions.bEnableHTML?u:this.moAutoComp._CleanText(u),i+='<div class="ColClass">',i+='<div class="desc-group">',i+='<div class="item-name">'+d+"<\/div>",i+='<div class="item-desc">'+this.moAutoComp._CleanText(k)+"<\/div>",i+="<\/div>",g=a===this.moAutoComp.msLatestItemValue,g&&(i+='<div class="desc-group-state"><cx-icon name="check"><\/cx-icon><\/div>'),i+="<\/div>";else for(c=this.moAutoComp.moColumnName?this.moAutoComp.moColumnName.indexOf("KeyType"):-1,r=0,o=f.length;r<o;r++)u=f[r],Utils.Trim(u)==""&&(u=" "),i+='<div class="c'+r+" ColClass",this.moAutoComp.moOptions.bEnableStructuralElement&&this.moAutoComp.moColumnName&&this.moAutoComp.moColumnName[r]==="Keyword"&&t.isStructuralElement&&(i+=" ACStructElementCol",c>=0&&(t.bodyContent[c]="")),c>=0&&this.moAutoComp.moColumnName[r]==="KeyType"&&(i+=" ACKeyTypeCol"),i+=this.moAutoComp.moOptions.sColStyleClasses&&this.moAutoComp.moColumnName&&this.moAutoComp.moOptions.sColStyleClasses[this.moAutoComp.moColumnName[r]]?" "+this.moAutoComp.moOptions.sColStyleClasses[this.moAutoComp.moColumnName[r]]+'" ':'" ',e=parseInt(this.miDefaultColumnWidth)||AutoCompletionProperties.Const.DEFAULT_COLUMN_WIDTH,f.length>=1?(this.masColWidth&&(e=(parseInt(this.masColWidth[r])||AutoCompletionProperties.Const.DEFAULT_COLUMN_WIDTH)-this._GetCompensateWidth(),r==o-1&&this.mbHasNextAndPreviousButtons==!1&&(e-=this._GetCompensateWidth())),nt=this.mbHasNextAndPreviousButtons==!0&&r==o-1?"border: none;":"",i+='style="'+nt+'">'):i+=">",i+='<div class="t" style="width: '+e+'px;word-break: break-word;">',r==0&&t.recommeded&&(i+='<i class="ico fa fa-star ACIcon ACIconRecommended"><\/i>'),i+=this.moAutoComp.moOptions.bEnableHTML?u:this.moAutoComp._CleanText(u),l="",b!=null&&(l=b[r]),l&&(i+=`<i original-title="${l}" class="ico fa fa-exclamation-circle ACIconMoreDetail"></i>`),i+="<\/div>",i+="<\/div>";return this.mbHasNextAndPreviousButtons==!0&&(p=this.moAutoComp.moOptions.sChildQueryFile!=""&&this.masSearchLevelParent.length>0||t.displayShowChildren,i+='<div class="ColClass ACShowChildren'+(p?" ACHasNext":"")+'" style="width: '+ComplexAutoCompProperties.Const.WIDTH_PREVIOUS_NEXT_BUTTON+"px; height: "+ComplexAutoCompProperties.Const.HEIGHT_PREVIOUS_NEXT_BUTTON+'px; border: none;">',p&&(w=uuidv4(),i+='<span id="'+w+'" class="ACNextSearchBtn" title="Show children"><\/span>',s=this.moAutoComp.msID,function(){$(document).ready(function(){$('[id="'+w+'"]').off("
216click").click(function(n){return Utils.StopPropagation(n),n.stopPropagation(),AutoCompletionMgr.Get(s).moComplexAutoComp.NextSearch(a),!1})})}()),i+="<\/div>"),i};ComplexAutoCompProperties.prototype.GetQueryFileAndQueryFilterFile=function(){return this.masSearchLevel.length>0?{sQueryFile:this.moAutoComp.moOptions.sChildQueryFile,sQueryFilterFile:this.moAutoComp.moOptions.sChildQueryFilterFile}:this.masSearchLevelParent.length>0?{sQueryFile:this.moAutoComp.moOptions.sParentQueryFile,sQueryFilterFile:this.moAutoComp.moOptions.sParentQueryFilterFile}:{sQueryFile:this.moAutoComp.moOptions.sQueryFile,sQueryFilterFile:this.moAutoComp.moOptions.sQueryFilterFile}};ComplexAutoCompProperties.prototype.NextSearch=function(n){var i=document.querySelector("div[id='"+this.moAutoComp.msID+"_Mirror'] ul"),t;this.masSearchLevelParent.length>0?(t=this.masSearchLevelParent.pop(),this.msLastSearch=t,this.miScrollTop=this.maiLastScrollTopLevel.pop(),this.maiLastScrollTopLevelParent.push(i.scrollTop),this.mbAtRoot=!this.masSearchLevelParent.length,$E(this.moAutoComp.msID).autocomplete("search",t)):(t=this.msLastSearch,t||(t=this.moAutoComp.msLastSearch,t||(t="%%")),this.masSearchLevel.push(t),this.msLastSearch=n,this.miScrollTop=this.maiLastScrollTopLevel.pop(),this.maiLastScrollTopLevelParent.push(i.scrollTop),this.mbAtRoot=!1,$E(this.moAutoComp.msID).autocomplete("search",n))};ComplexAutoCompProperties.prototype.PreviousSearch=function(n){var i=document.querySelector("div[id='"+this.moAutoComp.msID+"_Mirror'] ul"),t;this.masSearchLevel.length>0?(t=this.masSearchLevel.pop(),this.msLastSearch=t,this.miScrollTop=this.maiLastScrollTopLevelParent.pop(),this.maiLastScrollTopLevel.push(i.scrollTop),this.mbAtRoot=!this.masSearchLevel.length,$E(this.moAutoComp.msID).autocomplete("search",t)):(t=this.msLastSearch,t||(t=this.moAutoComp.msLastSearch,t||(t="%%")),this.masSearchLevelParent.push(t),this.msLastSearch=n,this.miScrollTop=this.maiLastScrollTopLevelParent.pop(),this.maiLastScrollTopLevel.push(i.scrollTop),this.mbAtRoot=!1,$E(this.moAutoComp.msID).autocomplete("search",n))};ComplexAutoCompProperties.prototype.reset=function(){this.msLastSearch="";this.masSearchLevel=[];this.masSearchLevelParent=[];this.mbAtRoot=!0;this.miScrollTop=0;this.maiLastScrollTopLevel=[];this.maiLastScrollTopLevelParent=[]};ComplexAutoCompProperties.Const={WIDTH_PREVIOUS_NEXT_BUTTON:32,HEIGHT_PREVIOUS_NEXT_BUTTON:32};AdvancedVisibilityMgr.moSingleton=null;AdvancedVisibilityMgr.Const={MGR_NAME:"AdvancedVisibility"};AdvancedVisibilityMgr.GetInstance=function(){return AdvancedVisibilityMgr.moSingleton||(AdvancedVisibilityMgr.moSingleton=new AdvancedVisibilityMgr),AdvancedVisibilityMgr.moSingleton};AdvancedVisibilityMgr.moHandlers={};AdvancedVisibilityMgr.prototype={AddAsPending:function(n){this.moPendingControlIDs.push(n)},ApplyPendings:function(){var n=this;this.moPendingControlIDs.forEach(function(t){n.Add(t)})},Add:function(n){this.moControlsIDs.PushIfNotExists(n);Matrix3.RegisterInCache(n,AdvancedVisibilityMgr)},RefreshNode:function(n){this.moControlsIDs.Remove(this.moControlsIDs.GetIndex(n))},EvaluateAdvancedVisibilityExp:function(){for(var n=0,t=this.moControlsIDs.GetSize();n<t;n++)try{$Elt(this.moControlsIDs.Get(n)).EvaluateAdvancedVisibilityExp()}catch(i){}}};AttachZoomMgr={AttachedElements:{},AttachedCallbacks:{}};AttachZoomMgr.ZoomImage=function(n,t){AttachZoomMgr.ZoomElement(n+"_img",t)};AttachZoomMgr.ZoomElement=function(n,t){AttachZoomMgr.AttachedElements[n]||AttachZoomForImage(n,t);getMediumZoom().open({target:document.getElementById(n)})};bMyZoomDarkMode=!1;AutoExpandHeight.Const={MGR_NAME:"AutoExpandHeight",EXPAND_ON_FOCUS_TO_HEIGHT:"ExpandOnFocusToHeight"};AutoExpandHeight.moRegistered={};AutoExpandHeight.Activate=function(n,t){var i=$PI(n);if(i){AutoExpandHeight.moRegistered[n]=i;Matrix3.RegisterInCache(n,AutoExpandHeight);var r=$(i.GetNode()).find("textarea"),u=Math.min(t,r[0].scrollHeight+2),f=function(){r.css("height","auto");var n=Math.min(t,Math.max(51,r[0].scrollHeight+2));r.css("height",n+"px");u!=n&&(u=n,$(i).css("height",n+3+"px"),PositionMgr.GetInstance().AddToDirtyXList(i),PositionMgr.GetInstance().AddToDirtyYList(i),i.ForceHasChanged(),PositionMgr.mbAnimateGlobal=!0,PositionMgr.GetInstance().CalculatePosition(),PositionMgr.mbAnimateGlobal=!1);n==t?r.css("overflow","auto"):r.css("overflow","hidden")};f();r.bind("keyup change",f)}};AutoExpandHeight.RefreshNode=function(n){var t=$PI(n);
216t&&$(t.GetNode()).find("textarea").unbind("keyup change");delete AutoExpandHeight.moRegistered[n]};AutoScaleProperties.Const={PROPERTY_POLICY:"AutoScalePolicy",PROPERTY_H_ALIGN:"AutoScaleHorizontalAlign",PROPERTY_V_ALIGN:"AutoScaleVerticalAlign",VALUE_CENTER:"center",VALUE_LEFT:"left",VALUE_RIGHT:"right",VALUE_TOP:"top",VALUE_BOTTOM:"bottom",VALUE_STRETCH:"stretch",VALUE_FILL:"fill",VALUE_FIT:"fit",VALUE_FIT_WIDTH:"fitwidth",VALUE_FIT_HEIGHT:"fitheight",VALUE_NONE:"none"};AutoScaleProperties.Apply=function(n){if(n&&n.moLinkedImage){if(!n.moLinkedImage.complete){n.moLinkedImage.style.visibility="hidden";n.moLinkedImage.onload=function(){AutoScaleProperties.AutoScaleImage(n)};return}AutoScaleProperties.AutoScaleImage(n)}};AutoScaleProperties.AutoScaleImage=function(n){var t,i,s=n.classList.contains("rotated-90")||n.classList.contains("rotated-270"),p,u,f,h,c,r,l,a,e,o,v,y;if(Utils.GetNaturalWidth(n.moLinkedImage)?(t=Utils.GetNaturalWidth(n.moLinkedImage),i=Utils.GetNaturalHeight(n.moLinkedImage),s&&(p=t,t=i,i=p)):(t=n.GetProperty("DocumentWidth"),i=n.GetProperty("DocumentHeight")),t>0&&i>0){u=n.GetWidth();f=n.GetHeight();n.GetOriginalWidth()==-1&&(u=Infinity,h=n.GetProperty(ConstProperties.Const.MAX_RESIZE_WIDTH,-1),h!=-1&&(u=h));n.GetOriginalHeight()==-1&&(f=Infinity,c=n.GetProperty(ConstProperties.Const.MAX_RESIZE_HEIGHT,-1),c!=-1&&(f=c));r=1;switch(n.GetProperty(AutoScaleProperties.Const.PROPERTY_POLICY)){case AutoScaleProperties.Const.VALUE_FILL:r=Math.max(f/i,u/t);break;case AutoScaleProperties.Const.VALUE_FIT:r=Math.min(f/i,u/t);break;case AutoScaleProperties.Const.VALUE_FIT_WIDTH:r=u/t;break;case AutoScaleProperties.Const.VALUE_FIT_HEIGHT:r=f/i;break;default:r=1}n.GetOriginalWidth()==-1&&(u=Math.round(t*r),PositionMgr.GetInstance().AddToDirtyXList(n));n.GetOriginalHeight()==-1&&(f=Math.round(i*r),PositionMgr.GetInstance().AddToDirtyYList(n));n.GetProperty(AutoScaleProperties.Const.PROPERTY_POLICY)==AutoScaleProperties.Const.VALUE_STRETCH?(t=u,i=f):(t=Math.round(t*r),i=Math.round(i*r));n.moLinkedImage.mdCurrentScale&&r==n.moLinkedImage.mdCurrentScale&&n.GetProperty(AutoScaleProperties.Const.PROPERTY_POLICY)!=AutoScaleProperties.Const.VALUE_STRETCH||(l=t,a=i,s&&(l=i,a=t),DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"width",l+"px"),DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"height",a+"px"));e=0;o=0;s&&(e+=Math.floor((t-i)/2),o-=Math.floor((t-i)/2));v=n.GetProperty(AutoScaleProperties.Const.PROPERTY_V_ALIGN);v==AutoScaleProperties.Const.VALUE_CENTER?o+=Math.floor((f-i)/2):v==AutoScaleProperties.Const.VALUE_BOTTOM&&(o+=f-i);y=n.GetProperty(AutoScaleProperties.Const.PROPERTY_H_ALIGN);y==AutoScaleProperties.Const.VALUE_CENTER?e+=Math.floor((u-t)/2):y==AutoScaleProperties.Const.VALUE_RIGHT&&(e+=u-t);n.moLinkedImage.miLeft!=e||n.moLinkedImage.miTop!=o?(DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"left",e+"px"),DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"top",o+"px"),DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"visibility","")):n.moLinkedImage.miLeft!==undefined&&n.moLinkedImage.miTop!==undefined&&DOMChangesQueue.GetInstance().QueueSetCss(n.moLinkedImage,"visibility","");n.moLinkedImage.mdCurrentScale=r;n.moLinkedImage.miLeft=e;n.moLinkedImage.miTop=o}n.moLinkedImage.className&&n.moLinkedImage.className.indexOf("zoom_enabled_dm")>-1&&HandleAyncAttachZoom(n.moLinkedImage);DOMChangesQueue.GetInstance().ApplyQueue()};AutoScroll.prototype={Refresh:function(){this.moTarget&&this.moTarget.style&&(this.moTarget.style.webkitTransform="translate("+Math.round(this.mdOffset)+"px, 0)",this.moTarget.style.MozTransform="translate("+Math.round(this.mdOffset)+"px, 0)")}};AutoScroll.moTable={};AutoScroll.Activate=function(n,t){AutoScroll.moTable[n]=new AutoScroll(n,t)};AutoScroll.IsActive=function(n){return AutoScroll.moTable.hasOwnProperty(n)};AutoScroll.SetOffset=function(n,t){AutoScroll.moTable.hasOwnProperty(n)&&(AutoScroll.moTable[n].mdOffset=t)};AutoScroll.GetAutoscrollProps=function(n){var t=null;return AutoScroll.moTable.hasOwnProperty(n)&&(t=AutoScroll.moTable[n]),t};AutoScroll.RefreshNode=function(n){AutoScroll.moTable.hasOwnProperty(n)&&(oResult=AutoScroll.moTable[n],clearInterval(oResult.miTimer),delete AutoScroll.moTable[n])};ClassProperties.prototype={Action_AddClass:function(n){var r=$PI(this.msID),t,i;r&&(t=r.GetNode(),$AddClass(t,n),i=document.createTextNode(" "),t.appendChild(i),setTimeout(function(){t.removeChild(i)},0))},Action_RemoveClass:function(n){var r=$PI(this.msID),t,i;r&&(t=r.GetNode(),$RemoveClass(t,n),i=document.createTextNode(" "),t.appendChild(i),setTimeout(function(){t.removeChild(i)},0))},Action_ToggleClass:function(n){var f=$PI(this.msID),i,r,t,u;if(f){if(i=f.GetNode(),n)for(r=n.split(" "),t=0;t<r.length;t++)r[t]!=""&&$SwitchClass(i,r[t]);u=document.createTextNode(" ");i.appendChild(u);
216setTimeout(function(){i.removeChild(u)},0)}}};ClearCacheProperties.prototype={Action_ClearCache:function(){PreloadMgr.GetInstance().ResetCache()}};ClipboardProperties.Const={ID_CLIPBOARD:"Clipboard",COMMAND_APPEND:"append"};ClipboardProperties.msCache="";ClipboardProperties.prototype={Action_CopyValueToClipboard:function(n){var t="";if(n&&Utils.Trim(n)!="")t=n;else if(this.msControlID&&$Elt(this.msControlID).value!=null&&$Elt(this.msControlID).value!="")t=$Elt(this.msControlID).value;else try{t=$Control(this.msID,LabelCtrl.Const.CONTROL_NAME).GetValue()}catch(i){}ClipboardProperties.msCache=t;this.Event_ValueCopiedInClipboard&&this.Event_ValueCopiedInClipboard.Fire()},Event_ValueCopiedInClipboard_Setup:function(){this.Event_ValueCopiedInClipboard=new CtrlEvent(this)},Event_ValueExtractedFromClipboard_Setup:function(){this.Event_ValueExtractedFromClipboard=new CtrlEvent(this)},Action_GetValueFromClipboard:function(n){var t;if(sValueTemp=ClipboardProperties.msCache,this.msControlID&&$Elt(this.msControlID))n==ClipboardProperties.Const.COMMAND_APPEND&&(t=$Elt(this.msControlID).value!=""?"\n":"",sValueTemp=$Elt(this.msControlID).value+t+sValueTemp),$Elt(this.msControlID).value=sValueTemp;else try{n==ClipboardProperties.Const.COMMAND_APPEND&&(t=$Control(this.msID,LabelCtrl.Const.CONTROL_NAME).GetValue()!=""?"\n":"",sValueTemp=$Control(this.msID,LabelCtrl.Const.CONTROL_NAME).GetValue()+t+sValueTemp);$Control(this.msID,LabelCtrl.Const.CONTROL_NAME).SetValue(sValueTemp)}catch(i){}this.Event_ValueExtractedFromClipboard&&this.Event_ValueExtractedFromClipboard.Fire()}};typeof CodeHighlight=="undefined"&&(window.Prism=window.Prism||{},window.Prism.manual=!0,CodeHighlight=function(){},CodeHighlight.Activate=function(n,t,i){var r,u;r=i?"prism_dark.css":"prism_light.css";u=t;Utils.LoadStylesheet(["Include/Vendors/prismjs-"+n+"/"+r,],function(){Utils.LoadScript(["Include/Vendors/prismjs-"+n+"/prism.js",],function(){var t=u,n=document.getElementById(t);n&&(Prism.highlightAllUnder(n),typeof Prism.plugins!="undefined"&&typeof Prism.plugins.filterHighlightAll!="undefined"&&(Prism.plugins.filterHighlightAll.reject.addSelector("precode.no-highlight > pre > code"),Prism.plugins.filterHighlightAll.reject.addSelector("pre.no-highlight > code"),Prism.plugins.filterHighlightAll.reject.addSelector("code.no-highlight")))},null,!0)},null,!0)});CommandProperties.Const={COMMAND_TRIGGER_LIST:"TriggerList",CLASS_HIGHLIGHT:"HighlightC"};CommandProperties.prototype={ActiveCommand:function(n){switch(n){case CommandProperties.Const.COMMAND_TRIGGER_LIST:this.ActiveTriggerList()}},ActiveTriggerList:function(){var t='<table style="width: 100%;"><tr style="width:100%; font-weight: bold;"><td style="width:20%;">Source VForm<\/td><td style="width:20%;">Source Event<\/td><td style="width:20%;">Target VForm<\/td><td style="width:20%;">Target Event<\/td><td style="width:20%;">Trigger Type<\/td><\/tr>',r=Matrix3.GetTriggerTable(),i,n,u;if(r instanceof TriggerTable)for(i=r.GetTriggerList(),n=0,u=i.length;n<u;n++)t+='<tr style="border-top: solid 1px gray;">',t+='<td style="padding: 5px;"><a href="javascript:$SwitchClass(\''+i[n].GetSourceVForm()+"', '"+CommandProperties.Const.CLASS_HIGHLIGHT+"');\" >"+i[n].GetSourceVForm()+"<\/a><\/td>",t+='<td style="padding: 5px;">'+i[n].GetSourceEvent()+"<\/td>",t+='<td style="padding: 5px;"><a href="javascript:$SwitchClass(\''+i[n].GetTargetVForm()+"', '"+CommandProperties.Const.CLASS_HIGHLIGHT+"');\">"+i[n].GetTargetVForm()+"<\/a><\/td>",t+='<td style="padding: 5px;">'+i[n].GetTargetEvent()+"<\/td>",t+='<td style="padding: 5px;">'+i[n].GetTargetType()+"<\/td>",t+="<\/tr>";t+="<\/table>";this.SetValue(t,!0)},Action_ExecuteScript:function(_sArgs){if(_sArgs&&_sArgs.length){while(_sArgs.indexOf("[VFORMID]")>-1)_sArgs=_sArgs.replace("[VFORMID]",Utils.GetVFormId(this.msID));if(CSP.IsEnabled()){var sID=(new Date).getTime();try{typeof objects_actions_execute=="undefined"&&(window.objects_actions_execute={});window.objects_actions_execute[sID]=this;_sArgs=_sArgs.replace(/this/g,'window.objects_actions_execute["'+sID+'"]');typeof objects_actions_execute_event_args=="undefined"&&(window.objects_actions_execute_event_args={});window.objects_actions_execute_event_args[sID]=this.Action_ExecuteScript.moEventArguments;_sArgs=_sArgs.replaceAll("[EVENT_ARGUMENTS]",'window.objects_actions_execute_event_args["'+sID+'"]');Utils.EvalScripts(_sArgs)}finally{window.objects_actions_execute[sID]=undefined}}else eval(_sArgs)}}};M5ContextMenuHander=function(n,t){var i=t.items[n],u=t.$trigger[0].id,f=t.contextMenuContainer,e,o,r,s;if(f!=null&&f!=""&&(u=u.substr(0,u.length-f.length-1)),i.e&&(e=Matrix3.Const.RETURNTYPE_FULL,i.et&&(e=i.et),Matrix3.AddEvent(u,i.e,e,Matrix3.Const.DELAY_IMMEDIAT,i.ea,i.ec,i.eca)),i.pbe&&Matrix3.DoPostBack(u,i.pbe,i.pbea),i.h&&HyperlinkProperties.OpenLinkWithTarget(i.h,i.t,$PI(u)),i.cpct)if(o=function(){i.cpct_dt!=="True"&&Matrix3.ShowNotification("Copied to clipboard",{notificationType:"success"})},Utils.IsIE())r=document.createElement("textarea"),r.value=i.cpct,r.setAttribute("readonly",""),r.style={position:"absolute",left:"-9999px"},document.body.appendChild(r),r.select(),document.execCommand("copy"),document.body.removeChild(r),o();else{function n(n,t){return new Blob([t],{type:n})}i.cpct_rt||(i.cpct_rt=i.cpct);s=new clipboard.ClipboardItem({"text/html":new Blob([i.cpct_rt],{type:"text/html"}),"text/plain":new Blob([i.cpct],{type:"text/plain"})});clipboard.write([s]).then(o)}};CustomScrollbarProperties.prototype={ActiveCustomScrollbar:function(n){this.msCustomScrollbarWaitMsg=n;Utils.AddEvent(this.msID,"scroll",this.ScrollEvent,this)},ScrollEvent:function(n,t){if(window.clearTimeout(this.moScrollEventTimeout),t)DragDropMgr.RefreshCache();else{var i=this;this.moScrollEventTimeout=window.setTimeout(function(){i.ScrollEvent(null,!0)},50)}}};DeactivateBackProperties.moObjects=[];DeactivateBackProperties.IsDeactivate=function(){for(var t=!1,n=0,i=DeactivateBackProperties.moObjects.length;n<i;n++)$Elt(DeactivateBackProperties.moObjects[n])&&(t=!0);return t};DeactivateBackProperties.prototype={DeactivateBack:function(){DeactivateBackProperties.moObjects.push(this.msID)}};DefaultActionProperties.moDefaultActions={};DefaultActionProperties.ExecuteDefaultAction=function(n){var t=!1;return n in this.moDefaultActions&&(this.moDefaultActions[n].call(),t=!0),t};DefaultActionProperties.prototype={Event_DefaultAction_Setup:function(){this.Event_DefaultAction=new CtrlEvent(this);var n=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],t=this;DefaultActionProperties.moDefaultActions[n]=function(){t.Event_DefaultAction.Fire()}}};DeferInject.Cache={moHandlers:{}};DeferInject.Const={MGR_NAME:"DeferInject"};DeferInject.Activate=function(n,t,i){var r=$PI(n),s;if(r){s=r.msId;Matrix3.RegisterInCache(n,DeferInject);
216var u=function(n){var e=$(r.GetNode()),f;n&&Utils.GetMousePosition(n);e.append(t);f=ControlMgr.GetInstance().CreateControl(r.GetNode(),r.moParent);PositionMgr.GetInstance().AddToDirtyXList(f);PositionMgr.GetInstance().AddToDirtyYList(f);f.ExtractDependences();Matrix3.ProcessPrePositionCalls();Param.EnableInhibitPositioning&&(Matrix3.mbInhibitPositioning=!1);PositionMgr.GetInstance().CalculatePosition();ControlMgr.GetInstance().ApplyPropertyQueue();DOMChangesQueue.GetInstance().ApplyQueue();i();SimpleTooltip.Setup();setTimeout(function(){PostRenderMgr.GetInstance().ExecuteFunctions()},0);e.unbind("mouseenter",u);e.unbind("focus",u)},f=$(r.GetNode()),h=f.height(),c=f.width(),e=$(":hover").last().offset(),o=f.offset();Utils.IsTouchDevice()||e.top>=o.top&&e.top<=o.top+h&&e.left>=o.left&&e.left<=o.left+c?u():(f.bind("mouseenter",u),f.bind("focus",u),DeferInject.Cache.moHandlers[n]=u)}};DeferInject.moShowOnParentHoverElt={};DeferInject.IsShowOnParentHover=function(n){return!!DeferInject.moShowOnParentHoverElt[n]};DeferInject.ShowOnParentHover=function(n,t){var i=$PI(n),r;if(i){if(t&&Utils.IsTouchDevice()){$(i.GetNode()).removeClass("InvisibleC");return}if(i.msOriginalTabIndex&&$(i).find("a").attr("tabindex",i.msOriginalTabIndex),DeferInject.moShowOnParentHoverElt[n]=!0,Matrix3.RegisterInCache(n,DeferInject),r=i.moParent,Utils.miMouseX&&Utils.miMouseY&&r.IsUnderMouse_NoEvt(!0)){$(i.GetNode()).removeClass("InvisibleC");$(document).on("mousemove",function(n){r.IsUnderMouse(n,!0)||($(i.GetNode()).addClass("InvisibleC"),$(this).off(n))})}$(r.GetNode()).bind("mouseenter",function(){$(i.GetNode()).removeClass("InvisibleC")});$(r.GetNode()).bind("mouseleave",function(){$(i.GetNode()).addClass("InvisibleC")});$(r.GetNode()).bind("focusin",function(){$(i.GetNode()).removeClass("InvisibleC")});$(document).on("focusin.deferinject."+n,function(n){if(!r.GetNode().contains(n.target)){var t=$(i.GetNode());setTimeout(function(){var n=r.GetNode();n&&n.contains(document.activeElement)||t.addClass("InvisibleC")},200)}})}};DeferInject.RefreshNode=function(n){var t=DeferInject.Cache.moHandlers[n];delete DeferInject.moShowOnParentHoverElt[n];delete DeferInject.Cache.moHandlers[n];t&&($E(n).unbind("mouseenter",t),$E(n).unbind("focus",t));$E(n).parent().unbind("mouseenter focusin");$E(n).parent().unbind("mouseleave");$(document).off("focusin.deferinject."+n)};DOMEventProperties.Const={};DOMEventProperties.prototype={StopEventsPropagation:function(n){var i,r,t;for(i in n)r=n[i],t=$PI(this.msControlID),t&&t.addEventListener(r,function(n){n.stopPropagation()})}};DragProperties.prototype={ActiveDrag:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w){var k=this.msID+(i?i:""),b;this.moDraggableItem||(b=n.split(Utils.Const.GROUP_SEPARATOR),this.moDraggableItem=new DraggableItem(k,b,{ReturnType:l,VFormEffects:e,PleaseWaitMsg:o,PageVirtualID:h,ProxyMode:f,ReorderMode:a,DontMoveWhenReorder:v}),DragDropMgr.AddDDObject(this.moDraggableItem),Matrix3.RegisterInCache(this.msID,DragDropMgr));this.moDraggableItem.moOptions.DragWithHelperBox=y;this.moDraggableItem.moOptions.ReorderWithNewRelation=p;this.moDraggableItem.moOptions.HighlightOverItem=w},Event_StartDrag_Setup:function(){this.Event_StartDrag=new CtrlEvent}};DropProperties.prototype={ActiveDrop:function(n,t,i,r,u,f,e,o,s){var c=this.msID+(t?t:""),h;this.moDroppableItem||(h=n.split(Utils.Const.GROUP_SEPARATOR),this.moDroppableItem=new DroppableItem(c,h,i,r),DragDropMgr.AddDDObject(this.moDroppableItem),Matrix3.RegisterInCache(this.msID,DragDropMgr));this.moDroppableItem.moOptions.DropWithHelperBox=f;this.moDroppableItem.moOptions.ReorderWithNewRelation=e;this.moDroppableItem.moOptions.HighlightOverItem=o;this.moDroppableItem.moOptions.ExclusiveDropZone=s},Event_EndDrag_Setup:function(n){this.Event_EndDrag=new CtrlEvent;this.Event_EndDrag.miDelay=parseInt(n)},Event_EndDragOnItem_Setup:function(n){this.Event_EndDragOnItem=new CtrlEvent;this.Event_EndDragOnItem.miDelay=parseInt(n)}};DropProperties.AnimateDrop=function(n){var t=parseInt(Param.DropAnimationSize),i=parseInt(Param.DropAnimationDuration),r=$('<div class="drop-animation-noti-wrapper"><strong>'+Param.DropAnimationText+"<\/strong><\/div>
216").css({position:"absolute",left:n.pageX-t/2+"px",top:n.pageY-t/2+"px",width:t,height:t+"px","line-height":t+"px","border-radius":"50%",color:"#fff","text-align":"center",background:"#000",animation:"zoomIn","animation-duration":i+"ms"}).appendTo(document.body);setTimeout(function(){r.css({animation:"zoomOut","animation-duration":i+"ms"});setTimeout(function(){r.remove()},i)},i)};DynamicChildrenVisibilityMgr.moSingleton=null;DynamicChildrenVisibilityMgr.mbBypassRefresh=!1;DynamicChildrenVisibilityMgr.Const={MGR_NAME:"DynamicChildrenVisibility"};DynamicChildrenVisibilityMgr.GetInstance=function(){return DynamicChildrenVisibilityMgr.moSingleton||(DynamicChildrenVisibilityMgr.moSingleton=new DynamicChildrenVisibilityMgr),DynamicChildrenVisibilityMgr.moSingleton};DynamicChildrenVisibilityMgr.prototype={Add:function(n){this.moPanels.PushIfNotExists(n);Matrix3.RegisterInCache(n,DynamicChildrenVisibilityMgr)},RefreshNode:function(n){this.moPanels.Remove(this.moPanels.GetIndex(n))},RefreshPanels:function(){if(!DynamicChildrenVisibilityMgr.mbBypassRefresh)for(var n=0;n<this.moPanels.GetSize();n++)try{$Control(this.moPanels.Get(n)).RefreshDynamicChildrenVisibilityParams()}catch(t){}},ForceExecutePanels:function(){for(var n=0;n<this.moPanels.GetSize();n++)try{$Control(this.moPanels.Get(n)).ForceExecute()}catch(t){}},GetPanels:function(){for(var t,i={},n=0;n<this.moPanels.GetSize();n++){t=this.moPanels.Get(n);try{i[t]=$Control(t)}catch(r){}}return i}};DynamicChildrenVisibilityProperties.Const={POPUP_SCROLL_CONTAINER_ID:"PopupScrollContainer",FORM_1_ID:"Form1",DATA_DYNAMIC_CHILDREN_VISIBILITY_ID:"dcvid"};DynamicChildrenVisibilityProperties.prototype={ActiveDynamicChildrenVisibility:function(n,t){var u=$E(this.msID),c,i,l,r,v,a;if(u.length===1&&u[0]){for(var b=$(window),s=$("#Form1"),f=[],h={},e=u[0];e;)e.IsScrollable()&&(i=Utils.GetNodeCortexID(e),f.push(e),h[i]=e.scrollTop,e.setAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID,i)),e=e.moParent;if(!e){var k=Utils.GetVFormId(this.msID),y=Utils.GetRootOrPopupId(k),o=null;y&&(o=Matrix3.GetPopupTable()[y]);o?o.mbIsContextMenu?(c=null,o.msReferenceVFormID&&(c=Matrix3.GetPopupTable()[Utils.GetRootOrPopupId(o.msReferenceVFormID)]),c?(i=DynamicChildrenVisibilityProperties.Const.POPUP_SCROLL_CONTAINER_ID,f.push(c.moGlobalContainer),h[i]=c.moGlobalContainer.scrollTop,$E(i)[0]&&$E(i)[0].setAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID,i)):(i=DynamicChildrenVisibilityProperties.Const.FORM_1_ID,f.push(s[0]),h[i]=s[0].scrollTop,$E(i)[0]&&$E(i)[0].setAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID,i))):(i=DynamicChildrenVisibilityProperties.Const.POPUP_SCROLL_CONTAINER_ID,f.push(o.moGlobalContainer),h[i]=o.moGlobalContainer.scrollTop,$E(i)[0]&&$E(i)[0].setAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID,i)):(i=DynamicChildrenVisibilityProperties.Const.FORM_1_ID,f.push(s[0]),h[i]=s[0].scrollTop,$E(i)[0]&&$E(i)[0].setAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID,i))}f=$(f);l=new Point(0,0);this.moDynamicChildrenVisibilityParams={miStart:undefined,miEnd:undefined,moLastScrollOffset:h,maoChildren:null,maoSortedChildren:null,moTopDiv:$('<div class="top-div" style="visibility:hidden"><\/div>'),moBottomDiv:$('<div class="bottom-div" style="visibility:hidden; height:1px;"><\/div>')};u.prepend(this.moDynamicChildrenVisibilityParams.moTopDiv);u.prepend(this.moDynamicChildrenVisibilityParams.moBottomDiv);r=this;v=">.VF";n&&(n.length>1||Utils.IsStringFilled(n[0]))&&(v=n.map(function(n){return"[data-vf='"+n+"']"}).join(","));var p=function(){if(!r.moDynamicChildrenVisibilityParams.maoChildren){var n=u.find(v);r.moDynamicChildrenVisibilityParams.maoChildren={};n.each(function(){r.moDynamicChildrenVisibilityParams.maoChildren[this.msId]=this})}return r.moDynamicChildrenVisibilityParams.maoChildren},d=function(){if(!r.moDynamicChildrenVisibilityParams.maoSortedChildren){var n=$(Object.values(p())).map(function(){return{moNode:this,miTop:this.localToGlobal(l,!0,!0).y}}).sort(function(n,t){return n.miTop-t.miTop});n.length>0&&(n.slice(1).each(function(){this.miTop-=n[0].miTop}),n[0].miTop=0);r.moDynamicChildrenVisibilityParams.maoSortedChildren=n}return r.moDynamicChildrenVisibilityParams.maoSortedChildren},w=0;Utils.IsNumber(t)&&t>=0&&(w=t);a=function(){var v,y,nt,g,ut,ft,et,ot,it,f,c,a;if(!(Object.keys(p()).length<w)&&(this instanceof HTMLElement?(v=this,y=this.getAttribute(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID)):(nt=u.closest("["+DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID+"]"),nt.length>0?(v=nt[0],y=nt.attr(DynamicChildrenVisibilityProperties.Const.DATA_DYNAMIC_CHILDREN_VISIBILITY_ID)):(v=s[0],y=DynamicChildrenVisibilityProperties.Const.FORM_1_ID)),v)){var vt=Utils.GetViewportHe
216ight(),rt=b.scrollTop()+s.scrollTop(),st=u[0].localToGlobal(l,!0,!0).y-rt,yt=st+u[0].miHeight,ht=Math.max(0,st),tt=Math.min(vt,yt),ct=v.scrollTop,lt=ct<r.moDynamicChildrenVisibilityParams.moLastScrollOffset[y];r.moDynamicChildrenVisibilityParams.moLastScrollOffset[y]=ct;var h=r.moDynamicChildrenVisibilityParams.miStart,k=r.moDynamicChildrenVisibilityParams.miEnd,t=undefined,e=undefined,n=d();if(lt?n.slice(0,k).each(function(n){var i=this.moNode.localToGlobal(l,!0,!0).y-rt,r=i+this.moNode.miHeight;if(i<tt&&r>ht)Utils.IsNumber(t)||(t=n),e=n+1;else if(Utils.IsNumber(t)){if(i>=tt)return!1;e=n+1}}):(g=Utils.IsNumber(h)?h:0,n.slice(g).each(function(n){var i=this.moNode.localToGlobal(l,!0,!0).y-rt,r=i+this.moNode.miHeight;if(i<tt&&r>ht)Utils.IsNumber(t)||(t=n+g),e=n+1+g;else if(Utils.IsNumber(t)){if(i>=tt)return!1;e=n+1+g}})),r.moDynamicChildrenVisibilityParams.miStart=t,r.moDynamicChildrenVisibilityParams.miEnd=e,Utils.IsNumber(h)&&Utils.IsNumber(t)){if(t!==h||e!==k){lt?(ut=t,ft=Math.min(e,h),et=Math.max(e,h),ot=k):(ut=Math.max(t,k),ft=e,et=h,ot=Math.min(t,k));var at=n[t].miTop,o=r.moDynamicChildrenVisibilityParams.moTopDiv,i=n[t].moNode.parentNode;i!==o[0]&&i&&i.contains(o[0])||(o.detach(),o.insertBefore($(n[0].moNode)));o.height(at);it=n[n.length-1].miTop+n[n.length-1].moNode.miHeight-1;f=r.moDynamicChildrenVisibilityParams.moBottomDiv;i!==f[0]&&i&&i.contains(f[0])||(f.detach(),f.insertBefore($(n[0].moNode)));f.css("top",it+"px");c=[];a=[];n.slice(ut,ft).each(function(){c.push(this.moNode)});n.slice(et,ot).each(function(){a.push(this.moNode)});$(c).css("display","");$(a).css("display","none")}}else if(Utils.IsNumber(t)){var at=n[t].miTop,o=r.moDynamicChildrenVisibilityParams.moTopDiv,i=n[t].moNode.parentNode;i!==o[0]&&i&&i.contains(o[0])||(o.detach(),o.insertBefore($(n[0].moNode)));o.height(at);it=n[n.length-1].miTop+n[n.length-1].moNode.miHeight-1;f=r.moDynamicChildrenVisibilityParams.moBottomDiv;i!==f[0]&&i&&i.contains(f[0])||(f.detach(),f.insertBefore($(n[0].moNode)));f.css("top",it+"px");c=[];a=[];n.each(function(n){t<=n&&n<e?c.push(this.moNode):a.push(this.moNode)});$(c).css("display","");$(a).css("display","none")}else r.moDynamicChildrenVisibilityParams.moTopDiv.detach(),r.moDynamicChildrenVisibilityParams.moBottomDiv.detach(),n.each(function(){$(this.moNode).css("display","")})}};this.moDynamicChildrenVisibilityParams.mfScrollHandler=a;f.on("scroll",a);Matrix3.RegisterForCleanup(this.msID,DynamicChildrenVisibilityMgr.Const.MGR_NAME+"ScrollHandler",function(){try{f.off("scroll",a)}catch(n){}});DynamicChildrenVisibilityMgr.GetInstance().Add(this.msID)}},RefreshDynamicChildrenVisibilityParams:function(n){if(!DynamicChildrenVisibilityMgr.mbBypassRefresh&&this.moDynamicChildrenVisibilityParams.maoChildren)if(n)while(n){var t=n.GetId();if(this.moDynamicChildrenVisibilityParams.maoChildren[t]){$(this.moDynamicChildrenVisibilityParams.maoChildren[t]).css("display","");break}n=n.moParent}else $(Object.values(this.moDynamicChildrenVisibilityParams.maoChildren)).css("display",""),this.moDynamicChildrenVisibilityParams.miStart=undefined,this.moDynamicChildrenVisibilityParams.miEnd=undefined,this.moDynamicChildrenVisibilityParams.maoChildren=null,this.moDynamicChildrenVisibilityParams.maoSortedChildren=null,this.moDynamicChildrenVisibilityParams.moTopDiv.detach(),this.moDynamicChildrenVisibilityParams.moBottomDiv.detach()},ForceExecute:function(){this.moDynamicChildrenVisibilityParams.miStart=undefined;this.moDynamicChildrenVisibilityParams.miEnd=undefined;this.moDynamicChildrenVisibilityParams.maoChildren=null;this.moDynamicChildrenVisibilityParams.maoSortedChildren=null;this.moDynamicChildrenVisibilityParams.mfScrollHandler()}};DynamicTemplatesMgr={ListContextualizedControls:function(n){var u=[],i=[],t,r;for(i.push(n);i.length>0;)if(t=i.pop(),t.moContainerForChildrens&&(!t.IsVForm()||t==n)&&t.moContainerForChildrens.length>0)for(r=0;r<t.moContainerForChildrens.length;r++)i.push(t.moContainerForChildrens[r]);else DynamicTemplatesMgr.ControlNeedContextualization(t)&&u.push(t);n.SetProperty(TooltipProperties.Const.PROPERTY_TEMPLATED_CONTROLS,u)},ControlNeedContextualization:function(n){var i=!1,o,r,u,f,t,e,s,l,h,c;for(n.moLinkedImage!=null&&n.moLinkedImage.attributes&&(o=n.moLinkedImage.attributes.getNamedItem("srctemplate"),o!=null&&DynamicTemplatesMgr.PropertyNeedContextualization(o.value)&&(i=!0,n.SetProperty("src"+TooltipProperties.Const.ORGINIAL_SUFFIX,o.value))),r=[],r.push(n.GetNode()),u=[],f=[];r.length>0;)if(t=r.pop(),t.nodeType==3?DynamicTemplatesMgr.PropertyNeedContextualization(t.nodeValue)&&(e=t.parentNode,Utils.IndexOf(u,e)==-1&&(u.pu
216sh(e),e.msBaseValue=e.innerHTML,i=!0)):t.nodeType==1&&t.attributes&&(t.attributes.href&&DynamicTemplatesMgr.PropertyNeedContextualization(t.attributes.href.value)&&(t.msBaseLink=t.attributes.href.value,f.push(t),i=!0),t.attributes.onclick&&DynamicTemplatesMgr.PropertyNeedContextualization(t.attributes.onclick.value)&&(t.msBaseEvent=decodeURIComponent(t.attributes.onclick.value),f.push(t),i=!0)),s=t.childNodes,s)for(l in s)h=s[l],c=h.id,c&&c.lastIndexOf(Matrix3.Const.SEPARATOR_CONTROL)==-1||r.push(h);return u.length>0&&n.SetProperty("TemplatedTextNodes",u),f.length>0&&n.SetProperty("TemplatedLinkNodes",f),i},PropertyNeedContextualization:function(n){var t=!1;return n!=null&&n!=""&&n.indexOf(TooltipProperties.Const.LEFTMARKUP)!=-1&&n.indexOf(TooltipProperties.Const.RIGHTMARKUP)!=-1&&(t=!0),t},FillContextualization:function(n,t,i){var e=n,r,u,f;if(n=$PI(n.id),(n==null||typeof n=="undefined")&&(n=e),n.HasProperty(TooltipProperties.Const.PROPERTY_TEMPLATED_CONTROLS)||DynamicTemplatesMgr.ListContextualizedControls(n),r=n.GetProperty(TooltipProperties.Const.PROPERTY_TEMPLATED_CONTROLS),r!=null&&t!=null){for(u=0;u<r.length;u++)f=r[u],DynamicTemplatesMgr.FillControlContextualization(r[u],t)&&(i=!0,f.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyXList(f),PositionMgr.GetInstance().AddToDirtyYList(f));t.hasOwnProperty(TooltipProperties.Const.KEY_TOOLTIP_IMAGE_CONTROL_SIZE)&&(i=DynamicTemplatesMgr.SetContextualizedSize(n,t)||i);i&&PositionMgr.GetInstance().CalculatePosition()}},SetContextualizedSize:function(n,t){var u=!1,r=t[TooltipProperties.Const.KEY_TOOLTIP_IMAGE_CONTROL_SIZE].split(":");if(r.length==3){var o=r[0],f=parseInt(r[1]),e=parseInt(r[2]),i;i=t.hasOwnProperty(TooltipProperties.Const.PROPERTY_TEMP_IMG)?$PI(t[TooltipProperties.Const.PROPERTY_TEMP_IMG]):$PI(n.GetBrotherId(o));i!=null&&(i.miWidth!=f||i.miHeight!=e)&&(i.miWidth=f,i.miHeight=e,PositionMgr.GetInstance().AddToDirtyXList(i),PositionMgr.GetInstance().AddToDirtyYList(i),i.ForceHasChanged(),u=!0)}return u},FillControlContextualization:function(n,t){var o=!1,u,s,f,r,i,e;if(n.HasProperty("src"+TooltipProperties.Const.ORGINIAL_SUFFIX)&&(u=n.moLinkedImage.attributes.getNamedItem("src"),u!=null&&(s=DynamicTemplatesMgr.ReplaceMetaText(n.GetProperty("src"+TooltipProperties.Const.ORGINIAL_SUFFIX),t),u.value!=s&&(u.value=s,n.moLinkedImage.style.visibility="hidden",Utils.AddEvent(n.moLinkedImage,"load",function(){n.moLinkedImage.style.visibility="visible"},this)),o=n.miOriginalWidth==-1||n.miOriginalHeight==-1)),f=n.GetProperty("TemplatedTextNodes"),f!=null)for(r=0;r<f.length;r++)i=f[r],i.innerHTML=DynamicTemplatesMgr.ReplaceMetaText(i.msBaseValue,t),o=n.miOriginalWidth==-1||n.miOriginalHeight==-1;if(e=n.GetProperty("TemplatedLinkNodes"),e!=null)for(r=0;r<e.length;r++)i=e[r],i.msBaseLink&&(i.attributes.href.value=DynamicTemplatesMgr.ReplaceMetaText(i.msBaseLink,t)),i.msBaseEvent&&(i.attributes.onclick.value=DynamicTemplatesMgr.ReplaceMetaText(i.msBaseEvent,t));return o},ReplaceMetaText:function(n,t){var r=[],u,f,i,e,o;if(n!=null&&n!="")for(u=n.split(TooltipProperties.Const.LEFTMARKUP),r.push(u[0]),f=0;f<u.length;f++)i=u[f],i.indexOf(TooltipProperties.Const.RIGHTMARKUP)!=-1&&(e=i.indexOf(TooltipProperties.Const.RIGHTMARKUP),o=i.substring(0,e),t.hasOwnProperty(o)&&r.push(t[o]),r.push(i.substr(e+1)));return r.join("")}};EditableTable.mbDisableFreeze=!1;EditableTable.mbDisableUnFreeze=!1;EditableTable.moAllTables={};EditableTable.moOverviewSidePanelAvailableOnDamViewState={};EditableTable.prototype={ActiveEditableTable:function(n,t,i,r,u,f){var e,s,o;EditableTable.moAllTables[this.msID]=this;e=this;this.moTable=$E(this.msID);this.moHeader=$(this.moTable.find(">.PanelLine:not(.DVTableLine)")[0]);this.moHeaderColumns=this.moHeader.find(">.PanelCol");this.moTableHolder=this.moTable.parent();this.msVFormID=Utils.GetVFormId(this.msID);this.mbIsMac=navigator.userAgent.toLowerCase().indexOf("mac")!==-1;this.moCachedInScrollablePart={};this.moCachedInNotScrollablePart={};this.mbSelectingMode=!1;this.moFocusedCell=null;this.moLastSelected=null;this.moBufferedEntry={};this.moSelectedCells=[];this.mbEditing=!1;this.mbDeepEditing=!1;this.miZIndex=StackMgr.GetInstance().GetIndex();this.msAPICallOnFreezeIndexChanged=i;this.mbLastCellHoverExceededTableHeight=!1;this.mbHasFrozenColumns=!1;this.miFreezeToColumn=0;this.mbBypassReFreeze=!1;this.moTempScrollDivForFreezingColumns=null;this.moOriginalTableStyle={};this.moOriginalTableHolderStyle={};this.mfOnClickRef=$.proxy(this.OnClick,this);this.mfOnDBClickRef=$.proxy(this.OnDblClick,this);this.mfOnKeyDownRef=$.proxy(this.OnKeyDown,this);this.mfOnMouseUpRef=$.proxy(this.OnMouseUp,this);this.mfOnMouseOverRef=$.proxy(this.OnMouseOver,this);this.mfOnMouseMoveRef=$.proxy(this.OnMouseMove,this);this.mfOnPasteRef=$.proxy(this.OnPasteFromClipBoard,this);this.mfOnSuccessEditRef=$.proxy(this.OnSuccessEdit,this);this.mfOnContextMenuRef=$.proxy(this.OnContextMenu,this);this.mfOnPositioningRef=$.proxy(this.RefreshLastFocusedCell,this);$(document.body).on("mousedown."+this.msID,this.mfOnClickRef);$(document.body).on("contextmenu."+this.msID,this.mfOnContextMenuRef);$(document.body).on("dblclick."+this.msID,this.mfOnDBClickRef);$(document.body).on("keydown."+this.msID,this.mfOnKeyDownRef);$(document.body).on("mouseup."+this.msID,this.mfOnMouseUpRef);$(document.body).on("mouseover."+this.msID,this.mfOnMouseOverRef);$(document.body).on("mousemove."+this.msID,this.mfOnMouseMoveRef);$(document.body).on("paste."+this.msID,this.mfOnPasteRef);$(document).on("PositioningCompleted."+this.msID,this.mfOnPositioningRef);this.moTable.on("mouseover",".DVTableLine",this.OnMouseEnterRow);this.moTable.on("mouseleave",".DVTableLine",this.OnMouseLeaveRow);if(this.moReorderPanels=this.moTable.find(".Panel[id$='ReorderPnl']"),this.mbCanBeReorder=this.moReorderPanels.length>0||this.moTable.find(".PanelCol[id$='ReorderCol']").length>0,this.mbExpandable=!!u,this.mbLookupMode=!!f,this.miExpandableMinFreezeIndex=2,this.mbCanFreeze=n,this.mbLookupMode&&(this.moTable.find(".CT.TextBox input, .CT.TextBox textarea, .CT.AutoComp input").css("pointer-events","none"),this.moTable.find(".PanelCol:not(.HeaderCol)").each(function(){$(this).children(".BG").length===0&&$(this).prepend('<div class="BG"><\/div>')})),s=$Elt(this.msID)?.querySelectorAll(".SpaceLookup .PanelCol:not(.OnlyAction)"),s?.length>0&&$(s).addClass("DatagridCellTextFullContentOnHover"),this.mbCanFreeze)if(this.moFreezeThumb=$("<div class='FreezeThumb'><\/div>"),r&&typeof r=="string"&&r.length!==0||(r="Drag and drop this indicator to freeze/unfreeze columns. Frozen columns stick to the left when scrolling."),this.moFreezeThumb.attr("title",r),this.moFreezeThumb.tipsy&&typeof this.moFreezeThumb.tipsy=="function"&&this.moFreezeThumb.tipsy({gravity:"s"}),this.moDraggingFreezeThumb=$("<div class='FreezeThumb'><\/div>
216"),this.moAtCursorDraggingFreezeThumb=$("<div class='StickToCursorFreezeThumb'><\/div>"),Utils.AddEvent(this.moFreezeThumb[0],"mousedown",this.StartDraggingFreezeThumb,this),this.moNoFreezeThumbContainer=$("<div class='NoFreezeThumbContainer'><\/div>"),o=this.mbCanBeReorder?1:0,$(this.moHeader.find(">.PanelCol")[o]).append(this.moNoFreezeThumbContainer),t&&Utils.IsNumber(t)&&t>0){var h=this.moHeader.find(">.PanelCol").slice(o),c=$(h[t-1]).offset().left,l=c+$(h[t-1]).width(),a=this.moTableHolder.offset().left+this.moTableHolder.width()-this.moTableHolder.scrollLeft();l<=a?($(this.moHeader.find(">.PanelCol")[t+o-1]).append(this.moFreezeThumb),this.FreezeColumns(t,!1,!0)):this.mbExpandable?this.FreezeColumns(this.miExpandableMinFreezeIndex,!1,!0):this.moNoFreezeThumbContainer.append(this.moFreezeThumb)}else this.mbExpandable?this.FreezeColumns(this.miExpandableMinFreezeIndex,!1,!0):this.moNoFreezeThumbContainer.append(this.moFreezeThumb);else this.moFreezeThumb=$(null),this.moDraggingFreezeThumb=$(null),this.moAtCursorDraggingFreezeThumb=$(null),this.moNoFreezeThumbContainer=$(null);this.UpdatePositionAfterExpand();Matrix3.RegisterForCleanup(this.msID,"EditableTable",function(){delete EditableTable.moAllTables[e.msID];try{$(document.body).off("contextmenu."+e.msID,e.mfOnContextMenuRef);$(document.body).off("dblclick."+e.msID,e.mfOnDBClickRef);$(document.body).off("keydown."+e.msID,e.mfOnKeyDownRef);$(document.body).off("mousedown."+e.msID,e.mfOnClickRef);$(document.body).off("mouseup."+e.msID,e.mfOnMouseUpRef);$(document.body).off("mouseover."+e.msID,e.mfOnMouseOverRef);$(document.body).off("mousemove."+e.msID,e.mfOnMouseMoveRef);$(document.body).off("paste."+e.msID,e.mfOnPasteRef);$(document).off("PositioningCompleted."+e.msID,e.mfOnPositioningRef);e.moTable.off("mouseover",".DVTableLine",e.OnMouseEnterRow);e.moTable.off("mouseleave",".DVTableLine",e.OnMouseLeaveRow);Utils.DetachEvent(e.moFreezeThumb[0],"mousedown",e.StartDraggingFreezeThumb);e.moFirstColLinkObserver&&(e.moFirstColLinkObserver.disconnect(),e.moFirstColLinkObserver=null)}catch(n){}});this.mbLoseMouseFocus=!1;this.moLevelDict={};this.mbLookupMode&&this.SetupFirstColLinks()},SetupFirstColLinks:function(){var u=this,n=this.moTable[0],t,r,i;n&&(t=!1,n.querySelectorAll(".DVTableLine").forEach(function(n){EditableTable.WireFirstColLinkForRow(n)&&(t=!0)}),r=n.querySelectorAll(".DVTableLine"),r.length>0&&!t&&console.debug("[FirstColLink] Table "+this.msID+": rows present but no primary action found on any row."),i=new MutationObserver(function(n){n.forEach(function(n){n.addedNodes.forEach(function(n){if(n.nodeType===1){var t=n.closest?n.closest(".DVTableLine"):null;t&&t!==n&&(t.dataset.firstColWired!=="1"||t.querySelector(".FirstColLink")||delete t.dataset.firstColWired,EditableTable.WireFirstColLinkForRow(t));n.classList&&n.classList.contains("DVTableLine")?EditableTable.WireFirstColLinkForRow(n):n.querySelectorAll&&n.querySelectorAll(".DVTableLine").forEach(function(n){EditableTable.WireFirstColLinkForRow(n)})}})})}),i.observe(n,{childList:!0,subtree:!0}),this.moFirstColLinkObserver=i)},UpdatePositionAfterExpand:function(){var n=this.moTable.find(">.PanelLine").toArray();this.moLevelDict||(this.moLevelDict={});const{elementList:t,levelDict:i}=EditableTable.SortLinesAfterExpand(n,this.moLevelDict);if($(t).appendTo(this.moTable),this.moLevelDict={...this.moLevelDict,...i},this.moTableHolder&&this.moTableHolder[0]){for(let n of this.moTable.find(".PanelLine"))n.style.position=="static"&&(n.style.position=""),PositionMgr.GetInstance().AddToDirtyYList(n);PositionMgr.GetInstance().AddToDirtyXList(this.moTableHolder[0]);PositionMgr.GetInstance().AddToDirtyYList(this.moTableHolder[0]);this.moTableHolder[0].ExtractDependences()}DynamicChildrenVisibilityMgr.GetInstance().RefreshPanels();DynamicChildrenVisibilityMgr.mbBypassRefresh=!0;try{PositionMgr.GetInstance().CalculatePosition()}finally{DynamicChildrenVisibilityMgr.mbBypassRefresh=!1;DynamicChildrenVisibilityMgr.GetInstance().ForceExecutePanels()}},RefineFreezeAfterResize:function(){if(this.HasFrozenColumns()){var n=this.CanBeReorder()?1:0,t=this.moHeaderColumns.slice(0,this.miFreezeToColumn+n),i=t.get().reduce(function(n,t){n+t.GetWidth()},0),r=this.moTableHolder[0].GetWidth();i>r&&(this.mbExpandable?this.FreezeColumns(this.miExpandableMinFreezeIndex,!1,
216!0):(this.moNoFreezeThumbContainer.append(this.moFreezeThumb),this.UnFreezeColumns()))}},CanBeReorder:function(){return this.mbCanBeReorder},StartDraggingFreezeThumb:function(n){var s,h,f,o;if(this.mbCanFreeze){n.preventDefault();this.msAPICallOnFreezeIndexChanged&&this.msAPICallOnFreezeIndexChanged!=""&&(h=this,s=Utils.debounce(function(n){$.ajax({url:h.msAPICallOnFreezeIndexChanged.replace("[FREEZE_INDEX]",n)})},500));DynamicChildrenVisibilityMgr.GetInstance().ForceExecutePanels();this.moFreezeThumb.addClass("LightFreezeThumb");f=$(null);this.miFreezeToColumn&&this.miFreezeToColumn>0&&(f=this.moTable.find(".FrozenLine").find(".PanelCol:nth-child("+this.miFreezeToColumn+")"),f.addClass("LightLastFrozenCell"));var e=this.mbCanBeReorder?1:0,i=-1,r=$(null),t=this,u=function(n){var o=n.pageX,l=n.pageY,u=-1,s=-1,h=-1,f=t.moHeader.find(">.PanelCol, >div>.PanelCol").slice(e),c,a,v;f.each(function(n){var i=$(this),t=i.offset(),r=i.width(),e=i.height(),c=t.left<=o&&o<=t.left+r&&t.top<=l&&l<=t.top+e,f=n+1;return o<t.left+r/2&&f--,c&&u<0?(s=n,h=o-t.left,u=f,!1):void 0});t.mbExpandable&&u<2&&(u=t.miExpandableMinFreezeIndex);i!==u&&(u>0?t.mbHasFrozenColumns&&t.miFreezeToColumn>u?(i=u,t.moDraggingFreezeThumb.detach(),$(f[u-1]).append(t.moDraggingFreezeThumb),r.removeClass("TempLastFrozenCell"),r=t.moTable.find(".FrozenLine").find(".PanelCol:nth-child("+(u+e)+")"),r.addClass("TempLastFrozenCell")):(c=$(f[u-1]).offset().left,a=t.mbHasFrozenColumns?c+$(f[u-1]).width()-t.moTable.offset().left+$(f[t.miFreezeToColumn-1]).offset().left+$(f[t.miFreezeToColumn-1]).width():c+$(f[u-1]).width(),v=t.moTableHolder.offset().left+t.moTableHolder.width()-t.moTableHolder.scrollLeft(),a<v&&(i=u,t.moDraggingFreezeThumb.detach(),$(f[u-1]).append(t.moDraggingFreezeThumb),r.removeClass("TempLastFrozenCell"),r=t.moTable.find(".FrozenLine").find(".PanelCol:nth-child("+(u+e)+")"),r.addClass("TempLastFrozenCell"))):u===0&&(i=u,t.moDraggingFreezeThumb.detach(),t.moNoFreezeThumbContainer.append(t.moDraggingFreezeThumb),r.removeClass("TempLastFrozenCell"),r=$(null)));s>=0&&h>=0&&(f[s].contains(t.moAtCursorDraggingFreezeThumb[0])||(t.moAtCursorDraggingFreezeThumb.detach(),$(f[s]).append(t.moAtCursorDraggingFreezeThumb)),t.moAtCursorDraggingFreezeThumb.css("left",h))};return $(document).mousemove(u),o=function(n){$(document).unbind("mouseup",o);o=null;u&&u(n);$(document).unbind("mousemove",u);u=null;setTimeout(function(){if(t.moDraggingFreezeThumb.detach(),t.moAtCursorDraggingFreezeThumb.detach(),r.removeClass("TempLastFrozenCell"),t.moFreezeThumb.removeClass("LightFreezeThumb"),f.removeClass("LightLastFrozenCell"),(!t.mbHasFrozenColumns||i!==t.miFreezeToColumn)&&i>=0){t.moFreezeThumb.detach();var n=t.moHeader.find(">.PanelCol, >div>.PanelCol");i>0?$(n[i+e-1]).append(t.moFreezeThumb):t.moNoFreezeThumbContainer.append(t.moFreezeThumb);t.UnFreezeColumns();i>0&&t.FreezeColumns(i);s&&s(i);PreloadMgr.Reset()}},0)},$(document).mouseup(o),!1}},SetSelectionGroupKey:function(n){this.SelectionGroupKey=n},OnClick:function(n){var t,u,i,r;if(n.which==1)if(this.IsEventInTable(n)&&!this.ShouldIgnoreEvent(n)){if(t=this.GetEventCell(n),u=!1,!t&&this.GetEventCell(n,".ABS."+MultipleSelectionMgr.Const.REORDER_PNL_CLASS)&&(u=!0),n.shiftKey||n.ctrlKey||!(!t||t.id.indexOf("SelectCol")<0&&t.parentElement.querySelector(':scope > [id$="SelectCol"]')==null)||u||MultipleSelectionMgr.GetInstance().DeselectGroup(this.SelectionGroupKey,null),n.shiftKey)this.mbSelectingMode=!0,this.OnMouseOver(n);else if(this.moTable.find(".SelectedCell").removeClass("SelectedCell"),this.IsEventInFocusedCell(n)||this.ShouldIgnoreEvent(n)||(this.SaveAll(!1),this.FocusCell(t)),t&&t.id.indexOf("SelectCol")<0&&(this.mbSelectingMode=!0,this.moSelectedCells=[]),i=$(this.moTable).find(".Warning"),i&&i.length>0)for(r=0;r<i.length;r++)$(i[r]).removeClass("Warning"),$(i[r]).find(".VF").removeClass("Warning"),$(i[r]).find("[id$='Warning']").hide()}else{var f=EditableTable.GetEventTargetID(n.target),o=this.moTable.find(".PanelLine").toArray().some(function(n){return Utils.StartsWith(f,n.GetId())}),s=Object.values(EditableTable.GetAllTables()).some(function(n){return Utils.StartsWith(f,n.msVFormID)&&n!==this},this),e=this.ShouldIgnoreEvent(n);s||this.IsEventInTable(n)||e||o||(this.SaveAll(!1),this.BlurFocusedCell());e||(this.mbLoseMouseFocus=!0)}},OnContextMenu:function(n){var t,i,u,r;
216if(this.IsEventInTable(n)&&!this.ShouldIgnoreEvent(n)){if($(n.target).closest(".SpaceLookup").length>0)return;t=this.GetEventCell(n);t&&!$(t).hasClass("DR")&&(i=this.GetCellLine(t),i&&(n.preventDefault(),n.stopImmediatePropagation(),u=this,r=Matrix3.Const.COMMAND_MULTIPLE_SELECT_VS,(this.SelectionGroupKey===null||this.SelectionGroupKey===undefined)&&(r=null),Matrix3.AddEvent(i.get(0).id,"OPEN_CONTEXT_MENU",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",r,this.SelectionGroupKey,null,null,null,null,null,null,null,null,null,null,!1,function(){var i,n;u.OnSuccessEdit();i=$(t).closest(".PanelLine");i.addClass("hover");n=function(t){(t.type!=="keydown"||t.key==="Escape"||t.key==="Esc")&&(i.removeClass("hover"),document.removeEventListener("mousedown",n,!0),document.removeEventListener("keydown",n,!0))};document.addEventListener("mousedown",n,!0);document.addEventListener("keydown",n,!0)})))}},OnDblClick:function(n){var t=this.moFocusedCell&&this.IsEventInFocusedCell(n)&&this.mbEditing;!this.IsEventInTable(n)||t||this.ShouldIgnoreEvent(n)||(this.SaveAll(!0),this.EditCell(this.moFocusedCell,!0,!0),n.preventDefault(),n.stopImmediatePropagation())},OnKeyDown:function(n,t){var u=!1,ut=this.moTableHolder[0],g=n.target===ut||n.target.id.length>0&&$('[id="'+n.target.id+'"]',this.moTableHolder).length>0||n.target.contains&&n.target.contains(ut),ft,r,w,nt,i,tt,ot,f,h,c,e,s,st,l,a,d,v,y,o,k,p,it,rt,ht;if(n.keyCode=="9"||n.target===$(document.body)[0]||!(n.target.id.length>0)||g){if($(this.moFocusedCell).length>0)if(ft=$("[id$='CompexFieldEditPnl']"),n.keyCode=="9"&&ft.length!==0||Utils.IsInTopLevelPopup(this.msVFormID)||g){if(n.keyCode=="9"&&$(".CompexFieldEditPnl-STH").length>0&&!t)return}else return;else if(!Utils.IsInTopLevelPopup(this.msVFormID)&&!g)return;if(r=this.moTable.parent(),n.keyCode=="38")this.mbDeepEditing||(i=this.OnArrow(n,this.GetCellAbove),u=!0,w=i.localToGlobal(new Point(0,0)).y-$(window).scrollTop()-$("#Form1").scrollTop(),w<(r.offset().top>100?r.offset().top:100)&&$Elt(i).ScrollToMe(!1,!1,!0,-100));else if(n.keyCode=="40")this.mbDeepEditing||(i=this.OnArrow(n,this.GetCellBelow),u=!0,w=i.localToGlobal(new Point(0,0)).y-$(window).scrollTop()-$("#Form1").scrollTop(),(i!=this.GetCellBelow(i)||w+2*$(i).height()>Utils.GetViewportHeight())&&w+2*$(i).height()>r.offset().top+r.height()&&(nt=$Elt(i.id),nt.ScrollToMe(!1,!1,!0,nt.GetHeight(),!0)));else if(n.keyCode=="37")this.mbDeepEditing||(i=this.OnArrow(n,this.GetCellOnLeft),i&&(u=!0,$(i).offset().left<(r.offset().left>0?r.offset().left:0)&&($(this.moTable).parent()[0].scrollLeft+=$(i).offset().left-r.offset().left-5)));else if(n.keyCode=="39")this.mbDeepEditing||(i=this.OnArrow(n,this.GetCellOnRight),i&&(u=!0,$(i).offset().left+$(i).width()>r.offset().left+r.width()&&($(this.moTable).parent()[0].scrollLeft+=$(i).offset().left+$(i).width()-(r.offset().left+r.width())+5)));else if(n.keyCode=="9")this.moFocusedCell&&!this.ShouldIgnoreEvent(n)&&(n.shiftKey?(this.SaveAll(),this.FocusCell(this.GetCellOnLeft(this.moFocusedCell)),u=!0,$(this.moFocusedCell).offset().left<(r.offset().left>0?r.offset().left:0)&&($(this.moTable).parent()[0].scrollLeft+=$(this.moFocusedCell).offset().left-r.offset().left-5)):(this.SaveAll(),this.FocusCell(this.GetCellOnRight(this.moFocusedCell)),u=!0,$(this.moFocusedCell).offset().left+$(this.moFocusedCell).width()>r.offset().left+r.width()&&($(this.moTable).parent()[0].scrollLeft+=$(this.moFocusedCell).offset().left+$(this.moFocusedCell).width()-(r.offset().left+r.width())+5)));else if(n.keyCode=="27"){if(this.mbEditing&&this.moFocusedCell)e=this.mbLookupMode?$(this.moFocusedCell).closest(".PanelLine").get(0):$(this.moFocusedCell).children(".VF").get(0),this.moLastEditedCells=$(this.moFocusedCell),Matrix3.AddEvent(e.id,"CANCEL",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!1,this.OnSuccessEdit.bind(this)),this.mbEditing=!1,this.mbDeepEditing=!1;else if(this.moTable&&(f=this.mbLookupMode?this.moTable.closest(".PanelLine.Warning"):this.moTable.find(".VF.Warning"),f&&f.length>0))for(h=0;h<f.length;h++)e=f[h],$(f).removeClass("Warning"),c=Matrix3.Const.DELAY_BUFFERED,h==f.length-1&&(c=Matrix3.Const.DELAY_IMMEDIAT),this.moLastEditedCells=f.closest(".PanelCol"),Matrix3.AddEvent(e.id,"CANCEL",Matr
216ix3.Const.RETURNTYPE_FULL,c,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,this.OnSuccessEdit.bind(this)),this.mbEditing=!1,this.mbDeepEditing=!1}else if(n.keyCode=="46"||n.keyCode=="8")this.OnDelete(n);else if(n.keyCode===13||n.keyCode===10)if(this.moFocusedCell&&(s=$("audio",$(this.moFocusedCell))),s&&s.length>0){try{l=$('[data-vf^="AudioPlayer_"]',$(this.moFocusedCell));a=!1;l.length>0&&typeof CortexAudioPlayersWatcher!="undefined"&&(d=l.attr("id"),v=CortexAudioPlayersWatcher.moAudioPlayers.filter(function(n){return n.msVFormID===d}),v.length>0&&(v[0].moAudioPlayer.TogglePlayerState(),a=!0));a||(s[0].paused?(y=$("audio").filter(function(n,t){return!t.paused}),y.length>0&&y[0].pause(),s[0].play()):s[0].pause())}catch(yt){}u=!0}else{var et=$(document.activeElement),ct=et.is(".CT.TextArea textarea"),lt=ct&&(n.ctrlKey||n.metaKey||n.altKey),at=function(){var n=et[0],r=n.value,i,t;typeof n.selectionStart=="number"&&typeof n.selectionEnd=="number"?(i=n.selectionStart,n.value=r.slice(0,i)+"\n"+r.slice(n.selectionEnd),n.selectionStart=n.selectionEnd=i+1):document.selection&&document.selection.createRange&&(n.focus(),t=document.selection.createRange(),t.text="\r\n",t.collapse(!1),t.select());u=!0};this.moFocusedCell&&(tt=$(this.moFocusedCell).children(".VF").get(0)||$(this.moFocusedCell).closest(".PanelLine").get(0),ot=tt&&Matrix3.HasPendingEventOnSelf(tt.GetId()),this.mbEditing?$(".CompexFieldEditPnl-STH").length===0&&(lt?at():ot||(this.SaveAll(),this.FocusCell(this.GetCellBelow(this.moFocusedCell))),u=!0):(this.SaveAll(),this.EditCell(this.moFocusedCell,!0),u=!0))}else if(!n.shiftKey&&n.keyCode=="67"&&(n.ctrlKey&&!this.mbIsMac||this.mbIsMac&&n.metaKey))u=this.OnCopy(n);else if(!n.shiftKey&&n.keyCode=="88"&&(n.ctrlKey||this.mbIsMac&&n.metaKey))u=this.OnCopy(n),this.OnDelete(n);else if(n.ctrlKey&&n.keyCode=="89"||(n.ctrlKey||this.mbIsMac&&n.metaKey)&&n.shiftKey&&n.keyCode=="90")this.moTable&&(e=this.moTable.parents(".VF").get(0),e&&(this.moLastEditedCells=$(null),Matrix3.AddEvent(e.id,"REDO",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,this.OnSuccessEdit.bind(this))),u=!0);else if((n.ctrlKey||this.mbIsMac&&n.metaKey)&&n.keyCode=="90"){if(this.moTable){if(f=this.mbLookupMode?this.moTable.closest(".PanelLine.Warning"):this.moTable.find(".VF.Warning"),f&&f.length>0)for(h=0;h<f.length;h++)e=f[h],$(f).removeClass("Warning"),c=Matrix3.Const.DELAY_BUFFERED,h==f.length-1&&(c=Matrix3.Const.DELAY_IMMEDIAT),this.moLastEditedCells=f.closest(".PanelCol"),Matrix3.AddEvent(e.id,"CANCEL",Matrix3.Const.RETURNTYPE_FULL,c,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,this.OnSuccessEdit.bind(this)),this.mbEditing=!1,this.mbDeepEditing=!1;else e=this.moTable.parents(".VF").get(0),e&&(this.moLastEditedCells=$(null),Matrix3.AddEvent(e.id,"UNDO",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,this.OnSuccessEdit.bind(this)));u=!0}}else if(!(n.ctrlKey||this.mbIsMac&&n.metaKey)&&!n.altKey&&(!n.shiftKey||n.keyCode!="16")&&!n.metaKey&&(n.keyCode>=48&&n.keyCode<=90||n.keyCode>=96&&n.keyCode<=111||n.keyCode>=160&&n.keyCode<=165||n.keyCode>=170&&n.keyCode<=171||n.keyCode>=188&&n.keyCode<=192||n.keyCode==32))if(n.keyCode!=32||this.mbEditing||this.mbDeepEditing||!this.moFocusedCell||(s=$("audio",$(this.moFocusedCell).parent())),s&&s.length>0){st=$(this.moFocusedCell).parent();try{l=$('[data-vf^="AudioPlayer_"]',st);a=!1;l.length>0&&typeof CortexAudioPlayersWatcher!="undefined"&&(d=l.attr("id"),v=CortexAudioPlayersWatcher.moAudioPlayers.filter(function(n){return n.msVFormID===d}),v.length>0&&(v[0].moAudioPlayer.TogglePlayerState(),a=!0));a||(s[0].paused?(y=$("audio").filter(function(n,t){return!t.paused}),y.length>0&&y[0].pause(),s[0].play()):s[0].pause())}catch(yt){}u=!0}else if(this.moFocusedCell&&!$(this.moFocusedCell).hasClass("RO")&&!$(this.moFocusedCell).hasClass("NA")){var e=$(this.moFocusedCell).children(".VF").get(0)||$(this.moFocusedCell).closest(".PanelLine").get(0),b=e.id,vt=this.mbLookupMode?$(this.moFocusedCell).closest(".PanelLine.Editing"):$(this.moFocusedCell).find(".VF.Editing");(!this.mbEditing||!vt||this.moBufferedEntry.hasOwnProperty(b)&&this.moBufferedEntry[b].length>0)&&(o=this.moBufferedEntry.hasOwnProperty(b)?this.moBufferedEntry[b]:"",k=n.keyCode||n.which,k>=96&&k<=105&&(k-=48),p=String.fromCharCode(k),n.shiftKey||(p=p.toLowerCase()),p=="\b"&&o.length>0?o=o.substr(0,o.length-1):(it=/^[A-Za-z0-9 !@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]$/,it.test(p)?o=o+p:it.test(n.key)&&(o=o+n.key)),this.moBufferedEntry[b]=o,rt=$(this.moFocusedCell).find(".CT.Label .Lbl").get(0),rt?$(rt).text(o):(ht=$(this.moFocusedCell).find(".Label._FL").get(0),$(ht).append('<div class="Lbl" id="'+this.moFocusedCell.id+':Value_Lbl">'+o+"<\/div>")),!this.mbEditing&&o.length>0&&this.EditCell(this.moFocusedCell,!1),u=!0)}u&&(n.preventDefault(),n.stopImmediatePropagation())}},OnDelete:function(){var f=!0,n,t,i,s,r,h,u;if(this.moFocusedCell&&!this.mbEditing)if(n=this.moSelectedCells,n&&n.length!=0||(n[0]=[],n[0].push(this.moFocusedCell)),n.length==1&&n[0].length==1&&($(n[0]).hasClass("RO")||$(n[0]).hasClass("NP")||$(n[0]).hasClass("ND")))$(n[0]).hasClass("RO")?Matr
216ix3.ShowNotification("Cannot Edit Read-Only Field",{notificationType:"warning"}):Matrix3.ShowNotification("Field does not support delete/remove",{notificationType:"warning"}),f=!1;else for(t=0;t<n.length;t++)if(n[t]){var e=[],c=$(n[t][0]).closest(".CT.PanelLine"),o=Matrix3.Const.DELAY_BUFFERED;for(t==n.length-1&&(o=Matrix3.Const.DELAY_IMMEDIAT),i=0;i<n[t].length;i++)s=$(n[t][i]).children(".VF").get(0)||$(n[t][i]).closest(".PanelLine").get(0),e.push(s.id),r=$(n[t][i]).find(".Label .Lbl").get(0),r?$(r).text(""):(h=$(n[t][i]).find(".Label._FL").get(0),$(h).append('<div class="Lbl" id="'+n[t][i].id+':Value_Lbl"><\/div>'));u=e.join(",");u&&(this.moLastEditedCells=$(n[t]).closest(".PanelCol"),Matrix3.AddEvent(c.get(0).id,"DELETE_CELL",Matrix3.Const.RETURNTYPE_FULL,o,u,null,null,null,null,null,null,null,null,null,null,null,null,!0,this.OnSuccessEdit.bind(this)))}return f},OnCopy:function(n){var h,c,f,e,s;if(this.mbLoseMouseFocus)h=!1;else if((this.moFocusedCell!=this.GetEventCell(n)||!this.mbEditing)&&(Utils.IsInTopLevelPopup(EditableTable.GetEventTargetID(n.target))||n.target===$(document.body)[0])&&Utils.IsInTopLevelPopup(this.msVFormID)&&this.moFocusedCell){var u=document.createElement("textarea"),r="",i=this.moSelectedCells;if((!i||i.length==0)&&this.moFocusedCell&&this.moFocusedCell.id.indexOf("SelectCol")<0&&(i[0]=[],i[0].push(this.moFocusedCell)),c="Copied to clipboard",i&&i.length>0){for(f=0;f<i.length;f++)if(i[f]){for(e="",s=0;s<i[f].length;s++){var t="",o=i[f][s],l=$(o).find("[id$='AuthorityField'][type='text']");l.length>0?(t=l.val(),t||(t=" ")):(t=o.getAttribute("data-rv"),t||(t=$(o).find(">[data-rv]").attr("data-rv")),t||(t=o.innerText),t||(t=$(o).find("input[type='text']").first().val()||""));t=this.NormalizeCSVString(t);e=e+t+"\t"}r=r.concat(e.substring(0,e.length-1),"\n")}}else r=this.GetSelectedRows(),c="Copied selected rows";r.endsWith("\n")&&(r=r.substring(0,r.length-1));u.value=r;u.setAttribute("readonly","");u.style={position:"absolute",left:"-9999px"};document.body.appendChild(u);u.select();document.execCommand("copy");document.body.removeChild(u);Matrix3.ShowNotification(c,{notificationType:"success"});h=!0}return h},OnMouseEnterRow:function(){var c=$(this).closest(".ABS.PanelTable"),t=ControlMgr.GetInstance().GetControl(c[0].id),u,f,n;if(!this.moMenuCell||!this.moMenuCell.isConnected){if(this.moMenuCell=null,u=$(this).find(".DVMenuCell"),u.length>0){this.moMenuCell=u.get(0);f=ControlMgr.GetInstance().GetControl(Utils.GetNodeCortexID(this.moMenuCell),PanelAdvancedCtrl.Const.CONTROL_NAME);t.mbBypassReFreeze=!0;DynamicChildrenVisibilityMgr.mbBypassRefresh=!0;try{f.ActivePositionGroup(null,null,this,!0)}finally{DynamicChildrenVisibilityMgr.mbBypassRefresh=!1;t.mbBypassReFreeze=!1}}this.moMenuCell&&(this.moMenuCell.mbForcedSkipUpdatingStyle=!0)}if($(this.moMenuCell).hasClass("InvisibleC")){n=$(this).closest("div[id$=':2ndFlow']").get(0);n||(n=$(this).closest("div[id$=':2ndFlow0']").get(0));n||(n=$(this).closest("div[id$=':GridPnl']").get(0));var r=this.moMenuCell.GetWidth(),e=$(this.moMenuCell).attr("data-lastcolid"),i=e?$(this).find("div[id$=':"+e+"']").get(0):undefined;if(!i||n.GetWidth()-r<i.offsetLeft+(i.GetWidth()-r)){var o=new Point(n.GetWidth()-r,0),s=this.globalToLocal(n.localToGlobal(o)),h=this.moMenuCell.moParent.offsetBetweenControls(n);this.moMenuCell.x=s.x+h.x}else{var o=new Point(i.offsetLeft+(i.GetWidth()-r),0),s=this.globalToLocal(n.localToGlobal(o)),h=this.moMenuCell.moParent.offsetBetweenControls(n);this.moMenuCell.x=s.x+h.x}t&&t.mbHasFrozenColumns?this.moMenuCell.y=$(this).position().top:(this.moMenuCell.y=0,this.moMenuCell.x-=t.GetScrollLeft());this.moMenuCell.TransferPositioningToDOM();$(this.moMenuCell).css("z-index",t.miZIndex);$(this.moMenuCell).removeClass("InvisibleC")}},OnMouseLeaveRow:function(){$(this.moMenuCell).hasClass("InvisibleC")||$(this.moMenuCell).addClass("InvisibleC");$(this.moMenuCell).css("z-index","")},OnMouseUp:function(){this.mbSelectingMode&&(this.mbSelectingMode=!1,this.moCellsToShowFull&&this.mbDisableShowFull&&(this.moCellsToShowFull.removeClass("DatagridCellTextFullContentOnHover_Disable"),this.moCellsToShowFull.addClass("DatagridCellTextFullContentOnHover"),this.mbDisableShowFull=!1))},OnMouseMove:function(){this.mbSelectingMode&&(this.mbDisableShowFull||(this.moCellsToShowFull=this.moTable.find(".DVTableLine>.PanelCol.DatagridCellTextFullContentOnHover"),this.moCellsToShowFull.removeClass("DatagridCellTextFullContentOnHover"),this.moCellsToShowFull.addClass("DatagridCellTextFullContentOnHover_Disable"),this.mbDisableShowFull=!0))},OnMouseOver:function(n,t){var i,u,r,f,e,s,h,o;if(this.mbSelectingMode&&(this.moSelectedCells&&this.moSelectedCells.length>0&&(Array.isArray(this.moSelectedCells)?$(this.moSelectedCells.flat()).removeClass("SelectedCell"):$(this.moSelectedCells.toArray().flat()).removeClass("SelectedCell"),this.moSelectedCells=[]),t||(t=this.GetEventCell(n)),t&&this.moFocusedCell!=t&&(this.moSelectedCells=$(this.GetCellsBetween(this.moFocusedCell,t)),$(this.moSelectedCells.toArray().flat()).addClass("SelectedCell"),this.moLastSelected=t,n.preventDefault(),n.stopImmediatePropagation())),t||(t=this.GetEventCell(n)),i=!1,t&&(!this.moCurrentHoveredCell||this.moCurrentHoveredCell!==t)){u=t.localToGlobal(new Point(0,0)).y+Math.round($(t).outerHeight());r=this.moTable.find(">.PanelLine").toArray();this.moLevelDict||(this.moLevelDict={});r=EditableTable.SortLinesAfterExpand(r,this.moLevelDict).elementList;f=r[r.length-1];e=f.localToGlobal(new Point(0,0)).y+Math.round($(f).outerHeight());u>e?(s=this.moTable[0].localToGlobal(new Point(0,0)).y,this.moTable[0].OverrideOriginalHeight(u-s+2),this.moTable.parent().css("clip","rect(0px, "+this.moTable.parent().outerWidth()+"px, 999999px, 0px)"),i=!0):this.mbLastCellHoverExceededTableHeight&&(this.moTable[0].OverrideOriginalHeight(-1),i=!0);this.mbLastCellHoverExceededTableHeight=u>e;let n=$("[id$='CompexFieldEditPnl']");(n.length===0||t!==this.moFocusedCell)&&($(t).css("z-index",this.miZIndex),$(this.moCurrentHoveredCell).css("z-index",""),this.moCurrentHoveredCell=t)}else t||($(this.moCurrentHoveredCell).css("z-index",""),this.moCurrentHoveredCell=null,!$.contains(this.moTableHolder[0],n.target)&&this.mbLastCellHoverExceededTableHeight&&(this.moTable[0].OverrideOriginalHeight(-1),i=!0,this.mbLastCellHoverExceededTableHeight=!1));i&&(this.moTable[0].ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyYList(this.moTable[0]),this.mbBypassReFreeze=!0,PositionMgr.GetInstance().CalculatePosition(),this.mbBypassReFreeze=!1,this.mbHasFrozenColumns&&(h=this.moTable.find(".PanelLine")[0].miHeight,this.moTable.css("height",this.moTable[0].miHeight-h)));t&&!t.hasAttribute("data-tags-container")&&(o=function(n){var t=$(this).offset(),i=$(this).closest(".PanelLine").height(),r=t.top;n.pageY-r>i&&(this.style.setProperty("height",this.miHeight+"px","important"),this.style.setProperty("overflow-y","hidden","important"))}.bind(t),t.addEventListener("mousemove",o),t.addEventListener("mouseleave",function(){this.style.setProperty("height",this.miHeight+"px");this.style.removeProperty("overflow-y");this.removeEventListener("mousemove",o)}.bind(t),{once:!0}))},OnDrag:function(n){n.preventDefault();n.stopImmediatePropagation()},OnArrow:function(n,t){this.moTable.find(".SelectedCell").removeClass("SelectedCell");var i=null;return this.SaveAll(),n.shiftKey?(this.mbSelectingMode=!0,this.moLastSelected=t(this.moLastSelected),this.OnMouseOver(n,this.moLastSelected),this.mbSelectingMode=!1,i=this.moLastSelected):n.ctrlKey||this.mbIsMac&&n.metaKey?(this.FocusCell(this.GetNextFilledCell(this.moFocusedCell,t)),i=this.moFocusedCell):(this.FocusCell(t(this.moFocusedCell)),i=this.moFocusedCell,this.moSelectedCells=[]),i},FocusCell:function(n){var t,i;if((this.mbLoseMouseFocus=!1,!$(n).hasClass("NF"))&&this.moFocusedCell!==n){var r=$(this.moFocusedCell).closest(".CT.PanelLine").index(),u=$(n).closest(".CT.PanelLine").index(),f=$(this.moFocusedCell).find(".Panel[id$='SelectPnl']").length>0,e=$(n).find(".Panel[id$='SelectPnl']").length>0,o=(EditableTable.mbRefreshOverviewSidePanel||r!==u||f)&&!e;this.BlurFocusedCell();this.moFocusedCell=n;this.moLastSelected=n;n&&($(n).addClass("FocusedCell"),n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.focus(),n.dispatchEvent(new CustomEvent("cx-cell-focus",{bubbles:!0,detail:{cellElement:n,lineElement:$(n).closest(".CT.PanelLine").get(0)}})),o&&(i=n.closest(".DamView.VF"),i&&(t=$(i).find("[data-vf='DamView_State_VForm']").sort(function(n,t){var i=n.id.split(Matrix3.Const.SEPARATOR_HIERARCHY).length,r=t.id.split(Matrix3.Const.SEPARATOR_HIERARCHY).length;return i-r}).first().attr("id")),t&&EditableTable.moOverviewSidePanelAvailableOnDamViewState[t]&&EditableTable.ViewSidePanel(n)))}},BlurFocusedCell:function(){$(this.moFocusedCell).removeClass("FocusedCell");this.moFocusedCell&&this.moFocusedCell.dispatchEvent(new CustomEvent("cx-cell-blur",{bubbles:!0,detail:{cellElement:this.moFocusedCell,lineElement:$(this.moFocusedCell).closest(".CT.PanelLine").get(0)}}));this.moFocusedCell=null},GetCellOnLeft:function(n){var t=n,i=$(n).prevAll(".ABS.PanelCol");return i.length>0&&(t=i.get(0)),t},GetCellOnRight:function(n){var t=n,i=$(n).next(".ABS.PanelCol");return i.length>0&&(t=i.get(0)),t},GetNextFilledCell:function(n,t){for(var i=n;i!=t(i);)if(i=t(i),i.innerText.length>0)break;return i},GetCellAbove:function(n){var t=n,i=$(n).closest(".CT.PanelLine"),r,u;return i.index()>2&&(r=i.prevAll(".CT.PanelLine"),u=$(n).prevAll(".PanelCol").length,t=r.children(".PanelCol").eq(u).get(0)||t),t},GetCellBelow:function(n){var t=n,u=$(n).closest(".ABS.PanelLine"),i=u.next(".ABS.PanelLine"),r;return i.length>0&&(r=$(n).prevAll(".PanelCol").length,t=i.children(".PanelCol").eq(r).get(0)||t),t},GetCellsBetween:function(n,t){for(var o=[],s=$(n).closest(".ABS.PanelLine").index(),h=$(n).closest(".ABS.PanelCol").index(),f=$(t).closest(".ABS.PanelLine").index(),e=$(t).closest(".ABS.PanelCol").index(),c=Math.max(s,f),l=Math.max(h,e),a=Math.min(s,f),v=Math.min(h,e),r,i,u;$(n).closest(".ABS.PanelLine").index()>a;)n=this.GetCellAbove(n);while($(n).closest(".ABS.PanelCol").index()>v)n=this.GetCellOnLeft(n);while($(t).closest(".ABS.PanelLine").index()<c)t=this.GetCellBelow(t);while($(t).closest(".ABS.PanelCol").index()<l)t=this.GetCellOnRight(t);for(f=$(t).closest(".ABS.PanelLine").index(),e=$(t).closest(".ABS.PanelCol").index(),r=n,i=n;$(r).closest(".ABS.PanelLine").index()<=f;){for(i=r,u=[];$(i).closest(".ABS.PanelCol").index()<=e;)if(i.id.indexOf("SelectCol")<0&&u.push(i),i!=this.GetCellOnRight(i))i=this.GetCellOnRight(i);else break;if(r!=this.GetCellBelow(r))r=this.GetCellBelow(r);else{u.length>0&&o.push(u);break}u.length>0&&o.push(u)}return o},GetSelectedCells:function(n){for(var u=[],i,t,r;$(this.GetCellAbove(n)).hasClass("SelectedCell")&&n!=this.GetCellAbove(n);)n=this.GetCellAbove(n);while($(this.GetCellOnLeft(n)).hasClass("SelectedCell")&&n!=this.GetCellOnLeft(n))n=this.GetCellOnLeft(n);for(i=n,t=n;$(i).hasClass("SelectedCell");){for(t=i,r=[];$(t).hasClass("SelectedCell");)if(r.push(t),t!=this.GetCellOnRight(t))t=this.GetCellOnRight(t);else break;if(u.push(r),i!=this.GetCellBelow(i))i=this.GetCellBelow(i);else break}return u},GetSelectedRows:function(){var u="",e=this.moTable.find(".Selected"),f,r,n,i,t;if(e)for(f=e.toArray(),r=0;r<f.length;r++){for(n=$(f[r]).children().get(1),i="";;)if($(n).closest(".ABS.PanelCol").index()>0&&(t=n.innerText,Utils.IsSafari()&&(t=t.trim()),t=this.NormalizeCSVString(t),i=i+t+"\t"),n!=this.GetCellOnRight(n))n=this.GetCellOnRight(n);else break;u=u.concat(i.substring(0,i.length-1),"\n")}return u},GetAllCellInSelectedRows:function(){var u=[],f=this.moTable.find(".Selected"),r,t,n,i;if(f)for(r=f.toArray(),t=0;t<r.length;t++){for(n=$(r[t]).children().get(1),i=[];;)if($(n).closest(".ABS.PanelCol").index()>0&&n.id.indexOf("SelectCol")<0&&i.push(n),n!=this.GetCellOnRight(n))n=this.GetCellOnRight(n);else break;i.length>0&&u.push(i)}return u},OnPasteFromClipBoard:function(n){var p,w,c,u,b,r,l,s,o,a,e,t,y,h,v,g;if(Utils.IsInTopLevelPopup(this.msVFormID)&&(n.target===$(document.body)[0]||!(n.target.id.length>0)||$('[id="'+n.target.id+'"]',this.moTableHolder).length!==0||n.target===this.moTableHolder[0])&&!this.mbEditing&&this.moFocusedCell&&(p=this.GetAllCellInSelectedRows(),p.length>0&&(this.moSelectedCells=p),n.preventDefault(),n.stopImmediatePropagation(),w=n.originalEvent.clipboardData,w&&(c=w.getData("text/plain"),c&&(Utils.IsSafari()&&(c=c.trim()),u=this.moFocusedCell,$(u).closest(".ABS.PanelCol").index()==0&&(u=this.GetCellOnRight(u)),u)))){var i=this,nt=Papa.parse(c,{delimiter:"\t"}),f=nt.data;if(f)if(f.length==1&&f[0].length==1&&($(u).hasClass("RO")||$(u).hasClass("NP")))$(u).hasClass("RO")?Matr
216ix3.ShowNotification("Cannot Edit Read-Only Field",{notificationType:"warning"}):Matrix3.ShowNotification("Field does not support pasting",{notificationType:"warning"});else{var k=f.length,d=Array.isArray(f)&&Array.isArray(f[0])?f[0].length:0,tt=i.moSelectedCells?i.moSelectedCells.length:0,it=Array.isArray(i.moSelectedCells)&&Array.isArray(i.moSelectedCells[0])?i.moSelectedCells.length:0;if(tt<=k&&it<=d)for(r=0;r<f.length;r++){if(l=$(u).closest(".CT.PanelLine"),f[r]){s=Matrix3.Const.DELAY_BUFFERED;(r==f.length-1||u==i.GetCellBelow(u))&&(s=Matrix3.Const.DELAY_IMMEDIAT);var t=u,o=[],a=[];for(e=0;e<f[r].length;e++)if(a.push(t),$(t).hasClass("Loading")||$(t).hasClass("RO")||$(t).hasClass("NA")||($(t).addClass("Loading"),$(t).addClass("SelectedCell"),h=$(t).find(".Label .Lbl").get(0),h?$(h).text(f[r][e]):(v=$(t).find(".Label._FL").get(0),$(v).append('<div class="Lbl" id="'+t.id+':Value_Lbl">'+f[r][e]+"<\/div>")),b=$(t).children(".VF").get(0)||$(t).closest(".PanelLine").get(0),b&&o.push({id:b.id,text:i.NormalizePasteString(f[r][e])})),t!=i.GetCellOnRight(t))t=i.GetCellOnRight(t);else break;o&&o.length>0&&(i.moLastEditedCells=$(t).closest(".PanelCol"),Matrix3.AddEvent(l.get(0).id,"PASTE",Matrix3.Const.RETURNTYPE_FULL,s,JSON.stringify(o),null,null,null,null,null,null,null,null,null,null,null,null,!0,function(){i.OnSuccessEdit()}))}if(u!=i.GetCellBelow(u))u=i.GetCellBelow(u);else break}else for(r=0;r<i.moSelectedCells.length;r++)if(l=$(i.moSelectedCells[r][0]).closest(".CT.PanelLine"),i.moSelectedCells[r]){for(s=Matrix3.Const.DELAY_BUFFERED,r==i.moSelectedCells.length-1&&(s=Matrix3.Const.DELAY_IMMEDIAT),o=[],a=[],e=0;e<i.moSelectedCells[r].length;e++)t=i.moSelectedCells[r][e],a.push(t),$(t).hasClass("Loading")||$(t).hasClass("RO")||$(t).hasClass("NA")||($(t).addClass("Loading"),$(t).addClass("SelectedCell"),y=f[r%k][e%d],h=$(t).find(".Label .Lbl").get(0),h?$(h).text(y):(v=$(t).find(".Label._FL").get(0),$(v).append('<div class="Lbl" id="a3.1.3.4.821.43:Value_Lbl">'+y+"<\/div>")),g=$(t).children(".VF").get(0)||$(t).closest(".PanelLine").get(0),o.push({id:g.id,text:i.NormalizePasteString(y)}));o&&o.length>0&&(i.moLastEditedCells=$(a).closest(".PanelCol"),Matrix3.AddEvent(l.get(0).id,"PASTE",Matrix3.Const.RETURNTYPE_FULL,s,JSON.stringify(o),null,null,null,null,null,null,null,null,null,null,null,null,!0,function(){i.OnSuccessEdit()}))}}}},GetCellLine:function(n){return $(n).closest(".CT.PanelLine")},GetEventCell:function(n,t){var i=null,u=EditableTable.GetEventTargetID(n.target),r,f;if(t||(t=".ABS.PanelCol"),Utils.StartsWith(u,this.msVFormID)&&(i=$E(u).closest(t).get(0),!i))for(r=Utils.GetVFormId(u),i=$E(r).closest(t).get(0);!i&&r;)r=r.substr(0,r.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY)),i=$E(r).closest(t).get(0);return i&&(f=$(i).closest(".CT.PanelLine"),f.prevAll(".CT.PanelLine").length<1&&(i=null)),i},IsEventInTable:function(n){return this.moTable&&this.moTable[0]&&this.moTable[0].contains(n.target)},IsEventInFocusedCell:function(n){var t,i,r;if(this.moFocusedCell){if(t=$(this.moFocusedCell).children(".VF"),t.length==1)return i=EditableTable.GetEventTargetID(n.target),Utils.StartsWith(i,t.get(0).id);if(r=$(this.moFocusedCell).closest(".PanelLine"),r.length==1)return this.moFocusedCell.contains(n.target)}},EditCell:function(n,t,i){var u=$(n),r=u.children(".VF").get(0),f;this.mbLookupMode&&!r&&(r=u.closest(".PanelLine").get(0));!r||u.hasClass("RO")||u.hasClass("NA")||(u.removeClass("WN"),u.find(".VF").removeClass("Warning"),u.find("[id$='Warning']").remove(),this.moCurrentHoveredCell&&$(this.moCurrentHoveredCell).css("z-index",""),f=function(){var b,k,s,p,d,g,h,e,f,c,w,l,a,v;if(n){var f=r.id,o="",y=this.mbLookupMode?$("[id='"+n.id+"']"):$(n),t=y.find(".CT.TextBox input, .CT.TextArea textarea");t.length===0&&(t=$(".CT.TextBox input[id^='"+r.id+"'], .CT.TextArea textarea[id^='"+r.id+"']"));t.length===0&&(b=$("input, select",$(".InputsDate",y)),b.length>0&&(t=$(b[0])));t.length>0?(this.moBufferedEntry.hasOwnProperty(f)&&(o=this.moBufferedEntry[f],delete this.moBufferedEntry[f]),this.mbLookupMode?(y.find("input, textarea").css("pointer-events",""),setTimeout(function(){var n=t.first().get(0);n.focus();n.setSelectionRange&&n.setSelectionRange(n.value.length,n.value.length)},0)):(p=$(this.moFocusedCell).children(".VF").get(0).id,p==r.id&&t.focu
216s()),k=t.val(),t.val(""),o.length>0&&(k=o),t.val(k),s=y.get(0),s&&s.dispatchEvent(new CustomEvent("cx-cell-edit",{bubbles:!0,detail:{cellElement:s,lineElement:$(s).closest(".CT.PanelLine").get(0)}})),this.mbLookupMode||(p=u.children(".VF").get(0),p.id!=r.id&&(this.moLastEditedCells=$(r).closest(".PanelCol"),d=r,g=this,Matrix3.AddEvent(r.id,"CELL_SAVE",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,function(){g.OnSuccessEdit();var n=$E(d.id).closest(".PanelCol").get(0);n&&n.dispatchEvent(new CustomEvent("cx-cell-saved",{bubbles:!0,detail:{cellElement:n,lineElement:$(n).closest(".CT.PanelLine").get(0)}}))})))):(h=$(u).find(".CT.AutoComp"),h.length!=0||this.mbLookupMode||(h=$(".CT.AutoComp[data-pid^='"+r.id+"']")),h.length>0&&PostRenderMgr.GetInstance().ExecuteAsap(function(){var e=Utils.GetNodeCortexID(h.get(0)),t,u,n;f=r.id;this.moBufferedEntry.hasOwnProperty(f)&&(o=this.moBufferedEntry[f],delete this.moBufferedEntry[f]);t=$('div[id^="'+r.id+'"][id$="CompexFieldEditPnl"]');u=$('div[id^="'+r.id+'"] [id$="ParticipantSelectAutoComp"]');i&&t.length!==0||(n=AutoCompletionMgr.Get(e),n&&(n.AllowDefaultEventOnKey(9),o.length>0?n.RequestAll(!1,o):u.length<=0&&n.RequestAll(!1)))}.bind(this)),e=$(u).find(".CT.AutoComp, .CT.CheckBox, .CT.Date"),e.length>0&&(f=Utils.GetNodeCortexID(e.get(0)),c=!0,e.is(".CT.AutoComp")?(w=AutoCompletionCtrl.Const.CONTROL_NAME,this.mbDeepEditing=!0):e.is(".CT.CheckBox")?w=CheckBoxCtrl.Const.CONTROL_NAME:e.is(".CT.Date")&&(w=DateCtrl.Const.CONTROL_NAME,c=e.find(".Input").length<2),l=ControlMgr.GetInstance().GetControl(f,w),l&&c&&PostRenderMgr.GetInstance().ExecuteAsap(function(){l.Event_Change_Setup();l.Event_Change.Subscribe(function(){var n,t;e.is(".CT.AutoComp")&&(n=AutoCompletionMgr.Get(l.msControlID),n&&n.mbCreateNewEntry&&!n.mbUIValueFilled&&(c=!1));c?this.SaveAll():(t=this.mbLookupMode?r:$(u).find(".VF.Editing")[0]||r,Matrix3.AddEvent(t.id,"REFRESH",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!0),this.mbEditing=!1,this.mbDeepEditing=!1)}.bind(this))}.bind(this))));a=this.moTable.parent();v=n;$(v).offset().left+$(v).width()>a.offset().left+a.width()&&($(this.moTable).parent()[0].scrollLeft+=$(v).offset().left+$(v).width()-(a.offset().left+a.width())+5)}},Matrix3.AddEvent(r.id,"EDIT",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,f.bind(this)),this.mbEditing=!0,this.mbDeepEditing=t)},SaveAll:function(n){var r=this.mbLookupMode?this.moTable.find(".PanelLine.Editing"):this.moTable.find(".VF.Editing"),f=$("[id$='CompexFieldEditPnl']"),i,t,u,e;for(f&&f.addClass("InvisibleC"),i=0;i<r.length;i++)t=r[i],$(t).hasClass("Saving")||($(t).removeClass("Editing"),$(t).removeClass("WN"),$(t).removeClass("Warning"),$(t).addClass("Saving"),u=Matrix3.Const.DELAY_BUFFERED,n||i!=r.length-1||(u=Matrix3.Const.DELAY_IMMEDIAT),this.PreSave(t),this.moLastEditedCells=r.closest(".PanelCol"),$(t).closest(".PanelLine")[0]&&Matrix3.PreventEventCancellation($(t).closest(".PanelLine")[0].id),e=this,Matrix3.AddEvent(t.id,"CELL_SAVE",Matrix3.Const.RETURNTYPE_FULL,u,"",null,null,null,null,null,null,null,null,null,null,null,null,!0,function(n){var t=n;return function(){e.OnSuccessEdit();var n=$E(t.id).closest(".PanelCol").get(0);n&&n.dispatchEvent(new CustomEvent("cx-cell-saved",{bubbles:!0,detail:{cellElement:n,lineElement:$(n).closest(".CT.PanelLine").get(0)}}))}}(t)));this.mbEditing=!1;this.mbDeepEditing=!1},PreSave:function(n){for(var r,i=$(n).find(".CT.Date").add($('[data-pid^="'+n.id+'"].CT.Date')),t=0;t<i.length;t++)r=ControlMgr.GetInstance().GetControl(Utils.GetNodeCortexID(i[t]),DateCtrl.Const.CONTROL_NAME),r.UpdateAll()},ShouldIgnoreEvent:function(n){var f=new Set(["ui-datepicker-div","_CMS_Loader_Mask","_CMS_Loader"]),t=$(n.target).closest(".editabletable-ignored").length>0,r,i,u;return!t&&this.moFocusedCell&&(r=$(this.moFocusedCell).children(".VF"),r.length===0&&(r=$(this.moFocusedCell).closest(".PanelLine")),r.length==1&&(i=EditableTable.GetEventTargetID(n.target),t=f.has(i),!t&&i&&i.startsWith("aria-owns")&&(t=!0),t||(u=$Elt(i),t=u&&u.classList.contains("editabletable-ignored")||n.target.classList.contains("editabletable-ignored")),t||(t=$(n.target).closest(".tox-tinymce-aux").length>0))),t},RefreshLastFocusedCell:function(){var n=$("[id='"+$(this.moFocusedCell).attr("id")+"']");n.length>0&&this.FocusCell(n[0])},OnSuccessEdit:function(){this.moTable.find(".Loading").removeClass("Loading");this.moTable.find(".Saving").removeClass("Saving");this.mbLookupMode&&(this.moTable.find(".PanelLine:not(.Editing) .CT.TextBox input, .PanelLine:not(.Editing) .CT.TextBox textarea, .PanelLine:not(.Editing) .CT.AutoComp input").css("pointer-events","none"),this.moTable.find(".PanelCol:not(.OnlyAction):not(.DatagridCellTextFullContentOnHover)").addClass("DatagridCellTextFullContentOnHover"),this.moTable.find(".PanelCol:not(.HeaderCol)").each(function(){$(this).children(".BG").length===0&&$(this).prepend('<div class="BG"><\/div>')}));this.RefreshLastFocusedCell()},NormalizeCSVString:function(n){return Utils.IsSafari()&&(n=n.trimEnd()),(n.indexOf("\n")>=0||n.indexOf('"')>0)&&(n=n.replace(/"/g,'""'),n='"'+n+'"'),n},NormalizePasteString:function(n){return n&&(n=n.replace(/&/g,"%26"),n=n.replace(/[+]/g,"%2B")),n},ReFreezeColumns:function(){this.mbHasFrozenColumns&&this.miFreezeToColumn>0&&(this.UnFreezeColumns(!0),this.FreezeColumns(this.miFreezeToColumn,!0))},UnFreezeColumns:function(n,t){var r,u,f,i,e;if(this.mbCanFreeze&&this.mbHasFrozenColumns&&(!n||!this.mbBypassReFreeze)&&!EditableTable.mbDisableUnFreeze){this.mbHasFrozenColumns=!1;n||(this.miFreezeToColumn=0,this.moCachedInNotScrollablePart={},this.moCachedInScrollablePart={});r=this.moTempScrollDivForFreezingColumns.scrollLeft();u=this.moTable.find(".PanelLine");u.each(function(){var n=$(this);n.data("reorder-panels",n.find(".Panel[id$='ReorderPnl']"));n.data("cells",n.find(".PanelCol"))});f=this.moTempScrollDivForHeader.find(">.PanelCol");this.moTableHolder.css("display","none");this.moTableHolder.css("overflow","auto hidden");this.moTable.css("overflow","");t&&(this.moFreezeThumb.detach(),this.moNoFreezeThumbContainer.append(this.moFreezeThumb));this.moTableHolder.find(">.BG").css("display","");this.moTable.find(">.BG").css("display","");this.moTable.css("position","");for(i in this.moOriginalTableStyle)this.moTable.css(i,this.moOriginalTableStyle[i]),i==="width"&&(this.moTable[0].miWidth=this.moOriginalTableHolderStyle[i]);this.moTableHolder.css("position","");for(i in this.moOriginalTableHolderStyle)this.moTableHolder.css(i,this.moOriginalTableHolderStyle[i]);this.moTempScrollDivForFreezingColumns.css("display","none");this.moTableHolder.append(this.moTable);u.each(function(t){var i,r;t!==0&&(i=$(this),i.css("position",""),n||i.removeClass("FrozenLine"),i.data("reorder-panels").each(function(){$(this).data("before-freeze-style")&&$(this).css("top",$(this).data("before-freeze-style").top)}),r=i.data("cells"),n||(r.removeClass("FrozenCell"),r.removeClass("LastFrozenCell")),r.each(function(){$(this).data("before-freeze-style")&&($(this).css("position",$(this).data("before-freeze-style").position),$(this).css("top",$(this).data("before-freeze-style").top),$(this).css("left",$(this).data("before-freeze-style").left),$(this).css("display",$(this).data("before-freeze-style").display),$(this).css("vertical-align",$(this).data("before-freeze-style")["vertical-align"]))}))});this.moHeaderColumns.removeClass("LastFrozenCell");e=this.moHeader;f.each(function(){$(this).css("left",this.miXOff);e[0].appendChild(this)});this.moTempScrollDivForHeader.css("display","none");this.moTableHolder.css("display","");n&&(this.moTempScrollDivForFreezingColumns.data("scroll-left",r),r>0&&(this.moTableHolder[0].scrollLeft=r,this.moHeader.length>0&&this.moHeader[0].mbPosFixed&&(this.moHeader.css("transform","translateX("+-r+"px)"),this.moHeader[0].miOffsetCompensatedFixedX=this.moHeader[0].miFixedX)))}},FreezeColumns:function(n,t,i){var s,a,r,h,f,e,o,v;if(this.mbCanFreeze&&((!n||n<=0)&&(n=this.miFreezeToColumn),n>0&&(!t||!this.mbBypassReFreeze)&&!this.mbHasFrozenColumns&&!EditableTable.mbDisableFreeze)){this.mbHasFrozenColumns=!0;this.miFreezeToColumn=n;t||(this.moCachedInNotScrollablePart={},this.moCachedInScrollablePart={});s=this.mbCanBeReorder?1:0;this.moOriginalTableStyle.background=this.moTable.css("background");this.moOriginalTableStyle.border=this.moTable.css("border");this.moOriginalTableStyle.width=this.moTable.width();this.moOriginalTableStyle.height=this.moTable.height();this.moOriginalTableHolderStyle.background=this.moTableHolder.css("background");this.moOriginalTableHolderStyle.border=this.moTableHolder.css("border");var u=this.moTable.find(".PanelLine"),p=this.moTableHolder.width(),w=this.moTableHolder[0].scrollLeft,b=$(u[0]),c=b.height();u.length>0&&(u=$(u.toArray().slice(1)));a=[];u.each(function(){var n=$(this),t,i;n.data("line-top",n.css("top"));t=n.find(".Panel[id$='ReorderPnl']");t.each(function(){$(this).data("before-freeze-style",{top:$(this).css("top")})});n.data("reorder-panels",t);i=n.find(".PanelCol");a.push(i);i.each(function(){$(this).data("before-freeze-style",{position:$(this).css("position"),top:$(this).css("top"),left:$(this).css("left"),display:$(this)[0].style.display,"vertical-align":$(this).css("vertical-align")})})});var l=this.moHeaderColumns.slice(0,this.miFreezeToColumn+s).get().reduce(function(n,t){return n+t.GetWidth()},0),y=this.moTableHolder.find(">.BG"),k=this.moTable.find(">.BG"),d=y.css("background");this.moTableHolder.css("display","none");this.moTableHolder.css("background",d);y.css("display","none");k.css("display","none");i&&(this.moFreezeThumb.detach(),$(this.moHeaderColumns[n+s-1]).append(this.moFreezeThumb));this.moTableHolder.css("overflow","hidden");this.moTempScrollDivForFreezingColumns||(this.moTempScrollDivForFreezingColumns=$("<
216div><\/div>"),this.moTempScrollDivForFreezingColumns.css("overflow","auto hidden"),this.moTempScrollDivForFreezingColumns.css("will-change","unset"),this.moTempScrollDivForFreezingColumns.css("position","static"));this.moTempScrollDivForFreezingColumns.css("height","calc(100% - "+c+"px");this.moTempScrollDivForFreezingColumns.css("display","");this.moTableHolder.append(this.moTempScrollDivForFreezingColumns);this.moTempScrollDivForFreezingColumns.append(this.moTable);this.moTable.css("position","static");this.moTable.css("width",this.moOriginalTableStyle.width-l);this.moTable[0].miWidth=this.moOriginalTableStyle.width-l;this.moTable.css("height",this.moOriginalTableStyle.height-c);this.moTable.css("overflow","hidden");r=this;u.each(function(t){var f=$(this),e,i,u;f.css("position","static");f.addClass("FrozenLine");r.moCachedInScrollablePart[this.GetId()]=!1;r.moCachedInNotScrollablePart[this.GetId()]=!0;e=a[t];f.data("reorder-panels").css("top",f.data("line-top"));i=$(e.slice(0,n));i.css("position","absolute");i.css("top",f.data("line-top"));i.addClass("FrozenCell");$(i[i.length-1]).addClass("LastFrozenCell");i.each(function(){r.moCachedInScrollablePart[this.GetId()]=!1;r.moCachedInNotScrollablePart[this.GetId()]=!0});u=$(e.slice(n));u.css("position","relative");u.css("top","");u.css("left","");u.css("display","inline-block");u.css("vertical-align","top");u.each(function(){r.moCachedInScrollablePart[this.GetId()]=!0;r.moCachedInNotScrollablePart[this.GetId()]=!1})});this.moTempScrollDivForHeader||(this.moTempScrollDivForHeader=$("<div><\/div>"));this.moTempScrollDivForHeader.css("height",c+25);this.moTempScrollDivForHeader.css("position","absolute");this.moTempScrollDivForHeader.css("overflow","auto hidden");this.moTempScrollDivForHeader.css("width",p-l);this.moTempScrollDivForHeader.css("display","");this.moHeader.css("overflow","hidden");$(this.moHeaderColumns.toArray()[n+s-1]).addClass("LastFrozenCell");h=$(this.moHeaderColumns.toArray().slice(n+s));this.moTempScrollDivForHeader.css("top",0);h.length>0&&this.moTempScrollDivForHeader.css("left",h[0].miXOff);h.each(function(){$(this).css("left",this.miXOff-h[0].miXOff);r.moTempScrollDivForHeader.append($(this))});this.moHeader.append(this.moTempScrollDivForHeader);this.moTempScrollDivForFreezingColumns[0].miLastScrollLeft=0;this.moTempScrollDivForFreezingColumns.on("scroll",function(){r.moTempScrollDivForHeader[0].scrollLeft!==this.scrollLeft&&(this.scrollLeft<this.miLastScrollLeft&&r.moTempScrollDivForHeader[0].scrollLeft>this.scrollLeft?r.moTempScrollDivForHeader[0].scrollLeft=this.scrollLeft:this.scrollLeft>this.miLastScrollLeft&&r.moTempScrollDivForHeader[0].scrollLeft<this.scrollLeft&&(r.moTempScrollDivForHeader[0].scrollLeft=this.scrollLeft),this.miLastScrollLeft=this.scrollLeft)});this.moTempScrollDivForHeader[0].miLastScrollLeft=0;this.moTempScrollDivForHeader.on("scroll",function(){r.moTempScrollDivForFreezingColumns[0].scrollLeft!==this.scrollLeft&&(this.scrollLeft<this.miLastScrollLeft&&r.moTempScrollDivForFreezingColumns[0].scrollLeft>this.scrollLeft?r.moTempScrollDivForFreezingColumns[0].scrollLeft=this.scrollLeft:this.scrollLeft>this.miLastScrollLeft&&r.moTempScrollDivForFreezingColumns[0].scrollLeft<this.scrollLeft&&(r.moTempScrollDivForFreezingColumns[0].scrollLeft=this.scrollLeft),this.miLastScrollLeft=this.scrollLeft)});this.moTempScrollDivForFreezingColumns.css("margin-left",l);this.moTempScrollDivForFreezingColumns.css("margin-top",c);this.moTableHolder.css("display","");w>0&&(this.moTableHolder[0].scrollLeft=0);this.moHeader.css("transform","");this.moHeader.length>0&&(this.moHeader[0].miOffsetCompensatedFixedX=null);t&&(this.moTempScrollDivForFreezingColumns.data("scroll-left")>0&&(this.moTempScrollDivForFreezingColumns[0].scrollLeft=this.moTempScrollDivForFreezingColumns.data("scroll-left")),f=$("[id='"+$(this.moFocusedCell).attr("id")+"']"),e=f.children(".VF"),e.length===0&&(e=f.closest(".PanelLine")),f.length>0&&(o=f.find(".CT.TextBox input, .CT.TextArea textarea"),o.length===0&&e.length>0&&(o=$(".CT.TextBox input[id^='"+e[0].id+"'], .CT.TextArea textarea[id^='"+e[0].id+"']")),o.length===0&&(v=$("input, select",$(".InputsDate",f)),v.length>0&&(o=$(v[0]))),o.focus()))}},HasFrozenColumns:function(){return this.mbHasFrozenColumns},IsUnFrozenTemporarily:function(){return!this.mbHasFrozenColumns&&this.miFreezeToColumn&&this.miFreezeToColumn>0},DropRedundantHeaderOffset:function(){if(this.IsUnFrozenTemporarily()&&this.moHeader.length!==0){var n=this.moHeader[0];n.miOffsetCompensatedFixedX!=null&&n.miFixedX!==n.miOffsetCompensatedFixedX&&(this.moHeader.css("transform",""),n.miOffsetCompensatedFixedX=null)}},IsUnFrozenPermanently:function(){return!this.mbHasFrozenColumns&&(!this.miFreezeToColumn||this.miFreezeToColumn<=0)},IsNodeInScrollablePart:function(n){var t,i,e,r,u,f;if(!n.GetId())return!1;if(this.moCachedInScrollablePart.hasOwnProperty(n.GetId()))return this.moCachedInScrollablePart[n.GetId()];if(typeof t=="undefined")for(i=n.moParent;i;){if(this.moCachedInScrollablePart.hasOwnProperty(i.GetId())&&(e=this.moCachedInScrollablePart[i.GetId()],e)){t=!0;break}i=i.moParent}return typeof t=="undefined"&&this.IsUnFrozenPermanently()&&(t=this.moTable[0].contains(n)),typeof t=="undefined"&&(r=$(n).closest(".ABS.PanelCol")[0],u=$(n).closest(".ABS.PanelLine")[0],r&&u&&u===r.moParent&&this.moTable[0]===u.moParent&&(f=$(r).index(),this.mbCanBeReorder&&f--,t=f>=this.miFreezeToColumn)),this.moCachedInScrollablePart[n.GetId()]=t,t&&(this.moCachedInNotScrollablePart[n.GetId()]=!1),t},IsNodeInNonScrollablePart:function(n){var t,i,e,r,u,f;if(!n.GetId()||this.IsUnFrozenPermanently())return!1;if(this.moCachedInNotScrollablePart.hasOwnProperty(n.GetId()))return this.moCachedInNotScrollablePart[n.GetId()];if(typeof t=="undefined")for(i=n.moParent;i;){if(this.moCachedInScrollablePart.hasOwnProperty(i.GetId())&&(e=this.moCachedInScrollablePart[i.GetId()],e)){t=!1;break}i=i.moParent}return typeof t=="undefined"&&(this.moTable[0].contains(n)&&this.moTable[0]!==n||(t=!1)),typeof t=="undefined"&&(r=$(n).closest(".ABS.PanelCol")[0],u=$(n).closest(".ABS.PanelLine")[0],r&&u&&u===r.moParent&&this.moTable[0]===u.moParent&&(f=$(r).index(),this.mbCanBeReorder&&f--,t=f<this.miFreezeToColumn)),this.moCachedInNotScrollablePart[n.GetId()]=t,t&&(this.moCachedInScrollablePart[n.GetId()]=!1),t},GetScrollLeft:function(){return this.mbHasFrozenColumns?this.moTempScrollDivForFreezingColumns.scrollLeft():this.moTableHolder.scrollLeft()}};EditableTable.SortLinesAfterExpand=function(n,t){const i=[],u=[];
216n.forEach(n=>{n.classList&&n.classList.contains("PanelLine")?i.push(n):u.push(n)});const r=[];if(i.length){const n={},u=new Set;i.forEach(t=>{const r=t.getAttribute("data-rid"),i=t.getAttribute("data-parent");u.add(r);n[i]||(n[i]=[]);n[i].push(t)});var f=function(n,t){if(!n.getAttribute("data-rid")||!t.getAttribute("data-rid"))return 0;const i=n.getAttribute("data-tbp"),r=t.getAttribute("data-tbp");return!i||!r?0:parseFloat(i)-parseFloat(r)};Object.values(n).forEach(n=>n.sort(f));const o=i.filter(n=>!n.getAttribute("data-parent")||!u.has(n.getAttribute("data-parent"))).sort(f);function e(i,u){if(r.push(i),t&&i.getAttribute){const n=i.getAttribute("data-rid");n&&(t[n]=u)}const f=i.getAttribute("data-rid");if(f){const t=n[f];t&&t.forEach(n=>e(n,u+1))}}o.forEach(n=>e(n,0))}return{levelDict:t,elementList:r.concat(u),sorted:r.length>0}};EditableTable.GetEventTargetID=function(n){var t="",u=$(n),r,i;if(u.is(".AutoCompACC, .CT"))t=Utils.GetNodeCortexID(n);else if(r=u.closest(".AutoCompACC, .CT, .PanelCol"),r.length>0)t=Utils.GetNodeCortexID(r.get(0));else{for(i=n;i!=null&&!Utils.IsStringFilled(i.id);)i=i.parentNode;i!=null&&(t=i.id);t||(t=Utils.GetNodeCortexID(n));t||(t=Utils.FindClosestNodeID(n))}return t};EditableTable.Save=function(n){var r=EditableTable.GetEventTargetID(n),t,i;if(oTable=$E(r).closest(".ABS.PanelTable"),oTable.length==0)for(t=Utils.GetVFormId(r),oTable=$E(t).closest(".ABS.PanelTable");oTable.length==0&&t;)t=t.substr(0,t.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY)),oTable=$E(t).closest(".ABS.PanelTable");oTable.length==1&&(i=ControlMgr.GetInstance().GetControl(oTable.get(0).id),i&&i.SaveAll())};EditableTable.GetNearestAncestorTable=function(n){for(var i,r,u=Utils.GetAncestors(n),t=u.length-1;t>=0;t--)if(i=u[t].GetId(),i&&(r=EditableTable.moAllTables[i],r))return r;return null};EditableTable.GetAllTables=function(){var n={};for(var t in EditableTable.moAllTables)n[t]=EditableTable.moAllTables[t];return n};EditableTable.GetFrozenTables=function(){var t={};for(var n in EditableTable.moAllTables)EditableTable.moAllTables[n].HasFrozenColumns()&&(t[n]=EditableTable.moAllTables[n]);return t};EditableTable.GetTable=function(n){return EditableTable.moAllTables[n]};EditableTable.FocusForceFocusCell=function(){var n=$(".Grid_Force_Focus"),t,i;n.length>0&&(t=$(n).closest(".ABS.PanelTable"),t.length>0&&(i=ControlMgr.GetInstance().GetControl(t.get(0).id),i&&i.FocusCell(n[0]),n.removeClass("Grid_Force_Focus")))};EditableTable.FillColor=function(n,t,i){var u=$E(n).closest(".ABS.PanelCol"),r,e,f,o;if(u&&(i=="True"?u.attr("data-bg",t):u.attr("data-bgf",t),u.css("background-color",t)),r=$E(n).closest(".ABS.PanelLine").children(".ABS.PanelCol").not('[id*="SelectCol"]').not("[data-bgf]"),e="",r){for(f=0;f<r.length;f++)if(o=$(r[f]).attr("data-bg"),o){e=o;break}r.css("background-color",e)}};EditableTable.TryGetCurrentActiveTable=function(){var n=$(".ABS.PanelTable").filter(function(n,t){return Utils.IsInTopLevelPopup($(t).attr("id"))});return n.length>0?ControlMgr.GetInstance().GetControl(n.get(0).id):null};EditableTable.UnFreezeAllTables=function(n){var i,t;for(i in EditableTable.moAllTables)t=EditableTable.moAllTables[i],t&&t.UnFreezeColumns(n)};EditableTable.DropRedundantHeaderOffsetOnAllTables=function(){var t,n;for(t in EditableTable.moAllTables)n=EditableTable.moAllTables[t],n&&n.DropRedundantHeaderOffset()};EditableTable.FreezeAllTables=function(n){var i,t;for(i in EditableTable.moAllTables)t=EditableTable.moAllTables[i],t&&t.FreezeColumns(null,n)};EditableTable.ReFreezeAllTables=function(){var t,n;for(t in EditableTable.moAllTables)n=EditableTable.moAllTables[t],n&&n.ReFreezeColumns()};EditableTable.SetHasOverviewSidePanel=function(n,t){EditableTable.moOverviewSidePanelAvailableOnDamViewState[n]=t};EditableTable.SetRefreshOverviewSidePanel=function(n){EditableTable.mbRefreshOverviewSidePanel=n};EditableTable.ViewSidePanel=Utils.debounce(function(n){Matrix3.PreventEventCancellation(n.GetVFormId());Matrix3.AddEvent(n.GetVFormId(),"VIEW_SIDEPANEL",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"","","")},500);EditableTable.EnableFullContentOnHover=function(n){$("[id='"+n+"']").closest(".PanelCol").addClass("DatagridCellTextFullContentOnHover")};EditableTable.DisableFullContentOnHover=function(n){$("[id='"+n+"']").closest(".PanelCol").removeClass("DatagridCellTextFullContentOnHover")};EditableTable.EnableFullContentOnHoverBatch=function(n){if(n&&n.length!==0)for(var t=0;t<n.length;t++)$("[id='"+n[t]+"']").closest(".PanelCol").addClass("DatagridCellTextFullContentOnHover")};EditableTable.DisableFullContentOnHoverBatch=function(n){if(n&&n.length!==0)for(var t=0;t<n.length;t++)$("[id='"+n[t]+"']").closest(".PanelCol").removeClass("DatagridCellTextFullContentOnHover")};EditableTable.WireFirstColLinkForRow=function(n){function l(){var n=i.querySelector('a, button, [role="button"]')||i,t={bubbles:!0,cancelable:!0,composed:!0};n.dispatchEvent(new PointerEvent("pointerdown",t));n.dispatchEvent(new PointerEvent("pointerup",t));n.dispatchEvent(new MouseEvent("click",t))}function a(n){window.getSelection&&window.getSelection().toString().length>0||n.ctrlKey||n.metaKey||n.shiftKey||n.button===1||(n.preventDefault(),n.stopPropagation(),clearTimeout(f),f=setTimeout(l,300))}function v(){clearTimeout(f)}var i=null,s=n.querySelector(".DVMenuCell"),h,e,r,c,o,u,t,f;if(s)for(h=s.querySelectorAll('[data-opn="ActionBtn"], [id$=":ActionBtn"]'),e=0;e<h.length;e++)if((r=h[e],!r.hasAttribute("hidden"))&&r.getAttribute("aria-disabled")!=="true"&&r.style.display!=="none"){i=r;break}if(!i)return!1;if(c=i.id||"",o=c.split(":").pop().toUpperCase(),o==="DELETE"||o==="REMOVE"||o==="REVOKE")return!0;
216if(n.dataset.firstColWired==="1"){if(n.querySelector(".FirstColLink"))return!0;delete n.dataset.firstColWired}return(u=n.querySelector(".FirstCol:not(.DVMenuCell)")||n.querySelector(".PanelCol:not(.DVMenuCell)"),!u||s.contains(u))?!0:(t=u.querySelector(".Lbl, .CT.Label")||u,t.contains(i))?!0:t.querySelector("button, cx-menu-item, input, textarea, select")?(n.dataset.firstColWired="1",!0):(t.classList.add("FirstColLink"),t.querySelector("a[href]")||(t.setAttribute("role","link"),t.setAttribute("tabindex","0")),f=null,t.addEventListener("click",a),t.addEventListener("dblclick",v),t.addEventListener("keydown",function(n){(n.key==="Enter"||n.key===" ")&&(clearTimeout(f),l())}),n.dataset.firstColWired="1",!0)};EffectProperties.Const={FADE:"Fade",APPEAR:"Appear",SEPARATOR_VALUE:"|"};EffectProperties.prototype={ActiveEffect:function(n,t,i,r,u){var e=parseFloat(t),f=parseFloat(i);Utils.IsNumber(f)||(f=.1);this.moActiveEffect&&this.moActiveEffect.stop(!0);this.moActiveEffect=Effect[n].call(this,this.msID,f,r,u)},Action_CancelEffect:function(){window.clearTimeout(this.moCurrentEffectTimer)},Action_ActiveEffect:function(n){if(n){var t=n.split(EffectProperties.Const.SEPARATOR_VALUE),i=t[0],r=t.length>1?t[1]:null,u=t.length>2?t[2]:null;this.ActiveEffect(i,"1",r,u)}}};ExecutionContext.BindElement=function(n,t,i){if(typeof i=="object"&&i!==null){var r=new Proxy(i,{get:function(t,i){var r=t[i];return typeof r=="function"?function(){var i=r.apply(t,arguments);return typeof i=="function"&&i.IsCleanupFunction&&n._subscribe(Utils.GetSignalName(n.msVformID,Matrix3.Const.SIGNAL_NODE_REMOVED),function(){i()},!0),i}:r}});n[t]=r}};ExecutionContext.moBatchPositioningGroups={};ExecutionContext.StartBatchPositioning=function(n){var i=ExecutionContext.moBatchPositioningGroups[n],u,t,r;if(i){for(u=!0,t=0;t<i.length;t++)if(r=i[t],!r.Ready){u=!1;break}if(u){for(t=0;t<i.length;t++)r=i[t],$(r.Node).addClass("batch-positioning--loaded"),r.OnPositionedCallback();delete ExecutionContext.moBatchPositioningGroups[n]}else setTimeout(function(){ExecutionContext.StartBatchPositioning(n)},20)}};ExecutionContext.prototype={getVFormId:function(){return this.msVformID},getBaseUrl:function(){return this.msBaseUri},markHavingUnsavedChanges:function(n){n?this.addToCollection(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING):this.removeFromCollection(Matrix3.Const.COLLEC_TO_CONFIRM_ON_PAGE_UNLOADING)},batchPositioning:function(n,t){var i,u,e;if(ExecutionContext.moBatchPositioningGroups[n]||(ExecutionContext.moBatchPositioningGroups[n]=[],setTimeout(function(){ExecutionContext.StartBatchPositioning(n)},20)),i=$(t),i.hasClass("batch-positioning"))return i.find(".batch-positioning--content")[0];i.addClass("batch-positioning");var o=i.children(),r=$("<div class='batch-positioning--content'><\/div>"),f=$("<div class='batch-positioning--loader'><\/div>");o.each(function(){$(this).detach();f.append($(this))});i.append(r);i.append(f);this.moBatchPositioningItem={Node:r[0],Ready:!1,OnPositionedCallback:function(){}};for(u in AttachZoomMgr.AttachedElements)e=AttachZoomMgr.AttachedElements[u],e.contains(this.moBatchPositioningItem.Node)&&(this.moBatchPositioningItem.OnPositionedCallback=function(){var n=AttachZoomMgr.AttachedCallbacks[u];n&&n()});return ExecutionContext.moBatchPositioningGroups[n].push(this.moBatchPositioningItem),r[0]},readyForBatchPositioning:function(){this.moBatchPositioningItem&&(this.moBatchPositioningItem.Ready=!0)},fetchCortexApi:function(n,t,i){var r=new URL(this.msBaseUri+n);return Array.isArray(i)?i.forEach(function(n){r.searchParams.append(n[0],n[1])}
216):i&&Object.keys(i).forEach(function(n){r.searchParams.append(n,i[n])}),fetch(r,t)},onContextChanged:function(){},onBeforeClose:function(){},onClosed:function(n){var t=this,i=function(){n();t._cleanUp()},r=this._subscribe(Utils.GetSignalName(this.msVformID,Matrix3.Const.SIGNAL_NODE_REMOVED),i,!0);return function(){PubSub.unsubscribe(r)}},onVisibilityChanged:function(n){for(var u=[],t=$PI(this.msVformID).moParent,i,r;t;)t.msCtrlType&&t.msCtrlType.toLowerCase().includes("panel")&&(i=this._subscribe(Utils.GetSignalName(t.msId,FoldProperties.Const.SIGNAL_CLOSED),function(){n(!1)}),r=this._subscribe(Utils.GetSignalName(t.msId,FoldProperties.Const.SIGNAL_OPENED),function(){n(!0)}),u.push(i),u.push(r)),t=t.moParent;return function(){PubSub.unsubscribe(i);PubSub.unsubscribe(r)}},fireRefresh:function(n){Matrix3.AddEvent(this.msVformID,"REFRESH",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,n)},fireOpenPopup:function(n){Matrix3.AddEvent(this.msVformID,this.msEventOpenPopUp,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,JSON.stringify(n))},fireNavigation:function(n,t){n==this.msEventTrackingSummary?Matrix3.AddEvent(this.msVformID,n,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,t):alert("Fire Navigation : destinationName="+n+", args="+t)},fireMessageBox:function(n,t){alert("Fire MessageBox : title="+n+", message="+t)},fireNotification:function(n,t,i){Matrix3.ShowNotification(n,t,i)},fireEvent:function(n,t,i,r,u){Matrix3.AddEvent(this.msVformID,n,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,t,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,i,undefined,r,u)},getZIndex:function(){return StackMgr.GetInstance().GetIndex()},getCurrentZIndex:function(){return StackMgr.GetInstance().GetCurrentIndex()},addToCollection:function(n){return Matrix3.GetCollection().Add(n,this.msVformID)},removeFromCollection:function(n){return Matrix3.GetCollection().Remove(n,this.msVformID)},isCurrentVFormInCollection:function(n){return Matrix3.GetCollection().IsVFormInCollection(this.msVformID,n)},_cleanUp:function(){this.maoPubSubTokens&&this.maoPubSubTokens.length>0&&this.maoPubSubTokens.forEach(function(n){PubSub.unsubscribe(n)})},_subscribe:function(n,t,i){var r;return i?r=PubSub.subscribeOnce(n,t):(r=PubSub.subscribe(n,t),this.maoPubSubTokens||(this.maoPubSubTokens=[]),this.maoPubSubTokens.push(r)),r}};FileNameOnDropProperties.prototype={SetFileNameOnDrop:function(n){var t=this;$($E(this.msID)).children("a").bind("dragstart",function(){t.msHrefBackup=$(this).attr("href");$(this).attr("href",JSON.parse(n)).bind("drag",function(){$(this).attr("href",t.msHrefBackup).unbind("drag")})})}};FixedPos.Cache={maItemsWithScrollbarWidthDeduced:[],maItemsWithScrollbarHeightDeduced:[],moHandlers:{},moStackGroups:{}};FixedPos._oPageScrollCache=null;FixedPos._GetPageScrollAmount=function(){return FixedPos._oPageScrollCache===null&&(FixedPos._oPageScrollCache=$(window).scrollTop()+$("#Form1").scrollTop(),requestAnimationFrame(function(){FixedPos._oPageScrollCache=null})),FixedPos._oPageScrollCache};FixedPos._iGlobalTopOffset=null;FixedPos.GetGlobalTopOffset=function(){if(FixedPos._iGlobalTopOffset===null&&window.TSPageHeaderController){var n=TSPageHeaderController.GetInstance();n&&n.DoesHeaderStickToTop()&&(FixedPos._iGlobalTopOffset=n.GetHeaderHeight())}return FixedPos._iGlobalTopOffset||0};FixedPos.RefreshFixedPosItems=function(){if(FixedPos.Cache.moHandlers)for(var n in FixedPos.Cache.moHandlers)FixedPos.Cache.moHandlers[n](!0)};FixedPos._bIdleRefreshScheduled=!1;FixedPos.RefreshFixedPosItemsOnIdle=function(){FixedPos._bIdleRefreshScheduled||(FixedPos._bIdleRefreshScheduled=!0,Utils.RequestIdleCallback(function(){FixedPos._bIdleRefreshScheduled=!1;FixedPos.RefreshFixedPosItems()}))};FixedPos.Const={MGR_NAME:"FixedPos",DATA_ROOT_PADDING_BOTTOM:"RootPaddingBottom",DATA_STICK_TO_BOTTOM_HEIGHT_CACHE:"HeightsOfAllStickToBottomElement"};FixedPos.TriggerAllVisibilityObservers=Utils.debounce(function(){VisibilityObserverMgr.GetInstance().TriggerAllObservers()},500);$(document).on("PopupRemoved.FixedPos",function(){var n,t;for(n in FixedPos.Cache.moStackGroups)FixedPos.Cache.moStackGroups.hasOwnProperty(n)&&FixedPos.RefreshStackGroup(n,!0);for(t in FixedPos.Cache.moHandlers)if(FixedPos.Cache.moHandlers.hasOwnProperty(t))try{FixedPos.Cache.moHandlers[t](!0)}catch(i){}});FixedPos.RefreshStackGroup=function(n,t,i){var h=FixedPos.Cache.moStackGroups[n],f,e,o,c,r,u,s;if(h){for(f=Object.keys(h.moStackItems),f.sort(function(n,t){return n-t}),e=[],o=0;o<f.length;o++)if(c=f[o],r=h.moStackItems[c],r&&r.length>0)for(u=0;
216u<r.length;u++)Utils.IsFunction(r[u].mfRefreshFunction)&&r[u].mfRefreshFunction(t,i,e);for(s=0;s<e.length;s++)e[s]()}};FixedPos.StackItem=function(n,t){this.moPosItem=n;this.mfRefreshFunction=t};FixedPos.Activate=function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){var w=$PI(n),lt,ot,ut,tt,nt,k,st,it,ht,ft,et,ct,yt,rt;if(w){var g=Math.max(0,parseInt(v)||0),pt=parseInt(y)||0,d,wt=!1;if(Utils.IsStringFilled(a)&&(FixedPos.Cache.moStackGroups[a]||(wt=!0,FixedPos.Cache.moStackGroups[a]={moStackItems:{},mbRefreshed:!1}),d=FixedPos.Cache.moStackGroups[a],d.moStackItems[g]||(d.moStackItems[g]=[])),o)for(lt=$E(n),ot=o.split(" "),o="",ut=0;ut<ot.length;ut++)tt=ot[ut],tt&&tt.length&&!lt.hasClass(tt)&&(o+=" "+tt);nt=w.msId;Matrix3.RegisterInCache(n,FixedPos);k=w.moParent;c&&(st=w.GetAncestorWithFlashID(c),st&&(k=st));it=null;ht=$(w).parent().closest("[data-fixedpos-boundary]");ht.length&&(it=ht[0]);k.miTmpOriginalParentWidth=0;k.miTmpOriginalParentHeight=0;var bt=Utils.GetVFormId(n),kt=Utils.GetRootOrPopupId(bt),dt=!Matrix3||!Matrix3.moPopupTable||!Matrix3.moPopupTable.hasOwnProperty(kt),gt=function(n){var i=n,r=n.localToGlobal(new Point(0,0),!0).y,t;for(n=n.parentElement;n;)t=n.localToGlobal(new Point(0,0),!0).y,t>r&&(i=n,r=t),n=n.parentElement;return i},at=function(n,t){var e=!1,i=ControlMgr.GetInstance().GetRootPositionItem(),o,r,s,u,f;if(i){o=$(i).data(FixedPos.Const.DATA_STICK_TO_BOTTOM_HEIGHT_CACHE)||"{}";r=JSON.parse(o)||{};r[n]=t;$(i).data(FixedPos.Const.DATA_STICK_TO_BOTTOM_HEIGHT_CACHE,JSON.stringify(r));s=parseInt($(i).data(FixedPos.Const.DATA_ROOT_PADDING_BOTTOM))||0;u=0;for(f in r)r.hasOwnProperty(f)&&(u=Math.max(u,r[f]));s!=u&&($(i).data(FixedPos.Const.DATA_ROOT_PADDING_BOTTOM,u),i.miCachedPaddingBottom=u,PositionMgr.GetInstance().AddToDirtyYList(i),e=!0,Matrix3.RegisterForCleanup(n,"ResetCachedPaddingBottom",function(){at(n,0)}))}return e};h&&(ft=ControlMgr.GetInstance().GetRootPositionItem(),ft&&(et=$(ft).data(FixedPos.Const.DATA_STICK_TO_BOTTOM_HEIGHT_CACHE),ct=et&&et.length>0?JSON.parse(et):{},ct[n]=0,$(ft).data(FixedPos.Const.DATA_STICK_TO_BOTTOM_HEIGHT_CACHE,JSON.stringify(ct))));var vt=0,b=function(c,a,v){var ft=[],y=t,ct,st,lt,tt,bt,yt,kt,et,ki,ri,ei,oi,vi,si,yi,pi,hi,ci,wt,ut,ot,wi,bi;if(d&&(y=0,g>0)){for(ct=g-1;!d.moStackItems[ct]&&ct>0;)ct--;if(st=d.moStackItems[ct],st&&st.length>0)for(lt=0;lt<st.length;lt++)y=Math.max(y,(st[lt].moPosItem.miFixedY||0)+st[lt].moPosItem.GetHeight())}PositionItem.IsInPopup(w)||(y=Math.max(y,FixedPos.GetGlobalTopOffset()));tt=i;bt=!1;Utils.IsObject(c)&&(yt=c);e?(y=(Utils.GetViewportHeight()-w.GetHeight())/2,t!=null&&(y=Math.max(t,y))):h&&(y=Utils.GetViewportHeight()-w.GetHeight(),t==null||isNaN(t)||(y=Math.max(t,y)));kt=w.localToGlobal(new Point(0,0),!0);et=0;PositionItem.IsInPopup(w)||(et=FixedPos._GetPageScrollAmount());et-=pt;var ai=gt(w),ht=0,ni=!1;ai!=w&&(ki=ai.localToGlobal(new Point(0,0),!0),ht=ki.y-et,ni=!0);var ti=kt.y-et-ht,b=y!=null&&ti<y||tt!=null&&ti+ht+w.GetHeight()>Utils.GetViewportHeight()-tt||h,ii=!1,rt=0;if(b&&(k.clientWidth<=0||k.clientHeight<=0)&&(b=!1),b&&ni&&Math.abs(vt-ht)>1&&(c=!0),vt=ht,r&&(rt=k.localToGlobal(new Point(0,0),!0).y-et,ii=y!=null&&(rt+k.GetHeight()<w.GetHeight()+y||rt>y)||tt!=null&&(Utils.GetViewportHeight()-rt<w.GetHeight()+tt||rt+k.GetHeight()<tt),(ii||w.mbRestrictedByParent)&&(c=!0,(rt+k.GetHeight()<0||rt>Utils.GetViewportHeight())&&(b=!1)),w.mbRestrictedByParent=ii),ri=null,it&&y!=null&&!h&&(b||w.mbBoundaryCapped)){var di=it.localToGlobal(new Point(0,0),!0).y-et,ui=di+it.GetHeight(),fi=w.GetHeight();if(d){fi=0;for(ei in d.moStackItems)if(d.moStackItems.hasOwnProperty(ei)&&!(parseInt(ei)<g)){for(oi=0,vi=d.moStackItems[ei],si=0;si<vi.length;si++)oi=Math.max(oi,vi[si].moPosItem.GetHeight());fi+=oi}}yi=b&&ui>0&&ui<=y+fi+1;(yi||w.mbBoundaryCapped)&&(c=!0);w.mbBoundaryCapped=yi;b&&(ui<=y||di>Utils.GetViewportHeight()?b=!1:ri=ui-fi)}if(!b||Utils.IsInTopLevelPopup(n)||h||$(w).hasClass("MustBeIncludedInFixedPos")||(b=!1),dt&&b&&!ni&&typeof AnnouncementManager!="undefined"&&(pi=AnnouncementManager.GetActiveAnnouncementsPnl(),pi&&y+et<pi.GetHeight()&&(b=!1)),l&&((k.miWidth!=k.miTmpOriginalParentWidth||k.miHeight!=k.miTmpOriginalParentHeight)&&b?(hi=k.miHeight,hi||(hi=document.width!==undefined?document.width:document.body.offsetWidth),ft.push(function(){$(k).css("clip-path","inset(0px calc(100% - "+k.miWidth+"px) calc(100% - "+hi+"px) 0px)")}),k.miTmpOriginalParentWidth=k.miWidth,iOriginalParentHeight=k.miHeight):(ft.push(function(){$(k).css("clip-path","")}),k.miTmpOriginalParentWidth=0,k.miTmpOriginalParentHeight=0)),yt&&yt.type=="resize"&&tt!=null&&(c=!0),yt&&yt.type==VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED&&(c=!0),ci=!1,b!=w.mbPosFixed||c===!0){if(b){if(ut=$E(n),ft.push(function(){ut.css({position:"fixed"}).addClass("PosFixed")}),s&&(ut.css("z-index")!==""&&isNaN(ut.css("z-index"))||Utils.IsSafari()&&ut.css("z-index")==="0")&&ft.push(function(){ut.css({"z-index":StackMgr.GetInstance().GetIndex()})}),o&&ft.push(function(){ut.addClass(o)}),w.miFixedX=kt.x,(u||f)&&$.inArray(nt,FixedPos.Cache.maItemsWithScrollbarWidthDeduced)==-1&&$.inArray(nt,FixedPos.Cache.maItemsWithScrollbarHeightDeduced)==-1){var li=Utils.GetScrollBarSize(),gi=li.width,nr=li.height;f&&(w.miHeight-=nr,FixedPos.Cache.maItemsWithScrollbarHeightDeduced.push(nt));u&&(w.miWidth-=gi,FixedPos.Cache.maItemsWithScrollbarWidthDeduced.push(nt))}(y!=null&&ti<y||h)&&(w.miFixedY=tt!=null?Math.min(y,Utils.GetViewportHe
216ight()-w.GetHeight()-tt):y);tt!=null&&ti+ht+w.GetHeight()>Utils.GetViewportHeight()-tt&&(w.miFixedY=Utils.GetViewportHeight()-tt-w.GetHeight());ii&&(rt=k.localToGlobal(new Point(0,0),!0).y-et,tt!=null&&(w.miFixedY=Math.min(rt+k.GetHeight()-w.GetHeight(),w.miFixedY)),y!=null&&(w.miFixedY=Math.max(rt,w.miFixedY)));ni&&(rt=ai.localToGlobal(new Point(0,0),!0).y-et,y!=null&&(w.miFixedY=Math.max(rt,w.miFixedY)));ri!=null&&(w.miFixedY=Math.min(w.miFixedY,ri));h&&!p&&(ot=ControlMgr.GetInstance().GetRootPositionItem(),ot&&(wt=w.classList.contains("InvisibleC")?0:w.GetHeight(),wt&&(wt=window.getComputedStyle(w).visibility=="hidden"?0:wt),bt=at(n,wt)))}else{if(ut=$E(n),ft.push(function(){ut.css({position:"absolute"}).removeClass("PosFixed")}),s&&$('[id="'+n+'"]').data(PositionGroupProperties.Const.DATA_POSITION_GROUP_TYPE)!=="notification"&&ft.push(function(){ut.css({"z-index":""})}),o&&ft.push(function(){ut.removeClass(o)}),u||f){var tr=$.inArray(nt,FixedPos.Cache.maItemsWithScrollbarWidthDeduced),ir=$.inArray(nt,FixedPos.Cache.maItemsWithScrollbarHeightDeduced),rr=tr>-1,ur=ir>-1;if(ur||rr){var li=Utils.GetScrollBarSize(),gi=li.width,nr=li.height;rr==!0&&(w.miWidth+=gi,FixedPos.Cache.maItemsWithScrollbarWidthDeduced.splice(tr,1));ur==!0&&(w.miHeight+=nr,FixedPos.Cache.maItemsWithScrollbarHeightDeduced.splice(ir,1))}}h&&(ot=ControlMgr.GetInstance().GetRootPositionItem(),ot&&(wi=parseInt($(ot).data(FixedPos.Const.DATA_ROOT_PADDING_BOTTOM)),isNaN(wi)||($(ot).data(FixedPos.Const.DATA_ROOT_PADDING_BOTTOM,null),isNaN(ot.miCachedPaddingBottom)||(ot.miCachedPaddingBottom-=wi,PositionMgr.GetInstance().AddToDirtyYList(ot),bt=!0))))}w.mbPosFixed=b;ci=!a}else k&&k.scrollWidth>k.miWidth&&w.mbPosFixed&&(w.miFixedX=kt.x,ci=!0);bi=function(){bt&&PositionMgr.GetInstance().CalculatePosition();ci&&(Matrix3.mbPreventAnimation=!0,w.TransferPositioningToDOM(),Matrix3.mbPreventAnimation=!1);for(var n=0;n<ft.length;n++)ft[n]()};v?v.push(bi):bi();FixedPos.TriggerAllVisibilityObservers()},ni=b;d?(d.moStackItems[g].push(new FixedPos.StackItem(w,b)),d.mfRefreshGroupFunction||(d.mfRefreshGroupFunction=Utils.debounce(function(n,t){FixedPos.RefreshStackGroup(a,n,t)},10)),b=d.mfRefreshGroupFunction):(yt=b,b=Utils.debounce(function(n,t){yt(n,t)},10));rt=$E(n).parents().add(window);d?(rt.unbind("scroll."+a,b).bind("scroll."+a,b),$(document).unbind("touchmove."+a,b).bind("touchmove."+a,b),$(document).unbind("PositioningCompleted."+a,b).bind("PositioningCompleted."+a,b),$(document).unbind("AnimationCompleted."+a,b).bind("AnimationCompleted."+a,b),$(window).unbind("resize."+a,b).bind("resize."+a,b),$E(n).unbind(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED+"."+a,b).bind(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED+"."+a,b)):(rt.bind("scroll",b),$(document).bind("touchmove",b),$(document).bind("PositioningCompleted",b),$(document).bind("AnimationCompleted",b),$(window).bind("resize",b),$E(n).bind(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,b));FixedPos.Cache.moHandlers[n]=ni;b();Matrix3.RegisterForCleanup(n,"FixedPos",function(){var u,i,r,t;try{if(delete FixedPos.Cache.moHandlers[n],d||(rt.unbind("scroll",b),$(document).unbind("touchmove",b),$(document).unbind("PositioningCompleted",b),$(document).unbind("AnimationCompleted",b),$(window).unbind("resize",b),$E(n).unbind(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,b)),u=k.msId,PostRenderMgr.GetInstance().ExecuteAsap(function(){u&&$("[id='"+u+"']").css("clip-path","")},!1,!0),d){for(i=d.moStackItems[g],r=[],t=0;t<i.length;t++)i[t].moPosItem.GetId()!==n&&r.push(i[t]);r.length===0?(delete d.moStackItems[g],Object.keys(d.moStackItems).length===0&&(delete FixedPos.Cache.moStackGroups[a],rt.unbind("scroll."+a,b),$(document).unbind("touchmove."+a,b),$(document).unbind("PositioningCompleted."+a,b),$(document).unbind("AnimationCompleted."+a,b),$(window).unbind("resize."+a,b),$E(n).unbind(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED+"."+a,b))):d.moStackItems[g]=r}}catch(f){}})}};FixedPos.ActiveBottom=function(n){var e=function(n){for(var r=null,e=null,u=$(n).height(),t=n.parentElement,f=n,i;t&&t.id!="Form1";)i=t.GetHeight()||$(t).height()||0,typeof t.GetHeight!="function"&&Matrix3.LogError("GetHeight is not a function of oParent: "+t.outerHTML),t.style.height&&i&&i<u?(r=t,e=f,u=i):u=Math.max(u,i),!r&&t.classList.contains("PopupScrollContainer")&&(r=t,e=f),f=t,t=t.parentElement;return r||window},t=$PI(n);if(t){var f=e(t),r=$(f),i=function(){var c,l,e,o,s,i,h,k,f,d;
216if(t){if(t.children.length==1&&(c=t.GetWidth(),l=t.children[0].GetWidth(),c>=l))return;var a=t.GetHeight(),v=r.scrollTop()||0,g=r.offset().top,u=r.height()+v,y=Utils.GetRootOrPopupId(n),p=function(n){return!!(Matrix3&&Matrix3.moPopupTable&&Matrix3.moPopupTable.hasOwnProperty(n))},w=function(n){var t=Utils.GetRootOrPopupId(n.id);return t===y?!0:!p(t)&&!p(y)},b=$(".DamView_SelectionBar .SelectionBarMainPnl").filter(function(){return w(this)});b.length>0&&MultipleSelectionMgr.GetInstance().HasVisibleSelectionBar()?(e=b.offset().top,i=Math.round(r.offset().top+r.outerHeight()),e<i&&(u-=i-e)):(o=$('[id$="ExportPnl"].PosFixed').filter(function(){return w(this)}),o.length>0&&(s=o.offset().top,i=Math.round(r.offset().top+r.outerHeight()),s<i&&(u-=i-s)));h=v-(g-$(t).offset().top);k=h+a;f=k>u?Math.max(u-h,0):a;d=$(t.GetNode());d.height()!=f&&t.miFixedHeight!==f&&(t.miFixedHeight=f,t.TransferPositioningToDOM(),FixedPos.TriggerAllVisibilityObservers())}},u=$E(n).parents("div[style*='overflow-y: auto'], form, div[style*='overflow: auto'], div[class*='PopupScrollContainer'], div[class*='ScrollablePanel']").add(window);f!==window&&(u=u.add(f));u.bind("scroll",i);$(document).bind("touchmove",i);$(document).bind("PositioningCompleted",i);$(document).bind("AnimationCompleted",i);i();Matrix3.RegisterForCleanup(n,"FixedPos",function(){try{u.unbind("scroll",i);$(document).unbind("touchmove",i);$(document).unbind("PositioningCompleted",i);$(document).unbind("AnimationCompleted",i)}catch(n){}})}};FixedProperties.prototype={ActiveFixed:function(){$SetStyle(this.msID,"position","absolute");Utils.AddEvent(window,"scroll",this.FixedControl,this)},FixedControl:function(n,t){if(window.clearTimeout(this.moFixedThread),t)$SetStyle(this.msID,"top",document.body.scrollTop),DragDropMgr.RefreshCache();else{var i=this;this.moFixedThread=window.setTimeout(function(){i.FixedControl(null,!0)},500)}}};FocusProperties.prototype={ActiveFocus:function(n){var i,t,r;try{typeof $E(this.msControlID).attr("disabled")=="undefined"&&typeof $E(this.msControlID).attr("readonly")=="undefined"&&($E(Matrix3.msLastFocusedElt).size()==0||Matrix3.msLastFocusedElt==this.msControlID||Utils.IsInTopLevelPopup(this.msControlID,!0))&&(this instanceof ImageCtrl?$Elt(this.msControlID).getElementsByTagName("a")[0].focus():($Elt(this.msControlID).focus(),n||this instanceof TextAreaCtrl?(i=$Elt(this.msControlID).value.length,$Elt(this.msControlID).setSelectionRange?(t=$Elt(this.msControlID),t.setSelectionRange(i,i),t.scrollTop=t.scrollHeight):$Elt(this.msControlID).createTextRange&&(t=$Elt(this.msControlID),r=t.createTextRange(),r.collapse(!0),r.moveStart("character",i),r.moveEnd("character",i),r.select(),t.scrollTop=t.scrollHeight)):$Elt(this.msControlID).select()),Matrix3.msLastFocusedElt=this.msControlID)}catch(u){}},Action_Focus:function(){this.ActiveFocus()}};FoldProperties.Const={OPEN:"open",CLOSE:"close",WRAPPER_SUFFIX:"_pw",TITLE_WRAPPER_SUFFIX:"_ph",TITLE_SUFFIX:"_h",HELPER_SUFFIX:"_hLbl",ARROW_SUFFIX:"_a",TITLE_DIV_SUFFIX:"_t",CONTAINER_SUFFIX:"_c",ANIMATION_LENGTH:.2,MODE_SUFFIX_CLASS:"FoldMode",CONTAINER_CLASS:"FoldContainer",SUFFIX_STATE:"_s",ORIENTATION_LEFT:"left",ORIENTATION_RIGHT:"right",ORIENTATION_TOP:"top",ORIENTATION_BOTTOM:"bottom",ID_HIDDEN_DIV:"FoldProperties_HiddenDiv",SIGNAL_CLOSED:"CLOSED",SIGNAL_OPENED:"OPENED"};FoldProperties.prototype={ActiveFold:function(n,t,i,r,u,f,e,o,s,h){var v=this,a,c,l;this.msMode=n;Utils.Trim(t)!=""&&(this.msTitleOpen=t);this.msTitleClosed=Utils.Trim(i)!=""?i:this.msTitleOpen;e!=""&&(a=parseInt(e),isNaN(a)||(this.miMinCloseSize=a));this.Event_CloseFold=new CtrlEvent(this);this.Event_OpenFold=new CtrlEvent(this);this.Event_FoldStateSessionChanged=new CtrlEvent(this);c=$E(this.msID+FoldProperties.Const.TITLE_SUFFIX);l=c.find("a");l.length>0&&(l.attr("aria-expanded",(this.msMode==FoldProperties.Const.OPEN).toString()),l.attr("role","button"));typeof this.msTitleClosed=="string"&&this.msTitleClosed!=""&&(c.css("left","0px"),c.css("top","0px"),typeof s=="string"&&(this.msBtnSkinFold=s),typeof h=="string"&&(this.msBtnSkinUnfold=h));
216$E(this.msID).css("overflow",this.msMode==FoldProperties.Const.CLOSE?"hidden":"");this.UpdateContentInert();this.GetClickableHeader().bind("click",function(){v.ClickFold()})},ClickFold:function(n,t){var i=$PI(this.msID),l=$E(this.msID+FoldProperties.Const.TITLE_SUFFIX),e=l.find("a"),o,s,h,r,c,u,f;this.msMode==FoldProperties.Const.OPEN?(this.msMode=FoldProperties.Const.CLOSE,PubSub.publish(Utils.GetSignalName(this.msID,FoldProperties.Const.SIGNAL_CLOSED)),e.length>0&&e.attr("aria-expanded","false")):(this.msMode=FoldProperties.Const.OPEN,PubSub.publish(Utils.GetSignalName(this.msID,FoldProperties.Const.SIGNAL_OPENED)),e.length>0&&e.attr("aria-expanded","true"));this.UpdateContentInert();i.SetProperty("Fold",this.msMode);PositionMgr.GetInstance().AddToDirtyXList(i);PositionMgr.GetInstance().AddToDirtyYList(i);i.ForceHasChanged();o=i.GetHeight();n&&(s=Utils.Form1().scrollTop);t||PositionMgr.GetInstance().CalculatePosition();n&&(h=o-i.GetHeight(),Utils.Form1().scrollTop=s-h);r=this;i.HasProperty("FoldStateSessionName")&&$.ajax({type:"GET",url:"htm/AlterSession.aspx?FSID="+encodeURIComponent(i.GetProperty("FoldStateSessionName"))+"&FST="+this.msMode}).done(function(){PreloadMgr.Reset(!0,Utils.GetRootOrPopupId(r.msID));r.Event_FoldStateSessionChanged.Fire()});c=function(n,t){n&&(r.msMode==FoldProperties.Const.CLOSE?(t||$(i.GetNode()).css("padding","0px"),r.msBtnSkinUnfold&&(n.removeClass(r.msBtnSkinUnfold),r.msBtnSkinFold&&n.addClass(r.msBtnSkinFold))):(t||$(i.GetNode()).css("padding",""),r.msBtnSkinFold&&(n.removeClass(r.msBtnSkinFold),r.msBtnSkinUnfold&&n.addClass(r.msBtnSkinUnfold))),t||(n.css("left","0px"),n.css("top","0px")))};c($E(this.msID+FoldProperties.Const.TITLE_SUFFIX),!1);$E(this.msID).css("overflow",this.msMode==FoldProperties.Const.CLOSE?"hidden":"");u=$E(this.msID);this.msMode==FoldProperties.Const.CLOSE?(u.removeClass("PanelUnfolded"),u.addClass("PanelFolded")):(u.removeClass("PanelFolded"),u.addClass("PanelUnfolded"));f=i.moParent;f&&f.msCtrlType==PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&(PositionMgr.GetInstance().AddToDirtyXList(f),PositionMgr.GetInstance().AddToDirtyYList(f),i.ForceHasChanged(),t||PositionMgr.GetInstance().CalculatePosition());this.msMode==FoldProperties.Const.CLOSE?(this.mbIgnoreActions=!0,this.Event_CloseFold.Fire(),this.mbIgnoreActions=!1):(this.mbIgnoreActions=!0,FoldProperties.goOriginatingNode=i,this.Event_OpenFold.Fire(),FoldProperties.goOriginatingNode=null,this.mbIgnoreActions=!1)},Action_OpenFold:function(n,t){return this.msMode==FoldProperties.Const.CLOSE&&!this.mbIgnoreActions?(this.ClickFold(n,t),!0):!1},Action_CloseFold:function(n,t){var f,e,r,u,i;if(this.msMode==FoldProperties.Const.OPEN&&!this.mbIgnoreActions){if(f=!1,FoldProperties.goOriginatingNode!=null){e=$PI(this.msID);function n(n){for(var t=[n];n;n=n.parentNode)t.unshift(n);return t}if(r=n(e.GetNode()),u=n(FoldProperties.goOriginatingNode.GetNode()),r[0]==u[0]&&r.length==u.length)for(i=0;i<r.length;i++)if(r[i]!=u[i]){var o=r[i-1],s=Array.prototype.indexOf.call(o.childNodes,r[i]),h=Array.prototype.indexOf.call(o.childNodes,u[i]);f=h>s;break}}return this.ClickFold(f,t),!0}return!1},Action_ToggleFold:function(n){this.mbIgnoreActions||this.ClickFold(n)},UpdateContentInert:function(){var n=this.GetClickableHeader(),t=this.msMode===FoldProperties.Const.CLOSE,i=n&&n.length?n.siblings():$E(this.msID).children();i.each(function(){var n=$(this);t?n.hasClass("ShowOnFoldedState")?(this.removeAttribute("inert"),this.removeAttribute("aria-hidden")):(this.setAttribute("inert",""),this.setAttribute("aria-hidden","true")):n.hasClass("HideOnUnFoldedState")?(this.setAttribute("inert",""),this.setAttribute("aria-hidden","true")):(this.removeAttribute("inert"),this.removeAttribute("aria-hidden"))})},GetClickableHeader:function(){var n=$E(this.msID+FoldProperties.Const.WRAPPER_SUFFIX);return n&&n.length?n:$E(this.msID+FoldProperties.Const.TITLE_SUFFIX)}};FoldProperties.GetFoldHeight=function(n){var t=n.GetProperty("FoldMinSize"),i,o,u,r,s,f,e,c,h,l;return typeof t=="string"&&(t=parseInt(t)),typeof t!="number"&&(t=0),i=$E(n.msId+FoldProperties.Const.HELPER_SUFFIX),o=$Elt(n.msId+FoldProperties.Const.WRAPPER_SUFFIX),o?t=o.GetHeight():(u=$E(n.msId+FoldProperties.Const.TITLE_SUFFIX),r=u.outerHeight(),i&&i.outerHeight()>0&&(r+=i.outerHeight(),s=i.offset().top-(u.offset().top+u.outerHeight()),s>0&&(r+=s)),f=parseInt(u.css("padding-top")),e=parseInt(u.css("padding-bottom")),typeof r=="number"&&r>t&&(typeof f=="number"&&f>0&&(r+=f),typeof e=="number"&&e>0&&(r+=e),t=r)),c=$E(n.msId),h=c.find(".ShowOnFoldedState"),h.length&&(l=i&&i.length>0?i.outerHeight():0,t+=l,h.each(function(n,i){var r=$Elt(i.id);r&&(t+=r.GetHeight())})),t};FreeHtmlContainer.Const={MGR_NAME:"FreeHtmlContainer"};FreeHtmlContainer.moControlsInUse={};FreeHtmlContainer.moControlsToBeDetached={};FreeHtmlContainer.Activate=function(n){if(n&&(n.GetOriginalWidth()==-1||n.GetOriginalHeight()==-1)){var i=n.msId,t=$(n.GetNode()).find(".FreeHtml"),r=function(){var i=!1;n.GetOriginalWidth()==-1&&(iWidth=t.position().left+t.outerWidth(),iWidth!=n.GetWidth()&&(i=!0));n.GetOriginalHeight()==-1&&(iHeight=t.position().top+t.outerHeight(),iHeight!=n.GetHeight()&&(i=!0));i&&(PositionMgr.GetInstance().AddToDirtyXList(n),PositionMgr.GetInstance().AddToDirtyYList(n),PositionMgr.GetInstance().CalculatePositionAsync())};new ResizeSensor(t,r);r();FreeHtmlContainer.moControlsToBeDetached[i]=FreeHtmlContainer.moControlsInUse[i]!=null?FreeHtmlContainer.moControlsInUse[i]:t;FreeHtmlContainer.moControlsInUse[i]=t;Matrix3.RegisterInCache(i,FreeHtmlContainer)}};FreeHtmlContainer.ClearDisconnectedInstances=function(){var t,n,i;for(n in FreeHtmlContainer.moControlsInUse)t=FreeHtmlContainer.moControlsInUse[n],t==null||t[0]&&t[0].isConnected||(ResizeSensor.detach(t),delete FreeHtmlContainer.moControlsInUse[n]);for(n in FreeHtmlContainer.moControlsToBeDetached)i=FreeHtmlContainer.moControlsToBeDetached[n],i==null||i[0]&&i[0].isConnected||(ResizeSensor.detach(i),delete FreeHtmlContainer.moControlsToBeDetached[n])};FreeHtmlContainer.RefreshNode=function(n){var i,t;FreeHtmlContainer.moControlsToBeDetached[n]!=null&&(i=FreeHtmlContainer.moControlsToBeDetached[n],ResizeSensor.detach(i),delete FreeHtmlContainer.moControlsToBeDetached[n]);t=FreeHtmlContainer.moControlsInUse[n];t==null||t[0]&&t[0].isConnected||delete FreeHtmlContainer.moControlsInUse[n]};GlobalDataProviderProperties.prototype={ActiveGlobalDataProvider:function(n,t){t.forEach(function(t){GlobalDataMgr.GetInstance().SetupData(n,t.name,t.behavior,t.initialData)});Matrix3.RegisterForCleanup(this.msID,GlobalDataMgr.Const.MGR_NAME,function(){try{GlobalDataMgr.GetInstance().Cleanup(n)}catch(t){}})}};HyperlinkProperties.Const={EVENT_LOAD_FRAME:"LOAD_FRAME",EVENT_LOAD_POPUP:"LOAD_POPUP",FLASHID_LINK_SEPARATOR:"/",ADDITIONALS_SEPARATOR:"|"};HyperlinkProperties.OpenLink=function(n){var i,t,r,u;if(n){if(i=Utils.IsAndroid()||Utils.IsIPad(),i&&typeof MultipleSelectionMgr!="undefined"&&(t=MultipleSelectionMgr.GetInstance(),t&&t.IsNodeInActiveSelectionGroup(n)))return;r=n.href;u=n.target;HyperlinkProperties.OpenLinkWithTarget(r,u,n)}};HyperlinkProperties.ShouldPreventEvent=function(n){var t=$(n),i;return t.length==0?!1:t.closest("a").length||t.closest("input").length?!0:(i=["Input","TextBox","TextArea","CheckBox","Date","Time","DropDownList","RadioButtonList","AutoComp","PreventClickEvent"],i.some(function(n){return t.hasClass(n)||t.closest("."+n).length}))?!0:!1};HyperlinkProperties.PnlClick=function(n,t,i,r){var u=!1,f;return(n.target&&(f=$(n.target).closest("div[onclick]").get(0),f&&$.contains(r,f)&&(u=!0)),n.AlreadySe
216ntEvent&&(u=!0),!n.target||!u&&!HyperlinkProperties.ShouldPreventEvent(n.target))?(HyperlinkProperties.OpenLinkWithTarget(t,i,r),!0):!Utils.IsIE()};HyperlinkProperties.OpenLinkWithTarget=function(n,t,i){var r,f,u,e;if(Utils.Trim(n)!="")switch(t){case null:case"":case"_self":document.location=n;break;case"_blank":window.open(n);break;case"_MatrixPopup":for(r=i.parentNode;!r.id;)r=r.parentNode;f=r.id.split(Matrix3.Const.SEPARATOR_CONTROL);Matrix3.AddEvent(f[0],HyperlinkProperties.Const.EVENT_LOAD_POPUP,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,encodeURIComponent(n));break;default:u=ControlMgr.GetInstance().GetReference(t);u&&(e=t+HyperlinkProperties.Const.FLASHID_LINK_SEPARATOR+encodeURIComponent(n),Matrix3.AddEvent(u.GetId(),HyperlinkProperties.Const.EVENT_LOAD_FRAME,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,e))}};HyperlinkProperties.prototype={Action_OpenLink:function(){var n=$Elt(this.msID).getElementsByTagName("a").item(0);HyperlinkProperties.OpenLink(n)},OpenLink:function(n,t){if(Utils.IsIE()&&(t=t?$.event.fix(t):$.event.fix(window.event)),t&&t.which>1)return!0;t.preventDefault();var i=$Elt(this.msID).getElementsByTagName("a").item(0),r=$(i).attr("href");return n&&$(i).attr("href",n),this.Action_OpenLink(),n&&$(i).attr("href",r),!1},Action_OpenLinkInNewWindow:function(n){var t=n.split(HyperlinkProperties.Const.ADDITIONALS_SEPARATOR),i="",s,a,v,y,p,h,c,e,f,o,w,b,k,l;t&&t.length>0&&(i=t[0]);s="";t&&t.length>1&&(s=t[1]);var u=Utils.GetOptions(s),d="",r="";u[HyperlinkCtrl.Const.WINDOW_TITLE]&&(d=u[HyperlinkCtrl.Const.WINDOW_TITLE]);u[HyperlinkCtrl.Const.WINDOW_OPTIONS]&&(r=u[HyperlinkCtrl.Const.WINDOW_OPTIONS]);a=document.body.clientWidth;v=document.body.clientHeight;y=Utils.IsIE()?window.screenLeft:window.screenX;p=Utils.IsIE()?window.screenTop:window.screenY;f=new RegExp(/width( )*=( )*([0-9]+)/i);e=r.match(f);e!=null&&e.length>0&&(h=parseInt(e[3]));f=new RegExp(/height( )*=( )*([0-9]+)/i);o=r.match(f);o!=null&&o.length>0&&(c=parseInt(o[3]));h&&(w=(a-h)/2+y,r+=", left="+w);c&&(b=(v-c)/2+p+150,r+=", top="+b);Utils.IsStringFilled(i)&&Utils.Trim(i)!==""||(i=$Elt(this.msID).getElementsByTagName("a").item(0).href);Utils.Trim(i)!=""&&(k=window.open(i,"_blank",r),l=this,k.onbeforeunload=function(){l.Event_TargetWindowClosed&&l.Event_TargetWindowClosed.Fire()})},Event_TargetWindowClosed_Setup:function(){this.Event_TargetWindowClosed=new CtrlEvent(this)}};InPlaceEditorProperties.Const={TEXTSWAP_LABEL_SUFFIX:"_LblV",TEXTSWAP_DEFAULTVALUE_SUFFIX:"_DV"};InPlaceEditorProperties.prototype={Action_TextSwap:function(){var n=$Elt(this.msID),t=$Elt(this.msID+InPlaceEditorProperties.Const.TEXTSWAP_LABEL_SUFFIX),r=$Elt(this.msID+InPlaceEditorProperties.Const.TEXTSWAP_DEFAULTVALUE_SUFFIX),i;n!=null&&t!=null&&($S(n,"display")!="none"?($SetStyle(n,"display","none"),$SetStyle(t,"display","block"),i=n.value,t.innerHTML=i,r!=null&&(i==null||Utils.Trim(i)=="")&&(t.innerHTML=r.innerHTML)):($SetStyle(n,"display","block"),n.focus(),$SetStyle(t,"display","none")))}};LoadingAjaxMgr.moSingleton=null;LoadingAjaxMgr.GetInstance=function(){return LoadingAjaxMgr.moSingleton||(LoadingAjaxMgr.moSingleton=new LoadingAjaxMgr),LoadingAjaxMgr.moSingleton};LoadingAjaxMgr.prototype={Add:function(n){this.aoLoadings.push(n)},DisplayAll:function(){for(var n=0,t=this.aoLoadings.length;n<t;n++)this.aoLoadings[n].Display()},HideAll:function(){for(var n=0,t=this.aoLoadings.length;n<t;n++)this.aoLoadings[n].Hide()}};LoadingAjaxProperties.Const={SUFFIX_MASK:"_Mask",CLASS_MASK:"LoadingMask"};LoadingAjaxProperties.prototype={ActiveLoadingAjax:function(){LoadingAjaxMgr.GetInstance().Add(this);var n=document.createElement("div");n.className=LoadingAjaxProperties.Const.CLASS_MASK;n.id=this.msID+LoadingAjaxProperties.Const.SUFFIX_MASK;$SetStyle(n,"display","none");document.body.appendChild(n)},Display:function(){var t=this,n=t.msID+LoadingAjaxProperties.Const.SUFFIX_MASK,i;$SetStyle(n,"width","100%");$SetStyle(n,"height","100%");i=function(){$SetStyle(n,"width",Utils.GetPageWidth()+"px");$SetStyle(n,"height",Utils.GetPageHeight()+"px")};window.setTimeout(i,1);$SetStyle(t.msID,"display","block");$SetStyle(n,"display","block")},Hide:function(){$SetStyle(this.msID,"display","none");$SetStyle(this.msID+LoadingAjaxProperties.Const.SUFFIX_MASK,"display","none")}};LoadingPostBackMgr.moSingleton=null;LoadingPostBackMgr.GetInstance=function(){return LoadingPostBackMgr.moSingleton||(LoadingPostBackMgr.moSingleton=new LoadingPostBackMgr),LoadingPostBackMgr.moSingleton};LoadingPostBackMgr.Const={MGR_NAME:"LoadingPostBack"};LoadingPostBackMgr.prototype={Add:function(n){this.aoLoadings[n.msID]=n;
216Matrix3.RegisterInCache(n.msID,LoadingPostBackMgr)},DisplayAll:function(){for(var n in this.aoLoadings)this.aoLoadings[n].Display()},HideAll:function(){for(var n in this.aoLoadings)this.aoLoadings[n].Hide()},RefreshNode:function(n){this.aoLoadings[n].Remove();delete this.aoLoadings[n]}};LoadingPostBackProperties.Const={SUFFIX_MASK:"_Mask",CLASS_MASK:"LoadingMask"};LoadingPostBackProperties.prototype={ActiveLoadingPostBack:function(){LoadingPostBackMgr.GetInstance().Add(this);var n=document.createElement("div");n.className=LoadingPostBackProperties.Const.CLASS_MASK;n.id=this.msID+LoadingPostBackProperties.Const.SUFFIX_MASK;$SetStyle(n,"display","none");document.body.appendChild(n)},Display:function(){var t=this,n=t.msID+LoadingPostBackProperties.Const.SUFFIX_MASK,i;$SetStyle(n,"width","100%");$SetStyle(n,"height","100%");i=function(){$SetStyle(n,"width",Utils.GetPageWidth()+"px");$SetStyle(n,"height",Utils.GetPageHeight()+"px")};window.setTimeout(i,1);$SetStyle(t.msID,"display","block");$SetStyle(n,"display","block")},Hide:function(){$SetStyle(this.msID,"display","none");$SetStyle(this.msID+LoadingPostBackProperties.Const.SUFFIX_MASK,"display","none")},Remove:function(){var n=this.msID+LoadingPostBackProperties.Const.SUFFIX_MASK;$Elt(n).parentNode.removeChild($Elt(n))}};LoadingProperties.Const={SUFFIX_MASK:"_Mask"};LoadingProperties.prototype={ActiveLoading:function(){var t=this,n=t.msID+LoadingProperties.Const.SUFFIX_MASK,i;$SetStyle(n,"width","100%");$SetStyle(n,"height","100%");i=function(){$SetStyle(n,"width",Utils.GetPageWidth()+"px");$SetStyle(n,"height",Utils.GetPageHeight()+"px")};window.setTimeout(i,1);window.setTimeout(function(){$SetStyle(t.msID,"display","none");$SetStyle(n,"display","none")},500)},DisplayLoading:function(){var t=this,n=t.msID+LoadingProperties.Const.SUFFIX_MASK,i;$SetStyle(n,"width","100%");$SetStyle(n,"height","100%");i=function(){$SetStyle(n,"width",Utils.GetPageWidth()+"px");$SetStyle(n,"height",Utils.GetPageHeight()+"px")};window.setTimeout(i,1);$SetStyle(t.msID,"display","block");$SetStyle(n,"display","block")},Action_DisplayLoading:function(){this.DisplayLoading()}};MatrixEventProperties.Const={SEPARATOR:";",POSITION_SEPARATOR:"-",EVENT_CLICK_DELAY_TIME:200};MatrixEventProperties.prototype={HandleSendEvent:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k){var g,tt,nt,ut,d,it,rt;if(this.Event_SendEvent&&this.Event_SendEvent.Fire(),g=null,tt=!1,Matrix3.mbPreloading||(nt=$PI(this.msID),nt!=null&&nt.HasProperty("PID")&&(g=PreloadMgr.GetEventResponse(nt),g==null&&(tt=PreloadMgr.ControlEventFired(nt)))),!tt)if(g==null){if(t=="$EXIT_POPUP$")for(d=$Elt(this.msID).parentNode;d!=null;)it=ControlMgr.GetInstance().GetPositionItem(d.id),it&&it.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP&&(ut=!0,Matrix3.RemovePopup(d.id.substring(0,d.id.length-Popup.Const.CONTAINER_SUFFIX.length))),d=d.parentNode;ut||(u=Utils.RestoreEncodingEventArgsIE(u),y||(y=this instanceof CheckBoxCtrl),Matrix3.AddEvent(n,t,i,r,u,f,e,o,s,h,c,l,!1,a,v,y,p,!1,null,w,b,null,null,null,null,k))}else rt={},rt.responseText=g,Matrix3.AjaxSuccess(g,null,rt)},SendEvent:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k){var g,tt,d;if(this instanceof PanelAdvancedCtrl&&p!=null&&p.type=="click"){if(g=$(p.target),p.target&&p.target.nodeName.toLowerCase()==="img"&&p.target.className.indexOf("medium-zoom-image")>=0||p.target.nodeName.toLowerCase()==="video"||p.target.nodeName.toLowerCase()==="a"&&p.target.getAttribute("href")&&p.target.getAttribute("href").length>0&&p.target.getAttribute("href")!="javascript:Matrix3.mbClick=false;void(0);"||g.closest(".Input").length>0||g.closest("input").length>0)return;if(window.getSelection&&window.getSelection()&&window.getSelection().type&&window.getSelection().type.toLowerCase()==="range"){var it=window.getSelection().anchorNode,rt=window.getSelection().focusNode,nt=Utils.GetNearestCommonAncestor(it,rt);if(nt&&(tt=$(nt).closest("[id]"),g.closest(tt).length>0))return}}p&&p.AlreadySentEvent||(d=this,p&&p.type=="click"&&p.currentTarget&&p.currentTarget.ondblclick?d.oEventTimer=setTimeout(function(){p&&p.type=="click"&&d.bPreventEvent||(d.HandleSendEvent(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,null,null,k),p&&p.type=="click"&&(d.bPreventEvent=!1))},MatrixEventProperties.Const.EVENT_CLICK_DELAY_TIME):(this.HandleSendEvent(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p,w,b,k),p&&(p.AlreadySe
216ntEvent=!0)),p&&p.type=="dblclick"&&(clearTimeout(d.oEventTimer),d.bPreventEvent=!0))},SendPostBack:function(n,t,i,r){this.Event_SendPostBack&&this.Event_SendPostBack.Fire();i=Utils.RestoreEncodingEventArgsIE(i);Matrix3.DoPostBack(n,t,i,r)},Action_SendEvent:function(n,t){var e,u,o,f,r;if(!n||n==""||n.indexOf("delay")===0||n.indexOf("modal")===0)o=$Elt(this.msID),o&&(f=o.getElementsByTagName("a").item(0),typeof EventControlAction_ClickHandlers!="undefined"&&EventControlAction_ClickHandlers[this.msID]?(typeof t=="undefined"&&(t=new Event("click")),EventControlAction_ClickHandlers[this.msID](t)):f&&(r=f.getAttribute("data-evt-click"),r||(r=f.getAttribute("onclick")),Utils.IsIE6()&&(r=unescape(r)),r&&r.trim()!==""?Utils.EvalScripts(r):f.click()));else{var i=n.split(MatrixEventProperties.Const.SEPARATOR),c=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],l=i.length>0?i[0]:"",a=i.length>1&&i[1]!=""?i[1]:Matrix3.Const.RETURNTYPE_FULL,v=i.length>2&&i[2]!=""?i[2]:Matrix3.Const.DELAY_IMMEDIAT,y=i.length>3?i[3]:"",p=i.length>4?i[4]:"",w=i.length>5?i[5]:"",b=i.length>6?i[6]:"",k=i.length>7&&i[7]=="true"?!0:!1,d=i.length>8&&i[8]=="true"?!0:!1,s=i[9],h;if(Utils.IsStringFilled(s)&&(e=s.split(MatrixEventProperties.Const.POSITION_SEPARATOR),u=$Elt(this.msID).getBoundingClientRect(),e.length===2)){var g=e[0].toLowerCase(),nt=e[1].toLowerCase(),tt=g==="bottom"?u.bottom:u.top,it=nt==="right"?u.right:u.left;h={y:tt,x:it}}this.SendEvent(c,l,a,v,y,p,w,null,null,b,d,null,null,null,k,null,undefined,h)}},Action_SendPostBack:function(n){var u,r,t;if(n&&n!=""){var i=n.split(MatrixEventProperties.Const.SEPARATOR),f=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],e=i.length>0?i[0]:"",o=i.length>1?i[1]:"";this.SendPostBack(f,e,o)}else u=$Elt(this.msID),u&&(r=u.getElementsByTagName("a").item(0),typeof EventControlAction_ClickHandlers!="undefined"&&EventControlAction_ClickHandlers[this.msID]?EventControlAction_ClickHandlers[this.msID]():(t=r.getAttribute("data-evt-click"),t||(t=r.getAttribute("onclick")),Utils.IsIE6()&&(t=unescape(t)),t&&t.trim()!==""?Utils.EvalScripts(t):r.click()))},Event_SendEvent_Setup:function(){this.Event_SendEvent=new CtrlEvent(this)},Event_SendPostBack_Setup:function(){this.Event_SendPostBack=new CtrlEvent(this)},Active_ReloadInterval:function(n){var t=this;window.setInterval(function(){Matrix3.HasEventsInProgress()||t.Action_SendEvent()},parseInt(n))}};MenuGroupMgr.moSingleton=null;MenuGroupMgr.GetInstance=function(){return MenuGroupMgr.moSingleton||(MenuGroupMgr.moSingleton=new MenuGroupMgr),MenuGroupMgr.moSingleton};MenuProperties.Const={PROPERTY_MENUGROUP:"MenuGroup",PROPERTY_SUBMENU_PANEL:"SubMenuPanel",PROPERTY_OPEN_TRIGGER:"OpenTrigger",PROPERTY_CLOSE_ON_MOUSE_OUT:"CloseOnMouseOut",OPTION_GROUPID:"groupid",OPTION_LEVEL:"level",PROPERTY_ACTIVE_SKIN:"ActiveSkin",PROPERTY_CLOSE_ON_CLICK_OUT:"CloseOnClickOut",PROPERTY_PERSISTANT_STATE:"PersistantState",OPEN_TRIGGER_V_CLICK:"click",OPEN_TRIGGER_V_OVER:"over",CLASS_AUTO_PLACEMENT:"MenuAutoPlacement"};MenuGroupMgr.prototype={ConfigureMenuControl:function(n){var r=n.GetProperty(MenuProperties.Const.PROPERTY_CLOSE_ON_CLICK_OUT,!1),u=n.GetProperty(MenuProperties.Const.PROPERTY_PERSISTANT_STATE,!0),i=n.GetContainerForChildren(),t;for(var f in i)t=i[f],t.IsContainer()||MenuGroupMgr.ApplyMenuGroupToChild(t,0,n.msId,u,r)},RegisterControl:function(n,t){this.moMenuGroups.hasOwnProperty(n)||(this.moMenuGroups[n]=[]);this.moMenuGroups[n].push(t)},UnregisterControl:function(n,t){if(this.moMenuGroups.hasOwnProperty(n)){var i=this.moMenuGroups[n];i.splice(Utils.IndexOf(i,t),1)}},RecalculateMenu:function(n){var r=!1,t,i;for(t in this.moMenuGroups)i=this.moMenuGroups[t],i.length>0&&i[0].mbCloseOnClickOut&&(n.type=="click"||n.type=="touchend")&&MenuGroupMgr.CloseAllIfMouseOutMenu(t,n)&&(r=!0);r&&PositionMgr.GetInstance().CalculatePositionAsync()}};MenuGroupMgr.ApplyMenuGroupToChild=function(n,t,i,r,u){var f,v=$Elt(n.msId),e=new MenuProperties,o,h,c,a,l,s;if(e.ActivateMenuGroupProperties(n,i,t,n.GetProperty(MenuProperties.Const.PROPERTY_OPEN_TRIGGER,MenuProperties.Const.OPEN_TRIGGER_V_CLICK),n.GetProperty(MenuProperties.Const.PROPERTY_CLOSE_ON_MOUSE_OUT,!1),r,u),f=e.IsOpened(),o=e.GetLinkedPanel(),o!=null){h=o.GetContainerForChildren();for(a in h)c=h[a],c.IsContainer()||(f=MenuGroupMgr.ApplyMenuGroupToChild(c,t+1,i,r,u)||f);for(l=o.querySelectorAll("a[role='menuitem']"),s=0;s<l.length;s++)l[s].tabIndex="-1"}return f&&MenuGroupMgr.ApplyActiveClassAndOpenSubPanel(e),f};MenuGroupMgr.MakeControlActive=function(n,t){var s=MenuGroupMgr.GetInstance().moMenuGroups[n],f=-1,e,o,u,h,c,i,r;t!=null&&(f=t.GetLevel());o=!1;for(h in s)u=s[h],u.GetLevel()==f&&(i=u.moPosItem,r=u.GetLinkedPanel(),u==t?(e=i.GetProperty(ConstProperties.URL,null),o=e!=null,i.HasProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$AddClass(i.msId,i.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)),r!=null&&(c=MenuGroupMgr.UpdatePanelState(r,!0),c&&$(r).hasClass(MenuProperties.Const.CLASS_AUTO_PLACEMENT)&&function(n,t){var i=function(){var u=$(n).offset(),i=$(t).offset(),r;(i.top<0||i.top+$(t).outerHeight()>
216Utils.GetViewportHeight())&&(r=i.top-(u.top+$(n).outerHeight()/2),$(t).css("transform","translateY(calc(-100% - "+r*2+"px))"))};$(document).one("PositioningCompleted",i)}(i,r))):(i.HasProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$RemoveClass(i.msId,i.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)),r!=null&&MenuGroupMgr.UpdatePanelState(r,!1))),u.GetLevel()>f&&(i=u.moPosItem,r=u.GetLinkedPanel(),o&&i.GetProperty(ConstProperties.URL)==e?i.HasProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$AddClass(i.msId,i.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)):(i.HasProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$RemoveClass(i.msId,i.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)),r!=null&&MenuGroupMgr.UpdatePanelState(r,!1)));PositionMgr.GetInstance().CalculatePosition()};MenuGroupMgr.CloseAllIfMouseOutMenu=function(n,t){var c=!1,u=MenuGroupMgr.GetInstance().moMenuGroups[n],r=!0,i,f,s,h;for(f in u)if(i=u[f],i.moPosItem.IsUnderMouse(t,!0))if(i.moLinkedPanel){if(i.moLinkedPanel.moProperties.ShowCounter<=1){r=!1;break}}else{r=!1;break}else if(i.moLinkedPanel&&i.moLinkedPanel.IsUnderMouse(t)){r=!1;break}else{var e=$.event.fix(t),l=$(i.moPosItem),o=$(i.moPosItem).offset();if(e.pageX>=o.left&&e.pageX<=o.left+l.width()&&e.pageY>=o.top&&e.pageY<=o.top+l.height()){r=!1;break}}if(r)for(f in u)i=u[f],s=i.moPosItem,h=i.GetLinkedPanel(),s.hasOwnProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$RemoveClass(s.msId,s.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)),h!=null&&(c=MenuGroupMgr.UpdatePanelState(h,!1));return c};MenuGroupMgr.CloseAll=function(n){var u=!1,f=MenuGroupMgr.GetInstance().moMenuGroups[n],i,e,t,r;for(e in f)i=f[e],t=i.moPosItem,r=i.GetLinkedPanel(),t.hasOwnProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$RemoveClass(t.msId,t.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)),r!=null&&MenuGroupMgr.UpdatePanelState(r,!1)&&(u=!0);return u};MenuGroupMgr.UpdatePanelState=function(n,t,i){var e=!1,o,u,r,f;if(n.moProperties&&n.moProperties.hasOwnProperty("Fold")){if(t&&n.moProperties.Fold!=FoldProperties.Const.OPEN)for(n.moProperties.ShowCounter=1+("ShowCounter"in n.moProperties?n.moProperties.ShowCounter:0),$Control(n.GetId()).Action_OpenFold(undefined,!0),e=!0,o=n.querySelectorAll("[data-tabidx]"),u=o.length>1?o:n.querySelectorAll("a[role='menuitem']"),r=0;r<u.length;r++)f=u[r].getAttribute("data-tabidx"),u[r].tabIndex=f?f:"0",u[r].__disableFocusBackupTabIndex=f?f:"0";else t||n.moProperties.Fold==FoldProperties.Const.CLOSE||(n.moProperties.ShowCounter=0,$Control(n.GetId()).Action_CloseFold(undefined,!0),e=!0);e&&(PositionMgr.GetInstance().AddToDirtyYList(n),n.ForceHasChanged(),$(n).css({transform:"",height:0}));t?Utils.RestoreFocus(n.GetId(),i):Utils.DisableFocus(n.GetId())}return e};MenuGroupMgr.ApplyActiveClassAndOpenSubPanel=function(n){var t=n.moPosItem,i=n.GetLinkedPanel();t.HasProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN)&&$AddClass(t.msId,t.GetProperty(MenuProperties.Const.PROPERTY_ACTIVE_SKIN));i!=null&&MenuGroupMgr.UpdatePanelState(i,!0)};MenuProperties.prototype={ActivateMenuGroupProperties:function(n,t,i,r,u,f,e){var b,o,c,h,l,k,p,s,v,y,w,d,a;r==undefined&&(r=MenuProperties.Const.OPEN_TRIGGER_V_CLICK);u==undefined&&(u=!1);this.moPosItem=n;this.msGroupID=t;this.miLevel=parseInt(i);this.msOpenTrigger=r;this.mbCloseSubPanelOnMouseOut=u;this.mbCloseOnClickOut=e;this.mbLinkedPanelResolved=!1;this.mbOpened=!1;MenuGroupMgr.GetInstance().RegisterControl(this.msGroupID,this);b=this;Matrix3.RegisterForCleanup(n.GetId(),"MenuProperties|"+t,function(){MenuGroupMgr.GetInstance().UnregisterControl(t,b)});this.GetLinkedPanel();Utils.AddEvent(this.moLinkedPanel,"keydown",this.KeyDownSubMenuHandler,this);this.mbCloseSubPanelOnMouseOut&&this.moLinkedPanel!=null&&(Utils.AddEvent(this.moPosItem,"mouseout",this.MouseOutItemHandler,this),Utils.AddEvent(this.moLinkedPanel,"mouseout",this.MouseOutSubMenuHandler,this));switch(this.msOpenTrigger){case MenuProperties.Const.OPEN_TRIGGER_V_CLICK:Utils.AddEvent(this.moPosItem,"click",this.ClickHandler,this);break;case MenuProperties.Const.OPEN_TRIGGER_V_OVER:Utils.AddEvent(this.moPosItem,"mouseover",this.ClickHandler,this)}if(f){for(o=null,c=null,s=0,v=this.moPosItem.GetChildNodes().length;s<v;s++)if(h=this.moPosItem.GetChildNodes()[s],h.nodeType==1&&h.tagName.toUpperCase()=="A"){h.attributes.href&&(o=h.attributes.href.value);c=h.attributes.target?h.attributes.target.value:"_self";break}if(o!=null&&c!=null)if(c!="_self"){if(l=FramesMgr.GetInstance().GetFrameContent(c),l!=null&&(o.indexOf("C.aspx?VP3=CMS3")!=-1||o.indexOf("CS.aspx?VP3=CMS3")!=-1)&&o.indexOf("VF="+l)!=-1&&(k=o.indexOf("VF="+l),o=o.substring(k+l.length+3),(o.length==0||o.charAt(0)=="&"||o.indexOf("_VForm")==0)&&(this.mbOpened=!0,o.indexOf("&")!=-1)))for(a=Matrix3.msURL,p=o.split("&"),s=0,v=p.length;s<v;s++)y=p[s],w=y.indexOf("="),w!=-1&&(d=y.substring(0,w),a.indexOf(d+"=")!=-1&&a.indexOf(y)==-1&&(this.mbOpened=!1))}else a=Matrix3.msURL,this.mbOpened=o.length>0&&a.endsWith(o)}},GetLevel:function(){return this.miLevel},IsOpened:function(){return this.mbOpened},GetLinkedPanel:function(){var n,t;return this.mbLinkedPanelResolved||(this.moLinkedPanel=null,n=this.moPosItem.GetProperty(MenuProperties.Const.PROPERTY_SUBMENU_PANEL),Utils.IsStringFilled(n)&&(t=this.moPosItem.GetBrotherId(n),this.moLinkedPanel=$PI(t),this.moLinkedPanel&&(this.moLinkedPanel.__oFocusFallbackTrigger=this.moPosItem)),this.mbLinkedPanelResolved=!0),this.moLinkedPanel},ClickHandler:function(n){var t=$PI(this.msGroupID);this.moLinkedPanel!=null||t==null||t.GetProperty(MenuProperties.Const.PROPERTY_PERSISTANT_STATE,!0)?this.msOpenTrigger===MenuProperties.Const.OPEN_TRIGGER_V_CLICK&&this.moLinkedPanel!=null&&this.moLinkedPanel.moProperties&&this.moLinkedPanel.moProperties.Fold==FoldProperties.Const.OPEN&&t!=null&&!t.GetProperty(MenuProperties.Const.PROPERTY_PERSISTANT_STATE,!0)?MenuGroupMgr.UpdatePanelState(this.moLinkedPanel,!1)&&PositionMgr.GetInstance().CalculatePosition():MenuGroupMgr.MakeControlActive(this.msGroupID,this):MenuGroupMgr.CloseAll(this.msGroupID)&&PositionMgr.GetInstance().CalculatePosition();n!=null&&(n.stopPropagation(),this.miLevel===0&&MenuGroupMgr.GetInstance().RecalculateMenu(n))},MouseOutItemHandler:function(n){this.mbCloseSubPanelOnMouseOut&&this.moLinkedPanel!=null&&(this.moPosItem.IsUnderMouse(n,!0)||this.moLinkedPanel.IsUnderMouse(n,!0)||(MenuGroupMgr.UpdatePanelState(this.moLinkedPanel,!1),PositionMgr.GetInstance().CalculatePosition()))},KeyDownSubMenuHandler:function(n){var i=!1,t;this.moLinkedPanel!=null&&(n.keyCode===27&&(i=MenuGroupMgr.UpdatePanelState(this.moLinkedPanel,!1,!0),t=$(this.moPosItem).find("a")[0],t?t.focu
216s():this.moPosItem.focus()),n&&n.keyCode&&(n.keyCode===37||n.keyCode===39)&&n.stopPropagation());i&&(PositionMgr.GetInstance().CalculatePosition(),Utils.IsInAnyPopup(this.moPosItem.GetId())&&n.stopPropagation())},MouseOutSubMenuHandler:function(n){var i,f,t;if(this.mbCloseSubPanelOnMouseOut&&this.moLinkedPanel!=null&&!this.moLinkedPanel.IsUnderMouse(n)&&!this.moPosItem.IsUnderMouse(n,!0)){var r=!0,u=this.moLinkedPanel.GetContainerForChildren(),e=u.length;for(i=0;i<e;i++)f=u[i],r=r&&!f.IsUnderMouse(n,!1);if(r){for(MenuGroupMgr.UpdatePanelState(this.moLinkedPanel,!1),t=this.moPosItem.moParent;t!=null&&!t.moProperties.hasOwnProperty(ConstProperties.Const.IS_MENU);){if(t.moProperties&&t.moProperties.hasOwnProperty("Fold"))if(t.moProperties.Fold!=FoldProperties.Const.OPEN||t.IsUnderMouse(n,!0))break;else t.moProperties.Fold=FoldProperties.Const.CLOSE,PositionMgr.GetInstance().AddToDirtyYList(t);t=t.moParent}PositionMgr.GetInstance().CalculatePosition()}}}};MountMgr.moSingleton=null;MountMgr.GetInstance=function(){return MountMgr.moSingleton||(MountMgr.moSingleton=new MountMgr),MountMgr.moSingleton};MountMgr.Const={CLASS_MOUNT:"MountC",DEFAULT_BACKGROUND:"#000000"};MountMgr.prototype={ActiveMount:function(n){this.mbIsMountActive||($AddClass(Matrix3.Const.ID_PANEL_MAIN,MountMgr.Const.CLASS_MOUNT),this.msBodyBackground=document.body.style.backgroundColor?document.body.style.backgroundColor:"#ffffff",n||(n=MountMgr.Const.DEFAULT_BACKGROUND),document.body.style.backgroundColor=n,this.mbIsMountActive=!0,this.MountChange.Fire())},EndMount:function(){this.mbIsMountActive&&($RemoveClass(Matrix3.Const.ID_PANEL_MAIN,MountMgr.Const.CLASS_MOUNT),document.body.style.backgroundColor=this.msBodyBackground,this.mbIsMountActive=!1,this.MountChange.Fire())},IsActive:function(){return this.mbIsMountActive}};MountProperties.prototype={Action_ActiveMount:function(n){MountMgr.GetInstance().ActiveMount(n)},Action_EndMount:function(){MountMgr.GetInstance().EndMount()},Action_InvertMount:function(n){MountMgr.GetInstance().IsActive()?MountMgr.GetInstance().EndMount():MountMgr.GetInstance().ActiveMount(n)}};MultipleSourcesProperties.Const={PROPERTY_MULTIPLE_SOURCE:"MultipleSources",PROPERTY_MULTIPLE_SOURCE_MODE:"MultipleSourcesMode",SEPARATOR_ELEMENTS:";",SEPARATOR_VALUES:",",SEPARATOR_DIMENSIONS:"*",MODE_RESIZE_WIDTH:"ResizeWidth",MODE_RESIZE_HEIGHT:"ResizeHeight",MODE_RESIZE_RATIO:"ResizeRatio",MODE_DEFAULT:"Default",MODE_MOUNT:"Mount"};HTMLElement.prototype.ActiveMultipleSources=function(){this.moMultSourceTable=this.GetMultipleSources(this.GetProperty(MultipleSourcesProperties.Const.PROPERTY_MULTIPLE_SOURCE));this.msMultSrcMode=this.GetProperty(MultipleSourcesProperties.Const.PROPERTY_MULTIPLE_SOURCE_MODE,MultipleSourcesProperties.Const.MODE_DEFAULT);this.msMultSrcCurrentPath=null};HTMLElement.prototype.ApplyMultipleSources=function(){var n=null,u,i,r,o,e,s;switch(this.msMultSrcMode){case MultipleSourcesProperties.Const.MODE_RESIZE_RATIO:{var h=parseFloat(this.GetWidth()),c=parseFloat(this.GetHeight()),t=[];for(u in this.moMultSourceTable)if(i=u.split(MultipleSourcesProperties.Const.SEPARATOR_DIMENSIONS),i.length==2){var l=parseFloat(i[0]),a=parseFloat(i[1]),v=Math.min(l/h,a/c),f={};f.covereage=v;f.path=this.moMultSourceTable[u];t.push(f)}function y(n,t){return n.covereage-t.covereage}for(t.sort(y),r=0,o=t.length;r<o;r++)if(e=t[r],s=e.covereage,s>1){n=e.path;break}n==null&&t.length>0&&(n=t[t.length-1].path)}}n!=null&&n!=this.msMultSrcCurrentPath&&(this.msMultSrcCurrentPath=n,ImageMgr.GetInstance().Push(this.moLinkedImage,this),this.moLinkedImage.src=n)};HTMLElement.prototype.GetMultipleSources=function(n){var u={},i,t,f,r;if(n!=null&&n!="")for(i=n.split(MultipleSourcesProperties.Const.SEPARATOR_ELEMENTS),t=0,f=i.length;t<f;t++)r=i[t].split(MultipleSourcesProperties.Const.SEPARATOR_VALUES),u[r[0]]=r[1];return u};PositionGroupProperties.moGroups={};PositionGroupProperties.moRevertGroups={};PositionGroupProperties.Const={UNIT_DIAMETER:10,ID_POSITION_GROUP_CIRCLE:"PositionGroupCircle",ANIMATION_DELAY:.2,MGR_NAME:"PositionGroup",OPTION_DISPATCH:"dispatch",OPTION_FLASH_ID:"flash_id",DATA_POSITION_GROUP_TYPE:"PositionGroupType",ATTR_POSITION_GROUP:"data-pg",POSITION_GROUP_SCREEN:"screen",POSITION_GROUP_POPUP:"popup",POSITION_GROUP_POPUP_TITLE_BAR:"popuptitlebar",POSITION_GROUP_NOTIFICATION:"notification",POSITION_GROUP_FLASH_ID:"flash_id",CLASS_BYPASS_POPUP_MASK:"bypass-popup-fixed"};PositionGroupProperties.ReinitPositionGroup=function(n){var s=Utils.GetAbsoluteWidth(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE),h=Utils.GetAbsoluteHeight(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE),f=Utils.GetY($Elt(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE)),e=Utils.GetX($Elt(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE)),i=Utils.GetMousePosition(n),c,u,r,o,t,l;if(!(i[0]>e&&i[0]<e+s&&i[1]>f&&i[1]<f+h)){c=[];for(u in PositionGroupProperties.moGroups)for(r=0,o=PositionGroupProperties.moGroups[u].length;r<o;r++)t=PositionGroupProperties.moGroups[u][r],l={top:{to:t.miPositionGroupOriginalY},left:{to:t.miPositionGroupOriginalX}},$E(t.msID).animate({top:t.miPositionGroupOriginalY,left:t.miPositionGroupOriginalX},PositionGroupProperties.Const.ANIMATION_DELAY*100,function(){DragDropMgr.RefreshCache()}),$SetStyle(t.msID,"zIndex",90),t.mbPositionedItem=!1;$SetStyle(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE,"display","none")}};PositionGroupProperties.RefreshNode=function(n){for(var i,t,f,r=0,u=PositionGroupProperties.moRevertGroups[n].length;r<u;r++)for(i=PositionGroupProperties.moGroups[PositionGroupProperties.moRevertGroups[n]],t=0,f=i.length;t<f;t++)if(i[t].msID==n){i.splice(t,1);break}delete PositionGroupProperties.moRevertGroups[n]};PositionGroupProperties.GetSuitableDisplayHost=function(n,t){for(sRefPosItem=n.moParent;sRefPosItem!=null&&sRefPosItem.msCtrlType!=PositionItem.Const.CONTROL_TYPE_POPUP&&($.inArray($(sRefPosItem.GetNode()).css("overflow-x"),["hidden","visible","clip"])>-1&&$.inArray($(sRefPosItem.GetNode()).css("overflow-y"),["hidden","visible","clip"])>-1||t);)sRefPosItem=sRefPosItem.moParent;return sRefPosItem==null&&(sRefPosItem=ControlMgr.GetInstance().GetRootPositionItem()),sRefPosItem};PositionGroupProperties.prototype={ActivePositionGroup:function(n,t,i,r){var c=this,l=function(n,t,i,r){return function(){c.ActivePositionGroup(n,t,i,r)}}(n,t,i,r),h,u,f,o,s,e;if(i||(i=ControlMgr.GetInstance().GetReference(n)),i!=undefined||n==PositionGroupProperties.Const.POSITION_GROUP_SCREEN||n==PositionGroupProperties.Const.POSITION_GROUP_POPUP||n==PositionGroupProperties.Const.POSITION_GROUP_POPUP_TITLE_BAR||n==PositionGroupProperties.Const.POSITION_GROUP_NOTIFICATION||n==PositionGroupProperties.Const.POSITION_GROUP_FLASH_ID){if
216(h=Utils.GetOptions(t),Utils.CreateReference(this.msID),u=$PI(this.msID),u==null)return;if($(u.GetNode()).attr(PositionGroupProperties.Const.ATTR_POSITION_GROUP,n),n==PositionGroupProperties.Const.POSITION_GROUP_SCREEN)i=ControlMgr.GetInstance().GetRootPositionItem();else if(n==PositionGroupProperties.Const.POSITION_GROUP_NOTIFICATION)i=ControlMgr.GetInstance().GetRootPositionItem(),$SetStyle(u.GetNode(),"zIndex",1e5),$('[id="'+this.msID+'"]').data(PositionGroupProperties.Const.DATA_POSITION_GROUP_TYPE,n);else if(n==PositionGroupProperties.Const.POSITION_GROUP_POPUP){for(i=PositionGroupProperties.GetSuitableDisplayHost(u),f=i;f&&f.hasAttribute("data-pg-ignored");)f=PositionGroupProperties.GetSuitableDisplayHost(f);f&&i&&f!=i&&(o=function(n){return function(){n.RecalculatePosition()}}(u),i.addEventListener("scroll",o),Matrix3.RegisterForCleanup(u.GetId(),"FloatingParent_ScrollTransfer_"+i.GetId(),function(){i.removeEventListener("scroll",o)}),i=f);$(u.GetNode()).addClass(PositionGroupProperties.Const.CLASS_BYPASS_POPUP_MASK)}else if(n==PositionGroupProperties.Const.POSITION_GROUP_POPUP_TITLE_BAR){for(i=u;i!=null&&i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_POPUP;)i=i.moParent;i==null&&(i=ControlMgr.GetInstance().GetRootPositionItem())}else n==PositionGroupProperties.Const.POSITION_GROUP_FLASH_ID&&(i=ControlMgr.GetInstance().GetReference(h[PositionGroupProperties.Const.OPTION_FLASH_ID]));if(!i)return;u.moFloatingParent=i;i.GetNode?i.GetNode().appendChild(u.GetNode()):i.appendChild(u.GetNode());r||(u.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyXList(u),PositionMgr.GetInstance().AddToDirtyYList(u),u.ExtractDependences(),PositionMgr.GetInstance().CalculatePosition());s=i.GetId();Utils.IsStringFilled(s)&&(e=u.GetId(),Matrix3.RegisterForCleanup(s,"FloatingParent"+e,function(){PostRenderMgr.GetInstance().ExecuteAsap(function(){var n=$PI(e);if(n&&u==n)try{l()}catch(t){Matrix3.LogWarning("Failed to reactive ActivePositionGroup for position item id='"+e+"' Error: "+t)}},!1,!0)}))}},PositionGroupOver:function(){var a,n,l,f,e,r,p;if(!this.mbPositionedItem){this.mbPositionedItem=!0;var f=Utils.GetAbsoluteWidth(this.msID),e=Utils.GetAbsoluteHeight(this.msID),o=this.miPositionGroupOriginalX,s=this.miPositionGroupOriginalY,t=[];for(n=0,l=PositionGroupProperties.moGroups[this.msPositionGroupParent].length;n<l;n++){var h=PositionGroupProperties.moGroups[this.msPositionGroupParent][n],g=Utils.GetAbsoluteWidth(h.msID),nt=Utils.GetAbsoluteHeight(h.msID),w=h.miPositionGroupOriginalX,b=h.miPositionGroupOriginalY;Math.max(s,b)<=Math.min(s+e,b+nt)&&Math.max(o,w)<=Math.min(o+f,w+g)&&t.push(h)}if(t.length>1){var i=PositionGroupProperties.Const.UNIT_DIAMETER*t.length,tt=Math.PI/2,c=2*Math.PI,u=0;o-i<0&&(c=c/2,u-=tt);s-i<0&&(c=c/2,u==0&&(u-=Math.PI));a=c/t.length;u+=a/2;var v=0,y=0;for(n=0,l=t.length;n<l;n++){f=Utils.GetAbsoluteWidth(t[n].msID);e=Utils.GetAbsoluteHeight(t[n].msID);f>v&&(v=f);e>y&&(y=e);var k=o+i*Math.cos(a*n+u)-f/2,d=s-i*Math.sin(a*n+u)-e/2,it={top:{to:d},left:{to:k}};$E(t[n].msID).animate({top:d,left:k},PositionGroupProperties.Const.ANIMATION_DELAY*100,function(){DragDropMgr.RefreshCache()});$SetStyle(t[n].msID,"zIndex",92);t[n].mbPositionedItem=!0}r=PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE;$Elt(r)||(p=document.createElement("div"),p.id=r,$Elt(this.msPositionGroupParent).GetNode().appendChild(p),Utils.AddEvent(p,"mouseout",PositionGroupProperties.ReinitPositionGroup));$SetStyle(PositionGroupProperties.Const.ID_POSITION_GROUP_CIRCLE,"display","block");$SetStyle(r,"top",s-i-y);$SetStyle(r,"left",o-i-v);$SetStyle(r,"width",2*i+v*2);$SetStyle(r,"height",2*i+y*2)}}}};RelativeProperties.Const={LEFT:"LEFT",RIGHT:"RIGHT",BOTTOM:"BOTTOM",TOP:"TOP",TARGET:"Target",HPOS:"hpos",VPOS:"vpos",VSIDE:"vside",HSIDE:"hside"};RelativeProperties.prototype={ActiveRelative:function(n){var t=Utils.GetOptions(n);this.miRelativeHPos=parseInt(t[RelativeProperties.Const.HPOS]);this.miRelativeVPos=parseInt(t[RelativeProperties.Const.VPOS]);this.msRelativeHSide=t[RelativeProperties.Const.HSIDE];this.msRelativeVSide=t[RelativeProperties.Const.VSIDE];this.msRelativeTarget=t[RelativeProperties.Const.TARGET];isNaN(this.miRelativeHPos)&&(this.miRelativeHPos=0);isNaN(this.miRelativeVPos)&&(this.miRelativeVPos=0);$SetStyle(this.msID,"position","absolute");this.Relative()},Relative:function(){var r=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],n=$Elt(r+Matrix3.Const.SEPARATOR_CONTROL+this.msRelativeTarget),u=Utils.GetX(n),f=Utils.GetY(n),i=u+this.miRelativeHPos,t;this.msRelativeHSide==RelativeProperties.Const.RIGHT&&(i+=Utils.GetAbsoluteWidth(n));$SetStyle(this.msID,"left",i+"px");t=f+this.miRelativeVPos;this.msRelativeVSide==RelativeProperties.Const.BOTTOM&&(t+=Utils.GetAbsoluteHeight(n));$SetStyle(this.msID,"top",t+"px");$RemoveClass(this.msID,StyleMgr.Const.CLASS_INVISIBLE)}};ReorderProperties.prototype={ActiveReorder:function(n,t,i,r,u,f,e,o,s,h,c,l,a,v,y,p){DraggableItem.CurrentHelper=null;var w=n.split(Utils.Const.GROUP_SEPARATOR);this.moDraggableItem?this.moDraggableItem.AddDragGroups(w):this.moDraggableItem=new DraggableItem(this.msID,w,{ReturnType:c,VFormEffects:u,PleaseWaitMsg:f,PageVirtualID:s,ProxyMode:r,ReorderMode:l,DragWithHelperBox:v,DontMoveWhenReorder:a});this.moDraggableItem.mbIsReorder=!0;this.moDroppableItem?this.moDroppableItem.AddDropGroups(w):(this.moDroppableItem=new DroppableItem(this.msID,w,!0),this.moDroppableItem.mbIsReorder=!0);y&&(this.moDroppableItem.mbIsReorder=!0,this.moDroppableItem.moOptions.ReorderWithNewRelation=!0,this.moDraggableItem.moOptions.ReorderWithNewRelation=!0,NearestItemFinder.ResetSearchTree());this.moDroppableItem.moOptions.DropWithHelperBox=v;this.moDraggableItem.moOptions.HighlightOverItem=v;this.moDroppableItem.moOptions.HighlightOverItem=v;this.moDroppableItem.moOptions.ExclusiveDropZone=p;v&&DragDropMgr.AddHighlightOverItemClass(this.msID)},Event_StartDrag_Setup:function(){this.Event_StartDrag=new CtrlEvent}
216,Event_EndDrag_Setup:function(){this.Event_EndDrag=new CtrlEvent},Event_EndDragOnItem_Setup:function(){this.Event_EndDragOnItem=new CtrlEvent}};RequiredProperties.Const={REQUIRED_CLASS:"Required"};RequiredProperties.prototype={RequiredInputSetup:function(){var n,t;try{if(n=$E(this.msControlID),n.val()&&n.val().length!==0||n.addClass(RequiredProperties.Const.REQUIRED_CLASS),typeof n.attr("disabled")=="undefined"){t=this instanceof DropDownListCtrl||this instanceof AutoCompletionCtrl?"change":"input";n.on(t,function(){n.val()&&n.val().length!==0?n.hasClass(RequiredProperties.Const.REQUIRED_CLASS)&&n.removeClass(RequiredProperties.Const.REQUIRED_CLASS):n.addClass(RequiredProperties.Const.REQUIRED_CLASS)})}}catch(i){}}};ResizableProperties.Const={EVENT_RESIZE:"RESIZE",SEPARATOR_SIZE:",",RESIZABLE_ANCHOR_SUFFIX:"_ResizableAnchor"};ResizableProperties.prototype={ActiveResizable:function(){var t=$Elt(this.msID+ResizableProperties.Const.RESIZABLE_ANCHOR_SUFFIX),n=this;$E(t.id).draggable({drag:function(){var l=Event.getPageX(e),a=Event.getPageY(e),v=Utils.GetX(n.msID),y=Utils.GetY(n.msID),o=$Elt(n.msID).parentNode,r,s,h,c,i,u,f;if(o.nodeName.toLowerCase()=="td"){for(r=o,s=0;r.previousSibling;)s++,r=r.previousSibling;for(h=o.parentNode.parentNode.rows,i=0,u=h.length;i<u;i++)f=h[i].childNodes[s],f.width=l-v;for(c=$Elt(n.msID).parentNode.parentNode.childNodes,i=0,u=c.length;i<u;i++)f=c[i],f.height=a-y}else $SetStyle(n.msID,"width",l-v+"px"),$SetStyle(n.msID,"height",a-y+"px");$SetStyle(t,"left","auto");$SetStyle(t,"top","auto");$SetStyle(t,"right","0px");$SetStyle(t,"bottom","0px")},stop:function(){var u,i,r,t,f;n.Event_ResizeEnd&&n.Event_ResizeEnd.Fire();u=n.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0];t=$Elt(n.msID).parentNode;t.nodeName.toLowerCase()=="td"?(i=Utils.GetWidth(t,!0),r=Utils.GetHeight(t,!0)):(i=Utils.GetWidth(n.msID,!0),r=Utils.GetHeight(n.msID,!0));f=i+ResizableProperties.Const.SEPARATOR_SIZE+r+ResizableProperties.Const.SEPARATOR_SIZE+n.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[1];Matrix3.AddEvent(u,ResizableProperties.Const.EVENT_RESIZE,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,f)}})},Event_ResizeEnd_Setup:function(){this.Event_ResizeEnd=new CtrlEvent(this)}};ResizeProperties.Const={LEFT:"LEFT",BOTTOM:"BOTTOM",ALL:"ALL",PROPERTY_SEPARATOR:";"};ResizeProperties.prototype={ActiveResize:function(n,t,i,r,u,f,e){this.miResizeWidth=parseInt(n);this.miResizeHeight=parseInt(t);this.miMaxResizeWidth=parseInt(i);this.miMaxResizeHeight=parseInt(r);this.miMinResizeWidth=parseInt(u);this.miMinResizeHeight=parseInt(f);this.miRatio=-1;e&&(this.miRatio=this.miMaxResizeWidth/this.miMaxResizeHeight);isNaN(this.miResizeHeight)&&(this.miResizeHeight=-1);isNaN(this.miMaxResizeHeight)&&(this.miMaxResizeHeight=-1);isNaN(this.miMinResizeHeight)&&(this.miMinResizeHeight=-1);isNaN(this.miResizeWidth)&&(this.miResizeWidth=-1);isNaN(this.miMaxResizeWidth)&&(this.miMaxResizeWidth=-1);isNaN(this.miMinResizeWidth)&&(this.miMinResizeWidth=-1);this.Resize();Utils.AddEvent(window,"resize",this.Resize,this)},Resize:function(){var r=Utils.GetViewportHeight(),u=Utils.GetViewportWidth(),t=-1,n=-1,i;this.miResizeHeight>=0&&this.miResizeHeight<r&&(n=r-this.miResizeHeight,this.miMaxResizeHeight>0&&this.miMaxResizeHeight<n&&(n=this.miMaxResizeHeight),this.miMinResizeHeight>0&&this.miMinResizeHeight>n&&(n=this.miMinResizeHeight));this.miResizeWidth>=0&&this.miResizeWidth<u&&(t=u-this.miResizeWidth,this.miMaxResizeWidth>0&&this.miMaxResizeWidth<t&&(t=this.miMaxResizeWidth),this.miMinResizeWidth>0&&this.miMinResizeWidth>t&&(t=this.miMinResizeWidth));this.miRatio!=-1&&(i=t/this.miRatio,i>n?t=n*this.miRatio:n=i);n!=-1&&$SetStyle(this.msID,"height",n+"px");t!=-1&&$SetStyle(this.msID,"width",t+"px")}};RulerProperties.prototype={ActiveRuler:function(n,t){var i=this;window.setTimeout(function(){DragDropMgr.AddRuler(n,t,$Elt(i.msID).parentNode)},200)},Action_ClearRulers:function(){DragDropMgr.ClearRulers()}};ScrollProperties.prototype={ActiveScroll:function(n){var u=$Elt(this.msID),t,r,i;this.mbScrollLeftToRight=!1;t=parseInt(n);isNaN(t)&&(t=5);r=null;isNaN(n)&&(n=Effect.Const.DEFAULT_DURATION);this.ReleaseScroll();this.mbScrollPause=!1;this.mbInvert=!0;
216i=this;window.setTimeout(function(){i.EffectScroll()},50)},EffectScroll:function(){if(!this.mbScrollPause){$Elt(this.msID).scrollLeft=this.mbScrollLeftToRight?$Elt(this.msID).scrollLeft-this.miScrollStep:$Elt(this.msID).scrollLeft+this.miScrollStep;this.mbInvert&&($Elt(this.msID).scrollLeft<=0||$Elt(this.msID).scrollLeft>=Utils.GetWidth($Elt(this.msID).firstChild,!0)-Utils.GetWidth(this.msID,!0))&&(this.mbScrollLeftToRight=!this.mbScrollLeftToRight);var n=this;window.setTimeout(function(){n.EffectScroll()},50)}},ScrollPause:function(){if(this.mbScrollPause=!this.mbScrollPause,!this.mbScrollPause){var n=this;window.setTimeout(function(){n.EffectScroll()},50)}},ScrollToLeft:function(){this.mbScrollLeftToRight=!1;this.mbInvert=!1;this.miScrollStep=10;this.mbScrollPause&&this.ScrollPause()},ScrollToRight:function(){this.mbScrollLeftToRight=!0;this.mbInvert=!1;this.miScrollStep=10;this.mbScrollPause&&this.ScrollPause()},ReleaseScroll:function(){this.mbInvert=!0;this.miScrollStep=2},ActiveSaveScrollPosition:function(n,t){var i=$Elt(this.msID),r,u,o,f,s,e;i!=null&&(n?(this.msID in ScrollbarMgr.moScrollPosition&&i.scrollTop==0&&i.scrollLeft==0&&(r=ScrollbarMgr.moScrollPosition[this.msID][0],u=ScrollbarMgr.moScrollPosition[this.msID][1],r>0&&(o=$E(this.msID).height(),f=ScrollbarMgr.moScrollPosition[this.msID][3],o<f&&(r=r+f/2)),u>0&&(s=$E(this.msID).width(),e=ScrollbarMgr.moScrollPosition[this.msID][2],s<e&&(u=u+e/2)),i.scrollTop=r,i.scrollLeft=u,t&&ScrollTargetMgr.RefreshVisibility(t,i.scrollTop>0,i.scrollLeft+i.clientWidth<i.scrollWidth,i.scrollTop+i.clientHeight<i.scrollHeight,i.scrollLeft>0)),ScrollbarMgr.moScrollPosition[this.msID]=[$Elt(this.msID).scrollTop,$Elt(this.msID).scrollLeft,$E(this.msID).width(),$E(this.msID).height()],Utils.AddEvent(this.msID,"scroll",this.SaveScrollPosition,this)):(delete ScrollbarMgr.moScrollPosition[this.msID],i.scrollTop=0,i.scrollLeft=0))},SaveScrollPosition:function(){var n=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0];Matrix3.HasPendingEventOnParentOrSelf(n)||(ScrollbarMgr.moScrollPosition[this.msID]=[$Elt(this.msID).scrollTop,$Elt(this.msID).scrollLeft,$E(this.msID).width(),$E(this.msID).height()])},ActiveScrollToBottom:function(){$Elt(this.msID).scrollTop=$Elt(this.msID).scrollHeight},ActiveScrollToTop:function(){$Elt(this.msID).scrollTop=0}};ScrollbarMgr.moSingleton=null;ScrollbarMgr.Const={MGR_NAME:"Scrollbar"};ScrollbarMgr.moScrollPosition={};ScrollbarMgr.GetInstance=function(){return ScrollbarMgr.moSingleton||(ScrollbarMgr.moSingleton=new ScrollbarMgr),ScrollbarMgr.moSingleton};ScrollbarMgr.prototype={Add:function(n){this.moScrollbars.PushIfNotExists(n);Matrix3.RegisterInCache(n,ScrollbarMgr)},RefreshNode:function(n){this.moScrollbars.Remove(this.moScrollbars.GetIndex(n))},RefreshScrollbars:function(){for(var n=0,t=this.moScrollbars.GetSize();n<t;n++)try{$Elt(this.moScrollbars.Get(n)).scrollUpdate()}catch(i){}},ReloadScrollPos:function(){var n,t;for(n in ScrollbarMgr.moScrollPosition)try{$Elt(n).scrollTop=ScrollbarMgr.moScrollPosition[n][0];$Elt(n).scrollLeft=ScrollbarMgr.moScrollPosition[n][1]}catch(i){}Utils.DebugFormPresent()&&(t=$(ControlMgr.FindRootControl()).find(">.ScrollablePanel")[0],t&&this.mbShouldScrollBodyToBottomOnPosReload&&t.ScrollToBottom())}};ScrollTargetProperties.Const={PROPERTY_TARGET:"ScrollTarget",PROPERTY_DIRECTION:"ScrollDirection",PROPERTY_SCROLL_STEP:"ScrollStep",DIRECTION_UP:"up",DIRECTION_RIGHT:"right",DIRECTION_DOWN:"down",DIRECTION_LEFT:"left"};ScrollTargetProperties.prototype={MouseDownHandler:function(){var r,n,i,t,u,f;if(console.log([this.msTarget,ScrollTargetMgr.IsBusy(this.msTarget)]),!ScrollTargetMgr.IsBusy(this.msTarget)){if(ScrollTargetMgr.Enter(this.msTarget),r=500,this.moCtrl!=null&&!this.moCtrl.GetProperty(ConstProperties.Const.DISABLED,!1)&&(n=ControlMgr.GetInstance().GetReference(this.msTarget),n!=null)){if(this.msStep[this.msStep.length-1]=="%"){u=parseInt(this.msStep);switch(this.msDirection.toLowerCase()){case ScrollTargetProperties.Const.DIRECTION_RIGHT:case ScrollTargetProperties.Const.DIRECTION_LEFT:t=n.miWidth*u/100;break;case ScrollTargetProperties.Const.DIRECTION_UP:case ScrollTargetProperties.Const.DIRECTION_DOWN:t=n.miHeight*u/100}}else t=parseInt(this.msStep);switch(this.msDirection.toLowerCase()){case ScrollTargetProperties.Const.DIRECTION_RIGHT:$(n.GetNode()).animate({scrollLeft:n.GetNode().scrollLeft+t},r);i=[t,0];break;case ScrollTargetProperties.Const.DIRECTION_UP:$(n.GetNode()).animate({scrollTop:n.GetNode().scrollTop-t},r);i=[0,-t];break;case ScrollTargetProperties.Const.DIRECTION_DOWN:$(n.GetNode()).animate({scrollTop:n.GetNode().scrollTop+t},r);i=[0,t];break;case ScrollTargetProperties.Const.DIRECTION_LEFT:$(n.GetNode()).animate({scrollLeft:n.GetNode().scrollLeft-t},r);i=[-t,0]}ScrollTargetMgr.RefreshVisibility(this.msTarget,n.GetNode().scrollTop+i[1]>0,n.GetNode().scrollLeft+i[0]+n.GetNode().clientWidth<n.GetNode().scrollWidth,n.GetNode().scrollTop+i[1]+n.GetNode().clientHeight<n.GetNode().scrollHeight,n.GetNode().scrollLeft+i[0]>0)}f=this;setTimeout(function(){ScrollTargetMgr.Leave(f.msTarget)},r)}}};ScrollTargetMgr.Register=function(n){this.moTargetsArray==null&&(this.moTargetsArray={});this.moTargetsProcessing==null&&(this.moTargetsProcessing={});var t=n.msTarget;this.moTargetsArray.hasOwnProperty(t)||(this.moTargetsArray[t]=[]);this.moTargetsArray[t].push(n)};ScrollTargetMgr.Enter=function(n){return this.moTargetsProcessing==null&&(this.moTargetsProcessing={}),this.moTargetsProcessing[n]=!0};ScrollTargetMgr.Leave=function(n){return this.moTargetsProcessing==null&&(this.moTargetsProcessing={}),this.moTargetsProcessing[n]=!1};ScrollTargetMgr.IsBusy=function(n){return this.moTargetsProcessing&&this.moTargetsProcessing[n]===!0};ScrollTargetMgr.RefreshAllVisibility=function(){var t,n;if(this.moTargetsArray!=null)for(t in this.moTargetsArray)n=ControlMgr.GetInstance().GetReference(t),n!=null&&ScrollTargetMgr.RefreshVisibility(t,n.scrollTop>0,n.scrollLeft+n.clientWidth<n.scrollWidth,n.scrollTop+n.clientHeight<n.scrollHeight,n.scrollLeft>0)};ScrollTargetMgr.RefreshVisibility=function(n,t,i,r,u){var s,e,h,o,f;if(this.moTargetsArray!=null&&this.moTargetsArray.hasOwnProperty(n))for(s=this.moTargetsArray[n],e=0,h=s.length;e<h;e++){o=s[e];f=!1;switch(o.msDirection){case ScrollTargetProperties.Const.DIRECTION_UP:f=t;break;case ScrollTargetProperties.Const.DIRECTION_RIGHT:f=i;break;case ScrollTargetProperties.Const.DIRECTION_DOWN:f=r;break;case ScrollTargetProperties.Const.DIRECTION_LEFT:f=u}f?$RemoveClass(o.moCtrl,"Disabled"):$AddClass(o.moCtrl,"Disabled")}};SelectAllProperties.Const={CLASS_SELECT_ALL_CHECKBOX:"SelectAllChkClass",SUFFIX_SELECT_ALL:"_SelectAll",MODE_SELECT_WHEN_ALL_SELECTED:"SelectWhenAllSelected",MODE_SELECT_WHEN_NO_SELECTED:"SelectWhenNoSelected",OPTION_MODE:"mode",OPTION_IMAGE_ON:"imageon",OPTION_IMAGE_OFF:"imageoff",OPTION_CAN_INTERACT:"caninteract"};SelectAllProperties.prototype={ActiveSelectAll:function(n){var t,f,i,e,r,o,u;
216for(this.moSelectAllChk=document.createElement("img"),this.moSelectAllChk.style.position="absolute",this.moSelectAllChk.id=this.msID+SelectAllProperties.Const.SUFFIX_SELECT_ALL,this.moSelectAllChk.className=SelectAllProperties.Const.CLASS_SELECT_ALL_CHECKBOX,t=Utils.GetOptions(n),this.msSelectAllMode=t[SelectAllProperties.Const.OPTION_MODE],this.msSelectAllImageOn=$Elt(Matrix3.Const.INFO_IMAGE_BASE).value+t[SelectAllProperties.Const.OPTION_IMAGE_ON],this.msSelectAllImageOff=$Elt(Matrix3.Const.INFO_IMAGE_BASE).value+t[SelectAllProperties.Const.OPTION_IMAGE_OFF],this.msbCanInteract=!(SelectAllProperties.Const.OPTION_CAN_INTERACT in t)||t[SelectAllProperties.Const.OPTION_CAN_INTERACT]=="0"?!1:!0,this.mbSelectAllChecked=!1,this.msbCanInteract&&Utils.AddEvent(this.moSelectAllChk,"click",this.SelectAllChk,this),f=$Elt(this.msID).find("input","cx-checkbox"),i=0,e=f.length;i<e;i++)r=f.item(i),(r.type=="checkbox"||r.tagName=="CX-CHECKBOX")&&(o=this,u=$Control(r.id,CheckBoxCtrl.Const.CONTROL_NAME),u.Event_Change||u.Event_Change_Setup(),u.Event_Change.Subscribe(function(){o.UpdateSelectAllCheckbox()}));$Elt(this.msID).appendChild(this.moSelectAllChk);this.UpdateSelectAllCheckbox()},UpdateSelectAllCheckbox:function(){for(var n,t,r=$Elt(this.msID).find("input","cx-checkbox"),u=!0,f=!0,i=0,e=r.length;i<e;i++)n=r.item(i),(n.type=="checkbox"||n.tagName=="CX-CHECKBOX")&&n.id!=this.msID+SelectAllProperties.Const.SUFFIX_SELECT_ALL&&(n.checked?f=!1:u=!1);t=!1;(u||f&&this.msSelectAllMode==SelectAllProperties.Const.MODE_SELECT_WHEN_NO_SELECTED)&&(t=!0);this.moSelectAllChk.src=t?this.msSelectAllImageOn:this.msSelectAllImageOff;this.mbSelectAllChecked=t},SelectAllChk:function(){var n=!this.mbSelectAllChecked,r,i,u,t;if(this.moSelectAllChk.src=n?this.msSelectAllImageOn:this.msSelectAllImageOff,this.mbSelectAllChecked=n,this.msSelectAllMode==SelectAllProperties.Const.MODE_SELECT_WHEN_NO_SELECTED&&(n=!n),this.msSelectAllMode==SelectAllProperties.Const.MODE_SELECT_WHEN_ALL_SELECTED||!n)for(r=$Elt(this.msID).find("input","cx-checkbox"),i=0,u=r.length;i<u;i++)t=r.item(i),(t.type=="checkbox"||t.tagName=="CX-CHECKBOX")&&t.id!=this.msID+SelectAllProperties.Const.SUFFIX_SELECT_ALL&&$Control(t.id,CheckBoxCtrl.Const.CONTROL_NAME).SetChecked(n)}};SelectionProperties.prototype={ActiveSelection:function(n,t,i,r,u,f,e,o,s,h){var c=this.msID+(u?u:"");this.moSelectionItem=new SelectionItem(c,t,i,r,f,e,this,o);MultipleSelectionMgr.GetInstance().Add(n,this.moSelectionItem,parseInt(s),parseInt(h))},Event_SelectionChange_Setup:function(n){this.Event_SelectionChange=new CtrlEvent(this);this.Event_SelectionChangeArgs=n},Action_InvertSelectionItem:function(n){this.moSelectionItem.ChangeState(n)},Event_DoubleClick_Setup:function(){this.Event_DoubleClick=new CtrlEvent(this)}};SequenceLoadingMgr.Const={MGR_NAME:"SequenceLoading"};SequenceLoadingMgr.GetInstance=function(){return SequenceLoadingMgr.moInstance==null&&(SequenceLoadingMgr.moInstance=new SequenceLoadingMgr),SequenceLoadingMgr.moInstance};SequenceLoadingMgr.prototype={Register:function(n,t){this.moTable[n]=t},Unregister:function(n){this.moTable.hasOwnProperty(n)&&delete this.moTable[n]},Get:function(n){return this.moTable.hasOwnProperty(n)?this.moTable[n]:null},RegisterLabel:function(n){var t=n.GetVFormId(),i;n.HasProperty(ConstProperties.Const.SEQUENCE_LOADING_LABEL)&&(i=ControlMgr.GetInstance().GetReference(n.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_LABEL)),i==null&&(this.moLabelTable[t]=n));this.UpdateNavButtonVisibility(t)},RegisterButton:function(n){var i=n.GetVFormId(),t;n.HasProperty(ConstProperties.Const.SEQUENCE_LOADING_PREV)?(t=ControlMgr.GetInstance().GetReference(n.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_PREV)),t==null&&(this.moPrevBtnTable[i]=n)):(t=ControlMgr.GetInstance().GetReference(n.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_NEXT)),t==null&&(this.moNextBtnTable[i]=n));this.UpdateNavButtonVisibility(i)},UpdateNavButtonVisibility:function(n){var t=this.moPrevBtnTable[n],i=this.moNextBtnTable[n],u=this.moLabelTable[n],r=this.moTable[n],f;r!=null&&(t!=null&&(r.HasPotentialPreviousItem()?$RemoveClass(t,"InvisibleC"):$AddClass(t,"InvisibleC")),i!=null&&(r.HasPotentialNextItem()?$RemoveClass(i,"InvisibleC"):$AddClass(i,"InvisibleC")),u!=null&&(f=$(u).data(SequenceLoadingProperties.Const.DATA_RAW_LABEL),DynamicTemplatesMgr.FillContextualization))},PrePositioning:function(){var n,t;for(n in this.moTable)t=this.moTable[n],t.PrePositioning()},RefreshNode:function(n){n&&this.moTable.hasOwnProperty(n)&&(this.moTable[n].Recycle(),delete this.moTable[n])},NavigateSequence:function(n,t){var i=this.moTable[t],r;i==null?(r=t.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),r!=-1&&this.NavigateSequence(n,t.substr(0,r))):n?i.NextClickHandler():i.PrevClickHandler()},PostPositioning:function(){var t,n;for(t in this.moTable)n=this.moTable[t],n.ScrollToSelectedIndex(!n.UsingTransition());this.miPreloadProgrammed!=0&&clearTimeout(this.miPreloadProgrammed);this.miPreloadProgrammed=setTimeout(function(){SequenceLoadingMgr.GetInstance().PrivateLaunchPreloadCalls()},500)},PrivateLaunchPreloadCalls:function(){var n,t;if(this.miPreloadProgrammed=0,PostRenderMgr.GetInstance().maoFunctions.length==0){for(n in this.moTable)if(t=this.moTable[n],t.Launc
216hPreloadCalls())break}else this.miPreloadProgrammed=setTimeout(function(){SequenceLoadingMgr.GetInstance().PrivateLaunchPreloadCalls()},500)}};SequenceLoadingProperties.Const={PROPERTY_SEQUENCE_LOADING:"SL",PROPERTY_SEQUENCE_LOADING_PRELOAD_SIZE:"SLPS",PROPERTY_SEQUENCE_LOADING_UNLOAD_SIZE:"SLUS",PROPERTY_SEQUENCE_LOADING_SELECTED:"SLS",PROPERTY_SEQUENCE_LOADING_FIRST:"SLF",PROPERTY_SEQUENCE_LOADING_LAST:"SLL",PROPERTY_SEQUENCE_LOADING_INDEX:"SLI",PROPERTY_SEQUENCE_LOADING_SHOW_MASK:"SLSM",PROPERTY_SEQUENCE_LOADING_COVER_EFFECT:"SLCE",PROPERTY_SEQUENCE_LOADING_MASK_SKIN:"SLMS",PROPERTY_SEQUENCE_LOADING_POSITION:"SLPOS",PROPERTY_SEQUENCE_LOADING_TOTAL_COUNT:"SLC",EVENT_LOAD:"LOAD",PLACEHOLDER_CURRENT_INDEX:"CURRENT_IMAGE_INDEX",PLACEHOLDER_TOTAL_IMAGES:"TOTAL_IMAGES",DATA_RAW_LABEL:"RawLabel"};SequenceLoadingProperties.ConfigureControl=function(n){var t,i;n.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING)?new SequenceLoadingProperties(n):(n.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_SELECTED)&&(t=SequenceLoadingMgr.GetInstance().Get(n.GetVFormId()),t!=null&&t.SetSelectedIndex(parseInt(n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)))),n.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_FIRST)&&(t=SequenceLoadingMgr.GetInstance().Get(n.GetVFormId()),t!=null&&t.SetFirstIndex(parseInt(n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)))),n.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_LAST)&&(t=SequenceLoadingMgr.GetInstance().Get(n.GetVFormId()),t!=null&&t.SetLastIndex(parseInt(n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)))),n.HasProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)&&(t=SequenceLoadingMgr.GetInstance().Get(n.GetVFormId()),i=parseInt(n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)),t!=null&&t.HasASelectedIndex()&&t.GetSelectedIndex()==i&&setTimeout(function(){t.ScrollToSelectedIndex(!t.UsingTransition())},0)))};SequenceLoadingProperties.prototype={SetSelectedIndex:function(n){var t=!this.mbSelectedIndexKnown;this.mbSelectedIndexKnown=!0;this.miSelectedIndex=n;this.ScrollToSelectedIndex(t);SequenceLoadingMgr.GetInstance().UpdateNavButtonVisibility(this.msID)},SetFirstIndex:function(n){this.mbFirstIndexKnown=!0;this.miFirstIndex=n;SequenceLoadingMgr.GetInstance().UpdateNavButtonVisibility(this.msID)},SetLastIndex:function(n){this.mbLastIndexKnown=!0;this.miLastIndex=n;SequenceLoadingMgr.GetInstance().UpdateNavButtonVisibility(this.msID)},GetSelectedIndex:function(){return this.miSelectedIndex},HasASelectedIndex:function(){return this.mbSelectedIndexKnown},HasPotentialItemsBefore:function(n){return!this.mbFirstIndexKnown||this.mbFirstIndexKnown&&n>this.miFirstIndex},HasPotentialItemsAfter:function(n){return!this.mbLastIndexKnown||this.mbLastIndexKnown&&n<this.miLastIndex},HasPotentialPreviousItem:function(){return this.mbSelectedIndexKnown?this.HasPotentialItemsBefore(this.miSelectedIndex):!1},HasPotentialNextItem:function(){return this.mbSelectedIndexKnown?this.HasPotentialItemsAfter(this.miSelectedIndex):!1},LaunchPreloadCalls:function(){var i=!1,u,a,h,n,t,l;if(Matrix3.HasEventsInProgress())i=!0;else{u=this.moControl;a=u.moParent;this.miControlSize=this.mbIsHorizontal?a.miWidth:a.miHeight;this.miScrollOffset=this.GetScrollOffset();var v=parseInt(u.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_PRELOAD_SIZE,this.miControlSize*2)),b=parseInt(u.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_UNLOAD_SIZE,v*4)),r=u.GetContainerForChildren();if(r.length>0&&!Matrix3.HasEventsInProgress()){var y=r[0],f=r[r.length-1],s=y.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX),e=f.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX),o=0,p,w;this.mbIsHorizontal?(p=y.miXOff-o,w=f.miXOff+f.miWidth-o):(p=y.miYOff-o,w=f.miYOff+f.miHeight-o);this.miScrollOffset-=o;p>
216this.miScrollOffset-v&&this.HasPotentialItemsBefore(s)&&s-1<this.iLowestAskedIndex&&(i=!0,h="<"+s.toString(),this.iLowestAskedIndex=s-1);w<this.miScrollOffset+this.miControlSize+v&&this.HasPotentialItemsAfter(e)&&e+1>this.iHightestAskedIndex&&(i?h+=";>"+e.toString():(i=!0,h=">"+e.toString()),this.iHightestAskedIndex=e+1);i&&(Matrix3.mbInhibitPositioning=Param.EnableInhibitPositioning,Matrix3.AddEvent(this.moControl.GetVFormId(),SequenceLoadingProperties.Const.EVENT_LOAD,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,h,null,null,!1));var k=this.miScrollOffset-b,d=this.miScrollOffset+this.miControlSize+b,c=[];for(t=0,l=r.length;t<l;t++)n=r[t],n.miXOff<k&&(this.iLowestAskedIndex=Math.max(this.iLowestAskedIndex,n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)+2),this.miSelectedIndex=Math.max(this.miSelectedIndex,n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)+1),c.push(n.msId),this.miPrepositioningOffset=null),n.miXOff>d&&(this.iHightestAskedIndex=Math.min(this.iHightestAskedIndex,n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)-2),this.miSelectedIndex=Math.min(this.miSelectedIndex,n.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX)-1),c.push(n.msId),this.miPrepositioningOffset=null);for(t=0,l=c.length;t<l;t++)Matrix3.RemoveVForm(c[t])}}return i},UsingTransition:function(){return this.mbSlideWithTransition},PrePositioning:function(){var i=this.moControl,r=i.moParent,u,t,n,e;if(this.moScrollTween&&this.moScrollTween.stop(),this.miPrepositioningOffset=null,this.mbSelectedIndexKnown&&(t=i.GetContainerForChildren(),t.length>0)){var o=t[0],s=t[t.length-1],f=o.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX),h=s.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX);u=this.miSelectedIndex>=f&&this.miSelectedIndex<=h;u&&(n=t[this.miSelectedIndex-f],n&&n.miWidth!=-1&&n.miHeight!=-1&&(e=this.mbIsHorizontal?n.miXOff+n.miWidth/2-r.miWidth/2:n.miYOff+n.miHeight/2-r.miHeight/2,this.miPrepositioningOffset=e-this.GetScrollOffset()))}},SetScrollOffset:function(n,t){if(!this.moAutoScroll){this.miListOffset=n;var i=this.moControl;this.SlideItem(i.GetNode(),-n,t)}},GetScrollOffset:function(){return this.moAutoScroll?-this.moAutoScroll.mdOffset:this.miListOffset},SlideItem:function(n,t,i){var r,u;Utils.IsIE()?this.mbIsHorizontal?$(n).css("left",t+"px"):$(n).css("top",t+"px"):(i&&document.visibilityState==="visible"?(r=this.moControl.GetProperty(SlideshowCtrl.Const.PROPERTY_TRANSITION_DURATION,500)/1e3,Utils.IsIPad()?n.style.webkitTransition="-webkit-transform "+r+"s ease-out":this.mbIsHorizontal?(n.style.webkitTransition="left "+r+"s ease-out",n.style.MozTransition="left "+r+"s ease-out"):(n.style.webkitTransition="top "+r+"s ease-out",n.style.MozTransition="top "+r+"s ease-out"),Matrix3.maPopupStack.length>0?(u=Matrix3.maPopupStack[Matrix3.maPopupStack.length-1],Utils.StartsWith(this.msID,u)&&Matrix3.SuspendResponseHandling(r*1e3)):Matrix3.SuspendResponseHandling(r*1e3)):(n.style.webkitTransition=null,n.style.MozTransition=null),this.mbIsHorizontal?Utils.IsIPad()?n.style.webkitTransform="translate3D("+t+"px, 0, 0)":$(n).css("left",t+"px"):Utils.IsIPad()?n.style.webkitTransform="translate3D(0, "+t+"px, 0)":$(n).css("top",t+"px"))},ScrollToSelectedIndex:function(n){var u,s,y,r,t,a,i,c,e,o,p,l,f,w;if(this.mbSlideWithTransition=!n,u=this.moControl,s=u.moParent,this.mbSelectedIndexKnown&&(r=u.GetContainerForChildren(),r.length>0)){var b=r[0],k=r[r.length-1],h=b.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX),v=k.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX);y=this.miSelectedIndex>=h&&this.miSelectedIndex<=v;y?(t=r[this.miSelectedIndex-h],this.miSelectedTemplateIndex!=this.miSelectedIndex&&(this.miSelectedTemplateIndex=this.miSelectedIndex,t.HasProperty(ConstProperties.Const.SEQUENCE_LOADING_CONTEXTUAL_TABLE)&&(a=t.GetProperty(ConstProperties.Const.SEQUENCE_LOADING_CONTEXTUAL_TABLE),a[SequenceLoadingProperties.Const.PLACEHOLDER_CURRENT_INDEX]=t.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_POSITION),a[SequenceLoadingProperties.Const.PLACEHOLDER_TOTAL_IMAGES]=t.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_TOTAL_COUNT),DynamicTemplatesMgr.FillContextualization($PI(t.GetVFormId()),a)),this.moControl.HasProperty("SLPCE")&&(this.miPageChangeProgrammed&&
216clearTimeout(this.miPageChangeProgrammed),f=this,this.miPageChangeProgrammed=setTimeout(function(){Matrix3.mbInhibitPositioning=Param.EnableInhibitPositioning;Matrix3.AddEvent(f.moControl.GetVFormId(),"PAGE_CHANGE",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,f.miSelectedTemplateIndex.toString(),null,null,!1)},u.GetProperty(SlideshowCtrl.Const.PROPERTY_TRANSITION_DURATION,500)))),i=this.mbIsHorizontal?t.miXOff+t.miWidth/2-s.miWidth/2:t.miYOff+t.miHeight/2-s.miHeight/2,c=u.GetProperty(SlideshowCtrl.Const.PROPERTY_TRANSITION_DURATION,500),this.mbSlideWithTransition||(c=0),this.miPrepositioningOffset!=null&&(e=this.GetScrollOffset()-(i-this.miPrepositioningOffset),this.moAutoScroll?(this.moAutoScroll.mdOffset=this.miPrepositioningOffset-i,this.moAutoScroll.Refresh()):this.SetScrollOffset(i-this.miPrepositioningOffset,!1)),c==0||this.mbCoverEnabled?(this.mbCoverEnabled&&c>0&&(e=this.GetScrollOffset()-i,o=null,e<0?(o=t,this.SlideItem(o,-e,!1),this.miSelectedIndex-1>=h&&this.miSelectedIndex-1<=v&&(p=r[this.miSelectedIndex-1-h],this.SlideItem(p,-e,!1))):e>0&&(this.SlideItem(t,0,!1),this.miSelectedIndex+1>=h&&this.miSelectedIndex+1<=v&&(o=r[this.miSelectedIndex+1-h],this.SlideItem(o,-e,!1))),o!=null&&(f=this,setTimeout(function(){f.SlideItem(o,0,!0)},0))),this.SetScrollOffset(i,!1),this.mdAutoScrollSpeed&&!this.moAutoScroll&&(AutoScroll.Activate(this.moControl.moParent.msId,this.mdAutoScrollSpeed),this.moAutoScroll=AutoScroll.GetAutoscrollProps(this.moControl.moParent.msId),l=this,this.miPreloadTimer=setInterval(function(){l.ScrollToSelectedIndex()},2e3),this.moAutoScroll.mdOffset=-i,this.moAutoScroll.Refresh()),this.mbAutoPlay&&!this.moAutoPlay&&(l=this,this.moAutoPlay=setInterval(function(){l.SetSelectedIndex(l.GetSelectedIndex()+1)},this.miAutoPlayDelay))):(f=this,setTimeout(function(){f.SetScrollOffset(i,!0)},0)),this.mbShowMask&&(this.moTLMaskTween&&(this.moTLMaskTween.stop(!0),this.moBRMaskTween.stop(!0)),$SetStyle(this.moTopLeftMask,"width",s.miWidth+"px"),$SetStyle(this.moTopLeftMask,"height",u.miHeight+"px"),$SetStyle(this.moBotRightMask,"width",s.miWidth+"px"),$SetStyle(this.moBotRightMask,"height",u.miHeight+"px"),this.SlideItem(this.moTopLeftMask,t.miXOff-i-s.miWidth,!n),this.SlideItem(this.moBotRightMask,t.miXOff-i+t.miWidth,!n)),w=this,setTimeout(function(){w.LaunchPreloadCalls()},c)):this.LaunchPreloadCalls()}this.miPrepositioningOffset=null},SelectedItemLoaded:function(){var t=!1,i,n;if(this.mbSelectedIndexKnown&&(i=this.moControl,n=i.GetContainerForChildren(),n.length>0)){var r=n[0],u=n[n.length-1],f=r.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX),e=u.GetProperty(SequenceLoadingProperties.Const.PROPERTY_SEQUENCE_LOADING_INDEX);t=this.miSelectedIndex>=f&&this.miSelectedIndex<=e}return t},PrevClickHandler:function(){this.HasPotentialPreviousItem()&&this.SelectedItemLoaded()&&!this.mdAutoScrollSpeed&&!Matrix3.HasEventsInProgress()&&(this.moAutoPlay&&(clearTimeout(this.moAutoPlay),this.moAutoPlay=null),this.SetSelectedIndex(this.GetSelectedIndex()-1))},NextClickHandler:function(){this.HasPotentialNextItem()&&this.SelectedItemLoaded()&&!this.mdAutoScrollSpeed&&!Matrix3.HasEventsInProgress()&&(this.moAutoPlay&&(clearTimeout(this.moAutoPlay),this.moAutoPlay=null),this.SetSelectedIndex(this.GetSelectedIndex()+1))},KeyDownHandler:function(n){var n=$.event.fix(n),t=n.target,i;if(t!=null&&t.type!="textarea"&&t.type!="text"){if(Matrix3.maPopupStack.length>0&&(i=Matrix3.maPopupStack[Matrix3.maPopupStack.length-1],!Utils.StartsWith(this.msID,i)))return;switch(n.keyCode){case 37:this.PrevClickHandler();break;case 39:this.NextClickHandler()}}},TouchStart:function(n){n.changedTouches[0]=$.event.fix(n.changedTouches[0]);this.miTouchX=this.miLastX=n.changedTouches[0].pageX;this.miTouchY=n.changedTouches[0].pageY;this.mdXSpeed=0;this.miOnTouchOffset=this.GetScrollOffset()},TouchMove:function(n){n.changedTouches[0]=$.event.fix(n.changedTouches[0]);var i=n.changedTouches[0].pageX,r=this.miTouchX-i,t=this.miTouchY-n.changedTouches[0].pageY;this.mdXSpeed=(this.mdXSpeed+(i-this.miLastX))/2;this.miLastX=i;this.SetScrollOffset(this.miOnTouchOffset+r,!1);t*t<r*r&&t*t<500&&Utils.StopPropagation(n)},TouchEnd:function(n){n.changedTouches[0]=$.event.fix(n.changedTouches[0]);var t=this.miTouchX-n.changedTouches[0].pageX,i=this.miTouchY-n.changedTouches[0].pageY,r=t*t;i*i<r?r>3e4&&t*this.mdXSpeed>0||this.mdXSpeed*this.mdXSpeed>100?this.mdXSpeed>
2160&&this.HasPotentialPreviousItem()&&this.SelectedItemLoaded()&&!this.mdAutoScrollSpeed?this.SetSelectedIndex(this.GetSelectedIndex()-1):this.mdXSpeed<0&&this.HasPotentialNextItem()&&this.SelectedItemLoaded()&&!this.mdAutoScrollSpeed?this.NextClickHandler():this.SetScrollOffset(this.miOnTouchOffset,!0):this.SetScrollOffset(this.miOnTouchOffset,!0):this.SetScrollOffset(this.miOnTouchOffset,!0)},Recycle:function(){this.miPreloadTimer&&clearTimeout(this.miPreloadTimer);this.moAutoPlay&&clearTimeout(this.moAutoPlay);SequenceLoadingMgr.GetInstance().Unregister(this.msID)}};SizeLearningMgr={KEY_SIZE_TABLE:"ST",KEY_RENDER_MODE:"RM",KEY_ID_GENERATOR_MAPPING:"IDGMPL",maRegisteredControls:null,mbTransferProgrammed:!1,RegisterControl:function(n){this.maRegisteredControls||(this.maRegisteredControls=[]);this.maRegisteredControls.push(n)},PositioningFinished:function(){this.maRegisteredControls&&this.maRegisteredControls.length>0&&!this.mbTransferProgrammed&&ImageMgr.GetInstance().miCpt==0&&(SizeLearningMgr.TranferKnowledgeToServer(),this.mbTransferProgrammed=!0)},TranferKnowledgeToServer:function(){var i,n,t,r,u;if(Matrix3.moVFormTable){for(this.mbTransferProgrammed=!1,i={};this.maRegisteredControls.length>0;)(n=this.maRegisteredControls.pop(),Matrix3.moVFormTable[n.GetVFormId()])&&(t=[],t.push(n.GetWidth()),t.push(n.GetHeight()),r=n.GetId(),r+=":"+Matrix3.moVFormTable[n.GetVFormId()][VFormInfoItem.Const.FIELD_SUB_ID],i[r]=t);u=SizeLearningMgr.KEY_SIZE_TABLE+"="+JSON.stringify(i)+"&"+SizeLearningMgr.KEY_RENDER_MODE+"=Javascript2&"+SizeLearningMgr.KEY_ID_GENERATOR_MAPPING+"="+Matrix3.moIDGeneratorMappingJSON;$.ajax({type:"POST",url:"htm/PosLearning.aspx",data:u})}}};SlideShowProperties.Const={SLIDESHOW_DELAY:"slideshowdelay",ANIMATION_DELAY:"animationdelay",ID_PLAY_PAUSE:"_PlayPauseID",CLASS_PAUSE:"SlidePauseClass",DEFAULT_ANIMATION_DELAY:500,DEFAULT_SLIDESHOW_DELAY:5e3};SlideShowProperties.prototype={ActiveSlideShow:function(n){this.moOptions=Utils.GetOptions(n);this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]=parseInt(this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]);this.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY]=parseInt(this.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY]);isNaN(this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY])&&(this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]=SlideShowProperties.Const.DEFAULT_ANIMATION_DELAY);isNaN(this.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY])&&(this.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY]=SlideShowProperties.Const.DEFAULT_SLIDESHOW_DELAY);this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]=this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]/1e3;this.moNodeList=$Elt(this.msID).childNodes;this.miCurrentItem=0;
216this.mbSlideShowPause=!1;$SetStyle(this.msID,"position","relative");var t=this;t.Slide()},ToggleSlidePlayPause:function(){this.mbSlideShowPause=!this.mbSlideShowPause;this.mbSlideShowPause?$AddClass(this.msID+SlideShowProperties.Const.ID_PLAY_PAUSE,SlideShowProperties.Const.CLASS_PAUSE):$RemoveClass(this.msID+SlideShowProperties.Const.ID_PLAY_PAUSE,SlideShowProperties.Const.CLASS_PAUSE)},Slide:function(){var n=this,t,i;this.mbSlideShowPause?window.setTimeout(function(){n.Slide()},n.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY]):(t=this.moNodeList.item(this.miCurrentItem),i=Effect.Fade(t,this.moOptions[SlideShowProperties.Const.ANIMATION_DELAY]),this.miCurrentItem++,this.miCurrentItem==this.moNodeList.length-1&&(this.miCurrentItem=0),oNextNode=this.moNodeList.item(this.miCurrentItem),$SetStyle(oNextNode,"zIndex","0"),$SetStyle(t,"zIndex","1"),$SetStyle(oNextNode,"opacity","1"),$SetStyle(oNextNode,"display","block"),i.onComplete.subscribe(function(){window.setTimeout(function(){n.Slide()},n.moOptions[SlideShowProperties.Const.SLIDESHOW_DELAY])}),i.animate())}};TempSourceProperties.prototype={ActiveTempSource:function(n){this.msTempSource=n},Action_SwitchToTempSource:function(){var r=$Elt(this.msID).getElementsByTagName("img"),n,t,i;r.length>0&&(n=r.item(0),n&&n.src!=this.msTempSource&&(t=new Image,t.src=this.msTempSource,i=this,t.onload=function(){var t=$Elt(i.msID);t.moLinkedImage=n;ImageMgr.GetInstance().Push(n,t);n.src=i.msTempSource}))}};TooltipMgr=new TooltipMgr;TooltipMgr.Const={MGR_NAME:"Tooltips"};TooltipMgr.RefreshNode=function(n){if(n&&this.moTable.hasOwnProperty(n)){if(this.moTable[n].Recycle(),this.moTable[n].moTooltip)for(var t in this.moTable)this.moTable[t].msTooltipID===this.moTable[n].moTooltip.msId&&(this.moTable[t].mbTooltipInitialized=!1,this.moTable[t].msTooltipID=this.moTable[t].msOriginalTooltipID);delete this.moTable[n]}};TooltipProperties.Const={POSITION_NONE:"None",POSITION_OFFSET:"Offset",POSITION_OFFSET_NO_LIMIT:"OffsetNoLimit",POSITION_CENTER_ON_PARENT:"CenterOnParent",POSITION_TOP_LEFT_ON_PARENT:"TopLeftOnParent",POSITION_ON_PARENT:"OnParent",POSITION_FOLLOW_MOUSE:"FollowMouse",POSITION_VERTICAL_OFFSET_NO_LIMIT:"VerticalOffsetNoLimit",EVENT_TOOLTIP_SHOWN:"TOOLTIP_SHOWN",PROPERTY_TOOLTIP_ID:"TooltipID",PROPERTY_SHOW_DELAY:"ShowDelay",PROPERTY_HIDE_DELAY:"HideDelay",PROPERTY_TOOLTIP_POSITION:"TooltipPosition",PROPERTY_MOUSE_OFFSET_X:"MouseOffsetX",PROPERTY_MOUSE_OFFSET_Y:"MouseOffsetY",PROPERTY_TEMP_IMG:"TooltipTempImg",PROPERTY_TOOLTIP_SHARED:"TooltipShared",PROPERTY_TOOLTIP_META_TEXT:"TTMT",PROPERTY_TOOLTIP_SHOWN_EVENT_ARG:"TSEA",PROPERTY_TEMPLATED_CONTROLS:"TemplatedCtrls",PROPERTY_TO_REFRESH_VFORM:"ToRefreshVForm",PROPERTY_VFORM_TO_HIDE:"VFormToHide",KEY_TOOLTIP_IMAGE_CONTROL_SIZE:"TTICS",PROPERTY_REFRESH_WITH_TOOLTIP:"RWT",ORGINIAL_SUFFIX:"_OriginalValue",LEFTMARKUP:"[",RIGHTMARKUP:"]"};TooltipProperties.ConfigureControl=function(n){var t=n.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_ID),i=n.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_POSITION),r,u;t!=null&&t!=""&&i!=null&&i!=""&&(r=n.GetProperty(TooltipProperties.Const.PROPERTY_SHOW_DELAY,.5)*1e3,u=n.GetProperty(TooltipProperties.Const.PROPERTY_HIDE_DELAY,0)*1e3,new TooltipProperties(n,t,r,u,i))};TooltipProperties.prototype={OverControl:function(n){this.mbOverControl=!0;this.UpdateState(n);TooltipProperties.moActiveTooltip&&TooltipProperties.moActiveTooltip.mbTooltipShown&&TooltipProperties.moActiveTooltip!=this&&TooltipProperties.moActiveTooltip.HideTooltip()},OutControl:function(n){this.AreContainedDropDownOpen()||(this.UpdateOverStates(n),this.mbOverControl=!1,this.UpdateState(n))},OverTooltip:function(n){TooltipProperties.moActiveTooltip==this&&(this.mbOverTooltip=!0,this.UpdateState(n))},OutTooltip:function(n){TooltipProperties.moActiveTooltip==this&&(this.AreContainedDropDownOpen()||(this.UpdateOverStates(n),this.mbOverTooltip=!1,this.UpdateState(n)))},UpdateOverStates:function(n){this.mbOverControl=this.moControl.IsUnderMouse(n);this.mbOverTooltip=this.moTooltip!=null&&this.mbTooltipShown?this.moTooltip.IsUnderMouse(n):!1},AreContainedDropDownOpen:function(){return!1},UpdateState:function(n){var t;(this.mbOverControl||this.mbOverTooltip)&&!DragDropMgr.IsDrag()?(this.mbTooltipShown||this.mbTooltipAsked||(this.mbTooltipAsked=!0,t=this,this.miShowTimeoutID=setTimeout(function(){t.ShowTooltip(n)},this.miShowDelay)),clearTimeout(this.miHideTimeoutID)):(this.mbTooltipShown?(t=this,this.miHideTimeoutID=setTimeout(function(){t.HideTooltip()},this.miHideDelay)):this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&$E(this.moControl).unbind("mousemove",this.MouseMoveHandler),clearTimeout(this.miShowTimeoutID),this.mbTooltipAsked=!1)},ShowTooltip:function(n){var t,i,u,r;if(!this.mbTooltipInitialized&&(this.moTooltip=$PI(this.msTooltipID),this.moTooltip==null))if(this.mbTooltipShared)if(this.moTooltip=ControlMgr.GetInstance().GetReference(this.msTooltipID),this.moTooltip!=null)this.msTooltipID=this.moTooltip.msId;else return;else return;if((!this.mbTooltipInitialized||this.mbTooltipShared)&&(this.msTooltipPosition==TooltipProperties.Const.POSITION_CENTER_ON_PARENT||this.msTooltipPosition==TooltipProperties.Const.POSITION_OFFSET))for(t=this.moControl;t!=null;){if(t.msCtrlType==PositionItem.Const.CONTROL_TYPE_POPUP)break;
216if(i=DragDropMgr.GetDDObject(t.msId),i!=null){this.oDDProperty=i;this.oCurrentDragHandle=i.handleElId;i.setOuterHandleElId(this.moTooltip.msId);break}t=t.moParent}this.mbTooltipInitialized||(Utils.CreateReference(this.moTooltip.msId),this.moTooltip.moFloatingParent=PositionGroupProperties.GetSuitableDisplayHost(this.moTooltip,!0),this.moTooltip.moFloatingParent.GetNode().appendChild(this.moTooltip.GetNode()),this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&(this.miMouseOffsetX=parseInt(this.moControl.GetProperty(TooltipProperties.Const.PROPERTY_MOUSE_OFFSET_X,10)),this.miMouseOffsetY=parseInt(this.moControl.GetProperty(TooltipProperties.Const.PROPERTY_MOUSE_OFFSET_Y,10))),Utils.AddEvent(this.moTooltip,"mouseover",this.OverTooltip,this),Utils.AddEvent(this.moTooltip,"mouseout",this.OutTooltip,this),u=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel",Utils.AddEvent(this.moTooltip,u,this.HandleMouseWheel,this),this.mbTooltipShared&&(this.moTooltip.HasProperty(TooltipProperties.Const.PROPERTY_TEMPLATED_CONTROLS)||this.ListContextualizedControls()),this.mbTooltipInitialized=!0);this.moTooltip.moPosDecider=this;$RemoveClass(this.moTooltip.GetNode(),"InvisibleC");this.moTooltip.GetNode().style.display="block";TooltipProperties.moActiveTooltip!=null&&TooltipProperties.moActiveTooltip.moTooltip!=this.moTooltip&&TooltipProperties.moActiveTooltip.HideTooltip();TooltipProperties.moActiveTooltip=this;this.mbTooltipShown=!0;this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&(Utils.AddEvent(this.moTooltip,"mousemove",this.MouseMoveHandler,this),this.oLastEvt!=null&&(n=this.oLastEvt));this.mbTooltipShared&&this.FillContextualization(null,null,n);this.PlaceTooltip(n);r=$Control(this.moControl.msId,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_TooltipShown;r!=null&&r.Fire();$(this.moTooltip.GetNode()).stop().fadeTo(0,0).fadeTo(100,1)},HideTooltip:function(){if(TooltipProperties.moActiveTooltip==null||TooltipProperties.moActiveTooltip==this||TooltipProperties.moActiveTooltip.moTooltip!=this.moTooltip){TooltipProperties.moActiveTooltip=null;this.mbTooltipShown=!1;this.mbTooltipAsked=!1;$(this.moTooltip.GetNode()).stop().fadeOut(200,this.HideAnimationOver);this.oDDProperty!=null&&this.oDDProperty.setHandleElId(this.oCurrentDragHandle);this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&$E(this.moTooltip.GetNode()).unbind("mousemove",this.MouseMoveHandler);var n=$Control(this.moControl.msId,PanelAdvancedCtrl.Const.CONTROL_NAME).Event_TooltipMasked;n!=null&&n.Fire()}},HideAnimationOver:function(){(TooltipProperties.moActiveTooltip==null||TooltipProperties.moActiveTooltip==this||TooltipProperties.moActiveTooltip.moTooltip!=this.moTooltip)&&this.moTooltip!=null&&($AddClass(this.moTooltip.GetNode(),"InvisibleC"),this.moTooltip.GetNode().style.display="none")},MouseMoveHandler:function(n){this.oLastEvt=n;this.mbTooltipInitialized&&this.mbTooltipShown&&this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&this.PlaceTooltip(n)},HandleMouseWheel:function(n){var t,i;if(TooltipProperties.moActiveTooltip==this)for(t=this.moControl;t!=null;)i=/Firefox/i.test(navigator.userAgent)?-30*n.detail:n.wheelDelta,i>0&&t.scrollTop>0||i<0&&t.scrollTop+t.clientHeight<t.scrollHeight?(t.id!="BodyContent"&&(n.preventDefault(),t.scrollTop-=i,this.PlaceTooltip(n,!0)),t=null):t=t.parentNode},CalculateFloatingPosition:function(){var n=this.moTooltip.localToGlobal(new Point(0,0)),t,i;(this.msTooltipPosition!=TooltipProperties.Const.POSITION_OFFSET_NO_LIMIT&&this.msTooltipPosition!=TooltipProperties.Const.POSITION_VERTICAL_OFFSET_NO_LIMIT&&(t=Utils.GetMainParentContainerScrollTop(this.moControl.GetId()),i=Utils.GetMainParentContainerScrollLeft(this.moControl.GetId()),n.x=Math.max(i,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+i-this.moTooltip.GetWidth(),n.x)),n.y=Math.max(t,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+t-this.moTooltip.GetHeight(),n.y))),this.moTooltip.moParent!=null)&&(n=this.moTooltip.moParent.globalToLocal(n),this.moTooltip.x=n.x,this.moTooltip.y=n.y)},PlaceTooltip:function(n,t){var i=this.moControl.localToGlobal(new Point(0,0)),u=Utils.GetMainParentContainerScrollTop(this.moControl.GetId()),r=Utils.GetMainParentContainerScrollLeft(this.moControl.GetId()),f;switch(this.msTooltipPosition){case TooltipProperties.Const.POSITION_CENTER_ON_PARENT:i.x+=this.moControl.GetWidth()/2-this.moTooltip.GetWidth()/2;i.y+=this.moControl.GetHeight()/2-this.moTooltip.GetHeight()/2;t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)),i.y=Math.max(u,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u-this.moTooltip.GetHeight(),i.y)));break;case TooltipProperties.Const.POSITION_TOP_LEFT_ON_PARENT:i.x-=this.moTooltip.GetWidth();i.y-=this.moTooltip.GetHeight();t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)),i.y=Math.max(u,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u-this.moTooltip.GetHeight(),i.y)));break;case TooltipProperties.Const.POSITION_OFFSET:i.x+=this.moTooltip.miOriginalXOff;i.y+=this.moTooltip.miOriginalYOff;t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)),i.y=Math.max(u,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u-this.moTooltip.GetHeight(),i.y)));break;case TooltipProperties.Const.POSITION_OFFSET_NO_LIMIT:i.x+=this.moTooltip.miOriginalXOff;i.y+=this.moTooltip.miOriginalYOff;break;case TooltipProperties.Const.POSITION_VERTICAL_OFFSET_NO_LIMIT:i.x+=this.moControl.GetWidth()/2-this.moTooltip.GetWidth()/2;i.y+=this.moTooltip.miOriginalYOff;t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)));break;case TooltipProperties.Const.POSITION_ON_PARENT:i.y+=this.moControl.GetHeight();i.y+this.moTooltip.GetHeight()>ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u&&(i.y-=this.moControl.GetHeight()+this.moTooltip.GetHeight());t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)),i.y=Math.max(u,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u-this.moTooltip.GetHeight(),i.y)));break;case TooltipProperties.Const.POSITION_FOLLOW_MOUSE:n!=null&&(n=$.event.fix(n),i.x=n.pageX,i.y=n.pageY,f=$(this.moTooltip.GetNode().parentNode).offset(),i.x-=f.left,i.y-=f.top,i.x+=this.miMouseOffsetX,i.y+=this.miMouseOffsetY,t||(i.x=Math.max(r,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetWidth()+r-this.moTooltip.GetWidth(),i.x)),i.y=Math.max(u,Math.min(ResizeMgr.GetInstance().GetScreenAnchor().GetHeight()+u-this.moTooltip.GetHeight(),i.y))))}this.msTooltipPosition!=TooltipProperties.Const.POSITION_NONE&&this.moTooltip.moParent!=null&&(i=this.moTooltip.moParent.globalToLocal(i),this.moTooltip.x=i.x,this.moTooltip.y=i.y,this.moTooltip.TransferPositioningToDOM())},IsVisible:function(){return this.mbTooltipShown},Event_TooltipShown_Setup:function(){this.Event_TooltipShown=new CtrlEvent(this)},Event_TooltipMasked_Setup:function(){this.Event_TooltipMasked=new CtrlEvent(this)},ListContextualizedControls:function(){var t,i=[],r,n,u;for(i.push(this.moTooltip),r=[];i.length>0;)if(n=i.pop(),n.moContainerForChildrens&&n.moContainerForChildrens.length>0)if(n.GetProperty(TooltipProperties.Const.PROPERTY_REFRESH_WITH_TOOLTIP))t=n.msId;else for(n.GetProperty("EOTU")&&(this.moTooltip.SetProperty("EOTU",n.GetProperty("EOTU")),t=n.msId),n.GetProperty("HOTU")&&r.push(n.msId),u=0;u<n.moContainerForChildrens.length;u++)i.push(n.moContainerForChildrens[u]);else n.GetProperty(TooltipProperties.Const.PROPERTY_TEMP_IMG)&&(this.moTooltip.moTempImgId=n.msId);DynamicTemplatesMgr.ListContextualizedControls(this.moTooltip);t&&this.moTooltip.SetProperty(TooltipProperties.Const.PROPERTY_TO_REFRESH_VFORM,t);r.length>0&&this.moTooltip.SetProperty(TooltipProperties.Const.PROPERTY_VFORM_TO_HI
216DE,r)},FillContextualization:function(n,t,i){var u=this.moControl.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_META_TEXT),f,e,v,s,o,h,r,p,y;if(this.moTooltip.moTempImgId&&u.hasOwnProperty(TooltipProperties.Const.KEY_TOOLTIP_IMAGE_CONTROL_SIZE)&&(u[TooltipProperties.Const.PROPERTY_TEMP_IMG]=this.moTooltip.moTempImgId),f=this.moTooltip.GetProperty(TooltipProperties.Const.PROPERTY_VFORM_TO_HIDE),f)for(e=0;e<f.length;e++)v=f[e],oToHideVForm=$PI(v),oToHideVForm&&(oToHideVForm.GetNode().style.display="none",oToHideVForm.miWidth=0,oToHideVForm.miHeight=0,oToHideVForm.miXOff=0,oToHideVForm.miYOff=0,oToHideVForm.ForceHasChanged());if(DynamicTemplatesMgr.FillContextualization(this.moTooltip,u),this.moTooltip.moTempImgId&&(s=0,o=null,$("img",$(this.moControl.moParent.GetNode())).each(function(){var n=$(this).width()*$(this).height();n>s&&(s=n,o=$(this))}),o&&(h=this,$("img",$E(this.moTooltip.moTempImgId)).mdCurrentScale=null,$("img",$E(this.moTooltip.moTempImgId)).load(function(){$(this)[0].mdCurrentScale=null;AutoScaleProperties.Apply($PI(h.moTooltip.moTempImgId));DOMChangesQueue.GetInstance().ApplyQueue()}).attr("src",o.attr("src")),AutoScaleProperties.Apply($PI(h.moTooltip.moTempImgId)),DOMChangesQueue.GetInstance().ApplyQueue(),TooltipProperties.msTempImgId=this.moTooltip.moTempImgId,TooltipProperties.moLastTempImg=$PI(this.moTooltip.moTempImgId))),r=this.moTooltip.GetProperty(TooltipProperties.Const.PROPERTY_TO_REFRESH_VFORM),p=!1,r&&(y=$PI(r),y!=null)){var c=encodeURIComponent(JSON.stringify(u)),l=TooltipProperties.Const.EVENT_TOOLTIP_SHOWN,a=Matrix3.Const.RETURNTYPE_FULL;this.moTooltip.GetProperty("EOTU")&&(l=this.moTooltip.GetProperty("EOTU"),a=Matrix3.Const.RETURNTYPE_VIEWSTATE);this.moControl.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_SHOWN_EVENT_ARG)&&(c=this.moControl.GetProperty(TooltipProperties.Const.PROPERTY_TOOLTIP_SHOWN_EVENT_ARG));i?Matrix3.AddEvent(r,l,a,Matrix3.Const.DELAY_IMMEDIAT,c,null,null,null,null,null,null,null,null,null,null,null,null,null,function(){this.PlaceTooltip(i)}.bind(this)):Matrix3.AddEvent(r,l,a,Matrix3.Const.DELAY_IMMEDIAT,c)}},Recycle:function(){if(Utils.DetachEvent(this.moControl,"mouseover",this.OverControl,this),Utils.DetachEvent(this.moControl,"mouseout",this.OutControl,this),this.msTooltipPosition==TooltipProperties.Const.POSITION_FOLLOW_MOUSE&&Utils.DetachEvent(this.moControl,"mousemove",this.MouseMoveHandler,this),this.mbTooltipInitialized){Utils.DetachEvent(this.moTooltip,"mouseover",this.OverTooltip,this);Utils.DetachEvent(this.moTooltip,"mouseout",this.OutTooltip,this);var n=/Firefox/i.test(navigator.userAgent)?"DOMMouseScroll":"mousewheel";Utils.DetachEvent(this.moTooltip,n,this.HandleMouseWheel,this)}}};TooltipProperties.HideOpenedTooltips=function(){TooltipProperties.moActiveTooltip!=null&&TooltipProperties.moActiveTooltip.HideTooltip()};UserDropImagesPropertiesMgr={oInstances:{},oZIndexes:{},CanBeEnabled:function(n){var r,t,i,u,f;if($E(n)&&$E(n).length>0){if($E(n).css("display")=="none")return!1}else return!1;if(!this.oZIndexes[n])return!1;r=this.oZIndexes[n];for(t in this.oInstances)if(i=$E(t),i.length>0&&(u=this.oZIndexes[t],f=i.css("display")!="none",f&&u>r))return!1;return!0}};UserDropImagesProperties.Const={BOX_CLASS:"drop_images_box",BOX_CONTAINER_CLASS:"container",BOX_TITLE_CLASS:"title",BOX_MESSAGE_CLASS:"message",BOX_HOVER_CLASS:"hover",BOX_MASK_CLASS:"drop_images_mask"};UserDropImagesProperties.ConfigureControl=function(n,t){UserDropImagesPropertiesMgr.oInstances[n]=new UserDropImagesProperties(n,t)};UserDropImagesProperties.prototype={ActiveUserDropImages:function(n){var t=this;Utils.IsIE()||(typeof n!="object"&&(n={}),t.moOptions=$.extend(t.moDefaultOptions,n),t.CreateDropZone(),t.InitListeners())},CreateDropZone:function(){var u=this,n;for(this.moMask=Utils.BuildMask(this.msControlId+"_DropImagesMask",UserDropImagesProperties.Const.BOX_MASK_CLASS),this.moMask.style.position="absolute",this.moDropZone=$('<div id="'+this.msControlId+'_DropImagesBoxZone"><\/div>').css({position:"absolute",display:"block","z-index":this.moMask.GetIndex()+1,display:"none"}),UserDropImagesPropertiesMgr.oZIndexes[this.msControlId]=this.moMask.GetIndex()+1,this.moDropZone.addClass(UserDropImagesProperties.Const.BOX_CLASS),n=$PI(this.msControlId);n.moParent;)n=n.moParent;this.moRootNode=$(n.GetNode());var t=$('<div class="'+UserDropImagesProperties.Const.BOX_CONTAINER_CLASS+'"><\/div>'),i=$('<div class="'+UserDropImagesProperties.Const.BOX_TITLE_CLASS+'">'+this.moOptions.box_title+"<\/div>"),r=$('<div class="'+UserDropImagesProperties.Const.BOX_MESSAGE_CLASS+'">'+this.moOptions.box_message+"<\/div>");t.append(i);t.append(r);this.moDropZone.append(t);$("body").append(this.moDropZone);this.RefreshPositionBox()},RefreshPositionBox:function(){var n=$E(this.msControlId).offset(),t;if(n&&n!=null){var f=n.left,e=n.top,t=f,i=e,r=$(window).width()+$(window).scrollLeft(),u=this.moDropZone.outerWidth();t+u+10>r&&(t=r-u-20);this.moDropZone.css({top:i+"px",left:t+"px"});this.miOffsetLeft=t;this.miOffsetTop=i}},InitListeners:function(){var n=this;if(this.moDropZone&&this.moDropZone.length>0){function t(n){var t=!1;if(n.dataTransfer.types)try{t=n.dataTransfer.types.contains("Files")}catch(i){try{t=n.dataTransfer.types.indexOf("Files")!="-1"}catch(i){}}return t}function u(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0&&(t.preventDefault(),t.stopPropagation())}function c(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0&&(t.preventDefault(),t.stopPropagation())}function f(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0&&(t.preventDefault(),t.stopPropagation())}function e(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0&&(t.preventDefault(),t.stopPropagation(),t.dataTransfer.effectAllowed="move",t.dataTransfer.dropEffect="move")}
216function o(r){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0?(r.preventDefault(),r.stopPropagation(),t(r)==!0&&(s(r.dataTransfer.files),i()&&Matrix3.AddEvent(n.moOptions.drop_event_vformid,n.moOptions.drop_event_name,n.moOptions.drop_event_returntype,n.moOptions.drop_event_delay,n.moOptions.drop_event_arguments)),n.moDropZone.hide(),n.moMask.Hide()):(n.moDropZone.hide(),n.moMask.Hide())}function i(){return UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0&&n.moOptions&&n.moOptions.drop_event_vformid&&n.moOptions.drop_event_name&&n.moOptions.drop_event_returntype&&n.moOptions.drop_event_delay&&typeof n.moOptions.drop_event_vformid=="string"&&Utils.Trim(n.moOptions.drop_event_vformid)!=""?!0:!1}function s(t){for(var e,r,f=[],u=0,o=t.length;u<o;u++)e=t[u].name.lastIndexOf("."),f.push(t[u].name.substring(0,e));f.length>0&&(r="",i()==!1&&(r=Utils.Trim($E(n.msControlId).val()),typeof r=="string"&&r!=""&&(r+=n.moOptions.separator)),r+=f.join(n.moOptions.separator),n.moOptions.ctrl_type==PositionItem.Const.CONTROL_TYPE_AUTOCOMPLETION?($E(n.msControlId).val(r),$E(n.msControlId+AutoCompletionCtrl.Const.VALUEFIELD).val(r)):$E(n.msControlId).val(r))}function r(t){if(UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!1)return!1;var i=10,f=$(document).width()-i,e=i,o=i,s=$(document).height()-i,r=t.pageX+$(document).scrollLeft(),u=t.pageY+$(document).scrollTop();return r>=e&&r<=f&&u>=o&&u<=s}function h(t){if(UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!1)return!1;var u=n.miOffsetLeft+n.moDropZone.outerWidth(),f=n.miOffsetLeft,e=n.miOffsetTop,o=n.miOffsetTop+n.moDropZone.outerHeight(),i=t.pageX,r=t.pageY;return i>=f&&i<=u&&r>=e&&r<=o}document.body.addEventListener("dragover",function(i){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0?(i.preventDefault(),i.stopPropagation(),r(i)&&n.moDropZone[0].style.display=="none"&&i.dataTransfer&&t(i)==!0&&(n.RefreshPositionBox(),n.moMask.Show(),n.moDropZone[0].style.display="block")):(n.moDropZone[0].style.display="none",n.moMask.Hide())},!1);document.body.addEventListener("dragleave",function(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0?(t.preventDefault(),t.stopPropagation(),r(t)==!1&&n.moDropZone[0].style.display=="block"&&(n.moDropZone[0].style.display="none",n.moMask.Hide())):(n.moDropZone[0].style.display="none",n.moMask.Hide())},!1);document.body.addEventListener("drop",function(t){UserDropImagesPropertiesMgr.CanBeEnabled(n.msControlId)==!0?(t.preventDefault(),t.stopPropagation(),h(t)&&o(t),n.moDropZone.hide(),n.moMask.Hide()):(n.moDropZone[0].style.display="none",n.moMask.Hide())},!1);this.moDropZone[0].addEventListener("dragleave",u,!0);this.moDropZone[0].addEventListener("dragenter",f,!0);this.moDropZone[0].addEventListener("dragover",e,!0)}}};VisibilityObserverMgr.moSingleton=null;VisibilityObserverMgr.Const={MGR_NAME:"VisibilityObserver",JS_EVENT_VISIBILITY_CHANGED:"OL_VisibilityChanged"};VisibilityObserverMgr.GetInstance=function(){return VisibilityObserverMgr.moSingleton||(VisibilityObserverMgr.moSingleton=new VisibilityObserverMgr),VisibilityObserverMgr.moSingleton};VisibilityObserverMgr.moHandlers={};VisibilityObserverMgr.moParents={};VisibilityObserverMgr.prototype={Add:function(n){var t=$PI(n),r=t.moParent,u=$("#Form1"),i=$(window),e=u.scrollLeft(),o=u.scrollTop(),s=i.scrollLeft(),h=i.scrollTop(),v=i.width(),y=i.height(),f=function(){var it=$(t).data("visibility"),r=0,u=t.miWidth,f=0,c=t.miHeight,n=t.moParent,i,w,tt,p,b,k,l,a,d,g,nt;for(t.mbPosFixed&&(n=null),i=t,w=!1;n;)tt=n,p=n.offsetBetweenControls(i),r+=p.x,u+=p.x,f+=p.y,c+=p.y,b=$(n).width()||n.miWidth,k=$(n).height()||n.miHeight,r>=b||u<=0||f>=k||c<=0?($(t).data("visibility","hidden"),w=!0,n=null):(r=Math.max(0,r),u=Math.min(b,u),f=Math.max(0,f),c=Math.min(k,c),n=n.moParent),i=tt;w||(i.mbPosFixed?(l=i.miFixedX+e+s,a=i.miFixedY+o+h,r+=l,u+=l,f+=a,c+=a):i.msCtrlType===PositionItem.Const.CONTROL_TYPE_POPUP&&(l=i.offsetLeft-i.parentNode.scrollLeft,a=i.offsetTop-i.parentNode.scrollTop,r+=l,u+=l,f+=a,c+=a),d=e+s,g=o+h,r>=d+v||u<=d||f>=g+y||c<=g?$(t).data("visibility","hidden"):$(t).data("visibility",""));nt=$(t).data("visibility");nt!==it&&$(t).trigger(jQuery.Event(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,{visible:nt!=="hidden"}))},p,c,l,a;if(r!==t)while(r){if(r.miWidth<=0||r.miHeight<=0){p=$(t).data("visibility");$(t).data("visibility","hidden");p!=="hidden"&&$(t).trigger(jQuery.Event(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,{visible:!1}));break}else r.IsScrollable()&&(VisibilityObserverMgr.moHandlers[n]&&VisibilityObserverMgr.moHandlers[n].mfMainObserver&&$(r).off("scroll",VisibilityObserverMgr.moHandlers[n].mfMainObserver),$(r).scroll(f),VisibilityObserverMgr.moParents[n]||(VisibilityObserverMgr.moParents[n]=[]),VisibilityObserverMgr.moParents[n].push(r));r=r.moParent}c=function(){e=u.scrollLeft();o=u.scrollTop();f()};VisibilityObserverMgr.moHandlers[n]&&VisibilityObserverMgr.moHandlers[n].mfForm1ScrollHandler&&u.off("scroll",VisibilityObserverMgr.moHandlers[n].mfForm1ScrollHandler);u.scroll(c);l=function(){s=i.scrollLeft();h=i.scrollTop();f()};VisibilityObserverMgr.moHandlers[n]&&VisibilityObserverMgr.moHandlers[n].mfWindowScrollHandler&&i.off("scroll",VisibilityObserverMgr.moHandlers[n].mfWindowScrollHandler);i.scroll(l);a=function(){e=u.scrollLeft();o=u.scrollTop();s=i.scrollLeft();h=i.scrollTop();v=i.width();y=i.height();f()};VisibilityObserverMgr.moHandlers[n]&&VisibilityObserverMgr.moHandlers[n].mfWindowResizeHandler&&i.off("resize",VisibilityObserverMgr.moHandlers[n].mfWindowResizeHandler);i.resize(a);$(t).trigger(jQuery.Event(VisibilityObserverMgr.Const.JS_EVENT_VISIBILITY_CHANGED,{visible:$(t).data("visibility")!=="hidden"}));VisibilityObserverMgr.moHandlers[n]={mfMainObserver:f,mfForm1ScrollHandler:c,mfWindowScrollHandler:l,mfWindowResizeHandler:a};this.moVisibilityObservers.PushIfNotExists(n);Matrix3.RegisterInCache(n,VisibilityObserverMgr)},RefreshNode:function(n){if(VisibilityObserverMgr.moHandlers[n]){var t=VisibilityObserverMgr.moHandlers[n];t.mfMainObserver&&VisibilityObserverMgr.moParents[n]&&VisibilityObserverMgr.moParents[n].forEac
216h(function(n){$(n).off("scroll",t.mfMainObserver)});t.mfForm1ScrollHandler&&$("#Form1").off("scroll",t.mfForm1ScrollHandler);t.mfWindowScrollHandler&&$(window).off("scroll",t.mfWindowScrollHandler);t.mfWindowResizeHandler&&$(window).off("resize",t.mfWindowResizeHandler)}this.moVisibilityObservers.Remove(this.moVisibilityObservers.GetIndex(n))},TriggerAllObservers:function(){var t,n;for(t in VisibilityObserverMgr.moHandlers)n=VisibilityObserverMgr.moHandlers[t],n.mfMainObserver&&n.mfMainObserver()}};ZoomProperties.Const={SUFFIX_ZOOM_DIV:"_Zoom"};ZoomProperties.prototype={ActiveZoom:function(n){var i,t;this.msZoomImagePath=n;this.miZoomLensSize=200;this.moZoomDiv=document.createElement("div");this.moZoomDiv.id=this.msID+ZoomProperties.Const.SUFFIX_ZOOM_DIV;this.moZoomImage=$Elt(this.msID).getElementsByTagName("img").item(0);$SetStyle(this.moZoomDiv,"display","none");$SetStyle(this.moZoomDiv,"position","absolute");$SetStyle(this.moZoomDiv,"width",this.miZoomLensSize+"px");$SetStyle(this.moZoomDiv,"height",this.miZoomLensSize+"px");$SetStyle(this.moZoomDiv,"backgroundRepeat","no-repeat");$SetStyle(this.moZoomDiv,"backgroundImage","url("+n+")");$SetStyle(this.moZoomDiv,"display","none");$SetStyle(this.moZoomDiv,"zIndex","10000");document.body.appendChild(this.moZoomDiv);Utils.CreateReference(this.moZoomDiv.id);this.miZoomImageX=Utils.GetX(this.moZoomImage);this.miZoomImageY=Utils.GetY(this.moZoomImage);i=new Image;i.src=n;Matrix3.ShowWaitMsg("Loading...");t=this;i.onload=function(){Matrix3.HideWaitMsg();var n=this.width;t.miSrcImageWidth=t.moZoomImage.width;t.miSrcImageHeight=t.moZoomImage.height;t.miZoomRatio=n/t.miSrcImageWidth;Utils.AddEvent(t.moZoomImage,"mousemove",t.ZoomOver,t);Utils.AddEvent(t.moZoomDiv,"mousemove",t.ZoomOver,t)}},ZoomOver:function(n){var r=Utils.GetMousePosition(n)[0],u=Utils.GetMousePosition(n)[1],t=r-this.miZoomImageX,i=u-this.miZoomImageY,f=this.miZoomLensSize/2;t=t*this.miZoomRatio-f;i=i*this.miZoomRatio-f;i<0&&(i=0);t<0&&(t=0);$SetStyle(this.moZoomDiv,"left",r-f);$SetStyle(this.moZoomDiv,"top",u-f);$SetStyle(this.moZoomDiv,"backgroundPosition","-"+t+"px -"+i+"px");$SetStyle(this.moZoomDiv,"display","block");(r<this.miZoomImageX||u<this.miZoomImageY||r>this.miZoomImageX+this.miSrcImageWidth||u>this.miZoomImageY+this.miSrcImageHeight)&&$SetStyle(this.moZoomDiv,"display","none")}};AudioCtrl.Const={CONTROL_NAME:"Audio",SUFFIX_MOVIE:"_Audio"};AudioCtrl.StopAll=function(n){$("audio").each(function(){var t=$(this);t[0]!=n.currentTarget&&t[0].pause()})};AudioCtrl.prototype={Setup:function(n,t,i,r,u){var o=$Elt(this.msID),f,e;o!=null&&(t==""&&(t="100%"),i==""&&(i="100%"),this.sWidth=t,this.sHeight=i,this.sSource=n,f=this.msID+FlashCtrl.Const.SUFFIX_MOVIE,this.params={allowfullscreen:"true",allowscriptaccess:"always"},u||(this.params.wmode="transparent"),this.attributes={id:f,name:f},this.flashvars={},e=document.createElement("div"),e.setAttribute("id",f),o.appendChild(e))},SetupHtml5:function(){_oControl=$PI(this.msID);_oControl&&$(_oControl).find("audio").bind("play",AudioCtrl.StopAll)},AddVariable:function(n,t){this.flashvars[n]=t},Start:function(){$Elt(this.msID)!=null&&swfobject.embedSWF(this.sSource,this.attributes.id,this.sWidth,this.sHeight,"9.0.115",!1,this.flashvars,this.params,this.attributes)}};AudioPlayer.prototype.Init=function(){var n=this,i=this.moPlayerBox=document.querySelector("#"+this.msElementID),t,l,a,v,f,e,o,r,s,h,c;if(i!=null)if(t=this.moPlayer=i.querySelector("audio"),t.getAttribute("src").length===0||t.error)l=document.querySelector("div[id='"+this.msVFormID+"']"),l.style.opacity="0.3";else{this.moCurrentTimer=i.querySelector(".audio-player_timer .current");this.moCoverStart=i.querySelector(".audio-player_layer.cover.cover_start");this.moCoverEnd=i.querySelector(".audio-player_layer.cover.cover_end");this.mbIsMiniMode||(this.mfStartTime?(a=this.mfStartTime/this.GetDuration()*100,this.moCoverStart.style.width=a+"%"):this.moCoverStart.style.width="0%",this.mfEndTime?(v=100-this.mfEndTime/this.GetDuration()*100,this.moCoverEnd.style.width=v+"%"):this.moCoverEnd.style.width="0%");this.mbReady=t.readyState>=1;this.UpdateDurationInformation();f=function(){i.classList.add("playing");n.MarkDirty()};e=function(){i.classList.remove("playing")};t.addEventListener("playing",f);t.addEventListener("pause",e);o=function(){var u,r,f;
216if(n.mbReady=!0,t.currentTime=n.mfStartTime,n.UpdateDurationInformation(),i.classList.add("ready"),n.mfPlayAtOnLoad&&(n.ChangeCurrentTime(),n.mfPlayAtOnLoad=undefined),n.mbForcePlay){for(u=document.querySelectorAll("audio"),r=0;r<u.length;r++)f=u[r],f.error||f.pause();setTimeout(function(){n.Play();n.mbForcePlay=!1},333)}else n.mbPlayOnLoad&&n.moPlayer.paused&&(n.TogglePlayerState(),n.mbPlayOnLoad=!1)};this.mbReady?o():(r=o,t.addEventListener("loadedmetadata",r));s=function(){n.UpdateCurrentTime()};t.addEventListener("timeupdate",s);var y=function(t){n.ChangeCurrentTime(t)},u=function(t){n.TogglePlayerState(t)},p=i.querySelector(".audio-player_controller");this.mbIsMiniMode||(h=i.querySelector(".audio-player_waves"),h.addEventListener("click",y));p.addEventListener("click",u);i.querySelector(".audio-player_timer").addEventListener("click",u);Matrix3.RegisterForCleanup(this.msVFormID,"AudioPlayer",function(){t.removeEventListener("playing",f);t.removeEventListener("pause",e);t.removeEventListener("timeupdate",s);r&&t.removeEventListener("loadedmetadata",r);p.removeEventListener("pause",u);n.mbIsMiniMode||(h.removeEventListener("playing",y),n.moCoverStart=null,n.moCoverEnd=null);i.querySelector(".audio-player_timer").removeEventListener("click",u);n.moPlayerBox=null;n.moPlayer=null;n.moCurrentTimer=null});this.msDownloadButtonColor&&(c=document.querySelector("div[id='"+this.msVFormID+":DownloadBtn']"),c&&(c.style.color=this.msDownloadButtonColor))}};AudioPlayer.prototype.RegisterWithWatcher=function(n){if(typeof CortexAudioPlayersWatcher=="undefined"){CortexAudioPlayersWatcher={moAudioPlayers:[],moHasBeenPlayedAudioVForms:[]};CortexAudioPlayersWatcher.KeyHandler=function(n){var i,e,u,o,f,r,t;typeof EditableTable!="undefined"&&(i=EditableTable.TryGetCurrentActiveTable(),typeof i!="undefined"&&i&&(e=i.msID,u=i.moFocusedCell,typeof u!="undefined"&&u&&Utils.IsInTopLevelPopup(e)))||(o=n.keyCode||n.which,f=n.target.nodeName.toLowerCase(),f!=="input"&&f!=="textarea")&&o===32&&(r=!1,typeof CortexAudioPlayersWatcher.moActivePlayer!="undefined"&&Utils.IsInTopLevelPopup(CortexAudioPlayersWatcher.moActivePlayer.msVFormID)?(CortexAudioPlayersWatcher.moActivePlayer.moAudioPlayer.TogglePlayerState(),r=!0):CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.length>0&&Utils.IsInTopLevelPopup(CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms[-1])?(t=CortexAudioPlayersWatcher.moAudioPlayers.filter(function(n){return n.msVFormID===CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms[CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.length-1]}),t.length>0&&(t[0].moAudioPlayer.TogglePlayerState(),r=!0)):CortexAudioPlayersWatcher.moAudioPlayers.length>0&&(t=CortexAudioPlayersWatcher.moAudioPlayers.filter(function(n){return Utils.IsInTopLevelPopup(n.msVFormID)}),t.length>0&&(t[0].moAudioPlayer.TogglePlayerState(),r=!0)),r&&n.preventDefault())};CortexAudioPlayersWatcher.mfOnKeyDownRef=$.proxy(CortexAudioPlayersWatcher.KeyHandler,CortexAudioPlayersWatcher);$(document.body).on("keydown.CortexAudioPlayersWatcher",CortexAudioPlayersWatcher.mfOnKeyDownRef)}CortexAudioPlayersWatcher.moAudioPlayers.push({msVFormID:n,moAudioPlayer:this});Matrix3.RegisterForCleanup(n,"CortexAudioPlayer",function(){var i,t;try{if(i=-1,CortexAudioPlayersWatcher.moAudioPlayers.length>0){for(t=0;t<CortexAudioPlayersWatcher.moAudioPlayers.length;t++)if(CortexAudioPlayersWatcher.moAudioPlayers[t].msVFormID===n){i=t;break}for(i>=0&&CortexAudioPlayersWatcher.moAudioPlayers.splice(i,1),i=-1,t=0;t<CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.length;t++)if(CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms[t]===n){i=t;break}i>=0&&CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.splice(i,1)}typeof CortexAudioPlayersWatcher.moActivePlayer!="undefined"&&CortexAudioPlayersWatcher.moActivePlayer.msVFormID===n&&(CortexAudioPlayersWatcher.moActivePlayer=undefined)}catch(r){}})};AudioPlayer.prototype.TogglePlayerState=function(){var t,n,i;if(this.isPaused()){for(t=document.querySelectorAll("audio"),n=0;n<t.length;n++)i=t[n],i.error||i.pause();if(this.mfEndTime&&this.moPlayer.currentTime>=this.mfEndTime)try{this.moPlayer.currentTime=this.mfStartTime}catch(r){}if(this.moPlayer.currentTime<this.mfStartTime)try{this.moPlayer.currentTime=this.mfStartTime}catch(r){}this.Play();this.mbReady||(this.mbPlayOnLoad=!0)}else this.moPlayer.pause()};AudioPlayer.prototype.ChangeCurrentTime=function(n){var t,i,r;this.mfPlayAtOnLoad?t=this.mfPlayAtOnLoad:(i=n.target.offsetWidth,r=n.offsetX,t=r/i*this.GetDuration());this.mbReady?(this.moPlayer.currentTime=t,this.MarkDirty(),this.Update
216CurrentTime(),this.isPaused()&&this.TogglePlayerState()):(this.mfPlayAtOnLoad=t,this.moPlayer.load())};AudioPlayer.prototype.MarkDirty=function(){this.mbDirty||(this.mbDirty=!0,this.moPlayerBox.classList.add("dirty"))};AudioPlayer.prototype.UpdateDurationInformation=function(){var n=this.moPlayerBox.querySelector(".audio-player_timer .duration");n.innerHTML=this.mfEndTime?this.FormatDuration(this.mfEndTime):this.FormatDuration(this.GetDuration());this.moCurrentTimer.innerHTML=!this.mbReady&&this.mfPlayAtOnLoad?this.FormatDuration(this.mfPlayAtOnLoad):this.FormatDuration(this.mfStartTime)};AudioPlayer.prototype.UpdateCurrentTime=function(){var c,f,l,t,e,o,n,u,r,a,i,s,h;if(this.mbReady&&(this.mbIsMiniMode||(c=100-this.moPlayer.currentTime/this.GetDuration()*100,this.moCoverEnd.style.width=c+"%"),this.moCurrentTimer.innerHTML=this.FormatDuration(this.moPlayer.currentTime),f=!1,this.mfStartTime&&this.moPlayer.currentTime<this.mfStartTime&&(this.moPlayer.pause(),this.moPlayer.currentTime=this.mfStartTime),this.mfEndTime&&this.moPlayer.currentTime>=this.mfEndTime&&(this.moPlayer.currentTime=this.mbIsMiniMode?this.mfStartTime:this.mfEndTime,f=!0),l=this.moPlayer.ended||f,l&&(this.moPlayer.pause(),this.moPlayer.currentTime=this.mfStartTime,this.moCurrentTimer.innerHTML=this.FormatDuration(this.mfStartTime),t=$("audio",$(".au-pi"+this.msPopupId)),this.mbLoop&&t.length===1&&this.moPlayer.play(),this.mbAutoPlayNext&&(e=!0,this.moPlaylist&&(o=this.moPlaylist.indexOf(this.msPlayingId),o>-1&&o<this.moPlaylist.length-1&&(e=!1,Matrix3.AddEvent(this.msVFormID,"NEXT_AUDIO","F","I"))),e)))){for(n=0,u=!1,r=0;r<t.length;r++)if(a=t[r],this.moPlayerBox.contains(a)){if(i=!1,r<t.length-1?n=r+1:this.mbLoop||(i=!0),!i&&t[n].error){if(s=n,n<t.length-1?n++:this.mbLoop?n=0:i=!0,!i)while(t[n].error&&n!==s)if(n<t.length-1)n++;else if(this.mbLoop)n=0;else{i=!0;break}i?u=!1:n!==s&&(u=!0)}else u=!i&&r!==n;break}u&&(h=function(){var i,u,r;typeof CortexAudioPlayersWatcher!="undefined"&&(i=$(t[n]).closest("aside"),i.length>0&&(u=Utils.GetVFormId(i.attr("id")),r=CortexAudioPlayersWatcher.moAudioPlayers.filter(function(n){return n.msVFormID===u}),r.length>0&&(CortexAudioPlayersWatcher.moActivePlayer=r[0])))}.bind(this),Utils.IsIE()?(t[n].play(),h()):t[n].play().then(h).catch(function(){}))}};AudioPlayer.prototype.GetDuration=function(){return this.mbReady?this.moPlayer.duration:this.mfDuration};AudioPlayer.prototype.FormatDuration=function(n){var r=Math.floor(n/3600),u=Math.floor(n/60%60),t=Math.floor(n%60),i;return t=t>=10?t:"0"+t,i=u+":"+t,r>0&&(i=r+":"+i),i};AudioPlayer.prototype.Play=function(){var n=function(){typeof CortexAudioPlayersWatcher!="undefined"&&(CortexAudioPlayersWatcher.moActivePlayer={moAudioPlayer:this,msVFormID:this.msVFormID},CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.length>0&&Utils.IsInTopLevelPopup(CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms[CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.length-1])&&CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.splice(-1,1),CortexAudioPlayersWatcher.moHasBeenPlayedAudioVForms.push(this.msVFormID))}.bind(this);Utils.IsIE()?(this.moPlayer.play(),n()):this.moPlayer.play().then(n).catch(function(){})};AudioPlayer.prototype.Pause=function(){this.moPlayer.pause()};AudioPlayer.prototype.isPaused=function(){return this.moPlayer.paused};AutoCompletionCtrl.Const={CONTROL_NAME:"AutoCompletion",VALUEFIELD:"_Value"};AutoCompletionCtrl.prototype={Event_Change_Setup:function(n){var i=Utils.GetOptions(n),t;this.Event_ChangeEventArgs||(this.Event_ChangeEventArgs=[]);this.Event_ChangeEventArgs.push(i);this.Event_Change||(this.Event_Change=[]);t=this.Event_Change.length;this.Event_Change.push(new CtrlEvent(this,function(){var n=AutoCompletionMgr.Get(this.msControlID);n&&n.moOptions&&n.moOptions.bForceSelection===!1&&Utils.AddEvent(this.msControlID,"keyup",this.Event_Change[t].Fire,this.Event_Change)}))},Event_ValueExtractedFromClipboard_Setup:function(){this.Event_ValueExtractedFromClipboard=new CtrlEvent(this,function(){var n=AutoCompletionMgr.Get(this.msControlID);n&&n.moOptions&&n.moOptions.bForceSelection===!1&&Utils.AddEvent(this.msControlID,"paste",this.Event_ValueExtractedFromClipboard.Fire,this.Event_ValueExtractedFromClipboard)})},Action_SetValue:function(n){var t=AutoCompletionMgr.Get(this.msControlID);t&&t.Action_SetValue(n)},Reset:function(){var n=AutoCompletionMgr.Get(this.msControlID);n&&n.Reset()}};Utils.Augment(AutoCompletionCtrl,FocusProperties);Utils.Augment(AutoCompletionCtrl,InPlaceEditorProperties);Utils.Augment(AutoCompletionCtrl,ClickEvent);Utils.Augment(AutoCompletionCtrl,ClassProperties);Utils.Augment(AutoCompletionCtrl,MatrixEventProperties);Utils.Augment(AutoCompletionCtrl,ClipboardProperties);Utils.Augment(AutoCompletionCtrl,RequiredProperties);Utils.Augment(AutoCompletionCtrl,ShortcutEvent);Utils.Augment(AutoCompletionCtrl,ChangeEvent);Utils.Augment(AutoCompletionCtrl,BlurEvent);Utils.Augment(AutoCompletionCtrl,BlurAdvEvent);Utils.Augment(AutoCompletionCtrl,ControlKeyboardEvent);Utils.Augment(AutoCompletionCtrl,ShowEvent);Utils.Augment(AutoCompletionCtrl,ParamValueUpdateAction);Utils.Augment(AutoCompletionCtrl,ExecuteScriptAction);ButtonCtrl.Const={CONTROL_NAME:"Button",ACTION_ENABLE_FAKE_SUFFIX:"_Fake"};ButtonCtrl.AutoConfigPulse=function(n){if(n.GetProperty("PulseOnEdit",!1)){var t="ControlValueChanged",i="AllControls"+n.GetVFormId();$AddAction($Control(n.msId,ButtonCtrl.Const.CONTROL_NAME),"Action_Enable",t,i,"effect:pulse");$HasClass(n,"InvisibleC")&&$AddAction($Control(n.msId,ButtonCtrl.Const.CONTROL_NAME),"Action_RemoveClass",t,i,"InvisibleC");AddEditEvent=function(n){switch(n.msCtrlType){case AutoCompletionCtrl.Const.CONTROL_NAME:case DropDownListCtrl.Const.CONTROL_NAME:case TextBoxCtrl.Const.CONTROL_NAME:case TextBoxPasswordCtrl.Const.CONTROL_NAME:case TextAreaCtrl.Const.CONTROL_NAME:case RadioButtonListCtrl.Const.CONTROL_NAME:case CheckBoxCtrl.Const.CONTROL_NAME:$AddEvent($Control(n.msId,n.msCtrlType),"Event_Change",t,i);break;case DateCtrl.Const.CONTROL_NAME:case ButtonCtrl.Const.CONTROL_NAME:$AddEvent($Control(n.msId,n.msCtrlType),"Event_Click",t,i,"")}if(n.moContainerForChildrens&&n.moContainerForChildrens.length>0)for(var r=0,u=n.moContainerForChildrens.length;r<u;r++)AddEditEvent(n.moContainerForChildrens[r])};AddEditEvent($Elt(n.GetVFormId()))}};ButtonCtrl.prototype={Event_Change_Setup:function(){this.Event_Change=new CtrlEvent(this,function(){var n=$Elt(this.msID);n&&n.getElementsByTagName("a").length>0&&Utils.AddEvent(n.getElementsByTagName("a")[0],"click",this.Event_Change.Fire,this.Event_Change)})},Action_Enable_Setup:function(){var n,t,i,r,u;$Elt(this.msID)&&(this.Action_Enable_Setup_Ok||($SetStyle(this.msID,"visibility","hidden"),n=$Elt(this.msID).cloneNode(!0),$Elt(this.msID).setAttribute("inert",""),this.FakeLink=n,n.id=this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX,$AddClass(n,"Disabled ButtonDisabled ButtonDisabledClass"),t=n.getElementsByTagName("a"),t.length>0&&(i=t[0].firstChild,i.nodeName==="I"&&$(i).hasClass("ico")||(r=t[0].parentNode,r.removeChild(t[0]),u=d
216ocument.createElement("span"),u.appendChild(i),r.appendChild(u))),$Elt(this.msID).parentNode.insertBefore(n,$Elt(this.msID)),$SetStyle(n,"visibility","visible"),this.Action_Enable_Setup_Ok=!0))},Action_Disable_Setup:function(){this.Action_Enable_Setup();this.Action_Enable()},Action_ToggleEnableDisable_Setup:function(){this.Action_Enable_Setup()},Action_Enable:function(n){if($Elt(this.msID)&&$Elt(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX)&&$S(this.msID,"visibility")!="visible"&&($SetStyle(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX,"visibility","hidden"),$SetStyle(this.msID,"visibility","visible"),$Elt(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX).setAttribute("inert",""),$Elt(this.msID).removeAttribute("inert"),n)){var t=Effect.Pulse(this.msID,1,!0);Utils.AddEvent(this.msID,"click",function(){this.FakeLink.parentNode.removeChild(this.FakeLink);this.Action_Enable_Setup_Ok=!1;this.Action_Enable_Setup()},this)}},Action_Disable:function(){$Elt(this.msID)&&$Elt(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX)&&$S(this.msID,"visibility")==="visible"&&($SetStyle(this.msID,"visibility","hidden"),$SetStyle(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX,"visibility","visible"),$Elt(this.msID).setAttribute("inert",""),$Elt(this.msID+ButtonCtrl.Const.ACTION_ENABLE_FAKE_SUFFIX).removeAttribute("inert"))},Action_ToggleEnableDisable:function(n){if(n){var i=Utils.GetVFormId(this.msID)+":"+n,t=$E(i);t.length==1&&(t[0].checked?this.Action_Enable(""):this.Action_Disable(""))}},ActiveFocus:function(){try{$Elt(this.msID).getElementsByTagName("a")[0].focus()}catch(n){}}};ButtonCtrl.SetupCopyToClipboardButton=function(n,t,i,r,u){$E(n).click(function(n){var e,o,f;if(n.stopPropagation(),e=function(){u!="True"&&Matrix3.ShowNotification("Copied to clipboard",{theme:r,notificationType:"success"})},Utils.IsIE())f=document.createElement("textarea"),f.value=t,f.setAttribute("readonly",""),f.style={position:"absolute",left:"-9999px"},document.body.appendChild(f),f.select(),document.execCommand("copy"),document.body.removeChild(f),e();else{function n(n,t){return new Blob([t],{type:n})}i||(i=t);o=new clipboard.ClipboardItem({"text/html":new Blob([i],{type:"text/html"}),"text/plain":new Blob([t],{type:"text/plain"})});clipboard.write([o]).then(e)}})};ButtonCtrl.DownloadContentIntoFile=function(n,t,i){var u=new Blob([t],{type:i}),r=document.createElement("a");r.href=URL.createObjectURL(u);r.download=n;r.click();URL.revokeObjectURL(r.href)};Utils.Augment(ButtonCtrl,MatrixEventProperties);Utils.Augment(ButtonCtrl,EffectProperties);Utils.Augment(ButtonCtrl,ClearCacheProperties);Utils.Augment(ButtonCtrl,ClassProperties);Utils.Augment(ButtonCtrl,MountProperties);Utils.Augment(ButtonCtrl,ResizeProperties);Utils.Augment(ButtonCtrl,TempSourceProperties);Utils.Augment(ButtonCtrl,CommandProperties);Utils.Augment(ButtonCtrl,ClipboardProperties);Utils.Augment(ButtonCtrl,HyperlinkProperties);Utils.Augment(ButtonCtrl,FileNameOnDropProperties);Utils.Augment(ButtonCtrl,DropProperties);Utils.Augment(ButtonCtrl,OverEvent);Utils.Augment(ButtonCtrl,OutEvent);Utils.Augment(ButtonCtrl,RefreshMgrAction);Utils.Augment(ButtonCtrl,CloseWindowAction);Utils.Augment(ButtonCtrl,ParamValueUpdateAction);Utils.Augment(ButtonCtrl,ShortcutEvent);Utils.Augment(ButtonCtrl,WindowResizeEvent);Utils.Augment(ButtonCtrl,OrientationChangeEvent);Utils.Augment(ButtonCtrl,ClickEvent);Utils.Augment(ButtonCtrl,MouseDownEvent);Utils.Augment(ButtonCtrl,ShowEvent);Utils.Augment(ButtonCtrl,DragFilesInBrowserEvent);Utils.Augment(ButtonCtrl,ClickDeferredEvent);Utils.Augment(ButtonCtrl,ControlKeyboardEvent);Utils.Augment(ButtonCtrl,BlurEvent);Utils.Augment(ButtonCtrl,FocusEvent);ChartCtrl.Const={CONTROL_NAME:"Chart"};ChartCtrl.exportDashboardCharts=function(n,t,i,r,u,f){var h=[],e,o,s;if(h.push({text:n,fontSize:18,style:"title"},{text:t,fontSize:14,style:"subtitle"}),!u){if(ChartCtrl.gbExporting)return;ChartCtrl.gbExporting=!0}if(e=AmCharts.charts.length,e<r)setTimeout(function(){ChartCtrl.exportDashboardCharts(n,t,i,r,!0,f)},200);else{if(o=AmCharts.charts.slice(),f)try{o.sort(function(n,t){return n.titles[0].id.localeCompare(t.titles[0].id)})}catch(v){}for(s=0;s<o.length;s++){var c=o[s],l=c.type+"Style",a=function(n){c["export"].capture({},function(){this.toPNG({multiplier:3},function(t){h.push({image:t,fit:[515.28,(761.89-60)/2],style:n});e--;e===0&&c["export"].toPDF({content:h,styles:{title:{alignment:"center",margin:[0,0,0,5]},subtitle:{alignment:"center",margin:[0,0,0,10]},pieStyle:{alignment:"center"},serialStyle:{alignment:"center",margin:[0,0,0,40]}}},function(n){this.download(n,"application/pdf",i);ChartCtrl.gbExporting=!1})})})};a(l)}}};ChartCtrl.ClearCharts=function(){typeof AmCharts!="undefined"&&AmCharts!=null&&(AmCharts.charts=[])};ChartCtrl.RemovePreRefreshCharts=function(){var t,n,i;if(window.AmCharts!=null){var r=AmCharts.charts.slice(),u=[],f=new Set;for(t=r.length-1;t>=0;t--)(n=r[t],n&&n.div&&n.div.id)&&(i=n.div.id,f.has(i)||(f.add(i),u.push(n)));AmCharts.charts=u}};ChartCtrl.prototype={Setup:function(n,t){t=t||function(){};n.pathToImages="Include/AmCharts/images/";var i=this;Utils.InsertCSS("Include/AmCharts/export.css");setTimeout(function(){Utils.LoadScript("Include/AmCharts/amcharts.js",function(){var r=[],o,s,f,u,e,h;if(n.theme&&r.push("Include/AmCharts/themes/"+n.theme+".js"),n.type&&r.push("Include/AmCharts/"+n.type+".js"),n["export"]&&n["export"].enabled&&r.push("Include/AmCharts/plugins/export/export.min.js?v=1.4.76"),n.listeners){for(o=[],s=n.listeners,f=0;f<s.length;f++)u=s[f],u.event&&u.method&&(e={},e.event=u.event,e.method=function(n){var t=Utils.EvalScriptsWithResult("(function(){return "+u.method+";})()");t(n)},o.push(e));n.listeners=o}h=function(){var u,r;t(n);u=AmCharts.makeChart(i.msID,n);u.write(i.msID);u.containerDiv&&(r=$(u.containerDiv),r.bind("mouseout mouseover mousemove",function(){r.find(".amcharts-balloon-div").length>0?r.addClass("amcharts-has-balloon"):r.removeClass("amcharts-has-balloon")}));ChartCtrl.RemovePreRefreshCharts()};r.length>0?Utils.LoadScript(r,function(){h()},null,!0):h()},null,!0)},100)}};ChartV2Ctrl.Const={CONTROL_NAME:"ChartV2"};ChartV2Ctrl.saveAsPDF=function(n,t,i){var r=[],u=0;am5.array.each(am5.registry.rootElements,function(n){var t=am5plugins_exporting.Exporting.new(n,{menu:am5plugins_exporting.ExportingMenu.new(n,{})});u==0&&r.push(t.getPdfmake());r.push(t.export("png"));u++});Promise.all(r).then(function(r){var e=r[0],f={pageSize:"A4",pageOrientation:"portrait",pageMargins:[30,30,30,30],content:[]},u;for(f.content.push({text:n,fontSize:18,alignment:"center",margin:[0,0,0,5]},{text:t,fontSize:14,alignment:"center",margin:[0,0,0,10]}),u=1;u<r.length;u++)f.content.push({image:r[u],fit:[515.28,(761.89-60)/2],alignment:"center"});e.createPdf(f).download(i)})};ChartV2Ctrl.ClearCharts=function(){for(var t,n=0;n<am5.registry.rootElements.length;++n)t=am5.registry.rootElements[n],t.dispose()};ChartV2Ctrl.prototype={Setup:function(n,t,i,r,u,f,e){var o=this;Utils.LoadScript(["Include/AmChart5/percent.js"],function(){Utils.LoadScript(["Include/AmChart5/"+i+".js"],function(){Utils.LoadScript(["Include/AmChart5/themes/Animated.js"],function(){Utils.LoadScript(["Include/AmChart5/plugins/exporting.js"],function(){Utils.LoadScript(["Include/AmChart5/plugins/sliceGrouper.js"],function(){Utils.LoadScript(["Include/AmChart5/index.js"],function(){am5.addLicense("AM5C335298041");am5.ready(function(){o.createChart(o.msID,n,i,r,u,t,f,e)})},!0,!0)},!0,!0)},!0,!0)},!0,!0)},!0,!0)},!0,!0)},maybeDisposeRoot:function(n){for(var i,r=[],t=0;t<am5.registry.rootElements.length;++t)i=am5.registry.rootElements[t],i&&i.dom.id==n&&r.push(i);for(t=0;t<r.length;++t)i=r[t],i.dispose()},createChart:function(n,t,i,r,u,f,e,o){var a,s,h,c,v,l;this.maybeDisposeRoot(n);a=document.getElementById(n);a&&(s=am5.Root.new(n),s.interfaceColors.setAll({secondaryButtonText:am5.color(5395026)}),e?(h=am5.Theme.new(s),h.rule("Label").setAll({fill:am5.color(11776433)}),h.rule("Grid").setAll({stroke:am5.color(11776433)}),s.setThemes([am5themes_Animated.new(s),h])):s.setThemes([am5themes_Animated.new(s)]),u&&(r(s,u),c=s.
216container.children._values,c&&(u.length<1?f&&(v=am5.Modal.new(s,{content:f}),v.open()):am5.array.each(c,function(n){n.doNotShareSeriesDataAcrossSubcharts||n.series&&am5.array.each(n.series._values,function(n){n&&n.data.setAll(u)})})),l={menu:am5plugins_exporting.ExportingMenu.new(s,{align:"right",valign:"top"}),pngOptions:{quality:.8,maintainPixelRatio:!0},dataSource:u,filePrefix:t},o&&(l.dataFields=o),am5plugins_exporting.Exporting.new(s,l)))}};CheckBoxCtrl.Const={CONTROL_NAME:"CheckBox",SUFFIX_FAKE:"_Fake",WC_NODE_NAME:"CX-CHECKBOX"};CheckBoxCtrl.prototype={Event_Change_Setup:function(){this.Event_Change=new CtrlEvent(this,function(){var n=$($Elt(this.msControlID));n.length>0&&n[0].nodeName===CheckBoxCtrl.Const.WC_NODE_NAME?Utils.AddEvent(this.msControlID,"cx-change",this.Event_Change.Fire,this.Event_Change):Utils.AddEvent(this.msControlID,"click",this.Event_Change.Fire,this.Event_Change)})},Event_CxChange_Setup:function(){this.Event_CxChange=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"cx-change",this.Event_CxChange.Fire,this.Event_CxChange)})},Event_CxInput_Setup:function(){this.Event_CxInput=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"cx-input",this.Event_CxInput.Fire,this.Event_CxInput)})},Event_CxFocus_Setup:function(){this.Event_CxFocus=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"cx-focus",this.Event_CxFocus.Fire,this.Event_CxFocus)})},Event_CxBlur_Setup:function(){this.Event_CxBlur=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"cx-blur",this.Event_CxBlur.Fire,this.Event_CxBlur)})},Event_CxInvalid_Setup:function(){this.Event_CxInvalid=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"cx-invalid",this.Event_CxInvalid.Fire,this.Event_CxInvalid)})},ActiveImages:function(n,t,i){this.msImageOn=n;this.msImageOff=t;$SetStyle(this.msControlID,"display","none");var r=$Elt(this.msControlID+CheckBoxCtrl.Const.SUFFIX_FAKE);i||Utils.AddEvent(r,"click",this.ClickFake,this);this.moFakeImage=r.getElementsByTagName("img").item(0)},SetIndeterminate:function(){var n=$Elt(this.msControlID);n&&(n.indeterminate=!0)},SetupFocusHandlers:function(){var n=$($Elt(this.msControlID)),t;n.length!==0&&n[0].nodeName!==CheckBoxCtrl.Const.WC_NODE_NAME&&(n.focus(function(){n.parent().addClass("HavingFocus")}),n.focusout(function(){n.parent().removeClass("HavingFocus")}),n.mousedown(function(n){n.preventDefault()}),t=$($Elt(this.msControlID+"_Lbl")),t.length>0&&(t.mousedown(function(n){n.preventDefault()}),t.click(function(t){this===t.target&&(t.preventDefault(),n.click())})))},ClickFake:function(){$Elt(this.msControlID).checked=!$Elt(this.msControlID).checked;this.moFakeImage.src=$Elt(this.msControlID).checked?this.msImageOn:this.msImageOff;this.Event_Change&&this.Event_Change.Fire()},SetChecked:function(n){$Elt(this.msControlID).checked=n;this.moFakeImage&&(this.moFakeImage.src=$Elt(this.msControlID).checked?this.msImageOn:this.msImageOff);$E(this.msControlID).attr("checked",n);var t=$Elt(this.msControlID).parentNode;t!=null&&($RemoveClass(t,"I"),$Elt(this.msControlID).checked?$AddClass(t,"Checked"):$RemoveClass(t,"Checked"))},Action_InvertSelection:function(){if(this.moFakeImage)this.ClickFake();else{var n=$Elt(this.msControlID).checked;this.SetChecked(!n);this.Event_Change&&this.Event_Change.Fire()}},Action_SelectCheckBox:function(){this.moFakeImage?this.SetChecked(!0):(this.SetChecked(!0),this.Event_Change&&this.Event_Change.Fire())},Action_DeselectCheckBox:function(){this.moFakeImage?this.SetChecked(!1):(this.SetChecked(!1),this.Event_Change&&this.Event_Change.Fire())},Action_GetValueFromClipboard:function(n){$Elt(this.msControlID).checked=ClipboardProperties.msCache=="1";this.moFakeImage&&(this.moFakeImage.src=$Elt(this.msControlID).checked?this.msImageOn:this.msImageOff,this.Event_Change&&!n&&this.Event_Change.Fire())}};Utils.Augment(CheckBoxCtrl,MatrixEventProperties);Utils.Augment(CheckBoxCtrl,CommandProperties);Utils.Augment(CheckBoxCtrl,ParamValueUpdateAction);Utils.Augment(CheckBoxCtrl,ClassProperties);Utils.Augment(CheckBoxCtrl,ExecuteScriptAction);Utils.Augment(CheckBoxCtrl,ClickEvent);CropCtrl.Const={CONTROL_NAME:"Crop",SUFFIX_TOPX:"_TopX",SUFFIX_TOPY:"_TopY",SUFFIX_WIDTH:"_Width",SUFFIX_HEIGHT:"_Height",EVENT_CROP_ZONE_CHANGED:"CROP_ZONE_CHANGED"};CropCtrl.prototype={Setup:function(n,t,i,r,u,f,e){e=Utils.ParseBool(e);this.moCrop=$E(this.msID);var s=this.moCrop.get(0),c=parseInt(n),h=parseInt(t),l=parseInt(i),a=parseInt(r),p=1,w=1;(c==="NaN"||n==="")&&(c=e?s.width:1);(h==="NaN"||t==="")&&(h=1,h=e?s.height:1);(l==="NaN"||i==="")&&(l=-1);(a==="NaN"||r==="")&&(a=-1);var b=Utils.ParseBool(u)?0:c/h,o=this,v=function(){o.moCrop.Jcrop({aspectRatio:b,setSelect:[l,a,l+c,a+h],onChange:function(n){$E(o.msID+CropCtrl.Const.SUFFIX_TOPX).val(n.x);$E(o.msID+CropCtrl.Const.SUFFIX_TOPY).val(n.y);$E(o.msID+CropCtrl.Const.SUFFIX_WIDTH).val(n.w);$E(o.msID+CropCtrl.Const.SUFFIX_HEIGHT).val(n.h)},onSelect:function(n){$E(o.msID+CropCtrl.Const.SUFFIX_TOPX).val(n.x);$E(o.msID+CropCtrl.Const.SUFFIX_TOPY).val(n.y);$E(o.msID+CropCtrl.Const.SUFFIX_WIDTH).val(n.w);$E(o.msID+CropCtrl.Const.SUFFIX_HEIGHT).val(n.h);o.mbFirstLoad?o.mbFirstLoad=!1:Matrix3.AddEvent(o.msVFormID,CropCtrl.Const.EVENT_CROP_ZONE_CHANGED,"F","I")}},function(){o.jcrop_api=o});f&&(Utils.AddEvent($E(o.msID+CropCtrl.Const.SUFFIX_TOPX),"blur",o.Update
216CropRegion,o),Utils.AddEvent($E(o.msID+CropCtrl.Const.SUFFIX_TOPY),"blur",o.UpdateCropRegion,o),Utils.AddEvent($E(o.msID+CropCtrl.Const.SUFFIX_WIDTH),"blur",o.UpdateCropRegion,o),Utils.AddEvent($E(o.msID+CropCtrl.Const.SUFFIX_HEIGHT),"blur",o.UpdateCropRegion,o))},k=s.complete&&s.naturalHeight!==0,y=function(){var n=c===s.width&&h===s.height&&l===0&&a===0;e&&!n?Utils.LoadScript("Include/Vendors/smartcrop/smartcrop.min.js",function(){smartcrop.crop(s,{minScale:p,maxScale:w,width:c,height:h}).then(function(n){var t=n.topCrop,i;t&&(i=s.width*1/s.naturalWidth,l=t.x*i,a=t.y*i,c=t.width*i,h=t.height*i);v()})},null,!0):v()};if(k)y();else this.moCrop.on("load",y)},UpdateCropRegion:function(){var n=this;this.jcrop_api.setSelect([$E(n.msID+CropCtrl.Const.SUFFIX_TOPX).val(),$E(n.msID+CropCtrl.Const.SUFFIX_TOPY).val(),$E(n.msID+CropCtrl.Const.SUFFIX_WIDTH).val(),$E(n.msID+CropCtrl.Const.SUFFIX_HEIGHT).val()])}};DataTableCtrl.Const={CONTROL_NAME:"DataTable",PAGE_PARAMETER_SEPARATOR:"?"};DataTableCtrl.prototype={Setup:function(n,t,i,r,u,f,e,o,s,h,c,l){var a=this,v=$PI(this.msID),y,p,w,b,k,d,g;v&&(o==null&&(o=50),y=0,p=[],Utils.IsStorageAvailable()&&(c?(w=sessionStorage.getItem(a.msID+"page"),w&&(y=parseInt(w)),b=sessionStorage.getItem(a.msID+"order"),b&&(p=JSON.parse(b))):(sessionStorage.removeItem(a.msID+"page"),sessionStorage.removeItem(a.msID+"order"))),k=function(){var ft=null,it,rt,g,k,b,nt,w,ut,d,tt,c,et;for(v.GetOriginalHeight()!=0&&(ft=1),it="htm/DataTableFeeder.aspx",rt=Matrix3.msURL.indexOf(DataTableCtrl.Const.PAGE_PARAMETER_SEPARATOR),rt>-1&&(it+=DataTableCtrl.Const.PAGE_PARAMETER_SEPARATOR+Matrix3.msURL.substring(rt+1)),g=-1,c=0;c<n.length;c++)if(n[c].rowClass){g=c;break}if(k={autoWidth:l,processing:!1,serverSide:!0,ajax:{url:it,data:null,type:"POST"},scrollX:!0,scrollY:ft,columns:n,columnDefs:[{targets:h,orderable:!1}],pageLength:o,deferRender:!0,order:p,rowCallback:function(n,t){g>=0&&$(n).addClass(t[g])}},e&&(k.search={search:e}),u>=0&&(k.order=[[u,f]]),k.fnServerData=function(){},b=$E(a.msID+"_Tbl"),nt=b.on("draw.dt",function(){a.OnDraw()}).on("column-sizing.dt",function(){a.OnResizing()}).on("page.dt",function(){Utils.IsStorageAvailable()&&(y=nt.page.info().page,sessionStorage.setItem(a.msID+"page",y))}).on("order.dt",function(){if(Utils.IsStorageAvailable()){var n=nt.order();sessionStorage.setItem(a.msID+"order",JSON.stringify(n))}}).on("error.dt",function(n,t,i,r){var u=r.substring(r.indexOf(" - ")+3);Matrix3.ShowNotification(u,{notificationType:"error"})}).DataTable(k),b.dataTableExt.errMode="none",a.moTable=b.dataTable().api(),r>=0&&b.rowGrouping({iGroupingColumnIndex:r,bExpandableGrouping:!0}),w=nt.settings()[0],h.length>0){for(ut=[],d=0;d<w.aaSorting.length;d++)h.includes(w.aaSorting[d][0])||ut.push(w.aaSorting[d]);w.aaSorting=ut}if(w.fnServerData=null,w.iDraw=0,w.ajax.data=function(n){n.ajtok=Matrix3.msAjaxToken;n.secret1=t;n.secret2=i;n.vfid=v.GetVFormId();n.dtidgm=Matrix3.moIDGeneratorMappingJSON},w.iInitDisplayStart=y*o,b.dataTable().fnDraw(),s){for($(v).addClass("row-clickable"),tt=-1,c=0;c<n.length;c++)if(n[c].ajaxEventArgument){tt=c;break}et=Utils.GetVFormId(v.id);$(b).find("tbody").on("click","td",function(n){if(n.target==this){var t=a.moTable.row($(this).closest("tr")).data();t&&Array.isArray(t)&&t.length>tt&&Matrix3.AddEvent(et,s,"F","I",t[tt])}})}},d=function(){$.extend(!0,$.fn.dataTable.defaults,{mark:!0})},$(document).DataTable?k():(g=["Include/DataTables/jquery.dataTables.min.js","Include/Vendors/markjs/jquery.mark.min.js","Include/DataTables/datatables.mark.js"],Utils.LoadScript(g,function(){k();d()},null,!0)))},OnDraw:function(){var h="DT_"+Matrix3.Const.HIDDENFIELDS,f="_TC",n=$PI(this.msID),e=!1,t=!1,i=document.getElementById(h),r,u;i!=null&&(Matrix3.SetupClientInfo(i.value),$(i).remove());$("."+f).each(function(){$(this).removeClass(f);var n=ControlMgr.GetInstance().CreateControl(this,null);PositionMgr.GetInstance().AddToDirtyXList(n);PositionMgr.GetInstance().AddToDirtyYList(n);n.ExtractDependences();t=!0;e=!0});n.GetOriginalHeight()==0&&(t=!0);t&&(e&&(Matrix3.ProcessPrePositionCalls(),Param.EnableInhibitPositioning&&(Matrix3.mbInhibitPositioning=!1),PositionMgr.GetInstance().CalculatePosition(),ControlMgr.GetInstance().ApplyPropertyQueue(),DOMChangesQueue.GetInstance().ApplyQueue()),Matrix3.HasPendingEventOnParentOrSelf(Utils.GetVFormId(this.msID))||(this.ResetScrollHeight(),PositionMgr.GetInstance().AddToDirtyYList(n),n.ForceHasChanged(),PositionMgr.GetInstance().CalculatePosition()));r=this;setTimeout(function(){r.ResizeColsWidth();r.ApplyScrollHeight()},1);u=!1;$("._TCS").each(function(){var n=$(this).data("s");n!=null&&(u=!0,PostRenderMgr.GetInstance().AddFunction(function(){Utils.EvalScripts(n)},!0));$(this).remove()});u&&setTimeout(function(){PostRenderMgr.GetInstance().ExecuteFunctions()},100);var o=this.moTable.settings()[0],s=o._iDisplayLength,c=o.fnRecordsDisplay();c<=s||s==-1?$(".dataTables_paginate",n.GetNode()).css("visibility","hidden"):$(".dataTables_paginate",n.GetNode()).css("visibility","visible");ControlMgr.GetInstance().ClearOldInstance()},OnResizing:function(){var n=$PI(this.msID);this.ResetScrollHeight();PositionMgr.GetInstance().AddToDirtyYList(n);n.ForceHasChanged();PositionMgr.GetInstance().CalculatePosition()},ResetScrollHeight:function(){if(this.moTable){var n=this.moTable.settings()[0];
216$(".dataTables_scrollBody",n.nTableWrapper).height("")}},ApplyScrollHeight:function(){var t=$PI(this.msID),h;if(this.moTable&&(t.GetHeight()!=0||t.GetOriginalHeight()!=0)){var n=this.moTable.settings()[0],i=$(".dataTables_scrollBody",n.nTableWrapper),r=$(".dataTables_length",n.nTableWrapper),f=r.is(":hidden")?0:r.outerHeight(),u=$(".dataTables_filter",n.nTableWrapper),e=u.is(":hidden")?0:u.outerHeight(),o=$(".dataTables_paginate",n.nTableWrapper),c=o.is(":hidden")?0:o.outerHeight(),s=f+e;r.position().top==u.position().top&&(s=Math.max(f,e));h=t.miHeight+1-(s+i.position().top+c);i.outerHeight(Math.ceil(h));i[0].style.maxHeight=""}},ResizeColsWidth:function(){var n=this.moTable.columns;n!=null&&n.adjust()}};DateCtrl.FormatOffsetLabel=function(n){if(n===null||isNaN(n))return"UTC";var i=n>=0?"+":"-",t=Math.abs(n),r=String(Math.floor(t/60)).padStart(2,"0"),u=String(t%60).padStart(2,"0");return"UTC"+i+r+":"+u};DateCtrl.FormatOffsetSuffix=function(n){if(n===null||isNaN(n))return"+00:00";var i=n>=0?"+":"-",t=Math.abs(n),r=String(Math.floor(t/60)).padStart(2,"0"),u=String(t%60).padStart(2,"0");return i+r+":"+u};DateCtrl.Const={CONTROL_NAME:"Date",ADVANCED_DATE_INTERVAL_TYPE:"IntervalType",FULL_DATE_FROM:"_full_date_from",FULL_DATE_TO:"_full_date_to",WARNING_MESSAGE:"_WarningMessage",WARNING_HIDDEN_STYLE:"position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)",ANCHOR_ID_SUFFIX:"_Select",ANCHOR_ID_TO_SUFFIX:"_Select2",FIELD1_SUFFIX:"_1",FIELD2_SUFFIX:"_2",FIELD3_SUFFIX:"_3",FIELD1_TO_SUFFIX:"_4",FIELD2_TO_SUFFIX:"_5",FIELD3_TO_SUFFIX:"_6",FIELD_TIME1_SUFFIX:"_t1",FIELD_TIME2_SUFFIX:"_t2",FIELD_TIME3_SUFFIX:"_t3",TIMEZONE_SELECTOR_SUFFIX:"_tz",FIELD_TIME1_TO_SUFFIX:"_t4",FIELD_TIME2_TO_SUFFIX:"_t5",FIELD_TIME3_TO_SUFFIX:"_t6",DESC1_SUFFIX:"_Desc1",DESC2_SUFFIX:"_Desc2",DESC3_SUFFIX:"_Desc3",DESC1_TO_SUFFIX:"_Desc4",DESC2_TO_SUFFIX:"_Desc5",DESC3_TO_SUFFIX:"_Desc6",DESC1_TIME_SUFFIX:"_DescTime1",DESC2_TIME_SUFFIX:"_DescTime2",DESC3_TIME_SUFFIX:"_DescTime3",DESC1_TO_TIME_SUFFIX:"_DescTime4",DESC2_TO_TIME_SUFFIX:"_DescTime5",DESC3_TO_TIME_SUFFIX:"_DescTime6",DAY:"dd",MONTH:"mm",YEAR:"yyyy",HOUR:"h",MINUTE:"min",SECOND:"sec",SEPARATOR:"/",SEPARATOR_ADVANCEDATE:"-",SEPARATOR_TIME:":",SEPARATOR_TIME_ADVANCEDATE:":",SEPARATOR_DATE_TIME:" ",SEPARATOR_DATE_TIME_ADVANCEDATE:"T",SERVER_ID_SUFFIX:"_Server",SERVER_ID_TO_SUFFIX:"_ServerTo",PERIOD_SUFFIX:"_Period",TIME_PM:"PM",TIME_AM:"AM",PERIOD_NONE:"NONE",PERIOD_API_URL:"API/Interface/v1.0/DatePeriod?Format=json&P=",CLEAR_SUFFIX:"_Clear",TODAY_SUFFIX:"_Today",SHOW_FIELD_DESCRIPTIONS_MODE_ALWAYS:"Always",SHOW_FIELD_DESCRIPTIONS_MODE_VALUE_FILLED:"OnlyWhenValueFilled",SHOW_FIELD_DESCRIPTIONS_MODE_VALUE_FILLED_OR_ENABLED:"ValueFilledOrEnabled",SHOW_FIELD_DESCRIPTIONS_MODE_VALUE_NEVER:"Never",MIN_DATABASE_DATE:new Date(1753,0,1),MAX_DATABASE_DATE:new Date(9999,11,31),MIN_DATE_ADVANCE:new Date(9999,0,1).setFullYear(1)};DateCtrl.CalendarKeyboard={DAY_OVER_CLASS:"ui-datepicker-days-cell-over",CELL_SELECTOR:"td[data-handler=selectDay] > a",INSTALLED_ATTR:"data-cx-calendar-keyboard",GetPopup:function(){return $.datepicker&&$.datepicker.dpDiv?$.datepicker.dpDiv:$()},Install:function(){var n=this.GetPopup(),t;if(n.length!==0&&n.attr(this.INSTALLED_ATTR)!=="1"){n.attr(this.INSTALLED_ATTR,"1");n.on("keydown",function(n){DateCtrl.CalendarKeyboard.HandleKeyDown(n)});n.on("focusout",function(n){DateCtrl.CalendarKeyboard.HandleFocusOut(n)});t=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(n){t.call(this,n);DateCtrl.CalendarKeyboard.DecorateGrid()}}},DecorateGrid:function(){var n=this.GetPopup();n.length!==0&&(n.find("table.ui-datepicker-calendar").each(function(t){var i=$(this),r=i.closest(".ui-datepicker-group"),f=(r.length>0?r:n).find(".ui-datepicker-title").first(),u="ui-datepicker-title-"+t;f.attr("id",u);i.attr({"aria-labelledby":u,role:"grid"})}),n.find(this.CELL_SELECTOR).attr("tabindex","-1"),this.GetCurrentCell().attr("tabindex","0"))},GetCurrentCell:function(){var r=this.GetPopup(),t,n,i;if(r.length===0)return $();for(t=["td."+this.DAY_OVER_CLASS+" > a","td.ui-datepicker-current-day > a",this.CELL_SELECTOR+".ui-state-highlight",this.CELL_SELECTOR],n=0;n<t.length;n++)if(i=r.find(t[n]).first(),i.length>0)return i;return $()}
216,OnOpen:function(n,t){this.GetPopup().attr({"aria-label":t,role:"dialog"});$(n).attr("aria-expanded","true");setTimeout(function(){DateCtrl.CalendarKeyboard.FocusDay()},0)},OnClose:function(n){if($(n).attr("aria-expanded","false"),n){var t=this.GetPopup();if(t.length>0&&$.contains(t[0],document.activeElement)){$(n).trigger("focus");return}setTimeout(function(){document.activeElement===document.body&&$(n).trigger("focus")},0)}},GetTabRing:function(){var n=this.GetPopup();return n.length===0?$():n.find("a[data-handler], select, "+this.CELL_SELECTOR+'[tabindex="0"]').filter(":visible")},FocusDay:function(){$.datepicker._datepickerShowing&&this.GetCurrentCell().trigger("focus")},HandleFocusOut:function(n){var t=this.GetPopup();t.length!==0&&$.datepicker._datepickerShowing&&(n.relatedTarget&&$.contains(t[0],n.relatedTarget)||setTimeout(function(){$.datepicker._datepickerShowing&&!$.contains(t[0],document.activeElement)&&$.datepicker._hideDatepicker()},0))},HandleKeyDown:function(n){var t=$.datepicker._curInst,r,o,s,e;if(t&&$.datepicker._datepickerShowing&&t.input&&t.input.length!==0){var i=0,u=0,f=0;switch(n.key){case"ArrowLeft":i=-1;break;case"ArrowRight":i=1;break;case"ArrowUp":i=-7;break;case"ArrowDown":i=7;break;case"PageUp":n.shiftKey?f=-1:u=-1;break;case"PageDown":n.shiftKey?f=1:u=1;break;case"Home":i=1-t.selectedDay;break;case"End":i=$.datepicker._getDaysInMonth(t.selectedYear,t.selectedMonth)-t.selectedDay;break;case"Escape":n.preventDefault();n.stopPropagation();$.datepicker._hideDatepicker();return;case"Tab":if(r=this.GetTabRing(),r.length===0)return;o=r.index(document.activeElement);s=o===-1?n.shiftKey?r.length-1:0:o+(n.shiftKey?-1:1);n.preventDefault();n.stopPropagation();r.eq((s+r.length)%r.length).trigger("focus");return;default:return}$(n.target).is(this.CELL_SELECTOR)&&(n.preventDefault(),n.stopPropagation(),t._keyEvent=!0,e=t.input[0],i!==0&&$.datepicker._adjustDate(e,i,"D"),u!==0&&$.datepicker._adjustDate(e,u,"M"),f!==0&&$.datepicker._adjustDate(e,f,"Y"),this.FocusDay())}}};DateCtrl.prototype={Setup:function(n){var t,i,f,e,r,h,c,l;this.mbIsSetting=!0;t=this;this.InitDatas(n);this.ParseServerDateFormat();this.ParseClientDateFormat();this.InstallCalendar(!1);this.moOptions.interval&&this.InstallCalendar(!0);i={};i[this.msID+DateCtrl.Const.FIELD1_SUFFIX]=!0;i[this.msID+DateCtrl.Const.FIELD2_SUFFIX]=!0;i[this.msID+DateCtrl.Const.FIELD3_SUFFIX]=!0;i[this.msID+DateCtrl.Const.FIELD1_TO_SUFFIX]=!0;i[this.msID+DateCtrl.Const.FIELD2_TO_SUFFIX]=!0;i[this.msID+DateCtrl.Const.FIELD3_TO_SUFFIX]=!0;var o='[id="'+this.msID+DateCtrl.Const.FIELD1_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD2_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD3_SUFFIX+'"]',w='[id="'+this.msID+DateCtrl.Const.FIELD_TIME1_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD_TIME2_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD_TIME3_SUFFIX+'"]',s='[id="'+this.msID+DateCtrl.Const.FIELD1_TO_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD2_TO_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD3_TO_SUFFIX+'"]',b='[id="'+this.msID+DateCtrl.Const.FIELD_TIME1_TO_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD_TIME2_TO_SUFFIX+'"],[id="'+this.msID+DateCtrl.Const.FIELD_TIME3_TO_SUFFIX+'"]',u=o;this.moOptions.interval&&(u+=","+s);var a=function(n){t.mbInputValueChanged=!0;$(n.target).trigger("blur");n.target.type==="select-one"&&$(n.target).trigger("focus")},v=function(n){t.mbTabPressed=n.key==="Tab";n.keyCode==13&&t.UpdateCalendar(t.IsToField(this.id),n,this)},y=function(n){t.mbInputValueChanged&&(n.relatedTarget==null||!i[n.relatedTarget.id])&&(t.UpdateCalendar(t.IsToField(this.id),n,this),t.mbInputValueChanged=!1)},p=function(n){$(this).select();n.stopImmediatePropagation()},k=function(){var n=this.value,r=n.replace(/\D/g,""),t,u,i;if(r!==n){t=typeof this.selectionStart=="number"?this.selectionStart:n.length;u=(n.slice(0,t).match(/\D/g)||[]).length;this.value=r;i=Math.max(0,t-u);try{this.setSelectionRange(i,i)}catch(f){}}};if(this.moOptions.forceUsingCalendarPicker)f=this.msID+DateCtrl.Const.FULL_DATE_FROM,e=this.msID+DateCtrl.Const.FULL_DATE_TO,$(o).mousedown(function(n){$E(f).datepicker("widget").css("display")!="none"&&$E(f).datepicker("widget").is(":visible")?($E(f).datepicker("hide"),$E(e).datepicker("hide")):$E(f).datepicker("show");n.stopImmediatePropagation();n.preventDefault()}),$(o).css("cursor","pointer"),this.moOptions.interval&&($(s).mousedown(function(n){$E(e).datepicker("widget").css("display")!="none"&&$E(e).datepicker("widget").is(":visible")?($E(e).datepicker("hide"),$E(f).datepicker("hide")):$E(e).datepicker("show");n.stopImmediatePropagation();n.preventDefault()}),$(s).css("cursor","pointer"));else{$(u).change(a);$(u).keydown(v);$(u).blur(y);$(u).focus(p);$(u).on("input",k)}r=w;this.moOptions.interval&&(r+=","+b);this.moOptions.showTimezoneSelector&&(this.InstallTimezoneSelector(),h=this.msID+DateCtrl.Const.TIMEZONE_SELECTOR_SUFFIX,i[h]=!0,r+=',[id="'+h+'"]');$(r).change(a);$(r).keydown(v);$(r).blur(y);$(r).focus(p);$E(this.msID+DateCtrl.Const.CLEAR_SUFFIX).click(function(){t.Clear()});this.moOptions.interval||$E(this.msID+DateCtrl.Const.TODAY_SUFFIX).click(function(){var n=new Date;t.SetDate(n.getDate(),n.getMonth()+1,n.getFullYear(),n.getHours(),n.getMinutes(),n.getSeconds(),!1)});$E(this.msID+DateCtrl.Const.PERIOD_SUFFIX).change(function(){if(t.UpdatePeriod(),!t.Event_Change&&(t.Event_SelectPeriod||t.Event_Clear)){var n=t.GetCurrentPeriodValue();n===DateCtrl.Const.PERIOD_NONE||n==="0"?t.Event_Clear?t.Event_Clear.Fire():t.Event_SelectPeriod&&t.Event_SelectPeriod.Fire():t.Event_SelectPeriod&&t.Event_SelectPeriod.Fire()}});c=!1;this.ParseValue(this.moOptions.defaultValue,!1);this.moOptions.interval&&this.ParseValue(this.moOptions.defaultValueTo,!0);this.moOptions.defaultPeriod!==DateCtrl.Const.PERIOD_NONE&&this.moOptions.defaultPeriod!=="0"&&($E(this.msID+DateCtrl.Const.PERIOD_SUFFIX).val(this.moOptions.defaultPeriod),this.UpdatePeriod(),c=!0);
216c==!1&&(this.UpdateCalendar(!1),this.moOptions.interval&&this.UpdateCalendar(!0));l=this;Matrix3.RegisterForCleanup(this.msID,"EditableTable",function(){try{$E(l.msID+DateCtrl.Const.FULL_DATE_FROM).datepicker("hide");$E(l.msID+DateCtrl.Const.FULL_DATE_TO).datepicker("hide")}catch(n){}});this.mbIsSetting=!1;this.CaptureValidValueSnapshot()},InstallCalendar:function(n){var t=this.moOptions.clientFormat.replace("yyyy","yy");t=t.replace("YYYY","YY");this.InstallDateCalendar(t,n);return},InstallDateCalendar:function(n,t){var i=this,r=this.msID+(t?DateCtrl.Const.FULL_DATE_TO:DateCtrl.Const.FULL_DATE_FROM),c=this.msID+(t?DateCtrl.Const.FIELD1_TO_SUFFIX:DateCtrl.Const.FIELD1_SUFFIX),l=this.msID+(t?DateCtrl.Const.FIELD2_TO_SUFFIX:DateCtrl.Const.FIELD2_SUFFIX),a=this.msID+(t?DateCtrl.Const.FIELD3_TO_SUFFIX:DateCtrl.Const.FIELD3_SUFFIX),o=this.msID+(t?DateCtrl.Const.FIELD_TIME1_TO_SUFFIX:DateCtrl.Const.FIELD_TIME1_SUFFIX),s=this.msID+(t?DateCtrl.Const.FIELD_TIME2_TO_SUFFIX:DateCtrl.Const.FIELD_TIME2_SUFFIX),h=this.msID+(t?DateCtrl.Const.FIELD_TIME3_TO_SUFFIX:DateCtrl.Const.FIELD_TIME3_SUFFIX),u=this.msID+(t?DateCtrl.Const.ANCHOR_ID_TO_SUFFIX:DateCtrl.Const.ANCHOR_ID_SUFFIX),f=t?"Select end date":i.moOptions.interval?"Select date":"Select start date",e=StackMgr.GetInstance().GetIndex();$E(r).datepicker({dateFormat:n,showWeek:i.moOptions.showWeek,numberOfMonths:i.moOptions.nbMonthDisplayed,changeMonth:i.moOptions.selectorMonth,changeYear:i.moOptions.selectorYear,showOtherMonths:!0,selectOtherMonths:!0,minDate:i.moOptions.startDate,maxDate:i.moOptions.endDate,firstDay:i.moOptions.firstDayOfWeek,beforeShow:function(n,t){t.dpDiv&&t.dpDiv.length>0&&t.dpDiv[0].setAttribute("data-pid",i.msID);DateCtrl.CalendarKeyboard.OnOpen($('[id="'+u+'"]')[0],f);setTimeout(function(){var n=t.dpDiv.css("z-index");n<e+1&&t.dpDiv.css({zIndex:e+1})},0)},onSelect:function(){var n=$E(r).datepicker("getDate"),u=n.getDate(),f=n.getMonth()+1,e=n.getFullYear();i.SetDate(u,f,e,$E(o).val(),$E(s).val(),$E(h).val(),t)},onClose:function(){DateCtrl.CalendarKeyboard.OnClose($('[id="'+u+'"]')[0])}});i.moOptions.language!="English"&&$.datepicker.regional&&$.datepicker.regional[i.moOptions.language]&&$E(r).datepicker("option",$.datepicker.regional[i.moOptions.language]);$('[id="'+u+'"]').click(function(){$.datepicker._lastInput!==$E(r)[0]&&$E(r).datepicker("show")});$('[id="'+u+'"]').attr("aria-label",f);DateCtrl.CalendarKeyboard.Install()},DateIsSelected:function(n){return n?$E(this.msID+DateCtrl.Const.FIELD1_TO_SUFFIX).val()!=""||$E(this.msID+DateCtrl.Const.FIELD2_TO_SUFFIX).val()!=""||$E(this.msID+DateCtrl.Const.FIELD3_TO_SUFFIX).val()!=""?!0:!1:$E(this.msID+DateCtrl.Const.FIELD1_SUFFIX).val()!=""||$E(this.msID+DateCtrl.Const.FIELD2_SUFFIX).val()!=""||$E(this.msID+DateCtrl.Const.FIELD3_SUFFIX).val()!=""?!0:!1},Clear:function(){this.ClearDate(!1);this.moOptions.interval&&this.ClearDate(!0);$E(this.msID+DateCtrl.Const.PERIOD_SUFFIX).val(DateCtrl.Const.PERIOD_NONE);this.OnChange();this.Event_Change?this.Event_Change.Fire():this.Event_Clear&&this.Event_Clear.Fire()},OnChange:function(n){this.moOptions.interval||(this.DateIsSelected()?($E(this.msID+DateCtrl.Const.CLEAR_SUFFIX).show(),$E(this.msID+DateCtrl.Const.TODAY_SUFFIX).hide()):($E(this.msID+DateCtrl.Const.CLEAR_SUFFIX).hide(),$E(this.msID+DateCtrl.Const.TODAY_SUFFIX).show()));this.CheckAndShowWarning(n);this.CaptureValidValueSnapshot()},CheckAndShowWarning:function(n){var t="",i=!1,r=!0,u=!0;if(this.mbCannotConvertToUserTimezone)t=this.moOptions.warningMessages.cannotConvertToUserTimezone,i=!0;else if(this.ShouldShowDateIncompleteWarning())t=this.moOptions.warningMessages.dateIsNotCompletelyFilled,r=this.IsDateSideIncomplete(!1),u=this.IsDateSideIncomplete(!0);else if(this.moOptions.interval&&!this.ValidateDateInterval())t=this.moOptions.warningMessages.invalidInterval;else{if(this.mbIntervalPartiallySet)return;t=this.CheckStartDateAndEndDate(n)}this.SetWarningMessage(t,i,r,u)},ShowInvalidDateWarningMsg:function(n){this.SetWarningMessage(this.moOptions.warningMessages.invalidDate,!1,!n,!!n)},SetWarningMessage:function(n,t,i,r){var u=$E(this.msID+DateCtrl.Const.WARNING_MESSAGE),f,e;t?u.addClass("date-helper-lbl").removeClass("date-warning-lbl"):u.addClass("date-warning-lbl").removeClass("date-helper-lbl");f=n||"";u.html()!==f&&u.html(f);Utils.IsStringFilled(n)?u.removeAttr("style"):u.attr("style",DateCtrl.Const.WARNING_HIDDEN_STYLE);$(this.GetDateInputsSelector(!0,!0)).removeAttr("aria-invalid");Utils.IsStringFilled(n)&&!t&&(e=this.GetDateInputsSelector(i,r),e&&$(e).attr("aria-invalid","true"))},GetDateInputsSelector:function(n,t){var i=[],r;return n&&i.push(DateCtrl.Const.FIELD1_SUFFIX,DateCtrl.Const.FIELD2_SUFFIX,DateCtrl.Const.FIELD3_SUFFIX),t&&this.moOptions.interval&&i.push(DateCtrl.Const.FIELD1_TO_SUFFIX,DateCtrl.Const.FIELD2_TO_SUFFIX,DateCtrl.Const.FIELD3_TO_SUFFIX),r=this.msID,i.map(function(n){return'[id="'+r+n+'"]'}).join(",")},DaysInMonth:function(n,t){switch(n){case 2:return t%4==0&&t%100!=0||t%400==0?29:28;case 4:case 6:case 9:case 11:return 30;default:return 31}},CheckStartDateAndEndDate:function(n){var t,i,r,u;if(!this.mbIsSetting&&n){if(t=new Date(n.getFullYear(),n.getMonth(),n.getDate()),!isNaN(this.moOptions.startDate)&&(i=new Date,i.setHours(0,0,0,0),i.setDate(i.getDate()+this.moOptions.startDate),i>t))return this.mbStartDateAndEndDateValid=!1,this.moOptions.warningMessages.startDateViolated;if(!isNaN(this.moOptions.endDate)&&(r=new Date,r.setHours(0,0,0,0),r.setDate(r.getDate()+this.moOptions.endDate),r<t))return this.mbStartDateAndEndDateValid=!1,this.moOptions.warningMessages.endDateViolated;if(this.moOptions.validateDatabaseRange){if(u=this.moOptions.advanceDate?DateCtrl.Const.MIN_DATE_ADVANCE:DateCtrl.Const.MIN_DATABASE_DATE,u>t)return this.mbStartDateAndEndDateValid=!1,this.moOptions.warningMessages.minDateViolated;
216if(DateCtrl.Const.MAX_DATABASE_DATE<t)return this.mbStartDateAndEndDateValid=!1,this.moOptions.warningMessages.maxDateViolated}}return this.mbStartDateAndEndDateValid=!0,""},HasErrors:function(){return this.mbStartDateAndEndDateValid?this.moOptions.showInvalidDateWarning&&!this.ValidateDate()||this.ShouldShowDateIncompleteWarning()||this.moOptions.interval&&!this.ValidateDateInterval():!0},IsSingleDateComplete:function(){return this.mbUserHasInputDateFrom&&!this.HasErrors()},UpdateCalendar:function(n){var t=this.moFieldClient;n==!0&&(t=this.moFieldClientTo);var i=t[DateCtrl.Const.YEAR].val(),r=t[DateCtrl.Const.MONTH].val(),u=t[DateCtrl.Const.DAY].val(),f=this.moOptions.time?t[DateCtrl.Const.HOUR].val():"",e=this.moOptions.time?t[DateCtrl.Const.MINUTE].val():"",o=this.moOptions.time?t[DateCtrl.Const.SECOND].val():"";this.SetDate(u,r,i,f,e,o,n)},ClearDate:function(n){this.ClearDateClient(n);this.ClearDateServer(n);this.SetDateCalendar(new Date,n);this.ClearUserInputStatus();this.mbStartDateAndEndDateValid=!0},ValidateDateInterval:function(){var s=!0,e,o;if(!this.mbIntervalPartiallySet&&this.moFieldClient&&this.moFieldClientTo){var i=this.moFieldClient[DateCtrl.Const.YEAR].val(),n=this.moFieldClient[DateCtrl.Const.MONTH].val(),r=this.moFieldClient[DateCtrl.Const.DAY].val();parseInt(n)!==NaN&&(n=String(parseInt(n)-1));var u=this.moFieldClientTo[DateCtrl.Const.YEAR].val(),t=this.moFieldClientTo[DateCtrl.Const.MONTH].val(),f=this.moFieldClientTo[DateCtrl.Const.DAY].val();if(parseInt(t)!==NaN&&(t=String(parseInt(t)-1)),e=new Date(i,n,r),o=new Date(u,t,f),i!=""&&u!=""&&n!=""&&t!=""&&r!=""&&f!=""){if(this.moOptions.time){var h=this.moFieldClient[DateCtrl.Const.HOUR].val(),c=this.moFieldClient[DateCtrl.Const.MINUTE].val(),l=this.moFieldClient[DateCtrl.Const.SECOND].val(),a=this.moFieldClientTo[DateCtrl.Const.HOUR].val(),v=this.moFieldClientTo[DateCtrl.Const.MINUTE].val(),y=this.moFieldClientTo[DateCtrl.Const.SECOND].val();h!=""&&a!=""&&c!=""&&v!=""&&l!=""&&y!=""&&(e=new Date(i,n,r,h,c,l),o=new Date(u,t,f,a,v,y))}e.getTime()>o.getTime()&&(s=!1)}}return s},ValidateDate:function(){var n=!0,t=!0;if(this.moFieldClient){var i=this.moFieldClient[DateCtrl.Const.YEAR].val(),r=this.moFieldClient[DateCtrl.Const.MONTH].val(),u=this.moFieldClient[DateCtrl.Const.DAY].val();if(n=this.IsValidDate(i,r,u),this.moFieldClientTo){var f=this.moFieldClientTo[DateCtrl.Const.YEAR].val(),e=this.moFieldClientTo[DateCtrl.Const.MONTH].val(),o=this.moFieldClientTo[DateCtrl.Const.DAY].val();t=this.IsValidDate(f,e,o)}}return n&&t},IsValidDate:function(n,t,i){var f=!0,e=parseInt(n)>=0,o=e?parseInt(n,10):(new Date).getFullYear(),r=parseInt(t,10),u=parseInt(i,10);return(isNaN(r)==!0&&t!=""||r>12||r<1||isNaN(u)==!0&&i!=""||u>31||u<1||u>this.DaysInMonth(r,o))&&(f=!1),f},SetDate:function(n,t,i,r,u,f,e,o){var it,w,v,c,rt,b;o||$E(this.msID+DateCtrl.Const.PERIOD_SUFFIX).val("");n==""&&u==""&&i==""&&this.ClearDate(e);var s=!i,l=!n,h=!t&&t!==0,y=!r&&r!==0,g=!u&&u!==0,nt=!f&&f!==0,ut=!s||!l||!h||this.moOptions.time&&this.moOptions.timeIsRequired&&!y,k=s||l||h||this.moOptions.time&&this.moOptions.timeIsRequired&&y;this.SaveUserInputStatuses(e,ut,k,h,s);this.moOptions.showInvalidDateWarning||(n=this.GetCorrectDay(n,e),t=this.GetCorrectMonth(t,e));i=this.GetCorrectYear(i,!0);r==""&&u==""&&f==""&&e?(r="23",u="59",f="59"):(r=this.GetCorrectHour(r),u=this.GetCorrectMinOrSeconds(u),f=this.GetCorrectMinOrSeconds(f));var ft=parseInt(i)>=0,a=parseInt(t,10),p=parseInt(n,10),tt=ft?parseInt(i,10):(new Date).getFullYear();if(this.moOptions.showInvalidDateWarning&&(isNaN(a)==!0&&t!=""||a>12||a<1||isNaN(p)==!0&&n!=""||p>31||p<1||p>this.DaysInMonth(a,tt))){this.ShowInvalidDateWarningMsg(e);h||t.toString().length!=1||(it=e?this.moFieldClientTo:this.moFieldClient,w="0"+a,it[DateCtrl.Const.MONTH].val(w));return}if(v=new Date(2e3,a>0?a-1:0,p>0?p:1,this.moOptions.time?parseInt(r,10)||0:0,this.moOptions.time?parseInt(u,10)||0:0,this.moOptions.time?parseInt(f,10)||0:0),v.setFullYear(tt),this.SetDateClient(v,e,s,h,l,y,g,nt),k&&!this.moOptions.bAllowUpdatePartialDatetime&&(!(this.moOptions.allowIncompleteDate||this.moOptions.advanceDate)||l&&h&&s)||
216(c=this.GetDateClient(e),c&&(y&=c[DateCtrl.Const.HOUR]&&c[DateCtrl.Const.HOUR].val()==="",g&=c[DateCtrl.Const.MINUTE]&&c[DateCtrl.Const.MINUTE].val()==="",nt&=c[DateCtrl.Const.SECOND]&&c[DateCtrl.Const.SECOND].val()===""),this.mbCannotConvertToUserTimezone=this.moOptions.bAllowUpdatePartialDatetime&&this.moOptions.shouldConvertToUserTimezone&&this.moOptions.serverTimezoneOffset!==(new Date).getTimezoneOffset()&&this.moOptions.time&&!y&&(l||h||s),this.SetDateServer(v,e,s,h,l,y,g,nt)),s&&l&&h?this.SetDateCalendar(new Date,e):this.SetDateCalendar(v,e),rt=o&&this.moOptions.interval&&!e,!(k&&(!this.moOptions.allowIncompleteDate||h&&s||s)&&!rt)){if(b=this._CheckEvent("change")==!0,b&&this.mbTabPressed&&this.moFieldClient&&this.moFieldClientTo){b=!1;var et=this.moFieldClient[DateCtrl.Const.YEAR].val(),w=this.moFieldClient[DateCtrl.Const.MONTH].val(),ot=this.moFieldClient[DateCtrl.Const.DAY].val();parseInt(w)!==NaN&&(w=String(parseInt(w)-1));var st=this.moFieldClientTo[DateCtrl.Const.YEAR].val(),d=this.moFieldClientTo[DateCtrl.Const.MONTH].val(),ht=this.moFieldClientTo[DateCtrl.Const.DAY].val();parseInt(d)!==NaN&&(d=String(parseInt(d)-1));et!=""&&st!=""&&w!=""&&d!=""&&ot!=""&&ht!=""&&(b=!0)}Utils.IsStringFilled(this.CheckStartDateAndEndDate(v))&&(b=!1);b&&Matrix3.AddEventUsingDTO({sourceVForm:this.moEvents.change.vform_id,sourceEvent:this.moEvents.change.name,sourceType:this.moEvents.change.type,eventDelay:this.moEvents.change.delay,args:this.moEvents.change.args,noWarningIfInputNotValidated:!0});this.Event_Change&&this.Event_Change.Fire()}this.OnChange(k?null:v)},ClearDateClient:function(n){var t=n?this.moFieldClientTo:this.moFieldClient;t[DateCtrl.Const.DAY].val("");t[DateCtrl.Const.MONTH].val("");t[DateCtrl.Const.YEAR].val("");this.moOptions.time&&(t[DateCtrl.Const.HOUR].val(""),t[DateCtrl.Const.MINUTE].val(""),t[DateCtrl.Const.SECOND].val(""))},GetDateClient:function(n){return n?this.moFieldClientTo:this.moFieldClient},GetDateClientJSDate:function(n){var t=n?this.moFieldClientTo:this.moFieldClient;return this.ShouldShowDateIncompleteWarning()?undefined:this.moOptions.time?new Date(Number(t[DateCtrl.Const.YEAR].val()),Number(t[DateCtrl.Const.MONTH].val()-1),Number(t[DateCtrl.Const.DAY].val()),Number(t[DateCtrl.Const.HOUR].val()),Number(t[DateCtrl.Const.MINUTE].val()!=null?t[DateCtrl.Const.MINUTE].val():"0"),Number(t[DateCtrl.Const.SECOND].val()!=null?t[DateCtrl.Const.SECOND].val():"0")):new Date(Number(t[DateCtrl.Const.YEAR].val()),Number(t[DateCtrl.Const.MONTH].val()-1),Number(t[DateCtrl.Const.DAY].val()))},SetDateClient:function(n,t,i,r,u,f,e,o){var s=t?this.moFieldClientTo:this.moFieldClient,h,c;i||s[DateCtrl.Const.YEAR].val(this.GetCorrectYear(n.getFullYear(),!1));r||(h=this.GetCorrectMonth(n.getMonth()+1),h.toString().length==1&&(h="0"+h),s[DateCtrl.Const.MONTH].val(h));u||(c=this.GetCorrectDay(n.getDate()),c.toString().length==1&&(c="0"+c),s[DateCtrl.Const.DAY].val(c));this.moOptions.time&&(f||s[DateCtrl.Const.HOUR].val(this.GetCorrectHour(n.getHours())),f&&e||s[DateCtrl.Const.MINUTE].val(this.GetCorrectMinOrSeconds(n.getMinutes())),f&&e&&o||s[DateCtrl.Const.SECOND].val(this.GetCorrectMinOrSeconds(n.getSeconds())))},ClearDateServer:function(n){var t=n?DateCtrl.Const.SERVER_ID_TO_SUFFIX:DateCtrl.Const.SERVER_ID_SUFFIX;$E(this.msID+t).val("")},SetDateServer:function(n,t,i,r,u,f,e,o){var a,c,s,h,l;if(this.moOptions.advanceDate){if(r&&(u=!0),this.moOptions.time&&this.moOptions.shouldConvertToUserTimezone&&!this.moOptions.showTimezoneSelector&&(!f||!this.moOptions.bAllowUpdatePartialDatetime)&&!u&&!r&&!i){var v=this.moOptions.serverTimezoneOffset,y=n.getTimezoneOffset(),p=v-y;n=new Date(n.getTime()-p*6e4)}s={};s[DateCtrl.Const.YEAR]=this.GetCorrectYear(n.getFullYear(),!1);s[DateCtrl.Const.MONTH]=new String(this.GetCorrectMonth(n.getMonth()+1));s[DateCtrl.Const.DAY]=new String(this.GetCorrectDay(n.getDate()));this.moOptions.time&&(s[DateCtrl.Const.HOUR]=this.GetCorrectHour(n.getHours()),s[DateCtrl.Const.MINUTE]=this.GetCorrectMinOrSeconds(n.getMinutes()),s[DateCtrl.Const.SECOND]=this.GetCorrectMinOrSeconds(n.getSeconds()));h=s[DateCtrl.Const.YEAR];r||(s[DateCtrl.Const.MONTH].length==1&&(s[DateCtrl.Const.MONTH]="0"+s[DateCtrl.Const.MONTH]),h+=DateCtrl.Const.SEPARATOR_ADVANCEDATE+s[DateCtrl.Const.MONTH],u||(s[DateCtrl.Const.DAY].length==1&&(s[DateCtrl.Const.DAY]="0"+s[DateCtrl.Const.DAY]),h+=DateCtrl.Const.SEPARATOR_ADVANCEDATE+s[DateCtrl.Const.DAY],this.moOptions.time&&(s[DateCtrl.Const.HOUR].length==1&&(s[DateCtrl.Const.HOUR]="0"+s[DateCtrl.Const.HOUR]),h+=DateCtrl.Const.SEPARATOR_DATE_TIME_ADVANCEDATE+s[DateCtrl.Const.HOUR],s[DateCtrl.Const.MINUTE].length==1&&(s[DateCtrl.Const.MINUTE]="0"+s[DateCtrl.Const.MINUTE]),h+=DateCtrl.Const.SEPARATOR_TIME+s[DateCtrl.Const.MINUTE],s[DateCtrl.Const.SECOND].length==1&&(s[DateCtrl.Const.SECOND]="0"+s[DateCtrl.Const.SECOND]),h+=DateCtrl.Const.SEPARATOR_TIME+s[DateCtrl.Const.SECOND])));!this.moOptions.time||!this.moOptions.showTimezoneSelector||u||r||i||(l=this.GetSelectedUserOffsetMinutes(),l!==null&&(h+=" "+DateCtrl.FormatOffsetSuffix(l)));$E(this.msID+DateCtrl.Const.SERVER_ID_SUFFIX).val(h)}else if(i&&r&&u&&(!this.moOptions.time||f&&e&&o))$E(this.msID+a).val("");else{if(r&&!this.moOptions.bAllowUpdatePartialDatetime&&(u=!0),this.moOptions.time&&this.moOptions.shouldConvertToUserTimezone&&!this.moOptions.showTimezoneSelector&&(!f||!this.moOptions.bAllowUpdatePartialDatetime)&&!u&&!r&&!i){var v=this.moOptions.serverTimezoneOffset,y=n.getTimezoneOffset(),p=v-y;n=new Date(n.getTime()-p*6e4)}a=t?DateCtrl.Const.SERVER_ID_TO_SUFFIX:DateCtrl.Const.SERVER_ID_SUFFIX;s={};s[DateCtrl.Const.YEAR]=this.GetCorrectYear(n.getFullYear(),!1);s[DateCtrl.Const.MONTH]=this.GetCorrectMonth(n.getMonth()+1);s[DateCtrl.Const.DAY]=this.GetCorrectDay(n.getDate());this.moOptions.time&&(s[DateCtrl.Const.HOUR]=this.GetCorrectHour(n.getHours()),s[DateCtrl.Const.MINUTE]=this.GetCorrectMinOrSeconds(n.getMinutes()),s[DateCtrl.Const.SECOND]=this.GetCorrectMinOrSeconds(n.getSeconds()));u&&(s[DateCtrl.Const.DAY]="");r&&(s[DateCtrl.Const.MONTH]="");c={};c[DateCtrl.Const.YEAR]=i;c[DateCtrl.Const.MONTH]=r;c[DateCtrl.Const.DAY]=u;h=this.GetDateTimeUnitValue(s,this.masServerFormatOrder[0],c[this.masServerFormatOrder[0]])+DateCtrl.Const.SEPARATOR+this.GetDateTimeUnitValue(s,this.masServerFormatOrder[1],c[this.masServerFormatOrder[1]])+DateCtrl.Const.SEPARATOR+this.GetDateTimeUnitValue(s,this.masServerFormatOrder[2],c[this.masServerFormatOrder[2]]);this.moOptions.time&&(h+=DateCtrl.Const.SEPARATOR_DATE_TIME+this.GetDateTimeUnitValue(s,DateCtrl.Const.HOUR,f)+DateCtrl.Const.SEPARATOR_TIME+this.GetDateTimeUnitValue(s,DateCtrl.Const.MINUTE,e)+DateCtrl.Const.SEPARATOR_TIME+this.GetDateTimeUnitValue(s,DateCtrl.Const.SECOND,o),!this.moOptions.showTimezoneSelector||u||r||i||(l=this.GetSelectedUserOffsetMinutes(),l!==null&&(h+=" "+DateCtrl.FormatOffsetSuffix(l))));$E(this.msID+a).val(h)}},GetDateTimeUnitValue:function(n,t,i){return i&&this.moOptions.bAllowUpdatePartialDatetime?"null":n[t]},SetDateCalendar:function(n,t){t?$E(this.msID+DateCtrl.Const.FULL_DATE_TO).datepicker("setDate",n):$E(this.msID+DateCtrl.Const.FULL_DATE_FROM).datepicker("setDate",n)},GetCorrectDay:function(n){return(isNaN(parseInt(n))==!0||n==""||parseInt(n,10)>31||parseInt(n,10)<1)&&(n="1"),n},GetCorrectMonth:function(n,t){return(isNaN(parseInt(n))==!0||n==""||parseInt(n,10)>12||parseInt(n,10)<1)&&(n=t?"12":"1"),n}
216,GetCorrectYear:function(n,t){if(typeof n!="string"&&(n=new String(n)),isNaN(parseInt(n))==!0||n=="")n="0";else if(n.length>4){var i=new Date;n=i.getFullYear().toString()}else t===!0&&Utils.ParseBool(Param.FormatYearShortcutActivated)===!0?n.length==3?n="1"+n:n.length==2?n="20"+n:n.length==1&&(n="200"+n):n.length==3?n="0"+n:n.length==2?n="00"+n:n.length==1&&(n="000"+n);return n=="0001"&&(n=""),n},GetCorrectHour:function(n){var t=parseInt(n,10);return isNaN(t)==!0||n==""||t>24||t<=0?n="00":(n.length==1||t<10)&&(n="0"+n),n},GetCorrectMinOrSeconds:function(n){var t=parseInt(n,10);return isNaN(t)==!0||n==""||t>60||t<=0?n="00":(n.length==1||t<10)&&(n="0"+n),n},IsLeapYear:function(n){return isNaN(parseInt(n))==!0?!1:(n&3)==0&&(n%100!=0||n%400==0)},NbDaysInMonth:function(n){var i=[31,28,31,30,31,30,31,31,30,31,30,31],t=n.getMonth(),r=n.getFullYear();return this.IsLeapYear(r)&&t==1?i[t]+1:i[t]},GetCurrentPeriodValue:function(){return $E(this.msID+DateCtrl.Const.PERIOD_SUFFIX).val()},UpdatePeriod:function(){var t=new Date,n=new Date,r=!1,u=this.moOptions.time,i=this.GetCurrentPeriodValue();i===DateCtrl.Const.PERIOD_NONE||i==="0"?(r=!0,this.ClearDate(!1),this.ClearDate(!0)):typeof i=="undefined"||i===null?r=!0:$.ajax({type:"GET",dataType:"json",url:DateCtrl.Const.PERIOD_API_URL+i,"async":!1,success:function(i){var r=i.APIResponse;u?(t=new Date(r.DateFromYear,r.DateFromMonth-1,r.DateFromDay,r.DateFromHour,r.DateFromMinute,r.DateFromSecond),n=new Date(r.DateToYear,r.DateToMonth-1,r.DateToDay,r.DateToHour,r.DateToMinute,r.DateToSecond)):(t=new Date(r.DateFromYear,r.DateFromMonth-1,r.DateFromDay),n=new Date(r.DateToYear,r.DateToMonth-1,r.DateToDay))}});r||(this.moOptions.interval?(this.mbIntervalPartiallySet=!0,this.SetDate(n.getDate(),n.getMonth()+1,n.getFullYear(),n.getHours(),n.getMinutes(),n.getSeconds(),!0,!0),this.mbIntervalPartiallySet=!1,this.SetDate(t.getDate(),t.getMonth()+1,t.getFullYear(),t.getHours(),t.getMinutes(),t.getSeconds(),!1,!0)):this.SetDate(n.getDate(),n.getMonth()+1,n.getFullYear(),n.getHours(),n.getMinutes(),n.getSeconds(),!1,!0))},ParseServerDateFormat:function(){var t=DateCtrl.Const.MONTH,i=DateCtrl.Const.DAY,r=DateCtrl.Const.YEAR,u=DateCtrl.Const.HOUR,f=DateCtrl.Const.MINUTE,e=DateCtrl.Const.SECOND,n=this.moOptions.serverFormat.split(DateCtrl.Const.SEPARATOR);n.length==3&&(t=n[0],i=n[1],r=n[2]);this.masServerFormatOrder=[];this.masServerFormatOrder[0]=t;this.masServerFormatOrder[1]=i;this.masServerFormatOrder[2]=r;this.masServerFormatOrder[3]=u;this.masServerFormatOrder[4]=f;this.masServerFormatOrder[5]=e;this.masServerFormatOrderHash={};this.masServerFormatOrderHash[t]=0;this.masServerFormatOrderHash[i]=1;this.masServerFormatOrderHash[r]=2;this.masServerFormatOrderHash[u]=3;this.masServerFormatOrderHash[f]=4;this.masServerFormatOrderHash[e]=5},ParseClientDateFormat:function(){var n=DateCtrl.Const.MONTH,t=DateCtrl.Const.DAY,i=DateCtrl.Const.YEAR,r=DateCtrl.Const.HOUR,u=DateCtrl.Const.MINUTE,f=DateCtrl.Const.SECOND,s=this.moOptions.defaultValue||this.moOptions.interval,e=this.moOptions.clientFormat.split(DateCtrl.Const.SEPARATOR),o;e.length==3&&(n=e[0],t=e[1],i=e[2]);this.moFieldClient={};this.moFieldClient[n]=$E(this.msID+DateCtrl.Const.FIELD1_SUFFIX);this.moFieldClient[t]=$E(this.msID+DateCtrl.Const.FIELD2_SUFFIX);this.moFieldClient[i]=$E(this.msID+DateCtrl.Const.FIELD3_SUFFIX);this.moOptions.time&&(this.moFieldClient[r]=$E(this.msID+DateCtrl.Const.FIELD_TIME1_SUFFIX),this.moFieldClient[u]=$E(this.msID+DateCtrl.Const.FIELD_TIME2_SUFFIX),this.moFieldClient[f]=$E(this.msID+DateCtrl.Const.FIELD_TIME3_SUFFIX));o=s||this.moOptions.showFieldsDescriptionMode==DateCtrl.Const.SHOW_FIELD_DESCRIPTIONS_MODE_ALWAYS||this.moOptions.enabled&&(this.moOptions.showFieldsDescriptionMode==DateCtrl.Const.SHOW_FIELD_DESCRIPTIONS_MODE_VALUE_FILLED_OR_ENABLED||!this.moOptions.showFieldsDescriptionMode)&&!(this.moOptions.showFieldsDescriptionMode==DateCtrl.Const.SHOW_FIELD_DESCRIPTIONS_MODE_VALUE_NEVER);o?($E(this.msID+DateCtrl.Const.DESC1_SUFFIX).append("<p>"+n+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC2_SUFFIX).append("<p>"+t+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC3_SUFFIX).append("<p>"+i+"<\/p>"),this.moOptions.time&&($E(this.msID+DateCtrl.Const.DESC1_TIME_SUFFIX).append("<p>"+r+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC2_TIME_SUFFIX).append("<p>"+u+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC3_TIME_SUFFIX).append("<p>"+f+"<\/p>"))):($E(this.msID+DateCtrl.Const.DESC1_SUFFIX).parent().find("div").hide(),this.moOptions.time&&$E(this.msID+DateCtrl.Const.DESC1_TIME_SUFFIX).parent().find("div").hide());this.moOptions.interval&&(this.moFieldClientTo={},this.moFieldClientTo[n]=$E(this.msID+DateCtrl.Const.FIELD1_TO_SUFFIX),this.moFieldClientTo[t]=$E(this.msID+DateCtrl.Const.FIELD2_TO_SUFFIX),this.moFieldClientTo[i]=$E(this.msID+DateCtrl.Const.FIELD3_TO_SUFFIX),this.moOptions.time&&(this.moFieldClientTo[r]=$E(this.msID+DateCtrl.Const.FIELD_TIME1_TO_SUFFIX),this.moFieldClientTo[u]=$E(this.msID+DateCtrl.Const.FIELD_TIME2_TO_SUFFIX),this.moFieldClientTo[f]=$E(this.msID+DateCtrl.Const.FIELD_TIME3_TO_SUFFIX)),o?($E(this.msID+DateCtrl.Const.DESC1_TO_SUFFIX).append("<p>"+n+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC2_TO_SUFFIX).append("<p>"+t+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC3_TO_SUFFIX).append("<p>"+i+"<\/p>"),this.moOptions.time&&($E(this.msID+DateCtrl.Const.DESC1_TO_TIME_SUFFIX).append("<p>"+r+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC2_TO_TIME_SUFFIX).append("<p>"+u+"<\/p>"),$E(this.msID+DateCtrl.Const.DESC3_TO_TIME_SUFFIX).append("<p>"+f+"<\/p>"))):($E(this.msID+DateCtrl.Const.DESC1_TO_SUFFIX).parent().find("div").hide(),this.moOptions.time&&$E(this.msID+DateCtrl.Const.DESC1_TO_TIME_SUFFIX).parent().find("div").hide()))},ParseValue:function(n,t){var e,r,a,v,f;if(this.moOptions.advanceDate){n=n.replaceAll(DateCtrl.Const.SEPARATOR,DateCtrl.Const.SEPARATOR_ADVANCEDATE).replaceAll(DateCtrl.Const.SEPARATOR_DATE_TIME,DateCtrl.Const.SEPARATOR_DATE_TIME_ADVANCEDATE);var y=n.split(DateCtrl.Const.SEPARATOR_DATE_TIME_ADVANCEDATE),i=y[0].split(DateCtrl.Const.SEPARATOR_ADVANCEDATE),s=null,o=null,l=null,u=null,h=null,c=null;i.length>2?(i.length>this.masServerFormatOrderHash[DateCtrl.Const.YEAR]&&(s=i[this.masServerFormatOrderHash[DateCtrl.Const.YEAR]]),i.length>this.masServerFormatOrderHash[DateCtrl.Const.MONTH]&&(o=i[this.masServerFormatOrderHash[DateCtrl.Const.MONTH]]),i.length>this.masServerFormatOrderHash[DateCtrl.Const.DAY]&&(l=i[this.masServerFormatOrderHash[DateCtrl.Const.DAY]])):this.masServerFormatOrderHash[DateCtrl.Const.YEAR]<this.masServerFormatOrderHash[DateCtrl.Const.MONTH]||i.length==1||i.length>0&&i[0].length==4?(i.length>0&&(s=i[0]),i.length>1&&(o=i[1])):(i.length>0&&(o=i[0]),i.length>1&&(s=i[1]));this.moOptions.time&&y.length===2&&(f=y[1].split(DateCtrl.Const.SEPARATOR_TIME),f.length>0&&(u=f[0]),f.length>1&&(h=f[1]),f.length>2&&(c=f[2]));this.SetDate(l,o,s,u,h,c,t)}else if(e=n.split(DateCtrl.Const.SEPARATOR),e.length==3){var l=e[this.masServerFormatOrderHash[DateCtrl.Const.DAY]],o=e[this.masServerFormatOrderHash[DateCtrl.Const.MONTH]],s=e[this.masServerFormatOrderHash[DateCtrl.Const.YEAR]].substring(0,4),u="00",h="00",c="00";this.moOptions.time&&(r=e[this.masServerFormatOrderHash[DateCtrl.Const.YEAR]].split(DateCtrl.Const.SEPARATOR_DATE_TIME),r.length>1&&(a=!1,v=!1,r[2]==DateCtrl.Const.TIME_PM?a=!0:r[2]==DateCtrl.Const.TIME_AM&&(v=!0),r=r[1].split(DateCtrl.Const.SEPARATOR_TIME),r.length==3&&(a?(u=parseInt(r[0])+12,u==24&&(u=12)):(u=r[0],u=="12"&&v&&(u="00")),h=r[1],c=r[2])));this.SetDate(l,o,s,u,h,c,t)}},ActiveFocus:function(){$E(this.msID+DateCtrl.Const.FIELD1_SUFFIX).focus()},InitDatas:function(n){typeof n!="object"&&(n={});this.moOptions=$.extend(this.moDefaultOptions,n);this.moOptions.serverFormat=this.moOptions.serverFormat.toLowerCase();this.moOptions.clientFormat=this.moOptions.clientFormat.toLowerCase();this.moOptions.interval=Utils.ParseBool(this.moOptions.interval);this.moOptions.time=Utils.ParseBool(this.moOptions.time);this.moOptions.defaultPeriod=this.moOptions.defaultPeriod!=""?this.moOptions.defaultPeriod:"NONE";this.moOptions.oneField=Utils.ParseBool(this.moOptions.oneField);this.moOptions.nbMonthDisplayed=this.moOptions.nbMonthDisplayed!=""?parseInt(this.moOptions.nbMonthDisplayed):1;this.moOptions.showWeek=Utils.ParseBool(this.moOptions.showWeek);this.moOptions.selectorMonth=Utils.ParseBool(this.moOptions.selectorMonth);this.moOptions.selectorYear=Utils.ParseBool(this.moOptions.selectorYear);this.moOptions.timeIsRequired=Utils.ParseBool(this.moOptions.timeIsRequired);this.moOptions.startDate=parseInt(this.moOptions.startDate);this.moOptions.endDate=parseInt(this.moOptions.endDate);this.moOptions.firstDayOfWeek=this.moOptions.firstDayOfWeek!=""?parseInt(this.moOptions.firstDayOfWeek):0;this.moOptions.advanceDate=Utils.ParseBool(this.moOptions.advanceDate);this.moOptions.bAllowUpdatePartialDatetime=Utils.ParseBool(this.moOptions.bAllowUpdatePartialDatetime);this.moOptions.validateDatabaseRange=Utils.ParseBool(this.moOptions.validateDatabaseRange);this.moOptions.forceUsingCalendarPicker=Utils.ParseBool(this.moOptions.forceUsingCalendarPicker);this.moOptions.shouldConvertToUserTimezone=Utils.ParseBool(this.moOptions.shouldConvertToUserTimezone);this.moOptions.serverTimezoneOffset=this.moOptions.serverTimezoneOffset!==""?parseInt(this.moOptions.serverTimezoneOffset):(new Date).getTimezoneOffset();this.moOptions.showTimezoneSelector=Utils.ParseBool(this.moOptions.showTimezoneSelector)},InstallTimezoneSelector:function(){var u=this.msID+DateCtrl.Const.TIMEZONE_SELECTOR_SUFFIX,n,t,i;if(!document.getElementById(u)&&(n=$E(this.msID+DateCtrl.Const.FIELD_TIME3_SUFFIX),n.length||(n=$E(this.msID+DateCtrl.Const.FIELD_TIME2_SUFFIX)),n.length||(n=$E(this.msID+DateCtrl.Const.FIELD_TIME1_SUFFIX)),n.length)){var f=this.ExtractOffsetFromServerField(),o=f!==null?f:this.GetDefaultTimezoneOffsetMinutes(),e=this.GetTimezoneOffsetOptions(),r='<select id="'+u+'" class="datectrl-tz-selector" style="margin-left:6px;">';for(t=0;t<e.length;t++)i=e[t],r+='<option value="'+i.offsetMinutes+'"'+(i.offsetMinutes===o?' selected="selected"':"")+">"+i.label+"<\/option>";r+="<\/select>";n.after(r)}},ExtractOffsetFromServerField:function(){var i=[this.moOptions.defaultValue],r=$E(this.msID+DateCtrl.Const.SERVER_ID_SUFFIX),t,u,n,f;for(r&&r.length&&i.push(r.val()),t=0;t<i.length;t++)if((u=i[t],u)&&(n=String(u).match(/([+-])(\d{2}):(\d{2})\s*$/),n))return f=n[1]==="+"?1:-1,f*(parseInt(n[2],10)*60+parseInt(n[3],10));return null},GetSelectedUserOffsetMinutes:function(){var n,t;return this.moOptions.showTimezoneSelector?(n=document.getElementById(this.msID+DateCtrl.Const.TIMEZONE_SELECTOR_SUFFIX),!n||n.value==="")?null:(t=parseInt(n.value,10),isNaN(t)?null:t):null},GetTimezoneOffsetOptions:function(){for(var t=[],n=-720;n<=840;n+=15)t.push(n);return t.map(function(n){return{offsetMinutes:n,label:DateCtrl.FormatOffsetLabel(n)}})},GetDefaultTimezoneOffsetMinutes:function(){return this.moOptions.shouldConvertToUserTimezone?-(new Date).getTimezoneOffset():0},SetEvent:function(n,t,i,r,u,f){this.moEvents[n]={name:i,vform_id:t,type:r,delay:u,args:f}},SetEventChange:function(n,t,i,r,u){this.SetEvent("change",n,t,i,r,u)},_CheckEvent:function(n){return typeof n=="string"&&this.moEvents&&this.moEvents[n]&&this.moEvents[n].vform_id&&this.moEvents[n].name&&this.moEvents[n].type&&this.moEvents[n].delay?!0:!1},Event_Change_Setup:function(){this.Event_Change=new CtrlEvent(this)},Event_SelectPeriod_Setup:function(){this.Event_SelectPeriod=new CtrlEvent(this)},Event_Clear_Setup:function(){this.Event_Clear=new CtrlEvent(this)},UpdateAll:function(){var n=!1;this.moOptions.defaultPeriod!==DateCtrl.Const.PERIOD_NONE&&this.moOptions.defaultPeriod!=="0"&&(this.UpdatePeriod(),n=!0);
216n==!1&&(this.UpdateCalendar(!1),this.moOptions.interval&&this.UpdateCalendar(!0))},IsToField:function(n){return n.endsWith(DateCtrl.Const.FIELD1_TO_SUFFIX)||n.endsWith(DateCtrl.Const.FIELD2_TO_SUFFIX)||n.endsWith(DateCtrl.Const.FIELD3_TO_SUFFIX)||n.endsWith(DateCtrl.Const.FIELD_TIME1_TO_SUFFIX)||n.endsWith(DateCtrl.Const.FIELD_TIME2_TO_SUFFIX)||n.endsWith(DateCtrl.Const.FIELD_TIME3_TO_SUFFIX)?!0:!1},SaveUserInputStatuses:function(n,t,i,r,u){n?(this.mbUserHasInputDateTo=t,this.mbDateToTypedInOnce|=t,this.mbDateToIncomplete=i,this.mbMonthToEmpty=r,this.mbYearToEmpty=u):(this.mbUserHasInputDateFrom=t,this.mbDateFromTypedInOnce|=t,this.mbDateFromIncomplete=i,this.mbMonthFromEmpty=r,this.mbYearFromEmpty=u)},ShouldShowDateIncompleteWarning:function(){var n=this.moOptions.time&&this.moOptions.timeIsRequired,t=n||!this.moOptions.advanceDate,i=this.IsDateSideIncomplete(!1)||this.IsDateSideIncomplete(!0);return i&&t&&!this.moOptions.bAllowUpdatePartialDatetime},IsDateSideIncomplete:function(n){return n?(this.mbUserHasInputDateTo||this.mbDateToTypedInOnce)&&this.mbDateToIncomplete&&(!this.moOptions.allowIncompleteDate||this.mbYearToEmpty):(this.mbUserHasInputDateFrom||this.mbDateFromTypedInOnce)&&this.mbDateFromIncomplete&&(!this.moOptions.allowIncompleteDate||this.mbYearFromEmpty)},GetValueComponents:function(n){var t=n?this.moFieldClientTo:this.moFieldClient,i={day:t[DateCtrl.Const.DAY].val(),month:t[DateCtrl.Const.MONTH].val(),year:t[DateCtrl.Const.YEAR].val(),hour:"",minute:"",second:""};return this.moOptions.time&&(i.hour=t[DateCtrl.Const.HOUR].val(),i.minute=t[DateCtrl.Const.MINUTE].val(),i.second=t[DateCtrl.Const.SECOND].val()),i},CaptureValidValueSnapshot:function(){this.HasErrors()||(this.moLastValidValue={from:this.GetValueComponents(!1),to:this.moOptions.interval?this.GetValueComponents(!0):null})},RevertToLastValidValue:function(){var n=this.moLastValidValue;n?(this.SetDate(n.from.day,n.from.month,n.from.year,n.from.hour,n.from.minute,n.from.second,!1,!1),this.moOptions.interval&&n.to&&this.SetDate(n.to.day,n.to.month,n.to.year,n.to.hour,n.to.minute,n.to.second,!0,!1)):(this.ClearDate(!1),this.moOptions.interval&&this.ClearDate(!0))},ClearUserInputStatus:function(){this.mbDateFromIncomplete=!1;this.mbDateToIncomplete=!1;this.mbUserHasInputDateFrom=!1;this.mbUserHasInputDateTo=!1;this.mbDateFromTypedInOnce=!1;this.mbDateToTypedInOnce=!1}};Utils.Augment(DateCtrl,MatrixEventProperties);Utils.Augment(DateCtrl,CommandProperties);Utils.Augment(DateCtrl,ChangeEvent);Utils.Augment(DateCtrl,ParamValueUpdateAction);DropDownListCtrl.Const={CONTROL_NAME:"DropDownList"};DropDownListCtrl.prototype={Event_Change_Setup:function(){this.Event_Change=new CtrlEvent(this,function(){Utils.AddEvent(this.msControlID,"change",this.Event_Change.Fire,this.Event_Change)})},Action_SelectIndex:function(n){$Elt(this.msControlID).value=$Elt(this.msControlID).options[n].value},Action_SetValue:function(n){$E(this.msControlID).val(n)}};Utils.Augment(DropDownListCtrl,MatrixEventProperties);Utils.Augment(DropDownListCtrl,RulerProperties);Utils.Augment(DropDownListCtrl,FocusProperties);Utils.Augment(DropDownListCtrl,RequiredProperties);Utils.Augment(DropDownListCtrl,ClassProperties);Utils.Augment(DropDownListCtrl,ParamValueUpdateAction);FlashCtrl.Const={CONTROL_NAME:"Flash",SUFFIX_MOVIE:"_Movie"};FlashCtrl.SendEvent=function(n,t){var i=n.split(Matrix3.Const.SEPARATOR_CONTROL)[0];Matrix3.AddEvent(i,t,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,"","","",null,null,null,!1,null,!1,null,null)};FlashCtrl.prototype={Setup:function(n,t,i,r,u){var f,e;this.flashvars={};$Elt(this.msID)!=null&&(t==""&&(t="100%"),i==""&&(i="100%"),this.sWidth=t,this.sHeight=i,this.sSource=n,f=this.msID+FlashCtrl.Const.SUFFIX_MOVIE,this.params={allowfullscreen:"true",allowscriptaccess:"always"},u||(this.params.wmode="transparent"),this.attributes={id:f,name:f},e=document.createElement("div"),e.setAttribute("id",f),$Elt(this.msID).appendChild(e))},AddVariable:function(n,t){this.flashvars[n]=t},Start:function(){if($Elt(this.msID)!=null){var n=function(n){n.success&&(n.ref.tabIndex="-1",n.ref.focus())};swfobject.embedSWF(this.sSource,this.attributes.id,this.sWidth,this.sHeight,"9.0.115",!1,this.flashvars,this.params,this.attributes,n)}}};HiddenCtrl.Const={CONTROL_NAME:"Hidden"};HiddenCtrl.prototype={RefreshPopupTitle:function(){for(var n=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],t=$Elt(n+Popup.Const.TITLE_SUFFIX),r=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),i,u;t==null&&r!==-1;)n=n.substring(0,r),t=$Elt(n+Popup.Const.TITLE_SUFFIX),r=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY);i=$Elt(this.msID);u=this.UpdateParentFormTitle(n);t==null||typeof i=="undefined"||i==null||u||(t.innerHTML=HtmlSanitize.sanitizeRichText(i.value))},RefreshPopupDesc:function(){for(var n=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],t=$Elt(n+Popup.Const.DESCRIPTION_SUFFIX),r=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),i,u;t==null&&r!==-1;)n=n.substring(0,r),t=$Elt(n+Popup.Const.DESCRIPTION_SUFFIX),r=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY);i=$Elt(this.msID);u=this.UpdateParentFormDesc(n);t==null||typeof i=="undefined"||i==null||u||(t.innerHTML=HtmlSanitize.sanitizeRichText(i.value))},RefreshPopupStatus:function(){for(var n=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0],t=$Elt(n+Popup.Const.STATUS_PREFIX),u=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY),i,f,e,r;t==null&&u!==-1;)n=n.substring(0,u),t=$Elt(n+Popup.Const.STATUS_PREFIX),u=n.lastIndexOf(Matrix3.Const.SEPARATOR_HIERARCHY);return i=$Elt(this.msID),f=this.UpdateParentFormStatus(n),t!=null&&typeof i!="undefined"&&i!=null&&!f?(e=t.parentElement,r=i.value.split(Popup.Const.POPUP_STATUS_SEPARATOR),t.innerHTML=HtmlSanitize.sanitizeRichText(r[0]),t.style.color=r[1],e.style.backgroundColor=r[2],!0):void 0},UpdateParentFormTitle:function(n){var u=$(Utils.GetPopupContainer(n)).find('input[type=hidden][id$="'+Popup.Const.POPUP_TITLE+'"]'),r=u.toArray().sort().reverse(),t,i;return r.length>0&&(t=r[0],t&&(i=$Elt(t.id.split(Matrix3.Const.SEPARATOR_CONTROL)[0]+Popup.Const.TITLE_SUFFIX),i))?(i.innerHTML=HtmlSanitize.sanitizeRichText(t.value),!0):!1},UpdateParentFormDesc:function(n){var u=$(Utils.GetPopupContainer(n)).find('input[type=hidden][id$="'+Popup.Const.POPUP_DESCRIPTION+'"]'),r=u.toArray().sort().reverse(),t,i;return r.length>0&&(t=r[0],t&&(i=$Elt(t.id.split(Matrix3.Const.SEPARATOR_CONTROL)[0]+Popup.Const.DESCRIPTION_SUFFIX),i))?(i.innerHTML=HtmlSanitize.sanitizeRichText(t.value),!0):!1}
216,UpdateParentFormStatus:function(n){var e=$(Utils.GetPopupContainer(n)).find('input[type=hidden][id$="'+Popup.Const.POPUP_STATUS+'"]'),u=e.toArray().sort().reverse(),i,t,f,r;return u.length>0&&(i=u[0],i&&(t=$Elt(i.id.split(Matrix3.Const.SEPARATOR_CONTROL)[0]+Popup.Const.POPUP_STATUS),t))?(f=t.parentElement,r=i.value.split(Popup.Const.POPUP_STATUS_SEPARATOR),t.innerHTML=HtmlSanitize.sanitizeRichText(r[0]),t.style.color=r[1],f.style.backgroundColor=r[2],!0):!1}};HyperlinkCtrl.Const={CONTROL_NAME:"Hyperlink",WINDOW_TITLE:"title",WINDOW_OPTIONS:"options"};Utils.Augment(HyperlinkCtrl,ClickDeferredEvent);Utils.Augment(HyperlinkCtrl,ShowEvent);Utils.Augment(HyperlinkCtrl,OverEvent);Utils.Augment(HyperlinkCtrl,OutEvent);Utils.Augment(HyperlinkCtrl,ShortcutEvent);Utils.Augment(HyperlinkCtrl,CloseWindowAction);Utils.Augment(HyperlinkCtrl,ResizeProperties);Utils.Augment(HyperlinkCtrl,EffectProperties);Utils.Augment(HyperlinkCtrl,TempSourceProperties);Utils.Augment(HyperlinkCtrl,ClassProperties);Utils.Augment(HyperlinkCtrl,HyperlinkProperties);Utils.Augment(HyperlinkCtrl,FileNameOnDropProperties);ImageCtrl.Const={CONTROL_NAME:"Image",CLASS_OVERLAY_CANVAS:"overlay-canvas"};ImageCtrl.prototype._setupOverlayRendering=function(){var n=this,r=$E(n.msID).find("img"),t,i;r.on("load",function(){n._renderOverlays()});t=r[0];t&&typeof ResizeObserver!="undefined"&&(i=new ResizeObserver(function(){n._renderOverlays()}),i.observe(t),Matrix3.RegisterForCleanup(n.msID,"DisconnectOverlayResizeObserver",function(){i.disconnect()}));Matrix3.RegisterForCleanup(n.msID,"ClearImageOverlays",function(){n._clearOverlays();n.moOverlays={}})};ImageCtrl.prototype._clearOverlays=function(){var n=this,t,i;for(t in n.moOverlays)i=n.moOverlays[t].canvas,i&&i.remove(),n.moOverlays[t].canvas=null};ImageCtrl.prototype._renderOverlays=function(){var i=this,t=$E(i.msID).find("img")[0],u,e,n;if(t){i._clearOverlays();var r=t.parentElement,f=Array.from(r.children),o=f.length>0?Math.max.apply(null,f.map(function(n){return parseInt($(n).css("z-index"))||0}))+1:"auto";for(u in i.moOverlays)e=i.moOverlays[u].render,n=document.createElement("div"),n.style.zIndex=o,n.style.position="absolute",n.style.pointerEvents="none",n.style.top=$(t).offset().top-$(r).offset().top+"px",n.style.left=$(t).offset().left-$(r).offset().left+"px",n.style.width=$(t).width()+"px",n.style.height=$(t).height()+"px",n.classList.add(ImageCtrl.Const.CLASS_OVERLAY_CANVAS),r.appendChild(n),i.moOverlays[u].canvas=n,e(n)}};ImageCtrl.prototype.RegisterOverlay=function(n){var t=uuidv4();return this.moOverlays[t]={canvas:null,render:n},this._renderOverlays(),t};ImageCtrl.prototype.UnregisterOverlay=function(n){this.moOverlays[n]&&(this.moOverlays[n].canvas&&this.moOverlays[n].canvas.remove(),delete this.moOverlays[n])};Utils.Augment(ImageCtrl,ClassProperties);Utils.Augment(ImageCtrl,ResizeProperties);Utils.Augment(ImageCtrl,TempSourceProperties);Utils.Augment(ImageCtrl,ZoomProperties);Utils.Augment(ImageCtrl,HyperlinkProperties);Utils.Augment(ImageCtrl,OverEvent);Utils.Augment(ImageCtrl,OutEvent);Utils.Augment(ImageCtrl,FocusProperties);Utils.Augment(ImageCtrl,FileNameOnDropProperties);LabelCtrl.Const={CONTROL_NAME:"Label",CLASS_VALUE:"Value",CLASS_LBL:"Lbl"};LabelCtrl.prototype={GetValue:function(){var t="",i=$Elt(this.msID),n;return i&&(n=this.GetValueNode(i),n&&(t=Utils.GetTextContent(n))),t},SetValue:function(n,t){var r=$Elt(this.msID),i;r&&(i=this.GetValueNode(r),i&&Utils.SetTextContent(i,n,t))},GetValueNode:function(n){for(var r,u,i=n.childNodes,t=0,f=i.length;t<f;t++)if($HasClass(i[t],LabelCtrl.Const.CLASS_LBL)&&(u=i[t]),$HasClass(i[t],LabelCtrl.Const.CLASS_VALUE)){r=i[t];break}return!r&&u&&(r=u),r}};LabelCtrl.Activate=function(n,t){var r=n&&(n.GetOriginalWidth()==-1||n.GetOriginalHeight()==-1),e,u,i,f;r&&(e=$(n.GetNode()),r=e.find("img, pre[class*='language-'], p, video, [data-html='1']").length>0);(r||t)&&(u=n.msId,i=$(n.GetNode()).find(".Lbl,.Value"),t&&(i=$(n)),f=function(){if(i.length>0){var t=!1;n.GetOriginalWidth()==-1&&(iWidth=i.position().left+i[0].offsetWidth,iWidth!=n.GetWidth()&&(t=!0));n.GetOriginalHeight()==-1&&(iHeight=i.position().top+i[0].offsetHeight,iHeight!=n.GetHeight()&&(t=!0));t&&(PositionMgr.GetInstance().AddToDirtyXList(n),PositionMgr.GetInstance().AddToDirtyYList(n),PositionMgr.GetInstance().CalculatePositionAsync())}},new ResizeSensor(i,f),f(),FreeHtmlContainer.moControlsInUse[u]=i,Matrix3.RegisterInCache(u,FreeHtmlContainer))};Utils.Augment(LabelCtrl,SelectionProperties);Utils.Augment(LabelCtrl,ClassProperties);Utils.Augment(LabelCtrl,DragProperties);Utils.Augment(LabelCtrl,DropProperties);Utils.Augment(LabelCtrl,ClipboardProperties);
216Utils.Augment(LabelCtrl,CommandProperties);Utils.Augment(LabelCtrl,TooltipProperties);Utils.Augment(LabelCtrl,ClickEvent);Utils.Augment(LabelCtrl,MatrixEventProperties);Utils.Augment(LabelCtrl,HyperlinkProperties);Utils.Augment(LabelCtrl,OverEvent);Utils.Augment(LabelCtrl,OutEvent);Utils.Augment(LabelCtrl,ExecuteScriptAction);MapCtrl.Const={CONTROL_NAME:"Map",SUFFIX_MAP:"_Map",SUFFIX_MARKERS:"_Markers",MGR_NAME:"MapCtrl"};MapCtrl.moMaps={};MapCtrl.UpdateInit=function(){MapCtrl.mbInit=!0};MapCtrl.RefreshNode=function(n){delete MapCtrl.moMaps[n]};MapCtrl.prototype={Action_LoadMap:function(){if(!this.mbInit){var n=this;window.setTimeout(function(){n.Setup(n.msGoogleKey,n.miLatitude,n.miLongitude,n.miZoomLvl,n.msMapType)},100)}},Setup:function(n,t,i,r,u){var c,f,e,l,o,s,h;for(this.msGoogleKey=n,this.miLatitude=t,this.miLongitude=i,this.miZoomLvl=r,this.msMapType=u,c=!0,f=$Elt(this.msID).parentNode;f&&f!=document;){if($S(f,"display")=="none"){c=!1;break}f=f.parentNode}if(c){if(!MapCtrl.mbInit){MapCtrl.mbScriptInserted||(e=document.createElement("script"),e.setAttribute("src","http://maps.google.com/maps?file=api&v=2&async=2&callback=MapCtrl.UpdateInit&key="+n),e.setAttribute("type","text/javascript"),document.documentElement.firstChild.appendChild(e),MapCtrl.mbScriptInserted=!0);l=this;window.setTimeout(function(){l.Setup(n,t,i,r,u)},Matrix3.Const.RETRY_DELAY);return}o=parseFloat(t);isNaN(o)&&(o=0);s=parseFloat(i);isNaN(s)&&(s=0);h=parseInt(r);isNaN(h)&&(h=0);this.moMap=new GMap2(document.getElementById(this.msID+MapCtrl.Const.SUFFIX_MAP));this.moMap.setCenter(new GLatLng(o,s),h);MapCtrl.moMaps[this.msID]=this.moMap;Matrix3.RegisterInCache(this.msID,MapCtrl);Utils.Trim(u)==""&&(u=G_NORMAL_MAP);this.moMap.setMapType(Utils.EvalScriptsWithResult(u));this.moMap.addControl(new GMapTypeControl);this.moMap.addControl(new GLargeMapControl);this.moMap.enableDoubleClickZoom();this.moMap.enableContinuousZoom();this.moMap.enableGoogleBar();this.moMap.enableScrollWheelZoom();this.mbInit=!0}}};Utils.Augment(MapCtrl,ResizeProperties);MapMarkerCtrl.Const={CONTROL_NAME:"MapMarker",SUFFIX_LATITUDE:"_Lat",SUFFIX_LONGITUDE:"_Lon"};MapMarkerCtrl.prototype={Setup:function(n,t,i){var r=$Elt(this.msID).parentNode.id,f,e,o,u;if(this.msMarkerParentID=r,r=r.substring(0,r.lastIndexOf(MapCtrl.Const.SUFFIX_MARKERS)),!(r in MapCtrl.moMaps)){u=this;window.setTimeout(function(){u.Setup(n,t,i)},Matrix3.Const.RETRY_DELAY);return}f=parseFloat(n);isNaN(f)&&(f=0);e=parseFloat(t);isNaN(e)&&(e=0);o=i=="1"||i.toLowerCase()=="true"?!0:!1;this.moMarker=new GMarker(new GLatLng(f,e),{draggable:o});MapCtrl.moMaps[r].addOverlay(this.moMarker);o&&(u=this,GEvent.addListener(MapCtrl.moMaps[r],"click",function(n,t){n||u.UpdateMarkerInformation(t)}),GEvent.addListener(this.moMarker,"dragend",function(n){u.UpdateMarkerInformation(n)}));this.moMarker.bindInfoWindowHtml($Elt(this.msID))},AddEvent:function(n,t,i,r,u){var f;if(!this.moMarker){f=this;window.setTimeout(function(){f.AddEvent(n,t,i,r,u)},Matrix3.Const.RETRY_DELAY);return}this.msMarkerSourceVForm=n;this.msMarkerSourceEvent=t;this.msMarkerSourceType=i;this.msMarkerEventDelay=r;this.msMarkerEventArgs=u;f=this;GEvent.addListener(this.moMarker,"infowindowopen",function(){f.MarkerInfoOpened()})},MarkerInfoOpened:function(){this.mbMarkerEventSent||(this.SendEvent(this.msMarkerSourceVForm,this.msMarkerSourceEvent,this.msMarkerSourceType,this.msMarkerEventDelay,this.msMarkerEventArgs),this.mbMarkerEventSent=!0,Utils.CreateReference(this.msID))},UpdateMarkerInformation:function(n){this.moMarker.setLatLng(n);$Elt(this.msID+MapMarkerCtrl.Const.SUFFIX_LATITUDE).value=n.lat();$Elt(this.msID+MapMarkerCtrl.Const.SUFFIX_LONGITUDE).value=n.lng()}};Utils.Augment(MapMarkerCtrl,MatrixEventProperties);MeetingFlashQR.Instances={};MeetingFlashQR.Const={INACTIVE_THRESHOLD:5e3,FLASHING_INTERVAL:3e4,FLASHING_TIMEOUT:1500};MeetingFlashQR.Dispose=function(n){delete MeetingFlashQR.Instances[n]};MeetingFlashQR.prototype={Setup:function(n,t,i,r,u){this.msMeetingID=n;this.SetQRInfo(t);this.msHolderElementID=i;this.miQRWidth=r?r:300;this.Configurations={InactiveThreshold:MeetingFlashQR.Const.INACTIVE_THRESHOLD,FlashingInterval:MeetingFlashQR.Const.FLASHING_INTERVAL,FlashingTimeout:MeetingFlashQR.Const.FLASHING_TIMEOUT};typeof u=="object"&&$.extend(this.Configurations,u);MeetingFlashQR.Instances[n]=this;this.SetupUI();this.SetupActivityTracker();typeof MeetingInstance!="undefined"&&(MeetingInstance.msQRData=this.ProduceQRString(!0),MeetingInstance.Persist())},SetupUI:function(){Utils.LoadScript(["Include/Vendors/qrcodejs/qrcode.min.js",],function(){var i=document.getElementById(this.msHolderElementID),t=$(i).closest(".fb-nb-vf-meeting"),n;t.length>0&&(n=$(t).closest(".PopupC"),n.offset({top:20,left:Utils.GetViewportWidth()-n.width()-36}),n.css("opacity","1.0"),t.css("opacity","1.0"),this.moNotificationElement=n,this.isShowing=!1,this.FlashQRCode())}.bind(this),null,!0)},SetupActivityTracker:function(){this.mfOnKeyDownRef=$.proxy(this.OnActivity,this);this.mfOnMouseDownRef=$.proxy(this.OnActivity,this);this.mfOnMouseMoveRef=$.proxy(this.OnActivity,this);$(document.body).on("keydown."+this.msID,this.mfOnKeyDownRef);$(document.body).on("mousedown."+this.msID,this.mfOnMouseDownRef);$(document.body).on("mousemove."+this.msID,this.mfOnMouseMoveRef);this.mlNextFlashing=Date.now()+this.Configurations.FlashingInterval;this.miTrackerId=setInterval(function(){Date.now()>=this.mlNextFlashing&&this.FlashQRCode()}.bind(this),1e3);Matrix3.RegisterForCleanup(this.msID,"MeetingFlashQR",function(){try{this.Dispose()}catch(n){}}.bind(this))},OnActivity:function(){this.ExtendNextFlashingDelay()},FlashQRCode:function(){this.isShowing||(this.isShowing=!0,this.RefreshQRInUI(),this.moNotificationElement.show(),setTimeout(function(){var n=document.getElementById(this.msHolderElementID);$(n).empty();this.moNotificationElement.hide();this.mlNextFlashing=Date.now()+this.Configurations.FlashingInterval;this.isShowing=!1}.bind(this),this.Configurations.FlashingTimeout))},Dispose:function(){$(document.body).off("keydown."+this.msID,this.mfOnKeyDownRef);$(document.body).off("mousedown."+this.msID,this.mfOnMouseDownRef);$(document.body).off("mousemove."+this.msID,this.mfOnMouseMoveRef);clearInterval(this.miTrackerId);Matrix3.AddEvent(this.msID,"CLOSE_MYSELF","F","I");MeetingFlashQR.Dispose(this.msMeetingID)},ExtendNextFlashingDelay:function(){!this.isShowing&&Date.now()+this.Configurations.InactiveThreshold>=this.mlNextFlashing&&(this.mlNextFlashing+=this.Configurations.InactiveThreshold)},SetQRInfo:function(n){var t=n.split("|"),i;t.length>=4&&(i={Version:t[0],MeetingRID:t[1],InitialStepRID:t[2],InitialStepTimeStamp:new Date(t[3][t[3].length-1].toLowerCase()==="z"?t[3]:t[3]+"Z")},i.InitialClientTimeStamp=t.length===4?new Date:new Date(t[4]),this.moQRInfo=i)},ProduceQRString:function(n){var i=Date.now()-this.moQRInfo.InitialClientTimeStamp.getTime(),t=this.moQRInfo.Version+"|"+this.moQRInfo.MeetingRID+"|"+this.moQRInfo.InitialStepRID+"|"+new Date(this.moQRInfo.InitialStepTimeStamp.getTime()+i).toISOString().slice(0,-1);return n&&(t+="|"+this.moQRInfo.InitialClientTimeStamp.toISOString()),t},RefreshQRInUI:function(){var n=document.getElementById(this.msHolderElementID);$(n).empty();new QRCode(n,{text:this.ProduceQRString(),width:this.miQRWidth,height:this.miQRWidth})}};MenuMgr.moSingleton=null;
216MenuMgr.GetInstance=function(){return MenuMgr.moSingleton||(MenuMgr.moSingleton=new MenuMgr),MenuMgr.moSingleton};MenuMgr.prototype={Register:function(n){this.msLastID&&this.msLastID!=n&&$SetStyle(this.msLastID,"display","none");this.msLastID=n}};MenuCtrl.Const={CONTROL_NAME:"Menu",SUFFIX_MENU:"_Menu",CLASS_OVERMENU:"OverMenuClass"};MenuCtrl.prototype={Setup:function(n,t,i,r){var o=0,s=parseInt(n),f,e,u;Utils.IsNumber(s)&&(o=s);f=$Elt(this.msID+MenuCtrl.Const.SUFFIX_MENU);r?($SetStyle(f,"display","block"),MenuMgr.GetInstance().Register(f.id),$AddClass(this.msID,MenuCtrl.Const.CLASS_OVERMENU)):$SetStyle(f,"display","none");e=this;u=$Elt(this.msID);t&&t!=""&&($SetStyle(u,"display","none"),Utils.AddEvent(u.parentNode,"mouseover",function(n){DragDropMgr.IsDrag()||Utils.IsMouseLeaveOrEnter(n,this.parentNode)&&($SetStyle(this,"display","block"),MenuMgr.GetInstance().Register(u.id),$AddClass(e.msID,MenuCtrl.Const.CLASS_OVERMENU))},u),i||Utils.AddEvent(u.parentNode,"mouseout",function(n,t){Utils.IsMouseLeaveOrEnter(n,this.parentNode)&&(window.clearTimeout(t.moThreadDelay),$SetStyle(t,"display","none"),$SetStyle(this,"display","none"),$RemoveClass(e.msID,MenuCtrl.Const.CLASS_OVERMENU))},u,f),Utils.AddEvent(u.parentNode,"mouseup",function(n,t){Utils.IsMouseLeaveOrEnter(n,this.parentNode)&&(window.clearTimeout(t.moThreadDelay),$SetStyle(t,"display","none"),$SetStyle(this,"display","none"),$RemoveClass(e.msID,MenuCtrl.Const.CLASS_OVERMENU))},u,f));Utils.AddEvent(u,"mouseover",function(n,t){if(!DragDropMgr.IsDrag()&&Utils.IsMouseLeaveOrEnter(n,t)){var r=i?'MenuMgr.GetInstance().Register("'+this.id+'");':"";this.moThreadDelay=window.setTimeout(r+'$SetStyle("'+this.id+'", "display", "block");$AddClass("'+e.msID+'", MenuCtrl.Const.CLASS_OVERMENU);',o)}},f,u);i||Utils.AddEvent(u,"mouseout",function(n,t){Utils.IsMouseLeaveOrEnter(n,t)&&(window.clearTimeout(this.moThreadDelay),$SetStyle(this,"display","none"),$RemoveClass(e.msID,MenuCtrl.Const.CLASS_OVERMENU))},f,u);Utils.AddEvent(u,"mouseup",function(n,t){Utils.IsMouseLeaveOrEnter(n,t)&&(window.clearTimeout(this.moThreadDelay),$SetStyle(this,"display","none"),$RemoveClass(e.msID,MenuCtrl.Const.CLASS_OVERMENU))},f,u)}};PanelAdvancedCtrl.Const=PanelCtrl.Const={CONTROL_NAME:"PanelAdvanced",CONTROL_NAME_SIMPLE:"Panel",AUTOSIZE_MODE_CHILD:"child",AUTOSIZE_MARGIN:2};Utils.Augment(PanelAdvancedCtrl,DOMEventProperties);Utils.Augment(PanelAdvancedCtrl,MatrixEventProperties);Utils.Augment(PanelAdvancedCtrl,DragProperties);Utils.Augment(PanelAdvancedCtrl,DropProperties);Utils.Augment(PanelAdvancedCtrl,EffectProperties);Utils.Augment(PanelAdvancedCtrl,SelectionProperties);Utils.Augment(PanelAdvancedCtrl,ReorderProperties);Utils.Augment(PanelAdvancedCtrl,LoadingProperties);Utils.Augment(PanelAdvancedCtrl,TooltipProperties);Utils.Augment(PanelAdvancedCtrl,FoldProperties);Utils.Augment(PanelAdvancedCtrl,LoadingPostBackProperties);Utils.Augment(PanelAdvancedCtrl,LoadingAjaxProperties);Utils.Augment(PanelAdvancedCtrl,ResizeProperties);Utils.Augment(PanelAdvancedCtrl,CustomScrollbarProperties);Utils.Augment(PanelAdvancedCtrl,ClassProperties);Utils.Augment(PanelAdvancedCtrl,MountProperties);Utils.Augment(PanelAdvancedCtrl,RulerProperties);Utils.Augment(PanelAdvancedCtrl,DeactivateBackProperties);Utils.Augment(PanelAdvancedCtrl,ClipboardProperties);Utils.Augment(PanelAdvancedCtrl,FixedProperties);Utils.Augment(PanelAdvancedCtrl,DefaultActionProperties);Utils.Augment(PanelAdvancedCtrl,SlideShowProperties);Utils.Augment(PanelAdvancedCtrl,RelativeProperties);Utils.Augment(PanelAdvancedCtrl,SelectAllProperties);Utils.Augment(PanelAdvancedCtrl,PositionGroupProperties);Utils.Augment(PanelAdvancedCtrl,ResizableProperties);Utils.Augment(PanelAdvancedCtrl,ScrollProperties);Utils.Augment(PanelAdvancedCtrl,HyperlinkProperties);Utils.Augment(PanelAdvancedCtrl,DynamicChildrenVisibilityProperties);Utils.Augment(PanelAdvancedCtrl,RefreshMgrAction);Utils.Augment(PanelAdvancedCtrl,OverEvent);Utils.Augment(PanelAdvancedCtrl,OutEvent);Utils.Augment(PanelAdvancedCtrl,MouseDownEvent);Utils.Augment(PanelAdvancedCtrl,ClickEvent);Utils.Augment(PanelAdvancedCtrl,ClickDeferredEvent);Utils.Augment(PanelAdvancedCtrl,ShowEvent);Utils.Augment(PanelAdvancedCtrl,WindowResizeEvent);Utils.Augment(PanelAdvancedCtrl,WindowExitEvent);Utils.Augment(PanelAdvancedCtrl,SwipeEvent);Utils.Augment(PanelAdvancedCtrl,ClickOutEvent);Utils.Augment(PanelAdvancedCtrl,ExecuteScriptAction);Utils.Augment(PanelAdvancedCtrl,ScrollDownEvent);Utils.Augment(PanelAdvancedCtrl,ScrollUpEvent);PanelColCtrl.Const={CONTROL_NAME:"PanelCol"};Utils.Augment(PanelColCtrl,DropProperties);Utils.Augment(PanelColCtrl,ResizableProperties);PanelPopupCtrl.Const={CONTROL_NAME:"Popup"};PanelTableCtrl.Const={CONTROL_NAME:"PanelTable",CLASS_OVER_LINE:"OverLine"};PanelTableCtrl.prototype={ActiveFlyOverTable:function(){var t=$Elt(this.msID),n;if(t){n=this;$E(this.msID).on("mouseover","tr, .DVTableLine",function(t){n.OnMouseEnterLine.call(this,t)});$E(this.msID).on("mouseleave","tr, .DVTableLine",function(t){n.OnMouseLeaveLine.call(this,t)});this.ApplyFullContentOnHoverClass(t);
216this.moFullContentOnHoverObserver&&this.moFullContentOnHoverObserver.disconnect();this.moFullContentOnHoverObserver=new MutationObserver(function(){n.ApplyFullContentOnHoverClass(t)});this.moFullContentOnHoverObserver.observe(t,{childList:!0,subtree:!0});Matrix3.RegisterForCleanup(this.msID,"PanelTableCtrlFullContentOnHover",function(){n.moFullContentOnHoverObserver&&(n.moFullContentOnHoverObserver.disconnect(),n.moFullContentOnHoverObserver=null)})}},ApplyFullContentOnHoverClass:function(n){var t=n.querySelectorAll(".SpaceLookup .PanelCol:not(.OnlyAction):not(.DatagridCellTextFullContentOnHover)");t.length>0&&$(t).addClass("DatagridCellTextFullContentOnHover")},OnMouseEnterLine:function(){$AddClass(this,PanelTableCtrl.Const.CLASS_OVER_LINE)},OnMouseLeaveLine:function(){$RemoveClass(this,PanelTableCtrl.Const.CLASS_OVER_LINE)}};Utils.Augment(PanelTableCtrl,EditableTable);ParameterBoolCtrl.Const={CONTROL_NAME:"ParameterBool"};ParameterEnumCtrl.Const={CONTROL_NAME:"ParameterEnum"};ParameterStrCtrl.Const={CONTROL_NAME:"ParameterStr"};ParameterNumCtrl.Const={CONTROL_NAME:"ParameterNum"};ParamMgr=new ParamMgr;ParamMgr.Const={MGR_NAME:"Param"};ParamMgr.SaveAll=function(){this.SaveParameters()};ParamMgr.HasControls=function(){if(ParamMgr.moTable){var n=0;for(key in ParamMgr.moTable)ParamMgr.moTable.hasOwnProperty(key)&&n++;return n==0?!1:!0}return!1};ParamMgr.AddSaveBtn=function(n){_oControl=$PI(n);_oControl&&(this.moSaveBtns[_oControl.GetId()]=_oControl,Matrix3.RegisterInCache(_oControl.GetId(),ParamMgr),$(_oControl).click(this.SaveParameters))};ParamMgr.SaveParameters=function(){var i=[],r=[],t,n,u;for($.each(ParamMgr.moTable,function(n,t){t.HasValueChanged()&&i.push(t);t.mbToReset&&r.push(t)}),ParamMgr.HideSaveButtons(),t=i.length+r.length,n=0,u=i.length;n<u;n++){t--;var e=i[n],o=t>0?Matrix3.Const.DELAY_BUFFERED:Matrix3.Const.DELAY_IMMEDIAT,f=e.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL);Matrix3.AddEvent(f[0],"SAVE_PARAMETER",Matrix3.Const.RETURNTYPE_FULL,o,f[1])}for(n=0,u=r.length;n<u;n++){t--;var e=r[n],o=t>0?Matrix3.Const.DELAY_BUFFERED:Matrix3.Const.DELAY_IMMEDIAT,f=e.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL);Matrix3.AddEvent(f[0],"RESET_PARAMETER",Matrix3.Const.RETURNTYPE_VIEWSTATE,o,f[1])}};ParamMgr.QueueSaveEvents=function(){var u=[],f=[],n,i,r,t;for($.each(ParamMgr.moTable,function(n,t){t.HasValueChanged()&&u.push(t);t.mbToReset&&f.push(t)}),ParamMgr.HideSaveButtons(),n=0,i=u.length;n<i;n++)r=u[n],t=r.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL),Matrix3.AddEvent(t[0],"SAVE_PARAMETER",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_BUFFERED,t[1]);for(n=0,i=f.length;n<i;n++)r=f[n],t=r.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL),Matrix3.AddEvent(t[0],"RESET_PARAMETER",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_BUFFERED,t[1])};ParamMgr.AddCancelBtn=function(n){var t=$PI(n);t&&(this.moCancelbtns[t.GetId()]=t,Matrix3.RegisterInCache(t.GetId(),ParamMgr),$(t).click(function(){ParamMgr.RevertAllChanges()}))};ParamMgr.AddClosePopupSaveParamsBtn=function(n){var t=$PI(n);t&&(this.moClosePopupSaveParamBtns[t.GetId()]=t,Matrix3.RegisterInCache(t.GetId(),ParamMgr))};ParamMgr.IsInsideClosePopupParamBtn=function(n){var i,t;if(n)for(i in ParamMgr.moClosePopupSaveParamBtns)if(t=ParamMgr.moClosePopupSaveParamBtns[i],t==n||$(n).closest(t).length>0)return!0;return!1};ParamMgr.ShowSaveButtons=function(){this.mbHasUnsavedChanges||($.each(this.moSaveBtns,function(n,t){Effect.Appear(t,0)}),$.each(this.moCancelbtns,function(n,t){Effect.Appear(t,0)}));this.mbHasUnsavedChanges=!0};ParamMgr.HideSaveButtons=function(){this.mbHasUnsavedChanges&&($.each(this.moSaveBtns,function(n,t){$(t).addClass("InvisibleC")}),$.each(this.moCancelbtns,function(n,t){$(t).addClass("InvisibleC")}));this.mbHasUnsavedChanges=!1;this.maUnsavedParameterControlIds={}};ParamMgr.RevertAllChanges=function(){$.each(ParamMgr.moTable,function(n,t){t.RevertChanges()});var n,t=!1;for(sId in this.maUnsavedParameterControlIds)this.maUnsavedParameterControlIds.hasOwnProperty(sId)&&(Matrix3.AddEvent(sId,"UPDATE",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_BUFFERED,sId),t=!0,n=sId);t&&Matrix3.AddEvent(n,"UPDATE",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,n);ParamMgr.HideSaveButtons()};ParamMgr.AddControlToNotSavedList=function(n){this.maUnsavedParameterControlIds[n]=!0;ParamMgr.ShowSaveButtons()};ParamMgr.RemoveControlFromNotSavedList=function(n){delete this.maUnsavedParameterControlIds[n];var t=0;for(sId in this.maUnsavedParameterControlIds)this.maUnsavedParameterControlIds.hasOwnProperty(sId)&&t++;t===0&&ParamMgr.HideSaveButtons()};ParamMgr.ShakeSaveButtons=function(){jQuery.fn.shake=function(n,t,i){return this.each(function(){var u,r;for($(this).css("position","absolute"),u=1;u<=n;u++)r=parseInt($(this).css("left")),$(this).animate({left:r+t*-1},i/n/4).animate({left:r+t},i/n/2).animate({left:r},i/n/4)}),this};$.each(this.moSaveBtns,function(n,t){$(t).shake(2,15,400)});$.each(this.moCancelbtns,function(n,t){$(t).shake(2,15,400)})};ParamMgr.RefreshNode=function(n){n&&(this.moTable.hasOwnProperty(n)&&(this.moTable[n].Recycle(),delete this.moTable[n]),this.moSaveBtns.hasOwnProperty(n)&&($(this.moSaveBtns[n]).off("click"),delete this.moSaveBtns[n]),this.moCancelbtns.hasOwnProperty(n)&&($(this.moCancelbtns[n]).off("click"),delete this.moCancelbtns[n]),this.moClosePopupSaveParamBtns.hasOwnProperty(n)&&delete this.moClosePopupSaveParamBtns[n])};ParamMgr.FetchTasksInformation=function(){var t,u;if(!Matrix3.maPopupStack){console.log("NO?");return}if(t=Matrix3.maPopupStack[Matrix3.maPopupStack.length-1],t){var f=(new Date).getTime(),i="data-vuc-tasks",r=i+"-"+f,n={};($E(t).find("div["+i+"]").each(function(){var u=$(this),f,t;for(u.attr(r,u.attr(i)),u.removeAttr(i),f=$(this).attr(r).split(","),t=0;t<f.length;t++)n[f[t]]={}}),u=Object.keys(n),u.length)&&$.ajax({url:"API/VUCClient/v1.0/GetTaskStatus?Format=Json",type:"POST",data:"ID="+u.join(","),dataType:"json",success:function(i){var u=i.APIResponse.Response.Results[0].Results?i.APIResponse.Response.Results[0].Results[0]:null;for(var f in u)n[u[f].Identifier]=u[f];$E(t).find("div["+r+"]").each(function(){for(var i,o,u=$(this),f=u.attr(r).split(","),e=0,t=0;t<f.length;t++)n[f[t]]&&n[f[t]].Completed&&e++;u.find("div[id$='CheckTasksLbl']").addClass("InvisibleC");i=u.find("div[id$='TasksInfoLbl']");o=i.find("a").text();i.find("a").text(o.replace("[COMPLETE]",String(e)));i.removeClass("InvisibleC")})}})}};ParamControl.prototype={resize:function(){var n,t;this.ChangeHandler();n=!1;this.mbIsTextarea==!0&&(t=parseInt(this.moControl.moTextarea.style.height),this.moControl.moTextarea.style.height="auto",this.moControl.moTextarea.scrollHeight!=t&&(n=!0),this.moControl.moTextarea.style.height=this.moControl.moTextarea.scrollHeight+"px");n&&(PositionMgr.GetInstance().AddToDirtyYList(this.moControl),PositionMgr.GetInstance().CalculatePosition())},keydownControl:function(n){var t;if(n.keyCode?t=n.keyCode:n.which&&(t=n.which),t===83&&n.ctrlKey)return!0;this.delayedResize()},delayedResize:function(){var n=this;window.setTimeout(function(){n.resize()},0)},DetailsHandler:function(){var n=this.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL);Matrix3.AddEvent(n[0],"EDIT_PARAMETER",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,n[1])},ResolveHandler:function(){var n=this.moControl.msId.split(Matrix3.Const.SEPARATOR_CONTROL);Matrix3.AddEvent(n[0],"RESOLVE_PARAMETER",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,n[1])},ResetHandler:function(){this.mbToReset?($(this.moControl).removeClass("ParamReset"),ParamMgr.RemoveControlFromNotSavedList(this.moControl.msId),this.mbToReset=!1):($(this.moControl).addClass("ParamReset"),this.mbToReset=!0,ParamMgr.AddControlToNotSavedList(this.moControl.msId))},ChangeHandler:function(){var n;return this.moControl.msCtrlType=="ParameterStr"?n=this.mbIsTextarea?this.moControl.moTextarea.value:this.moControl.moInput.value:this.moControl.msCtrlType=="ParameterEnum"?n=$(this.moControl).find("input[name$=_Value]")[0].value:this.moControl.msCtrlType=="ParameterBool"&&(n=$(this.moControl).find("input")[0].checked),this.msInitialValue!=n?($(this.moControl).addClass("ParamChanged"),ParamMgr.AddControlToNotSavedList(this.moControl.msId)):(ParamMgr.RemoveControlFromNotSavedList(this.moControl.msId),$(this.moControl).removeClass("ParamChanged")),!0},HasValueChanged:function(){return $(this.moControl).hasClass("ParamChanged")},RevertChanges:function(){this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea?this.moControl.moTextarea.value!=this.msInitialValue&&(this.moControl.moTextarea.value=this.msInitialValue,this.delayedResize()):this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea==!1?this.moControl.moInput&&this.moControl.moInput.value!=this.msInitialValue?(this.moControl.moInput.value=this.msInitialValue,this.delayedResize()):!this.moControl.moInput:this.moControl.msCtrlType=="ParameterEnum"?($(this.moControl).find("input[name$=_Value]")[0].value=this.msInitialValue,$(this.moControl).find("input[name='"+this.moControl.msId+"']").val(this.msInitialDisplayValue)):this.moControl.msCtrlType=="ParameterBool"&&($(this.moControl).find("input")[0].checked=this.msInitialValue,$Control(this.moControl.msId,CheckBoxCtrl.Const.CONTROL_NAME).SetChecked(this.msInitialValue));$(this.moControl).removeClass("ParamChanged");$(this.moControl).removeClass("ParamReset");ParamMgr.RemoveControlFromNotSavedList(this.moControl.msId)},Recycle:function(){this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea?(Utils.DetachEvent(this.moControl.moTextarea,"cut",this.delayedResize,this),Utils.DetachEvent(this.moControl.moTextarea,"paste",this.delayedResize,this),Utils.DetachEvent(this.moControl.moTextarea,"drop",this.delayedResize,this),Utils.DetachEvent(this.moControl.moTextarea,"keydown",this.keydownControl,this),$(this.moControl).hasClass("Parameter_NotEditable")&&$(this.moControl.moTextarea).find(".Details").off("
216click")):this.moControl.msCtrlType=="ParameterStr"&&this.mbIsTextarea==!1&&this.moControl.moInput?(Utils.DetachEvent(this.moControl.moInput,"cut",this.delayedResize,this),Utils.DetachEvent(this.moControl.moInput,"paste",this.delayedResize,this),Utils.DetachEvent(this.moControl.moInput,"drop",this.delayedResize,this),Utils.DetachEvent(this.moControl.moInput,"keydown",this.keydownControl,this),$(this.moControl).hasClass("Parameter_NotEditable")&&$(this.moControl.moInput).find(".Details").off("click")):this.moControl.msCtrlType=="ParameterEnum"?$E(this.moControl.msId).off("autocomp_select"):this.moControl.msCtrlType=="ParameterBool"&&$(this.moControl).find("input").off("click");$(this.moControl).find(".Details").off("click");$(this.moControl).find(".Reset").off("click")}};Popup.prototype={GetOriginateVFormID:function(){return this.msOriginateVFormID},UpdateLastActiveElement:function(n){for(var t=n.activeElement,i;t;)if(t.nodeName==="IFRAME"){i=t;try{t=t.contentDocument?t.contentDocument.activeElement:null}catch(r){t=i;break}}else if(t.shadowRoot&&t.shadowRoot.activeElement)t=t.shadowRoot.activeElement;else break;this.moLastActiveElement=t||null},RestoreLastActiveElement:function(){var n=Utils.GetViableFocusTarget(this.moLastActiveElement);n&&n.focus()},HandOffLastActiveElement:function(){var t=this.moGlobalContainer||this.moNode,i,n;if(this.moLastActiveElement&&t)for(i in Matrix3.moPopupTable)n=Matrix3.moPopupTable[i],n!==this&&n.moLastActiveElement&&t.contains(n.moLastActiveElement)&&(n.moLastActiveElement=this.moLastActiveElement)},Show:function(){var f,t,e,n,i,r,u;HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[POPUP] Start showing popup");HistoryMgr.PushPopupState(this.msID);f=new CustomEvent("PopupAdding",{detail:this.msID});window.dispatchEvent(f);TooltipProperties.HideOpenedTooltips();SimpleTooltip.HideAll();t=!UseBootstrap&&(!Param.EnableInhibitPositioning||!Matrix3.mbInhibitPositioning)&&!this.mbIsContextMenu&&!this.moPopupAbsolutePosition;this.moMask&&(t&&WaitingPopupMgr.GetInstance().IsHandoverPending()?this.mbMaskHandoverDeferred=!0:(this.moMask.Show(),t&&(this.mbMaskTransparentPendingReveal=!0,$SetCss(this.moMask,{opacity:"0"}))));$SetCss(this.moNode,{top:"0px",left:"0px",visibility:"visible",display:"block"});t?(this.mbPendingReveal=!0,this.miLastMeasuredHeight=-1,this.miRevealDeadline=Date.now()+Popup.Const.REVEAL_MAX_DELAY,$SetCss(this.moNode,{opacity:"0"}),e=this,this.moRevealTimeout=setTimeout(function(){e.RevealAfterPositioning()},Popup.Const.REVEAL_MAX_DELAY),PositionMgr.GetInstance().CalculatePositionAsync()):WaitingPopupMgr.GetInstance().NotifyPopupRevealed();this.moMask&&(Utils.IsIPad()&&$SetCss(this.moMask,{position:"absolute",width:Utils.GetDocument().scrollWidth+"px",height:Utils.GetDocument().scrollHeight+"px"}),Utils.DebugFormPresent()&&$SetCss(this.moMask,{right:"16px"}));this.miPopupDepth=Popup.Counter;Popup.Counter++;this.mbIsContextMenu&&Popup.ContextMenuCounter++;this.mbIsContextMenu||Utils.ShouldBeIgnoredWhenCheckingTopLevelPopup(this.msID)||($("video").trigger("pause"),$("audio").trigger("pause"));this._TrapFocus();$(document).trigger("PopupAdded",this);n=this;this.UpdateLastActiveElement(document);i=function(t,i){i.miPopupDepth===n.miPopupDepth+4&&n.moJGlobalContainer.css("visibility","hidden")};$(document).on("PopupAdded",i);r=function(t,i){i.miPopupDepth===n.miPopupDepth+4&&n.moJGlobalContainer.css("visibility","")};u=function(n,t){(t.mbPopupFullscreenAllViewport||t._IsSmallViewport()&&t.mbPopupFullscreenSmallViewport)&&($(Utils.Form1()).removeClass(Popup.Const.CLASS_POPUP_FULL_SCREEN),$(t.moNode).removeClass(Popup.Const.CLASS_POPUP_FULL_SCREEN_VFORM))};$(document).on("PopupRemoved",r);$(document).on("PopupBeforeRemoved",u);Matrix3.RegisterForCleanup(this.msID,"PopupVisibilityHandlers",function(){$(document).off("PopupAdded",i);$(document).off("PopupRemoved",r);$(document).off("PopupBeforeRemoved",u)})},Remove:function(n,t,i,r,u,f){var b,s,a,h,rt,c,v,k,y,p,d,l,g,nt,tt,ut,o,e,it,w;if(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[POPUP] Start removing popup","_bReplacement = "+n,"_bFromUI = "+t,"_bBackButtonClicked = "+i,window.history.state),this.Reveal(),b=this.moNodePI.GetProperty(Popup.Const.PROP_SEND_CLOSE_EVENT_ONLY_IF_CONTAINS_COLLECTION),s=!1,Utils.IsStringFilled(b))for(s=!0,a=Matrix3.moCollection.GetVFormList(b),h=0,rt=a.length;h<rt;h++)if(Utils.StartsWith(a[h],this.msID)&&$Elt(a[h])!=null){s=!1;break}if(c=this.moNodePI.GetProperty(Popup.Const.PROP_EVENT_INSTEAD_OF_CLOSE),this.HandOffLastActiveElement(),!n&&!s&&t&&c)v=c.split("|"),k=Matrix3.Const.RETURNTYPE_FULL,v[1]&&(c=v[0],k=v[1]),this.moNodePI.GetProperty(Popup.Const.PROP_EVENT_REMAIN_VISIBLE)||(Matrix3.GetPopupsInProcessOfClosing()[this.msID]=!0,this.Hide()),y=this.msID,Matrix3.GetPopupsSendingEventInsteadOfClosing()[y]={FromESCKey:f},Matrix3.AddEventUsingDTO({sourceVForm:y,sourceEvent:c,sourceType:k,eventDelay:Matrix3.Const.DELAY_IMMEDIAT,skipValidation:!0,callbacks:{always:function(){Matrix3.ProcessPrePositionCalls(function(){delete Matrix3.GetPopupsSendingEventInsteadOfClosing()[y]})}}}),Matrix3.PreventEventCancellation(this.msID),i&&(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[POPUP] Re-push popup state when temporary hide popup, instead of removing popup"),HistoryMgr.PushPopupState(this.msID)),this.mbRestoreFocusOnClose&&this.RestoreLastActiveElement(),this.moLastActiveElement=null;else{if(this.moNodePI.GetProperty(Popup.Const.PROP_DISABLE_HISTORY)||window.history&&window.history.back&&!i&&!HistoryMgr.GetInstance().IsDisabledPopupState(this.msID)&&HistoryMgr.GetInstance().AnyPopupStateLeft()&&(HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("[POPUP] Pop state when removing popup",window.history.state),HistoryMgr.GetInstance().PreventClosingPopup(),window.history.back()),Matrix3.GetPopupsInProcessOfClosing()[this.msID]&&delete Matrix3.GetPopupsInProcessOfClosing()[this.msID],Matrix3.GetPopupsSendingEventInsteadOfClosing()[this.msID]&&(f=Matrix3.GetPopupsSendingEventInsteadOfClosing()[this.msID].FromESCKey,delete Matrix3.GetPopupsSendingEventInsteadOfClosing()[this.msID]),p=function(){if(Utils.IsIPad()){var n=document.getElementById("Form1");Popup.Counter===1&&($(n).css({overflow:Popup.__originalFormOverflow||"auto",position:Popup.__originalFormPosition||"",width:"",height:""}),$(document.body).css({position:Popup.__originalBodyPosition||"",overflow:"",width:""}),$(n).scrollTop(Popup.__originalFormScroll||0),delete Popup.__originalFormOverflow,delete Popup.__originalFormPosition,delete Popup.__originalBodyPosition,delete Popup.__originalFormScroll)}},d=!1,typeof CMS!="undefined"){if(ParamMgr.mbHasUnsavedChanges){ParamMgr.ShakeSaveButtons();p();Popup.Counter--;return}if(ControlMgr.GetInstance().GetReference(CMS.Const.FID_VFORM_EDIT_TOOLBAR)&&ControlMgr.GetInstance().GetReference(CMS.Const.FID_VFORM_EDIT_TOOLBAR).msId==this.msID){Matrix3.AddEvent(this.msID,CMS.Const.EVENT_EXIT_EDIT_MODE,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT);p();Popup.Counter--;return}d=!0}this.moClose&&Utils.DetachEvent(this.moClose,"click",this.Remove,this);l=$("#uploader-container");l.length>
2160&&(l.css("z-index",""),l.removeClass("Moved"),l.appendTo($("#PopupLayer")));delete Matrix3.moPopupTable[this.msID];g=Utils.IndexOf(Matrix3.maPopupStack,this.msID);g!=-1&&Matrix3.maPopupStack.splice(g,1);!s&&t&&(nt=this.moNodePI.GetProperty(Popup.Const.PROP_EVENT_ON_CLOSE),nt?Matrix3.AddEvent(this.msID,nt,Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT):(tt=this.msID+Matrix3.Const.SEPARATOR_CONTROL+Popup.Const.POPUP_COMMAND,ut=document.getElementById(tt),ut&&$Control(tt,ButtonCtrl.Const.CONTROL_NAME).Action_SendEvent("",u)),Matrix3.PreventEventCancellation(this.msID));try{if(this.moJGlobalContainer&&this.moJGlobalContainer.get)for(o=this.moJGlobalContainer.get(),e=0;e<o.length;e++)o[e]&&o[e].parentNode&&o[e].parentNode.removeChild(o[e])}catch(ft){}$(document).trigger("PopupBeforeRemoved",this);n===!0?(Matrix3.NewRefreshCaches(this.moNode.id),this.moNodePI&&this.moNodePI.RecursiveRemove()):(Matrix3.NewRefreshCaches(this.msID),it=$PI(this.msID),it&&it.RecursiveRemove());this.moJGlobalContainer.find(".ui-menu").css("display","block");this.moJGlobalContainer.find(".ui-menu").css("visibility","hidden");this.moGlobalContainer&&this.moGlobalContainer.id&&ControlMgr.GetInstance().RemovePositionItem(this.moGlobalContainer.id);try{this.moJGlobalContainer.remove()}catch(et){for(w=0;w<this.moJGlobalContainer.length;w++)this.moJGlobalContainer[w].remove()}typeof this.moWrapperJGlobalContainer!="undefined"&&this.moWrapperJGlobalContainer&&this.moWrapperJGlobalContainer.remove();this.moMask&&this.moMask.Destroy();p();Popup.Counter--;this.mbIsContextMenu&&Popup.ContextMenuCounter--;d&&(Matrix3.moCMS!==undefined?Matrix3.moCMS.ClosePopup():Matrix3.moVUCButtons!==undefined&&Matrix3.moVUCButtons.ClosePopup());Utils.GetTopLevelPopup()||Utils.FireFrameEvent("CloseTopPopup");$(document).trigger("PopupRemoved",this);r||MultipleSelectionMgr.GetInstance().PostRenderRefreshSelection();!n&&this.mbRestoreFocusOnClose&&this.RestoreLastActiveElement();this.moLastActiveElement=null}this._ReleaseTrapFocus(f)},CenterIfNeeded:function(){this.mbCentered||this.Center()},RevealAfterPositioning:function(){var n,t,i;this.mbPendingReveal&&(n=this.moNode.offsetHeight,t=n<=Utils.GetViewportHeight()*Popup.Const.REVEAL_MAX_HEIGHT_VIEWPORT_FACTOR,t&&n===this.miLastMeasuredHeight||Date.now()>=this.miRevealDeadline?(this.Center(),this.Reveal()):(i=n!==this.miLastMeasuredHeight,this.miLastMeasuredHeight=n,i&&setTimeout(function(){PositionMgr.GetInstance().CalculatePositionAsync()},0)))},Reveal:function(){(this.moRevealTimeout&&(clearTimeout(this.moRevealTimeout),this.moRevealTimeout=null),this.mbPendingReveal)&&(this.mbPendingReveal=!1,$SetCss(this.moNode,{opacity:""}),this.mbMaskHandoverDeferred&&(this.mbMaskHandoverDeferred=!1,this.moMask&&this.moMask.Show()),this.mbMaskTransparentPendingReveal&&(this.mbMaskTransparentPendingReveal=!1,this.moMask&&$SetCss(this.moMask,{opacity:""})),WaitingPopupMgr.GetInstance().NotifyPopupRevealed())},Center:function(){var s=Utils.GetViewportWidth(),e=Utils.GetViewportHeight(),rt=this._IsSmallViewport(),l=this._GetWindowPadding(),u=this.moNode.offsetWidth,r=this.moNode.offsetHeight,n={},v,c,y,p,w,b,f,t,o,i,k,h,g,d,nt,tt,a,it;if(this.moPopupAbsolutePosition){if(this.moPopupAbsolutePosition.ri&&(this.moPopupAbsolutePosition.rx||this.moPopupAbsolutePosition.ry)&&(v=$Elt(this.moPopupAbsolutePosition.ri),v)){if(c=v.getBoundingClientRect(),this.moPopupAbsolutePosition.rx){y=this.moPopupAbsolutePosition.rx.split(",");switch(y[0]){case Popup.Const.POSITION_X_RIGHT:n.x=c.right;break;case Popup.Const.POSITION_X_LEFT:n.x=c.left-u;break;case Popup.Const.POSITION_X_ALIGN_LEFT:n.x=c.left;break;case Popup.Const.POSITION_X_ALIGN_RIGHT:n.x=c.right-u}p=Number.parseFloat(y[1]);Number.isNaN(p)||(n.x+=p)}if(this.moPopupAbsolutePosition.ry){w=this.moPopupAbsolutePosition.ry.split(",");switch(w[0]){case Popup.Const.POSITION_Y_BOTTOM:n.y=c.bottom;break;case Popup.Const.POSITION_Y_ALIGN_TOP:n.y=c.top}b=Number.parseFloat(w[1]);Number.isNaN(b)||(n.y+=b)}}n.x===undefined&&(n={x:this.moPopupAbsolutePosition.x,y:this.moPopupAbsolutePosition.y,sx:this.moPopupAbsolutePosition.sx,sy:this.moPopupAbsolutePosition.sy});this.mbContextMenuFollowScroll&&(n.sx=0,n.sy=0)}else switch(this.msPopupPosition){case Popup.Const.POSITION_CENTER:default:n=this.CalculateCoordinateCenter(s,e,u,r);break;case Popup.Const.POSITION_TOP_LEFT:n=this.CalculateCoordinateTopLeft(s,e,u,r);break;case Popup.Const.POSITION_TOP_RIGHT:n=this.CalculateCoordinateTopRight(s,e,u,r);break;case Popup.Const.POSITION_TOP_CENTER:n=this.CalculateCoordinateTopCenter(s,e,u,r);break;case Popup.Const.POSITION_BOTTOM_LEFT:n=this.CalculateCoordinateBottomLeft(s,e,u,r);break;case Popup.Const.POSITION_BOTTOM_RIGHT:n=this.CalculateCoordinateBottomRight(s,e,u,r)}f=n.x;t=n.y;this.ShouldPushIntoViewport()&&t<=l&&r!=e&&!this.moPopupAbsolutePosition&&(t=l);this.mbIsPopupShifting!==!0||rt||(f+=this.miPopupDepth*Popup.Const.STACKING_OFFSET,t+=this.miPopupDepth*Popup.Const.STACKING_OFFSET);o=this._GetMargins();o.top&&o.top>0&&t<o.top/2&&(t+=o.top/2);o.left&&o.left>0&&f<o.left/2&&(f+=o.left/2);f+u>s&&(f=s-u-20);f<0&&(f=Math.max(0,l));i=null;this.msReferenceVFormID&&(i=Matrix3.GetPopupTable()[Utils.GetRootOrPopupId(this.msReferenceVFormID)]);this.ShouldPushIntoViewport()?t+r>e-this._GetPaddingBottom()?(t=this.moPopupAbsolutePosition&&this.moPopupAbsolutePosition.at?this.moPopupAbsolutePosition.at-r:e-r-l,t<l&&(t=l),t+r>e-this._GetPaddingBottom()&&(this.moPaddingBottomDiv||(this.moPaddingBottomDiv=document.createElement("div")),$(this.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:t+r+"px",height:this._GetPaddingBottom()+"px"}),$(this.moPaddingBottomDiv).detach(),this.moJNode.after($(this.moPaddingBottomDiv)))):this.moPaddingBottomDiv&&($(this.moPaddingBottomDiv).remove(),this.moPaddingBottomDiv=null):!i&&t+n.sy+r>Utils.Form1().scrollHeight-this._GetPaddingBottom()?(this.moPaddingBottomDiv||(this.moPaddingBottomDiv=document.createElement("div")),$(this.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:t+n.sy+r+"px",height:this._GetPaddingBottom()+"px"}),$(this.moPaddingBottomDiv).detach(),this.moJNode.after($(this.moPaddingBottomDiv))):i&&t+n.sy+r>i.moGlobalContainer.scrollHeight-this._GetPaddingBottom()&&(i.moPaddingBottomDiv||(i.moPaddingBottomDiv=document.createElement("div")),i.mbForcedPaddingBottomDiv=!0,$(i.moPaddingBottomDiv).detach(),$(i.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:"0px",height:this._GetPaddingBottom()+(n.y+n.sy+r)+"px"}),i.moJNode.after($(i.moPaddingBottomDiv)),Matrix3.RegisterForCleanup(this.msID,"AdaptHeight",function(){i.mbForcedPaddingBottomDiv=!1;$(i.moPaddingBottomDiv).detach();i.moPaddingBottomDiv=null;i.CenterIfNeeded()}),this.moPaddingBottomDiv||(this.moPaddingBottomDiv=document.createElement("div")),$(this.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:t+r+"px",height:this._GetPaddingBottom()+"px"}),$(this.moPaddingBottomDiv).detach(),this.moJNode.after($(this.moPaddingBottomDiv)));this.moPopupAbsolutePosition&&!this.mbContextMenuFollowScroll&&this.mbIsContextMenu&&(i&&(n.sx-=i.moGlobalContainer.scrollLeft,n.sy-=i.moGlobalContainer.scrollTop),f+=n.sx?n.sx:0,t+=n.sy?n.sy:0);
216k={left:f+"px",top:t+"px"};h=!this.mbCentered&&Matrix3.miLastClickX;h&&(h=Matrix3.maPopupStack.length>1);h&&(g=Matrix3.maPopupStack[Matrix3.maPopupStack.length-2],d=$PI(g),h=d!=null&&d.GetProperty("PopupType")==this.moNodePI.GetProperty("PopupType"));h&&this.mbPendingReveal&&this.Reveal();h&&(nt=u/2+f,tt=r/2+t,k.transform="translate("+(Matrix3.miLastClickX-nt)+"px,"+(Matrix3.miLastClickY-tt)+"px) scale(0,0)");$SetCss(this.moNode,k);h&&(a=this,setTimeout(function(){$AddClass(a.moNode,"DeployPopup");$SetCss(a.moNode,{transform:"none"})},0));this.moJNode.draggable("option","containment",this._GetDraggableContainment());this.mbCentered=!0;this.mbImageRecenteredOnLoad||this.moPopupAbsolutePosition||(this.mbImageRecenteredOnLoad=!0,a=this,it=Utils.debounce(function(){a.moPopupAbsolutePosition||a.Center()},200),this.moNode.querySelectorAll("img").forEach(function(n){n.addEventListener("load",it,{once:!0})}))},CalculateCoordinateCenter:function(n,t,i,r){var u={x:0,y:0},f=n/2-i/2,e=t/2-r/2;return f<0&&(f=0),e<0&&(e=0),u.x=f,u.y=e,u},CalculateCoordinateTopLeft:function(){var n={x:0,y:0},r=this._GetWindowPadding(),t=r,i=r;return t<0&&(t=0),i<0&&(i=0),n.x=t,n.y=i,n},CalculateCoordinateTopRight:function(n,t,i){var r={x:0,y:0},e=this._GetWindowPadding(),u=n-e-i,f=e;return u<0&&(u=0),f<0&&(f=0),r.x=u,r.y=f,r},CalculateCoordinateTopCenter:function(n,t,i){var r={x:0,y:0},u=n/2-i/2,f=this._GetWindowPadding();return u<0&&(u=0),f<0&&(f=0),r.x=u,r.y=f,r},CalculateCoordinateBottomLeft:function(n,t){var i={x:0,y:0},f=this._GetWindowPadding(),r=f,u=t-f;return r<0&&(r=0),u<0&&(u=0),i.x=r,i.y=u,i},CalculateCoordinateBottomRight:function(n,t,i,r){var u={x:0,y:0},o=this._GetWindowPadding(),f=n-o-i,e=t-o-r;return f<0&&(f=0),e<0&&(e=0),u.x=f,u.y=e,u},RefreshPositionOnScreen:function(){var r,f,e,n,t,i,u,c;if(!this.mbIsForceCenteringEnabled&&(this.moPaddingBottomDiv&&!this.mbForcedPaddingBottomDiv&&$(this.moPaddingBottomDiv).detach(),r=this.moJNode.css("transform"),r==null||r==""||r=="none"))if(f=this.moJNode.offset().left+this.moJNode.outerWidth(),e=$(window).outerWidth(),f>e)this.Center();else{var o=this._GetWindowPadding(),s=this.moJNode.offset().top+this.moJNode.outerHeight(),h=$(window).outerHeight()+Utils.GetDocument().scrollTop,l=this.moJNode.offset().top;this.ShouldPushIntoViewport()?s>h-this._GetPaddingBottom()&&(i=this.moJNode.outerHeight(),this.moPaddingBottomDiv||(this.moPaddingBottomDiv=document.createElement("div")),$(this.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:this.moNode.offsetTop+i+"px",height:this._GetPaddingBottom()+"px"}),$(this.moPaddingBottomDiv).detach(),this.moJNode.after($(this.moPaddingBottomDiv)),l>this._GetPaddingBottom()&&(u=this.moJNode.offset().top,c=s-(h-this._GetPaddingBottom()),u-=c,u>=o?this.moJNode.animate({top:u+"px"},300,null,function(){$(document).trigger("AnimationCompleted")}):this.moJNode.animate({top:o+"px"},300,null,function(){$(document).trigger("AnimationCompleted")}))):(i=this.moJNode.outerHeight(),n=null,this.msReferenceVFormID&&(n=Matrix3.GetPopupTable()[Utils.GetRootOrPopupId(this.msReferenceVFormID)]),t=this.moPopupAbsolutePosition,!n&&t.y+t.sy+i>Utils.Form1().scrollHeight-this._GetPaddingBottom()?(this.moPaddingBottomDiv||(this.moPaddingBottomDiv=document.createElement("div")),$(this.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:t.y+t.sy+i+"px",height:this._GetPaddingBottom()+"px"}),$(this.moPaddingBottomDiv).detach(),this.moJNode.after($(this.moPaddingBottomDiv))):n&&t.y+t.sy+i>n.moGlobalContainer.scrollHeight-this._GetPaddingBottom()&&(n.moPaddingBottomDiv||(n.moPaddingBottomDiv=document.createElement("div")),n.mbForcedPaddingBottomDiv=!0,$(n.moPaddingBottomDiv).detach(),$(n.moPaddingBottomDiv).css({left:"0px",right:"0px",position:"absolute",top:"0px",height:this._GetPaddingBottom()+(t.y+t.sy+i)+"px"}),n.moJNode.after($(n.moPaddingBottomDiv)),Matrix3.RegisterForCleanup(this.msID,"AdaptHeight",function(){n.mbForcedPaddingBottomDiv=!1;$(n.moPaddingBottomDiv).detach();n.moPaddingBottomDiv=null;n.CenterIfNeeded()})))}},Hide:function(){this.Reveal();$SetCss(this.moNode,{visibility:"hidden",opacity:"0"});this.moMask&&this.moMask.Hide();Utils.HidePopover(this.moGlobalContainer)},ShowHiddenPopup:function(){$SetCss(this.moNode,{visibility:"visible",opacity:""});this.moMask&&this.moMask.Show();Utils.HasTopLayer()&&Utils.ShowPopover(this.moGlobalContainer)},AllowToCloseByESC:function(){return this.mbPreventESC!==!0},ShouldPushIntoViewport:function(){return!this.mbIsContextMenu||!this.moPopupAbsolutePosition||!this.mbPreventPushingIntoViewport},StickContextMenuToOriginalPosition:function(){var n,f,o,i,t,e,r,u;if(this.mbIsContextMenu&&!this.mbContextMenuFollowScroll){for(n=null,f=null,this.msReferenceVFormID&&(f=Utils.GetRootOrPopupId(this.msReferenceVFormID)),f&&(n=Matrix3.moPopupTable[f]);n&&n.mbIsContextMenu&&n.msReferenceVFormID;)o=Utils.GetRootOrPopupId(n.msReferenceVFormID),n=Matrix3.moPopupTable[o];if(n){this.moJGlobalContainer.css("position","fixed");var i=this,r=n.moGlobalContainer.scrollTop,u=n.moGlobalContainer.scrollLeft,s=function(){i.moJGlobalContainer.css("transform","translate("+(u-n.moGlobalContainer.scrollLeft)+"px,"+(r-n.moGlobalContainer.scrollTop)+"px)");i.moNode.miTranslatedX=u-n.moGlobalContainer.scrollLeft;i.moNode.miTranslatedY=r-n.moGlobalContainer.scrollTop};n.moGlobalContainer.addEventListener("scroll",s);Matrix3.RegisterForCleanup(this.msID,"StickToOriginalPos",function(){n.moGlobalContainer.removeEventListener("scroll",s)})}else i=this,t=document.querySelector("[id$=':RootVFormMainPnl'].ScrollablePanel")||Utils.Form1(),this.moNode.miTranslatedX=-t.scrollLeft,this.moNode.miTranslatedY=-t.scrollTop,e=function(){i.moNode.miTranslatedX=-t.scrollLeft;i.moNode.miTranslatedY=-t.scrollTop},t!==Utils.Form1()&&(r=t.scrollTop,u=t.scrollLeft,e=function(){i.moJGlobalContainer.css("transform","translate("+(u-t.scrollLeft)+"px,"+(r-t.scrollTop)+"px)");i.moNode.miTranslatedX=u-t.scrollLeft;i.moNode.miTranslatedY=r-t.scrollTop}),t.addEventListener("scroll",e),Matrix3.RegisterForCleanup(this.msID,"StickToOriginalPos",function(){t.removeEventListener("scroll",e)})}},SetPreventCloseOnClickOutside:function(n){this.mbPreventCloseOnClickOutside=n},RefreshPositionItemNode:function(){this.moNodePI=$PI(this.msID);this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_SHIFTING)&&(this.mbIsPopupShifting=!0);this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_POSITION)&&(this.msPopupPosition=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_POSITION)
216);this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CENTERING)&&(this.mbIsForceCenteringEnabled=!0);this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_ABSOLUTE_POSITION)&&(this.moPopupAbsolutePosition=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_ABSOLUTE_POSITION));this.mbContextMenuFollowScroll=!0;this.moNodePI.HasProperty(Popup.Const.PROP_CONTEXT_MENU_FOLLOW_SCROLL)&&(this.mbContextMenuFollowScroll=this.moNodePI.GetProperty(Popup.Const.PROP_CONTEXT_MENU_FOLLOW_SCROLL));this.moNodePI.GetProperty(Popup.Const.PROP_PREVENT_PUSHING_INTO_VIEWPORT)&&(this.mbPreventPushingIntoViewport=this.moNodePI.GetProperty(Popup.Const.PROP_PREVENT_PUSHING_INTO_VIEWPORT));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_ORIGINATE_VFORMID)&&(this.msOriginateVFormID=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_ORIGINATE_VFORMID));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_REFERENCE_VFORMID)&&(this.msReferenceVFormID=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_REFERENCE_VFORMID));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_PREVENT_CLOSE_ON_CLICK_OUT_SIDE)&&(this.mbPreventCloseOnClickOutside=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_PREVENT_CLOSE_ON_CLICK_OUT_SIDE));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CLOSE_ON_LEAVE)&&(this.mbCloseOnLeave=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CLOSE_ON_LEAVE));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_HIDE_MASK)&&(this.mbHideMask=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_HIDE_MASK));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_HIDE_CLOSE_BUTTON)&&(this.mbHideCloseButton=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_HIDE_CLOSE_BUTTON));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_MODELESS)&&(this.mbModeless=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_MODELESS));this.moNodePI.GetProperty(Popup.Const.PROP_EVENT_PREVENT_ESC)&&(this.mbPreventESC=this.moNodePI.GetProperty(Popup.Const.PROP_EVENT_PREVENT_ESC));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CONTEXT_MENU)&&(this.mbIsContextMenu=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CONTEXT_MENU));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CONTEXT_MENU_PREVENT_CLOSING_PARENT)&&(this.mbPreventClosingParentContextMenu=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_CONTEXT_MENU_PREVENT_CLOSING_PARENT));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_FULL_SCREEN_ON_SMALL_VIEWPORT)&&(this.mbPopupFullscreenSmallViewport=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_FULL_SCREEN_ON_SMALL_VIEWPORT));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_FULL_SCREEN_ON_ALL_VIEWPORT)&&(this.mbPopupFullscreenAllViewport=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_FULL_SCREEN_ON_ALL_VIEWPORT));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_RESTORE_FOCUS_ON_CLOSE)!==undefined&&(this.mbRestoreFocusOnClose=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_RESTORE_FOCUS_ON_CLOSE));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_SAVE_LAST_POSITION)&&(this.mbSaveLastPosition=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_SAVE_LAST_POSITION));this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_SAVE_LAST_POSITION_USE_LONG_ID)&&(this.mbSaveLastPositionUseLongID=this.moNodePI.GetProperty(Popup.Const.PROP_POPUP_SAVE_LAST_POSITION_USE_LONG_ID));this.mbHideMask&&($(this.moMask).remove(),this.moMask=null);this.mbIgnoreFocusTrap=this.moNodePI.classList.contains("IgnoreFocusTrap")},_init:function(){var n,i,l,a,v,h,y,o,p,c,w,e,k,t,f,b,s,r,u,d;if(this.moPopupLayer=document.getElementById(Matrix3.Const.POPUP_LAYER_ID),this._BuildMask(),this._PreBuildPopup(),n=$PI(this.msID+Popup.Const.CONTAINER_SUFFIX),i=$PI(this.msID),n||Matrix3.LogError("Error in Popup _init: oInnerNode are null. Id="+this.msID+". Popup HTML content="+this.moNode.parentNode.innerHTML),i||Matrix3.LogError("Error in Popup _init: oNode are null. Id="+this.msID+". Popup HTML content="+this.moNode.parentNode.innerHTML),l=$(n).find("input[id$='VFormTitle']"),l.length>0?(a=l.val(),r=$E(this.msID+Popup.Const.TITLE_SUFFIX),a&&a.length>0?(r.html(HtmlSanitize.sanitizeRichText(a)),r[0].ariaLabel=r.text()):(r.css("border-bottom-width","0px"),u=$E(this.msID+Popup.Const.HEADER_SUFFIX),u&&u.css("border-bottom-width","0px")),t=l.attr("data-p"),t&&t.length>0&&(f=t.split(","),f.length>8&&(v=parseInt(f[8]),!isNaN(v)&&v>0&&(r.width(v),r.addClass("d7g03b34"))))):(u=$E(this.msID+Popup.Const.HEADER_SUFFIX),u&&u.css("border-bottom-width","0px")),h=$(n).find("input[id$='VFormDescription']"),h.length>0&&(y=h.val(),o=$E(this.msID+Popup.Const.DESCRIPTION_SUFFIX),y&&y.length>0&&(o.html(HtmlSanitize.sanitizeRichText(y)),o[0].ariaLabel=o.text()),t=h.attr("data-p"),t&&t.length>0&&(f=t.split(","),f.length>8&&(p=parseInt(f[8]),!isNaN(p)&&p>0&&(o.width(p),o.addClass("d7g03b34"))))),c=$(n).find("input[id$='VFormStatus']"),c.length>0){w=c.val().split(Popup.Const.POPUP_STATUS_SEPARATOR);const n=w[0],i=w[1],r=w[2];e=$E(this.msID+Popup.Const.STATUS_PREFIX);k=e[0].parentElement;n&&n.length>0&&(e.html(HtmlSanitize.sanitizeRichText(n)),e[0].ariaLabel=e.text(),e[0].style.color=i,k.style.backgroundColor=r);t=c.attr("data-p");t&&t.length>0&&(f=t.split(","),f.length>8&&(b=parseInt(f[8]),!isNaN(b)&&b>0&&(e.width(b),e.addClass("d7g03b34"))))}s=$E(this.msID+Popup.Const.DESCRIPTION_STATUS_CONTAINER_SUFFIX);h.length==0&&c.length==0?s&&s.css("display","none"):(r=$E(this.msID+Popup.Const.TITLE_SUFFIX),s&&(u=$E(this.msID+Popup.Const.HEADER_SUFFIX),s.css("display","flex"),r&&(d=getComputedStyle(r[0]).paddingBottom,s.css("padding-bottom",d)),u&&u.addClass(Popup.Const.HAS_DESC_OR_STATUS_CLASS)));
216typeof this.msSkinFamilyAlias=="string"&&this.msSkinFamilyAlias!=""&&($RemoveClass(this.msID,Popup.Const.CONTAINER_CLASS),$AddClass(this.msID,this.msSkinFamilyAlias+Popup.Const.CONTAINER_CLASS));PositionMgr.GetInstance().moXDirtyHeap.Remove(n);PositionMgr.GetInstance().moXDirtyHeap.Remove(i);PositionMgr.GetInstance().moYDirtyHeap.Remove(n);PositionMgr.GetInstance().moYDirtyHeap.Remove(i);ControlMgr.GetInstance().RemovePositionItem(n);ControlMgr.GetInstance().RemovePositionItem(i);n.GetNode().id=this.msID;i.GetNode().id=this.msID+Popup.Const.CONTAINER_SUFFIX;n.msId=n.GetNode().id;i.msId=i.GetNode().id;PositionMgr.GetInstance().moXDirtyHeap.Add(n);PositionMgr.GetInstance().moXDirtyHeap.Add(i);PositionMgr.GetInstance().moYDirtyHeap.Add(n);PositionMgr.GetInstance().moYDirtyHeap.Add(i);ControlMgr.GetInstance().AddPositionItem(n);ControlMgr.GetInstance().AddPositionItem(i);Utils.HasTopLayer()&&Utils.ShowPopover(this.moGlobalContainer);this.moJNode=$(this.moNode);typeof this.msSkinFamilyAlias=="string"&&this.msSkinFamilyAlias!=""&&$AddClass(this.msID,this.msSkinFamilyAlias);this.RefreshPositionItemNode();this._BuildPopup()},_GetDraggableContainment:function(){return!1},_BuildHeader:function(){var n,t;this.moHeader=document.getElementById(this.msID+Popup.Const.HEADER_SUFFIX);this.moClose=document.getElementById(this.msID+Popup.Const.CLOSE_SUFFIX);this.mbHideCloseButton?($(this.moClose).remove(),this.moClose=null):(n=this,Utils.AddEvent(this.moClose,"click",function(){n.Remove(!1,!0)},this));this.moHelper=document.getElementById(this.msID+Popup.Const.HELPER_SUFFIX);this.moHelper&&(t=this.moHelper.getAttribute("data-link-comp-id"),t?($(this.moHelper).tipsy&&typeof $(this.moHelper).tipsy=="function"&&$(this.moHelper).tipsy(),Utils.AddEvent(this.moHelper,"click",function(){var n=this.moHelper.getAttribute("data-link-comp-id");Matrix3.AddEvent(this.msID,"SHOW_LINK_COMP",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,n)},this)):($(this.moHelper).remove(),this.moHelper=null))},_BuildMask:function(){this.moMask=Utils.BuildMask(this.msID+Popup.Const.MASK_SUFFIX,Popup.Const.MASK_CLASS,this.moPopupLayer)},_PreBuildPopup:function(){if(this.miOriginalPageContentHeight=Utils.Form1().scrollHeight,this.moGlobalContainer=document.createElement("div"),this.moJGlobalContainer=$(this.moGlobalContainer),this.moJGlobalContainer.addClass(Popup.Const.SCROLLABLE_CONTAINER_CLASS).css("z-index",StackMgr.GetInstance().GetIndex()).append(this.moNode),Utils.IsIPad()){var n=document.getElementById("Form1");Popup.Counter===0&&(Popup.__originalFormScroll=$(n).scrollTop(),Popup.__originalFormOverflow=$(n).css("overflow"),Popup.__originalFormPosition=$(n).css("position"),Popup.__originalBodyPosition=$(document.body).css("position"));$(n).css({overflow:"hidden",position:"fixed",width:"100%",height:"100%"});$(document.body).css({position:"fixed",overflow:"hidden",width:"100%"})}Popup.AdjustPopupPositionForDebugVForm(this.moJGlobalContainer);this.moPopupLayer.appendChild(this.moGlobalContainer)},_BuildPopup:function(){var n,i,t;if($SetCss(this.moNode,{"z-index":StackMgr.GetInstance().GetIndex()}),this._BuildHeader(),n=this,this.moJNode.draggable({handle:n.moHeader,scroll:!1,containment:n._GetDraggableContainment(),stop:function(t,i){!n.moPopupAbsolutePosition&&n.mbSaveLastPosition&&(n.moPopupAbsolutePosition={});n.moPopupAbsolutePosition&&(n.moPopupAbsolutePosition.x=i.offset.left,n.moPopupAbsolutePosition.y=i.offset.top);n.mbSaveLastPosition&&n._SavePopupPosition()}}),this.mbModeless&&(this.moJGlobalContainer.css({"pointer-events":"none"}),this.moJGlobalContainer[0].children[0].style["pointer-events"]="auto"),this.msOriginateVFormID&&this.moJGlobalContainer.attr("data-originatevfid",this.msOriginateVFormID),!this.mbPreventCloseOnClickOutside&&!this.mbIsContextMenu){n=this;this.moJGlobalContainer.mousedown(function(t){t.target.classList.contains("PopupScrollContainer")&&(n.miClickedTime=(new Date).getTime())}).mouseup(function(t){var i,r;t.target.classList.contains("PopupScrollContainer")&&(i=!0,i=(new Date).getTime()-n.miClickedTime<=150,i&&(r=18,this.scrollHeight>this.clientHeight&&(i=t.clientX<this.clientWidth-r),this.scrollWidth>
216this.clientWidth&&(i=t.clientY<this.clientHeight-r)),i&&n.Remove(!1,!0,!1,!1,t))});this.moJGlobalContainer.on("contextmenu",function(t){if(t.originalEvent&&!t.originalEvent.mbClickInside)return n.Remove(!1,!0),t.stopPropagation(),!1});t=$($PI(this.msID+Popup.Const.CONTAINER_SUFFIX));t.on("click contextmenu",function(n){n.originalEvent&&(n.originalEvent.mbClickInside=!0)});$SetCss(t,{cursor:"initial"});$SetCss(this.moJGlobalContainer,{cursor:"pointer"})}this.mbCloseOnLeave&&(n=this,setTimeout(function(){$($PI(n.msID+Popup.Const.CONTAINER_SUFFIX)).on("mouseleave",function(t){return n.Remove(!1,!0),t.stopPropagation(),!1})},300));(this.mbPopupFullscreenAllViewport||this._IsSmallViewport()&&this.mbPopupFullscreenSmallViewport)&&($(Utils.Form1()).addClass(Popup.Const.CLASS_POPUP_FULL_SCREEN),$(this.moNode).addClass(Popup.Const.CLASS_POPUP_FULL_SCREEN_VFORM));this.mbIsContextMenu&&(this.mbPreventClosingParentContextMenu?(i=this._GetAncestorContextMenuPopup(),Popup.CloseAllContextMenuPopup(!1,undefined,!1,Object.keys(i))):Popup.CloseAllContextMenuPopup(),this.moJGlobalContainer.addClass(Popup.Const.CONTEXT_MENU_CONTAINER_CLASS),this.mbContextMenuFollowScroll?this.moJGlobalContainer.css({"pointer-events":"none"}):(this.moJGlobalContainer.css({"pointer-events":"none",position:"absolute",overflow:"visible"}),this.StickContextMenuToOriginalPosition()),t=$($PI(this.msID+Popup.Const.CONTAINER_SUFFIX)),$SetCss(t,{"pointer-events":"auto"}),t.addClass("contextual-menu"))},_SavePopupPosition:function(){var n=this,t;this.moPopupAbsolutePosition&&this.msID&&(t=Utils.debounce(function(){var t=Math.round(n.moPopupAbsolutePosition.x),i=Math.round(n.moPopupAbsolutePosition.y),r=n.mbSaveLastPositionUseLongID;$.ajax({url:encodeURI("htm/AlterSession.aspx?PopupID="+n.msID+"&PopupUseLongID="+r+"&PopupLoc="+t+"_"+i),method:"GET",success:function(){HistoryMgr.GetInstance().bDebugPopupHistory&&console.log("Popup position saved: "+n.msID,{x:t,y:i})},error:function(n,t,i){console.error("Failed to save popup position",i)}})},500),t())},_GetMargins:function(){return{top:this.moJNode.css("margin-top").replace("px",""),right:this.moJNode.css("margin-right").replace("px",""),bottom:this.moJNode.css("margin-bottom").replace("px",""),left:this.moJNode.css("margin-left").replace("px","")}},_IsSmallViewport:function(){return Utils.GetViewportWidth()<640||Utils.GetViewportHeight()<640},_GetWindowPadding:function(){var n=this.moGlobalContainer.firstChild;return n&&n.classList.contains("VPopupFullPage")?0:this._IsSmallViewport()?Popup.Const.SML_VPRT_WINDOW_PADDING:n&&n.classList.contains(Popup.Const.SMALL_PADDING_CLASS)?Popup.Const.SML_WINDOW_PADDING:Popup.Const.WINDOW_PADDING},_TrapFocus:function(){var t,r,n,i;if(!this.mbIgnoreFocusTrap){for(Utils.IsTouchDevice()&&$(".tipsy").hide(),t=Matrix3.maPopupStack.slice(),t.push("BodyContent"),n=t.length-1;n>=0;n--)(r=t[n],r!=this.msID)&&Utils.DisableFocus(r);if(window.Cx&&window.Cx.activeModals&&window.Cx.activeModals instanceof Array)for(n=0;n<window.Cx.activeModals.length;n++)i=window.Cx.activeModals[n],i.modal.isExternalActivated||(i.modal.activateExternal(),i.__toDeactivateExternalOnTrapFocusRelease=!0);PostRenderMgr.GetInstance().ExecuteAsap(function(){this.moNode.contains(document.activeElement)||this.moNode.focus({preventScroll:!0})}.bind(this))}},_ReleaseTrapFocus:function(n){var i,u,r,t,f;if(!this.mbIgnoreFocusTrap){for(i=[],u=!1,t=Matrix3.maPopupStack.length-1;t>=0;t--)if(r=Matrix3.maPopupStack[t],Matrix3.moPopupTable[r].mbIgnoreFocusTrap)u=!0,i.push(r);else{u=!1;i.push(r);break}for((u||i.length==0)&&i.push("BodyContent"),t=i.length-1;t>=0;t--)(r=i[t],r!=this.msID)&&Utils.RestoreFocus(r,n);if(window.Cx&&window.Cx.activeModals&&window.Cx.activeModals instanceof Array)for(t=0;t<window.Cx.activeModals.length;t++)f=window.Cx.activeModals[t],f.__toDeactivateExternalOnTrapFocusRelease&&(f.modal.deactivateExternal(),delete f.__toDeactivateExternalOnTrapFocusRelease)}},_GetPaddingBottom:function(){return this._IsSmallViewport()?this.mbPopupFullscreenSmallViewport?0:48:this.mbPopupFullscreenAllViewport?0:this._GetWindowPadding()},_GetAncestorContextMenuPopup:function(){var n,t,i,r;if(!Matrix3||!Matrix3.moPopupTable||(n=this,!n||!n.mbIsContextMenu))return null;for(t={};;){if(t[n.msID]=n,i=n.msReferenceVFormID,!i)break;if(r=Utils.GetRootOrPopupId(i),!r)break;
216if(n=Matrix3.moPopupTable[r],!n||!n.mbIsContextMenu)break}return t}};Popup.HandleCloseContextMenuPopup=function(){var n=!1;window.addEventListener("mousedown",function(t){n=$(Utils.Form1()).width()<t.clientX});window.addEventListener("mouseup",function(t){var i,o,s,e,c,a,l,v,y;if(n){n=!1;return}if(Popup.ContextMenuCounter>0){if(i=$(t.target),Matrix3.moCMS&&Matrix3.moCMS.moEditToolbar){if(o=$("[id='"+Matrix3.moCMS.moEditToolbar.msIdMaintenanceMode+"']"),s=i.closest("label").siblings("input"),s.length>0&&o.length==1&&s[0]==o[0])return;if(i.is("canvas#_CMS_Canvas"))return}if(i.hasClass("medium-zoom-image")||i.hasClass("medium-zoom-overlay"))return;if(i.closest(".context-menu-list, #context-menu-layer").length>0)return;var u=i.closest("."+Popup.Const.SCROLLABLE_CONTAINER_CLASS),h=u.length==0||!u.hasClass(Popup.Const.CONTEXT_MENU_CONTAINER_CLASS),f=Utils.GetVFormId(Utils.FindClosestCortexNodeID(t.target)),r=i.closest("[id='"+f+"']");r.length==0&&(r=$E(f));h&&(u=r.closest("."+Popup.Const.SCROLLABLE_CONTAINER_CLASS),h=u.length==0||!u.hasClass(Popup.Const.CONTEXT_MENU_CONTAINER_CLASS));e=r.attr("data-originatevfid")||r.attr("data-r")&&JSON.parse(r.attr("data-r"))[Popup.Const.PROP_POPUP_ORIGINATE_VFORMID];c=i.hasClass(Popup.Const.CLOSE_BUTTON_CLASS);Utils.IsStringFilled(e)||(a=Utils.GetRootOrPopupId(f),l=Matrix3.GetPopupTable()[a],l&&(e=l.GetOriginateVFormID()));h?Popup.CloseAllContextMenuPopup(!0,e,c):Popup.ContextMenuCounter>1&&(v=Utils.GetRootOrPopupId(f),y=Popup.GetAncestorContextMenuPopup(v),Popup.CloseAllContextMenuPopup(!0,y,c))}})};Popup.CloseAllContextMenuPopup=function(n,t,i,r){var e,f;if(Matrix3&&Matrix3.moPopupTable){t&&(typeof t=="string"||t instanceof String)&&(e=t,t={},t[e]=1);r||(r=[]);for(f in Matrix3.moPopupTable)if(!r.includes(f)){var u=Matrix3.moPopupTable[f],o=u.moJGlobalContainer,s=t&&n&&(t[u.msID]||t[u.msOriginateVFormID]);o.hasClass(Popup.Const.CONTEXT_MENU_CONTAINER_CLASS)&&!s&&(i||!u.mbPreventCloseOnClickOutside)&&u.Remove(null,n)}}};Popup.GetAncestorContextMenuPopup=function(n){var t,i,r,u;if(!Matrix3||!Matrix3.moPopupTable||(t=Matrix3.moPopupTable[n],!t||!t.mbIsContextMenu))return null;for(i={};;){if(i[t.msID]=t,r=t.msReferenceVFormID,!r)break;if(u=Utils.GetRootOrPopupId(r),!u)break;if(t=Matrix3.moPopupTable[u],!t||!t.mbIsContextMenu)break}return i};Popup.AdjustPopupPositionForDebugVForm=function(n){n&&Utils.DebugFormPresent()&&$SetCss(n,{right:"16px"})};Popup.Counter=0;Popup.ContextMenuCounter=0;Popup.Const={CONTROL_NAME:"Popup",CONTAINER_CLASS:"PopupC",SMALL_PADDING_CLASS:"SmallPaddingC",SCROLLABLE_CONTAINER_CLASS:"PopupScrollContainer",CONTEXT_MENU_CONTAINER_CLASS:"PopupContextMenuContainer",CONTAINER_SUFFIX:":_Popup",TITLE_SUFFIX:":_Title",DESCRIPTION_STATUS_CONTAINER_SUFFIX:":_DescStatusContainer",DESCRIPTION_SUFFIX:":_Description",STATUS_PREFIX:":_Status",HAS_DESC_OR_STATUS_CLASS:"PopupHasDescOrStatusC",CONTENT_CLASS:"DefaultPopupClass",SCROLLABLE_PNL:"PopupScrollablePnl",MASK_CLASS:"MaskC",MASK_SUFFIX:":_Mask",HEADER_CLASS:"PopupHeaderC",HEADER_SUFFIX:":_Header",CLOSE_CLASS:"PopupCloseC",CLOSE_SUFFIX:":_Close",HELPER_SUFFIX:":_Helper",BORDER_SIZE:2,BORDER_SHADOW:18,POPUP_TITLE:"VFormTitle",POPUP_DESCRIPTION:"VFormDescription",POPUP_STATUS:"VFormStatus",POPUP_STATUS_SEPARATOR:"|",POPUP_COMMAND:"PopupCommand",TITLE_CLASS:"PopupTitleC",SHADOW_SUFFIX:":_Shadow",CLASS_SHADOW:"ShadowC",CLASS_INNER_PNL:"PopupInnerPnlC",CLASS_POPUP_FULL_SCREEN:"PopupFullScreen",CLASS_POPUP_FULL_SCREEN_VFORM:"PopupFullScreenVForm",INNER_PNL_SUFFIX:":_PopupInnerPnl",PROP_POPUP_SHIFTING:"PopupShifting",PROP_POPUP_CENTERING:"PopupCentering",PROP_POPUP_POSITION:"PopupPosition",PROP_POPUP_ABSOLUTE_POSITION:"PopupAbsolutePosition",PROP_CONTEXT_MENU_FOLLOW_SCROLL:"PopupContextMenuFollowScroll",PROP_PREVENT_PUSHING_INTO_VIEWPORT:"PreventPushingIntoViewport",PROP_POPUP_ORIGINATE_VFORMID:"PopupOriginateID",PROP_POPUP_REFERENCE_VFORMID:"ReferenceVFormID",PROP_POPUP_HIDE_CLOSE_BUTTON:"PopupHideCloseButton",PROP_POPUP_MODELESS:"PopupModeless",PROP_POPUP_HIDE_MASK:"PopupHideMask",PROP_POPUP_PREVENT_CLOSE_ON_CLICK_OUT_SIDE:"PopupPreventCloseOnClickOutSide",PROP_POPUP_CLOSE_ON_LEAVE:"PopupCloseOnLeave",PROP_POPUP_CONTEXT_MENU:"PopupContextMenu",PROP_POPUP_CONTEXT_MENU_PREVENT_CLOSING_PARENT:"PopupContextMenuPreventClosingParent",PROP_POPUP_FULL_SCREEN_ON_SMALL_VIEWPORT:"PopupFullScreenOnSmallViewport",PROP_POPUP_FULL_SCREEN_ON_ALL_VIEWPORT:"PopupFullScreenOnAllViewport",PROP_POPUP_RESTORE_FOCUS_ON_CLOSE:"PopupRestoreFocusOnClose",PROP_POPUP_SAVE_LAST_POSITION:"PopupSaveLastPosition",PROP_POPUP_SAVE_LAST_POSITION_USE_LONG_ID:"PopupSaveLastPositionUseLongID",PROP_EVENT_ON_CLOSE:"EventOnClose",PROP_EVENT_INSTEAD_OF_CLOSE:"EventInsteadOfClose",PROP_EVENT_REMAIN_VISIBLE:"RemainVisible",PROP_EVENT_PREVENT_ESC:"PopupPreventESC",PROP_SEND_CLOSE_EVENT_ONLY_IF_CONTAINS_COLLECTION:"SendCloseEventOnlyIfContainsCollection",PROP_DISABLE_HISTORY:"DHM",STACKING_OFFSET:20,REVEAL_MAX_DELAY:1500,REVEAL_MAX_HEIGHT_VIEWPORT_FACTOR:2,CONTENT_PADDING:20,DRAGGABLE_OFFSET:100,WINDOW_PADDING:40,SML_WINDOW_PADDING:20,SML_VPRT_WINDOW_PADDING:10,POSITION_CENTER:"center",POSITION_TOP_LEFT:"topleft",POSITION_TOP_RIGHT:"topright",POSITION_TOP_CENTER:"topcenter",POSITION_BOTTOM_LEFT:"bottomleft",POSITION_BOTTOM_RIGHT:"bottomright",STATE_POPUP_PREFIX:"POPUP_STATE_",POSITION_X_RIGHT:"r",POSITION_X_LEFT:"l",POSITION_X_ALIGN_LEFT:"al",POSITION_X_ALIGN_RIGHT:"ar",POSITION_Y_BOTTOM:"b",POSITION_Y_ALIGN_TOP:"at"};HTMLElement.prototype.CalculateXPositionFloatPnl=function(){var n;if(this.mbHorizontalFlow){var i=this.x,t=this.miWidth,n=this.CalculateXPositionContainer();return t!=this.miWidth&&PositionMgr.GetInstance().AddToDirtyYList(this),i===this.x&&t===this.miWidth&&this.mbForceHasChangedCalled&&(n=!1),n}return n=this.CalculateOrthogonalDirection(),n=this.CalculateXPositionContainer()||n,this.GetOriginalHeight()==-1&&this.GetOriginalWidth()!=-1&&this.AutoBalanceFlow()&&(n=!0),n};HTMLElement.prototype.CalculateYPositionFloatPnl=function(){var t,n;return this.mbHorizontalFlow?(n=this.CalculateOrthogonalDirection(),this.CalculateYPositionContainer()||n):(t=this.miHeight,n=this.CalculateYPositionContainer(),t!=this.miHeight&&PositionMgr.GetInstance().AddToDirtyXList(this),n)};HTMLElement.prototype.CalculateOrthogonalDirection=function(){function lr(n,t,i){return i/(n+t)}function ar(n){var t=0,i;return n&&n.length>0&&(i=n.reduce(function(t,i){return t+i/n.length}
216,0),n.forEach(function(n){t+=Math.abs(i-n)})),t=t*-1}function vr(){for(var t,n=0;n<r;n++)t=i[n],isNaN(t.iTempRow)||(t.iForceRowIndex=t.iTempRow)}function bi(n){return 1/n}function ki(n,t,u){for(var h,l,f=this.GetOwnFlowPaddingLeft(),s=this.GetOwnFlowSize()-this.GetOwnFlowPaddingRight(),v=bi(a),e=0,o=n;o<r;o++){if(h=i[o],f+=h.GetWidth(),h.iTempRow=t,f*a+e>=s&&f*v+e<=s&&(u[t]=lr(f,e,s),o==r-1?c&&t!=c-1||(l=ar(u),l>ct&&(ct=l,vr())):(!c||t<c-1)&&ki.apply(this,[o+1,t+1,u])),f*v+e>s)break;e+=this.miForcedFlowSpacing}}var ti=!1,rt=this.GetOriginalWidth_NotOverridable(),p,ct,nt,e,pt,d,ft,u,o,b,ei,oi,si,et,hi,gi,k,li,ai,wt,y,ot,at,vi,f,ir,s,tt,kt,dt,er,hr,gt,n,cr,ni,yt;this.GetOriginalWidth()!=rt&&this.OverrideOriginalWidth(rt);d=this.GetOriginalHeight_NotOverridable();this.GetOriginalHeight()!=d&&this.OverrideOriginalHeight(d);var ii=0,v=0,l=0;this.mbHorizontalFlow?(u=this.GetPaddingLeft(),l=o=this.GetPaddingTop(),Matrix3.ConsoleLog(null,"INITIALIZED miNextLineOrthogonalCoords (Horizontal Flow) = "+l+", Panel: "+this.GetId())):(u=this.GetPaddingTop(),l=o=this.GetPaddingLeft(),Matrix3.ConsoleLog(null,"INITIALIZED miNextLineOrthogonalCoords (Vertical Flow) = "+l+", Panel: "+this.GetId()));var i=this.GetContainerForChildren(),di=this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_AUTO_SIZE,!1),a=this.GetProperty(ConstProperties.Const.PROPERTY_FLOW_STRETCH_FACTOR,0);a=(a+100)/100;p=this.mbHorizontalFlow?this.GetOriginalWidth()==-1:this.GetOriginalHeight()==-1;var ri=!0,ut=!0,g=this.GetOwnFlowSize()*a,yr=(this.GetOwnFlowSize()-g)/2,ht,ui=this.GetOwnFlowSize();this.mbHorizontalFlow?(ht=g-this.GetPaddingRight(),ui-=this.GetPaddingRight()):(ht=g-this.GetPaddingBottom(),ui-=this.GetPaddingBottom());var r=i.length,t,fi=0,h=[],w=[],c=this.GetProperty(ConstProperties.Const.PROPERTY_FLOW_MAX_ROWS,0);for(a!=1&&(ct=Number.MIN_SAFE_INTEGER,isNaN(ct)&&(ct=-999999999),ki.apply(this,[0,0,[]])),nt=PositionMgr.GetInstance(),e=0,t=0;t<r;t++)if(n=i[t],Matrix3.ConsoleLog(n.GetId(),"Processing control "+(t+1)+"/"+r+" - ID: "+n.GetId()+", Row: "+e+", bFirstInRow: "+ut+", bFirstRow: "+ri+", iCurrentLineOrthogonalCoords: "+o+", iNextItemFlowCoords: "+u+", miNextLineOrthogonalCoords: "+l+", Panel: "+this.GetId()),n.SetXType(""),n.SetYType(""),pt=[this.GetId()],t+1<r&&pt.push(i[t+1].GetId()),this.mbHorizontalFlow?(rt=n.GetOriginalWidth_NotOverridable(),n.GetOriginalWidth()!=rt&&(n.OverrideOriginalWidth(rt),n.SetWidth(Math.max(rt,0)),n.ForceHasChanged()),nt.CalculateXPosition(n,pt)):(d=n.GetOriginalHeight_NotOverridable(),n.GetOriginalHeight()!=d&&(n.OverrideOriginalHeight(d),n.SetHeight(Math.max(d,0)),n.ForceHasChanged()),nt.CalculateYPosition(n,pt)),ft=this.miForcedFlowSpacing,f=this.miForcedOrthgonalSpacing,b=this.GetControlFlowSize(n),ei=this.GetControlOrthogonalSize(n),b!=0||ei!=0?(oi=!p&&(u+b+ft>ht||b<yr&&u+b+ft>ui)&&!ut,si=!isNaN(n.iForceRowIndex)&&n.iForceRowIndex!=e,(isNaN(n.iForceRowIndex)&&oi||si)&&(Matrix3.ConsoleLog(n.GetId(),"NEW ROW DETECTED - Control: "+n.GetId()+", Row: "+e+" -> "+(e+1)+", Previous miNextLineOrthogonalCoords: "+l+", bTraditionalCondition: "+oi+", bMaxRowCondition: "+si+", Panel: "+this.GetId()),u=this.mbHorizontalFlow?this.GetPaddingLeft():this.GetPaddingTop(),o=l,Matrix3.ConsoleLog(n.GetId(),"iCurrentLineOrthogonalCoords set to: "+o+", Panel: "+this.GetId()),ut=!0,ri=!1,e++),b==0&&(u-=ft),ut?this.SetControlFlowOffset(n,u):this.SetControlFlowOffset(n,u+ft),ri?(Matrix3.ConsoleLog(n.GetId(),"SetControlOrthogonalOffset (First Row) - Control: "+n.GetId()+", Offset: "+o+", Row: "+e),this.SetControlOrthogonalOffset(n,o)):(Matrix3.ConsoleLog(n.GetId(),"SetControlOrthogonalOffset (Not First Row) - Control: "+n.GetId()+", Base: "+o+", OrthogonalOffset: "+f+", Total: "+(o+f)+", Row: "+e+", bFirstInRow: "+ut),this.SetControlOrthogonalOffset(n,o+f)),di&&!p&&(h.push(n),this.GetControlFlowOriginalSize(n)==-1&&w.push(fi)),et=this.GetWidth()-this.GetPaddingLeft()-this.GetPaddingRight(),this.mbHorizontalFlow&&!p&&et>0&&n.msCtrlType==PositionItem.Const.CONTROL_TYPE_BUTTON&&n.GetOriginalWidth()==-1&&(n.GetWidth()>et||n.miMaxWidth&&n.miMaxWidth<et)&&(n.mbXMustBeCalculated=!0,n.mbYMustBeCalculated=!0,n.miMaxWidth=et,$(n.GetNode()).css("width",et+"px").removeClass("NoWrap")),k=[this.GetId()],t+1<r&&k.push(i[t+1].GetId()),nt.CalculateXPosition(n,k),DOMChangesQueue.GetInstance().ApplyQueue(),nt.CalculateYPosition(n,k),iControlOrthogonalSize=this.GetControlOrthogonalSize(n),b=this.GetControlFlowSize(n),u=b+this.GetControlFlowOffset(n),hi=Math.max(l,this.GetControlOrthogonalOffset(n)+iControlOrthogonalSize),Matrix3.ConsoleLog(n.GetId(),"Updating miNextLineOrthogonalCoords - Control: "+n.GetId()+", Old: "+l+", ControlOffset: "+this.GetControlOrthogonalOffset(n)+", ControlSize: "+ei+", New: "+hi+", Row: "+e+", Panel: "+this.GetId()),l=hi,gi=this.mbHorizontalFlow?n.y:n.x,this.GetOwnOriginalOrthogonalSize()==-1&&(ii=Math.max(ii,gi+Math.max(0,this.GetControlOrthogonalSize(n)))),(c==0||e<c)&&(v=Math.max(ii,v)),ut=!1,fi++):(Matrix3.ConsoleLog(n.GetId(),"Control has no size - Control: "+n.GetId()+", Setting offsets - Flow: "+u+", Orthogonal: "+o),this.SetControlFlowOffset(n,u),this.SetControlOrthogonalOffset(n,o),k=[this.GetId()],t+1<r&&k.push(i[t+1].GetId()),nt.CalculateXPosition(n,k),DOMChangesQueue.GetInstance().ApplyQueue(),nt.CalculateYPosition(n,k)),!p&&di&&w.length>0&&(t==r-1||u+this.GetControlFlowSize(i[t+1])+ft>ht)){var nr=w.length,ci=ht-u,lt=Math.floor(ci/nr);if(lt>0){for(y=0;y<w.length;y++)for(y==w.length-1&&(lt+=ci-lt*nr-1),li=w[y],ai=h[li],this.SetControlFlowSize(ai,this.GetControlFlowSize(ai)+lt),wt=li+1;wt<h.length;wt++)ot=h[wt],this.SetControlFlowOffset(ot,this.GetControlFlowOffset(ot)+lt);for(y=w[0];y<h.length;y++)ot=h[y],this.mbHorizontalFlow?ot.CalculateXPosition():ot.CalculateYPosition()}fi=0;h=[];w=[]}if(at=0,vi=this.GetOwnOriginalOrthogonalSize()==-1,vi&&(c==0||e<c?at=this.mbHorizontalFlow?this.GetPaddingBottom():this.GetPaddingRight():this.miStretchVisibleRowsHeightDelta&&(at=this.miStretchVisibleRowsHeightDelta),v+=at,v!=this.GetOwnOrthogonalSize()&&(this.SetUpdateStyle(!0),ti=!0),this.mbHorizontalFlow?(this.OverrideOriginalHeight(v),this.SetHeight(v)):(this.OverrideOriginalWidth(v),this.SetWidth(v))),p&&u!=g&&(this.mbHorizontalFlow?PositionMgr.GetInstance().AddToDirtyXList(this):PositionMgr.GetInstance().AddToDirtyYList(this)),!p&&this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_AUTO_SPACING)&&r>0){for(t=0,n=i[0],f=this.GetControlOrthogonalOffset(n);t<r&&f==this.GetControlOrthogonalOffset(i[t]);)t++;if(t<r){var yi=t,tr=i[yi-1],ci=this.GetOwnFlowSize()-(this.GetControlFlowOffset(tr)+this.GetControlFlowSize(tr)+this.GetOwnFlowPaddingRight()),pr=ci/(yi-1);for(t=0;t<r;t++)ir=t%yi,n=i[t],this.SetControlFlowOffset(n,this.GetControlFlowOffset(n)+pr*ir),n.CalculateXPosition(),n.CalculateYPosition()}}if(!p&&this.mbHorizontalFlow&&a!=1&&r>0){var g=this.GetOwnFlowSize()-this.GetPaddingRight(),wr=bi(a),bt=0,pi=0,wi=0,e=0,rr=i[0],f=this.GetControlOrthogonalOffset(rr),h=[],ur=0;for(t=0;t<r;t++)if(h.push(i[t]),t==r-1||this.GetControlOrthogonalOffset(i[t+1])!=f){var fr=i[t],br=fr.miXOff+fr.miWidth,st=g/br;for(st=t==r-1&&st>=a?1:Math.max(wr,Math.min(a,st)),s=0,tt=h.pop();tt!=null;)tt.miHeight>s&&(s=tt.miHeight),$(tt.GetNode()).css({transform:"matrix("+st+", 0, 0, "+st+", 0, "+bt+")","transform-origin":"-"+tt.miXOff+"px top"}),tt=h.pop();kt=s*st-s;bt+=kt;e<c?(pi+=kt,wi+=kt):pi-=s+ur;h=[];t<r-1&&(ur=this.GetControlOrthogonalOffset(i[t+1])-f-s,f=this.GetControlOrthogonalOffset(i[t+1]));e++}c?(this.miCachedPaddingBottom=pi,this.miStretchVisibleRowsHeightDelta=wi):this.miCachedPaddingBottom=bt;vi&&(dt=v-at+(c?wi:bt),dt!=this.GetOwnOrthogonalSize()&&(this.OverrideOriginalHeight(dt),this.SetHeight(dt),this.SetUpdateStyle(!0),ti=!0))}if(er=this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_CENTER_IT
216EMS,!1),er&&r>0&&this.mbHorizontalFlow){var g=this.GetOwnFlowSize()-this.GetPaddingRight(),f=this.GetControlOrthogonalOffset(i[0]),vt=0,it=0;for(t=0;t<r;t++)if(t==r-1||this.GetControlOrthogonalOffset(i[t+1])!=f){it=t;var rr=i[vt],or=i[it],sr=or.miXOff+or.miWidth-rr.miXOff;if(g>=sr+2)for(hr=parseInt((g-sr)/2),gt=vt;gt<=it;gt++)n=i[gt],this.SetControlFlowOffset(n,n.miXOff+hr),n.CalculateXPosition();t<r-1&&(f=this.GetControlOrthogonalOffset(i[t+1]));vt=it+1}}if(cr=this.GetProperty(ConstProperties.Const.PROPERTY_FLOAT_VERTICAL_CENTER_ITEMS,!1),cr&&r>0&&this.mbHorizontalFlow){var f=this.GetControlOrthogonalOffset(i[0]),vt=0,it=0,s=0;for(t=0;t<r;t++)if(s=Math.max(s,this.GetControlOrthogonalSize(i[t])),t==r-1||this.GetControlOrthogonalOffset(i[t+1])!=f){for(it=t,ni=vt;ni<=it;ni++)yt=i[ni],this.GetControlOrthogonalSize(yt)<s&&(this.SetControlOrthogonalOffset(yt,f+(s-this.GetControlOrthogonalSize(yt))/2),yt.CalculateYPosition());t<r-1&&(f=this.GetControlOrthogonalOffset(i[t+1]));vt=it+1;s=0}}return ti};HTMLElement.prototype.AutoBalanceFlow=function(){for(var y=!1,tt=this.miHeight,u=this.GetContainerForChildren(),h=u.length,f=0,p=0,c,k,d,o,i,s,nt,v,n=0;n<h;n++){var t=u[n],i=this.GetControlFlowSize(t),e=this.GetControlOrthogonalSize(t);(i!=0||e!=0)&&(e>f&&(f=e),p+=i)}if(c=PositionMgr.GetInstance(),f>0){var it=this.miWidth+this.miForcedOrthgonalSpacing-this.GetPaddingLeft()-this.GetPaddingRight(),w=f+this.miForcedOrthgonalSpacing,b=Math.floor(it/w);if(b>1){k=p/b;d=this.mbHorizontalFlow?this.GetPaddingLeft():this.GetPaddingTop();var g=0,l=0,r=-this.miForcedFlowSpacing,a=0;for(n=0;n<h;n++){var t=u[n],i=this.GetControlFlowSize(t),e=this.GetControlOrthogonalSize(t);this.SetControlFlowOffset(t,d+r+this.miForcedFlowSpacing);this.SetControlOrthogonalOffset(t,this.GetPaddingLeft()+g*w);o=[this.GetId()];n+1<h&&o.push(u[n+1].GetId());c.CalculateXPosition(t,o);DOMChangesQueue.GetInstance().ApplyQueue();c.CalculateYPosition(t,o);(i!=0||e!=0)&&(i=this.GetControlFlowSize(t),l+=i,r+=i+this.miForcedFlowSpacing,l>k&&(g++,r>a&&(a=r),l=0,r=-this.miForcedFlowSpacing))}if(s=a+this.GetPaddingTop()+this.GetPaddingBottom(),s!=tt){this.OverrideOriginalHeight(s);this.SetHeight(s);PositionMgr.GetInstance().AddToDirtyYList(this);for(nt in this.GetYDependents())v=this.GetYDependents()[nt].GetDestination(),v.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyYList(v);y=!0}}}return y};HTMLElement.prototype.GetOwnFlowSize=function(){return this.mbHorizontalFlow?this.miWidth:this.miHeight};HTMLElement.prototype.GetOwnOrthogonalSize=function(){return this.mbHorizontalFlow?this.miHeight:this.miWidth};HTMLElement.prototype.GetOwnOriginalOrthogonalSize=function(){return this.mbHorizontalFlow?this.GetOriginalHeight():this.GetOriginalWidth()};HTMLElement.prototype.GetOwnFlowPaddingLeft=function(){return this.mbHorizontalFlow?this.GetPaddingLeft():this.GetPaddingTop()};HTMLElement.prototype.GetOwnFlowPaddingRight=function(){return this.mbHorizontalFlow?this.GetPaddingRight():this.GetPaddingBottom()};HTMLElement.prototype.GetControlFlowOffset=function(n){return this.mbHorizontalFlow?n.miXOff:n.miYOff};HTMLElement.prototype.GetControlFlowSize=function(n){return this.mbHorizontalFlow?n.miWidth:n.miHeight};HTMLElement.prototype.GetControlOrthogonalOffset=function(n){return this.mbHorizontalFlow?n.miYOff:n.miXOff};HTMLElement.prototype.GetControlOrthogonalSize=function(n){return this.mbHorizontalFlow?n.miHeight:n.miWidth};HTMLElement.prototype.GetControlFlowOriginalSize=function(n){return this.mbHorizontalFlow?n.GetOriginalWidth():n.GetOriginalHeight()};HTMLElement.prototype.GetControlOriginalFlowOffset=function(n){return this.mbHorizontalFlow?n.GetOriginalXOff():n.GetOriginalYOff()};HTMLElement.prototype.GetControlOriginalOrthogonalOffset=function(n){return this.mbHorizontalFlow?n.GetOriginalYOff():n.GetOriginalXOff()};HTMLElement.prototype.SetControlFlowOffset=function(n,t){var r,i;if(this.mbHorizontalFlow){if(n.miXOff!=t)for(r in n.GetXDependents())i=n.GetXDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyXList(i);return n.miXOff=t}if(n.miYOff!=t)for(r in n.GetYDependents())i=n.GetYDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyYList(i);return n.miYOff=t};HTMLElement.prototype.SetControlOrthogonalOffset=function(n,t){var r,i;if(this.mbHorizontalFlow){if(n.miYOff!=t)for(r in n.GetYDependents())i=n.GetYDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyYList(i);return n.miYOff=t}if(n.miXOff!=t)for(r in n.GetXDependents())i=n.GetXDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyXList(i);return n.miXOff=t};HTMLElement.prototype.SetControlFlowSize=function(n,t){var r,i;if(this.mbHorizontalFlow){if(n.miWidth!=t)for(r in n.GetXDependents())i=n.GetXDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyXList(i);n.OverrideOriginalWidth(t);n.SetWidth(t)}else{if(n.miHeight!=t)for(r in n.GetYDependents())i=n.GetYDependents()[r].GetDestination(),i.msCtrlType!=PositionItem.Const.CONTROL_TYPE_FLOAT_PANEL&&PositionMgr.GetInstance().AddToDirtyYList(i);n.OverrideOriginalHeight(t);n.SetHeight(t)}};RadioButtonListCtrl.Const={CONTROL_NAME:"RadioButtonList"};RadioButtonListCtrl.prototype={Event_Change_Setup:function(n){this.Event_Change=new CtrlEvent(this,function(){for(var t=1;$Elt(this.msControlID+"_"+t);)n&&n!=$Elt(this.msControlID+"_"+t).value||Utils.AddEvent(this.msControlID+"_"+t,"click",this.Event_Change.Fire,this.Event_Change),t++})},Action_SetValue:function(n){for(var t=1;$Elt(this.msControlID+"_"+t);)n==$Elt(this.msControlID+"_"+t).value&&($Elt(this.msControlID+"_"+t).checked=!0),t++}};Utils.Augment(RadioButtonListCtrl,MatrixEventProperties);Utils.Augment(RadioButtonListCtrl,DragProperties);Utils.Augment(RadioButtonListCtrl,DropProperties);Utils.Augment(RadioButtonListCtrl,SelectionProperties);Utils.Augment(RadioButtonListCtrl,ParamValueUpdateAction);
216RatingCtrl.Const={CONTROL_NAME:"Rating"};RatingCtrl.prototype={Init:function(n){var t=this;$E(this.msID).barrating({showSelectedRating:!1,onSelect:function(){t._CheckEvent("change")==!0&&Matrix3.AddEvent(t.moEvents.change.vform_id,t.moEvents.change.name,t.moEvents.change.type,t.moEvents.change.delay,t.moEvents.change.args,t.moEvents.change.comm,t.moEvents.change.commargs)},readonly:n===!0?!0:!1})},_CheckEvent:function(n){return typeof n=="string"&&this.moEvents&&this.moEvents[n]&&this.moEvents[n].vform_id&&this.moEvents[n].name&&this.moEvents[n].type&&this.moEvents[n].delay?!0:!1},SetEvent:function(n,t,i,r,u,f,e,o){this.moEvents[n]={name:i,vform_id:t,type:r,delay:u,args:f,comm:e,commargs:o}},SetEventChange:function(n,t,i,r,u,f,e){this.SetEvent("change",n,t,i,r,u,f,e)},Action_SelectIndex:function(n){$Elt(this.msControlID).value=$Elt(this.msControlID).options[n].value},Action_SetValue:function(n){$E(this.msControlID).val(n)}};Utils.Augment(RatingCtrl,MatrixEventProperties);SlideshowCtrl.Const={CONTROL_NAME:"Slideshow",PROPERTY_AUTO_PLAY:"AutoPlay",PROPERTY_DELAY:"Delay",PROPERTY_TRANSITION_DURATION:"TransitionDuration"};SlideshowCtrl.prototype={Configure:function(n){var f,r,u,t,i;for(this.moPosItem=n,this.miDelay=n.GetProperty(SlideshowCtrl.Const.PROPERTY_DELAY,5e3),this.mbPlaying=n.GetProperty(SlideshowCtrl.Const.PROPERTY_AUTO_PLAY,!0),this.miTransitionDuration=n.GetProperty(SlideshowCtrl.Const.PROPERTY_TRANSITION_DURATION,500),Utils.IsIPad()&&(this.miTransitionDuration=0),this.miDelay<=0&&(this.mbPlaying=!1),f=n.GetChildNodes().length>0&&n.GetChildNodes()[0].tagName.toUpperCase()=="A"?n.GetChildNodes()[0].childNodes:n.GetChildNodes(),this.maImages=[],t=0,i=f.length;t<i;t++)r=f[t],r.nodeType==1&&r.tagName.toUpperCase()=="IMG"&&this.maImages.push(r);if(this.maImages.length>0){if(u=this,Utils.IsIE8())for(t=0,i=this.maImages.length;t<i;t++)$(this.maImages[t]).hide();setTimeout(function(){u.ShowItem(0);u.mbPlaying&&u.StartPlaying()},1)}},ShowItem:function(n){var i=(n+this.maImages.length)%this.maImages.length,f,t,e,u,o,r;i!=this.miCurrentIndex&&(this.miCurrentIndex!=-1&&(f=this.maImages[this.miCurrentIndex],$(f).stop().fadeTo(this.miTransitionDuration,0)),t=this.maImages[i],$SetStyle(t,"position","absolute"),this.moPosItem.moLinkedImage||(this.moPosItem.moLinkedImage=t,this.moPosItem.SetProperty("DocumentWidth",$(t).attr("width")),this.moPosItem.SetProperty("DocumentHeight",$(t).attr("height")),$SetStyle(this.moPosItem.moLinkedImage,"visibility","hidden")),this.moPosItem.moLinkedImage=t,t.complete?(AutoScaleProperties.Apply(this.moPosItem),DOMChangesQueue.GetInstance().ApplyQueue()):($(t).attr("src")==undefined&&$(t).attr("src",$(t).attr("data-src")),e=this,$(t).load(function(){AutoScaleProperties.Apply(e.moPosItem);DOMChangesQueue.GetInstance().ApplyQueue()})),this.moPosItem.TransferPositioningToDOM(),i==0?$(t).stop().fadeTo(0,1):$(t).stop().fadeTo(this.miTransitionDuration,1),this.miCurrentIndex=i,u={},t.attributes["data-info"]&&(u=Utils.EvalScriptsWithResult("("+t.attributes["data-info"].value+")")),SlideshowMgr.GetInstance().UpdateSlaves(this.moPosItem.GetProperty(ConstProperties.Const.PROPERTY_SLIDESHOW_ID),u),o=(n+1)%this.maImages.length,r=$(this.maImages[o]),r.attr("src")==undefined&&r.attr("src",r.attr("data-src")))},StartPlaying:function(){var n=this,t;this.miIntervalId=setInterval(function(){n.ShowNextItem()},n.miDelay);t=this.miIntervalId;Matrix3.RegisterForCleanup(n.msID,"SlideShowIntervalCleanUpWhenSwitching",function(){clearInterval(t)})},PausePlaying:function(){clearInterval(this.miIntervalId)},ShowNextItem:function(){this.ShowItem(this.miCurrentIndex+1)},Action_SetValue:function(n){var t=parseInt(n);this.ShowItem(t)},Action_ShowNext:function(){this.PausePlaying();this.ShowItem(this.miCurrentIndex+1)},Action_ShowPrevious:function(){this.PausePlaying();this.ShowItem(this.miCurrentIndex-1)},Action_PlaySlideshow:function(){this.StartPlaying()},Action_PauseSlideshow:function(){this.PausePlaying()}};Utils.Augment(SlideshowCtrl,HyperlinkProperties);SlideshowMgr.moSingleton=null;SlideshowMgr.GetInstance=function(){return SlideshowMgr.moSingleton||(SlideshowMgr.moSingleton=new SlideshowMgr),SlideshowMgr.moSingleton};SlideshowMgr.prototype={RegisterNode:function(n){var f=[],i,r,t,e,o,u;
216for(f.push(n),i=[],r=[];f.length>0;)if(t=f.pop(),Utils.IsIE8()==!0&&(t=new HTMLElement(t)),t.nodeType==3?this.PropertyNeedContextualization(t.nodeValue)&&(i.push(t),t.msBaseValue=t.nodeValue,bResult=!0):t.nodeType==1&&t.attributes&&t.attributes.href&&this.PropertyNeedContextualization(t.attributes.href.value)&&(t.msBaseLink=t.attributes.href.value,r.push(t),bResult=!0),e=t.childNodes,e)for(o in e)f.push(e[o]);i.length>0&&n.SetProperty("SlideshowTemplatedTextNodes",i);r.length>0&&n.SetProperty("SlideshowTemplatedLinkNodes",r);(i.length>0||r.length>0)&&(u=n.GetProperty(ConstProperties.Const.PROPERTY_SLIDESHOW_ID),u&&(this.moRegisteredControls.hasOwnProperty(u)||(this.moRegisteredControls[u]={}),this.moRegisteredControls[u][n.msId]=n))},UpdateSlaves:function(n,t){var s,h,c,u,f,i,e,r,o;if(this.moRegisteredControls.hasOwnProperty(n)){s=!1;h=this.moRegisteredControls[n];for(c in h){if(u=h[c],f=u.GetProperty("SlideshowTemplatedTextNodes"),f!=null)for(i=0,e=f.length;i<e;i++)r=f[i],r.nodeValue=this.ReplaceMetaText(r.msBaseValue,t),Utils.IsIE8()&&($(r.moDOMNode)[0].nodeValue=r.nodeValue),s=!0,PositionMgr.GetInstance().AddToDirtyXList(u),PositionMgr.GetInstance().AddToDirtyYList(u);if(o=u.GetProperty("SlideshowTemplatedLinkNodes"),o!=null)for(i=0,e=o.length;i<e;i++)r=o[i],r.attributes.href.value=this.ReplaceMetaText(r.msBaseLink,t)}s&&!Matrix3.HasEventsInProgress()&&PositionMgr.GetInstance().CalculatePosition()}},PropertyNeedContextualization:function(n){var t=!1;return n!=null&&n!=""&&n.indexOf(TooltipProperties.Const.LEFTMARKUP)!=-1&&n.indexOf(TooltipProperties.Const.RIGHTMARKUP)!=-1&&(t=!0),t},ReplaceMetaText:function(n,t){var r=[],u,f,i,e,o;if(n!=null&&n!="")for(u=n.split(TooltipProperties.Const.LEFTMARKUP),r.push(u[0]),f=0,lenICpt=u.length;f<lenICpt;f++)i=u[f],i.indexOf(TooltipProperties.Const.RIGHTMARKUP)!=-1&&(e=i.indexOf(TooltipProperties.Const.RIGHTMARKUP),o=i.substring(0,e),t.hasOwnProperty(o)&&r.push(t[o]),r.push(i.substr(e+1)));return r.join("")}};TextAreaCtrl.Const={CONTROL_NAME:"TextArea"};TextAreaCtrl.moRegisteredValues={};TextAreaCtrl.RegisterValue=function(n,t){n&&(TextAreaCtrl.moRegisteredValues[n]=t)};TextAreaCtrl.ApplyRegisteredValues=function(n){var t,u,i,r;n=n||document;for(t in TextAreaCtrl.moRegisteredValues)(u=TextAreaCtrl.moRegisteredValues[t],i=$(n).find("[id='"+t+"']")[0]||$(document).find("[id='"+t+"']")[0],i)&&(r=document.createElement("textarea"),r.innerHTML=u,i.value=r.value);TextAreaCtrl.moRegisteredValues={}};Utils.Augment(TextAreaCtrl,MatrixEventProperties);Utils.Augment(TextAreaCtrl,DragProperties);Utils.Augment(TextAreaCtrl,DropProperties);Utils.Augment(TextAreaCtrl,SelectionProperties);Utils.Augment(TextAreaCtrl,ClipboardProperties);Utils.Augment(TextAreaCtrl,InPlaceEditorProperties);Utils.Augment(TextAreaCtrl,FocusProperties);Utils.Augment(TextAreaCtrl,RequiredProperties);Utils.Augment(TextAreaCtrl,CommandProperties);Utils.Augment(TextAreaCtrl,ChangeEvent);Utils.Augment(TextAreaCtrl,BlurEvent);Utils.Augment(TextAreaCtrl,BlurAdvEvent);Utils.Augment(TextAreaCtrl,ClickEvent);Utils.Augment(TextAreaCtrl,FocusEvent);Utils.Augment(TextAreaCtrl,ShowEvent);Utils.Augment(TextAreaCtrl,ClearAction);Utils.Augment(TextAreaCtrl,ParamValueUpdateAction);var _fnHiddenTextAreaChangeSetup=ChangeEvent.prototype.Event_Change_Setup,_fnHiddenTextAreaFocusSetup=FocusEvent.prototype.Event_Focus_Setup,_fnHiddenTextAreaBlurSetup=BlurEvent.prototype.Event_Blur_Setup,_fnHiddenTextAreaBlurAdvSetup=BlurAdvEvent.prototype.Event_BlurAdv_Setup,_fnHiddenTextAreaClickSetup=ClickEvent.prototype.Event_Click_Setup;TextAreaCtrl.prototype.Event_Change_Setup=function(n){var i=this._GetCxRichTextElement(),t;if(!i){_fnHiddenTextAreaChangeSetup.call(this,n);return}t=this;this.Event_Change||(this.Event_Change=[]);this.Event_Change.push(new CtrlEvent(this,function(){i._matrixCxRichTextChangeWired||(i._matrixCxRichTextChangeWired=!0,i.addEventListener("cx-rich-text-change",function(n){var u,r,i;if(n&&n.detail)for(u=n.detail.content,r=document.getElementById(t.msControlID),r&&(r.value=u),$E(t.msControlID).addClass("dirty"),$E(t.msControlID).keydown(),i=0;i<t.Event_Change.length;i++)t.Event_Change[i].Fire()}))}))};TextAreaCtrl.prototype.Event_Focus_Setup=function(n){var t=this._GetCxRichTextElement(),i;if(!t){_fnHiddenTextAreaFocusSetup.call(this,n);return}i=this;this.Event_Focus=new CtrlEvent(this,function(){t._matrixCxRichTextFocusWired||(t._matrixCxRichTextFocusWired=!0,t.addEventListener("cx-rich-text-focus",function(){i.Event_Focus.Fire()}))})};TextAreaCtrl.prototype.Event_Blur_Setup=function(n){var t=this._GetCxRichTextElement(),i;if(!t){_fnHiddenTextAreaBlurSetup.call(this,n);return}i=this;this.Event_Blur=new CtrlEvent(this,function(){t._matrixCxRichTextBlurWired||(t._matrixCxRichTextBlurWired=!0,t.addEventListener("cx-rich-text-blur",function(){i.Event_Blur.Fire()}))})};TextAreaCtrl.prototype.Event_BlurAdv_Setup=function(n){var t=this._GetCxRichTextElement(),i;if(!t){_fnHiddenTextAreaBlurAdvSetup.call(this,n);return}i=this;this.moBlurAdvChangeOption=Utils.GetOptions(n);this.Event_BlurAdv=new CtrlEvent(this,function(){t._matrixCxRichTextBlurAdvWired||(t._matrixCxRichTextBlurAdvWired=!0,t.addEventListener("cx-rich-text-blur",function(n){i._InternalBlurAdvWcEvent(n)}))})};TextAreaCtrl.prototype._InternalBlurAdvWcEvent=function(n,t){var r,i;window.clearTimeout(this.miEventBlurAdvDeferredID);r=0;r=t?t:this.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CHECK_STATE_DELAY]!=null?parseInt(this.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CHECK_STATE_DELAY]):BlurAdvEvent.Const.STATE_CHECK_TIMEOUT;r<=0?this.Event_BlurAdv.Fire():(t||$E(this.msControlID).attr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE,"1"),i=this,this.miEventBlurAdvDeferredID=setTimeout(function(){var n,t;Matrix3.mbEvent?i._InternalBlurAdvWcEvent(null,50):(n=$E(i.msControlID),n.attr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE)=="1"&&(n.removeAttr(BlurAdvEvent.Const.ATTR_TO_CHECK_STATE),t=i.moBlurAdvChangeOption[BlurAdvEvent.Const.OPTION_CLASS],(!t||n.hasClass(t))&&(i.Event_BlurAdv.Fire(),t&&n.removeClass(t))))},r))};TextAreaCtrl.prototype.Event_Click_Setup=function(n){var t=this._GetCxRichTextElement(),i;if(!t){_fnHiddenTextAreaClickSetup.call(this,n);return}i=this;this.Event_Click||(this.Event_Click=[]);this.Event_Click.push(new CtrlEvent(this,function(){t._matrixCxRichTextClickWired||(t._matrixCxRichTextClickWired=!0,t.addEventListener("cx-rich-text-click",function(){for(var n=0;n<i.Event_Click.length;n++)i.Event_Click[n].Fire()}))}))};TextAreaCtrl.prototype._GetCxRichTextElement=function(){return document.querySelector(WysiwygManager.Const.WEB_COMPONENT_NAME+"["+WysiwygManager.Const.WEB_COMPONENT_WYSIWYG_ID_ATTR+'="'+this.msControlID+'"]')};TextAreaCtrl.prototype.Event_CxRichTextFileDrop_Setup=function(){var t=this,n=this._GetCxRichTextElement();n&&(this.Event_CxRichTextFileDrop=new CtrlEvent(this,function(){n._matrixCxRichTextFileDropWired||(n._matrixCxRichTextFileDropWired=!0,n.addEventListener("cx-rich-text-image-drop",function(n){var i=n.detail&&n.detail.files?n.detail.files:[];i.length&&t.Event_CxRichTextFileDrop.Fire()}))}))};TextBoxCtrl.Const={CONTROL_NAME:"TextBox",CLASS_DESC:"Desc"};TextBoxCtrl.prototype={SetValue:function(n,t){var i=$E(this.msControlID).val();i!==n&&($E(this.msControlID).val(n),this.Event_Change&&!t&&this.Event_Change.forEach(function(n){n.Fire()}))},SetDescription:function(n){var t=$($PI(this.msControlID)).find("."+TextBoxCtrl.Const.CLASS_DESC);t.length>0&&t.html(n);$PI(this.msControlID).RecalculatePosition()},Action_SetValue:function(n){this.SetValue(n)}};TextBoxCtrl.HandleNumericInputWheelEvent=function(){$(document).on("focus","input[type=number]",function(){$(this).on("wheel.disableScroll",function(n){n.stopPropagation()})});$(document).on("blur","input[type=number]",function(){$(this).off("wheel.disableScroll")})};Utils.Augment(TextBoxCtrl,MatrixEventProperties);Utils.Augment(TextBoxCtrl,DragProperties);Utils.Augment(TextBoxCtrl,DropProperties);Utils.Augment(TextBoxCtrl,SelectionProperties);Utils.Augment(TextBoxCtrl,ClipboardProperties);Utils.Augment(TextBoxCtrl,InPlaceEditorProperties);Utils.Augment(TextBoxCtrl,ClassProperties);Utils.Augment(TextBoxCtrl,FocusProperties);Utils.Augment(TextBoxCtrl,RequiredProperties);
216Utils.Augment(TextBoxCtrl,CommandProperties);Utils.Augment(TextBoxCtrl,ChangeEvent);Utils.Augment(TextBoxCtrl,ClickEvent);Utils.Augment(TextBoxCtrl,ControlKeyboardEvent);Utils.Augment(TextBoxCtrl,BlurEvent);Utils.Augment(TextBoxCtrl,BlurAdvEvent);Utils.Augment(TextBoxCtrl,FocusEvent);Utils.Augment(TextBoxCtrl,ClearAction);Utils.Augment(TextBoxCtrl,ParamValueUpdateAction);TextBoxPasswordCtrl.Const={CONTROL_NAME:"TextBoxPassword"};Utils.Augment(TextBoxPasswordCtrl,MatrixEventProperties);Utils.Augment(TextBoxPasswordCtrl,ChangeEvent);Utils.Augment(TextBoxPasswordCtrl,FocusProperties);Utils.Augment(TextBoxPasswordCtrl,RequiredProperties);Utils.Augment(TextBoxPasswordCtrl,ParamValueUpdateAction);TimeCtrl.Const={CONTROL_NAME:"Time",MODE_ASCENDANT:"ascendant",MODE_DESCENDANT:"descendant",DISPLAY_PROGRESS_BAR:"progressbar",SUFFIX_PROGRESS_BAR:"_ProgressBar",SUFFIX_INNER_PROGRESS_BAR:"_InnerProgressBar",SUFFIX_TIME:"_Time"};TimeCtrl.prototype={Setup:function(n,t,i,r){var u,f;this.miTime=parseInt(n);this.msTimeMode=t;this.msTimeDisplay=i;this.miTotalTime=parseInt(r);u=6e4;this.miTotalTime!=0&&(f=this,window.setInterval(function(){f.ChangeTime()},u))},ChangeTime:function(){var n,i,t;this.msTimeDisplay==TimeCtrl.Const.DISPLAY_PROGRESS_BAR?(n=this.miTime*100/this.miTotalTime,i=Math.abs(Math.floor(this.miTime/this.miTotalTime)),this.miTime++,t=Math.abs(Math.floor(this.miTime/this.miTotalTime)),n>100&&(n=t>3?100:n%100),n==0&&(n=100),n==100&&t<=3&&($RemoveClass(this.msID+TimeCtrl.Const.SUFFIX_PROGRESS_BAR,"x"+i+"Class"),$AddClass(this.msID+TimeCtrl.Const.SUFFIX_PROGRESS_BAR,"x"+t+"Class"),n=0),$SetStyle(this.msID+TimeCtrl.Const.SUFFIX_INNER_PROGRESS_BAR,"width",n+"%")):this.msTimeMode==TimeCtrl.Const.MODE_ASCENDANT?(this.miTime+=1,this.FormatTime()):(this.miTime-=1,this.FormatTime())},FormatTime:function(){$Elt(this.msID+TimeCtrl.Const.SUFFIX_TIME).innerHTML=Math.floor(this.miTime/60)+"h"+Math.abs(this.miTime%60)+"m"}};UploadCtrl.Const={CONTROL_NAME:"Upload",SUFFIX_IFRAME:"_Iframe",SUFFIX_UPLOAD_FILE:"_UploadFile",SUFFIX_NAME:"_Name",SUFFIX_PATH:"_Path",SUFFIX_FORM:"_Form",SUFFIX_CANCEL:"_Cancel",CLASS_IFRAME_CLOSED:"IframeClosedClass",STATE_NOFILE:"0",STATE_INPROGRESS:"1",STATE_COMPLETED:"2",UPLOAD_URL:"C.aspx?VP3=Upload",URL_FILE:"File",URL_PARENT_CONTROL_ID:"ParentControlID",URL_ALLOWED_EXTENSIONS:"ae",PARAM_PARENT_CONTROL_ID:"ParentControlID",PARAM_PATH:"Path"};UploadCtrl.miUploadInProgress=0;UploadCtrl.prototype={Setup:function(n,t){this.msAllowedExtensions=n;this.mbIsFrontEnd=t;Utils.AddEvent($Elt(this.msID+UploadCtrl.Const.SUFFIX_CANCEL),"click",this.Cancel,this)},Cancel:function(){$Elt(this.msID+UploadCtrl.Const.SUFFIX_IFRAME).src=UploadCtrl.Const.UPLOAD_URL+"&"+UploadCtrl.Const.URL_PARENT_CONTROL_ID+"="+this.msID+"&r="+Math.random()+"&"+UploadCtrl.Const.URL_ALLOWED_EXTENSIONS+"="+this.msAllowedExtensions+"&fe="+this.mbIsFrontEnd}};UploadFieldCtrl.Const={CONTROL_NAME:"UploadField",SUFFIX_LOADING:"_Loading",SUFFIX_ALLOWED_EXTENSIONS:"_AllowedExtensions"};UploadFieldCtrl.prototype={Setup:function(n,t){Utils.AddEvent(this.msID,"change",this.UploadFile,this);this.msParentControlID=n;this.msAllowedExtensions=t},UploadFile:function(){var i=Utils.Trim($Elt(this.msID).value),n,t,r,u;if(i!=""){if(Utils.Trim(this.msAllowedExtensions)!=""){if(n=this.msAllowedExtensions.replace(/,/g,"|\\."),n=n.replace(/ /g,""),t=$Elt(this.msID+UploadFieldCtrl.Const.SUFFIX_ALLOWED_EXTENSIONS),r=new RegExp("^.*(\\."+n+")$"),!r.test(i.toLowerCase())){$Elt(this.msID).value="";Utils.IsIE()?alert("This type of file is not accepted. Allowed extensions: "+this.msAllowedExtensions):($AddClass(t,StyleMgr.Const.CLASS_WARNING),Effect.Pulse(t,.3,!1));return}$AddClass(t.id,StyleMgr.Const.CLASS_INVISIBLE)}parent.UploadCtrl.miUploadInProgress++;$AddClass(this.msID,StyleMgr.Const.CLASS_INVISIBLE);parent.$AddClass(this.msParentControlID+UploadCtrl.Const.SUFFIX_IFRAME,UploadCtrl.Const.CLASS_IFRAME_CLOSED);parent.$RemoveClass(this.msParentControlID+UploadFieldCtrl.Const.SUFFIX_LOADING,StyleMgr.Const.CLASS_INVISIBLE);parent.$RemoveClass(this.msParentControlID+UploadCtrl.Const.SUFFIX_CANCEL,StyleMgr.Const.CLASS_INVISIBLE);u=this.msID.split(Matrix3.Const.SEPARATOR_CONTROL)[0];parent.$Control(this.msParentControlID,UploadCtrl.Const.CONTROL_NAME).Event_UploadStarted.Fire();Matrix3.DoPostBack(u,"UPLOAD")}}};VideoCtrl.Const={CONTROL_NAME:"Video",SUFFIX_MOVIE:"_Video",VIDEO_MUTED_KEY:"VideoMuted",VIDEO_VOLUME_KEY:"VideoVolume"};
216VideoCtrl.prototype={Setup:function(n,t,i,r,u,f,e){var h,v,s,o,y,c,l,a;if($Elt(this.msID)!=null){if(t==""&&(t="100%"),i==""&&(i="100%"),this.mdStartPoint=f,this.mdEndPoint=e,this.sWidth=t,this.sHeight=i,this.sSource=n,this.flashvars={width:"100%",height:"100%",start:Math.round(f).toString()},h=this.sSource.indexOf("?"),h!==-1)for(v=this.sSource.substring(h+1),this.sSource=this.sSource.substring(0,h),s=v.split("&"),o=0,y=s.length;o<y;o++)c=s[o].indexOf("="),c!==-1?this.flashvars[s[o].substring(0,c)]=decodeURIComponent(s[o].substring(c+1)):this.flashvars[s[o]]="";l=this.msID+FlashCtrl.Const.SUFFIX_MOVIE;this.params={allowfullscreen:"true",allowscriptaccess:"always"};u||(this.params.wmode="transparent");this.attributes={id:l,name:l};a=document.createElement("div");a.setAttribute("id",l);$Elt(this.msID).appendChild(a)}},SetCommandsVFormID:function(n,t){this.CommandsVFormID=t},ClearSubtitleTracks:function(){this.subtitles=[]},ApplySubtitleTracks:function(n,t){var h,r,f,e,s,u,i,o;if((typeof n=="string"||n instanceof String)&&(n=JSON.parse(n)),this.subtitles=[],h=n.MediaIdentifier,r=GetHtml5Player(h,t),$(r).hasClass("video-js"))$(r).attr("cap_tracks",JSON.stringify(n));else if(f=n.Captions,e=[],typeof r!="undefined"){s=$("track",$(r));s.length>0&&s.each(function(n,t){e.push($(t).attr("captionId"))});for(i in f)(e.length===0||e.indexOf(i)===-1)&&(u=document.createElement("track"),u.kind="captions",u.label=f[i].label,u.src=f[i].uri,u.setAttribute("captionId",i),r.appendChild(u),typeof u!="undefined"&&u.addEventListener("load",function(){this.mode="showing";typeof r.textTracks[0]!="undefined"&&(r.textTracks[0].mode="showing")}))}else if(typeof this.flashvars!="undefined"){this.subtitles=[];this.subtitlesMap={};for(i in f)this.subtitlesMap[i]={},this.subtitlesMap[i].label=f[i].label,this.subtitlesMap[i].url=f[i].uri,o={},o.file=this.subtitlesMap[i].url,o.label=this.subtitlesMap[i].label,this.subtitles.push(o);this.flashvars.tracks=this.subtitles}},AddVariable:function(n,t){this.flashvars[n]=t},Start:function(){}};VideoCtrl.InitPlayBothVideoButtonOnTopLevelPopup=function(n,t){var s=Utils.GetTopLevelPopup(),h=$('[id="'+s+'"]'),e=n||[],u={},c,r,i,f,o,l;for(c in e)u[e[c]]=!0;if(t||(t=s),r=Matrix3.FindAndUseBindableElement(t,"MediaEventHub"),i=$(".PlayBothBtn",h),i.addClass("Disabled"),f=function(){var t=!0,r=!0,f,n;for(f in u)u[f]?r=!1:t=!1;t?(i.removeClass("Pause"),i.addClass("Play"),n=$("i",i),n.removeClass("fa-pause"),n.addClass("fa-play")):r&&(i.removeClass("Play"),i.addClass("Pause"),n=$("i",i),n.removeClass("fa-play"),n.addClass("fa-pause"))},o=e.map(function(n){return{ID:n,Player:GetHtml5Player(n,s)}}),o.forEach(function(n){var i=n.ID,t=n.Player;if(t){$(t).on("ended",function(){u[i]=!0;f()});$(t).on("pause",function(){u[i]=!0;f()});$(t).on("play",function(){u[i]=!1;f()})}}),l=setInterval(function(){$(".VideoPoster:visible",h).length===0&&(i.off("click").click(function(){$(this).hasClass("Play")?(o.forEach(function(n){n.Player&&(typeof n.Player.paused=="undefined"||n.Player.paused)&&n.Player.play()}),r&&e.forEach(function(n){r.fire({type:"play",mediaID:n})})):$(this).hasClass("Pause")&&(o.forEach(function(n){n.Player&&(typeof n.Player.paused=="undefined"||n.Player.paused)&&n.Player.pause()}),r&&e.forEach(function(n){r.fire({type:"pause",mediaID:n})}));f()}),clearInterval(l),o.forEach(function(n){n.Player&&!n.Player.paused&&n.Player.pause()}),r&&e.forEach(function(n){r.fire({type:"pause",mediaID:n})}),f(),i.removeClass("Disabled"))},100),r)r.onFired(function(n){switch(n.type){case"played":u[n.mediaID]=!1;f();break;case"paused":u[n.mediaID]=!0;f()}})};WebComponentCtrl.moRegisteredProperties={};WebComponentCtrl.moRegisteredInitializationScripts={};WebComponentCtrl.Const={CONTROL_NAME:"WebComponent",CLASS_INITIALIZED:"Initialized"};WebComponentCtrl.prototype={PreserveProperties:function(n){this.moPreservedProperties=n?n:[]}};WebComponentCtrl.ExecuteWhenUpdateComplete=function(n,t){customElements.upgrade(n);var i=function(){if(typeof n.updateComplete=="undefined"){setTimeout(i,100);return}n.updateComplete.then(t)};i()};WebComponentCtrl.PreProcessNodeProperties=function(n,t){var u=n.tagName.toLowerCase(),i,r;switch(u){case"cx-input":i=t.mask;i&&typeof i=="string"&&i.includes("%")&&(r=t.maskBlocks||{},r["%"]||(r["%"]={repeat:Infinity,mask:new RegExp("^[a-zA-Z0-9_-]+$")}),t.maskBlocks=r)}};WebComponentCtrl.ApplyRegisteredProperties=function(n){var t,r,i;n=n||document;for(t in WebComponentCtrl.moRegisteredProperties){var u=WebComponentCtrl.moRegisteredProperties[t],r=WebComponentCtrl.moRegisteredInitializationScripts[t],i=$(n).find("[id='"+t+"']")[0]||$(document).find("[id='"+t+"']")[0];i&&function(n,t,i,r){var f,u;WebComponentCtrl.PreProcessNodeProperties(n,t);for(f in t)u=t[f],typeof u!="undefined"&&u!==null&&(n[f]=u);WebComponentCtrl.ExecuteWhenUpdateComplete(n,function(){var f,u,e;for(f in t)u=t[f],typeof u!="undefined"&&u!==null&&(n[f]=u);if(r)try{e="(function() { var __node__ = document.getElementById('"+i+"'); "+r+" })();";Utils.EvalScripts(e)}catch(o){console.error("Error executing WebComponent initialization script for "+i+":",o)}})}(i,u,t,r)}for(t in WebComponentCtrl.moRegisteredInitializationScripts)WebComponentCtrl.moRegisteredProperties[t]||(r=WebComponentCtrl.moRegisteredInitializationScripts[t],i=$(n).find("[id='"+t+"']")[0]||$(document).find("[id='"+t+"']")[0],i&&r)&&function(n,t,i){WebComponentCtrl.ExecuteWhenUpdateComplete(n,function(){try{var n="(function() { var __node__ = document.getElementById('"+t+"'); "+i+" })();";Utils.EvalScripts(n)}catch(r){console.error("Error executing WebComponent initialization script for "+t+":",r)}})}(i,t,r);WebComponentCtrl.moRegisteredProperties={};WebComponentCtrl.moRegisteredInitializationScripts={}};WebComponentCtrl.RegisterProperties=function(n,t){n&&t&&(WebComponentCtrl.moRegisteredProperties[n]=t)};WebComponentCtrl.RegisterInitializationScript=function(n,t){n&&t&&(WebComponentCtrl.moRegisteredInitializationScripts[n]=t)};WebComponentCtrl.GetPreservedProperties=function(n){var t=$Control(n,WebComponentCtrl.Const.CONTROL_NAME);return t?t.moPreservedProperties?t.moPreservedProperties:[]:[]};WebComponentCtrl.ResizeObserver=new ResizeObserver(function(n){for(var i,t=0;t<n.length;t++)i=n[t],setTimeout(function(n){return function(){var i,t,r;if(n.target.moParent){if(n.target.moParent.matches&&n.target.moParent.matches("[style*='display: none'] *"))return;var o=n.target.moParent.miWidth,s=n.target.moParent.miHeight,u=0,f=0,e=n.target.moParent.shadowRoot.children;for(i=0;i<e.length;i++)u=Math.max(u,e[i].offsetLeft+e[i].offsetWidth),f=Math.max(f,e[i].offsetTop+e[i].offsetHeight);if(t=n.target.moParent.GetContainerForChildren(),t&&t.length>0)for(r=0;r<t.length;r++)u=Math.max(u,t[r].offsetLeft+t[r].offsetWidth),f=Math.max(f,t[r].offsetTop+t[r].offsetHeight);if(Math.abs(o-u)<=1&&Math.abs(s-f)<=1)return;n.target.moParent.ForceHasChanged();PositionMgr.GetInstance().AddToDirtyXList(n.target.moParent);PositionMgr.GetInstance().AddToDirtyYList(n.target.moParent);PositionMgr.CalculatePositionDebounced()}}}(i),0)});WebComponentCtrl.WrapperResizeObserver=new ResizeObserver(function(n){for(var i,t=0;t<n.length;t++)i=n[t],setTimeout(function(n){return function(){var t=n.target._wrapperPosItem,i,r;t&&(t.matches&&t.matches("[style*='display: none'] *")||(i=n.contentRect.width,r=n.contentRect.height,i<=0&&r<=0)||Math.abs(i-(n.target.__previousWidth||0))<=1&&Math.abs(r-(n.target.__previousHeight||0))<=1||(n.target.__previousWidth=i,n.target.__previousHeight=r,t.ForceHasChanged(),PositionMgr.GetInstance().AddToDirtyXList(t),PositionMgr.GetInstance().AddToDirtyYList(t),PositionMgr.CalculatePositionDebounced()))}}(i),0)});WebComponentCtrl.ObserveWrapperWithWebComponent=function(n,t){if(n&&n.msId&&t){var r=n.GetNode?n.GetNode():n,i=r.querySelector(t);i&&(i._wrapperPosItem=n,WebComponentCtrl.WrapperResizeObserver.observe(i),Matrix3.RegisterForCleanup(n.msId,"WebComponentWrapperResize",function(){WebComponentCtrl.WrapperResizeObserver.unobserve(i);i._wrapperPosItem=null}))}};WebComponentCtrl.PreFillNodePosition=function(n){var t=n.__id||n.getAttribute("__id")||n.id;t&&(PositionMgr.moNodesToSetPosition[t]={width:Math.ceil($(n).outerWidth()),height:Math.ceil($(n).outerHeight()),top:0,left:0})};WebComponentCtrl.Activate=function(n){var u,i,r,t;if(n.isConnected){if(!n.shadowRoot&&!n.hasUpdated){setTimeout(function(){WebComponentCtrl.Activate(n);n.ForceHasChanged();PositionMgr.GetInstance().AddToDirtyXList(n);PositionMgr.GetInstance().AddToDirtyYList(n);PositionMgr.CalculatePositionDebounced()},50);return}if(u=n.msId,!n.mbAutoWidth||!n.mbAutoHeight){if(i=[],n.shadowRoot&&n.shadowRoot.children)for(t=0;t<n.shadowRoot.children.length;t++)n.shadowRoot.children[t].moParent=n,i.push(n.shadowRoot.children[t]);if(r=n.GetContainerForChildren(),r&&r.length>0)for(t=0;t<r.length;t++)i.push(r[t]);for(t=0;t<i.length;t++)WebComponentCtrl.ResizeObserver.observe(i[t]);Matrix3.RegisterForCleanup(u,"WebComponentResizeObserver",function(){for(var n=0;n<i.length;n++)WebComponentCtrl.ResizeObserver.unobserve(i[n])})}n.updateComplete.then(function(){n.classList.add(WebComponentCtrl.Const.CLASS_INITIALIZED);n.ForceHasChanged();n.ForceHasChangedAllChildren();PositionMgr.GetInstance().AddToDirtyXList(n);PositionMgr.GetInstance().AddToDirtyYList(n);var t=function(n){var i=n.GetContainerForChildren(),r;if(i&&i.length>0)for(r=0;r<i.length;r++)PositionMgr.GetInstance().AddToDirtyXList(i[r]),PositionMgr.GetInstance().AddToDirtyYList(i[r]),t(i[r])};t(n);PositionMgr.CalculatePositionDebounced()})}};CMS.prototype={Start:function(){if(typeof CMSLoader!="undefined"){CMSLoader.Show();var n=this;this.Init(function(){n.UpdateMode();CMSLoader.Hide()})}},Init:function(n){var f=ControlMgr.GetInstance().GetReference(CMS.Const.FID_DEBUGJS_VFORM),i,r,t,u;if(f&&(this.msDebugJSVFormID=f.GetVFormId()),i=ControlMgr.GetInstance().GetReference(CMS.Const.FID_VFORM_EDIT_TOOLBAR),r=1,!i){if(r=100,!this.msDebugJSVFormID)throw"Unable to request to open edit toolbar due to missing DebugJS_VForm";Matrix3.AddEvent(this.msDebugJSVFormID,CMS.Const.EVENT_OPEN_EDIT_TOOLBAR,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT)}t=this;u=function(i){if(i||(i=ControlMgr.GetInstance().GetReference(CMS.Const.FID_VFORM_EDIT_TOOLBAR)),i){if(i)t.moEditToolbar=ne
216w CMSEditToolbarVForm(t,i);else return!1;t.UpdateStateFromParameterEditVForm();n()}else{if(r--<=0)throw"Unable to find edit toolbar reference";setTimeout(u,100)}};u(i)},Refresh:function(){this.UpdateStateFromParameterEditVForm();this.UpdateMode()},UpdateStateFromParameterEditVForm:function(){var n=ControlMgr.GetInstance().GetReference(CMS.Const.FID_VFORM_PARAMETER_EDIT);n&&(typeof CMSParameterEditVForm!="undefined"&&(this.moParameterEdit=new CMSParameterEditVForm(n,this.moEditToolbar)),this.moParameterEdit&&this.moParameterEdit!=null&&this.moEditToolbar.Hide());$(".ParameterEdit_VForm_Popup").length>0&&(this.moParameterEdit={},this.moEditToolbar.Hide())},UpdateMode:function(){if(this.moParameterEdit==null&&this.moEditToolbar){var t=!1,n=null;n=this.moEditToolbar.GetCurrentMode();n!=this.moCurrentMode&&typeof n!="undefined"&&n!=null&&(t=!0,this.moCurrentMode=n);t==!0&&(CMSMode.Clean(),this.moCurrentMode.Start(this))}},SwitchMode:function(n){this.moCurrentMode=n;this.Start()},StopMode:function(){CMSMode.Clean()},ResumeMode:function(){this.moParameterEdit=null;Matrix3.HasEventsInProgress()||this.Refresh()},ClosePopup:function(){this.moEditToolbar&&(this.moEditToolbar.Show(),(this.moCurrentMode instanceof CMSModePreview==!0||this.moCurrentMode instanceof CMSModeMaintenance==!0)&&this.moCurrentMode.InstallVUCButtons())},OpenHelpPopup:function(n){if(this.msDebugJSVFormID)[][0]=n,Matrix3.AddEvent(this.msDebugJSVFormID,CMS.Const.EVENT_OPEN_HELP_POPUP,Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,escape(n))},RerenderVUCButtons:function(n){var t=this,r=function(){$(".context-menu-list").size()==0&&$(".ui-menu.ui-widget.ui-widget-content.ui-autocomplete").find(":visible").size()==0&&(typeof CMSModePreview!="undefined"&&t.moCurrentMode instanceof CMSModePreview==!0||typeof CMSModeMaintenance!="undefined"&&t.moCurrentMode instanceof CMSModeMaintenance==!0)&&t.moCurrentMode.InstallVUCButtons()},i;typeof CMSParameters!="undefined"&&(i=$("."+CMSParameters.VUCButton.global_class),i.length>0&&$.each(i,function(){$(this).unbind();$(this).remove()}));this.moRenderedVFormVUCs.clear();this.moVUCAbsolutePositions=[];n&&window.requestAnimationFrame?window.requestAnimationFrame(r):r()}};
216CMS.Const={EVENT_SWITCH_TO_EDIT_MODE:"SWITCH_TO_EDIT_MODE",EVENT_EXIT_EDIT_MODE:"EXIT_EDIT_MODE",EVENT_OPEN_EDIT_TOOLBAR:"OPEN_CMS_EDIT_TOOLBAR_VFORM",EVENT_OPEN_HELP_POPUP:"OPEN_PARAM_HELP_POPUP",FID_VFORM_EDIT_TOOLBAR:"VFormEditToolbar_VForm",FID_VFORM_PARAMETER_EDIT:"ParameterEditVForm",FID_DEBUGJS_VFORM:"DebugJSOpenButton"};CMSMode.prototype.Start=function(n){this.moCMS=n;this.SpecificStart()};CMSMode.prototype.SpecificStart=function(){};CMSMode.prototype.InstallCanvas=function(){if(this.mbCanvasMode=!0,this.CanvasRefreshParameters()===!0){var n=$(document);this.moCanvas=$('<canvas style="z-index: '+CMSParameters.canvas["z-index"]+';" id="'+CMSParameters.canvas.id+'" width="'+n.width()+'px" height="'+n.height()+'px"><\/canvas>');$("body").append(this.moCanvas);this.InstallCanvasEvents()}};CMSMode.prototype.CanvasRefreshParameters=function(){var h,e,t,r,u,c,o,l,i;this.moElts={};this.moEltsParams={};this.moEltsPI={};this.moEltsHTMLDocPosition={};this.moEltsTreeLinks={};e=!1;r=!0;for(u in Matrix3.moPopupTable)if(u!=this.moCMS.moEditToolbar.msId)if(c=$E(u),c.hasClass(CMSParameters.notEditablePopupClass)===!0){r=!1;break}else e=!0,t=u;if(r===!0)for(h=e==!0&&t&&typeof t=="string"&&t!=""&&t!=this.moCMS.moEditToolbar.msId?$E(t):$("body"),o=$(".VF, .CT, .PanelCol",h),l=o.length,i=0;i<l;i++){var f=$(o[i]),n=CMSUtils.GetForceID(f),s=$PI(n);typeof n!="undefined"&&n&&typeof s!="undefined"&&s&&CMSUtils.InArray(n,this.moEltsNoEditable)=="-1"&&CMSUtils.IsVisible(f)==!0&&(this.moElts[n]=f,this.moEltsPI[n]=s,this.moEltsHTMLDocPosition[n]=i,this.ConstructTreeLinksObject(f,n),this.moEltsParams[n]={},this.RefreshParams(n),this.miNbElts++)}else CMSMode.Clean();return r};CMSMode.prototype.ConstructTreeLinksObject=function(n,t){var r=n.parent(),i=null;r&&(i=CMSUtils.GetID(r));this.moEltsTreeLinks[t]?(this.moEltsTreeLinks[t].parent=i,this.moEltsTreeLinks[t].children||(this.moEltsTreeLinks[t].children=[])):this.moEltsTreeLinks[t]={parent:i,children:[]};this.moEltsTreeLinks[i]?this.moEltsTreeLinks[i].children.push(t):this.moEltsTreeLinks[i]={parent:null,children:[t]}};CMSMode.prototype.InstallAnchors=function(){for(sEltId in this.moEltsPI)this.moEltsPI[sEltId].msCtrlType==PositionItem.Const.CONTROL_TYPE_ANCHOR&&(this.moAnchors[sEltId]=new CMSAnchor(this,sEltId))};CMSMode.prototype.InstallCanvasEvents=function(){this.InstallWindowResizeEvent();this.InstallCanvasHoverEvent();this.InstallCanvasClickEvent();this.InstallCanvasScrollEvent()};CMSMode.prototype.ReinstallCanvasEvents=function(){for(var t=this.moListEventsUnbinded.length,n=0;n<t;n++)switch(this.moListEventsUnbinded[n]){case"mousemove":this.InstallCanvasHoverEvent();this.msLastEltIDHovered=null;break;case"click":this.InstallCanvasClickEvent();break;case"mousewheel":this.InstallCanvasScrollEvent()}this.moListEventsUnbinded=[]};CMSMode.prototype.UnbindCanvasEvents=function(n,t,i){n==!1&&CMSUtils.InArray("mousemove",this.moListEventsUnbinded)=="-1"&&(this.moCanvas.unbind("mousemove"),this.moListEventsUnbinded.push("mousemove"));t==!1&&CMSUtils.InArray("click",this.moListEventsUnbinded)=="-1"&&(this.moCanvas.unbind("click"),this.moCanvas.unbind("mousedown"),this.moCanvas.unbind("mouseup"),this.moCanvas.unbind("dblclick"),this.moListEventsUnbinded.push("click"));i==!1&&CMSUtils.InArray("mousewheel",this.moListEventsUnbinded)=="-1"&&(this.moCanvas.unbind("mousewheel"),this.moListEventsUnbinded.push("mousewheel"))};CMSMode.prototype.InstallWindowResizeEvent=function(){var n=this;$(window).bind("resize",function(){typeof CMSLoader!="undefined"&&(n.UnbindCanvasEvents(),CMSLoader.Show(),n.CanvasRefreshParameters(),n.ReinstallCanvasEvents(),CMSLoader.Hide())})};CMSMode.prototype.InstallCanvasHoverEvent=function(){if(!this.mbCanvasMode)return!1;this.PreInstallCanvasHoverEvent();var n=this;this.moCanvas.bind("mousemove",function(t){var i;if(n.PreSpecificMouseMoveHandler(t),!this.mbDragging){var r=t.pageX,u=t.pageY,f=n.GetScrollableElementUnderMouse(t);n.moListEltsIDHovered=[];for(i in n.moEltsParams)(i==f||CMSUtils.EltPositionMatch(n.moEltsParams[i],r,u))&&n.moListEltsIDHovered.push(i);n.SortEltsByDeep(n.moListEltsIDHovered);n.msLastEltIDHovered=n.GetVisibleEltWithMaxDeep(n.moListEltsIDHovered,r,u)}n.PostSpecificMouseMoveHandler(t)});this.PostInstallCanvasHoverEvent()};CMSMode.prototype.PreInstallCanvasHoverEvent=function(){};CMSMode.prototype.PostInstallCanvasHoverEvent=function(){};CMSMode.prototype.PreSpecificMouseMoveHandler=function(){};CMSMode.prototype.PostSpecificMouseMoveHandler=function(){};CMSMode.prototype.InstallCanvasClickEvent=function(n){if(!this.mbCanvasMode)return!1;(typeof n=="undefined"||n==null||n==!1)&&(n=!1);this.PreInstallCanvasClickEvent();var t=this;this.moCanvas.bind("click",function(){t.SelectItem(t.msLastEltIDHovered)});this.moCanvas.bind("mousedown",function(n){t.SpecificMouseDownHandler(n)});this.moCanvas.bind("mouseup",function(n){t.SpecificMouseUpHandler(n)});this.moCanvas.bind("dblclick",function(){t.EditSelectedControlProperties()});this.PostInstallCanvasClickEvent();this.InstallCanvasPyramidClickEvent()};CMSMode.prototype.PreInstallCanvasClickEvent=function(){};CMSMode.prototype.PostInstallCanvasClickEvent=function(){};CMSMode.prototype.SpecificMouseDownHandler=function(){};CMSMode.prototype.SpecificMouseUpHandler=function(){};CMSMode.prototype.SelectItem=function(n){this.PreSpecificSelectItem(n);this.moListEltsIDSelected=[];
216n!="undefined"&&n!=null&&(this.moListEltsIDSelected.push(n),this.RefreshDependenciesCurves());this.SpecificSelectItem(n)};CMSMode.prototype.PreSpecificSelectItem=function(){};CMSMode.prototype.SpecificSelectItem=function(){};CMSMode.prototype.EditSelectedControlProperties=function(n){var r=null,o=null,u,f,t,i;if(typeof n=="string"&&n!=""?(r=this.moEltsPI[n],o=n):(r=this.moEltsPI[this.msLastEltIDHovered],o=this.msLastEltIDHovered),r&&r!==null){if(u=r.GetVFormId(),this.moElts[o].hasClass("VF")==!0&&(u=r.GetId()),f=$PI(u),f&&f!=null){for(t=f,i=t.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS);(!i||i==null)&&t&&t!=null;)t=t.moParent,t&&t!=null&&(i=t.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS),!i&&t.classList.contains(Popup.Const.CONTAINER_CLASS)&&t.classList.forEach(function(n){var r=n.indexOf(Popup.Const.CONTAINER_CLASS),t;r>0&&(t=n.substr(0,r),t&&(i=t))}));i==null&&(i=ControlMgr.GetInstance().moRootPositionItem.GetProperty(Matrix3.Const.VFORM_PROPERTY_SKIN_FAMILY_ALIAS))}var s=u+"|"+Matrix3.GetVFormInfoItem(u).GetSubID()+"|"+i+"|",e=r.GetIdWithoutVFormId(),h=$(r).attr("data-opn");h&&(e=h);e&&e!=null&&(s+=".Elements."+e);CMSMode.Clean();Matrix3.AddEvent(this.moCMS.moEditToolbar.msId,"EDIT_PROPERTIES",Matrix3.Const.RETURNTYPE_VIEWSTATE,Matrix3.Const.DELAY_IMMEDIAT,s)}};CMSMode.prototype.RefreshDependenciesCurves=function(){this.CleanDependencies();for(var n=0;n<this.moListEltsIDSelected.length;n++)this.ConstructDependenciesOf(this.moListEltsIDSelected[n])};CMSMode.prototype.ConstructDependenciesOf=function(n,t){var r=this.moEltsPI[n],i;if(r.moQuickXSource&&r.moQuickXSource!=null&&this.ConstructDependency("X",n,r.moQuickXSource),r.moQuickYSource&&r.moQuickYSource!=null&&this.ConstructDependency("Y",n,r.moQuickYSource),!t)for(i in this.moEltsPI)this.moEltsPI[i].moQuickXSource&&this.moEltsPI[i].moQuickXSource.moSource.msId==n&&this.ConstructDependenciesOf(i,!0),this.moEltsPI[i].moQuickYSource&&this.moEltsPI[i].moQuickYSource.moSource.msId==n&&this.ConstructDependenciesOf(i,!0)};CMSMode.prototype.ConstructDependency=function(n,t,i){this.moDependencies[t+"_"+n]||(this.moDependencies[t+"_"+n]=new CMSDependency(this,i,t))};CMSMode.prototype.CleanDependencies=function(){for(var n in this.moDependencies)this.moDependencies[n].Destroy();delete this.moDependencies;this.moDependencies={}};CMSMode.prototype.InstallCanvasScrollEvent=function(){var n=this;this.moCanvas.bind("mousewheel",function(t,i){var u=n.GetScrollableElementUnderMouse(),r,f;n.moCanvas.scrollTop(0);u?(r=n.moElts[u],r&&(r.scrollTop(r.scrollTop()-i*150),n.RefreshParamsForChildrenOf(u))):(f=$(Utils.Form1()),f.scrollTop(f.scrollTop()-i*150),n.RefreshAllParamsStructures())})};CMSMode.prototype.InstallPyramid=function(){if(!this.mbCanvasMode)return!1;this.PreInstallPyramid();this.moPyramid=new CMSPyramid(this);this.moPyramid.Update(this.moListEltsIDHovered);var n=this;$("#"+this.moPyramid.GetID()).draggable({containment:"window",scroll:!1,start:function(){n.UnbindCanvasEvents()},stop:function(){n.ReinstallCanvasEvents()}});this.PostInstallPyramid()};CMSMode.prototype.PreInstallPyramid=function(){};CMSMode.prototype.PostInstallPyramid=function(){};CMSMode.prototype.InstallCanvasPyramidClickEvent=function(){var n=this;this.moCanvas.bind("click",function(){n.moPyramid!=null&&(n.moPyramid.Update(n.moListEltsIDHovered),n.moPyramid.HighLight(n.msLastEltIDHovered))})};CMSMode.prototype.GetEltWithMaxDeep=function(n){for(var i,f=this,r=0,u=n[0],e=n.length,t=0;t<e;t++)i=f.moEltsPI[n[t]].GetDeep(),i>r&&(u=n[t],r=i);return u};CMSMode.prototype.GetVisibleEltWithMaxDeep=function(n,t,i){var r,u,f;if(!n||n.length===0)return null;var s=this,e=0,o=n[0],h=n.length;for(r=0;r<h;r++)u=s.moEltsPI[n[r]],f=u.GetDeep(),f>e&&CMSUtils.IsVisible2(u,t,i)&&(o=n[r],e=f);return o};CMSMode.prototype.SortEltsByDeep=function(n){var t=this;n.sort(function(n,i){var r=t.moEltsPI[n].GetDeep(),u=t.moEltsPI[i].GetDeep();return u-r})};CMSMode.prototype.GetElt=function(n){return this.moElts[n]};CMSMode.prototype.GetEltParams=function(n){return this.moEltsParams[n]};CMSMode.prototype.GetLastEltHovered=function(){return this.msLastEltIDHovered!=null?this.moElts[this.msLastEltIDHovered]:null};CMSMode.prototype.GetLastEltIDHovered=function(){return this.msLastEltIDHovered};CMSMode.prototype.GetListEltsIDHovered=function(){return this.moListEltsIDHovered};CMSMode.prototype.GetListEltHovered=function(){for(var t={},i=this.moListEltsIDHovered.length,n=0;n<i;n++)t[this.moListEltsIDHovered[n]]=this.GetElt(this.moListEltsIDHovered[n]);return t};CMSMode.prototype.GetScrollableElementUnderMouse=function(n){var t=[],e,o,r,u,s,i,h,f;if(n){e=n.pageX;o=n.pageY;for(r in this.moEltsParams)CMSUtils.EltPositionMatch(this.moEltsParams[r],e,o)&&t.push(r);u=this.GetEltWithMaxDeep(t);this.SortEltsByDeep(t)}else t=this.moListEltsIDHovered,u=this.msLastEltIDHovered;if(u){for(i=0,h=t.length;i<h;i++)if(f=this.moEltsPI[t[i]],f.IsScrollable()==!0&&this.moElts[f.msId].css("overflow")!="hidden"){s=t[i];break}return s}return null};CMSMode.prototype.GetScrollableValueUnderMouse=function(n){var t=[],f,e,r,u,
216i,o;if(n){f=n.pageX;e=n.pageY;for(r in this.moEltsParams)CMSUtils.EltPositionMatch(this.moEltsParams[r],f,e)&&t.push(r);this.SortEltsByDeep(t)}else t=this.moListEltsIDHovered;for(u=0,i=0,o=t.length;i<o;i++)u+=this.moElts[t[i]].scrollTop();return u};CMSMode.prototype.RefreshParams=function(n){if(this.moElts[n]){var t=this.moElts[n],u=t.width(),f=t.height(),e=t.offset(),i=e.top,r=e.left,o=i+f,s=r+u,c=Math.round(r+(s-r)/2),l=Math.round(i+(o-i)/2),h="CT";t.hasClass("VF")&&(h="VF");this.moEltsParams[n]={type:h,top:i,bottom:o,left:r,right:s,width:u,height:f,horizontalCenter:c,verticalCenter:l}}};CMSMode.prototype.RefreshParamsForChildrenOf=function(n){var i,r,t;if(this.moElts[n])for(i=this.moEltsTreeLinks[n].children,r=i.length,t=0;t<r;t++)this.RefreshParams(i[t]),this.RefreshParamsForChildrenOf(i[t])};CMSMode.prototype.RefreshAllParamsStructures=function(){for(var n in this.moEltsParams)this.RefreshParams(n)};CMSMode.prototype.GetSelectedEltScrollTop=function(){var t=0,i,n;if(this.moListEltsIDSelected.length==1)for(i=$PI(this.moListEltsIDSelected[0]),n=i.moParent;n;)t+=n.scrollTop,n=n.moParent;return t};CMSMode.prototype.GetCanvasMainLayer=function(){return this.moKineticMainLayer};CMSMode.prototype.AddToCanvas=function(n){this.moKineticMainLayer.add(n)};CMSMode.prototype.RefreshCanvas=function(){this.moKineticMainLayer.draw()};CMSMode.Clean=function(){var n,t,i,r;CMSModePreview.Clean();CMSModeMaintenance.Clean();CMSModeEdit.Clean();n=$("canvas[id='_CMS_Canvas']");n.length>0&&(n.unbind(),n.remove());t=$E(CMSParameters.pyramid.id);t.length>0&&(t.unbind(),t.remove());i=$("."+CMSParameters.highLight.global_class);i.length>0&&$.each(i,function(){$(this).stopTime();$(this).unbind();$(this).remove()});r=$("."+CMSParameters.VUCButton.global_class);r.length>0&&$.each(r,function(){$(this).unbind();$(this).remove()});Matrix3.moCMS.moRenderedVFormVUCs.clear();Matrix3.moCMS.moVUCAbsolutePositions=[]};CMSMode.prototype.InstallVUCButtons=function(){for(var t,i=$("div[data-vu]"),n=0;n<i.length;n++)t=$E(i[n].id),t.data("vu")&&t.CMSVUCButton()};$.extend(CMSModeMaintenance.prototype,CMSMode.prototype);CMSModeMaintenance.prototype.SpecificStart=function(){this.InstallCanvas();this.InstallAnchors();this.InstallPyramid();this.InstallVUCButtons()};CMSModeMaintenance.prototype.PreSpecificMouseMoveHandler=function(){this.GetLastEltHovered()!=null&&this.GetLastEltHovered().CMSHighLight(CMSParameters.highLightModes.over,"destroy")};CMSModeMaintenance.prototype.PostSpecificMouseMoveHandler=function(){this.msLastEltIDHovered&&CMSUtils.InArray(this.msLastEltIDHovered,this.moListEltsIDSelected)=="-1"&&this.GetLastEltHovered().CMSHighLight(CMSParameters.highLightModes.over,{background_opacity:.05})};CMSModeMaintenance.prototype.PreSpecificSelectItem=function(){for(var n=0;n<this.moListEltsIDSelected.length;n++)this.moElts[this.moListEltsIDSelected[n]].CMSHighLight(CMSParameters.highLightModes.selected,"destroy")};CMSModeMaintenance.prototype.SpecificSelectItem=function(n){var t=this.moElts[n];typeof t!="undefined"&&t!=null&&(t.CMSHighLight(CMSParameters.highLightModes.over,"destroy"),t.CMSHighLight(CMSParameters.highLightModes.selected,{pulsate:!0}),oParent=t.parent(),oParent.CMSHighLight(CMSParameters.highLightModes.parent,{pulsate:!0,permanent:!1,background:!1}))};CMSModeMaintenance.Clean=function(){};CMSParameters={rootNodeID:"Form1",notEditablePopupClass:"CMSNotEditable",modes:{maintenance:new CMSModeMaintenance},canvas:{id:"_CMS_Canvas","z-index":1e5},loader:{id:"_CMS_Loader",maskId:"_CMS_Loader_Mask",imagePath:"ClientFiles/COR/CMS/Loader.gif","z-index":5e5},highLightModes:{over:"over",selected:"selected",parent:"parent"},highLight:{global_class:"CMSHighLight",content_class:"CMSHighLight_Content",over:{"z-index":99e3,color:"#00FFFF"},over_dependency:{"z-index":98e3,color:"#00FFFF"},parent:{"z-index":97e3,color:"#ff00c6"},selected:{"z-index":96e3,color:"#12ff00"}},pyramid:{id:"_CMS_Pyramid",blockId_prefix:"_CMS_PB_",blockMenuId_prefix:"_CMS_PBM_",LinkShowChildren_class:"cms_pyramid_block_showchildren","z-index":11e4,maxBlock:10,borderLimit:10,class_pyramid:"cms_pyramid",class_block:"cms_pyramid_block",class_block_a:"cms_pyramid_block_a",class_block_b:"cms_pyramid_block_b",class_block_menu:"cms_pyramid_block_menu",class_block_to_many_children:"cms_pyramid_too_many_children"},dependency:{prefix_id:"CMS_Dep_",color_horizontal:"#0018FF",color_vertical:"#00E22B",color_center:"#007D95",default_alpha:.4},plunger:{radius:6,diameter:12},anchor:{prefix_id:"CMSA_",cross_width:20,color_black:"#000000",color_white:"#FFFFFF"},editToolbarVForm:{"z-index":15e4,corner_margin:50},parameterEditVForm:{"z-index":16e4,"mask_z-index":159e3},VUCButton:{global_class:"CMSVUCButton",icon:"fa fa-cog",width:16,height:16,top:0,left:0,bottom:0,right:0,wrapper_class:"CT Button ABS VUCButton","wrapper_z-index":100100,right_shift:20,bottom_shift:2,min_width:23,min_width_label:70,highligher_class:"CMSVUCButtonHighLighter"}};CMSUtils={msIDNewPrefix:"_cms_",miNextIDIndex:1,GetForceID:function(n){return typeof n.attr("data-pid")!="undefined"?n.attr("data-pid"):n.attr("id")},GetID:function(n){return n.attr("id")}
216,CleanID:function(n){var t=this.msIDNewPrefix+this.miNextIDIndex;this.miNextIDIndex++;n.attr("id",t)},GetElt:function(n){return $("#"+n)},EltPositionMatch:function(n,t,i){return typeof n=="object"&&n!=null&&n.top!=null&&n.right!=null&&n.bottom!=null&&n.left!=null?t>=n.left&&t<=n.right&&i>=n.top&&i<=n.bottom:!1},EltHasIntersection:function(n,t){var i=t.x+t.width,r=t.y+t.height,u=n.x+n.width,f=n.y+n.height;return(n.x<=i&&n.x>=t.x||u<=i&&u>=t.x)&&(n.y<=r&&n.y>=t.y||f<=r&&f>=t.y)||(t.x<=u&&t.x>=n.x||i<=u&&i>=n.x)&&(t.y<=f&&t.y>=n.y||r<=f&&r>=n.y)?!0:!1},InArray:function(n,t){return $.inArray(n,t)},IsVisible:function(n){var u,i,t,f,r;if(n.is("hidden")==!0||n.css("display")=="none"||n.hasClass("InvisibleC")||n.height()==0)return!1;for(u=!1,i=n.parents(),t=0,f=i.length;t<f;t++){if(typeof i[t].id!="undefined"&&(i[t].id===Matrix3.Const.ID_PANEL_MAIN||i[t].id===Matrix3.Const.POPUP_LAYER_ID))break;if(r=$(i[t]),r.is("hidden")==!0||r.css("display")=="none"||r.hasClass("InvisibleC")||r.height()==0&&r.css("display")!="contents"){u=!0;break}}return!u},IsVisible2:function(n,t,i){function u(n,f,e,o,s){var h=n.moParent,c=$(h).offset();return h?($(h).css("overflow-x")==="hidden"||$(h).css("overflow-x")==="auto"||$(h).css("overflow-x")==="scroll")&&(e>=h.scrollLeft+h.offsetWidth-r||e+s<=h.scrollLeft+r||t<c.left||t>c.left+h.offsetWidth)?!1:($(h).css("overflow-y")==="hidden"||$(h).css("overflow-y")==="auto"||$(h).css("overflow-y")==="scroll")&&(f+o<=h.scrollTop+r||f>=h.scrollTop+h.offsetHeight-r||i<c.top||i>c.top+h.offsetHeight)?!1:(f+=h.offsetTop-h.scrollTop,e+=h.offsetLeft-h.scrollLeft,u(h,f,e,o,s)):!0}var r;if(!this.IsVisible($(n)))return!1;r=2;var f=n.offsetTop,e=n.offsetLeft,o=n.offsetHeight,s=n.offsetWidth;return u(n,f,e,o,s)}},function(n){function t(n,t){var i=n.getBoundingClientRect(),r=t.getBoundingClientRect();return!(i.top+i.height<r.top||i.top>r.top+r.height||i.left+i.width<r.left||i.left>r.left+r.width)&&!(i.width===0||i.height===0)&&!(r.width===0||r.height===0)}n.fn.CMSVUCButton=function(){var f={VUCSID:"VUCSID",VUCName:"VUCName",TargetModule:"TargetModule",TableSchema:"TableSchema",RowID:"RowID",VUCPosition:"VUCPosition",OnTop:"VUCTop"},e={LEFT:0,CENTER:1,RIGHT:2,TOP:0,BOTTOM:2},r=n(this),c=CMSUtils.GetID(r),u=r.data("vu"),p=$PI(c).localToGlobal(new Point(0,0),!1),s,w,h,g,lt,it,v,d,y,rt,ut,ft,et;if(!jQuery.isEmptyObject(u)&&Utils.IsInTopLevelPopup(c)&&(s=u[f.TargetModule],s&&Utils.IsStringFilled(Utils.Trim(s))||(s=$E(Utils.GetVFormId(c)).data("vf")),w=u[f.VUCSID],h=Matrix3.moCMS,h===undefined&&(h=Matrix3.moVUCButtons),!h.moRenderedVFormVUCs.has(s+"-"+w+"-"+u[f.TableSchema]+"-"+u[f.RowID]))){h.moRenderedVFormVUCs.add(s+"-"+w+"-"+u[f.TableSchema]+"-"+u[f.RowID]);var at="CS.aspx?VP3=CMS4&FormRootID="+w+"&FormModule="+s+"&TableSchema="+u[f.TableSchema]+"&RowID="+u[f.RowID],b=c+"_CMS_VUC_Mask",nt=c+"_RelatedVFToHoveringCogBtn_highlighter",o=n('<div id="'+b+'" class="'+CMSParameters.VUCButton.wrapper_class+" "+CMSParameters.VUCButton.global_class+'" original-title="'+u[f.VUCName]+'"><\/div>'),vt=n('<div class="BG"><\/div>'),l=n('<a href="'+at+'" role="button" target=\'_blank\'><\/a>'),yt=n('<i class="'+CMSParameters.VUCButton.icon+'" aria-hidden="true" style="filter: brightness(1.0);"><\/i>'),a=n('<div id="'+nt+'" class="'+CMSParameters.VUCButton.highligher_class+'"><\/div>'),pt=n("<span>"+u[f.VUCName]+"<\/span>");a.css({position:"absolute",border:"3px solid #FFE767","background-color":"rgba(255, 231, 103, 0.25)","z-index":CMSParameters.VUCButton["wrapper_z-index"]-1,"pointer-events":"none"});var k=0,tt=0,ot=u[f.VUCPosition];Utils.IsStringFilled(ot)&&(g=ot.split("-",2),g.length===2&&(k=parseInt(g[0])||0,tt=parseInt(g[1])||0));var wt=CMSParameters.VUCButton.min_width,st=CMSParameters.VUCButton.min_width_label,i={"z-index":CMSParameters.VUCButton["wrapper_z-index"],"max-width":r.outerWidth()>st?r.outerWidth():wt,"padding-left":2,marginTop:0};switch(k){case e.TOP:i.top=0;break;case e.BOTTOM:i.top="100%";i.transform="translateY(-100%)"}switch(tt){case e.LEFT:i.left=0;break;case e.CENTER:i.left="50%";i.transform=(i.transform||"")+" translateX(-50%)";break;
216case e.RIGHT:i.left="100%";i.transform=(i.transform||"")+" translateX(-100%)"}o.css(i);l.on("click",function(t){if(n("."+CMSParameters.VUCButton.global_class).find("a").each(function(){n(this).off("mouseenter")}),a.detach(),!t.ctrlKey){var i=w+"|"+s+"|"+(u[f.TableSchema]||"")+"|"+(u[f.RowID]||"");return $Control(b,ButtonCtrl.Const.CONTROL_NAME).SendEvent(Utils.GetVFormId(c),"SHOW_VUC",Matrix3.Const.RETURNTYPE_FULL,Matrix3.Const.DELAY_IMMEDIAT,i,"","","","","",!1,"","","","",t),Matrix3.mbClick=!0,Matrix3.moCMS===undefined&&Matrix3.moVUCButtons.HideVUCButtons(),!1}});l.on("mouseleave focusout",function(){n("."+CMSParameters.VUCButton.highligher_class).each(function(){this.remove()})});l.append(yt);r.outerWidth()>st&&l.append(pt);o.append(vt);o.append(l);var ht=!1,bt=r.parents().is(".PanelUnfolded, .PanelFolded"),ct=r.parents().css("z-index");if(!bt&&!isNaN(parseInt(ct))&&parseInt(ct)>0&&(ht=!0),lt=Utils.ParseBool(u[f.OnTop]),it=ht||lt,it){switch(tt){case e.LEFT:i.left=p.x;break;case e.CENTER:i.left=r.outerWidth()/2+p.x;break;case e.RIGHT:i.left=r.outerWidth()+p.x}switch(k){case e.TOP:i.top=p.y;break;case e.BOTTOM:i.top=r.outerHeight()+p.y}o.css(i);n("body").append(o)}else r.append(o);l.on("mouseenter focusin",function(){if(it){var n=$E(c).offset();a.css({height:r.outerHeight(),width:r.outerWidth(),top:n.top,left:n.left});document.getElementById(b)!==null&&document.getElementById(nt)===null&&a.appendTo("body")}else a.css({height:r.outerHeight(),width:r.outerWidth(),top:0,left:0}),document.getElementById(b)!==null&&document.getElementById(nt)===null&&r.append(a)});for(v=o.get(0),d=v.getBoundingClientRect(),y=0;y<h.moVUCAbsolutePositions.length;++y)rt=h.moVUCAbsolutePositions[y],ut=rt.getBoundingClientRect(),t(v,rt)&&(k===e.TOP?(ft=Math.abs(d.top-ut.bottom)+CMSParameters.VUCButton.bottom_shift,ft>0&&(i.marginTop+=ft,o.css("marginTop",i.marginTop),d=v.getBoundingClientRect(),y=-1)):k===e.BOTTOM&&(et=Math.abs(ut.top-d.bottom)+CMSParameters.VUCButton.bottom_shift,et>0&&(i.marginTop-=et,o.css("marginTop",i.marginTop),d=v.getBoundingClientRect(),y=-1)));h.moVUCAbsolutePositions.push(v);SimpleTooltip.Subscribe($E(b),{gravity:"s"});SimpleTooltip.Setup()}}}(jQuery);VUCButtons.moSingleton=null;VUCButtons.GetInstance=function(){return VUCButtons.moSingleton||(VUCButtons.moSingleton=new VUCButtons),VUCButtons.moSingleton};VUCButtons.prototype={InstallVUCButtons:function(){var t,n,i;if(this.isEnable)for(t=$("div[data-vu]"),n=0;n<t.length;n++)i=$E(t[n].id),i.data("vu")&&i.CMSVUCButton()},HideVUCButtons:function(){var n=$("."+CMSParameters.VUCButton.global_class);n.length>0&&$.each(n,function(){$(this).unbind();$(this).remove()});this.RemoveHighligher();this.RemoveTooptip();this.moRenderedVFormVUCs.clear();this.moVUCAbsolutePositions=[];PositionMgr.GetInstance().CalculatePosition()},ClosePopup:function(){this.RerenderVUCButtons()},RerenderVUCButtons:function(n){var r=this,t=function(){$(".context-menu-list").size()==0&&$(".ui-menu.ui-widget.ui-widget-content.ui-autocomplete").find(":visible").size()==0&&r.InstallVUCButtons()},i=$("."+CMSParameters.VUCButton.global_class);i.length>0&&$.each(i,function(){$(this).unbind();$(this).remove()});this.RemoveHighligher();this.moRenderedVFormVUCs.clear();this.moVUCAbsolutePositions=[];n&&window.requestAnimationFrame?window.requestAnimationFrame(t):t()},Refresh:function(){this.RerenderVUCButtons()},SetStateVUCEditor:function(n){this.isEnable=n},RemoveHighligher:function(){var n=$("."+CMSParameters.VUCButton.highligher_class);n.length>0&&$.each(n,function(){$(this).unbind();$(this).remove()})},RemoveTooptip:function(){var n=$(".tipsy");n.length>0&&$.each(n,function(){$(this).unbind();$(this).remove()})}}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.