/**
 * Bundled from fast-sort
 * This is a zero-dependency bundle created by esbuild.
 */
"use strict";var I=Object.defineProperty;var a=(r,n)=>I(r,"name",{value:n,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0});var A=a(function(r){return function(n,e,u){return r(n,e,u)*u}},"castComparer"),g=a(function(r,n){if(r)throw Error("Invalid sort config: "+n)},"throwInvalidConfigErrorIfTrue"),P=a(function(r){var n=r||{},e=n.asc,u=n.desc,t=e?1:-1,i=e||u;g(!i,"Expected `asc` or `desc` property"),g(e&&u,"Ambiguous object with `asc` and `desc` config properties");var c=r.comparer&&A(r.comparer);return{order:t,sortBy:i,comparer:c}},"unpackObjectSorter"),_=a(function(r){return a(function n(e,u,t,i,c,f,o){var l,v;if(typeof e=="string")l=f[e],v=o[e];else if(typeof e=="function")l=e(f),v=e(o);else{var p=P(e);return n(p.sortBy,u,t,p.order,p.comparer||r,f,o)}var S=c(l,v,i);return(S===0||l==null&&v==null)&&u.length>t?n(u[t],u,t+1,i,c,f,o):S},"multiPropertySorter")},"multiPropertySorterProvider");function w(r,n,e){if(r===void 0||r===!0)return function(i,c){return n(i,c,e)};if(typeof r=="string")return g(r.includes("."),"String syntax not allowed for nested properties."),function(i,c){return n(i[r],c[r],e)};if(typeof r=="function")return function(i,c){return n(r(i),r(c),e)};if(Array.isArray(r)){var u=_(n);return function(i,c){return u(r[0],r,1,e,n,i,c)}}var t=P(r);return w(t.sortBy,t.comparer||n,t.order)}a(w,"getSortStrategy");var d=a(function(r,n,e,u){var t;return Array.isArray(n)?(Array.isArray(e)&&e.length<2&&(t=e,e=t[0]),n.sort(w(e,u,r))):n},"sortArray");function s(r){var n=A(r.comparer);return function(e){var u=Array.isArray(e)&&!r.inPlaceSorting?e.slice():e;return{asc:a(function(t){return d(1,u,t,n)},"asc"),desc:a(function(t){return d(-1,u,t,n)},"desc"),by:a(function(t){return d(1,u,t,n)},"by")}}}a(s,"createNewSortInstance");var m=a(function(r,n,e){return r==null?e:n==null?-e:typeof r!=typeof n?typeof r<typeof n?-1:1:r<n?-1:r>n?1:0},"defaultComparer"),C=s({comparer:m}),E=s({comparer:m,inPlaceSorting:!0});exports.createNewSortInstance=s;exports.defaultComparer=m;exports.inPlaceSort=E;exports.sort=C;
