PageSourceSearch

https://www.rails.com/cdn/shop/t/1622/assets/index-vite-B-_vkCL2.js

js rails.com collected 2026-09-25 14:09:46 UTC 1,833 bytes, 2 lines download raw bytes

1import{g as m}from"./_commonjsHelpers-vite-BosuxZz1.js";var x=/^(?:submit|button|image|reset|file)$/i,y=/^(?:input|select|textarea|keygen)/i,g=/(\[[^\[\]]*\])/g;function A(a,r){typeof r!="object"?r={hash:!!r}:r.hash===void 0&&(r.hash=!0);for(var i=r.hash?{}:"",f=r.serializer||(r.hash?C:N),h=a&&a.elements?a.elements:[],c=Object.create(null),d=0;d<h.length;++d){var e=h[d];if(!(!r.disabled&&e.disabled||!e.name)&&!(!y.test(e.nodeName)||x.test(e.type))){var n=e.name,v=e.value;if((e.type==="checkbox"||e.type==="radio")&&!e.checked&&(v=void 0),r.empty){if(e.type==="checkbox"&&!e.checked&&(v=""),e.type==="radio"&&(!c[e.name]&&!e.checked?c[e.name]=!1:e.checked&&(c[e.name]=!0)),v==null&&e.type=="radio")continue}else if(!v)continue;if(e.type==="select-multiple"){v=[];for(var p=e.options,u=!1,b=0;b<p.length;++b){var _=p[b],t=r.empty&&!_.value,z=_.value||t;_.selected&&z&&(u=!0,r.hash&&n.slice(n.length-2)!=="[]"?i=f(i,n+"[]",_.value):i=f(i,n,_.value))}!u&&r.empty&&(i=f(i,n,""));continue}i=f(i,n,v)}}if(r.empty)for(var n in c)c[n]||(i=f(i,n,""));return i}function w(a){var r=[],i=/^([^\[\]]*)/,f=new RegExp(g),h=i.exec(a);for(h[1]&&r.push(h[1]);(h=f.exec(a))!==null;)r.push(h[1]);return r}function s(a,r,i){if(r.length===0)return a=i,a;var f=r.shift(),h=f.match(/^\[(.+?)\]$/);if(f==="[]")return a=a||[],Array.isArray(a)?a.push(s(null,r,i)):(a._values=a._values||[],a._values.push(s(null,r,i))),a;if(!h)a[f]=s(a[f],r,i);else{var c=h[1],d=+c;isNaN(d)?(a=a||{},a[c]=s(a[c],r,i)):(a=a||[],a[d]=s(a[d],r,i))}return a}function C(a,r,i){var f=r.match(g);if(f){var h=w(r);s(a,h,i)}else{var c=a[r];c?(Array.isArray(c)||(a[r]=[c]),a[r].push(i)):a[r]=i}return a}function N(a,r,i){return i=i.replace(/(\r)?\n/g,`\r
2`),i=encodeURIComponent(i),i=i.replace(/%20/g,"+"),a+(a?"&":"")+encodeURIComponent(r)+"="+i}var R=A;const o=m(R);export{o as s};

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.