bootstrap-table-multiple-sort.js 130 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('jquery')) :
  3. typeof define === 'function' && define.amd ? define(['jquery'], factory) :
  4. (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jQuery));
  5. })(this, (function ($) { 'use strict';
  6. function _typeof(o) {
  7. "@babel/helpers - typeof";
  8. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  9. return typeof o;
  10. } : function (o) {
  11. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  12. }, _typeof(o);
  13. }
  14. var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
  15. var es_array_concat = {};
  16. var globalThis_1;
  17. var hasRequiredGlobalThis;
  18. function requireGlobalThis () {
  19. if (hasRequiredGlobalThis) return globalThis_1;
  20. hasRequiredGlobalThis = 1;
  21. var check = function (it) {
  22. return it && it.Math === Math && it;
  23. };
  24. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  25. globalThis_1 =
  26. // eslint-disable-next-line es/no-global-this -- safe
  27. check(typeof globalThis == 'object' && globalThis) ||
  28. check(typeof window == 'object' && window) ||
  29. // eslint-disable-next-line no-restricted-globals -- safe
  30. check(typeof self == 'object' && self) ||
  31. check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
  32. check(typeof globalThis_1 == 'object' && globalThis_1) ||
  33. // eslint-disable-next-line no-new-func -- fallback
  34. (function () { return this; })() || Function('return this')();
  35. return globalThis_1;
  36. }
  37. var objectGetOwnPropertyDescriptor = {};
  38. var fails;
  39. var hasRequiredFails;
  40. function requireFails () {
  41. if (hasRequiredFails) return fails;
  42. hasRequiredFails = 1;
  43. fails = function (exec) {
  44. try {
  45. return !!exec();
  46. } catch (error) {
  47. return true;
  48. }
  49. };
  50. return fails;
  51. }
  52. var descriptors;
  53. var hasRequiredDescriptors;
  54. function requireDescriptors () {
  55. if (hasRequiredDescriptors) return descriptors;
  56. hasRequiredDescriptors = 1;
  57. var fails = requireFails();
  58. // Detect IE8's incomplete defineProperty implementation
  59. descriptors = !fails(function () {
  60. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  61. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
  62. });
  63. return descriptors;
  64. }
  65. var functionBindNative;
  66. var hasRequiredFunctionBindNative;
  67. function requireFunctionBindNative () {
  68. if (hasRequiredFunctionBindNative) return functionBindNative;
  69. hasRequiredFunctionBindNative = 1;
  70. var fails = requireFails();
  71. functionBindNative = !fails(function () {
  72. // eslint-disable-next-line es/no-function-prototype-bind -- safe
  73. var test = (function () { /* empty */ }).bind();
  74. // eslint-disable-next-line no-prototype-builtins -- safe
  75. return typeof test != 'function' || test.hasOwnProperty('prototype');
  76. });
  77. return functionBindNative;
  78. }
  79. var functionCall;
  80. var hasRequiredFunctionCall;
  81. function requireFunctionCall () {
  82. if (hasRequiredFunctionCall) return functionCall;
  83. hasRequiredFunctionCall = 1;
  84. var NATIVE_BIND = requireFunctionBindNative();
  85. var call = Function.prototype.call;
  86. functionCall = NATIVE_BIND ? call.bind(call) : function () {
  87. return call.apply(call, arguments);
  88. };
  89. return functionCall;
  90. }
  91. var objectPropertyIsEnumerable = {};
  92. var hasRequiredObjectPropertyIsEnumerable;
  93. function requireObjectPropertyIsEnumerable () {
  94. if (hasRequiredObjectPropertyIsEnumerable) return objectPropertyIsEnumerable;
  95. hasRequiredObjectPropertyIsEnumerable = 1;
  96. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  97. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  98. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  99. // Nashorn ~ JDK8 bug
  100. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  101. // `Object.prototype.propertyIsEnumerable` method implementation
  102. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  103. objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  104. var descriptor = getOwnPropertyDescriptor(this, V);
  105. return !!descriptor && descriptor.enumerable;
  106. } : $propertyIsEnumerable;
  107. return objectPropertyIsEnumerable;
  108. }
  109. var createPropertyDescriptor;
  110. var hasRequiredCreatePropertyDescriptor;
  111. function requireCreatePropertyDescriptor () {
  112. if (hasRequiredCreatePropertyDescriptor) return createPropertyDescriptor;
  113. hasRequiredCreatePropertyDescriptor = 1;
  114. createPropertyDescriptor = function (bitmap, value) {
  115. return {
  116. enumerable: !(bitmap & 1),
  117. configurable: !(bitmap & 2),
  118. writable: !(bitmap & 4),
  119. value: value
  120. };
  121. };
  122. return createPropertyDescriptor;
  123. }
  124. var functionUncurryThis;
  125. var hasRequiredFunctionUncurryThis;
  126. function requireFunctionUncurryThis () {
  127. if (hasRequiredFunctionUncurryThis) return functionUncurryThis;
  128. hasRequiredFunctionUncurryThis = 1;
  129. var NATIVE_BIND = requireFunctionBindNative();
  130. var FunctionPrototype = Function.prototype;
  131. var call = FunctionPrototype.call;
  132. var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype.bind.bind(call, call);
  133. functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
  134. return function () {
  135. return call.apply(fn, arguments);
  136. };
  137. };
  138. return functionUncurryThis;
  139. }
  140. var classofRaw;
  141. var hasRequiredClassofRaw;
  142. function requireClassofRaw () {
  143. if (hasRequiredClassofRaw) return classofRaw;
  144. hasRequiredClassofRaw = 1;
  145. var uncurryThis = requireFunctionUncurryThis();
  146. var toString = uncurryThis({}.toString);
  147. var stringSlice = uncurryThis(''.slice);
  148. classofRaw = function (it) {
  149. return stringSlice(toString(it), 8, -1);
  150. };
  151. return classofRaw;
  152. }
  153. var indexedObject;
  154. var hasRequiredIndexedObject;
  155. function requireIndexedObject () {
  156. if (hasRequiredIndexedObject) return indexedObject;
  157. hasRequiredIndexedObject = 1;
  158. var uncurryThis = requireFunctionUncurryThis();
  159. var fails = requireFails();
  160. var classof = requireClassofRaw();
  161. var $Object = Object;
  162. var split = uncurryThis(''.split);
  163. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  164. indexedObject = fails(function () {
  165. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  166. // eslint-disable-next-line no-prototype-builtins -- safe
  167. return !$Object('z').propertyIsEnumerable(0);
  168. }) ? function (it) {
  169. return classof(it) === 'String' ? split(it, '') : $Object(it);
  170. } : $Object;
  171. return indexedObject;
  172. }
  173. var isNullOrUndefined;
  174. var hasRequiredIsNullOrUndefined;
  175. function requireIsNullOrUndefined () {
  176. if (hasRequiredIsNullOrUndefined) return isNullOrUndefined;
  177. hasRequiredIsNullOrUndefined = 1;
  178. // we can't use just `it == null` since of `document.all` special case
  179. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
  180. isNullOrUndefined = function (it) {
  181. return it === null || it === undefined;
  182. };
  183. return isNullOrUndefined;
  184. }
  185. var requireObjectCoercible;
  186. var hasRequiredRequireObjectCoercible;
  187. function requireRequireObjectCoercible () {
  188. if (hasRequiredRequireObjectCoercible) return requireObjectCoercible;
  189. hasRequiredRequireObjectCoercible = 1;
  190. var isNullOrUndefined = requireIsNullOrUndefined();
  191. var $TypeError = TypeError;
  192. // `RequireObjectCoercible` abstract operation
  193. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  194. requireObjectCoercible = function (it) {
  195. if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it);
  196. return it;
  197. };
  198. return requireObjectCoercible;
  199. }
  200. var toIndexedObject;
  201. var hasRequiredToIndexedObject;
  202. function requireToIndexedObject () {
  203. if (hasRequiredToIndexedObject) return toIndexedObject;
  204. hasRequiredToIndexedObject = 1;
  205. // toObject with fallback for non-array-like ES3 strings
  206. var IndexedObject = requireIndexedObject();
  207. var requireObjectCoercible = requireRequireObjectCoercible();
  208. toIndexedObject = function (it) {
  209. return IndexedObject(requireObjectCoercible(it));
  210. };
  211. return toIndexedObject;
  212. }
  213. var isCallable;
  214. var hasRequiredIsCallable;
  215. function requireIsCallable () {
  216. if (hasRequiredIsCallable) return isCallable;
  217. hasRequiredIsCallable = 1;
  218. // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
  219. var documentAll = typeof document == 'object' && document.all;
  220. // `IsCallable` abstract operation
  221. // https://tc39.es/ecma262/#sec-iscallable
  222. // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
  223. isCallable = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
  224. return typeof argument == 'function' || argument === documentAll;
  225. } : function (argument) {
  226. return typeof argument == 'function';
  227. };
  228. return isCallable;
  229. }
  230. var isObject;
  231. var hasRequiredIsObject;
  232. function requireIsObject () {
  233. if (hasRequiredIsObject) return isObject;
  234. hasRequiredIsObject = 1;
  235. var isCallable = requireIsCallable();
  236. isObject = function (it) {
  237. return typeof it == 'object' ? it !== null : isCallable(it);
  238. };
  239. return isObject;
  240. }
  241. var getBuiltIn;
  242. var hasRequiredGetBuiltIn;
  243. function requireGetBuiltIn () {
  244. if (hasRequiredGetBuiltIn) return getBuiltIn;
  245. hasRequiredGetBuiltIn = 1;
  246. var globalThis = requireGlobalThis();
  247. var isCallable = requireIsCallable();
  248. var aFunction = function (argument) {
  249. return isCallable(argument) ? argument : undefined;
  250. };
  251. getBuiltIn = function (namespace, method) {
  252. return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
  253. };
  254. return getBuiltIn;
  255. }
  256. var objectIsPrototypeOf;
  257. var hasRequiredObjectIsPrototypeOf;
  258. function requireObjectIsPrototypeOf () {
  259. if (hasRequiredObjectIsPrototypeOf) return objectIsPrototypeOf;
  260. hasRequiredObjectIsPrototypeOf = 1;
  261. var uncurryThis = requireFunctionUncurryThis();
  262. objectIsPrototypeOf = uncurryThis({}.isPrototypeOf);
  263. return objectIsPrototypeOf;
  264. }
  265. var environmentUserAgent;
  266. var hasRequiredEnvironmentUserAgent;
  267. function requireEnvironmentUserAgent () {
  268. if (hasRequiredEnvironmentUserAgent) return environmentUserAgent;
  269. hasRequiredEnvironmentUserAgent = 1;
  270. var globalThis = requireGlobalThis();
  271. var navigator = globalThis.navigator;
  272. var userAgent = navigator && navigator.userAgent;
  273. environmentUserAgent = userAgent ? String(userAgent) : '';
  274. return environmentUserAgent;
  275. }
  276. var environmentV8Version;
  277. var hasRequiredEnvironmentV8Version;
  278. function requireEnvironmentV8Version () {
  279. if (hasRequiredEnvironmentV8Version) return environmentV8Version;
  280. hasRequiredEnvironmentV8Version = 1;
  281. var globalThis = requireGlobalThis();
  282. var userAgent = requireEnvironmentUserAgent();
  283. var process = globalThis.process;
  284. var Deno = globalThis.Deno;
  285. var versions = process && process.versions || Deno && Deno.version;
  286. var v8 = versions && versions.v8;
  287. var match, version;
  288. if (v8) {
  289. match = v8.split('.');
  290. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  291. // but their correct versions are not interesting for us
  292. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  293. }
  294. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  295. // so check `userAgent` even if `.v8` exists, but 0
  296. if (!version && userAgent) {
  297. match = userAgent.match(/Edge\/(\d+)/);
  298. if (!match || match[1] >= 74) {
  299. match = userAgent.match(/Chrome\/(\d+)/);
  300. if (match) version = +match[1];
  301. }
  302. }
  303. environmentV8Version = version;
  304. return environmentV8Version;
  305. }
  306. var symbolConstructorDetection;
  307. var hasRequiredSymbolConstructorDetection;
  308. function requireSymbolConstructorDetection () {
  309. if (hasRequiredSymbolConstructorDetection) return symbolConstructorDetection;
  310. hasRequiredSymbolConstructorDetection = 1;
  311. /* eslint-disable es/no-symbol -- required for testing */
  312. var V8_VERSION = requireEnvironmentV8Version();
  313. var fails = requireFails();
  314. var globalThis = requireGlobalThis();
  315. var $String = globalThis.String;
  316. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  317. symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails(function () {
  318. var symbol = Symbol('symbol detection');
  319. // Chrome 38 Symbol has incorrect toString conversion
  320. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  321. // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
  322. // of course, fail.
  323. return !$String(symbol) || !(Object(symbol) instanceof Symbol) ||
  324. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  325. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  326. });
  327. return symbolConstructorDetection;
  328. }
  329. var useSymbolAsUid;
  330. var hasRequiredUseSymbolAsUid;
  331. function requireUseSymbolAsUid () {
  332. if (hasRequiredUseSymbolAsUid) return useSymbolAsUid;
  333. hasRequiredUseSymbolAsUid = 1;
  334. /* eslint-disable es/no-symbol -- required for testing */
  335. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  336. useSymbolAsUid = NATIVE_SYMBOL
  337. && !Symbol.sham
  338. && typeof Symbol.iterator == 'symbol';
  339. return useSymbolAsUid;
  340. }
  341. var isSymbol;
  342. var hasRequiredIsSymbol;
  343. function requireIsSymbol () {
  344. if (hasRequiredIsSymbol) return isSymbol;
  345. hasRequiredIsSymbol = 1;
  346. var getBuiltIn = requireGetBuiltIn();
  347. var isCallable = requireIsCallable();
  348. var isPrototypeOf = requireObjectIsPrototypeOf();
  349. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  350. var $Object = Object;
  351. isSymbol = USE_SYMBOL_AS_UID ? function (it) {
  352. return typeof it == 'symbol';
  353. } : function (it) {
  354. var $Symbol = getBuiltIn('Symbol');
  355. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it));
  356. };
  357. return isSymbol;
  358. }
  359. var tryToString;
  360. var hasRequiredTryToString;
  361. function requireTryToString () {
  362. if (hasRequiredTryToString) return tryToString;
  363. hasRequiredTryToString = 1;
  364. var $String = String;
  365. tryToString = function (argument) {
  366. try {
  367. return $String(argument);
  368. } catch (error) {
  369. return 'Object';
  370. }
  371. };
  372. return tryToString;
  373. }
  374. var aCallable;
  375. var hasRequiredACallable;
  376. function requireACallable () {
  377. if (hasRequiredACallable) return aCallable;
  378. hasRequiredACallable = 1;
  379. var isCallable = requireIsCallable();
  380. var tryToString = requireTryToString();
  381. var $TypeError = TypeError;
  382. // `Assert: IsCallable(argument) is true`
  383. aCallable = function (argument) {
  384. if (isCallable(argument)) return argument;
  385. throw new $TypeError(tryToString(argument) + ' is not a function');
  386. };
  387. return aCallable;
  388. }
  389. var getMethod;
  390. var hasRequiredGetMethod;
  391. function requireGetMethod () {
  392. if (hasRequiredGetMethod) return getMethod;
  393. hasRequiredGetMethod = 1;
  394. var aCallable = requireACallable();
  395. var isNullOrUndefined = requireIsNullOrUndefined();
  396. // `GetMethod` abstract operation
  397. // https://tc39.es/ecma262/#sec-getmethod
  398. getMethod = function (V, P) {
  399. var func = V[P];
  400. return isNullOrUndefined(func) ? undefined : aCallable(func);
  401. };
  402. return getMethod;
  403. }
  404. var ordinaryToPrimitive;
  405. var hasRequiredOrdinaryToPrimitive;
  406. function requireOrdinaryToPrimitive () {
  407. if (hasRequiredOrdinaryToPrimitive) return ordinaryToPrimitive;
  408. hasRequiredOrdinaryToPrimitive = 1;
  409. var call = requireFunctionCall();
  410. var isCallable = requireIsCallable();
  411. var isObject = requireIsObject();
  412. var $TypeError = TypeError;
  413. // `OrdinaryToPrimitive` abstract operation
  414. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  415. ordinaryToPrimitive = function (input, pref) {
  416. var fn, val;
  417. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  418. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  419. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  420. throw new $TypeError("Can't convert object to primitive value");
  421. };
  422. return ordinaryToPrimitive;
  423. }
  424. var sharedStore = {exports: {}};
  425. var isPure;
  426. var hasRequiredIsPure;
  427. function requireIsPure () {
  428. if (hasRequiredIsPure) return isPure;
  429. hasRequiredIsPure = 1;
  430. isPure = false;
  431. return isPure;
  432. }
  433. var defineGlobalProperty;
  434. var hasRequiredDefineGlobalProperty;
  435. function requireDefineGlobalProperty () {
  436. if (hasRequiredDefineGlobalProperty) return defineGlobalProperty;
  437. hasRequiredDefineGlobalProperty = 1;
  438. var globalThis = requireGlobalThis();
  439. // eslint-disable-next-line es/no-object-defineproperty -- safe
  440. var defineProperty = Object.defineProperty;
  441. defineGlobalProperty = function (key, value) {
  442. try {
  443. defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
  444. } catch (error) {
  445. globalThis[key] = value;
  446. } return value;
  447. };
  448. return defineGlobalProperty;
  449. }
  450. var hasRequiredSharedStore;
  451. function requireSharedStore () {
  452. if (hasRequiredSharedStore) return sharedStore.exports;
  453. hasRequiredSharedStore = 1;
  454. var IS_PURE = requireIsPure();
  455. var globalThis = requireGlobalThis();
  456. var defineGlobalProperty = requireDefineGlobalProperty();
  457. var SHARED = '__core-js_shared__';
  458. var store = sharedStore.exports = globalThis[SHARED] || defineGlobalProperty(SHARED, {});
  459. (store.versions || (store.versions = [])).push({
  460. version: '3.38.1',
  461. mode: IS_PURE ? 'pure' : 'global',
  462. copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
  463. license: 'https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE',
  464. source: 'https://github.com/zloirock/core-js'
  465. });
  466. return sharedStore.exports;
  467. }
  468. var shared;
  469. var hasRequiredShared;
  470. function requireShared () {
  471. if (hasRequiredShared) return shared;
  472. hasRequiredShared = 1;
  473. var store = requireSharedStore();
  474. shared = function (key, value) {
  475. return store[key] || (store[key] = value || {});
  476. };
  477. return shared;
  478. }
  479. var toObject;
  480. var hasRequiredToObject;
  481. function requireToObject () {
  482. if (hasRequiredToObject) return toObject;
  483. hasRequiredToObject = 1;
  484. var requireObjectCoercible = requireRequireObjectCoercible();
  485. var $Object = Object;
  486. // `ToObject` abstract operation
  487. // https://tc39.es/ecma262/#sec-toobject
  488. toObject = function (argument) {
  489. return $Object(requireObjectCoercible(argument));
  490. };
  491. return toObject;
  492. }
  493. var hasOwnProperty_1;
  494. var hasRequiredHasOwnProperty;
  495. function requireHasOwnProperty () {
  496. if (hasRequiredHasOwnProperty) return hasOwnProperty_1;
  497. hasRequiredHasOwnProperty = 1;
  498. var uncurryThis = requireFunctionUncurryThis();
  499. var toObject = requireToObject();
  500. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  501. // `HasOwnProperty` abstract operation
  502. // https://tc39.es/ecma262/#sec-hasownproperty
  503. // eslint-disable-next-line es/no-object-hasown -- safe
  504. hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
  505. return hasOwnProperty(toObject(it), key);
  506. };
  507. return hasOwnProperty_1;
  508. }
  509. var uid;
  510. var hasRequiredUid;
  511. function requireUid () {
  512. if (hasRequiredUid) return uid;
  513. hasRequiredUid = 1;
  514. var uncurryThis = requireFunctionUncurryThis();
  515. var id = 0;
  516. var postfix = Math.random();
  517. var toString = uncurryThis(1.0.toString);
  518. uid = function (key) {
  519. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  520. };
  521. return uid;
  522. }
  523. var wellKnownSymbol;
  524. var hasRequiredWellKnownSymbol;
  525. function requireWellKnownSymbol () {
  526. if (hasRequiredWellKnownSymbol) return wellKnownSymbol;
  527. hasRequiredWellKnownSymbol = 1;
  528. var globalThis = requireGlobalThis();
  529. var shared = requireShared();
  530. var hasOwn = requireHasOwnProperty();
  531. var uid = requireUid();
  532. var NATIVE_SYMBOL = requireSymbolConstructorDetection();
  533. var USE_SYMBOL_AS_UID = requireUseSymbolAsUid();
  534. var Symbol = globalThis.Symbol;
  535. var WellKnownSymbolsStore = shared('wks');
  536. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;
  537. wellKnownSymbol = function (name) {
  538. if (!hasOwn(WellKnownSymbolsStore, name)) {
  539. WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn(Symbol, name)
  540. ? Symbol[name]
  541. : createWellKnownSymbol('Symbol.' + name);
  542. } return WellKnownSymbolsStore[name];
  543. };
  544. return wellKnownSymbol;
  545. }
  546. var toPrimitive;
  547. var hasRequiredToPrimitive;
  548. function requireToPrimitive () {
  549. if (hasRequiredToPrimitive) return toPrimitive;
  550. hasRequiredToPrimitive = 1;
  551. var call = requireFunctionCall();
  552. var isObject = requireIsObject();
  553. var isSymbol = requireIsSymbol();
  554. var getMethod = requireGetMethod();
  555. var ordinaryToPrimitive = requireOrdinaryToPrimitive();
  556. var wellKnownSymbol = requireWellKnownSymbol();
  557. var $TypeError = TypeError;
  558. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  559. // `ToPrimitive` abstract operation
  560. // https://tc39.es/ecma262/#sec-toprimitive
  561. toPrimitive = function (input, pref) {
  562. if (!isObject(input) || isSymbol(input)) return input;
  563. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  564. var result;
  565. if (exoticToPrim) {
  566. if (pref === undefined) pref = 'default';
  567. result = call(exoticToPrim, input, pref);
  568. if (!isObject(result) || isSymbol(result)) return result;
  569. throw new $TypeError("Can't convert object to primitive value");
  570. }
  571. if (pref === undefined) pref = 'number';
  572. return ordinaryToPrimitive(input, pref);
  573. };
  574. return toPrimitive;
  575. }
  576. var toPropertyKey;
  577. var hasRequiredToPropertyKey;
  578. function requireToPropertyKey () {
  579. if (hasRequiredToPropertyKey) return toPropertyKey;
  580. hasRequiredToPropertyKey = 1;
  581. var toPrimitive = requireToPrimitive();
  582. var isSymbol = requireIsSymbol();
  583. // `ToPropertyKey` abstract operation
  584. // https://tc39.es/ecma262/#sec-topropertykey
  585. toPropertyKey = function (argument) {
  586. var key = toPrimitive(argument, 'string');
  587. return isSymbol(key) ? key : key + '';
  588. };
  589. return toPropertyKey;
  590. }
  591. var documentCreateElement;
  592. var hasRequiredDocumentCreateElement;
  593. function requireDocumentCreateElement () {
  594. if (hasRequiredDocumentCreateElement) return documentCreateElement;
  595. hasRequiredDocumentCreateElement = 1;
  596. var globalThis = requireGlobalThis();
  597. var isObject = requireIsObject();
  598. var document = globalThis.document;
  599. // typeof document.createElement is 'object' in old IE
  600. var EXISTS = isObject(document) && isObject(document.createElement);
  601. documentCreateElement = function (it) {
  602. return EXISTS ? document.createElement(it) : {};
  603. };
  604. return documentCreateElement;
  605. }
  606. var ie8DomDefine;
  607. var hasRequiredIe8DomDefine;
  608. function requireIe8DomDefine () {
  609. if (hasRequiredIe8DomDefine) return ie8DomDefine;
  610. hasRequiredIe8DomDefine = 1;
  611. var DESCRIPTORS = requireDescriptors();
  612. var fails = requireFails();
  613. var createElement = requireDocumentCreateElement();
  614. // Thanks to IE8 for its funny defineProperty
  615. ie8DomDefine = !DESCRIPTORS && !fails(function () {
  616. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  617. return Object.defineProperty(createElement('div'), 'a', {
  618. get: function () { return 7; }
  619. }).a !== 7;
  620. });
  621. return ie8DomDefine;
  622. }
  623. var hasRequiredObjectGetOwnPropertyDescriptor;
  624. function requireObjectGetOwnPropertyDescriptor () {
  625. if (hasRequiredObjectGetOwnPropertyDescriptor) return objectGetOwnPropertyDescriptor;
  626. hasRequiredObjectGetOwnPropertyDescriptor = 1;
  627. var DESCRIPTORS = requireDescriptors();
  628. var call = requireFunctionCall();
  629. var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  630. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  631. var toIndexedObject = requireToIndexedObject();
  632. var toPropertyKey = requireToPropertyKey();
  633. var hasOwn = requireHasOwnProperty();
  634. var IE8_DOM_DEFINE = requireIe8DomDefine();
  635. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  636. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  637. // `Object.getOwnPropertyDescriptor` method
  638. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  639. objectGetOwnPropertyDescriptor.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  640. O = toIndexedObject(O);
  641. P = toPropertyKey(P);
  642. if (IE8_DOM_DEFINE) try {
  643. return $getOwnPropertyDescriptor(O, P);
  644. } catch (error) { /* empty */ }
  645. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  646. };
  647. return objectGetOwnPropertyDescriptor;
  648. }
  649. var objectDefineProperty = {};
  650. var v8PrototypeDefineBug;
  651. var hasRequiredV8PrototypeDefineBug;
  652. function requireV8PrototypeDefineBug () {
  653. if (hasRequiredV8PrototypeDefineBug) return v8PrototypeDefineBug;
  654. hasRequiredV8PrototypeDefineBug = 1;
  655. var DESCRIPTORS = requireDescriptors();
  656. var fails = requireFails();
  657. // V8 ~ Chrome 36-
  658. // https://bugs.chromium.org/p/v8/issues/detail?id=3334
  659. v8PrototypeDefineBug = DESCRIPTORS && fails(function () {
  660. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  661. return Object.defineProperty(function () { /* empty */ }, 'prototype', {
  662. value: 42,
  663. writable: false
  664. }).prototype !== 42;
  665. });
  666. return v8PrototypeDefineBug;
  667. }
  668. var anObject;
  669. var hasRequiredAnObject;
  670. function requireAnObject () {
  671. if (hasRequiredAnObject) return anObject;
  672. hasRequiredAnObject = 1;
  673. var isObject = requireIsObject();
  674. var $String = String;
  675. var $TypeError = TypeError;
  676. // `Assert: Type(argument) is Object`
  677. anObject = function (argument) {
  678. if (isObject(argument)) return argument;
  679. throw new $TypeError($String(argument) + ' is not an object');
  680. };
  681. return anObject;
  682. }
  683. var hasRequiredObjectDefineProperty;
  684. function requireObjectDefineProperty () {
  685. if (hasRequiredObjectDefineProperty) return objectDefineProperty;
  686. hasRequiredObjectDefineProperty = 1;
  687. var DESCRIPTORS = requireDescriptors();
  688. var IE8_DOM_DEFINE = requireIe8DomDefine();
  689. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  690. var anObject = requireAnObject();
  691. var toPropertyKey = requireToPropertyKey();
  692. var $TypeError = TypeError;
  693. // eslint-disable-next-line es/no-object-defineproperty -- safe
  694. var $defineProperty = Object.defineProperty;
  695. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  696. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  697. var ENUMERABLE = 'enumerable';
  698. var CONFIGURABLE = 'configurable';
  699. var WRITABLE = 'writable';
  700. // `Object.defineProperty` method
  701. // https://tc39.es/ecma262/#sec-object.defineproperty
  702. objectDefineProperty.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
  703. anObject(O);
  704. P = toPropertyKey(P);
  705. anObject(Attributes);
  706. if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
  707. var current = $getOwnPropertyDescriptor(O, P);
  708. if (current && current[WRITABLE]) {
  709. O[P] = Attributes.value;
  710. Attributes = {
  711. configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
  712. enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
  713. writable: false
  714. };
  715. }
  716. } return $defineProperty(O, P, Attributes);
  717. } : $defineProperty : function defineProperty(O, P, Attributes) {
  718. anObject(O);
  719. P = toPropertyKey(P);
  720. anObject(Attributes);
  721. if (IE8_DOM_DEFINE) try {
  722. return $defineProperty(O, P, Attributes);
  723. } catch (error) { /* empty */ }
  724. if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported');
  725. if ('value' in Attributes) O[P] = Attributes.value;
  726. return O;
  727. };
  728. return objectDefineProperty;
  729. }
  730. var createNonEnumerableProperty;
  731. var hasRequiredCreateNonEnumerableProperty;
  732. function requireCreateNonEnumerableProperty () {
  733. if (hasRequiredCreateNonEnumerableProperty) return createNonEnumerableProperty;
  734. hasRequiredCreateNonEnumerableProperty = 1;
  735. var DESCRIPTORS = requireDescriptors();
  736. var definePropertyModule = requireObjectDefineProperty();
  737. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  738. createNonEnumerableProperty = DESCRIPTORS ? function (object, key, value) {
  739. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  740. } : function (object, key, value) {
  741. object[key] = value;
  742. return object;
  743. };
  744. return createNonEnumerableProperty;
  745. }
  746. var makeBuiltIn = {exports: {}};
  747. var functionName;
  748. var hasRequiredFunctionName;
  749. function requireFunctionName () {
  750. if (hasRequiredFunctionName) return functionName;
  751. hasRequiredFunctionName = 1;
  752. var DESCRIPTORS = requireDescriptors();
  753. var hasOwn = requireHasOwnProperty();
  754. var FunctionPrototype = Function.prototype;
  755. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  756. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  757. var EXISTS = hasOwn(FunctionPrototype, 'name');
  758. // additional protection from minified / mangled / dropped function names
  759. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  760. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  761. functionName = {
  762. EXISTS: EXISTS,
  763. PROPER: PROPER,
  764. CONFIGURABLE: CONFIGURABLE
  765. };
  766. return functionName;
  767. }
  768. var inspectSource;
  769. var hasRequiredInspectSource;
  770. function requireInspectSource () {
  771. if (hasRequiredInspectSource) return inspectSource;
  772. hasRequiredInspectSource = 1;
  773. var uncurryThis = requireFunctionUncurryThis();
  774. var isCallable = requireIsCallable();
  775. var store = requireSharedStore();
  776. var functionToString = uncurryThis(Function.toString);
  777. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  778. if (!isCallable(store.inspectSource)) {
  779. store.inspectSource = function (it) {
  780. return functionToString(it);
  781. };
  782. }
  783. inspectSource = store.inspectSource;
  784. return inspectSource;
  785. }
  786. var weakMapBasicDetection;
  787. var hasRequiredWeakMapBasicDetection;
  788. function requireWeakMapBasicDetection () {
  789. if (hasRequiredWeakMapBasicDetection) return weakMapBasicDetection;
  790. hasRequiredWeakMapBasicDetection = 1;
  791. var globalThis = requireGlobalThis();
  792. var isCallable = requireIsCallable();
  793. var WeakMap = globalThis.WeakMap;
  794. weakMapBasicDetection = isCallable(WeakMap) && /native code/.test(String(WeakMap));
  795. return weakMapBasicDetection;
  796. }
  797. var sharedKey;
  798. var hasRequiredSharedKey;
  799. function requireSharedKey () {
  800. if (hasRequiredSharedKey) return sharedKey;
  801. hasRequiredSharedKey = 1;
  802. var shared = requireShared();
  803. var uid = requireUid();
  804. var keys = shared('keys');
  805. sharedKey = function (key) {
  806. return keys[key] || (keys[key] = uid(key));
  807. };
  808. return sharedKey;
  809. }
  810. var hiddenKeys;
  811. var hasRequiredHiddenKeys;
  812. function requireHiddenKeys () {
  813. if (hasRequiredHiddenKeys) return hiddenKeys;
  814. hasRequiredHiddenKeys = 1;
  815. hiddenKeys = {};
  816. return hiddenKeys;
  817. }
  818. var internalState;
  819. var hasRequiredInternalState;
  820. function requireInternalState () {
  821. if (hasRequiredInternalState) return internalState;
  822. hasRequiredInternalState = 1;
  823. var NATIVE_WEAK_MAP = requireWeakMapBasicDetection();
  824. var globalThis = requireGlobalThis();
  825. var isObject = requireIsObject();
  826. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  827. var hasOwn = requireHasOwnProperty();
  828. var shared = requireSharedStore();
  829. var sharedKey = requireSharedKey();
  830. var hiddenKeys = requireHiddenKeys();
  831. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  832. var TypeError = globalThis.TypeError;
  833. var WeakMap = globalThis.WeakMap;
  834. var set, get, has;
  835. var enforce = function (it) {
  836. return has(it) ? get(it) : set(it, {});
  837. };
  838. var getterFor = function (TYPE) {
  839. return function (it) {
  840. var state;
  841. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  842. throw new TypeError('Incompatible receiver, ' + TYPE + ' required');
  843. } return state;
  844. };
  845. };
  846. if (NATIVE_WEAK_MAP || shared.state) {
  847. var store = shared.state || (shared.state = new WeakMap());
  848. /* eslint-disable no-self-assign -- prototype methods protection */
  849. store.get = store.get;
  850. store.has = store.has;
  851. store.set = store.set;
  852. /* eslint-enable no-self-assign -- prototype methods protection */
  853. set = function (it, metadata) {
  854. if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  855. metadata.facade = it;
  856. store.set(it, metadata);
  857. return metadata;
  858. };
  859. get = function (it) {
  860. return store.get(it) || {};
  861. };
  862. has = function (it) {
  863. return store.has(it);
  864. };
  865. } else {
  866. var STATE = sharedKey('state');
  867. hiddenKeys[STATE] = true;
  868. set = function (it, metadata) {
  869. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  870. metadata.facade = it;
  871. createNonEnumerableProperty(it, STATE, metadata);
  872. return metadata;
  873. };
  874. get = function (it) {
  875. return hasOwn(it, STATE) ? it[STATE] : {};
  876. };
  877. has = function (it) {
  878. return hasOwn(it, STATE);
  879. };
  880. }
  881. internalState = {
  882. set: set,
  883. get: get,
  884. has: has,
  885. enforce: enforce,
  886. getterFor: getterFor
  887. };
  888. return internalState;
  889. }
  890. var hasRequiredMakeBuiltIn;
  891. function requireMakeBuiltIn () {
  892. if (hasRequiredMakeBuiltIn) return makeBuiltIn.exports;
  893. hasRequiredMakeBuiltIn = 1;
  894. var uncurryThis = requireFunctionUncurryThis();
  895. var fails = requireFails();
  896. var isCallable = requireIsCallable();
  897. var hasOwn = requireHasOwnProperty();
  898. var DESCRIPTORS = requireDescriptors();
  899. var CONFIGURABLE_FUNCTION_NAME = requireFunctionName().CONFIGURABLE;
  900. var inspectSource = requireInspectSource();
  901. var InternalStateModule = requireInternalState();
  902. var enforceInternalState = InternalStateModule.enforce;
  903. var getInternalState = InternalStateModule.get;
  904. var $String = String;
  905. // eslint-disable-next-line es/no-object-defineproperty -- safe
  906. var defineProperty = Object.defineProperty;
  907. var stringSlice = uncurryThis(''.slice);
  908. var replace = uncurryThis(''.replace);
  909. var join = uncurryThis([].join);
  910. var CONFIGURABLE_LENGTH = DESCRIPTORS && !fails(function () {
  911. return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
  912. });
  913. var TEMPLATE = String(String).split('String');
  914. var makeBuiltIn$1 = makeBuiltIn.exports = function (value, name, options) {
  915. if (stringSlice($String(name), 0, 7) === 'Symbol(') {
  916. name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
  917. }
  918. if (options && options.getter) name = 'get ' + name;
  919. if (options && options.setter) name = 'set ' + name;
  920. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  921. if (DESCRIPTORS) defineProperty(value, 'name', { value: name, configurable: true });
  922. else value.name = name;
  923. }
  924. if (CONFIGURABLE_LENGTH && options && hasOwn(options, 'arity') && value.length !== options.arity) {
  925. defineProperty(value, 'length', { value: options.arity });
  926. }
  927. try {
  928. if (options && hasOwn(options, 'constructor') && options.constructor) {
  929. if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
  930. // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
  931. } else if (value.prototype) value.prototype = undefined;
  932. } catch (error) { /* empty */ }
  933. var state = enforceInternalState(value);
  934. if (!hasOwn(state, 'source')) {
  935. state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
  936. } return value;
  937. };
  938. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  939. // eslint-disable-next-line no-extend-native -- required
  940. Function.prototype.toString = makeBuiltIn$1(function toString() {
  941. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  942. }, 'toString');
  943. return makeBuiltIn.exports;
  944. }
  945. var defineBuiltIn;
  946. var hasRequiredDefineBuiltIn;
  947. function requireDefineBuiltIn () {
  948. if (hasRequiredDefineBuiltIn) return defineBuiltIn;
  949. hasRequiredDefineBuiltIn = 1;
  950. var isCallable = requireIsCallable();
  951. var definePropertyModule = requireObjectDefineProperty();
  952. var makeBuiltIn = requireMakeBuiltIn();
  953. var defineGlobalProperty = requireDefineGlobalProperty();
  954. defineBuiltIn = function (O, key, value, options) {
  955. if (!options) options = {};
  956. var simple = options.enumerable;
  957. var name = options.name !== undefined ? options.name : key;
  958. if (isCallable(value)) makeBuiltIn(value, name, options);
  959. if (options.global) {
  960. if (simple) O[key] = value;
  961. else defineGlobalProperty(key, value);
  962. } else {
  963. try {
  964. if (!options.unsafe) delete O[key];
  965. else if (O[key]) simple = true;
  966. } catch (error) { /* empty */ }
  967. if (simple) O[key] = value;
  968. else definePropertyModule.f(O, key, {
  969. value: value,
  970. enumerable: false,
  971. configurable: !options.nonConfigurable,
  972. writable: !options.nonWritable
  973. });
  974. } return O;
  975. };
  976. return defineBuiltIn;
  977. }
  978. var objectGetOwnPropertyNames = {};
  979. var mathTrunc;
  980. var hasRequiredMathTrunc;
  981. function requireMathTrunc () {
  982. if (hasRequiredMathTrunc) return mathTrunc;
  983. hasRequiredMathTrunc = 1;
  984. var ceil = Math.ceil;
  985. var floor = Math.floor;
  986. // `Math.trunc` method
  987. // https://tc39.es/ecma262/#sec-math.trunc
  988. // eslint-disable-next-line es/no-math-trunc -- safe
  989. mathTrunc = Math.trunc || function trunc(x) {
  990. var n = +x;
  991. return (n > 0 ? floor : ceil)(n);
  992. };
  993. return mathTrunc;
  994. }
  995. var toIntegerOrInfinity;
  996. var hasRequiredToIntegerOrInfinity;
  997. function requireToIntegerOrInfinity () {
  998. if (hasRequiredToIntegerOrInfinity) return toIntegerOrInfinity;
  999. hasRequiredToIntegerOrInfinity = 1;
  1000. var trunc = requireMathTrunc();
  1001. // `ToIntegerOrInfinity` abstract operation
  1002. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  1003. toIntegerOrInfinity = function (argument) {
  1004. var number = +argument;
  1005. // eslint-disable-next-line no-self-compare -- NaN check
  1006. return number !== number || number === 0 ? 0 : trunc(number);
  1007. };
  1008. return toIntegerOrInfinity;
  1009. }
  1010. var toAbsoluteIndex;
  1011. var hasRequiredToAbsoluteIndex;
  1012. function requireToAbsoluteIndex () {
  1013. if (hasRequiredToAbsoluteIndex) return toAbsoluteIndex;
  1014. hasRequiredToAbsoluteIndex = 1;
  1015. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1016. var max = Math.max;
  1017. var min = Math.min;
  1018. // Helper for a popular repeating case of the spec:
  1019. // Let integer be ? ToInteger(index).
  1020. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  1021. toAbsoluteIndex = function (index, length) {
  1022. var integer = toIntegerOrInfinity(index);
  1023. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  1024. };
  1025. return toAbsoluteIndex;
  1026. }
  1027. var toLength;
  1028. var hasRequiredToLength;
  1029. function requireToLength () {
  1030. if (hasRequiredToLength) return toLength;
  1031. hasRequiredToLength = 1;
  1032. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  1033. var min = Math.min;
  1034. // `ToLength` abstract operation
  1035. // https://tc39.es/ecma262/#sec-tolength
  1036. toLength = function (argument) {
  1037. var len = toIntegerOrInfinity(argument);
  1038. return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  1039. };
  1040. return toLength;
  1041. }
  1042. var lengthOfArrayLike;
  1043. var hasRequiredLengthOfArrayLike;
  1044. function requireLengthOfArrayLike () {
  1045. if (hasRequiredLengthOfArrayLike) return lengthOfArrayLike;
  1046. hasRequiredLengthOfArrayLike = 1;
  1047. var toLength = requireToLength();
  1048. // `LengthOfArrayLike` abstract operation
  1049. // https://tc39.es/ecma262/#sec-lengthofarraylike
  1050. lengthOfArrayLike = function (obj) {
  1051. return toLength(obj.length);
  1052. };
  1053. return lengthOfArrayLike;
  1054. }
  1055. var arrayIncludes;
  1056. var hasRequiredArrayIncludes;
  1057. function requireArrayIncludes () {
  1058. if (hasRequiredArrayIncludes) return arrayIncludes;
  1059. hasRequiredArrayIncludes = 1;
  1060. var toIndexedObject = requireToIndexedObject();
  1061. var toAbsoluteIndex = requireToAbsoluteIndex();
  1062. var lengthOfArrayLike = requireLengthOfArrayLike();
  1063. // `Array.prototype.{ indexOf, includes }` methods implementation
  1064. var createMethod = function (IS_INCLUDES) {
  1065. return function ($this, el, fromIndex) {
  1066. var O = toIndexedObject($this);
  1067. var length = lengthOfArrayLike(O);
  1068. if (length === 0) return !IS_INCLUDES && -1;
  1069. var index = toAbsoluteIndex(fromIndex, length);
  1070. var value;
  1071. // Array#includes uses SameValueZero equality algorithm
  1072. // eslint-disable-next-line no-self-compare -- NaN check
  1073. if (IS_INCLUDES && el !== el) while (length > index) {
  1074. value = O[index++];
  1075. // eslint-disable-next-line no-self-compare -- NaN check
  1076. if (value !== value) return true;
  1077. // Array#indexOf ignores holes, Array#includes - not
  1078. } else for (;length > index; index++) {
  1079. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  1080. } return !IS_INCLUDES && -1;
  1081. };
  1082. };
  1083. arrayIncludes = {
  1084. // `Array.prototype.includes` method
  1085. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1086. includes: createMethod(true),
  1087. // `Array.prototype.indexOf` method
  1088. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1089. indexOf: createMethod(false)
  1090. };
  1091. return arrayIncludes;
  1092. }
  1093. var objectKeysInternal;
  1094. var hasRequiredObjectKeysInternal;
  1095. function requireObjectKeysInternal () {
  1096. if (hasRequiredObjectKeysInternal) return objectKeysInternal;
  1097. hasRequiredObjectKeysInternal = 1;
  1098. var uncurryThis = requireFunctionUncurryThis();
  1099. var hasOwn = requireHasOwnProperty();
  1100. var toIndexedObject = requireToIndexedObject();
  1101. var indexOf = requireArrayIncludes().indexOf;
  1102. var hiddenKeys = requireHiddenKeys();
  1103. var push = uncurryThis([].push);
  1104. objectKeysInternal = function (object, names) {
  1105. var O = toIndexedObject(object);
  1106. var i = 0;
  1107. var result = [];
  1108. var key;
  1109. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  1110. // Don't enum bug & hidden keys
  1111. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  1112. ~indexOf(result, key) || push(result, key);
  1113. }
  1114. return result;
  1115. };
  1116. return objectKeysInternal;
  1117. }
  1118. var enumBugKeys;
  1119. var hasRequiredEnumBugKeys;
  1120. function requireEnumBugKeys () {
  1121. if (hasRequiredEnumBugKeys) return enumBugKeys;
  1122. hasRequiredEnumBugKeys = 1;
  1123. // IE8- don't enum bug keys
  1124. enumBugKeys = [
  1125. 'constructor',
  1126. 'hasOwnProperty',
  1127. 'isPrototypeOf',
  1128. 'propertyIsEnumerable',
  1129. 'toLocaleString',
  1130. 'toString',
  1131. 'valueOf'
  1132. ];
  1133. return enumBugKeys;
  1134. }
  1135. var hasRequiredObjectGetOwnPropertyNames;
  1136. function requireObjectGetOwnPropertyNames () {
  1137. if (hasRequiredObjectGetOwnPropertyNames) return objectGetOwnPropertyNames;
  1138. hasRequiredObjectGetOwnPropertyNames = 1;
  1139. var internalObjectKeys = requireObjectKeysInternal();
  1140. var enumBugKeys = requireEnumBugKeys();
  1141. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  1142. // `Object.getOwnPropertyNames` method
  1143. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  1144. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  1145. objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  1146. return internalObjectKeys(O, hiddenKeys);
  1147. };
  1148. return objectGetOwnPropertyNames;
  1149. }
  1150. var objectGetOwnPropertySymbols = {};
  1151. var hasRequiredObjectGetOwnPropertySymbols;
  1152. function requireObjectGetOwnPropertySymbols () {
  1153. if (hasRequiredObjectGetOwnPropertySymbols) return objectGetOwnPropertySymbols;
  1154. hasRequiredObjectGetOwnPropertySymbols = 1;
  1155. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  1156. objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
  1157. return objectGetOwnPropertySymbols;
  1158. }
  1159. var ownKeys;
  1160. var hasRequiredOwnKeys;
  1161. function requireOwnKeys () {
  1162. if (hasRequiredOwnKeys) return ownKeys;
  1163. hasRequiredOwnKeys = 1;
  1164. var getBuiltIn = requireGetBuiltIn();
  1165. var uncurryThis = requireFunctionUncurryThis();
  1166. var getOwnPropertyNamesModule = requireObjectGetOwnPropertyNames();
  1167. var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  1168. var anObject = requireAnObject();
  1169. var concat = uncurryThis([].concat);
  1170. // all object keys, includes non-enumerable and symbols
  1171. ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  1172. var keys = getOwnPropertyNamesModule.f(anObject(it));
  1173. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  1174. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  1175. };
  1176. return ownKeys;
  1177. }
  1178. var copyConstructorProperties;
  1179. var hasRequiredCopyConstructorProperties;
  1180. function requireCopyConstructorProperties () {
  1181. if (hasRequiredCopyConstructorProperties) return copyConstructorProperties;
  1182. hasRequiredCopyConstructorProperties = 1;
  1183. var hasOwn = requireHasOwnProperty();
  1184. var ownKeys = requireOwnKeys();
  1185. var getOwnPropertyDescriptorModule = requireObjectGetOwnPropertyDescriptor();
  1186. var definePropertyModule = requireObjectDefineProperty();
  1187. copyConstructorProperties = function (target, source, exceptions) {
  1188. var keys = ownKeys(source);
  1189. var defineProperty = definePropertyModule.f;
  1190. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  1191. for (var i = 0; i < keys.length; i++) {
  1192. var key = keys[i];
  1193. if (!hasOwn(target, key) && !(exceptions && hasOwn(exceptions, key))) {
  1194. defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  1195. }
  1196. }
  1197. };
  1198. return copyConstructorProperties;
  1199. }
  1200. var isForced_1;
  1201. var hasRequiredIsForced;
  1202. function requireIsForced () {
  1203. if (hasRequiredIsForced) return isForced_1;
  1204. hasRequiredIsForced = 1;
  1205. var fails = requireFails();
  1206. var isCallable = requireIsCallable();
  1207. var replacement = /#|\.prototype\./;
  1208. var isForced = function (feature, detection) {
  1209. var value = data[normalize(feature)];
  1210. return value === POLYFILL ? true
  1211. : value === NATIVE ? false
  1212. : isCallable(detection) ? fails(detection)
  1213. : !!detection;
  1214. };
  1215. var normalize = isForced.normalize = function (string) {
  1216. return String(string).replace(replacement, '.').toLowerCase();
  1217. };
  1218. var data = isForced.data = {};
  1219. var NATIVE = isForced.NATIVE = 'N';
  1220. var POLYFILL = isForced.POLYFILL = 'P';
  1221. isForced_1 = isForced;
  1222. return isForced_1;
  1223. }
  1224. var _export;
  1225. var hasRequired_export;
  1226. function require_export () {
  1227. if (hasRequired_export) return _export;
  1228. hasRequired_export = 1;
  1229. var globalThis = requireGlobalThis();
  1230. var getOwnPropertyDescriptor = requireObjectGetOwnPropertyDescriptor().f;
  1231. var createNonEnumerableProperty = requireCreateNonEnumerableProperty();
  1232. var defineBuiltIn = requireDefineBuiltIn();
  1233. var defineGlobalProperty = requireDefineGlobalProperty();
  1234. var copyConstructorProperties = requireCopyConstructorProperties();
  1235. var isForced = requireIsForced();
  1236. /*
  1237. options.target - name of the target object
  1238. options.global - target is the global object
  1239. options.stat - export as static methods of target
  1240. options.proto - export as prototype methods of target
  1241. options.real - real prototype method for the `pure` version
  1242. options.forced - export even if the native feature is available
  1243. options.bind - bind methods to the target, required for the `pure` version
  1244. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  1245. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  1246. options.sham - add a flag to not completely full polyfills
  1247. options.enumerable - export as enumerable property
  1248. options.dontCallGetSet - prevent calling a getter on target
  1249. options.name - the .name of the function if it does not match the key
  1250. */
  1251. _export = function (options, source) {
  1252. var TARGET = options.target;
  1253. var GLOBAL = options.global;
  1254. var STATIC = options.stat;
  1255. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  1256. if (GLOBAL) {
  1257. target = globalThis;
  1258. } else if (STATIC) {
  1259. target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
  1260. } else {
  1261. target = globalThis[TARGET] && globalThis[TARGET].prototype;
  1262. }
  1263. if (target) for (key in source) {
  1264. sourceProperty = source[key];
  1265. if (options.dontCallGetSet) {
  1266. descriptor = getOwnPropertyDescriptor(target, key);
  1267. targetProperty = descriptor && descriptor.value;
  1268. } else targetProperty = target[key];
  1269. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  1270. // contained in target
  1271. if (!FORCED && targetProperty !== undefined) {
  1272. if (typeof sourceProperty == typeof targetProperty) continue;
  1273. copyConstructorProperties(sourceProperty, targetProperty);
  1274. }
  1275. // add a flag to not completely full polyfills
  1276. if (options.sham || (targetProperty && targetProperty.sham)) {
  1277. createNonEnumerableProperty(sourceProperty, 'sham', true);
  1278. }
  1279. defineBuiltIn(target, key, sourceProperty, options);
  1280. }
  1281. };
  1282. return _export;
  1283. }
  1284. var isArray;
  1285. var hasRequiredIsArray;
  1286. function requireIsArray () {
  1287. if (hasRequiredIsArray) return isArray;
  1288. hasRequiredIsArray = 1;
  1289. var classof = requireClassofRaw();
  1290. // `IsArray` abstract operation
  1291. // https://tc39.es/ecma262/#sec-isarray
  1292. // eslint-disable-next-line es/no-array-isarray -- safe
  1293. isArray = Array.isArray || function isArray(argument) {
  1294. return classof(argument) === 'Array';
  1295. };
  1296. return isArray;
  1297. }
  1298. var doesNotExceedSafeInteger;
  1299. var hasRequiredDoesNotExceedSafeInteger;
  1300. function requireDoesNotExceedSafeInteger () {
  1301. if (hasRequiredDoesNotExceedSafeInteger) return doesNotExceedSafeInteger;
  1302. hasRequiredDoesNotExceedSafeInteger = 1;
  1303. var $TypeError = TypeError;
  1304. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
  1305. doesNotExceedSafeInteger = function (it) {
  1306. if (it > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed index exceeded');
  1307. return it;
  1308. };
  1309. return doesNotExceedSafeInteger;
  1310. }
  1311. var createProperty;
  1312. var hasRequiredCreateProperty;
  1313. function requireCreateProperty () {
  1314. if (hasRequiredCreateProperty) return createProperty;
  1315. hasRequiredCreateProperty = 1;
  1316. var DESCRIPTORS = requireDescriptors();
  1317. var definePropertyModule = requireObjectDefineProperty();
  1318. var createPropertyDescriptor = requireCreatePropertyDescriptor();
  1319. createProperty = function (object, key, value) {
  1320. if (DESCRIPTORS) definePropertyModule.f(object, key, createPropertyDescriptor(0, value));
  1321. else object[key] = value;
  1322. };
  1323. return createProperty;
  1324. }
  1325. var toStringTagSupport;
  1326. var hasRequiredToStringTagSupport;
  1327. function requireToStringTagSupport () {
  1328. if (hasRequiredToStringTagSupport) return toStringTagSupport;
  1329. hasRequiredToStringTagSupport = 1;
  1330. var wellKnownSymbol = requireWellKnownSymbol();
  1331. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1332. var test = {};
  1333. test[TO_STRING_TAG] = 'z';
  1334. toStringTagSupport = String(test) === '[object z]';
  1335. return toStringTagSupport;
  1336. }
  1337. var classof;
  1338. var hasRequiredClassof;
  1339. function requireClassof () {
  1340. if (hasRequiredClassof) return classof;
  1341. hasRequiredClassof = 1;
  1342. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  1343. var isCallable = requireIsCallable();
  1344. var classofRaw = requireClassofRaw();
  1345. var wellKnownSymbol = requireWellKnownSymbol();
  1346. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  1347. var $Object = Object;
  1348. // ES3 wrong here
  1349. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
  1350. // fallback for IE11 Script Access Denied error
  1351. var tryGet = function (it, key) {
  1352. try {
  1353. return it[key];
  1354. } catch (error) { /* empty */ }
  1355. };
  1356. // getting tag from ES6+ `Object.prototype.toString`
  1357. classof = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  1358. var O, tag, result;
  1359. return it === undefined ? 'Undefined' : it === null ? 'Null'
  1360. // @@toStringTag case
  1361. : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
  1362. // builtinTag case
  1363. : CORRECT_ARGUMENTS ? classofRaw(O)
  1364. // ES3 arguments fallback
  1365. : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  1366. };
  1367. return classof;
  1368. }
  1369. var isConstructor;
  1370. var hasRequiredIsConstructor;
  1371. function requireIsConstructor () {
  1372. if (hasRequiredIsConstructor) return isConstructor;
  1373. hasRequiredIsConstructor = 1;
  1374. var uncurryThis = requireFunctionUncurryThis();
  1375. var fails = requireFails();
  1376. var isCallable = requireIsCallable();
  1377. var classof = requireClassof();
  1378. var getBuiltIn = requireGetBuiltIn();
  1379. var inspectSource = requireInspectSource();
  1380. var noop = function () { /* empty */ };
  1381. var construct = getBuiltIn('Reflect', 'construct');
  1382. var constructorRegExp = /^\s*(?:class|function)\b/;
  1383. var exec = uncurryThis(constructorRegExp.exec);
  1384. var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
  1385. var isConstructorModern = function isConstructor(argument) {
  1386. if (!isCallable(argument)) return false;
  1387. try {
  1388. construct(noop, [], argument);
  1389. return true;
  1390. } catch (error) {
  1391. return false;
  1392. }
  1393. };
  1394. var isConstructorLegacy = function isConstructor(argument) {
  1395. if (!isCallable(argument)) return false;
  1396. switch (classof(argument)) {
  1397. case 'AsyncFunction':
  1398. case 'GeneratorFunction':
  1399. case 'AsyncGeneratorFunction': return false;
  1400. }
  1401. try {
  1402. // we can't check .prototype since constructors produced by .bind haven't it
  1403. // `Function#toString` throws on some built-it function in some legacy engines
  1404. // (for example, `DOMQuad` and similar in FF41-)
  1405. return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  1406. } catch (error) {
  1407. return true;
  1408. }
  1409. };
  1410. isConstructorLegacy.sham = true;
  1411. // `IsConstructor` abstract operation
  1412. // https://tc39.es/ecma262/#sec-isconstructor
  1413. isConstructor = !construct || fails(function () {
  1414. var called;
  1415. return isConstructorModern(isConstructorModern.call)
  1416. || !isConstructorModern(Object)
  1417. || !isConstructorModern(function () { called = true; })
  1418. || called;
  1419. }) ? isConstructorLegacy : isConstructorModern;
  1420. return isConstructor;
  1421. }
  1422. var arraySpeciesConstructor;
  1423. var hasRequiredArraySpeciesConstructor;
  1424. function requireArraySpeciesConstructor () {
  1425. if (hasRequiredArraySpeciesConstructor) return arraySpeciesConstructor;
  1426. hasRequiredArraySpeciesConstructor = 1;
  1427. var isArray = requireIsArray();
  1428. var isConstructor = requireIsConstructor();
  1429. var isObject = requireIsObject();
  1430. var wellKnownSymbol = requireWellKnownSymbol();
  1431. var SPECIES = wellKnownSymbol('species');
  1432. var $Array = Array;
  1433. // a part of `ArraySpeciesCreate` abstract operation
  1434. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1435. arraySpeciesConstructor = function (originalArray) {
  1436. var C;
  1437. if (isArray(originalArray)) {
  1438. C = originalArray.constructor;
  1439. // cross-realm fallback
  1440. if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
  1441. else if (isObject(C)) {
  1442. C = C[SPECIES];
  1443. if (C === null) C = undefined;
  1444. }
  1445. } return C === undefined ? $Array : C;
  1446. };
  1447. return arraySpeciesConstructor;
  1448. }
  1449. var arraySpeciesCreate;
  1450. var hasRequiredArraySpeciesCreate;
  1451. function requireArraySpeciesCreate () {
  1452. if (hasRequiredArraySpeciesCreate) return arraySpeciesCreate;
  1453. hasRequiredArraySpeciesCreate = 1;
  1454. var arraySpeciesConstructor = requireArraySpeciesConstructor();
  1455. // `ArraySpeciesCreate` abstract operation
  1456. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  1457. arraySpeciesCreate = function (originalArray, length) {
  1458. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  1459. };
  1460. return arraySpeciesCreate;
  1461. }
  1462. var arrayMethodHasSpeciesSupport;
  1463. var hasRequiredArrayMethodHasSpeciesSupport;
  1464. function requireArrayMethodHasSpeciesSupport () {
  1465. if (hasRequiredArrayMethodHasSpeciesSupport) return arrayMethodHasSpeciesSupport;
  1466. hasRequiredArrayMethodHasSpeciesSupport = 1;
  1467. var fails = requireFails();
  1468. var wellKnownSymbol = requireWellKnownSymbol();
  1469. var V8_VERSION = requireEnvironmentV8Version();
  1470. var SPECIES = wellKnownSymbol('species');
  1471. arrayMethodHasSpeciesSupport = function (METHOD_NAME) {
  1472. // We can't use this feature detection in V8 since it causes
  1473. // deoptimization and serious performance degradation
  1474. // https://github.com/zloirock/core-js/issues/677
  1475. return V8_VERSION >= 51 || !fails(function () {
  1476. var array = [];
  1477. var constructor = array.constructor = {};
  1478. constructor[SPECIES] = function () {
  1479. return { foo: 1 };
  1480. };
  1481. return array[METHOD_NAME](Boolean).foo !== 1;
  1482. });
  1483. };
  1484. return arrayMethodHasSpeciesSupport;
  1485. }
  1486. var hasRequiredEs_array_concat;
  1487. function requireEs_array_concat () {
  1488. if (hasRequiredEs_array_concat) return es_array_concat;
  1489. hasRequiredEs_array_concat = 1;
  1490. var $ = require_export();
  1491. var fails = requireFails();
  1492. var isArray = requireIsArray();
  1493. var isObject = requireIsObject();
  1494. var toObject = requireToObject();
  1495. var lengthOfArrayLike = requireLengthOfArrayLike();
  1496. var doesNotExceedSafeInteger = requireDoesNotExceedSafeInteger();
  1497. var createProperty = requireCreateProperty();
  1498. var arraySpeciesCreate = requireArraySpeciesCreate();
  1499. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1500. var wellKnownSymbol = requireWellKnownSymbol();
  1501. var V8_VERSION = requireEnvironmentV8Version();
  1502. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  1503. // We can't use this feature detection in V8 since it causes
  1504. // deoptimization and serious performance degradation
  1505. // https://github.com/zloirock/core-js/issues/679
  1506. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  1507. var array = [];
  1508. array[IS_CONCAT_SPREADABLE] = false;
  1509. return array.concat()[0] !== array;
  1510. });
  1511. var isConcatSpreadable = function (O) {
  1512. if (!isObject(O)) return false;
  1513. var spreadable = O[IS_CONCAT_SPREADABLE];
  1514. return spreadable !== undefined ? !!spreadable : isArray(O);
  1515. };
  1516. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !arrayMethodHasSpeciesSupport('concat');
  1517. // `Array.prototype.concat` method
  1518. // https://tc39.es/ecma262/#sec-array.prototype.concat
  1519. // with adding support of @@isConcatSpreadable and @@species
  1520. $({ target: 'Array', proto: true, arity: 1, forced: FORCED }, {
  1521. // eslint-disable-next-line no-unused-vars -- required for `.length`
  1522. concat: function concat(arg) {
  1523. var O = toObject(this);
  1524. var A = arraySpeciesCreate(O, 0);
  1525. var n = 0;
  1526. var i, k, length, len, E;
  1527. for (i = -1, length = arguments.length; i < length; i++) {
  1528. E = i === -1 ? O : arguments[i];
  1529. if (isConcatSpreadable(E)) {
  1530. len = lengthOfArrayLike(E);
  1531. doesNotExceedSafeInteger(n + len);
  1532. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  1533. } else {
  1534. doesNotExceedSafeInteger(n + 1);
  1535. createProperty(A, n++, E);
  1536. }
  1537. }
  1538. A.length = n;
  1539. return A;
  1540. }
  1541. });
  1542. return es_array_concat;
  1543. }
  1544. requireEs_array_concat();
  1545. var es_array_find = {};
  1546. var functionUncurryThisClause;
  1547. var hasRequiredFunctionUncurryThisClause;
  1548. function requireFunctionUncurryThisClause () {
  1549. if (hasRequiredFunctionUncurryThisClause) return functionUncurryThisClause;
  1550. hasRequiredFunctionUncurryThisClause = 1;
  1551. var classofRaw = requireClassofRaw();
  1552. var uncurryThis = requireFunctionUncurryThis();
  1553. functionUncurryThisClause = function (fn) {
  1554. // Nashorn bug:
  1555. // https://github.com/zloirock/core-js/issues/1128
  1556. // https://github.com/zloirock/core-js/issues/1130
  1557. if (classofRaw(fn) === 'Function') return uncurryThis(fn);
  1558. };
  1559. return functionUncurryThisClause;
  1560. }
  1561. var functionBindContext;
  1562. var hasRequiredFunctionBindContext;
  1563. function requireFunctionBindContext () {
  1564. if (hasRequiredFunctionBindContext) return functionBindContext;
  1565. hasRequiredFunctionBindContext = 1;
  1566. var uncurryThis = requireFunctionUncurryThisClause();
  1567. var aCallable = requireACallable();
  1568. var NATIVE_BIND = requireFunctionBindNative();
  1569. var bind = uncurryThis(uncurryThis.bind);
  1570. // optional / simple context binding
  1571. functionBindContext = function (fn, that) {
  1572. aCallable(fn);
  1573. return that === undefined ? fn : NATIVE_BIND ? bind(fn, that) : function (/* ...args */) {
  1574. return fn.apply(that, arguments);
  1575. };
  1576. };
  1577. return functionBindContext;
  1578. }
  1579. var arrayIteration;
  1580. var hasRequiredArrayIteration;
  1581. function requireArrayIteration () {
  1582. if (hasRequiredArrayIteration) return arrayIteration;
  1583. hasRequiredArrayIteration = 1;
  1584. var bind = requireFunctionBindContext();
  1585. var uncurryThis = requireFunctionUncurryThis();
  1586. var IndexedObject = requireIndexedObject();
  1587. var toObject = requireToObject();
  1588. var lengthOfArrayLike = requireLengthOfArrayLike();
  1589. var arraySpeciesCreate = requireArraySpeciesCreate();
  1590. var push = uncurryThis([].push);
  1591. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  1592. var createMethod = function (TYPE) {
  1593. var IS_MAP = TYPE === 1;
  1594. var IS_FILTER = TYPE === 2;
  1595. var IS_SOME = TYPE === 3;
  1596. var IS_EVERY = TYPE === 4;
  1597. var IS_FIND_INDEX = TYPE === 6;
  1598. var IS_FILTER_REJECT = TYPE === 7;
  1599. var NO_HOLES = TYPE === 5 || IS_FIND_INDEX;
  1600. return function ($this, callbackfn, that, specificCreate) {
  1601. var O = toObject($this);
  1602. var self = IndexedObject(O);
  1603. var length = lengthOfArrayLike(self);
  1604. var boundFunction = bind(callbackfn, that);
  1605. var index = 0;
  1606. var create = specificCreate || arraySpeciesCreate;
  1607. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  1608. var value, result;
  1609. for (;length > index; index++) if (NO_HOLES || index in self) {
  1610. value = self[index];
  1611. result = boundFunction(value, index, O);
  1612. if (TYPE) {
  1613. if (IS_MAP) target[index] = result; // map
  1614. else if (result) switch (TYPE) {
  1615. case 3: return true; // some
  1616. case 5: return value; // find
  1617. case 6: return index; // findIndex
  1618. case 2: push(target, value); // filter
  1619. } else switch (TYPE) {
  1620. case 4: return false; // every
  1621. case 7: push(target, value); // filterReject
  1622. }
  1623. }
  1624. }
  1625. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  1626. };
  1627. };
  1628. arrayIteration = {
  1629. // `Array.prototype.forEach` method
  1630. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  1631. forEach: createMethod(0),
  1632. // `Array.prototype.map` method
  1633. // https://tc39.es/ecma262/#sec-array.prototype.map
  1634. map: createMethod(1),
  1635. // `Array.prototype.filter` method
  1636. // https://tc39.es/ecma262/#sec-array.prototype.filter
  1637. filter: createMethod(2),
  1638. // `Array.prototype.some` method
  1639. // https://tc39.es/ecma262/#sec-array.prototype.some
  1640. some: createMethod(3),
  1641. // `Array.prototype.every` method
  1642. // https://tc39.es/ecma262/#sec-array.prototype.every
  1643. every: createMethod(4),
  1644. // `Array.prototype.find` method
  1645. // https://tc39.es/ecma262/#sec-array.prototype.find
  1646. find: createMethod(5),
  1647. // `Array.prototype.findIndex` method
  1648. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  1649. findIndex: createMethod(6),
  1650. // `Array.prototype.filterReject` method
  1651. // https://github.com/tc39/proposal-array-filtering
  1652. filterReject: createMethod(7)
  1653. };
  1654. return arrayIteration;
  1655. }
  1656. var objectDefineProperties = {};
  1657. var objectKeys;
  1658. var hasRequiredObjectKeys;
  1659. function requireObjectKeys () {
  1660. if (hasRequiredObjectKeys) return objectKeys;
  1661. hasRequiredObjectKeys = 1;
  1662. var internalObjectKeys = requireObjectKeysInternal();
  1663. var enumBugKeys = requireEnumBugKeys();
  1664. // `Object.keys` method
  1665. // https://tc39.es/ecma262/#sec-object.keys
  1666. // eslint-disable-next-line es/no-object-keys -- safe
  1667. objectKeys = Object.keys || function keys(O) {
  1668. return internalObjectKeys(O, enumBugKeys);
  1669. };
  1670. return objectKeys;
  1671. }
  1672. var hasRequiredObjectDefineProperties;
  1673. function requireObjectDefineProperties () {
  1674. if (hasRequiredObjectDefineProperties) return objectDefineProperties;
  1675. hasRequiredObjectDefineProperties = 1;
  1676. var DESCRIPTORS = requireDescriptors();
  1677. var V8_PROTOTYPE_DEFINE_BUG = requireV8PrototypeDefineBug();
  1678. var definePropertyModule = requireObjectDefineProperty();
  1679. var anObject = requireAnObject();
  1680. var toIndexedObject = requireToIndexedObject();
  1681. var objectKeys = requireObjectKeys();
  1682. // `Object.defineProperties` method
  1683. // https://tc39.es/ecma262/#sec-object.defineproperties
  1684. // eslint-disable-next-line es/no-object-defineproperties -- safe
  1685. objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
  1686. anObject(O);
  1687. var props = toIndexedObject(Properties);
  1688. var keys = objectKeys(Properties);
  1689. var length = keys.length;
  1690. var index = 0;
  1691. var key;
  1692. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  1693. return O;
  1694. };
  1695. return objectDefineProperties;
  1696. }
  1697. var html;
  1698. var hasRequiredHtml;
  1699. function requireHtml () {
  1700. if (hasRequiredHtml) return html;
  1701. hasRequiredHtml = 1;
  1702. var getBuiltIn = requireGetBuiltIn();
  1703. html = getBuiltIn('document', 'documentElement');
  1704. return html;
  1705. }
  1706. var objectCreate;
  1707. var hasRequiredObjectCreate;
  1708. function requireObjectCreate () {
  1709. if (hasRequiredObjectCreate) return objectCreate;
  1710. hasRequiredObjectCreate = 1;
  1711. /* global ActiveXObject -- old IE, WSH */
  1712. var anObject = requireAnObject();
  1713. var definePropertiesModule = requireObjectDefineProperties();
  1714. var enumBugKeys = requireEnumBugKeys();
  1715. var hiddenKeys = requireHiddenKeys();
  1716. var html = requireHtml();
  1717. var documentCreateElement = requireDocumentCreateElement();
  1718. var sharedKey = requireSharedKey();
  1719. var GT = '>';
  1720. var LT = '<';
  1721. var PROTOTYPE = 'prototype';
  1722. var SCRIPT = 'script';
  1723. var IE_PROTO = sharedKey('IE_PROTO');
  1724. var EmptyConstructor = function () { /* empty */ };
  1725. var scriptTag = function (content) {
  1726. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  1727. };
  1728. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  1729. var NullProtoObjectViaActiveX = function (activeXDocument) {
  1730. activeXDocument.write(scriptTag(''));
  1731. activeXDocument.close();
  1732. var temp = activeXDocument.parentWindow.Object;
  1733. // eslint-disable-next-line no-useless-assignment -- avoid memory leak
  1734. activeXDocument = null;
  1735. return temp;
  1736. };
  1737. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  1738. var NullProtoObjectViaIFrame = function () {
  1739. // Thrash, waste and sodomy: IE GC bug
  1740. var iframe = documentCreateElement('iframe');
  1741. var JS = 'java' + SCRIPT + ':';
  1742. var iframeDocument;
  1743. iframe.style.display = 'none';
  1744. html.appendChild(iframe);
  1745. // https://github.com/zloirock/core-js/issues/475
  1746. iframe.src = String(JS);
  1747. iframeDocument = iframe.contentWindow.document;
  1748. iframeDocument.open();
  1749. iframeDocument.write(scriptTag('document.F=Object'));
  1750. iframeDocument.close();
  1751. return iframeDocument.F;
  1752. };
  1753. // Check for document.domain and active x support
  1754. // No need to use active x approach when document.domain is not set
  1755. // see https://github.com/es-shims/es5-shim/issues/150
  1756. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  1757. // avoid IE GC bug
  1758. var activeXDocument;
  1759. var NullProtoObject = function () {
  1760. try {
  1761. activeXDocument = new ActiveXObject('htmlfile');
  1762. } catch (error) { /* ignore */ }
  1763. NullProtoObject = typeof document != 'undefined'
  1764. ? document.domain && activeXDocument
  1765. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  1766. : NullProtoObjectViaIFrame()
  1767. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  1768. var length = enumBugKeys.length;
  1769. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  1770. return NullProtoObject();
  1771. };
  1772. hiddenKeys[IE_PROTO] = true;
  1773. // `Object.create` method
  1774. // https://tc39.es/ecma262/#sec-object.create
  1775. // eslint-disable-next-line es/no-object-create -- safe
  1776. objectCreate = Object.create || function create(O, Properties) {
  1777. var result;
  1778. if (O !== null) {
  1779. EmptyConstructor[PROTOTYPE] = anObject(O);
  1780. result = new EmptyConstructor();
  1781. EmptyConstructor[PROTOTYPE] = null;
  1782. // add "__proto__" for Object.getPrototypeOf polyfill
  1783. result[IE_PROTO] = O;
  1784. } else result = NullProtoObject();
  1785. return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
  1786. };
  1787. return objectCreate;
  1788. }
  1789. var addToUnscopables;
  1790. var hasRequiredAddToUnscopables;
  1791. function requireAddToUnscopables () {
  1792. if (hasRequiredAddToUnscopables) return addToUnscopables;
  1793. hasRequiredAddToUnscopables = 1;
  1794. var wellKnownSymbol = requireWellKnownSymbol();
  1795. var create = requireObjectCreate();
  1796. var defineProperty = requireObjectDefineProperty().f;
  1797. var UNSCOPABLES = wellKnownSymbol('unscopables');
  1798. var ArrayPrototype = Array.prototype;
  1799. // Array.prototype[@@unscopables]
  1800. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1801. if (ArrayPrototype[UNSCOPABLES] === undefined) {
  1802. defineProperty(ArrayPrototype, UNSCOPABLES, {
  1803. configurable: true,
  1804. value: create(null)
  1805. });
  1806. }
  1807. // add a key to Array.prototype[@@unscopables]
  1808. addToUnscopables = function (key) {
  1809. ArrayPrototype[UNSCOPABLES][key] = true;
  1810. };
  1811. return addToUnscopables;
  1812. }
  1813. var hasRequiredEs_array_find;
  1814. function requireEs_array_find () {
  1815. if (hasRequiredEs_array_find) return es_array_find;
  1816. hasRequiredEs_array_find = 1;
  1817. var $ = require_export();
  1818. var $find = requireArrayIteration().find;
  1819. var addToUnscopables = requireAddToUnscopables();
  1820. var FIND = 'find';
  1821. var SKIPS_HOLES = true;
  1822. // Shouldn't skip holes
  1823. // eslint-disable-next-line es/no-array-prototype-find -- testing
  1824. if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
  1825. // `Array.prototype.find` method
  1826. // https://tc39.es/ecma262/#sec-array.prototype.find
  1827. $({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
  1828. find: function find(callbackfn /* , that = undefined */) {
  1829. return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1830. }
  1831. });
  1832. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1833. addToUnscopables(FIND);
  1834. return es_array_find;
  1835. }
  1836. requireEs_array_find();
  1837. var es_array_includes = {};
  1838. var hasRequiredEs_array_includes;
  1839. function requireEs_array_includes () {
  1840. if (hasRequiredEs_array_includes) return es_array_includes;
  1841. hasRequiredEs_array_includes = 1;
  1842. var $ = require_export();
  1843. var $includes = requireArrayIncludes().includes;
  1844. var fails = requireFails();
  1845. var addToUnscopables = requireAddToUnscopables();
  1846. // FF99+ bug
  1847. var BROKEN_ON_SPARSE = fails(function () {
  1848. // eslint-disable-next-line es/no-array-prototype-includes -- detection
  1849. return !Array(1).includes();
  1850. });
  1851. // `Array.prototype.includes` method
  1852. // https://tc39.es/ecma262/#sec-array.prototype.includes
  1853. $({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
  1854. includes: function includes(el /* , fromIndex = 0 */) {
  1855. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  1856. }
  1857. });
  1858. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  1859. addToUnscopables('includes');
  1860. return es_array_includes;
  1861. }
  1862. requireEs_array_includes();
  1863. var es_array_indexOf = {};
  1864. var arrayMethodIsStrict;
  1865. var hasRequiredArrayMethodIsStrict;
  1866. function requireArrayMethodIsStrict () {
  1867. if (hasRequiredArrayMethodIsStrict) return arrayMethodIsStrict;
  1868. hasRequiredArrayMethodIsStrict = 1;
  1869. var fails = requireFails();
  1870. arrayMethodIsStrict = function (METHOD_NAME, argument) {
  1871. var method = [][METHOD_NAME];
  1872. return !!method && fails(function () {
  1873. // eslint-disable-next-line no-useless-call -- required for testing
  1874. method.call(null, argument || function () { return 1; }, 1);
  1875. });
  1876. };
  1877. return arrayMethodIsStrict;
  1878. }
  1879. var hasRequiredEs_array_indexOf;
  1880. function requireEs_array_indexOf () {
  1881. if (hasRequiredEs_array_indexOf) return es_array_indexOf;
  1882. hasRequiredEs_array_indexOf = 1;
  1883. /* eslint-disable es/no-array-prototype-indexof -- required for testing */
  1884. var $ = require_export();
  1885. var uncurryThis = requireFunctionUncurryThisClause();
  1886. var $indexOf = requireArrayIncludes().indexOf;
  1887. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  1888. var nativeIndexOf = uncurryThis([].indexOf);
  1889. var NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;
  1890. var FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');
  1891. // `Array.prototype.indexOf` method
  1892. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  1893. $({ target: 'Array', proto: true, forced: FORCED }, {
  1894. indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
  1895. var fromIndex = arguments.length > 1 ? arguments[1] : undefined;
  1896. return NEGATIVE_ZERO
  1897. // convert -0 to +0
  1898. ? nativeIndexOf(this, searchElement, fromIndex) || 0
  1899. : $indexOf(this, searchElement, fromIndex);
  1900. }
  1901. });
  1902. return es_array_indexOf;
  1903. }
  1904. requireEs_array_indexOf();
  1905. var es_array_map = {};
  1906. var hasRequiredEs_array_map;
  1907. function requireEs_array_map () {
  1908. if (hasRequiredEs_array_map) return es_array_map;
  1909. hasRequiredEs_array_map = 1;
  1910. var $ = require_export();
  1911. var $map = requireArrayIteration().map;
  1912. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1913. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  1914. // `Array.prototype.map` method
  1915. // https://tc39.es/ecma262/#sec-array.prototype.map
  1916. // with adding support of @@species
  1917. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1918. map: function map(callbackfn /* , thisArg */) {
  1919. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  1920. }
  1921. });
  1922. return es_array_map;
  1923. }
  1924. requireEs_array_map();
  1925. var es_array_slice = {};
  1926. var arraySlice;
  1927. var hasRequiredArraySlice;
  1928. function requireArraySlice () {
  1929. if (hasRequiredArraySlice) return arraySlice;
  1930. hasRequiredArraySlice = 1;
  1931. var uncurryThis = requireFunctionUncurryThis();
  1932. arraySlice = uncurryThis([].slice);
  1933. return arraySlice;
  1934. }
  1935. var hasRequiredEs_array_slice;
  1936. function requireEs_array_slice () {
  1937. if (hasRequiredEs_array_slice) return es_array_slice;
  1938. hasRequiredEs_array_slice = 1;
  1939. var $ = require_export();
  1940. var isArray = requireIsArray();
  1941. var isConstructor = requireIsConstructor();
  1942. var isObject = requireIsObject();
  1943. var toAbsoluteIndex = requireToAbsoluteIndex();
  1944. var lengthOfArrayLike = requireLengthOfArrayLike();
  1945. var toIndexedObject = requireToIndexedObject();
  1946. var createProperty = requireCreateProperty();
  1947. var wellKnownSymbol = requireWellKnownSymbol();
  1948. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  1949. var nativeSlice = requireArraySlice();
  1950. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  1951. var SPECIES = wellKnownSymbol('species');
  1952. var $Array = Array;
  1953. var max = Math.max;
  1954. // `Array.prototype.slice` method
  1955. // https://tc39.es/ecma262/#sec-array.prototype.slice
  1956. // fallback for not array-like ES3 strings and DOM objects
  1957. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  1958. slice: function slice(start, end) {
  1959. var O = toIndexedObject(this);
  1960. var length = lengthOfArrayLike(O);
  1961. var k = toAbsoluteIndex(start, length);
  1962. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  1963. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  1964. var Constructor, result, n;
  1965. if (isArray(O)) {
  1966. Constructor = O.constructor;
  1967. // cross-realm fallback
  1968. if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) {
  1969. Constructor = undefined;
  1970. } else if (isObject(Constructor)) {
  1971. Constructor = Constructor[SPECIES];
  1972. if (Constructor === null) Constructor = undefined;
  1973. }
  1974. if (Constructor === $Array || Constructor === undefined) {
  1975. return nativeSlice(O, k, fin);
  1976. }
  1977. }
  1978. result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0));
  1979. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  1980. result.length = n;
  1981. return result;
  1982. }
  1983. });
  1984. return es_array_slice;
  1985. }
  1986. requireEs_array_slice();
  1987. var es_array_sort = {};
  1988. var deletePropertyOrThrow;
  1989. var hasRequiredDeletePropertyOrThrow;
  1990. function requireDeletePropertyOrThrow () {
  1991. if (hasRequiredDeletePropertyOrThrow) return deletePropertyOrThrow;
  1992. hasRequiredDeletePropertyOrThrow = 1;
  1993. var tryToString = requireTryToString();
  1994. var $TypeError = TypeError;
  1995. deletePropertyOrThrow = function (O, P) {
  1996. if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O));
  1997. };
  1998. return deletePropertyOrThrow;
  1999. }
  2000. var toString;
  2001. var hasRequiredToString;
  2002. function requireToString () {
  2003. if (hasRequiredToString) return toString;
  2004. hasRequiredToString = 1;
  2005. var classof = requireClassof();
  2006. var $String = String;
  2007. toString = function (argument) {
  2008. if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
  2009. return $String(argument);
  2010. };
  2011. return toString;
  2012. }
  2013. var arraySort;
  2014. var hasRequiredArraySort;
  2015. function requireArraySort () {
  2016. if (hasRequiredArraySort) return arraySort;
  2017. hasRequiredArraySort = 1;
  2018. var arraySlice = requireArraySlice();
  2019. var floor = Math.floor;
  2020. var sort = function (array, comparefn) {
  2021. var length = array.length;
  2022. if (length < 8) {
  2023. // insertion sort
  2024. var i = 1;
  2025. var element, j;
  2026. while (i < length) {
  2027. j = i;
  2028. element = array[i];
  2029. while (j && comparefn(array[j - 1], element) > 0) {
  2030. array[j] = array[--j];
  2031. }
  2032. if (j !== i++) array[j] = element;
  2033. }
  2034. } else {
  2035. // merge sort
  2036. var middle = floor(length / 2);
  2037. var left = sort(arraySlice(array, 0, middle), comparefn);
  2038. var right = sort(arraySlice(array, middle), comparefn);
  2039. var llength = left.length;
  2040. var rlength = right.length;
  2041. var lindex = 0;
  2042. var rindex = 0;
  2043. while (lindex < llength || rindex < rlength) {
  2044. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  2045. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  2046. : lindex < llength ? left[lindex++] : right[rindex++];
  2047. }
  2048. }
  2049. return array;
  2050. };
  2051. arraySort = sort;
  2052. return arraySort;
  2053. }
  2054. var environmentFfVersion;
  2055. var hasRequiredEnvironmentFfVersion;
  2056. function requireEnvironmentFfVersion () {
  2057. if (hasRequiredEnvironmentFfVersion) return environmentFfVersion;
  2058. hasRequiredEnvironmentFfVersion = 1;
  2059. var userAgent = requireEnvironmentUserAgent();
  2060. var firefox = userAgent.match(/firefox\/(\d+)/i);
  2061. environmentFfVersion = !!firefox && +firefox[1];
  2062. return environmentFfVersion;
  2063. }
  2064. var environmentIsIeOrEdge;
  2065. var hasRequiredEnvironmentIsIeOrEdge;
  2066. function requireEnvironmentIsIeOrEdge () {
  2067. if (hasRequiredEnvironmentIsIeOrEdge) return environmentIsIeOrEdge;
  2068. hasRequiredEnvironmentIsIeOrEdge = 1;
  2069. var UA = requireEnvironmentUserAgent();
  2070. environmentIsIeOrEdge = /MSIE|Trident/.test(UA);
  2071. return environmentIsIeOrEdge;
  2072. }
  2073. var environmentWebkitVersion;
  2074. var hasRequiredEnvironmentWebkitVersion;
  2075. function requireEnvironmentWebkitVersion () {
  2076. if (hasRequiredEnvironmentWebkitVersion) return environmentWebkitVersion;
  2077. hasRequiredEnvironmentWebkitVersion = 1;
  2078. var userAgent = requireEnvironmentUserAgent();
  2079. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  2080. environmentWebkitVersion = !!webkit && +webkit[1];
  2081. return environmentWebkitVersion;
  2082. }
  2083. var hasRequiredEs_array_sort;
  2084. function requireEs_array_sort () {
  2085. if (hasRequiredEs_array_sort) return es_array_sort;
  2086. hasRequiredEs_array_sort = 1;
  2087. var $ = require_export();
  2088. var uncurryThis = requireFunctionUncurryThis();
  2089. var aCallable = requireACallable();
  2090. var toObject = requireToObject();
  2091. var lengthOfArrayLike = requireLengthOfArrayLike();
  2092. var deletePropertyOrThrow = requireDeletePropertyOrThrow();
  2093. var toString = requireToString();
  2094. var fails = requireFails();
  2095. var internalSort = requireArraySort();
  2096. var arrayMethodIsStrict = requireArrayMethodIsStrict();
  2097. var FF = requireEnvironmentFfVersion();
  2098. var IE_OR_EDGE = requireEnvironmentIsIeOrEdge();
  2099. var V8 = requireEnvironmentV8Version();
  2100. var WEBKIT = requireEnvironmentWebkitVersion();
  2101. var test = [];
  2102. var nativeSort = uncurryThis(test.sort);
  2103. var push = uncurryThis(test.push);
  2104. // IE8-
  2105. var FAILS_ON_UNDEFINED = fails(function () {
  2106. test.sort(undefined);
  2107. });
  2108. // V8 bug
  2109. var FAILS_ON_NULL = fails(function () {
  2110. test.sort(null);
  2111. });
  2112. // Old WebKit
  2113. var STRICT_METHOD = arrayMethodIsStrict('sort');
  2114. var STABLE_SORT = !fails(function () {
  2115. // feature detection can be too slow, so check engines versions
  2116. if (V8) return V8 < 70;
  2117. if (FF && FF > 3) return;
  2118. if (IE_OR_EDGE) return true;
  2119. if (WEBKIT) return WEBKIT < 603;
  2120. var result = '';
  2121. var code, chr, value, index;
  2122. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  2123. for (code = 65; code < 76; code++) {
  2124. chr = String.fromCharCode(code);
  2125. switch (code) {
  2126. case 66: case 69: case 70: case 72: value = 3; break;
  2127. case 68: case 71: value = 4; break;
  2128. default: value = 2;
  2129. }
  2130. for (index = 0; index < 47; index++) {
  2131. test.push({ k: chr + index, v: value });
  2132. }
  2133. }
  2134. test.sort(function (a, b) { return b.v - a.v; });
  2135. for (index = 0; index < test.length; index++) {
  2136. chr = test[index].k.charAt(0);
  2137. if (result.charAt(result.length - 1) !== chr) result += chr;
  2138. }
  2139. return result !== 'DGBEFHACIJK';
  2140. });
  2141. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  2142. var getSortCompare = function (comparefn) {
  2143. return function (x, y) {
  2144. if (y === undefined) return -1;
  2145. if (x === undefined) return 1;
  2146. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  2147. return toString(x) > toString(y) ? 1 : -1;
  2148. };
  2149. };
  2150. // `Array.prototype.sort` method
  2151. // https://tc39.es/ecma262/#sec-array.prototype.sort
  2152. $({ target: 'Array', proto: true, forced: FORCED }, {
  2153. sort: function sort(comparefn) {
  2154. if (comparefn !== undefined) aCallable(comparefn);
  2155. var array = toObject(this);
  2156. if (STABLE_SORT) return comparefn === undefined ? nativeSort(array) : nativeSort(array, comparefn);
  2157. var items = [];
  2158. var arrayLength = lengthOfArrayLike(array);
  2159. var itemsLength, index;
  2160. for (index = 0; index < arrayLength; index++) {
  2161. if (index in array) push(items, array[index]);
  2162. }
  2163. internalSort(items, getSortCompare(comparefn));
  2164. itemsLength = lengthOfArrayLike(items);
  2165. index = 0;
  2166. while (index < itemsLength) array[index] = items[index++];
  2167. while (index < arrayLength) deletePropertyOrThrow(array, index++);
  2168. return array;
  2169. }
  2170. });
  2171. return es_array_sort;
  2172. }
  2173. requireEs_array_sort();
  2174. var es_array_splice = {};
  2175. var arraySetLength;
  2176. var hasRequiredArraySetLength;
  2177. function requireArraySetLength () {
  2178. if (hasRequiredArraySetLength) return arraySetLength;
  2179. hasRequiredArraySetLength = 1;
  2180. var DESCRIPTORS = requireDescriptors();
  2181. var isArray = requireIsArray();
  2182. var $TypeError = TypeError;
  2183. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  2184. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  2185. // Safari < 13 does not throw an error in this case
  2186. var SILENT_ON_NON_WRITABLE_LENGTH_SET = DESCRIPTORS && !function () {
  2187. // makes no sense without proper strict mode support
  2188. if (this !== undefined) return true;
  2189. try {
  2190. // eslint-disable-next-line es/no-object-defineproperty -- safe
  2191. Object.defineProperty([], 'length', { writable: false }).length = 1;
  2192. } catch (error) {
  2193. return error instanceof TypeError;
  2194. }
  2195. }();
  2196. arraySetLength = SILENT_ON_NON_WRITABLE_LENGTH_SET ? function (O, length) {
  2197. if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) {
  2198. throw new $TypeError('Cannot set read only .length');
  2199. } return O.length = length;
  2200. } : function (O, length) {
  2201. return O.length = length;
  2202. };
  2203. return arraySetLength;
  2204. }
  2205. var hasRequiredEs_array_splice;
  2206. function requireEs_array_splice () {
  2207. if (hasRequiredEs_array_splice) return es_array_splice;
  2208. hasRequiredEs_array_splice = 1;
  2209. var $ = require_export();
  2210. var toObject = requireToObject();
  2211. var toAbsoluteIndex = requireToAbsoluteIndex();
  2212. var toIntegerOrInfinity = requireToIntegerOrInfinity();
  2213. var lengthOfArrayLike = requireLengthOfArrayLike();
  2214. var setArrayLength = requireArraySetLength();
  2215. var doesNotExceedSafeInteger = requireDoesNotExceedSafeInteger();
  2216. var arraySpeciesCreate = requireArraySpeciesCreate();
  2217. var createProperty = requireCreateProperty();
  2218. var deletePropertyOrThrow = requireDeletePropertyOrThrow();
  2219. var arrayMethodHasSpeciesSupport = requireArrayMethodHasSpeciesSupport();
  2220. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  2221. var max = Math.max;
  2222. var min = Math.min;
  2223. // `Array.prototype.splice` method
  2224. // https://tc39.es/ecma262/#sec-array.prototype.splice
  2225. // with adding support of @@species
  2226. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  2227. splice: function splice(start, deleteCount /* , ...items */) {
  2228. var O = toObject(this);
  2229. var len = lengthOfArrayLike(O);
  2230. var actualStart = toAbsoluteIndex(start, len);
  2231. var argumentsLength = arguments.length;
  2232. var insertCount, actualDeleteCount, A, k, from, to;
  2233. if (argumentsLength === 0) {
  2234. insertCount = actualDeleteCount = 0;
  2235. } else if (argumentsLength === 1) {
  2236. insertCount = 0;
  2237. actualDeleteCount = len - actualStart;
  2238. } else {
  2239. insertCount = argumentsLength - 2;
  2240. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  2241. }
  2242. doesNotExceedSafeInteger(len + insertCount - actualDeleteCount);
  2243. A = arraySpeciesCreate(O, actualDeleteCount);
  2244. for (k = 0; k < actualDeleteCount; k++) {
  2245. from = actualStart + k;
  2246. if (from in O) createProperty(A, k, O[from]);
  2247. }
  2248. A.length = actualDeleteCount;
  2249. if (insertCount < actualDeleteCount) {
  2250. for (k = actualStart; k < len - actualDeleteCount; k++) {
  2251. from = k + actualDeleteCount;
  2252. to = k + insertCount;
  2253. if (from in O) O[to] = O[from];
  2254. else deletePropertyOrThrow(O, to);
  2255. }
  2256. for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1);
  2257. } else if (insertCount > actualDeleteCount) {
  2258. for (k = len - actualDeleteCount; k > actualStart; k--) {
  2259. from = k + actualDeleteCount - 1;
  2260. to = k + insertCount - 1;
  2261. if (from in O) O[to] = O[from];
  2262. else deletePropertyOrThrow(O, to);
  2263. }
  2264. }
  2265. for (k = 0; k < insertCount; k++) {
  2266. O[k + actualStart] = arguments[k + 2];
  2267. }
  2268. setArrayLength(O, len - actualDeleteCount + insertCount);
  2269. return A;
  2270. }
  2271. });
  2272. return es_array_splice;
  2273. }
  2274. requireEs_array_splice();
  2275. var es_object_assign = {};
  2276. var objectAssign;
  2277. var hasRequiredObjectAssign;
  2278. function requireObjectAssign () {
  2279. if (hasRequiredObjectAssign) return objectAssign;
  2280. hasRequiredObjectAssign = 1;
  2281. var DESCRIPTORS = requireDescriptors();
  2282. var uncurryThis = requireFunctionUncurryThis();
  2283. var call = requireFunctionCall();
  2284. var fails = requireFails();
  2285. var objectKeys = requireObjectKeys();
  2286. var getOwnPropertySymbolsModule = requireObjectGetOwnPropertySymbols();
  2287. var propertyIsEnumerableModule = requireObjectPropertyIsEnumerable();
  2288. var toObject = requireToObject();
  2289. var IndexedObject = requireIndexedObject();
  2290. // eslint-disable-next-line es/no-object-assign -- safe
  2291. var $assign = Object.assign;
  2292. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  2293. var defineProperty = Object.defineProperty;
  2294. var concat = uncurryThis([].concat);
  2295. // `Object.assign` method
  2296. // https://tc39.es/ecma262/#sec-object.assign
  2297. objectAssign = !$assign || fails(function () {
  2298. // should have correct order of operations (Edge bug)
  2299. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  2300. enumerable: true,
  2301. get: function () {
  2302. defineProperty(this, 'b', {
  2303. value: 3,
  2304. enumerable: false
  2305. });
  2306. }
  2307. }), { b: 2 })).b !== 1) return true;
  2308. // should work with symbols and should have deterministic property order (V8 bug)
  2309. var A = {};
  2310. var B = {};
  2311. // eslint-disable-next-line es/no-symbol -- safe
  2312. var symbol = Symbol('assign detection');
  2313. var alphabet = 'abcdefghijklmnopqrst';
  2314. A[symbol] = 7;
  2315. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  2316. return $assign({}, A)[symbol] !== 7 || objectKeys($assign({}, B)).join('') !== alphabet;
  2317. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  2318. var T = toObject(target);
  2319. var argumentsLength = arguments.length;
  2320. var index = 1;
  2321. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  2322. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  2323. while (argumentsLength > index) {
  2324. var S = IndexedObject(arguments[index++]);
  2325. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  2326. var length = keys.length;
  2327. var j = 0;
  2328. var key;
  2329. while (length > j) {
  2330. key = keys[j++];
  2331. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  2332. }
  2333. } return T;
  2334. } : $assign;
  2335. return objectAssign;
  2336. }
  2337. var hasRequiredEs_object_assign;
  2338. function requireEs_object_assign () {
  2339. if (hasRequiredEs_object_assign) return es_object_assign;
  2340. hasRequiredEs_object_assign = 1;
  2341. var $ = require_export();
  2342. var assign = requireObjectAssign();
  2343. // `Object.assign` method
  2344. // https://tc39.es/ecma262/#sec-object.assign
  2345. // eslint-disable-next-line es/no-object-assign -- required for testing
  2346. $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
  2347. assign: assign
  2348. });
  2349. return es_object_assign;
  2350. }
  2351. requireEs_object_assign();
  2352. var es_object_toString = {};
  2353. var objectToString;
  2354. var hasRequiredObjectToString;
  2355. function requireObjectToString () {
  2356. if (hasRequiredObjectToString) return objectToString;
  2357. hasRequiredObjectToString = 1;
  2358. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2359. var classof = requireClassof();
  2360. // `Object.prototype.toString` method implementation
  2361. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2362. objectToString = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  2363. return '[object ' + classof(this) + ']';
  2364. };
  2365. return objectToString;
  2366. }
  2367. var hasRequiredEs_object_toString;
  2368. function requireEs_object_toString () {
  2369. if (hasRequiredEs_object_toString) return es_object_toString;
  2370. hasRequiredEs_object_toString = 1;
  2371. var TO_STRING_TAG_SUPPORT = requireToStringTagSupport();
  2372. var defineBuiltIn = requireDefineBuiltIn();
  2373. var toString = requireObjectToString();
  2374. // `Object.prototype.toString` method
  2375. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  2376. if (!TO_STRING_TAG_SUPPORT) {
  2377. defineBuiltIn(Object.prototype, 'toString', toString, { unsafe: true });
  2378. }
  2379. return es_object_toString;
  2380. }
  2381. requireEs_object_toString();
  2382. var es_parseFloat = {};
  2383. var whitespaces;
  2384. var hasRequiredWhitespaces;
  2385. function requireWhitespaces () {
  2386. if (hasRequiredWhitespaces) return whitespaces;
  2387. hasRequiredWhitespaces = 1;
  2388. // a string of all valid unicode whitespaces
  2389. whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  2390. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  2391. return whitespaces;
  2392. }
  2393. var stringTrim;
  2394. var hasRequiredStringTrim;
  2395. function requireStringTrim () {
  2396. if (hasRequiredStringTrim) return stringTrim;
  2397. hasRequiredStringTrim = 1;
  2398. var uncurryThis = requireFunctionUncurryThis();
  2399. var requireObjectCoercible = requireRequireObjectCoercible();
  2400. var toString = requireToString();
  2401. var whitespaces = requireWhitespaces();
  2402. var replace = uncurryThis(''.replace);
  2403. var ltrim = RegExp('^[' + whitespaces + ']+');
  2404. var rtrim = RegExp('(^|[^' + whitespaces + '])[' + whitespaces + ']+$');
  2405. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  2406. var createMethod = function (TYPE) {
  2407. return function ($this) {
  2408. var string = toString(requireObjectCoercible($this));
  2409. if (TYPE & 1) string = replace(string, ltrim, '');
  2410. if (TYPE & 2) string = replace(string, rtrim, '$1');
  2411. return string;
  2412. };
  2413. };
  2414. stringTrim = {
  2415. // `String.prototype.{ trimLeft, trimStart }` methods
  2416. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  2417. start: createMethod(1),
  2418. // `String.prototype.{ trimRight, trimEnd }` methods
  2419. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  2420. end: createMethod(2),
  2421. // `String.prototype.trim` method
  2422. // https://tc39.es/ecma262/#sec-string.prototype.trim
  2423. trim: createMethod(3)
  2424. };
  2425. return stringTrim;
  2426. }
  2427. var numberParseFloat;
  2428. var hasRequiredNumberParseFloat;
  2429. function requireNumberParseFloat () {
  2430. if (hasRequiredNumberParseFloat) return numberParseFloat;
  2431. hasRequiredNumberParseFloat = 1;
  2432. var globalThis = requireGlobalThis();
  2433. var fails = requireFails();
  2434. var uncurryThis = requireFunctionUncurryThis();
  2435. var toString = requireToString();
  2436. var trim = requireStringTrim().trim;
  2437. var whitespaces = requireWhitespaces();
  2438. var charAt = uncurryThis(''.charAt);
  2439. var $parseFloat = globalThis.parseFloat;
  2440. var Symbol = globalThis.Symbol;
  2441. var ITERATOR = Symbol && Symbol.iterator;
  2442. var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity
  2443. // MS Edge 18- broken with boxed symbols
  2444. || (ITERATOR && !fails(function () { $parseFloat(Object(ITERATOR)); }));
  2445. // `parseFloat` method
  2446. // https://tc39.es/ecma262/#sec-parsefloat-string
  2447. numberParseFloat = FORCED ? function parseFloat(string) {
  2448. var trimmedString = trim(toString(string));
  2449. var result = $parseFloat(trimmedString);
  2450. return result === 0 && charAt(trimmedString, 0) === '-' ? -0 : result;
  2451. } : $parseFloat;
  2452. return numberParseFloat;
  2453. }
  2454. var hasRequiredEs_parseFloat;
  2455. function requireEs_parseFloat () {
  2456. if (hasRequiredEs_parseFloat) return es_parseFloat;
  2457. hasRequiredEs_parseFloat = 1;
  2458. var $ = require_export();
  2459. var $parseFloat = requireNumberParseFloat();
  2460. // `parseFloat` method
  2461. // https://tc39.es/ecma262/#sec-parsefloat-string
  2462. $({ global: true, forced: parseFloat !== $parseFloat }, {
  2463. parseFloat: $parseFloat
  2464. });
  2465. return es_parseFloat;
  2466. }
  2467. requireEs_parseFloat();
  2468. var es_regexp_toString = {};
  2469. var regexpFlags;
  2470. var hasRequiredRegexpFlags;
  2471. function requireRegexpFlags () {
  2472. if (hasRequiredRegexpFlags) return regexpFlags;
  2473. hasRequiredRegexpFlags = 1;
  2474. var anObject = requireAnObject();
  2475. // `RegExp.prototype.flags` getter implementation
  2476. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  2477. regexpFlags = function () {
  2478. var that = anObject(this);
  2479. var result = '';
  2480. if (that.hasIndices) result += 'd';
  2481. if (that.global) result += 'g';
  2482. if (that.ignoreCase) result += 'i';
  2483. if (that.multiline) result += 'm';
  2484. if (that.dotAll) result += 's';
  2485. if (that.unicode) result += 'u';
  2486. if (that.unicodeSets) result += 'v';
  2487. if (that.sticky) result += 'y';
  2488. return result;
  2489. };
  2490. return regexpFlags;
  2491. }
  2492. var regexpGetFlags;
  2493. var hasRequiredRegexpGetFlags;
  2494. function requireRegexpGetFlags () {
  2495. if (hasRequiredRegexpGetFlags) return regexpGetFlags;
  2496. hasRequiredRegexpGetFlags = 1;
  2497. var call = requireFunctionCall();
  2498. var hasOwn = requireHasOwnProperty();
  2499. var isPrototypeOf = requireObjectIsPrototypeOf();
  2500. var regExpFlags = requireRegexpFlags();
  2501. var RegExpPrototype = RegExp.prototype;
  2502. regexpGetFlags = function (R) {
  2503. var flags = R.flags;
  2504. return flags === undefined && !('flags' in RegExpPrototype) && !hasOwn(R, 'flags') && isPrototypeOf(RegExpPrototype, R)
  2505. ? call(regExpFlags, R) : flags;
  2506. };
  2507. return regexpGetFlags;
  2508. }
  2509. var hasRequiredEs_regexp_toString;
  2510. function requireEs_regexp_toString () {
  2511. if (hasRequiredEs_regexp_toString) return es_regexp_toString;
  2512. hasRequiredEs_regexp_toString = 1;
  2513. var PROPER_FUNCTION_NAME = requireFunctionName().PROPER;
  2514. var defineBuiltIn = requireDefineBuiltIn();
  2515. var anObject = requireAnObject();
  2516. var $toString = requireToString();
  2517. var fails = requireFails();
  2518. var getRegExpFlags = requireRegexpGetFlags();
  2519. var TO_STRING = 'toString';
  2520. var RegExpPrototype = RegExp.prototype;
  2521. var nativeToString = RegExpPrototype[TO_STRING];
  2522. var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
  2523. // FF44- RegExp#toString has a wrong name
  2524. var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
  2525. // `RegExp.prototype.toString` method
  2526. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  2527. if (NOT_GENERIC || INCORRECT_NAME) {
  2528. defineBuiltIn(RegExpPrototype, TO_STRING, function toString() {
  2529. var R = anObject(this);
  2530. var pattern = $toString(R.source);
  2531. var flags = $toString(getRegExpFlags(R));
  2532. return '/' + pattern + '/' + flags;
  2533. }, { unsafe: true });
  2534. }
  2535. return es_regexp_toString;
  2536. }
  2537. requireEs_regexp_toString();
  2538. /**
  2539. * @author Nadim Basalamah <dimbslmh@gmail.com>
  2540. * @version: v1.1.0
  2541. * @update: ErwannNevou <https://github.com/ErwannNevou>
  2542. */
  2543. var isSingleSort = false;
  2544. var Utils = $.fn.bootstrapTable.utils;
  2545. Object.assign($.fn.bootstrapTable.defaults.icons, {
  2546. plus: {
  2547. bootstrap3: 'glyphicon-plus',
  2548. bootstrap4: 'fa-plus',
  2549. bootstrap5: 'bi-plus',
  2550. semantic: 'fa-plus',
  2551. materialize: 'plus',
  2552. foundation: 'fa-plus',
  2553. bulma: 'fa-plus',
  2554. 'bootstrap-table': 'icon-plus'
  2555. }[$.fn.bootstrapTable.theme] || 'fa-clock',
  2556. minus: {
  2557. bootstrap3: 'glyphicon-minus',
  2558. bootstrap4: 'fa-minus',
  2559. bootstrap5: 'bi-dash',
  2560. semantic: 'fa-minus',
  2561. materialize: 'minus',
  2562. foundation: 'fa-minus',
  2563. bulma: 'fa-minus',
  2564. 'bootstrap-table': 'icon-minus'
  2565. }[$.fn.bootstrapTable.theme] || 'fa-clock',
  2566. sort: {
  2567. bootstrap3: 'glyphicon-sort',
  2568. bootstrap4: 'fa-sort',
  2569. bootstrap5: 'bi-arrow-down-up',
  2570. semantic: 'fa-sort',
  2571. materialize: 'sort',
  2572. foundation: 'fa-sort',
  2573. bulma: 'fa-sort',
  2574. 'bootstrap-table': 'icon-sort-amount-asc'
  2575. }[$.fn.bootstrapTable.theme] || 'fa-clock'
  2576. });
  2577. var theme = {
  2578. bootstrap3: {
  2579. html: {
  2580. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>\n <h4 class=\"modal-title\" id=\"%sLabel\">%s</h4>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars\">\n <button type=\"button\" class=\"toolbar-btn-add btn btn-default\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete btn btn-default\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  2581. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  2582. multipleSortSelect: '<select class="%s %s form-control">'
  2583. }
  2584. },
  2585. bootstrap4: {
  2586. html: {
  2587. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars pb-3\">\n <button type=\"button\" class=\"toolbar-btn-add btn btn-secondary\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  2588. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  2589. multipleSortSelect: '<select class="%s %s form-control">'
  2590. }
  2591. },
  2592. bootstrap5: {
  2593. html: {
  2594. multipleSortModal: "\n <div class=\"modal fade\" id=\"%s\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-dialog\" role=\"document\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\" id=\"%sLabel\">%s</h5>\n <button type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars pb-3\">\n <button type=\"button\" class=\"toolbar-btn-add btn btn-secondary\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete btn btn-secondary\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-secondary\" data-bs-dismiss=\"modal\">%s</button>\n <button type=\"button\" class=\"btn btn-primary multi-sort-order-button\">%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  2595. multipleSortButton: '<button class="multi-sort %s" type="button" data-bs-toggle="modal" data-bs-target="#%s" title="%s">%s</button>',
  2596. multipleSortSelect: '<select class="%s %s form-control">'
  2597. }
  2598. },
  2599. semantic: {
  2600. html: {
  2601. multipleSortModal: "\n <div class=\"ui modal tiny\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <i class=\"close icon\"></i>\n <div class=\"header\" id=\"%sLabel\">\n %s\n </div>\n <div class=\"image content\">\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars pb-3\">\n <button type=\"button\" class=\"toolbar-btn-add ui button\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete ui button\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n </div>\n <div class=\"actions\">\n <div class=\"ui button deny\">%s</div>\n <div class=\"ui button approve multi-sort-order-button\">%s</div>\n </div>\n </div>\n ",
  2602. multipleSortButton: '<button class="multi-sort %s" type="button" data-toggle="modal" data-target="#%s" title="%s">%s</button>',
  2603. multipleSortSelect: '<select class="%s %s">'
  2604. }
  2605. },
  2606. materialize: {
  2607. html: {
  2608. multipleSortModal: "\n <div id=\"%s\" class=\"modal\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-content\" id=\"%sLabel\">\n <h4>%s</h4>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars pb-3\">\n <button type=\"button\" class=\"toolbar-btn-add waves-effect waves-light btn\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete waves-effect waves-light btn\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"modal-footer\">\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn\">%s</a>\n <a href=\"javascript:void(0)\" class=\"modal-close waves-effect waves-light btn multi-sort-order-button\">%s</a>\n </div>\n </div>\n </div>\n ",
  2609. multipleSortButton: '<a class="multi-sort %s modal-trigger" href="#%s" type="button" data-toggle="modal" title="%s">%s</a>',
  2610. multipleSortSelect: '<select class="%s %s browser-default">'
  2611. }
  2612. },
  2613. foundation: {
  2614. html: {
  2615. multipleSortModal: "\n <div class=\"reveal\" id=\"%s\" data-reveal aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div id=\"%sLabel\">\n <h1>%s</h1>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars padding-bottom-2\">\n <button type=\"button\" class=\"toolbar-btn-add waves-effect waves-light button\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n\n <button class=\"waves-effect waves-light button\" data-close aria-label=\"Close modal\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n <button class=\"waves-effect waves-light button multi-sort-order-button\" data-close aria-label=\"Order\" type=\"button\">\n <span aria-hidden=\"true\">%s</span>\n </button>\n </div>\n </div>\n ",
  2616. multipleSortButton: '<button class="multi-sort %s" data-open="%s" title="%s">%s</button>',
  2617. multipleSortSelect: '<select class="%s %s browser-default">'
  2618. }
  2619. },
  2620. bulma: {
  2621. html: {
  2622. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars padding-bottom-2\">\n <button type=\"button\" class=\"toolbar-btn-add waves-effect waves-light button\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete waves-effect waves-light button\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <button type=\"button\" class=\"waves-effect waves-light button\" data-close>%s</button>\n <button type=\"button\" class=\"waves-effect waves-light button multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n ",
  2623. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  2624. multipleSortSelect: '<select class="%s %s browser-default">'
  2625. }
  2626. },
  2627. 'bootstrap-table': {
  2628. html: {
  2629. multipleSortModal: "\n <div class=\"modal\" id=\"%s\" aria-labelledby=\"%sLabel\" aria-hidden=\"true\">\n <div class=\"modal-background\"></div>\n <div class=\"modal-content\" id=\"%sLabel\">\n <div class=\"box\">\n <h2>%s</h2>\n <div class=\"bootstrap-table\">\n <div class=\"fixed-table-toolbar\">\n <div class=\"bars padding-bottom-2\">\n <button type=\"button\" class=\"toolbar-btn-add btn\">%s %s</button>\n <button type=\"button\" class=\"toolbar-btn-delete btn\" disabled>%s %s</button>\n </div>\n </div>\n <div class=\"fixed-table-container\">\n <table class=\"table\">\n <thead>\n <tr>\n <th></th>\n <th><div class=\"th-inner\">%s</div></th>\n <th><div class=\"th-inner\">%s</div></th>\n </tr>\n </thead>\n <tbody></tbody>\n </table>\n </div>\n </div>\n <div class=\"mt-30\">\n <button type=\"button\" class=\"btn\" data-close>%s</button>\n <button type=\"button\" class=\"btn multi-sort-order-button\" data-close>%s</button>\n </div>\n </div>\n </div>\n </div>\n ",
  2630. multipleSortButton: '<button class="multi-sort %s" data-target="%s" title="%s">%s</button>',
  2631. multipleSortSelect: '<select class="%s %s browser-default">'
  2632. }
  2633. }
  2634. }[$.fn.bootstrapTable.theme];
  2635. var showSortModal = function showSortModal(that) {
  2636. var _selector = that.sortModalSelector;
  2637. var _id = "#".concat(_selector);
  2638. var o = that.options;
  2639. if (!$(_id).hasClass('modal')) {
  2640. var sModal = Utils.sprintf(theme.html.multipleSortModal, _selector, _selector, _selector, that.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.plus), that.options.formatAddLevel(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.minus), that.options.formatDeleteLevel(), that.options.formatColumn(), that.options.formatOrder(), that.options.formatCancel(), that.options.formatSort());
  2641. $('body').append($(sModal));
  2642. that.$sortModal = $(_id);
  2643. var $rows = that.$sortModal.find('tbody > tr');
  2644. that.$sortModal.off('click', '.toolbar-btn-add').on('click', '.toolbar-btn-add', function () {
  2645. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  2646. var current = that.$sortModal.find('tbody tr').length;
  2647. if (current < total) {
  2648. current++;
  2649. that.addLevel();
  2650. that.setButtonStates();
  2651. }
  2652. });
  2653. that.$sortModal.off('click', '.toolbar-btn-delete').on('click', '.toolbar-btn-delete', function () {
  2654. var total = that.$sortModal.find('.multi-sort-name:first option').length;
  2655. var current = that.$sortModal.find('tbody tr').length;
  2656. if (current > 1 && current <= total) {
  2657. current--;
  2658. that.$sortModal.find('tbody tr:last').remove();
  2659. that.setButtonStates();
  2660. }
  2661. });
  2662. that.$sortModal.off('click', '.multi-sort-order-button').on('click', '.multi-sort-order-button', function () {
  2663. var $rows = that.$sortModal.find('tbody > tr');
  2664. var $alert = that.$sortModal.find('div.alert');
  2665. var fields = [];
  2666. var results = [];
  2667. var sortPriority = $.map($rows, function (row) {
  2668. var $row = $(row);
  2669. var name = $row.find('.multi-sort-name').val();
  2670. var order = $row.find('.multi-sort-order').val();
  2671. fields.push(name);
  2672. return {
  2673. sortName: name,
  2674. sortOrder: order
  2675. };
  2676. });
  2677. var sorted_fields = fields.sort();
  2678. for (var i = 0; i < fields.length - 1; i++) {
  2679. if (sorted_fields[i + 1] === sorted_fields[i]) {
  2680. results.push(sorted_fields[i]);
  2681. }
  2682. }
  2683. if (results.length > 0) {
  2684. if ($alert.length === 0) {
  2685. $alert = "<div class=\"alert alert-danger\" role=\"alert\"><strong>".concat(that.options.formatDuplicateAlertTitle(), "</strong> ").concat(that.options.formatDuplicateAlertDescription(), "</div>");
  2686. $($alert).insertBefore(that.$sortModal.find('.bars'));
  2687. }
  2688. } else {
  2689. if ($alert.length === 1) {
  2690. $($alert).remove();
  2691. }
  2692. if (['bootstrap3', 'bootstrap4', 'bootstrap5'].includes($.fn.bootstrapTable.theme)) {
  2693. that.$sortModal.modal('hide');
  2694. }
  2695. that.multiSort(sortPriority);
  2696. }
  2697. });
  2698. if (that.options.sortPriority === null || that.options.sortPriority.length === 0) {
  2699. if (that.options.sortName) {
  2700. that.options.sortPriority = [{
  2701. sortName: that.options.sortName,
  2702. sortOrder: that.options.sortOrder
  2703. }];
  2704. }
  2705. }
  2706. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  2707. if ($rows.length < that.options.sortPriority.length && _typeof(that.options.sortPriority) === 'object') {
  2708. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2709. that.addLevel(i, that.options.sortPriority[i]);
  2710. }
  2711. }
  2712. } else {
  2713. that.addLevel(0);
  2714. }
  2715. that.setButtonStates();
  2716. }
  2717. };
  2718. $.fn.bootstrapTable.methods.push('multipleSort');
  2719. $.fn.bootstrapTable.methods.push('multiSort');
  2720. Object.assign($.fn.bootstrapTable.defaults, {
  2721. showMultiSort: false,
  2722. showMultiSortButton: true,
  2723. multiSortStrictSort: false,
  2724. sortPriority: null,
  2725. onMultipleSort: function onMultipleSort() {
  2726. return false;
  2727. }
  2728. });
  2729. Object.assign($.fn.bootstrapTable.events, {
  2730. 'multiple-sort.bs.table': 'onMultipleSort'
  2731. });
  2732. Object.assign($.fn.bootstrapTable.locales, {
  2733. formatMultipleSort: function formatMultipleSort() {
  2734. return 'Multiple Sort';
  2735. },
  2736. formatAddLevel: function formatAddLevel() {
  2737. return 'Add Level';
  2738. },
  2739. formatDeleteLevel: function formatDeleteLevel() {
  2740. return 'Delete Level';
  2741. },
  2742. formatColumn: function formatColumn() {
  2743. return 'Column';
  2744. },
  2745. formatOrder: function formatOrder() {
  2746. return 'Order';
  2747. },
  2748. formatSortBy: function formatSortBy() {
  2749. return 'Sort by';
  2750. },
  2751. formatThenBy: function formatThenBy() {
  2752. return 'Then by';
  2753. },
  2754. formatSort: function formatSort() {
  2755. return 'Sort';
  2756. },
  2757. formatCancel: function formatCancel() {
  2758. return 'Cancel';
  2759. },
  2760. formatDuplicateAlertTitle: function formatDuplicateAlertTitle() {
  2761. return 'Duplicate(s) detected!';
  2762. },
  2763. formatDuplicateAlertDescription: function formatDuplicateAlertDescription() {
  2764. return 'Please remove or change any duplicate column.';
  2765. },
  2766. formatSortOrders: function formatSortOrders() {
  2767. return {
  2768. asc: 'Ascending',
  2769. desc: 'Descending'
  2770. };
  2771. }
  2772. });
  2773. Object.assign($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales);
  2774. var BootstrapTable = $.fn.bootstrapTable.Constructor;
  2775. var _initToolbar = BootstrapTable.prototype.initToolbar;
  2776. var _destroy = BootstrapTable.prototype.destroy;
  2777. BootstrapTable.prototype.initToolbar = function () {
  2778. var _this = this;
  2779. this.showToolbar = this.showToolbar || this.options.showMultiSort;
  2780. var that = this;
  2781. var sortModalSelector = Utils.getEventName('sort-modal', this.$el.attr('id'));
  2782. var sortModalId = "#".concat(sortModalSelector);
  2783. var $multiSortBtn = this.$toolbar.find('div.multi-sort');
  2784. var o = this.options;
  2785. this.$sortModal = $(sortModalId);
  2786. this.sortModalSelector = sortModalSelector;
  2787. if (that.options.sortPriority !== null) {
  2788. that.onMultipleSort();
  2789. }
  2790. if (this.options.showMultiSort && this.options.showMultiSortButton) {
  2791. this.buttons = Object.assign(this.buttons, {
  2792. multipleSort: {
  2793. html: Utils.sprintf(theme.html.multipleSortButton, that.constants.buttonsClass, that.sortModalSelector, this.options.formatMultipleSort(), Utils.sprintf(that.constants.html.icon, o.iconsPrefix, o.icons.sort))
  2794. }
  2795. });
  2796. }
  2797. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  2798. args[_key] = arguments[_key];
  2799. }
  2800. _initToolbar.apply(this, Array.prototype.slice.apply(args));
  2801. if (that.options.sidePagination === 'server' && !isSingleSort && that.options.sortPriority !== null) {
  2802. var t = that.options.queryParams;
  2803. that.options.queryParams = function (params) {
  2804. params.multiSort = that.options.sortPriority;
  2805. return t(params);
  2806. };
  2807. }
  2808. if (this.options.showMultiSort) {
  2809. if (!$multiSortBtn.length && this.options.showMultiSortButton) {
  2810. if ($.fn.bootstrapTable.theme === 'semantic') {
  2811. this.$toolbar.find('.multi-sort').on('click', function () {
  2812. $(sortModalId).modal('show');
  2813. });
  2814. } else if ($.fn.bootstrapTable.theme === 'materialize') {
  2815. this.$toolbar.find('.multi-sort').on('click', function () {
  2816. $(sortModalId).modal();
  2817. });
  2818. } else if ($.fn.bootstrapTable.theme === 'bootstrap-table') {
  2819. this.$toolbar.find('.multi-sort').on('click', function () {
  2820. $(sortModalId).addClass('show');
  2821. });
  2822. } else if ($.fn.bootstrapTable.theme === 'foundation') {
  2823. this.$toolbar.find('.multi-sort').on('click', function () {
  2824. if (!_this.foundationModal) {
  2825. // eslint-disable-next-line no-undef
  2826. _this.foundationModal = new Foundation.Reveal($(sortModalId));
  2827. }
  2828. _this.foundationModal.open();
  2829. });
  2830. } else if ($.fn.bootstrapTable.theme === 'bulma') {
  2831. this.$toolbar.find('.multi-sort').on('click', function () {
  2832. $('html').toggleClass('is-clipped');
  2833. $(sortModalId).toggleClass('is-active');
  2834. $('button[data-close]').one('click', function () {
  2835. $('html').toggleClass('is-clipped');
  2836. $(sortModalId).toggleClass('is-active');
  2837. });
  2838. });
  2839. }
  2840. showSortModal(that);
  2841. }
  2842. this.$el.on('sort.bs.table', function () {
  2843. isSingleSort = true;
  2844. });
  2845. this.$el.on('multiple-sort.bs.table', function () {
  2846. isSingleSort = false;
  2847. });
  2848. this.$el.on('load-success.bs.table', function () {
  2849. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2850. that.onMultipleSort();
  2851. }
  2852. });
  2853. this.$el.on('column-switch.bs.table', function (field, checked) {
  2854. if (that.options.sortPriority !== null && that.options.sortPriority.length > 0) {
  2855. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2856. if (that.options.sortPriority[i].sortName === checked) {
  2857. that.options.sortPriority.splice(i, 1);
  2858. }
  2859. }
  2860. that.assignSortableArrows();
  2861. }
  2862. that.$sortModal.remove();
  2863. showSortModal(that);
  2864. });
  2865. this.$el.on('reset-view.bs.table', function () {
  2866. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object') {
  2867. that.assignSortableArrows();
  2868. }
  2869. });
  2870. }
  2871. };
  2872. BootstrapTable.prototype.destroy = function () {
  2873. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  2874. args[_key2] = arguments[_key2];
  2875. }
  2876. _destroy.apply(this, Array.prototype.slice.apply(args));
  2877. if (this.options.showMultiSort) {
  2878. this.enableCustomSort = false;
  2879. this.$sortModal.remove();
  2880. }
  2881. };
  2882. BootstrapTable.prototype.multipleSort = function () {
  2883. var that = this;
  2884. if (!isSingleSort && that.options.sortPriority !== null && _typeof(that.options.sortPriority) === 'object' && that.options.sidePagination !== 'server') {
  2885. that.onMultipleSort();
  2886. }
  2887. };
  2888. BootstrapTable.prototype.onMultipleSort = function () {
  2889. var that = this;
  2890. var cmp = function cmp(x, y) {
  2891. return x > y ? 1 : x < y ? -1 : 0;
  2892. };
  2893. var arrayCmp = function arrayCmp(a, b) {
  2894. var arr1 = [];
  2895. var arr2 = [];
  2896. for (var i = 0; i < that.options.sortPriority.length; i++) {
  2897. var fieldName = that.options.sortPriority[i].sortName;
  2898. var fieldIndex = that.header.fields.indexOf(fieldName);
  2899. var sorterName = that.header.sorters[that.header.fields.indexOf(fieldName)];
  2900. if (that.header.sortNames[fieldIndex]) {
  2901. fieldName = that.header.sortNames[fieldIndex];
  2902. }
  2903. var order = that.options.sortPriority[i].sortOrder === 'desc' ? -1 : 1;
  2904. var aa = Utils.getItemField(a, fieldName);
  2905. var bb = Utils.getItemField(b, fieldName);
  2906. var value1 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [aa, bb, a, b]);
  2907. var value2 = $.fn.bootstrapTable.utils.calculateObjectValue(that.header, sorterName, [bb, aa, b, a]);
  2908. if (value1 !== undefined && value2 !== undefined) {
  2909. arr1.push(order * value1);
  2910. arr2.push(order * value2);
  2911. continue;
  2912. }
  2913. if (aa === undefined || aa === null) aa = '';
  2914. if (bb === undefined || bb === null) bb = '';
  2915. if ($.isNumeric(aa) && $.isNumeric(bb)) {
  2916. aa = parseFloat(aa);
  2917. bb = parseFloat(bb);
  2918. } else {
  2919. aa = aa.toString();
  2920. bb = bb.toString();
  2921. if (that.options.multiSortStrictSort) {
  2922. aa = aa.toLowerCase();
  2923. bb = bb.toLowerCase();
  2924. }
  2925. }
  2926. arr1.push(order * cmp(aa, bb));
  2927. arr2.push(order * cmp(bb, aa));
  2928. }
  2929. return cmp(arr1, arr2);
  2930. };
  2931. this.enableCustomSort = true;
  2932. this.data.sort(function (a, b) {
  2933. return arrayCmp(a, b);
  2934. });
  2935. this.initBody();
  2936. this.assignSortableArrows();
  2937. this.trigger('multiple-sort');
  2938. };
  2939. BootstrapTable.prototype.addLevel = function (index, sortPriority) {
  2940. var text = index === 0 ? this.options.formatSortBy() : this.options.formatThenBy();
  2941. this.$sortModal.find('tbody').append($('<tr>').append($('<td>').text(text)).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-name')))).append($('<td>').append($(Utils.sprintf(theme.html.multipleSortSelect, this.constants.classes.paginationDropdown, 'multi-sort-order')))));
  2942. var $multiSortName = this.$sortModal.find('.multi-sort-name').last();
  2943. var $multiSortOrder = this.$sortModal.find('.multi-sort-order').last();
  2944. $.each(this.columns, function (i, column) {
  2945. if (column.sortable === false || column.visible === false) {
  2946. return true;
  2947. }
  2948. $multiSortName.append("<option value=\"".concat(column.field, "\">").concat(column.title, "</option>"));
  2949. });
  2950. $.each(this.options.formatSortOrders(), function (value, order) {
  2951. $multiSortOrder.append("<option value=\"".concat(value, "\">").concat(order, "</option>"));
  2952. });
  2953. if (sortPriority !== undefined) {
  2954. $multiSortName.find("option[value=\"".concat(sortPriority.sortName, "\"]")).attr('selected', true);
  2955. $multiSortOrder.find("option[value=\"".concat(sortPriority.sortOrder, "\"]")).attr('selected', true);
  2956. }
  2957. };
  2958. BootstrapTable.prototype.assignSortableArrows = function () {
  2959. var that = this;
  2960. var headers = that.$header.find('th');
  2961. for (var i = 0; i < headers.length; i++) {
  2962. for (var c = 0; c < that.options.sortPriority.length; c++) {
  2963. if ($(headers[i]).data('field') === that.options.sortPriority[c].sortName) {
  2964. $(headers[i]).find('.sortable').removeClass('desc asc').addClass(that.options.sortPriority[c].sortOrder);
  2965. }
  2966. }
  2967. }
  2968. };
  2969. BootstrapTable.prototype.setButtonStates = function () {
  2970. var total = this.$sortModal.find('.multi-sort-name:first option').length;
  2971. var current = this.$sortModal.find('tbody tr').length;
  2972. if (current === total) {
  2973. this.$sortModal.find('.toolbar-btn-add').attr('disabled', 'disabled');
  2974. }
  2975. if (current > 1) {
  2976. this.$sortModal.find('.toolbar-btn-delete').removeAttr('disabled');
  2977. }
  2978. if (current < total) {
  2979. this.$sortModal.find('.toolbar-btn-add').removeAttr('disabled');
  2980. }
  2981. if (current === 1) {
  2982. this.$sortModal.find('.toolbar-btn-delete').attr('disabled', 'disabled');
  2983. }
  2984. };
  2985. BootstrapTable.prototype.multiSort = function (sortPriority) {
  2986. var _this2 = this;
  2987. this.options.sortPriority = sortPriority;
  2988. this.options.sortName = undefined;
  2989. if (this.options.sidePagination === 'server') {
  2990. var queryParams = this.options.queryParams;
  2991. this.options.queryParams = function (params) {
  2992. params.multiSort = _this2.options.sortPriority;
  2993. return $.fn.bootstrapTable.utils.calculateObjectValue(_this2.options, queryParams, [params]);
  2994. };
  2995. isSingleSort = false;
  2996. this.initServer(this.options.silentSort);
  2997. }
  2998. this.onMultipleSort();
  2999. };
  3000. }));