PageSourceSearch

https://www.enmmc.com/Integrations/Centralpoint/Scripts/centralpoint.min.js?v=20260925215206

js enmmc.com collected 2026-10-04 07:04:53 UTC 13,855 bytes, 7 lines download raw bytes

1(()=>{var b=new WeakMap,g=class{static copyToClipboard(e,t,s,i=null){t||(t="Copied to clipboard!"),navigator.clipboard&&window.isSecureContext?navigator.clipboard.writeText(e).then(()=>{this.showTemporaryNotification(t,!1,3e3,i),s&&s()}).catch(r=>{console.error("Clipboard API failed:",r),this.fallbackCopyToClipboard(e,t,s,i)}):this.fallbackCopyToClipboard(e,t,s,i)}static fallbackCopyToClipboard(e,t,s,i=null){t||(t="Copied to clipboard!");let r=document.createElement("textarea");r.value=e,r.style.position="fixed",r.style.left="-999999px",r.style.top="-999999px",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy"),this.showTemporaryNotification(t,!1,3e3,i),s&&s()}catch(o){console.error("Fallback copy failed:",o),this.showTemporaryNotification("Failed to copy to clipboard. Please try again.",!0,3e3,i)}document.body.removeChild(r)}static showTemporaryNotification(e,t="success",s=3e3,i=null,r=null){document.querySelectorAll(".cp-temp-notification").forEach(p=>p.remove());let o=typeof t=="boolean"?t?"error":"success":t,n={info:{icon:"cp-icon-information-circle",bg:"cp-bg-blue-500"},success:{icon:"cp-icon-check-circle",bg:"cp-bg-green-500"},warning:{icon:"cp-icon-exclamation-triangle",bg:"cp-bg-yellow-500"},error:{icon:"cp-icon-x-circle",bg:"cp-bg-red-500"}},u=n[o]||n.success,d=u.icon,l=u.bg,a=document.createElement("div");if(a.className="cp-scope",Object.assign(a.style,{position:"absolute",zIndex:"10000",opacity:"0",transition:"opacity 0.3s ease-in-out",pointerEvents:"none"}),a.innerHTML=`
2                <div class="cp-temp-notification ${l} cp-text-white cp-rounded-lg cp-shadow-lg cp-px-4 cp-py-3 cp-flex cp-items-center cp-gap-3 cp-min-w-[250px] cp-max-w-[350px]">
3                    <span class="${d} cp-flex-shrink-0"></span>
4                    <span class="cp-flex-1 cp-text-sm">${this.escapeHtml(e)}</span>
5                </div>
6            `,(r||document.body).appendChild(a),i){let p=i.getBoundingClientRect(),T=p.top+window.scrollY,h=p.left+window.scrollX,m=i.offsetHeight,c=50,k=8,_=p.top;a.style.visibility="hidden",a.style.opacity="1";let x=a.offsetHeight||c;a.style.visibility="",a.style.opacity="0";let R;_>x+k?R=T-x-k:R=T+m+k,a.style.top=R+"px",a.style.left=h+"px"}else r?Object.assign(a.style,{position:"fixed",top:"16px",right:"16px",zIndex:"1000"}):Object.assign(a.style,{position:"fixed",top:"16px",right:"16px",zIndex:"99999"});return setTimeout(()=>{a.style.opacity="1"},10),setTimeout(()=>{a.style.opacity="0",setTimeout(()=>a.remove(),300)},s),a}static escapeHtml(e){return typeof e!="string"?e:e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}static formatBytes(e,t=2){if(e===0)return"0 Bytes";if(!e||isNaN(e))return"N/A";let s=1024,i=t<0?0:t,r=["Bytes","KB","MB","GB","TB"],o=Math.floor(Math.log(e)/Math.log(s));return parseFloat((e/Math.pow(s,o)).toFixed(i))+" "+r[o]}static formatTime(e){return!e||(typeof e=="string"&&(e=new Date(e)),!(e instanceof Date)||isNaN(e))?"N/A":e.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}static setButtonBusy(e,t){return e?b.has(e)?()=>{}:(b.set(e,e.innerHTML),e.disabled=!0,e.innerHTML=`<div class="cp-w-4 cp-h-4 cp-border-2 cp-border-white/30 cp-border-t-white cp-rounded-full cp-animate-spin"></div> ${this.escapeHtml(t)}`,()=>{let s=b.get(e);s!==void 0&&(b.delete(e),e.disabled=!1,e.innerHTML=s)}):()=>{}}static downloadBlob(e,t){let s=URL.createObjectURL(e),i=document.createElement("a");i.href=s,i.download=t,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(s)}static downloadAs(e,t,s){this.downloadBlob(new Blob(e,{type:s}),t)}static toCsv(e,t){let s=function(r){if(r==null)return"";let o=String(r);return/[",\r\n]/.test(o)?'"'+o.replace(/"/g,'""')+'"':o},i=[e.map(s).join(",")];for(let r=0;r<t.length;r++){let o=t[r]||[],n=[];for(let u=0;u<e.length;u++)n.push(s(u<o.length?o[u]:null));i.push(n.join(","))}return i.join(`\r
7`)}static#t=new Set(["script","style","iframe","object","embed","link","meta","base","form"]);static#s=new Set(["img","picture","source","svg","video","audio"]);static sanitizeHtml(e){return this.#e(e,!1)}static sanitizeTrustedHtml(e){return this.#e(e,!0)}static#e(e,t){let s=document.createElement("template");s.innerHTML=e;let i=document.createTreeWalker(s.content,NodeFilter.SHOW_ELEMENT),r=[],o=[];for(;i.nextNode();){let n=i.currentNode,u=n.tagName.toLowerCase();if(this.#t.has(u)){r.push(n);continue}if(!t&&this.#s.has(u)){r.push(n);continue}if(!t&&u==="a"){o.push(n);continue}for(let d of[...n.attributes]){let l=d.name.toLowerCase(),a=(d.value||"").replace(/\s+/g,"").toLowerCase(),y=(l==="href"||l==="src"||l==="xlink:href")&&(a.startsWith("javascript:")||a.startsWith("data:")||a.startsWith("vbscript:"));(l.startsWith("on")||y)&&n.removeAttribute(d.name)}}return r.forEach(n=>n.remove()),o.forEach(n=>n.replaceWith(...n.childNodes)),s.innerHTML}};window.CpUtilities=g;var S={AI:{SummarizeText:"/ai/summarize/text",ChatStream:"/ai/chat/stream",GetProviders:"/ai/providers",GetCapabilities:"/ai/capabilities",Embed:"/ai/embed",Conversations:"/ai/chat/conversations",ConversationMessages:"/ai/chat/conversations/messages",KnowledgeAssistantConfig:"/ai/knowledge-assistant/config",DataSourceCatalog:"/ai/datasource/catalog",DataSourceSelectPreview:"/ai/datasource/select-preview",DataSourceRender:"/ai/datasource/render"},Vector:{RagRetrieve:"/ai/rag/retrieve",RagIndex:"/ai/rag/index",RagEnroll:"/ai/rag/enroll",RagUnenroll:"/ai/rag/unenroll",RagPause:"/ai/rag/pause",RagInspect:"/ai/rag/inspect",RagChunks:"/ai/rag/chunks",RagBenchmark:"/ai/rag/benchmark",RagStatus:"/ai/rag/status",RagAvailableModules:"/ai/rag/available-modules",RagConfig:"/ai/rag/config",RagModuleAttributes:"/ai/rag/module-attributes"},System:{RequestModelDownload:"/system/request-model-download"}},A=class{_baseUrl;_token;_useCookieAuth;defaultTimeout;_validated;_tokenExpiresAt;_refreshTimer;_refreshInProgress;_refreshEndpoint;_isCrossOrigin;constructor(){this._baseUrl=null,this._token=null,this._useCookieAuth=!1,this.defaultTimeout=1e4,this._val
7idated=!1,this._tokenExpiresAt=null,this._refreshTimer=null,this._refreshInProgress=!1,this._refreshEndpoint="/Integrations/Centralpoint/API/RefreshToken.ashx"}validateCpsysApi(){if(typeof cpsys>"u")throw new Error("cpsys object is not available. Make sure InitApi = true in the page.");if(!cpsys.Api)throw new Error("cpsys.Api is not available. Make sure InitApi = true in the page.");if(!cpsys.Api.BaseUrl)throw new Error("cpsys.Api.BaseUrl is not available.");this._useCookieAuth=!cpsys.Api.Token,this._isCrossOrigin=cpsys.Api.BaseUrl.startsWith("http"),console.log("CpApiManager initialized:",{baseUrl:cpsys.Api.BaseUrl,authMode:this._useCookieAuth?"cookie":"bearer"}),this._validated=!0,cpsys.Api.TokenExpiresAt&&this.initTokenRefresh(cpsys.Api.TokenExpiresAt)}get baseUrl(){return this._validated||this.validateCpsysApi(),this._baseUrl||(this._baseUrl=this.normalizeBaseUrl(cpsys.Api.BaseUrl)),this._baseUrl}get token(){return this._validated||this.validateCpsysApi(),this._useCookieAuth?null:(this._token===null&&(this._token=cpsys.Api.Token),this._token)}get useCookieAuth(){return this._validated||this.validateCpsysApi(),this._useCookieAuth}get isCrossOrigin(){return this._validated||this.validateCpsysApi(),this._isCrossOrigin}normalizeBaseUrl(e){return e.replace(/\/$/,"")}buildUrl(e){let t=e.startsWith("/")?e.substring(1):e;return`${this.baseUrl}/${t}`}createRequestStats(e,t="GET"){return{startTime:new Date,endTime:null,duration:0,url:e,method:t,responseSize:0,httpStatus:null,contentType:null,success:!1}}finalizeRequestStats(e,t,s=null){return e.endTime=new Date,e.duration=e.endTime.getTime()-e.startTime.getTime(),t&&(e.httpStatus=`${t.status} ${t.statusText}`,e.contentType=t.headers.get("Content-Type")||"application/json",e.success=t.ok),s&&(e.responseSize=s.length),e}getAuthHeaders(e=!0){let t={Accept:"application/json","Content-Type":"application/json"};return e&&!this._useCookieAuth&&this.token&&(t.Authorization=`Bearer ${this.token}`),t}async makeRequest(e,t={},s=!1){let{method:i="GET",body:r=null,includeAuth:o=!0,timeout:n=this.defaultTimeout,additionalHeaders:u={}}=t,d=this.buildUrl(e),l=this.createRequestStats(d,i);console.log(`Starting ${i} request to: ${d}`),console.log("Request started at:",this.formatTime(l.startTime));let a=new AbortController,y=setTimeout(()=>a.abort(),n);try{let p={...this.getAuthHeaders(o),...u},T={method:i,headers:p,body:r,signal:a.signal};this._useCookieAuth&&o&&(T.credentials=this._isCrossOrigin?"include":"same-origin");let h=await fetch(d,T);clearTimeout(y);let m=await h.text();if(this.finalizeRequestStats(l,h,m),console.log(`${i} request completed in ${l.duration}ms`),!h.ok){if(h.status===401&&o&&!t._isRetry&&(console.log("Received 401, attempting token refresh..."),await this.refreshToken()))return console.log("Token refreshed, retrying original request..."),this.makeRequest(e,{...t,_isRetry:!0},s);throw new f(`HTTP ${h.status} ${h.statusText}`,h.status,m,l)}let c;try{c=JSON.parse(m)}catch{c=m}if(s){if(!this.isApiListResponse(c))throw new f("Response is not in ApiListResponse<T> format",0,null,l)}else if(!this.isApiResponse(c))throw new f("Response is not in ApiResponse<T> format",0,null,l);return{data:this.getPropertyValue(c,"data"),pagination:s?{total:this.getPropertyValue(c,"total"),hasMore:this.getPropertyValue(c,"hasmore"),nextCursor:this.getPropertyValue(c,"nextcursor"),limit:this.getPropertyValue(c,"limit"),offset:this.getPropertyValue(c,"offset")}:void 0,metadata:{success:this.getPropertyValue(c,"success"),timestamp:this.getPropertyValue(c,"timestamp"),requestId:this.getPropertyValue(c,"requestid")},stats:l,response:h,rawResponse:c}}catch(p){throw clearTimeout(y),l.endTime=new Date,l.duration=l.endTime.getTime()-l.startTime.getTime(),p.name==="AbortError"?new f("Request timed out",0,null,l):p instanceof f?p:new f(p.message||"Network error or CORS issue",0,null,l)}}async get(e,t=!0,s=!1,i={}){return this.makeRequest(e,{method:"GET",includeAuth:t,...i},s)}async post(e,t,s=!0,i=!1,r={}){return this.makeRequest(e,{method:"POST",body:JSON.stringify(t),includeAuth:s,...r},i)}async put(e,t,s=!0,i=!1,r={}
7){return this.makeRequest(e,{method:"PUT",body:JSON.stringify(t),includeAuth:s,...r},i)}async delete(e,t=!0,s=!1){return this.makeRequest(e,{method:"DELETE",includeAuth:t},s)}isApiResponse(e){if(!e||typeof e!="object")return!1;let t=Object.keys(e),s=t.some(n=>n.toLowerCase()==="data"),i=t.some(n=>n.toLowerCase()==="success"),r=t.some(n=>n.toLowerCase()==="timestamp"),o=t.some(n=>n.toLowerCase()==="requestid");return s&&i&&r&&o}isApiListResponse(e){if(!this.isApiResponse(e))return!1;let t=Object.keys(e),s=t.some(n=>n.toLowerCase()==="total"),i=t.some(n=>n.toLowerCase()==="hasmore"),r=t.find(n=>n.toLowerCase()==="data"),o=r?Array.isArray(e[r]):!1;return s&&i&&o}getPropertyValue(e,t){if(!e||typeof e!="object")return;let i=Object.keys(e).find(r=>r.toLowerCase()===t.toLowerCase());return i?e[i]:void 0}escapeHtml(e){return g.escapeHtml(e)}formatTime(e){return g.formatTime(e)}formatBytes(e,t=2){return g.formatBytes(e,t)}getPerformanceClass(e){return e<100?"performance-excellent":e<300?"performance-good":e<1e3?"performance-fair":"performance-poor"}initTokenRefresh(e){if(!e){console.warn("Token expiration time not provided, refresh monitoring disabled");return}this._tokenExpiresAt=new Date(e);let t=new Date(this._tokenExpiresAt.getTime()-300*1e3),s=new Date,i=t.getTime()-s.getTime();console.log("Token refresh scheduled:",{expiresAt:this.formatTime(this._tokenExpiresAt),refreshAt:this.formatTime(t),minutesUntilRefresh:Math.round(i/6e4)}),this._refreshTimer&&clearTimeout(this._refreshTimer),i>0?this._refreshTimer=setTimeout(()=>this.refreshToken(),i):(console.warn("Token needs immediate refresh"),this.refreshToken())}async refreshToken(){if(this._refreshInProgress)return console.log("Token refresh already in progress"),!1;this._refreshInProgress=!0,console.log("Refreshing token...");try{let e=await fetch(this._refreshEndpoint,{method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},credentials:this._isCrossOrigin?"include":"same-origin"});if(!e.ok)throw new Error(`HTTP ${e.status}: ${e.statusText}`);let t=await e.json();return(this._useCookieAuth?t.success&&t.data&&t.data.expiresAt:t.success&&t.data&&t.data.token)?(this._useCookieAuth||(this._token=t.data.token,typeof cpsys<"u"&&cpsys.Api&&(cpsys.Api.Token=t.data.token)),typeof cpsys<"u"&&cpsys.Api&&(cpsys.Api.TokenExpiresAt=t.data.expiresAt),console.log("Token refreshed, expires:",t.data.expiresAt),this.initTokenRefresh(t.data.expiresAt),!0):(console.error("Token refresh failed:",t),!1)}catch(e){return console.error("Token refresh failed:",e),this._refreshTimer=setTimeout(()=>this.refreshToken(),6e4),!1}finally{this._refreshInProgress=!1}}},f=class extends Error{status;responseText;requestStats;constructor(e,t,s,i){super(e),this.name="ApiError",this.status=t,this.responseText=s,this.requestStats=i}getDetailedMessage(){let e=this.message;if(this.status===0?e="Network error or CORS issue":this.status===401?e+=" - Unauthorized: Invalid or expired JWT token":this.status===403?e+=" - Forbidden: Insufficient permissions for this site":this.status===404?e+=" - API endpoint not found":this.status>=500&&(e+=" - Server error"),this.responseText)try{let t=JSON.parse(this.responseText);t.message?e+=" - "+t.message:(t.detail||t.Detail)&&(e+=" - "+(t.detail||t.Detail))}catch{this.responseText.length<200&&(e+=" - "+this.responseText)}return e}},v=null;try{v=new A,console.log("CpApiManager instance created successfully")}catch(w){console.warn("CpApiManager could not be initialized:",w.message)}var C=window;C.CpApiManager=A;C.CpApiEndpoints=S;C.ApiError=f;C.cpApiManager=v;})();

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.