PageSourceSearch

https://www.nobledesktop.com/assets/mimi/ujs-8f26bc1106e7db57866f1…233df5e246d1e13de7170b457996255e9d3f4d53.js

js nobledesktop.com collected 2026-10-02 03:25:07 UTC 11,788 bytes, 1 lines download raw bytes

1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Rails=e()}(this,function(){"use strict";const t="a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",e={selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},n="select[data-remote], input[data-remote], textarea[data-remote]",a="form:not([data-turbo=true])",o="form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",r="input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",i="input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",u="input[name][type=file]:not([disabled])",c="a[data-disable-with], a[data-disable]",s="button[data-remote][data-disable-with], button[data-remote][data-disable]";let l=null;const d=()=>{const t=document.querySelector("meta[name=csp-nonce]");return l=t&&t.content},m=()=>l||d(),p=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,f=function(t,e){return e.exclude?p.call(t,e.selector)&&!p.call(t,e.exclude):p.call(t,e)},b="_ujsData",h=(t,e)=>t[b]?t[b][e]:void 0,y=function(t,e,n){return t[b]||(t[b]={}),t[b][e]=n},j=t=>Array.prototype.slice.call(document.querySelectorAll(t)),v=function(t){var e=!1;do{if(t.isContentEditable){e=!0;break}t=t.parentElement}while(t);return e},g=()=>{const t=document.querySelector("meta[name=csrf-token]");return t&&t.content},E=()=>{const t=document.querySelector("meta[name=csrf-param]");return t&&t.content},w=t=>{const e=g();if(e)return t.setRequestHeader("X-CSRF-Token",e)},x=()=>{const t=g(),e=E();if(t&&e)return j('form input[name="'+e+'"]').forEach(e=>e.value=t)},S={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},k=t=>{t=C(t);var e=T(t,function(){const n=A(null!=e.response?e.response:e.responseText,e.getResponseHeader("Content-Type"));return 2===Math.floor(e.status/100)?"function"==typeof t.success&&t.success(n,e.statusText,e):"function"==typeof t.error&&t.error(n,e.statusText,e),"function"==typeof t.complete?t.complete(e,e.statusText):void 0});return!(t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)};var C=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),t.dataType in S||(t.dataType="*"),t.accept=S[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},T=function(t,e){const n=new XMLHttpRequest;return n.open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||(n.setRequestHeader("X-Requested-With","XMLHttpRequest"),w(n)),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},A=function(t,e){if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/)){const e=document.createElement("script");e.setAttribute("nonce",m()),e.text=t,document.head.appendChild(e).parentNode.removeChild(e)}else if(e.match(/\b(xml|html|svg)\b/)){const n=new DOMParser;e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t};const D=t=>t.href,M=function(t){const e=document.createElement("a");e.href=location.href;const n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return!0}};let R,{CustomEvent:L}=window;"function"!=typeof L&&(L=function(t,e){const n=document.createEvent("CustomEvent");
1return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n},L.prototype=window.Event.prototype,({preventDefault:R}=L.prototype),L.prototype.preventDefault=function(){const t=R.call(this);return this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:()=>!0}),t});const q=(t,e,n)=>{const a=new L(e,{bubbles:!0,cancelable:!0,detail:n});return t.dispatchEvent(a),!a.defaultPrevented},H=t=>{q(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},P=(t,e,n,a)=>t.addEventListener(n,function(t){let{target:n}=t;for(;n instanceof Element&&!f(n,e);)n=n.parentNode;n instanceof Element&&!1===a.call(n,t)&&(t.preventDefault(),t.stopPropagation())}),O=t=>Array.prototype.slice.call(t),I=(t,e)=>{let n=[t];f(t,"form")&&(n=O(t.elements));const a=[];return n.forEach(function(t){t.name&&!t.disabled&&(f(t,"fieldset[disabled] *")||(f(t,"select")?O(t.options).forEach(function(e){e.selected&&a.push({name:t.name,value:e.value})}):(t.checked||-1===["radio","checkbox","submit"].indexOf(t.type))&&a.push({name:t.name,value:t.value})))}),e&&a.push(e),a.map(function(t){return t.name?`${encodeURIComponent(t.name)}=${encodeURIComponent(t.value)}`:t}).join("&")},N=(t,e)=>f(t,"form")?O(t.elements).filter(t=>f(t,e)):O(t.querySelectorAll(e)),X=t=>function(e){$(this,t)||H(e)};var $=function(t,e){let n;const a=t.getAttribute("data-confirm");if(!a)return!0;let o=!1;if(q(t,"confirm")){try{o=e.confirm(a,t)}catch(t){}n=q(t,"confirm:complete",[o])}return o&&n};const _=function(t){this.disabled&&H(t)},F=t=>{let e;if(t instanceof Event){if(V(t))return;e=t.target}else e=t;if(!v(e))return f(e,c)?G(e):f(e,s)||f(e,i)?J(e):f(e,a)?K(e):void 0},Q=t=>{const e=t instanceof Event?t.target:t;if(!v(e))return f(e,c)?U(e):f(e,s)||f(e,r)?B(e):f(e,a)?z(e):void 0};var U=function(t){if(h(t,"ujs:disabled"))return;const e=t.getAttribute("data-disable-with");return null!=e&&(y(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",H),y(t,"ujs:disabled",!0)},G=function(t){const e=h(t,"ujs:enable-with");return null!=e&&(t.innerHTML=e,y(t,"ujs:enable-with",null)),t.removeEventListener("click",H),y(t,"ujs:disabled",null)},z=t=>N(t,r).forEach(B),B=function(t){if(h(t,"ujs:disabled"))return;const e=t.getAttribute("data-disable-with");return null!=e&&(f(t,"button")?(y(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(y(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,y(t,"ujs:disabled",!0)},K=t=>N(t,i).forEach(t=>J(t)),J=function(t){const e=h(t,"ujs:enable-with");return null!=e&&(f(t,"button")?t.innerHTML=e:t.value=e,y(t,"ujs:enable-with",null)),t.disabled=!1,y(t,"ujs:disabled",null)},V=function(t){const e=t.detail?t.detail[0]:void 0;return e&&e.getResponseHeader("X-Xhr-Redirect")};const W=t=>function(e){const n=this,a=n.getAttribute("data-method");if(!a)return;if(v(this))return;const o=t.href(n),r=g(),i=E(),u=document.createElement("form");let c=`<input name='_method' value='${a}' type='hidden' />`;i&&r&&!M(o)&&(c+=`<input name='${i}' value='${r}' type='hidden' />`),c+='<input type="submit" />',u.method="post",u.action=o,u.target=n.target,u.innerHTML=c,u.style.display="none",document.body.appendChild(u),u.querySelector('[type="submit"]').click(),H(e)},Y=function(t){const e=t.getAttribute("data-remote");return null!=e&&"false"!==e},Z=t=>function(o){let r,i,u;const c=this;if(!Y(c))return!0;if(!q(c,"ajax:before"))return q(c,"ajax:stopped"),!1;if(v(c))return q(c,"ajax:stopped"),!1;const s=c.getAttribute("data-with-credentials"),l=c.getAttribute("data-type")||"script";if(f(c,a)){const t=h(c,"ujs:submit-button");i=h(c,"ujs:submit-button-formmethod")||c.getAttribute("method")||"get",u=h(c,"ujs:submit-button-formaction")||c.getAttribute("action")||location.href,"GET"===i.toUpperCase()&&(u=u.replace(/\?.*$/,"")),"multipart/form-data"===c.enctype?(r=new FormData(c),null!=t&&r.append(t.name,t.value)):r=I(c,t),y(c,"ujs:submit-button",null),y(c,"ujs:submit-button-formmethod",null),y(c,"ujs:submit-button-formaction",null)}else f(c,e)||f(c,n)?(i=c.getAttribute("data-method"),u=c.getAttribute("data-url"),r=I(c,c.getAttribute("data-params"))):(i=c.getAttribute("data-method"),u=t.href(c),r=c.getAttribute("data-params"));k({type:i||"GET",url:u,data:r,dataType:l,beforeSend:(t,e)=>q(c,"ajax:beforeSend",[t,e])?q(c,"ajax:send",[t]):(q(c,"ajax:stopped"),!1),success:(...t)=>q(c,"ajax:success",t),error:(...t)=>q(c,"ajax:error",t),complete:(...t)=>q(c,"ajax:complete",t),crossDomain:M(u),withCredentials:null!=s&&"false"!==s}),H(o)},tt=function(){const t=this,{form:e}=t;if(e)return t.name&&y(e,"ujs:submit-button",{name:t.name,value:t.value}),y(e,"ujs:formnovalidate-button",t.formNoValidate),y(e,"ujs:submit-button-formaction",t.getAttribute("formaction")),y(e,"ujs:submit-button-formmethod",t.getAttribute("formmethod"))},et=function(t){const e=this,n=(e.getAttribute("data-method")||"GET").toUpperCase(),a=e.getAttribute("data-params"),o=(t.metaKey||t.ctrlKey)&&"GET"===n&&!a;(null!=t.button&&0!==t.button||o)&&t.stopImmediatePropagation()},nt={$:j,ajax:k,buttonClickSelector:e,buttonDisableSelector:s,confirm:t=>
1window.confirm(t),cspNonce:m,csrfToken:g,csrfParam:E,CSRFProtection:w,delegate:P,disableElement:Q,enableElement:F,fileInputSelector:u,fire:q,formElements:N,formEnableSelector:i,formDisableSelector:r,formInputClickSelector:o,formSubmitButtonClick:tt,formSubmitSelector:a,getData:h,handleDisabledElement:_,href:D,inputChangeSelector:n,isCrossDomain:M,linkClickSelector:t,linkDisableSelector:c,loadCSPNonce:d,matches:f,preventInsignificantClick:et,refreshCSRFTokens:x,serializeElement:I,setData:y,stopEverything:H},at=X(nt);nt.handleConfirm=at;const ot=W(nt);nt.handleMethod=ot;const rt=Z(nt);nt.handleRemote=rt;const it=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",function(){j(i).forEach(function(t){h(t,"ujs:disabled")&&F(t)}),j(c).forEach(function(t){h(t,"ujs:disabled")&&F(t)})}),P(document,c,"ajax:complete",F),P(document,c,"ajax:stopped",F),P(document,s,"ajax:complete",F),P(document,s,"ajax:stopped",F),P(document,t,"click",et),P(document,t,"click",_),P(document,t,"click",at),P(document,t,"click",Q),P(document,t,"click",rt),P(document,t,"click",ot),P(document,e,"click",et),P(document,e,"click",_),P(document,e,"click",at),P(document,e,"click",Q),P(document,e,"click",rt),P(document,n,"change",_),P(document,n,"change",at),P(document,n,"change",rt),P(document,a,"submit",_),P(document,a,"submit",at),P(document,a,"submit",rt),P(document,a,"submit",t=>setTimeout(()=>Q(t),13)),P(document,a,"ajax:send",Q),P(document,a,"ajax:complete",F),P(document,o,"click",et),P(document,o,"click",_),P(document,o,"click",at),P(document,o,"click",tt),document.addEventListener("DOMContentLoaded",x),document.addEventListener("DOMContentLoaded",d),window._rails_loaded=!0};if(nt.start=it,"undefined"!=typeof jQuery&&jQuery&&jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=nt,jQuery.ajaxPrefilter(function(t,e,n){if(!t.crossDomain)return w(n)})}return"object"!=typeof exports&&"undefined"==typeof module&&(window.Rails=nt,q(document,"rails:attachBindings")&&it()),nt});

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.