PageSourceSearch

https://static.pdffiller.com/js/vendors/clouds/select.js

js pdffiller.com collected 2026-09-24 07:56:15 UTC 6,364 bytes, 1 lines download raw bytes

1!function(){function e(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function t(e){var t=[],n="";return e.clientId||t.push(o),(!e.linkType||"direct"!==e.linkType&&"shared"!==e.linkType)&&t.push(i),void 0!==e.multiselect&&null!==e.multiselect&&("boolean"==(n=typeof e.multiselect)||"string"===n?"string"===n&&"true"!==e.multiselect&&"false"!==e.multiselect&&t.push(r):t.push(r)),void 0!==e.testMode&&null!==e.testMode&&("boolean"==(n=typeof e.testMode)||"string"===n?"string"===n&&"true"!==e.testMode&&"false"!==e.testMode&&t.push(c):t.push(c)),t}var n="Your browser is not supported",o="The client id must be included",i='The link-type option must be "direct" or "shared"',r='The multiselect option must be "true" or "false"',c='Invalid option "testmode"',s=1e3,l=/^[\],:{}\s]*$/,u=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,d=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,a=/(?:^|:|,)(?:\s*\[)+/g,p=/(https:\/\/([a-zA-Z0-9-]+\.)?(app\.box\.com|app\.boxcn\.net|ent\.box\.com)((\/.*)?))/i,h=/(https:\/\/([a-zA-Z0-9-]+\.)?(app\.[A-Za-z0-9]+\.inside-box\.net)((\/.*)?))/i,m={height:520,width:590},f=["multiselect","testMode"],g=1;window.BoxSelect=function(o){function i(t){for(var n in t)if(t.hasOwnProperty(n)&&null!==t[n]){var o=t[n];-1!=e(f,n)&&"string"==typeof o&&(o="true"===t[n]),U[n]=o}}function r(){if(C&&!C.closed)return C.focus(),!1;var e=U.domain+"/index.php?rm=box_select_view";e+="&client_id="+U.clientId,e+="&link_type="+U.linkType,e+="&multiselect="+U.multiselect,U.headerPrompt&&(e+="&header_prompt="+encodeURIComponent(U.headerPrompt)),e+="&picker_id="+z;var t=function(){var e=void 0!==window.screenLeft?window.screenLeft:screen.left,t=void 0!==window.screenTop?window.screenTop:screen.top,n=screen.width;window.innerWidth?n=window.innerWidth:document.documentElement.clientWidth&&(n=document.documentElement.clientWidth);var o=screen.height;window.innerHeight?o=window.innerHeight:document.documentElement.clientHeight&&(o=document.documentElement.clientHeight);var i=n/2-m.width/2+e,r=o/2-m.height/2+t;return i=i>0?i:0,r=r>0?r:0,"width="+m.width+",height="+m.height+",top="+r+",left="+i}();return C=window.open(e,"",t),E(),!0}function c(){V&&(C.closed?function(){if(R[O.CANCEL_EVENT_TYPE])for(var e=R[O.CANCEL_EVENT_TYPE],t=0;t<e.length;t++)e[t]()}():E())}function E(){V=!0,C&&!C.closed&&window.setTimeout(c,s)}function v(e){if(e.data){var t=function(e){if(!e||"string"!=typeof e)return null;try{if(window.JSON&&window.JSON.parse)return window.JSON.parse(e);if(l.test(e.replace(u,"@").replace(d,"]").replace(a,"")))return new Function("return "+e)()}catch(e){}return null}(e.data),n=e.origin||e.originalEvent.origin;if((r=n)&&(p.test(r)||h.test(r))&&t&&(t.eventType===O.SUCCESS_EVENT_TYPE||t.eventType===O.CANCEL_EVENT_TYPE)&&parseInt(t.pickerId,10)===z){if(R[t.eventType])for(var o=R[t.eventType],i=0;i<o.length;i++)t.eventType===O.SUCCESS_EVENT_TYPE?o[i](t.links):o[i]();O.closePopup()}}var r}function w(e,t){return"function"==typeof t&&(R[e]=R[e]||[],R[e].push(t),!0)}function x(){var e=U.navigator.userAgent,t=new RegExp("MSIE"),n=new RegExp("Opera");return t.test(e)&&!n.test(e)}function b(){var e=U.navigator.userAgent;return new RegExp("Trident").test(e)}function T(){return x()||b()}function y(e,t){(e.length>0||!t)&&(_.disabled=!0,_.className+=" not-supported",_.title=t?e[0]:n),function(){if(!N&&!(N=document.getElementById("box-select-stylesheet"))){(N=document.createElement("style")).type="text/css",N.id="box-select-stylesheet";var e="";e+="#box-select, .box-select { width: 160px; height: 42px; border: none; cursor: pointer; background: url('https://app.box.com/img/box_select/Item_Selector_Button_Sprites.png') no-repeat;background-position: -50px -100px; }",e+="#box-select:hover, .box-select:hover { background-position: -50px -50px ; }",e+="#box-select:active, .box-select:active { background-position: -50px 0;}",e+="#box-select.not-supported, .box-select.not-supported { zoom: 1;filter: alpha(opacity=30);opacity: 0.3;}",N.styleSheet?N.styleSheet.cssText=e:N.textContent=e,document.getElementsByTagName("head")[0].appendChild(N)}}(),_.onclick=O.launchPopup}var _,S,C,N,k,P,A,I,L,M,B,Y,R={},V=!1,U={clientId:"",linkType:"direct",multiselect:!0,headerPrompt:"",domain:"https://app.box.c
1om",testMode:!1,navigator:navigator},z=g++,O={SUCCESS_EVENT_TYPE:"BoxSelect:Success",CANCEL_EVENT_TYPE:"BoxSelect:Cancel",closePopup:function(){C&&(C.close(),V=!1),S&&(S.parentNode.removeChild(S),S=null)},success:function(e){return w(O.SUCCESS_EVENT_TYPE,e)},cancel:function(e){return w(O.CANCEL_EVENT_TYPE,e)},unregister:function(e,t){var n=!1;if("function"==typeof t){var o=R[e]||[];R[e]=[];for(var i=0;i<o.length;i++)o[i]!==t?R[e].push(o[i]):n=!0}else R[e]&&(R[e]=[],n=!0);return n},isBrowserSupported:function(){return!T()||function(){var e=U.navigator.userAgent;if(x()){if(null!==new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e))return parseFloat(RegExp.$1)}else if(b()&&null!==new RegExp("rv:([0-9]{1,}[.0-9]{0,})").exec(e))return parseFloat(RegExp.$1);return-1}()>=8},launchPopup:function(){return T()?function(){if(S)return!1;S=document.createElement("iframe");var e=U.domain+"/index.php?rm=box_select_proxy";return e+="&client_id="+U.clientId,e+="&link_type="+U.linkType,e+="&multiselect="+U.multiselect,U.headerPrompt&&(e+="&header_prompt="+encodeURIComponent(U.headerPrompt)),e+="&picker_id="+z,S.src=e,S.height="0px",S.width="0px",document.body.appendChild(S),!0}():r()},getButton:function(){return _},_destroy:function(){var e;e=window.addEventListener?"removeEventListener":"detachEvent",(0,window[e])("detachEvent"===e?"onmessage":"message",v,!1)}};return k=o,Y=[],(_=_||(_=document.getElementById("box-select")))?(L={clientId:(I=_).getAttribute("data-client-id"),linkType:I.getAttribute("data-link-type"),multiselect:I.getAttribute("data-multiselect"),headerPrompt:I.getAttribute("data-header-prompt"),domain:I.getAttribute("data-domain"),testMode:I.getAttribute("data-testmode")},0===(M=t(L)).length&&i(L),Y=M):(0===(A=t(P=(P=k)||{})).length&&i(P),Y=A,_=_||((_=document.createElement("div")).className="box-select",_)),U.testMode&&(h=/((https:\/\/(.+?\.)?(app\.[A-Za-z0-9]+\.inside-box\.net))|(https?:\/\/(.+?\.)?(localhost))((\/.*)?))/i),y(Y,O.isBrowserSupported()),B=window.addEventListener?"addEventListener":"attachEvent",(0,window[B])("attachEvent"===B?"onmessage":"message",v,!1),O}}();

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.