PageSourceSearch

https://www.cision.com/etc.clientlibs/clientlibs/granite/utils.min.js

js cision.com collected 2026-09-24 06:53:25 UTC 8,130 bytes, 20 lines download raw bytes

1(function(d){"object"===typeof module&&module.exports?module.exports=d():(window.Granite=window.Granite||{}).Sling=d()})(function(){return{SELECTOR_INFINITY:".infinity",CHARSET:"_charset_",STATUS:":status",STATUS_BROWSER:"browser",OPERATION:":operation",OPERATION_DELETE:"delete",OPERATION_MOVE:"move",DELETE_SUFFIX:"@Delete",TYPEHINT_SUFFIX:"@TypeHint",COPY_SUFFIX:"@CopyFrom",MOVE_SUFFIX:"@MoveFrom",ORDER:":order",REPLACE:":replace",DESTINATION:":dest",SAVE_PARAM_PREFIX:":saveParamPrefix",IGNORE_PARAM:":ignore",
2REQUEST_LOGIN_PARAM:"sling:authRequestLogin",LOGIN_URL:"/system/sling/login.html",LOGOUT_URL:"/system/sling/logout.html"}});
3(function(d){"object"===typeof module&&module.exports?module.exports=d():(window.Granite=window.Granite||{}).Util=d()})(function(){return{patchText:function(d,h){if(h)if("[object Array]"!==Object.prototype.toString.call(h))d=d.replace("{0}",h);else for(var f=0;f<h.length;f++)d=d.replace("{"+f+"}",h[f]);return d},getTopWindow:function(){var d=window;if(this.iFrameTopWindow)return this.iFrameTopWindow;try{for(;d.parent&&d!==d.parent&&d.parent.location.href;)d=d.parent}catch(h){}return d},setIFrameMode:function(d){this.iFrameTopWindow=
4d||window},applyDefaults:function(){for(var d,h=arguments[0]||{},f=1;f<arguments.length;f++){d=arguments[f];for(var m in d){var g=d[m];d.hasOwnProperty(m)&&void 0!==g&&(h[m]=null===g||"object"!==typeof g||g instanceof Array?g instanceof Array?g.slice(0):g:this.applyDefaults(h[m],g))}}return h},getKeyCode:function(d){return d.keyCode?d.keyCode:d.which}}});
5(function(d){"object"===typeof module&&module.exports?module.exports=d(require("@granite/util"),require("jquery")):window.Granite.HTTP=d(Granite.Util,jQuery)})(function(d,h){return function(){var f=null,m=/^(?:http|https):\/\/[^/]+(\/.*)\/(?:etc\.clientlibs|etc(\/.*)*\/clientlibs|libs(\/.*)*\/clientlibs|apps(\/.*)*\/clientlibs|etc\/designs).*\.js(\?.*)?$/,g=/[^\w-.~%:/?[\]@!$&'()*+,;=]/,p=/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,n=!1,c={getSchemeAndAuthority:function(a){if(!a)return"";
6a=p.exec(a);return null===a?"":[a[1],a[3]].join("")},getContextPath:function(){null===f&&(f=c.detectContextPath());return f},detectContextPath:function(){try{if(window.CQURLInfo)f=CQURLInfo.contextPath||"";else{for(var a=document.getElementsByTagName("script"),b=0;b<a.length;b++){var e=m.exec(a[b].src);if(e)return f=e[1]}f=""}}catch(l){}return f},externalize:function(a){try{0===a.indexOf("/")&&c.getContextPath()&&0!==a.indexOf(c.getContextPath()+"/")&&(a=c.getContextPath()+a)}catch(b){}return a},
7internalize:function(a,b){if("/"===a.charAt(0))return f===a?"":f&&0===a.indexOf(f+"/")?a.substring(f.length):a;b||(b=document);b=c.getSchemeAndAuthority(b.location.href);var e=c.getSchemeAndAuthority(a);return b===e?a.substring(e.length+(f?f.length:0)):a},getPath:function(a){if(a)a=c.removeParameters(a),a=c.removeAnchor(a);else{if(window.CQURLInfo&&CQURLInfo.requestPath)return CQURLInfo.requestPath;a=window.location.pathname}a=c.internalize(a);var b=a.indexOf(".",a.lastIndexOf("/"));-1!==b&&(a=a.substring(0,
8b));return a},removeAnchor:function(a){var b=a.indexOf("#");return 0<=b?a.substring(0,b):a},removeParameters:function(a){var b=a.indexOf("?");return 0<=b?a.substring(0,b):a},encodePathOfURI:function(a){for(var b=["?","#"],e=[a],l,k=0,q=b.length;k<q;k++)if(l=b[k],0<=a.indexOf(l)){e=a.split(l);break}g.test(e[0])&&(e[0]=c.encodePath(e[0]));return e.join(l)},encodePath:function(a){a=encodeURI(a);a=a.replace(/%5B/g,"[").replace(/%5D/g,"]");a=a.replace(/\?/g,"%3F");return a=a.replace(/#/g,"%23")},handleLoginRedirect:function(){if(!n){n=
9!0;alert(Granite.I18n.get("Your request could not be completed because you have been signed out."));var a=d.getTopWindow().document.location;a.href=c.externalize("/")+"?resource\x3d"+encodeURIComponent(a.pathname+a.search+a.hash)}},getXhrHook:function(a,b,e){return window.G_XHR_HOOK&&"function"===typeof G_XHR_HOOK?(a={url:a,method:b||"GET"},e&&(a.params=e),G_XHR_HOOK(a)):null},eval:function(a){"object"!==typeof a&&(a=h.ajax({url:a,type:"get",async:!1}));try{return JSON.parse(a.body?a.body:a.responseText)}catch(b){}return null}};
10return c}()});
11(function(d){"object"===typeof module&&module.exports?module.exports=d(require("@granite/http")):window.Granite.I18n=d(window.Granite.HTTP)})(function(d){return function(){var h={}
11,f="/libs/cq/i18n/dict.",m=".json",g=void 0,p=!1,n=null,c={},a=!1;c.LOCALE_DEFAULT="en";c.PSEUDO_LANGUAGE="zz";c.PSEUDO_PATTERN_KEY="_pseudoPattern_";c.init=function(b){b=b||{};this.setLocale(b.locale);this.setUrlPrefix(b.urlPrefix);this.setUrlSuffix(b.urlSuffix)};c.setLocale=function(b){b&&(g=b)};c.getLocale=function(){"function"===
12typeof g&&(g=g());return g||document.documentElement.lang||c.LOCALE_DEFAULT};c.setUrlPrefix=function(b){b&&(f=b,a=!0)};c.setUrlSuffix=function(b){b&&(m=b,a=!0)};c.getDictionary=function(b){b=b||c.getLocale();if(!h[b]){p=0===b.indexOf(c.PSEUDO_LANGUAGE);try{var e=new XMLHttpRequest,l=e.open,k=d.externalize;var q=b;if(a)var r=f+q+m;else{var t,u=document.querySelector("html");u&&(t=u.getAttribute("data-i18n-dictionary-src"));r=t?t.replace("{locale}",encodeURIComponent(q)).replace("{+locale}",q):f+q+
13m}l.call(e,"GET",k.call(d,r),!1);e.send();h[b]=JSON.parse(e.responseText)}catch(v){}h[b]||(h[b]={})}return h[b]};c.get=function(b,e,l){var k;var q=c.getDictionary();var r=p?c.PSEUDO_PATTERN_KEY:l?b+" (("+l+"))":b;q&&(k=q[r]);k||(k=b);p&&(k=k.replace("{string}",b).replace("{comment}",l?l:""));b=k;if(e)if(Array.isArray(e))for(l=0;l<e.length;l++)b=b.replace("{"+l+"}",e[l]);else b=b.replace("{0}",e);return b};c.getVar=function(b,e){return b?c.get(b,null,e):null};c.getLanguages=function(){if(!n)try{var b=
14d.externalize("/libs/wcm/core/resources/languages.overlay.infinity.json"),e=new XMLHttpRequest;e.open("GET",b,!1);e.send();var l=JSON.parse(e.responseText);Object.keys(l).forEach(function(k){k=l[k];k.language&&(k.title=c.getVar(k.language));k.title&&k.country&&"*"!==k.country&&(k.title+=" ("+c.getVar(k.country)+")")});n=l}catch(k){n={}}return n};c.parseLocale=function(b){if(!b)return null;var e=b.indexOf("_");0>e&&(e=b.indexOf("-"));if(0>e){var l=b;e=null}else l=b.substring(0,e),e=b.substring(e+1);
15return{code:b,language:l,country:e}};return c}()});
16(function(d){"object"===typeof module&&module.exports?module.exports=d():(window.Granite=window.Granite||{}).TouchIndicator=d()})(function(){var d={},h=[];return{debugWithMouse:!1,init:function(){var f=this,m=function(g){f.update(g.touches);return!0};document.addEventListener("touchstart",m);document.addEventListener("touchmove",m);document.addEventListener("touchend",m);this.debugWithMouse&&document.addEventListener("mousemove",function(g){g.identifer="fake";f.update([g]);return!0})},update:function(f){for(var m=
17{},g=0;g<f.length;g++){var p=f[g],n=p.identifier,c=d[n];c||(c=h.pop(),c||(c=document.createElement("div"),c.style.visibility="hidden",c.style.position="absolute",c.style.width="30px",c.style.height="30px",c.style.borderRadius="20px",c.style.border="5px solid orange",c.style.userSelect="none",c.style.opacity="0.5",c.style.zIndex="2000",c.style.pointerEvents="none",document.body.appendChild(c)));m[n]=c;c.style.left=p.pageX-20+"px";c.style.top=p.pageY-20+"px";c.style.visibility="visible"}for(n in d)d.hasOwnProperty(n)&&
18!m[n]&&(c=d[n],c.style.visibility="hidden",h.push(c));d=m}}});
19(function(d){"object"===typeof module&&module.exports?module.exports=d():(window.Granite=window.Granite||{}).OptOutUtil=d()})(function(d){return function(){var h={},f=[],m=[];h.init=function(g){g?(f=g.cookieNames||[],m=g.whitelistCookieNames||[]):(f=[],m=[])};h.getCookieNames=function(){return f};h.getWhitelistCookieNames=function(){return m};h.isOptedOut=function(){for(var g=document.cookie.split(";"),p=0;p<g.length;p++){var n=g[p].split("\x3d")[0];n=String.prototype.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
20"");if(0<=h.getCookieNames().indexOf(n))return!0}return!1};h.maySetCookie=function(g){return!(h.isOptedOut()&&-1===h.getWhitelistCookieNames().indexOf(g))};return h}()});Granite.OptOutUtil.init(window.GraniteOptOutConfig);Granite.HTTP.detectContextPath();

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.