@spscommerce/utils 5.0.2 → 5.2.2-ie
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pnpm-debug.log +20 -0
- package/dist/out-tsc/array/flatten.d.ts +1 -0
- package/dist/out-tsc/array/flatten.js +7 -0
- package/dist/out-tsc/array/flatten.js.map +1 -0
- package/dist/out-tsc/array/flatten.spec.d.ts +1 -0
- package/dist/out-tsc/array/flatten.spec.js +10 -0
- package/dist/out-tsc/array/flatten.spec.js.map +1 -0
- package/dist/out-tsc/array/index.d.ts +3 -0
- package/dist/out-tsc/array/index.js +4 -0
- package/dist/out-tsc/array/index.js.map +1 -0
- package/dist/out-tsc/array/is-subset.d.ts +4 -0
- package/dist/out-tsc/array/is-subset.js +41 -0
- package/dist/out-tsc/array/is-subset.js.map +1 -0
- package/dist/out-tsc/array/is-subset.spec.d.ts +1 -0
- package/dist/out-tsc/array/is-subset.spec.js +41 -0
- package/dist/out-tsc/array/is-subset.spec.js.map +1 -0
- package/dist/out-tsc/array/range.d.ts +5 -0
- package/dist/out-tsc/array/range.js +16 -0
- package/dist/out-tsc/array/range.js.map +1 -0
- package/dist/out-tsc/array/range.spec.d.ts +1 -0
- package/dist/out-tsc/array/range.spec.js +26 -0
- package/dist/out-tsc/array/range.spec.js.map +1 -0
- package/dist/out-tsc/classes/custom-event.d.ts +4 -0
- package/dist/out-tsc/classes/custom-event.js +87 -0
- package/dist/out-tsc/classes/custom-event.js.map +1 -0
- package/dist/out-tsc/classes/index.d.ts +1 -0
- package/dist/out-tsc/classes/index.js +2 -0
- package/dist/out-tsc/classes/index.js.map +1 -0
- package/dist/out-tsc/data/doctypes.d.ts +4 -0
- package/dist/out-tsc/data/doctypes.js +302 -0
- package/dist/out-tsc/data/doctypes.js.map +1 -0
- package/dist/out-tsc/data/index.d.ts +1 -0
- package/dist/out-tsc/data/index.js +2 -0
- package/dist/out-tsc/data/index.js.map +1 -0
- package/dist/out-tsc/decorators/cast-to-number.d.ts +5 -0
- package/dist/out-tsc/decorators/cast-to-number.js +29 -0
- package/dist/out-tsc/decorators/cast-to-number.js.map +1 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.d.ts +0 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.js +38 -0
- package/dist/out-tsc/decorators/debounced.broken_spec.js.map +1 -0
- package/dist/out-tsc/decorators/debounced.d.ts +11 -0
- package/dist/out-tsc/decorators/debounced.js +35 -0
- package/dist/out-tsc/decorators/debounced.js.map +1 -0
- package/dist/out-tsc/decorators/index.d.ts +5 -0
- package/dist/out-tsc/decorators/index.js +6 -0
- package/dist/out-tsc/decorators/index.js.map +1 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.d.ts +4 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.js +34 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.js.map +1 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js +63 -0
- package/dist/out-tsc/decorators/locked-to-animation-frames.spec.js.map +1 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.d.ts +11 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js +80 -0
- package/dist/out-tsc/decorators/simple-metadata-decorator-applicator.js.map +1 -0
- package/dist/out-tsc/decorators/tick-delay.d.ts +6 -0
- package/dist/out-tsc/decorators/tick-delay.js +31 -0
- package/dist/out-tsc/decorators/tick-delay.js.map +1 -0
- package/dist/out-tsc/function/debounce.d.ts +9 -0
- package/dist/out-tsc/function/debounce.js +102 -0
- package/dist/out-tsc/function/debounce.js.map +1 -0
- package/dist/out-tsc/function/debounce.spec.d.ts +1 -0
- package/dist/out-tsc/function/debounce.spec.js +150 -0
- package/dist/out-tsc/function/debounce.spec.js.map +1 -0
- package/dist/out-tsc/function/debounced-function.interface.d.ts +10 -0
- package/dist/out-tsc/function/debounced-function.interface.js +2 -0
- package/dist/out-tsc/function/debounced-function.interface.js.map +1 -0
- package/dist/out-tsc/function/delayed-function.interface.d.ts +10 -0
- package/dist/out-tsc/function/delayed-function.interface.js +2 -0
- package/dist/out-tsc/function/delayed-function.interface.js.map +1 -0
- package/dist/out-tsc/function/index.d.ts +6 -0
- package/dist/out-tsc/function/index.js +7 -0
- package/dist/out-tsc/function/index.js.map +1 -0
- package/dist/out-tsc/function/lock-to-animation-frames.d.ts +7 -0
- package/dist/out-tsc/function/lock-to-animation-frames.js +43 -0
- package/dist/out-tsc/function/lock-to-animation-frames.js.map +1 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.d.ts +0 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js +53 -0
- package/dist/out-tsc/function/lock-to-animation-frames.spec.js.map +1 -0
- package/dist/out-tsc/function/on-next-tick.d.ts +8 -0
- package/dist/out-tsc/function/on-next-tick.js +12 -0
- package/dist/out-tsc/function/on-next-tick.js.map +1 -0
- package/dist/out-tsc/function/on-next-tick.spec.d.ts +1 -0
- package/dist/out-tsc/function/on-next-tick.spec.js +13 -0
- package/dist/out-tsc/function/on-next-tick.spec.js.map +1 -0
- package/dist/out-tsc/function/op.d.ts +32 -0
- package/dist/out-tsc/function/op.js +34 -0
- package/dist/out-tsc/function/op.js.map +1 -0
- package/dist/out-tsc/function/op.spec.d.ts +1 -0
- package/dist/out-tsc/function/op.spec.js +94 -0
- package/dist/out-tsc/function/op.spec.js.map +1 -0
- package/dist/out-tsc/index.d.ts +9 -0
- package/dist/out-tsc/index.js +10 -0
- package/dist/out-tsc/index.js.map +1 -0
- package/dist/out-tsc/number/constrain.d.ts +7 -0
- package/dist/out-tsc/number/constrain.js +16 -0
- package/dist/out-tsc/number/constrain.js.map +1 -0
- package/dist/out-tsc/number/decimal-round.d.ts +7 -0
- package/dist/out-tsc/number/decimal-round.js +19 -0
- package/dist/out-tsc/number/decimal-round.js.map +1 -0
- package/dist/out-tsc/number/decimal-round.spec.d.ts +1 -0
- package/dist/out-tsc/number/decimal-round.spec.js +10 -0
- package/dist/out-tsc/number/decimal-round.spec.js.map +1 -0
- package/dist/out-tsc/number/index.d.ts +3 -0
- package/dist/out-tsc/number/index.js +4 -0
- package/dist/out-tsc/number/index.js.map +1 -0
- package/dist/out-tsc/number/to-file-size-string.d.ts +5 -0
- package/dist/out-tsc/number/to-file-size-string.js +24 -0
- package/dist/out-tsc/number/to-file-size-string.js.map +1 -0
- package/dist/out-tsc/object/copy-property.d.ts +6 -0
- package/dist/out-tsc/object/copy-property.js +9 -0
- package/dist/out-tsc/object/copy-property.js.map +1 -0
- package/dist/out-tsc/object/copy-property.spec.d.ts +1 -0
- package/dist/out-tsc/object/copy-property.spec.js +16 -0
- package/dist/out-tsc/object/copy-property.spec.js.map +1 -0
- package/dist/out-tsc/object/crumble-path.d.ts +6 -0
- package/dist/out-tsc/object/crumble-path.js +9 -0
- package/dist/out-tsc/object/crumble-path.js.map +1 -0
- package/dist/out-tsc/object/crumble-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/crumble-path.spec.js +24 -0
- package/dist/out-tsc/object/crumble-path.spec.js.map +1 -0
- package/dist/out-tsc/object/deep-freeze.d.ts +1 -0
- package/dist/out-tsc/object/deep-freeze.js +36 -0
- package/dist/out-tsc/object/deep-freeze.js.map +1 -0
- package/dist/out-tsc/object/deep-freeze.spec.d.ts +1 -0
- package/dist/out-tsc/object/deep-freeze.spec.js +14 -0
- package/dist/out-tsc/object/deep-freeze.spec.js.map +1 -0
- package/dist/out-tsc/object/diff.d.ts +12 -0
- package/dist/out-tsc/object/diff.js +92 -0
- package/dist/out-tsc/object/diff.js.map +1 -0
- package/dist/out-tsc/object/diff.spec.d.ts +1 -0
- package/dist/out-tsc/object/diff.spec.js +40 -0
- package/dist/out-tsc/object/diff.spec.js.map +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.d.ts +4 -0
- package/dist/out-tsc/object/for-each-entry-deep.js +38 -0
- package/dist/out-tsc/object/for-each-entry-deep.js.map +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.js +24 -0
- package/dist/out-tsc/object/for-each-entry-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/for-each-nested-object.d.ts +4 -0
- package/dist/out-tsc/object/for-each-nested-object.js +38 -0
- package/dist/out-tsc/object/for-each-nested-object.js.map +1 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.d.ts +1 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.js +46 -0
- package/dist/out-tsc/object/for-each-nested-object.spec.js.map +1 -0
- package/dist/out-tsc/object/get-path.d.ts +5 -0
- package/dist/out-tsc/object/get-path.js +67 -0
- package/dist/out-tsc/object/get-path.js.map +1 -0
- package/dist/out-tsc/object/get-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/get-path.spec.js +44 -0
- package/dist/out-tsc/object/get-path.spec.js.map +1 -0
- package/dist/out-tsc/object/index.d.ts +13 -0
- package/dist/out-tsc/object/index.js +14 -0
- package/dist/out-tsc/object/index.js.map +1 -0
- package/dist/out-tsc/object/merge-deep.d.ts +4 -0
- package/dist/out-tsc/object/merge-deep.js +60 -0
- package/dist/out-tsc/object/merge-deep.js.map +1 -0
- package/dist/out-tsc/object/merge-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/merge-deep.spec.js +16 -0
- package/dist/out-tsc/object/merge-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/merge-properties-deep.d.ts +4 -0
- package/dist/out-tsc/object/merge-properties-deep.js +61 -0
- package/dist/out-tsc/object/merge-properties-deep.js.map +1 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.d.ts +1 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.js +24 -0
- package/dist/out-tsc/object/merge-properties-deep.spec.js.map +1 -0
- package/dist/out-tsc/object/omit.d.ts +1 -0
- package/dist/out-tsc/object/omit.js +40 -0
- package/dist/out-tsc/object/omit.js.map +1 -0
- package/dist/out-tsc/object/omit.spec.d.ts +1 -0
- package/dist/out-tsc/object/omit.spec.js +10 -0
- package/dist/out-tsc/object/omit.spec.js.map +1 -0
- package/dist/out-tsc/object/set-path.d.ts +2 -0
- package/dist/out-tsc/object/set-path.js +45 -0
- package/dist/out-tsc/object/set-path.js.map +1 -0
- package/dist/out-tsc/object/set-path.spec.d.ts +1 -0
- package/dist/out-tsc/object/set-path.spec.js +36 -0
- package/dist/out-tsc/object/set-path.spec.js.map +1 -0
- package/dist/out-tsc/object/traverse-path.d.ts +2 -0
- package/dist/out-tsc/object/traverse-path.js +81 -0
- package/dist/out-tsc/object/traverse-path.js.map +1 -0
- package/dist/out-tsc/object/values.d.ts +2 -0
- package/dist/out-tsc/object/values.js +31 -0
- package/dist/out-tsc/object/values.js.map +1 -0
- package/dist/out-tsc/object/values.spec.d.ts +1 -0
- package/dist/out-tsc/object/values.spec.js +7 -0
- package/dist/out-tsc/object/values.spec.js.map +1 -0
- package/dist/out-tsc/string/code.template-tag.d.ts +2 -0
- package/dist/out-tsc/string/code.template-tag.js +38 -0
- package/dist/out-tsc/string/code.template-tag.js.map +1 -0
- package/dist/out-tsc/string/index.d.ts +3 -0
- package/dist/out-tsc/string/index.js +4 -0
- package/dist/out-tsc/string/index.js.map +1 -0
- package/dist/out-tsc/string/parse-file-size.d.ts +5 -0
- package/dist/out-tsc/string/parse-file-size.js +43 -0
- package/dist/out-tsc/string/parse-file-size.js.map +1 -0
- package/dist/out-tsc/string/template.d.ts +15 -0
- package/dist/out-tsc/string/template.js +28 -0
- package/dist/out-tsc/string/template.js.map +1 -0
- package/dist/out-tsc/string/template.spec.d.ts +1 -0
- package/dist/out-tsc/string/template.spec.js +39 -0
- package/dist/out-tsc/string/template.spec.js.map +1 -0
- package/dist/out-tsc/typings.d.ts +1 -0
- package/dist/out-tsc/typings.js +2 -0
- package/dist/out-tsc/typings.js.map +1 -0
- package/lib/index.cjs.js +2437 -1
- package/lib/index.es.js +2268 -893
- package/package.json +5 -5
- package/rollup.config.js +22 -0
- package/spscommerce-utils-4.36.3-ie.tgz +0 -0
- package/spscommerce-utils-5.0.2-ie.tgz +0 -0
- package/vite.config.js +1 -1
package/lib/index.cjs.js
CHANGED
|
@@ -1 +1,2437 @@
|
|
|
1
|
-
"use strict";var ze=Object.defineProperty;var Q=Object.getOwnPropertySymbols;var Ue=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable;var Y=(e,t,n)=>t in e?ze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,f=(e,t)=>{for(var n in t||(t={}))Ue.call(t,n)&&Y(e,n,t[n]);if(Q)for(var n of Q(t))We.call(t,n)&&Y(e,n,t[n]);return e};Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";function Z(e,t){return t.forEach(function(n){Object.keys(n).forEach(function(r){if(r!=="default"&&!(r in e)){var o=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return n[r]}})}})}),Object.freeze(e)}function ee(e){return Array.isArray(e)?e.reduce((t,n)=>t.concat(ee(n)),[]):e}function He(e,t){const n=new Set(t);for(const r of e)if(!n.has(r))return!1;return!0}function Ke(){return this.pending=!1,typeof this.id=="number"?(clearTimeout(this.id),delete this.id,!0):!1}function te(e,t,n){const r=function(...i){return new Promise((c,m)=>{r.reset(),r.pending=!0;function S(){(async()=>{try{let u=e.apply(n||this,i);u instanceof Promise&&(u=await u),c(u)}catch(u){m(u)}finally{r.reset()}})()}r.id=window.setTimeout(S,t)})};return r.reset=Ke.bind(r),r}function Xe(){return this.pending=!1,typeof this.id=="number"?(window.cancelAnimationFrame(this.id),delete this.id,!0):!1}function ne(e,t){const n=function(...o){n.pending&&n.reset(),n.id=window.requestAnimationFrame(()=>{e&&e.apply(t||this,o),n.reset()}),n.pending=!0};return n.pending=!1,n.reset=Xe.bind(n),n}function Je(e,t){const n=t?e.bind(t):e;setTimeout(n,0)}const N={add:(e,t)=>e+t,and:(e,t)=>e&&t,band:(e,t)=>e&t,bor:(e,t)=>e|t,bxor:(e,t)=>e^t,bnot:e=>~e,decr:e=>e-1,div:(e,t)=>e/t,eq:(e,t)=>e===t,exp:(e,t)=>e**t,gt:(e,t)=>e>t,gte:(e,t)=>e>=t,incr:e=>e+1,lshift:(e,t)=>e<<t,lt:(e,t)=>e<t,lte:(e,t)=>e<=t,mul:(e,t)=>e*t,neg:e=>-e,neq:(e,t)=>e!==t,not:e=>!e,or:(e,t)=>e||t,rem:(e,t)=>e%t,rshift:(e,t)=>e>>t,rshift_zf:(e,t)=>e>>>t,sub:(e,t)=>e-t,xor:(e,t)=>(e||t)&&!(e&&t)};function Qe(e,t){if(!Number.isInteger(e))throw new Error("start must be an integer");if(!Number.isInteger(t))throw new Error("end must be an integer");return new Array(Math.abs(t-e)+1).fill(e).map(e>t?N.sub:N.add)}class Ye{constructor(t,n={}){let r;if(typeof Event=="function")r=new Event(t,n);else{r=document.createEvent("Event"),r.initEvent(t,n.bubbles,n.cancelable);for(const i of Object.keys(n))i!=="bubbles"&&i!=="cancelable"&&(r[i]=n[i])}Object.setPrototypeOf(this,r);const o=Object.getOwnPropertyDescriptors(Event.prototype);for(const i of Object.keys(o)){const c=o[i];for(const m of Object.keys(c))typeof c[m]=="function"&&(c[m]=c[m].bind(r))}Object.defineProperties(this,o)}}const Ze=Object.freeze({100:{name:"Insurance Plan Description"},101:{name:"Name and Address Lists"},104:{name:"Air Shipment Information"},106:{name:"Motor Carrier Rate Proposal"},107:{name:"Request for Motor Carrier Rate Proposal"},108:{name:"Response to a Motor Carrier Rate Proposal"},109:{name:"Vessel Content Details"},110:{name:"Air Freight Details and Invoice"},112:{name:"Property Damage Report"},120:{name:"Vehicle Shipping Order"},121:{name:"Vehicle Service"},124:{name:"Vehicle Damage"},125:{name:"Multilevel Railcar Load Details"},126:{name:"Vehicle Application Advice"},127:{name:"Vehicle Baying Order"},128:{name:"Dealer Information"},129:{name:"Vehicle Carrier Rate Update"},130:{name:"Student Educational Record (Transcript)"},131:{name:"Student Educational Record (Transcript) Acknowledgment"},135:{name:"Student Loan Application"},138:{name:"Testing Results Request and Report"},139:{name:"Student Loan Guarantee Result"},140:{name:"Product Registration"},141:{name:"Product Service Claim Response"},142:{name:"Product Service Claim"},143:{name:"Product Service Notification"},144:{name:"Student Loan Transfer and Status Verification"},146:{name:"Request for Student Educational Record (Transcript)"},147:{name:"Response to Request for Student Educational Record (Transcript)"},148:{name:"Report of Injury, Illness or Incident"},149:{name:"Notice of Tax Adjustment or Assessment"},150:{name:"Tax Rate Notification"},151:{name:"Electronic Filing of Tax Return Data Acknowledgment"},152:{name:"Statistical Government Information"},153:{name:"Unemployment Insurance Tax Claim or Charge Information"},154:{name:"Uniform Commercial Code Filing"},155:{name:"Business Credit Report"},157:{name:"Notice of Power of Attorney"},159:{name:"Motion Picture Booking Confirmation"},160:{name:"Transportation Automatic Equipment Identification"},161:{name:"Train Sheet"},169:{name:"Transportation Appointment Schedule Information"},170:{name:"Revenue Receipts Statement"},175:{name:"Court and Law Enforcement Notice"},176:{name:"Court Submission TYPE"},180:{name:"Return Merchandise Authorization and Notification"},185:{name:"Royalty Regulatory Report"},186:{name:"Insurance Underwriting Requirements Reporting"},188:{name:"Educational Course Inventory"},189:{name:"Application for Admission to Educational Institutions"},190:{name:"Student Enrollment Verification"},191:{name:"Student Loan Pre-Claims and Claims"},194:{name:"Grant or Assistance Application"},195:{name:"Federal Communications Commission (FCC) License Application"},196:{name:"Contractor Cost Data Reporting"},197:{name:"Real Estate Title Evidence"},198:{name:"Loan Verification Information"},199:{name:"Real Estate Settlement Information"},200:{name:"Mortgage Credit Report"},201:{name:"Residential Loan Application"},202:{name:"Secondary Mortgage Market Loan Delivery"},203:{name:"Secondary Mortgage Market Investor Report"},204:{name:"Motor Carrier Load Tender"},205:{name:"Mortgage Note"},206:{name:"Real Estate Inspection"},210:{name:"Motor Carrier Freight Details and Invoice"},211:{name:"Motor Carrier Bill of Lading",edifactId:"IFTMCE"},212:{name:"Motor Carrier Delivery Trailer Manifest"},213:{name:"Motor Carrier Shipment Status Inquiry"},214:{name:"Transportation Carrier Shipment Status Message"},215:{name:"Motor Carrier Pick-up Manifest"},216:{name:"Motor Carrier Shipment Pick-up Notification"},217:{name:"Motor Carrier Loading and Route Guide"},218:{name:"Motor Carrier Tariff Information"},219:{name:"Logistics Service Request"},220:{name:"Logistics Service Response"},222:{name:"Cartage Work Assignment"},223:{name:"Consolidators Freight Bill and Invoice"},224:{name:"Motor Carrier Summary Freight Bill Manifest"},225:{name:"Response to a Cartage Work Assignment"},240:{name:"Motor Carrier Package Status"},242:{name:"Data Status Tracking"},244:{name:"Product Source Information"},248:{name:"Account Assignment/Inquiry and Service/Status"},249:{name:"Animal Toxicological Data"},250:{name:"Purchase Order Shipment Management Document"},251:{name:"Pricing Support"},252:{name:"Insurance Producer Administration"},255:{name:"Underwriting Information Services"},256:{name:"Periodic Compensation"},260:{name:"Application for Mortgage Insurance Benefits"},261:{name:"Real Estate Information Request"},262:{name:"Real Estate Information Report"},263:{name:"Residential Mortgage Insurance Application Response"},264:{name:"Mortgage Loan Default Status"},265:{name:"Real Estate Title Insurance Services Order"},266:{name:"Mortgage or Property Record Change Notification"},267:{name:"Individual Life, Annuity and Disability Application"},268:{name:"Annuity Activity"},270:{name:"Eligibility, Coverage or Benefit Inquiry"},271:{name:"Eligibility, Coverage or Benefit Information"},272:{name:"Property and Casualty Loss Notification"},273:{name:"Insurance/Annuity Application Status"},274:{name:"Health Care Provider Information"},275:{name:"Patient Information"},276:{name:"Health Care Claim Status Request"},277:{name:"Health Care Claim Status Notification"},278:{name:"Health Care Services Insurance/Benefit Review Information"},280:{name:"Voter Registration Information"},285:{name:"Commercial Vehicle Safety and Credentials Information Exchange"},286:{name:"Commercial Vehicle Credentials"},288:{name:"Wage Determination"},290:{name:"Cooperative Advertising Agreements"},300:{name:"Reservation (Booking Request) (Ocean)"},301:{name:"Confirmation (Ocean)",edifactId:"IFTMBC"},303:{name:"Booking Cancellation (Ocean)"},304:{name:"Shipping Instructions"},309:{name:"U.S. Customs Manifest"},310:{name:"Freight Receipt and Invoice (Ocean)"},311:{name:"Canadian Customs Information"},312:{name:"Arrival Notice (Ocean)"},313:{name:"Shipment Status Inquiry (Ocean)"},315:{name:"Status Details (Ocean)"},317:{name:"Delivery/Pickup Order"},319:{name:"Terminal Information"},322:{name:"Terminal Operations and Intermodal Ramp Activity"},323:{name:"Vessel Schedule and Itinerary (Ocean)"},324:{name:"Vessel Stow Plan (Ocean)"},325:{name:"Consolidation of Goods In Container"},326:{name:"Consignment Summary List"},350:{name:"U.S. Customs Status Information"},352:{name:"U.S. Customs Carrier General Order Status"},353:{name:"U.S. Customs Events Advisory Details"},354:{name:"U.S. Customs Automated Manifest Archive Status"},355:{name:"U.S. Customs Acceptance/Rejection"},356:{name:"U.S. Customs Permit to Transfer Request"},357:{name:"U.S. Customs In-Bond Information"},358:{name:"U.S. Customs Consist Information"},361:{name:"Carrier Interchange Agreement (Ocean)"},362:{name:"Cargo Insurance Advice of Shipment"},404:{name:"Rail Carrier Shipment Information"},410:{name:"Rail Carrier Freight Details and Invoice"},411:{name:"Rail Carrier Freight Details and Invoice Summary"},412:{name:"Trailer or Container Repair Billing"},414:{name:"Rail Carhire Settlements"},417:{name:"Rail Carrier Waybill Interchange"},418:{name:"Rail Advance Interchange Consist"},419:{name:"Advance Car Disposition"},420:{name:"Car Handling Information"},421:{name:"Estimated Time of Arrival and Car Scheduling"},422:{name:"Shipper's Car Order"},423:{name:"Rail Industrial Switch List"},424:{name:"Rail Carrier Services Settlement"},425:{name:"Rail Waybill Request"},426:{name:"Rail Revenue Waybill"},427:{name:"Rail Waybill Response"},429:{name:"Railroad Retirement Activity"},431:{name:"Railroad Station Master File"},432:{name:"Rail Deprescription"},433:{name:"Railroad Reciprocal Switch File"},434:{name:"Railroad Mark Register Update Activity"},435:{name:"Standard Transportation Commodity Code (STCC) Master"},436:{name:"Locomotive Information"},437:{name:"Railroad Junctions and Interchanges Activity"},440:{name:"Shipment Weights"},451:{name:"Railroad Event Report"},452:{name:"Railroad Problem Log Inquiry or Advice"},453:{name:"Railroad Service Commitment Advice"},455:{name:"Railroad Parameter Trace Registration"},456:{name:"Railroad Equipment Inquiry or Advice"},460:{name:"Railroad Price Distribution Request or Response"},463:{name:"Rail Rate Reply"},466:{name:"Rate Request"},468:{name:"Rate Docket Journal Log"},470:{name:"Railroad Clearance"},475:{name:"Rail Route File Maintenance"},485:{name:"Ratemaking Action"},486:{name:"Rate Docket Expiration"},490:{name:"Rate Group Definition"},492:{name:"Miscellaneous Rates"},494:{name:"Rail Scale Rates"},500:{name:"Medical Event Reporting"},501:{name:"Vendor Performance Review"},503:{name:"Pricing History"},504:{name:"Clauses and Provisions"},511:{name:"Requisition"},517:{name:"Material Obligation Validation"},521:{name:"Income or Asset Offset"},527:{name:"Material Due-In and Receipt"},536:{name:"Logistics Reassignment"},540:{name:"Notice of Employment Status"},561:{name:"Contract Abstract"},567:{name:"Contract Completion Status"},568:{name:"Contract Payment Management Report"},601:{name:"U.S. Customs Export Shipment Information"},602:{name:"Transportation Services Tender"},620:{name:"Excavation Communication"},625:{name:"Well Information"},650:{name:"Maintenance Service Order"},715:{name:"Intermodal Group Loading Plan"},805:{name:"Contract Pricing Proposal"},806:{name:"Project Schedule Reporting"},810:{name:"Invoice",edifactId:"INVOIC"},811:{name:"Consolidated Service Invoice/Statement"},812:{name:"Credit/Debit Adjustment"},813:{name:"Electronic Filing of Tax Return Data"},814:{name:"General Request, Response or Confirmation"},815:{name:"Cryptographic Service Message"},816:{name:"Organizational Relationships"},818:{name:"Commission Sales Report"},819:{name:"Operating Expense Statement"},820:{name:"Payment Order/Remittance Advice",edifactId:"REMADV"},821:{name:"Financial Information Reporting"},822:{name:"Account Analysis"},823:{name:"Lockbox"},824:{name:"Application Advice",edifactId:"APERAK"},826:{name:"Tax Information Exchange"},827:{name:"Financial Return Notice"},828:{name:"Debit Authorization"},829:{name:"Payment Cancellation Request"},830:{name:"Planning Schedule with Release Capability",edifactId:"DELFOR"},831:{name:"Application Control Totals"},832:{name:"Price/Sales Catalog",edifactId:"PRICAT"},833:{name:"Mortgage Credit Report Order"},834:{name:"Benefit Enrollment and Maintenance"},835:{name:"Health Care Claim Payment/Advice"},836:{name:"Procurement Notices"},837:{name:"Health Care Claim"},838:{name:"Trading Partner Profile"},839:{name:"Project Cost Reporting"},840:{name:"Request for Quotation",edifactId:"REQUOTE"},841:{name:"Specifications/Technical Information"},842:{name:"Nonconformance Report"},843:{name:"Response to Request for Quotation",edifactId:"QUOTES"},844:{name:"Product Transfer Account Adjustment",edifactId:"SSDCLM"},845:{name:"Price Authorization Acknowledgment/Status",edifactId:"ATHSTS"},846:{name:"Inventory Inquiry/Advice",edifactId:"INVRPT"},847:{name:"Material Claim"},848:{name:"Material Safety Data Sheet"},849:{name:"Response to Product Transfer Account Adjustment"},850:{name:"Purchase Order",edifactId:"ORDERS"},851:{name:"Asset Schedule"},852:{name:"Product Activity Data",edifactId:"SLSRPT"},853:{name:"Routing and Carrier Instruction"},854:{name:"Shipment Delivery Discrepancy Information"},855:{name:"Purchase Order Acknowledgment",edifactId:"ORDRSP"},856:{name:"Advance Ship Notice/Manifest",edifactId:"DESADV"},857:{name:"Shipment and Billing Notice"},858:{name:"Shipment Information"},859:{name:"Freight Invoice"},860:{name:"Purchase Order Change",edifactId:"ORDCHG"},861:{name:"Receiving Advice/Acceptance Certificate",edifactId:"RECADV"},862:{name:"Shipping Schedule",edifactId:"DELJIT"},863:{name:"Report of Test Results"},864:{name:"Text Message"},865:{name:"Purchase Order Change",edifactId:"ORDRSP"},866:{name:"Production Sequence"},867:{name:"Product Transfer and Resale Report",edifactId:"SLSRPT"},868:{name:"Electronic Form Structure"},869:{name:"Order Status Inquiry",edifactId:"ORSSTA"},870:{name:"Order Status Report",edifactId:"ORDREP"},871:{name:"Component Parts Content"},872:{name:"Residential Mortgage Insurance Application"},875:{name:"Grocery Products Purchase Order"},876:{name:"Grocery Products Purchase Order Change"},877:{name:"Manufacturer Coupon Family Code Structure"},878:{name:"Product Authorization/De-authorization"},879:{name:"Price Information"},880:{name:"Grocery Products Invoice"},881:{name:"Manufacturer Coupon Redemption Detail"},882:{name:"Direct Store Delivery Summary Information"},883:{name:"Market Development Fund Allocation"},884:{name:"Market Development Fund Settlement"},885:{name:"Retail Account Characteristics"},886:{name:"Customer Call Reporting"},887:{name:"Coupon Notification"},888:{name:"Item Maintenance"},889:{name:"Promotion Announcement"},891:{name:"Deduction Research Report"},893:{name:"Item Information Request"},894:{name:"Delivery/Return Base Record"},895:{name:"Delivery/Return Acknowledgment or Adjustment"},896:{name:"Product Dimension Maintenance"},920:{name:"Loss or Damage Claim - General Commodities"},924:{name:"Loss or Damage Claim - Motor Vehicle"},925:{name:"Claim Tracer"},926:{name:"Claim Status Report and Tracer Reply"},928:{name:"Automotive Inspection Detail"},940:{name:"Warehouse Shipping Order"},943:{name:"Warehouse Stock Transfer Shipment Advice"},944:{name:"Warehouse Stock Transfer Receipt Advice"},945:{name:"Warehouse Shipping Advice"},947:{name:"Warehouse Inventory Adjustment Advice"},980:{name:"Functional Group Totals"},990:{name:"Response to a Load Tender"},996:{name:"File Transfer"},997:{name:"Functional Acknowledgment",edifactId:"CONTROL"},998:{name:"Set Cancellation"},999:{name:"Implementation Acknowledgment"}});function et(){return(e,t)=>{const n=`_${String(t)}`;Object.defineProperties(e,{[n]:{enumerable:!1,configurable:!0,writable:!0,value:void 0},[t]:{enumerable:!0,configurable:!0,get(){return this[n]},set(r){this[n]=Number(r)}}})}}function tt(e){return(t,n,r)=>{const o=f({},r);return o.get=function(){const c=f({},o);return c.value=te(o.value,e,this),Object.defineProperty(this,n,c),c.value},o.configurable=!0,delete o.writable,delete o.value,o}}function nt(e,t,n){const r=f({},n);return n.get=function(){const i=f({},r);return i.value=ne(r.value,this),Object.defineProperty(this,t,i),i.value},n.configurable=!0,delete n.writable,delete n.value,n}function rt(e,t,n,r,o){const i=o||Object.getOwnPropertyDescriptor(n,r),c=i.get,{value:m}=i;return i.get=function(){const u=this,p=(m||c.call(this)).bind(this),C=f(f({},t),e);for(const g of Object.keys(t))typeof e[g]=="function"?Object.defineProperty(p,g,{get(){return C[g](u)}}):p[g]=C[g];return Object.defineProperty(this,r,{writable:!0,configurable:!0,enumerable:i.enumerable,value:p}),p},delete i.value,delete i.writable,i}function at(e,t,n){const r=f({},n);return r.get=function(){const i=f({},r),c=r.value.bind(this);return i.value=()=>setTimeout(c,0),Object.defineProperty(this,t,i),i.value},r.configurable=!0,delete r.writable,delete r.value,r}function ot(e,t){return!e||e<t[0]?t[0]:e>t[1]?t[1]:e}function re(e,t=0){const n=String(e).split("."),r=n.length>1?n[1].length:0;let o=e;for(let i=r-1;i>=t;i-=1)o=Number(`${Math.round(Number(`${o}e${i}`))}e-${i}`);return o}function it(e,t=2){if(e>Number.MAX_SAFE_INTEGER)throw new Error("Number is greater than MAX_SAFE_INTEGER; toFileSizeString does not support orders of magnitude higher than petabytes for this reason until BigInt achieves broad browser support.");const n=Math.min(Math.floor(Math.log(e)/Math.log(1024)),5),r=["B","KB","MB","GB","TB","PB"][n],o=n?t:0;return re(e/1024**n,o).toFixed(o)+r}function A(e){return typeof e=="string"?e.match(/[^.[\]]+/g)||[]:[].concat(e)}function ae(e,t,n){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(t,e))}var O=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ct="[object Object]";function st(e){var t=!1;if(e!=null&&typeof e.toString!="function")try{t=!!(e+"")}catch{}return t}function mt(e,t){return function(n){return e(t(n))}}var ut=Function.prototype,oe=Object.prototype,ie=ut.toString,lt=oe.hasOwnProperty,ft=ie.call(Object),dt=oe.toString,pt=mt(Object.getPrototypeOf,Object);function gt(e){return!!e&&typeof e=="object"}function yt(e){if(!gt(e)||dt.call(e)!=ct||st(e))return!1;var t=pt(e);if(t===null)return!0;var n=lt.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&ie.call(n)==ft}var d=yt;function ce(e){Object.freeze(e);for(const t of Object.keys(e)){const n=e[t];(d(n)||Array.isArray(n))&&ce(n)}}exports.DiffChange=void 0;(function(e){e[e.ADDITION=0]="ADDITION",e[e.DELETION=1]="DELETION",e[e.ALTERATION=2]="ALTERATION"})(exports.DiffChange||(exports.DiffChange={}));function se(e,t,n=[]){let r=[];for(const o of new Set([...Object.keys(e),...Object.keys(t)])){const i=Object.prototype.hasOwnProperty.call(e,o),c=Object.prototype.hasOwnProperty.call(t,o);i&&!c?r.push({type:1,key:o,parentPath:n,objects:[e,t]}):!i&&c?r.push({type:0,key:o,parentPath:n,objects:[e,t]}):d(e[o])&&d(t[o])||Array.isArray(e[o])&&Array.isArray(t[o])?r=r.concat(se(e[o],t[o],[...n,o])):e[o]!==t[o]&&r.push({type:2,key:o,parentPath:n,objects:[e,t]})}return r}function me(e,t){for(const n of Object.keys(e)){const r=e[n];d(r)||Array.isArray(r)?me(r,t):t(n,r,e)}}function ue(e,t,n=[]){t(n,e);for(const r of Object.keys(e)){const o=e[r];if(d(o)||Array.isArray(o)){const i=n.concat(r);ue(o,t,i)}}}function bt(e){return e==null}var L=bt,ht=Object.freeze(Z({__proto__:null,[Symbol.toStringTag]:"Module",default:L},[L])),P={exports:{}};(function(e,t){var n=9007199254740991,r="[object Arguments]",o="[object Function]",i="[object GeneratorFunction]",c="[object Map]",m="[object Object]",S="[object Promise]",u="[object Set]",T="[object WeakMap]",p="[object DataView]",C=/[\\^$.*+?()[\]{}|]/g,g=/^\[object .+?Constructor\]$/,ye=typeof O=="object"&&O&&O.Object===Object&&O,be=typeof self=="object"&&self&&self.Object===Object&&self,y=ye||be||Function("return this")(),V=t&&!t.nodeType&&t,G=V&&!0&&e&&!e.nodeType&&e,he=G&&G.exports===V;function Se(a,s){return a==null?void 0:a[s]}function Re(a){var s=!1;if(a!=null&&typeof a.toString!="function")try{s=!!(a+"")}catch{}return s}function Ce(a,s){return function(l){return a(s(l))}}var ve=Function.prototype,v=Object.prototype,E=y["__core-js_shared__"],$=function(){var a=/[^.]+$/.exec(E&&E.keys&&E.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""}(),z=ve.toString,M=v.hasOwnProperty,I=v.toString,Ie=RegExp("^"+z.call(M).replace(C,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),U=he?y.Buffer:void 0,W=v.propertyIsEnumerable,Ae=U?U.isBuffer:void 0,Oe=Ce(Object.keys,Object),j=R(y,"DataView"),w=R(y,"Map"),D=R(y,"Promise"),k=R(y,"Set"),F=R(y,"WeakMap"),Pe=!W.call({valueOf:1},"valueOf"),Te=h(j),Ee=h(w),Me=h(D),je=h(k),we=h(F);function De(a){return I.call(a)}function ke(a){if(!X(a)||Fe(a))return!1;var s=K(a)||Re(a)?Ie:g;return s.test(h(a))}function R(a,s){var l=Se(a,s);return ke(l)?l:void 0}var b=De;(j&&b(new j(new ArrayBuffer(1)))!=p||w&&b(new w)!=c||D&&b(D.resolve())!=S||k&&b(new k)!=u||F&&b(new F)!=T)&&(b=function(a){var s=I.call(a),l=s==m?a.constructor:void 0,J=l?h(l):void 0;if(J)switch(J){case Te:return p;case Ee:return c;case Me:return S;case je:return u;case we:return T}return s});function Fe(a){return!!$&&$ in a}function Ne(a){var s=a&&a.constructor,l=typeof s=="function"&&s.prototype||v;return a===l}function h(a){if(a!=null){try{return z.call(a)}catch{}try{return a+""}catch{}}return""}function Le(a){return _e(a)&&M.call(a,"callee")&&(!W.call(a,"callee")||I.call(a)==r)}var Be=Array.isArray;function H(a){return a!=null&&Ve(a.length)&&!K(a)}function _e(a){return Ge(a)&&H(a)}var qe=Ae||$e;function xe(a){if(H(a)&&(Be(a)||typeof a=="string"||typeof a.splice=="function"||qe(a)||Le(a)))return!a.length;var s=b(a);if(s==c||s==u)return!a.size;if(Pe||Ne(a))return!Oe(a).length;for(var l in a)if(M.call(a,l))return!1;return!0}function K(a){var s=X(a)?I.call(a):"";return s==o||s==i}function Ve(a){return typeof a=="number"&&a>-1&&a%1==0&&a<=n}function X(a){var s=typeof a;return!!a&&(s=="object"||s=="function")}function Ge(a){return!!a&&typeof a=="object"}function $e(){return!1}e.exports=xe})(P,P.exports);var B=P.exports,le=Object.freeze(Z({__proto__:null,[Symbol.toStringTag]:"Module",default:B},[P.exports]));const fe=L||ht,St=B||le;function _(e,t,n,r=!1){if(St(t))return e;let o=e;for(const i of A(t)){let c=i,m;if(typeof i=="string"&&([,c,m]=/^([^?]+)(\?)?$/.exec(i)),o=o[c],fe(o)&&(m||r))return n}return fe(o)?n:o}function Rt(e,...t){const n=new Set(t),r={};for(const o of Object.keys(e))n.has(o)||(r[o]=e[o]);return r}const Ct=B||le;function vt(e,t,n){if(typeof e!="object")throw new Error("object is required");if(Ct(t))throw new Error("path is required");const r=A(t),o=r.splice(r.length-1,1)[0];let i=e;for(const c of r)if(i=i[c],typeof i!="object")throw new Error(`Cannot set value at given path: Path deadends at ${String(c)}`);i[o]=n}function*It(e,t){yield e;let n=e;for(const r of A(t))n=n[r],yield n}function q(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&d(t[r])?t[r]=q(t[r],n[r]):d(n[r])?t[r]=q({},n[r]):t[r]=n[r];return t}function x(...e){const t={};for(const n of e)for(const r of Object.keys(n))Object.prototype.hasOwnProperty.call(t,r)&&Object.getOwnPropertyDescriptor(t,r).writable&&d(t[r])?t[r]=x(t[r],n[r]):d(n[r])?t[r]=x({},n[r]):ae(r,n,t);return t}function At(e){const t=[];for(const n of Object.keys(e))t.push(e[n]);return t}function Ot(e,...t){const n=e.reduce((o,i,c)=>`${o}${c<=t.length?String(t[c-1]):""}${i}`),r=Math.min(...n.split(/[\r\n]/).filter(o=>o.trim()).map(o=>/^ */.exec(o)[0].length));return n.replace(new RegExp(`^ {${r}}`,"gm"),"").trim()}function Pt(e){const t=/[A-Z]?B$/.exec(e);if(!t)throw new Error(`Input to parseFileSize ("${e}") doesn't seem like a file size; cannot identify a unit (e.g. KB, GB)`);const[n]=t,r=Number(e.replace(n,""));if(Number.isNaN(r))throw new Error(`Could not parse a number out of input to parseFileSize ("${e}")`);const o=["B","KB","MB","GB","TB","PB"].indexOf(n);if(o===-1)throw new Error("parseFileSize does not support units above PB");return Math.ceil(r*1024**o)}const de=/(<%=|{{)(.+?)(%>|}})/g,pe=/<%\?(.+?)%>(.+?)<\/%>/g,ge=Symbol("sps.utils.templateSrc");function Tt(e){const t=n=>e.replace(pe,(r,o,i)=>_(n,o.trim())?i:"").replace(de,(r,o,i)=>_(n,i.trim(),""));return t[ge]=e,t}function Et(e){return typeof e=="string"&&(de.test(e)||pe.test(e))}function Mt(e){return typeof e=="function"&&Object.prototype.hasOwnProperty.call(e,ge)}exports.CustomEvent=Ye;exports.EDI_DOCUMENT_TYPE=Ze;exports.Op=N;exports.castToNumber=et;exports.code=Ot;exports.constrain=ot;exports.copyProperty=ae;exports.crumblePath=A;exports.debounce=te;exports.debounced=tt;exports.decimalRound=re;exports.deepFreeze=ce;exports.diff=se;exports.flatten=ee;exports.forEachEntryDeep=me;exports.forEachNestedObject=ue;exports.getPath=_;exports.isSubset=He;exports.isTemplate=Et;exports.isTemplateFn=Mt;exports.lockToAnimationFrames=ne;exports.lockedToAnimationFrames=nt;exports.mergeDeep=q;exports.mergePropertiesDeep=x;exports.omit=Rt;exports.onNextTick=Je;exports.parseFileSize=Pt;exports.range=Qe;exports.setPath=vt;exports.simpleMetadataDecoratorApplicator=rt;exports.template=Tt;exports.tickDelay=at;exports.toFileSizeString=it;exports.traversePath=It;exports.values=At;
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function _mergeNamespaces(n, m) {
|
|
6
|
+
m.forEach(function (e) {
|
|
7
|
+
e && typeof e !== 'string' && !Array.isArray(e) && Object.keys(e).forEach(function (k) {
|
|
8
|
+
if (k !== 'default' && !(k in n)) {
|
|
9
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
10
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return e[k]; }
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
return Object.freeze(n);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function flatten(arg) {
|
|
21
|
+
if (!Array.isArray(arg)) {
|
|
22
|
+
return arg;
|
|
23
|
+
}
|
|
24
|
+
return arg.reduce(function (acc, x) { return acc.concat(flatten(x)); }, []);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var __values$d = (undefined && undefined.__values) || function(o) {
|
|
28
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
29
|
+
if (m) return m.call(o);
|
|
30
|
+
if (o && typeof o.length === "number") return {
|
|
31
|
+
next: function () {
|
|
32
|
+
if (o && i >= o.length) o = void 0;
|
|
33
|
+
return { value: o && o[i++], done: !o };
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Tests if candidate is a subset of array
|
|
40
|
+
*/
|
|
41
|
+
function isSubset(candidate, array) {
|
|
42
|
+
var e_1, _a;
|
|
43
|
+
/*
|
|
44
|
+
* Set.prototype.has is required by the ECMAScript spec to be
|
|
45
|
+
* implemented in sub-linear time, so by converting array to Set
|
|
46
|
+
* we can avoid n^2 complexity. (In WebKit, Sets are HashMaps
|
|
47
|
+
* internally, so has() is constant time)
|
|
48
|
+
*/
|
|
49
|
+
var set = new Set(array);
|
|
50
|
+
try {
|
|
51
|
+
for (var candidate_1 = __values$d(candidate), candidate_1_1 = candidate_1.next(); !candidate_1_1.done; candidate_1_1 = candidate_1.next()) {
|
|
52
|
+
var member = candidate_1_1.value;
|
|
53
|
+
if (!set.has(member)) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
59
|
+
finally {
|
|
60
|
+
try {
|
|
61
|
+
if (candidate_1_1 && !candidate_1_1.done && (_a = candidate_1.return)) _a.call(candidate_1);
|
|
62
|
+
}
|
|
63
|
+
finally { if (e_1) throw e_1.error; }
|
|
64
|
+
}
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
69
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
70
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
71
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
72
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
73
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
74
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
var __generator$1 = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
78
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
79
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
80
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
81
|
+
function step(op) {
|
|
82
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
83
|
+
while (_) try {
|
|
84
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
85
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
86
|
+
switch (op[0]) {
|
|
87
|
+
case 0: case 1: t = op; break;
|
|
88
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
89
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
90
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
91
|
+
default:
|
|
92
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
93
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
94
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
95
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
96
|
+
if (t[2]) _.ops.pop();
|
|
97
|
+
_.trys.pop(); continue;
|
|
98
|
+
}
|
|
99
|
+
op = body.call(thisArg, _);
|
|
100
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
101
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* If the function is set to be called, cancel the
|
|
106
|
+
* timeout that would call it. Reset id & pending to defaults.
|
|
107
|
+
*
|
|
108
|
+
* @returns - Whether an invocation was actually canceled or not.
|
|
109
|
+
*/
|
|
110
|
+
function resetDebouncedFn() {
|
|
111
|
+
this.pending = false;
|
|
112
|
+
if (typeof this.id === "number") {
|
|
113
|
+
clearTimeout(this.id);
|
|
114
|
+
delete this.id;
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Takes in a function and returns a new function that debounces it.
|
|
121
|
+
* The returned function returns an observable that can be subscribed to
|
|
122
|
+
* if you need to have something happen when the debounced function
|
|
123
|
+
* finally gets called and returns a value.
|
|
124
|
+
*/
|
|
125
|
+
function debounce(functionToDebounce, milliseconds, thisArg) {
|
|
126
|
+
var debFn = function debouncedFn() {
|
|
127
|
+
var args = [];
|
|
128
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
129
|
+
args[_i] = arguments[_i];
|
|
130
|
+
}
|
|
131
|
+
return new Promise(function (resolve, reject) {
|
|
132
|
+
debFn.reset();
|
|
133
|
+
debFn.pending = true;
|
|
134
|
+
function executor() {
|
|
135
|
+
var _this = this;
|
|
136
|
+
void (function () { return __awaiter(_this, void 0, void 0, function () {
|
|
137
|
+
var output, err_1;
|
|
138
|
+
return __generator$1(this, function (_a) {
|
|
139
|
+
switch (_a.label) {
|
|
140
|
+
case 0:
|
|
141
|
+
_a.trys.push([0, 3, 4, 5]);
|
|
142
|
+
output = functionToDebounce.apply(thisArg || this, args);
|
|
143
|
+
if (!(output instanceof Promise)) return [3 /*break*/, 2];
|
|
144
|
+
return [4 /*yield*/, output];
|
|
145
|
+
case 1:
|
|
146
|
+
output = _a.sent();
|
|
147
|
+
_a.label = 2;
|
|
148
|
+
case 2:
|
|
149
|
+
resolve(output);
|
|
150
|
+
return [3 /*break*/, 5];
|
|
151
|
+
case 3:
|
|
152
|
+
err_1 = _a.sent();
|
|
153
|
+
reject(err_1);
|
|
154
|
+
return [3 /*break*/, 5];
|
|
155
|
+
case 4:
|
|
156
|
+
debFn.reset();
|
|
157
|
+
return [7 /*endfinally*/];
|
|
158
|
+
case 5: return [2 /*return*/];
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}); })();
|
|
162
|
+
}
|
|
163
|
+
debFn.id = window.setTimeout(executor, milliseconds);
|
|
164
|
+
});
|
|
165
|
+
};
|
|
166
|
+
debFn.reset = resetDebouncedFn.bind(debFn);
|
|
167
|
+
return debFn;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* If the function is set to be called, cancel the
|
|
172
|
+
* timeout that would call it. Reset id & pending to defaults.
|
|
173
|
+
*
|
|
174
|
+
* @returns - Whether an invocation was actually canceled or not.
|
|
175
|
+
*/
|
|
176
|
+
function resetLockedFn() {
|
|
177
|
+
this.pending = false;
|
|
178
|
+
if (typeof this.id === "number") {
|
|
179
|
+
window.cancelAnimationFrame(this.id);
|
|
180
|
+
delete this.id;
|
|
181
|
+
return true;
|
|
182
|
+
}
|
|
183
|
+
return false;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Return a new function to replace the passed in one which ensures that
|
|
187
|
+
* the given function will run only in `requestAnimationFrame()` and at
|
|
188
|
+
* most once per frame.
|
|
189
|
+
*/
|
|
190
|
+
function lockToAnimationFrames(functionToLock, thisArg) {
|
|
191
|
+
var lockFn = function lockedFn() {
|
|
192
|
+
var _this = this;
|
|
193
|
+
var args = [];
|
|
194
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
195
|
+
args[_i] = arguments[_i];
|
|
196
|
+
}
|
|
197
|
+
if (lockFn.pending) {
|
|
198
|
+
lockFn.reset();
|
|
199
|
+
}
|
|
200
|
+
lockFn.id = window.requestAnimationFrame(function () {
|
|
201
|
+
if (functionToLock) {
|
|
202
|
+
functionToLock.apply(thisArg || _this, args);
|
|
203
|
+
}
|
|
204
|
+
lockFn.reset();
|
|
205
|
+
});
|
|
206
|
+
lockFn.pending = true;
|
|
207
|
+
};
|
|
208
|
+
lockFn.pending = false;
|
|
209
|
+
lockFn.reset = resetLockedFn.bind(lockFn);
|
|
210
|
+
return lockFn;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Enqueues the given function to run on the next "tick" of the JS event
|
|
215
|
+
* loop cycle. If you ever encounter the "value changed after it was
|
|
216
|
+
* checked" error in Angular when trying to assign a value of a
|
|
217
|
+
* component class, performing that assignment on the next tick, i.e. when
|
|
218
|
+
* all of Angular's current cycle is finished, will resolve that error.
|
|
219
|
+
*/
|
|
220
|
+
function onNextTick(fn, thisArg) {
|
|
221
|
+
var boundFn = thisArg ? fn.bind(thisArg) : fn;
|
|
222
|
+
setTimeout(boundFn, 0);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Functions for various operators, most useful in combination
|
|
227
|
+
* with functional programming tools like map, filter, and reduce.
|
|
228
|
+
*/
|
|
229
|
+
var Op = {
|
|
230
|
+
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
|
231
|
+
add: function (a, b) { return a + b; },
|
|
232
|
+
and: function (a, b) { return a && b; },
|
|
233
|
+
band: function (a, b) { return a & b; },
|
|
234
|
+
bor: function (a, b) { return a | b; },
|
|
235
|
+
bxor: function (a, b) { return a ^ b; },
|
|
236
|
+
bnot: function (a) { return ~a; },
|
|
237
|
+
decr: function (a) { return a - 1; },
|
|
238
|
+
div: function (a, b) { return a / b; },
|
|
239
|
+
eq: function (a, b) { return a === b; },
|
|
240
|
+
exp: function (a, b) { return Math.pow(a, b); },
|
|
241
|
+
gt: function (a, b) { return a > b; },
|
|
242
|
+
gte: function (a, b) { return a >= b; },
|
|
243
|
+
incr: function (a) { return a + 1; },
|
|
244
|
+
lshift: function (a, b) { return a << b; },
|
|
245
|
+
lt: function (a, b) { return a < b; },
|
|
246
|
+
lte: function (a, b) { return a <= b; },
|
|
247
|
+
mul: function (a, b) { return a * b; },
|
|
248
|
+
neg: function (a) { return -a; },
|
|
249
|
+
neq: function (a, b) { return a !== b; },
|
|
250
|
+
not: function (a) { return !a; },
|
|
251
|
+
or: function (a, b) { return a || b; },
|
|
252
|
+
rem: function (a, b) { return a % b; },
|
|
253
|
+
rshift: function (a, b) { return a >> b; },
|
|
254
|
+
rshift_zf: function (a, b) { return a >>> b; },
|
|
255
|
+
sub: function (a, b) { return a - b; },
|
|
256
|
+
xor: function (a, b) { return (a || b) && !(a && b); },
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Unlike lodash range, includes the specified end number.
|
|
261
|
+
* So range(1, 10) gives you 1-10 instead of 1-9.
|
|
262
|
+
*/
|
|
263
|
+
function range(start, end) {
|
|
264
|
+
if (!Number.isInteger(start)) {
|
|
265
|
+
throw new Error("start must be an integer");
|
|
266
|
+
}
|
|
267
|
+
if (!Number.isInteger(end)) {
|
|
268
|
+
throw new Error("end must be an integer");
|
|
269
|
+
}
|
|
270
|
+
return new Array(Math.abs(end - start) + 1).fill(start)
|
|
271
|
+
.map(start > end ? Op.sub : Op.add);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* eslint-disable @typescript-eslint/no-redeclare, @typescript-eslint/no-extraneous-class */
|
|
275
|
+
/** docs:ignore */
|
|
276
|
+
var __values$c = (undefined && undefined.__values) || function(o) {
|
|
277
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
278
|
+
if (m) return m.call(o);
|
|
279
|
+
if (o && typeof o.length === "number") return {
|
|
280
|
+
next: function () {
|
|
281
|
+
if (o && i >= o.length) o = void 0;
|
|
282
|
+
return { value: o && o[i++], done: !o };
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
286
|
+
};
|
|
287
|
+
/*
|
|
288
|
+
* This was intended to be a replacement for Event that allows subclassing
|
|
289
|
+
* However it doesn't work in all browsers
|
|
290
|
+
* TODO: Drop this, use built-in CustomEvent once IE11 is dead
|
|
291
|
+
*/
|
|
292
|
+
var CustomEvent = /** @class */ (function () {
|
|
293
|
+
function CustomEvent(eventName, initDict) {
|
|
294
|
+
var e_1, _a, e_2, _b, e_3, _c;
|
|
295
|
+
if (initDict === void 0) { initDict = {}; }
|
|
296
|
+
var event;
|
|
297
|
+
if (typeof Event === "function") {
|
|
298
|
+
event = new Event(eventName, initDict);
|
|
299
|
+
}
|
|
300
|
+
else {
|
|
301
|
+
// IE11
|
|
302
|
+
event = document.createEvent("Event");
|
|
303
|
+
event.initEvent(eventName, initDict.bubbles, initDict.cancelable);
|
|
304
|
+
try {
|
|
305
|
+
for (var _d = __values$c(Object.keys(initDict)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
306
|
+
var key = _e.value;
|
|
307
|
+
if (key !== "bubbles" && key !== "cancelable") {
|
|
308
|
+
event[key] = initDict[key];
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
313
|
+
finally {
|
|
314
|
+
try {
|
|
315
|
+
if (_e && !_e.done && (_a = _d.return)) _a.call(_d);
|
|
316
|
+
}
|
|
317
|
+
finally { if (e_1) throw e_1.error; }
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
Object.setPrototypeOf(this, event);
|
|
321
|
+
/*
|
|
322
|
+
* Native functions like the getters, setters, and methods on Event.prototype
|
|
323
|
+
* cannot be called with "this" being a custom object. So what we're doing here
|
|
324
|
+
* works around that.
|
|
325
|
+
*/
|
|
326
|
+
var descriptors = Object.getOwnPropertyDescriptors(Event.prototype);
|
|
327
|
+
try {
|
|
328
|
+
for (var _f = __values$c(Object.keys(descriptors)), _g = _f.next(); !_g.done; _g = _f.next()) {
|
|
329
|
+
var propKey = _g.value;
|
|
330
|
+
var descriptor = descriptors[propKey];
|
|
331
|
+
try {
|
|
332
|
+
for (var _h = (e_3 = void 0, __values$c(Object.keys(descriptor))), _j = _h.next(); !_j.done; _j = _h.next()) {
|
|
333
|
+
var key = _j.value;
|
|
334
|
+
if (typeof descriptor[key] === "function") {
|
|
335
|
+
descriptor[key] = descriptor[key].bind(event);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
340
|
+
finally {
|
|
341
|
+
try {
|
|
342
|
+
if (_j && !_j.done && (_c = _h.return)) _c.call(_h);
|
|
343
|
+
}
|
|
344
|
+
finally { if (e_3) throw e_3.error; }
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
349
|
+
finally {
|
|
350
|
+
try {
|
|
351
|
+
if (_g && !_g.done && (_b = _f.return)) _b.call(_f);
|
|
352
|
+
}
|
|
353
|
+
finally { if (e_2) throw e_2.error; }
|
|
354
|
+
}
|
|
355
|
+
Object.defineProperties(this, descriptors);
|
|
356
|
+
}
|
|
357
|
+
return CustomEvent;
|
|
358
|
+
}());
|
|
359
|
+
|
|
360
|
+
var EDI_DOCUMENT_TYPE = Object.freeze({
|
|
361
|
+
100: { name: "Insurance Plan Description" },
|
|
362
|
+
101: { name: "Name and Address Lists" },
|
|
363
|
+
104: { name: "Air Shipment Information" },
|
|
364
|
+
106: { name: "Motor Carrier Rate Proposal" },
|
|
365
|
+
107: { name: "Request for Motor Carrier Rate Proposal" },
|
|
366
|
+
108: { name: "Response to a Motor Carrier Rate Proposal" },
|
|
367
|
+
109: { name: "Vessel Content Details" },
|
|
368
|
+
110: { name: "Air Freight Details and Invoice" },
|
|
369
|
+
112: { name: "Property Damage Report" },
|
|
370
|
+
120: { name: "Vehicle Shipping Order" },
|
|
371
|
+
121: { name: "Vehicle Service" },
|
|
372
|
+
124: { name: "Vehicle Damage" },
|
|
373
|
+
125: { name: "Multilevel Railcar Load Details" },
|
|
374
|
+
126: { name: "Vehicle Application Advice" },
|
|
375
|
+
127: { name: "Vehicle Baying Order" },
|
|
376
|
+
128: { name: "Dealer Information" },
|
|
377
|
+
129: { name: "Vehicle Carrier Rate Update" },
|
|
378
|
+
130: { name: "Student Educational Record (Transcript)" },
|
|
379
|
+
131: { name: "Student Educational Record (Transcript) Acknowledgment" },
|
|
380
|
+
135: { name: "Student Loan Application" },
|
|
381
|
+
138: { name: "Testing Results Request and Report" },
|
|
382
|
+
139: { name: "Student Loan Guarantee Result" },
|
|
383
|
+
140: { name: "Product Registration" },
|
|
384
|
+
141: { name: "Product Service Claim Response" },
|
|
385
|
+
142: { name: "Product Service Claim" },
|
|
386
|
+
143: { name: "Product Service Notification" },
|
|
387
|
+
144: { name: "Student Loan Transfer and Status Verification" },
|
|
388
|
+
146: { name: "Request for Student Educational Record (Transcript)" },
|
|
389
|
+
147: { name: "Response to Request for Student Educational Record (Transcript)" },
|
|
390
|
+
148: { name: "Report of Injury, Illness or Incident" },
|
|
391
|
+
149: { name: "Notice of Tax Adjustment or Assessment" },
|
|
392
|
+
150: { name: "Tax Rate Notification" },
|
|
393
|
+
151: { name: "Electronic Filing of Tax Return Data Acknowledgment" },
|
|
394
|
+
152: { name: "Statistical Government Information" },
|
|
395
|
+
153: { name: "Unemployment Insurance Tax Claim or Charge Information" },
|
|
396
|
+
154: { name: "Uniform Commercial Code Filing" },
|
|
397
|
+
155: { name: "Business Credit Report" },
|
|
398
|
+
157: { name: "Notice of Power of Attorney" },
|
|
399
|
+
159: { name: "Motion Picture Booking Confirmation" },
|
|
400
|
+
160: { name: "Transportation Automatic Equipment Identification" },
|
|
401
|
+
161: { name: "Train Sheet" },
|
|
402
|
+
169: { name: "Transportation Appointment Schedule Information" },
|
|
403
|
+
170: { name: "Revenue Receipts Statement" },
|
|
404
|
+
175: { name: "Court and Law Enforcement Notice" },
|
|
405
|
+
176: { name: "Court Submission TYPE" },
|
|
406
|
+
180: { name: "Return Merchandise Authorization and Notification" },
|
|
407
|
+
185: { name: "Royalty Regulatory Report" },
|
|
408
|
+
186: { name: "Insurance Underwriting Requirements Reporting" },
|
|
409
|
+
188: { name: "Educational Course Inventory" },
|
|
410
|
+
189: { name: "Application for Admission to Educational Institutions" },
|
|
411
|
+
190: { name: "Student Enrollment Verification" },
|
|
412
|
+
191: { name: "Student Loan Pre-Claims and Claims" },
|
|
413
|
+
194: { name: "Grant or Assistance Application" },
|
|
414
|
+
195: { name: "Federal Communications Commission (FCC) License Application" },
|
|
415
|
+
196: { name: "Contractor Cost Data Reporting" },
|
|
416
|
+
197: { name: "Real Estate Title Evidence" },
|
|
417
|
+
198: { name: "Loan Verification Information" },
|
|
418
|
+
199: { name: "Real Estate Settlement Information" },
|
|
419
|
+
200: { name: "Mortgage Credit Report" },
|
|
420
|
+
201: { name: "Residential Loan Application" },
|
|
421
|
+
202: { name: "Secondary Mortgage Market Loan Delivery" },
|
|
422
|
+
203: { name: "Secondary Mortgage Market Investor Report" },
|
|
423
|
+
204: { name: "Motor Carrier Load Tender" },
|
|
424
|
+
205: { name: "Mortgage Note" },
|
|
425
|
+
206: { name: "Real Estate Inspection" },
|
|
426
|
+
210: { name: "Motor Carrier Freight Details and Invoice" },
|
|
427
|
+
211: { name: "Motor Carrier Bill of Lading", edifactId: "IFTMCE" },
|
|
428
|
+
212: { name: "Motor Carrier Delivery Trailer Manifest" },
|
|
429
|
+
213: { name: "Motor Carrier Shipment Status Inquiry" },
|
|
430
|
+
214: { name: "Transportation Carrier Shipment Status Message" },
|
|
431
|
+
215: { name: "Motor Carrier Pick-up Manifest" },
|
|
432
|
+
216: { name: "Motor Carrier Shipment Pick-up Notification" },
|
|
433
|
+
217: { name: "Motor Carrier Loading and Route Guide" },
|
|
434
|
+
218: { name: "Motor Carrier Tariff Information" },
|
|
435
|
+
219: { name: "Logistics Service Request" },
|
|
436
|
+
220: { name: "Logistics Service Response" },
|
|
437
|
+
222: { name: "Cartage Work Assignment" },
|
|
438
|
+
223: { name: "Consolidators Freight Bill and Invoice" },
|
|
439
|
+
224: { name: "Motor Carrier Summary Freight Bill Manifest" },
|
|
440
|
+
225: { name: "Response to a Cartage Work Assignment" },
|
|
441
|
+
240: { name: "Motor Carrier Package Status" },
|
|
442
|
+
242: { name: "Data Status Tracking" },
|
|
443
|
+
244: { name: "Product Source Information" },
|
|
444
|
+
248: { name: "Account Assignment/Inquiry and Service/Status" },
|
|
445
|
+
249: { name: "Animal Toxicological Data" },
|
|
446
|
+
250: { name: "Purchase Order Shipment Management Document" },
|
|
447
|
+
251: { name: "Pricing Support" },
|
|
448
|
+
252: { name: "Insurance Producer Administration" },
|
|
449
|
+
255: { name: "Underwriting Information Services" },
|
|
450
|
+
256: { name: "Periodic Compensation" },
|
|
451
|
+
260: { name: "Application for Mortgage Insurance Benefits" },
|
|
452
|
+
261: { name: "Real Estate Information Request" },
|
|
453
|
+
262: { name: "Real Estate Information Report" },
|
|
454
|
+
263: { name: "Residential Mortgage Insurance Application Response" },
|
|
455
|
+
264: { name: "Mortgage Loan Default Status" },
|
|
456
|
+
265: { name: "Real Estate Title Insurance Services Order" },
|
|
457
|
+
266: { name: "Mortgage or Property Record Change Notification" },
|
|
458
|
+
267: { name: "Individual Life, Annuity and Disability Application" },
|
|
459
|
+
268: { name: "Annuity Activity" },
|
|
460
|
+
270: { name: "Eligibility, Coverage or Benefit Inquiry" },
|
|
461
|
+
271: { name: "Eligibility, Coverage or Benefit Information" },
|
|
462
|
+
272: { name: "Property and Casualty Loss Notification" },
|
|
463
|
+
273: { name: "Insurance/Annuity Application Status" },
|
|
464
|
+
274: { name: "Health Care Provider Information" },
|
|
465
|
+
275: { name: "Patient Information" },
|
|
466
|
+
276: { name: "Health Care Claim Status Request" },
|
|
467
|
+
277: { name: "Health Care Claim Status Notification" },
|
|
468
|
+
278: { name: "Health Care Services Insurance/Benefit Review Information" },
|
|
469
|
+
280: { name: "Voter Registration Information" },
|
|
470
|
+
285: { name: "Commercial Vehicle Safety and Credentials Information Exchange" },
|
|
471
|
+
286: { name: "Commercial Vehicle Credentials" },
|
|
472
|
+
288: { name: "Wage Determination" },
|
|
473
|
+
290: { name: "Cooperative Advertising Agreements" },
|
|
474
|
+
300: { name: "Reservation (Booking Request) (Ocean)" },
|
|
475
|
+
301: { name: "Confirmation (Ocean)", edifactId: "IFTMBC" },
|
|
476
|
+
303: { name: "Booking Cancellation (Ocean)" },
|
|
477
|
+
304: { name: "Shipping Instructions" },
|
|
478
|
+
309: { name: "U.S. Customs Manifest" },
|
|
479
|
+
310: { name: "Freight Receipt and Invoice (Ocean)" },
|
|
480
|
+
311: { name: "Canadian Customs Information" },
|
|
481
|
+
312: { name: "Arrival Notice (Ocean)" },
|
|
482
|
+
313: { name: "Shipment Status Inquiry (Ocean)" },
|
|
483
|
+
315: { name: "Status Details (Ocean)" },
|
|
484
|
+
317: { name: "Delivery/Pickup Order" },
|
|
485
|
+
319: { name: "Terminal Information" },
|
|
486
|
+
322: { name: "Terminal Operations and Intermodal Ramp Activity" },
|
|
487
|
+
323: { name: "Vessel Schedule and Itinerary (Ocean)" },
|
|
488
|
+
324: { name: "Vessel Stow Plan (Ocean)" },
|
|
489
|
+
325: { name: "Consolidation of Goods In Container" },
|
|
490
|
+
326: { name: "Consignment Summary List" },
|
|
491
|
+
350: { name: "U.S. Customs Status Information" },
|
|
492
|
+
352: { name: "U.S. Customs Carrier General Order Status" },
|
|
493
|
+
353: { name: "U.S. Customs Events Advisory Details" },
|
|
494
|
+
354: { name: "U.S. Customs Automated Manifest Archive Status" },
|
|
495
|
+
355: { name: "U.S. Customs Acceptance/Rejection" },
|
|
496
|
+
356: { name: "U.S. Customs Permit to Transfer Request" },
|
|
497
|
+
357: { name: "U.S. Customs In-Bond Information" },
|
|
498
|
+
358: { name: "U.S. Customs Consist Information" },
|
|
499
|
+
361: { name: "Carrier Interchange Agreement (Ocean)" },
|
|
500
|
+
362: { name: "Cargo Insurance Advice of Shipment" },
|
|
501
|
+
404: { name: "Rail Carrier Shipment Information" },
|
|
502
|
+
410: { name: "Rail Carrier Freight Details and Invoice" },
|
|
503
|
+
411: { name: "Rail Carrier Freight Details and Invoice Summary" },
|
|
504
|
+
412: { name: "Trailer or Container Repair Billing" },
|
|
505
|
+
414: { name: "Rail Carhire Settlements" },
|
|
506
|
+
417: { name: "Rail Carrier Waybill Interchange" },
|
|
507
|
+
418: { name: "Rail Advance Interchange Consist" },
|
|
508
|
+
419: { name: "Advance Car Disposition" },
|
|
509
|
+
420: { name: "Car Handling Information" },
|
|
510
|
+
421: { name: "Estimated Time of Arrival and Car Scheduling" },
|
|
511
|
+
422: { name: "Shipper's Car Order" },
|
|
512
|
+
423: { name: "Rail Industrial Switch List" },
|
|
513
|
+
424: { name: "Rail Carrier Services Settlement" },
|
|
514
|
+
425: { name: "Rail Waybill Request" },
|
|
515
|
+
426: { name: "Rail Revenue Waybill" },
|
|
516
|
+
427: { name: "Rail Waybill Response" },
|
|
517
|
+
429: { name: "Railroad Retirement Activity" },
|
|
518
|
+
431: { name: "Railroad Station Master File" },
|
|
519
|
+
432: { name: "Rail Deprescription" },
|
|
520
|
+
433: { name: "Railroad Reciprocal Switch File" },
|
|
521
|
+
434: { name: "Railroad Mark Register Update Activity" },
|
|
522
|
+
435: { name: "Standard Transportation Commodity Code (STCC) Master" },
|
|
523
|
+
436: { name: "Locomotive Information" },
|
|
524
|
+
437: { name: "Railroad Junctions and Interchanges Activity" },
|
|
525
|
+
440: { name: "Shipment Weights" },
|
|
526
|
+
451: { name: "Railroad Event Report" },
|
|
527
|
+
452: { name: "Railroad Problem Log Inquiry or Advice" },
|
|
528
|
+
453: { name: "Railroad Service Commitment Advice" },
|
|
529
|
+
455: { name: "Railroad Parameter Trace Registration" },
|
|
530
|
+
456: { name: "Railroad Equipment Inquiry or Advice" },
|
|
531
|
+
460: { name: "Railroad Price Distribution Request or Response" },
|
|
532
|
+
463: { name: "Rail Rate Reply" },
|
|
533
|
+
466: { name: "Rate Request" },
|
|
534
|
+
468: { name: "Rate Docket Journal Log" },
|
|
535
|
+
470: { name: "Railroad Clearance" },
|
|
536
|
+
475: { name: "Rail Route File Maintenance" },
|
|
537
|
+
485: { name: "Ratemaking Action" },
|
|
538
|
+
486: { name: "Rate Docket Expiration" },
|
|
539
|
+
490: { name: "Rate Group Definition" },
|
|
540
|
+
492: { name: "Miscellaneous Rates" },
|
|
541
|
+
494: { name: "Rail Scale Rates" },
|
|
542
|
+
500: { name: "Medical Event Reporting" },
|
|
543
|
+
501: { name: "Vendor Performance Review" },
|
|
544
|
+
503: { name: "Pricing History" },
|
|
545
|
+
504: { name: "Clauses and Provisions" },
|
|
546
|
+
511: { name: "Requisition" },
|
|
547
|
+
517: { name: "Material Obligation Validation" },
|
|
548
|
+
521: { name: "Income or Asset Offset" },
|
|
549
|
+
527: { name: "Material Due-In and Receipt" },
|
|
550
|
+
536: { name: "Logistics Reassignment" },
|
|
551
|
+
540: { name: "Notice of Employment Status" },
|
|
552
|
+
561: { name: "Contract Abstract" },
|
|
553
|
+
567: { name: "Contract Completion Status" },
|
|
554
|
+
568: { name: "Contract Payment Management Report" },
|
|
555
|
+
601: { name: "U.S. Customs Export Shipment Information" },
|
|
556
|
+
602: { name: "Transportation Services Tender" },
|
|
557
|
+
620: { name: "Excavation Communication" },
|
|
558
|
+
625: { name: "Well Information" },
|
|
559
|
+
650: { name: "Maintenance Service Order" },
|
|
560
|
+
715: { name: "Intermodal Group Loading Plan" },
|
|
561
|
+
805: { name: "Contract Pricing Proposal" },
|
|
562
|
+
806: { name: "Project Schedule Reporting" },
|
|
563
|
+
810: { name: "Invoice", edifactId: "INVOIC" },
|
|
564
|
+
811: { name: "Consolidated Service Invoice/Statement" },
|
|
565
|
+
812: { name: "Credit/Debit Adjustment" },
|
|
566
|
+
813: { name: "Electronic Filing of Tax Return Data" },
|
|
567
|
+
814: { name: "General Request, Response or Confirmation" },
|
|
568
|
+
815: { name: "Cryptographic Service Message" },
|
|
569
|
+
816: { name: "Organizational Relationships" },
|
|
570
|
+
818: { name: "Commission Sales Report" },
|
|
571
|
+
819: { name: "Operating Expense Statement" },
|
|
572
|
+
820: { name: "Payment Order/Remittance Advice", edifactId: "REMADV" },
|
|
573
|
+
821: { name: "Financial Information Reporting" },
|
|
574
|
+
822: { name: "Account Analysis" },
|
|
575
|
+
823: { name: "Lockbox" },
|
|
576
|
+
824: { name: "Application Advice", edifactId: "APERAK" },
|
|
577
|
+
826: { name: "Tax Information Exchange" },
|
|
578
|
+
827: { name: "Financial Return Notice" },
|
|
579
|
+
828: { name: "Debit Authorization" },
|
|
580
|
+
829: { name: "Payment Cancellation Request" },
|
|
581
|
+
830: { name: "Planning Schedule with Release Capability", edifactId: "DELFOR" },
|
|
582
|
+
831: { name: "Application Control Totals" },
|
|
583
|
+
832: { name: "Price/Sales Catalog", edifactId: "PRICAT" },
|
|
584
|
+
833: { name: "Mortgage Credit Report Order" },
|
|
585
|
+
834: { name: "Benefit Enrollment and Maintenance" },
|
|
586
|
+
835: { name: "Health Care Claim Payment/Advice" },
|
|
587
|
+
836: { name: "Procurement Notices" },
|
|
588
|
+
837: { name: "Health Care Claim" },
|
|
589
|
+
838: { name: "Trading Partner Profile" },
|
|
590
|
+
839: { name: "Project Cost Reporting" },
|
|
591
|
+
840: { name: "Request for Quotation", edifactId: "REQUOTE" },
|
|
592
|
+
841: { name: "Specifications/Technical Information" },
|
|
593
|
+
842: { name: "Nonconformance Report" },
|
|
594
|
+
843: { name: "Response to Request for Quotation", edifactId: "QUOTES" },
|
|
595
|
+
844: { name: "Product Transfer Account Adjustment", edifactId: "SSDCLM" },
|
|
596
|
+
845: { name: "Price Authorization Acknowledgment/Status", edifactId: "ATHSTS" },
|
|
597
|
+
846: { name: "Inventory Inquiry/Advice", edifactId: "INVRPT" },
|
|
598
|
+
847: { name: "Material Claim" },
|
|
599
|
+
848: { name: "Material Safety Data Sheet" },
|
|
600
|
+
849: { name: "Response to Product Transfer Account Adjustment" },
|
|
601
|
+
850: { name: "Purchase Order", edifactId: "ORDERS" },
|
|
602
|
+
851: { name: "Asset Schedule" },
|
|
603
|
+
852: { name: "Product Activity Data", edifactId: "SLSRPT" },
|
|
604
|
+
853: { name: "Routing and Carrier Instruction" },
|
|
605
|
+
854: { name: "Shipment Delivery Discrepancy Information" },
|
|
606
|
+
855: { name: "Purchase Order Acknowledgment", edifactId: "ORDRSP" },
|
|
607
|
+
856: { name: "Advance Ship Notice/Manifest", edifactId: "DESADV" },
|
|
608
|
+
857: { name: "Shipment and Billing Notice" },
|
|
609
|
+
858: { name: "Shipment Information" },
|
|
610
|
+
859: { name: "Freight Invoice" },
|
|
611
|
+
860: { name: "Purchase Order Change", edifactId: "ORDCHG" },
|
|
612
|
+
861: { name: "Receiving Advice/Acceptance Certificate", edifactId: "RECADV" },
|
|
613
|
+
862: { name: "Shipping Schedule", edifactId: "DELJIT" },
|
|
614
|
+
863: { name: "Report of Test Results" },
|
|
615
|
+
864: { name: "Text Message" },
|
|
616
|
+
865: { name: "Purchase Order Change", edifactId: "ORDRSP" },
|
|
617
|
+
866: { name: "Production Sequence" },
|
|
618
|
+
867: { name: "Product Transfer and Resale Report", edifactId: "SLSRPT" },
|
|
619
|
+
868: { name: "Electronic Form Structure" },
|
|
620
|
+
869: { name: "Order Status Inquiry", edifactId: "ORSSTA" },
|
|
621
|
+
870: { name: "Order Status Report", edifactId: "ORDREP" },
|
|
622
|
+
871: { name: "Component Parts Content" },
|
|
623
|
+
872: { name: "Residential Mortgage Insurance Application" },
|
|
624
|
+
875: { name: "Grocery Products Purchase Order" },
|
|
625
|
+
876: { name: "Grocery Products Purchase Order Change" },
|
|
626
|
+
877: { name: "Manufacturer Coupon Family Code Structure" },
|
|
627
|
+
878: { name: "Product Authorization/De-authorization" },
|
|
628
|
+
879: { name: "Price Information" },
|
|
629
|
+
880: { name: "Grocery Products Invoice" },
|
|
630
|
+
881: { name: "Manufacturer Coupon Redemption Detail" },
|
|
631
|
+
882: { name: "Direct Store Delivery Summary Information" },
|
|
632
|
+
883: { name: "Market Development Fund Allocation" },
|
|
633
|
+
884: { name: "Market Development Fund Settlement" },
|
|
634
|
+
885: { name: "Retail Account Characteristics" },
|
|
635
|
+
886: { name: "Customer Call Reporting" },
|
|
636
|
+
887: { name: "Coupon Notification" },
|
|
637
|
+
888: { name: "Item Maintenance" },
|
|
638
|
+
889: { name: "Promotion Announcement" },
|
|
639
|
+
891: { name: "Deduction Research Report" },
|
|
640
|
+
893: { name: "Item Information Request" },
|
|
641
|
+
894: { name: "Delivery/Return Base Record" },
|
|
642
|
+
895: { name: "Delivery/Return Acknowledgment or Adjustment" },
|
|
643
|
+
896: { name: "Product Dimension Maintenance" },
|
|
644
|
+
920: { name: "Loss or Damage Claim - General Commodities" },
|
|
645
|
+
924: { name: "Loss or Damage Claim - Motor Vehicle" },
|
|
646
|
+
925: { name: "Claim Tracer" },
|
|
647
|
+
926: { name: "Claim Status Report and Tracer Reply" },
|
|
648
|
+
928: { name: "Automotive Inspection Detail" },
|
|
649
|
+
940: { name: "Warehouse Shipping Order" },
|
|
650
|
+
943: { name: "Warehouse Stock Transfer Shipment Advice" },
|
|
651
|
+
944: { name: "Warehouse Stock Transfer Receipt Advice" },
|
|
652
|
+
945: { name: "Warehouse Shipping Advice" },
|
|
653
|
+
947: { name: "Warehouse Inventory Adjustment Advice" },
|
|
654
|
+
980: { name: "Functional Group Totals" },
|
|
655
|
+
990: { name: "Response to a Load Tender" },
|
|
656
|
+
996: { name: "File Transfer" },
|
|
657
|
+
997: { name: "Functional Acknowledgment", edifactId: "CONTROL" },
|
|
658
|
+
998: { name: "Set Cancellation" },
|
|
659
|
+
999: { name: "Implementation Acknowledgment" },
|
|
660
|
+
});
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* A property decorated with this will have any value assigned
|
|
664
|
+
* to it cast to a number with the unary `+` operator.
|
|
665
|
+
*/
|
|
666
|
+
function castToNumber() {
|
|
667
|
+
return function (target, key) {
|
|
668
|
+
var _a;
|
|
669
|
+
var internalKey = "_" + String(key);
|
|
670
|
+
Object.defineProperties(target, (_a = {},
|
|
671
|
+
_a[internalKey] = {
|
|
672
|
+
enumerable: false,
|
|
673
|
+
configurable: true,
|
|
674
|
+
writable: true,
|
|
675
|
+
value: undefined,
|
|
676
|
+
},
|
|
677
|
+
_a[key] = {
|
|
678
|
+
enumerable: true,
|
|
679
|
+
configurable: true,
|
|
680
|
+
get: function () {
|
|
681
|
+
return this[internalKey];
|
|
682
|
+
},
|
|
683
|
+
set: function (newValue) {
|
|
684
|
+
this[internalKey] = Number(newValue);
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
_a));
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
692
|
+
__assign$3 = Object.assign || function(t) {
|
|
693
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
694
|
+
s = arguments[i];
|
|
695
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
696
|
+
t[p] = s[p];
|
|
697
|
+
}
|
|
698
|
+
return t;
|
|
699
|
+
};
|
|
700
|
+
return __assign$3.apply(this, arguments);
|
|
701
|
+
};
|
|
702
|
+
/**
|
|
703
|
+
* Decorator that applies `debounce`
|
|
704
|
+
*/
|
|
705
|
+
function debounced(ms) {
|
|
706
|
+
return function (target, propertyKey, descriptor) {
|
|
707
|
+
var originalDescriptorCopy = __assign$3({}, descriptor);
|
|
708
|
+
originalDescriptorCopy.get = function get() {
|
|
709
|
+
/*
|
|
710
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
711
|
+
* one of the class containing the decorated method will break.
|
|
712
|
+
*/
|
|
713
|
+
var newDescriptorWithDebounced = __assign$3({}, originalDescriptorCopy);
|
|
714
|
+
newDescriptorWithDebounced.value = debounce(originalDescriptorCopy.value, ms, this);
|
|
715
|
+
Object.defineProperty(this, propertyKey, newDescriptorWithDebounced);
|
|
716
|
+
return newDescriptorWithDebounced.value;
|
|
717
|
+
};
|
|
718
|
+
originalDescriptorCopy.configurable = true;
|
|
719
|
+
delete originalDescriptorCopy.writable;
|
|
720
|
+
delete originalDescriptorCopy.value;
|
|
721
|
+
return originalDescriptorCopy;
|
|
722
|
+
};
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
726
|
+
__assign$2 = Object.assign || function(t) {
|
|
727
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
728
|
+
s = arguments[i];
|
|
729
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
730
|
+
t[p] = s[p];
|
|
731
|
+
}
|
|
732
|
+
return t;
|
|
733
|
+
};
|
|
734
|
+
return __assign$2.apply(this, arguments);
|
|
735
|
+
};
|
|
736
|
+
/**
|
|
737
|
+
* Decorator that applies `lockToAnimationFrames`
|
|
738
|
+
*/
|
|
739
|
+
function lockedToAnimationFrames(target, propertyKey, descriptor) {
|
|
740
|
+
var originalDescriptorCopy = __assign$2({}, descriptor);
|
|
741
|
+
descriptor.get = function get() {
|
|
742
|
+
/*
|
|
743
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
744
|
+
* one of the class containing the decorated method will break.
|
|
745
|
+
*/
|
|
746
|
+
var newDescriptor = __assign$2({}, originalDescriptorCopy);
|
|
747
|
+
newDescriptor.value = lockToAnimationFrames(originalDescriptorCopy.value, this);
|
|
748
|
+
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
749
|
+
return newDescriptor.value;
|
|
750
|
+
};
|
|
751
|
+
descriptor.configurable = true;
|
|
752
|
+
delete descriptor.writable;
|
|
753
|
+
delete descriptor.value;
|
|
754
|
+
return descriptor;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
758
|
+
__assign$1 = Object.assign || function(t) {
|
|
759
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
760
|
+
s = arguments[i];
|
|
761
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
762
|
+
t[p] = s[p];
|
|
763
|
+
}
|
|
764
|
+
return t;
|
|
765
|
+
};
|
|
766
|
+
return __assign$1.apply(this, arguments);
|
|
767
|
+
};
|
|
768
|
+
var __values$b = (undefined && undefined.__values) || function(o) {
|
|
769
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
770
|
+
if (m) return m.call(o);
|
|
771
|
+
if (o && typeof o.length === "number") return {
|
|
772
|
+
next: function () {
|
|
773
|
+
if (o && i >= o.length) o = void 0;
|
|
774
|
+
return { value: o && o[i++], done: !o };
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
778
|
+
};
|
|
779
|
+
/**
|
|
780
|
+
* This would be simpler to understand as a factory that returns a decorator function,
|
|
781
|
+
* but TypeScript AoT compliation doesn't allow that. This lets you create a decorator
|
|
782
|
+
* that takes in a metadata object as an argument and assigns its values along with
|
|
783
|
+
* default values to the decorated method. The decorator will look like a standard
|
|
784
|
+
* decorator but calling this method and returning the result is the only thing it
|
|
785
|
+
* needs to do.
|
|
786
|
+
*/
|
|
787
|
+
function simpleMetadataDecoratorApplicator(metadata, defaults, target, key, descriptor) {
|
|
788
|
+
var updatedDescriptor = descriptor || Object.getOwnPropertyDescriptor(target, key);
|
|
789
|
+
var getter = updatedDescriptor.get;
|
|
790
|
+
var value = updatedDescriptor.value;
|
|
791
|
+
updatedDescriptor.get = function get() {
|
|
792
|
+
var e_1, _a;
|
|
793
|
+
// I don't remember why I did this "this" alias & want to ensure we don't break anything...
|
|
794
|
+
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
795
|
+
var self = this;
|
|
796
|
+
var fn = value || getter.call(this);
|
|
797
|
+
var boundFn = fn.bind(this);
|
|
798
|
+
var updatedMetadata = __assign$1(__assign$1({}, defaults), metadata);
|
|
799
|
+
var _loop_1 = function (prop) {
|
|
800
|
+
if (typeof metadata[prop] === "function") {
|
|
801
|
+
Object.defineProperty(boundFn, prop, {
|
|
802
|
+
get: function () {
|
|
803
|
+
return updatedMetadata[prop](self);
|
|
804
|
+
},
|
|
805
|
+
});
|
|
806
|
+
}
|
|
807
|
+
else {
|
|
808
|
+
boundFn[prop] = updatedMetadata[prop];
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
try {
|
|
812
|
+
for (var _b = __values$b(Object.keys(defaults)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
813
|
+
var prop = _c.value;
|
|
814
|
+
_loop_1(prop);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
818
|
+
finally {
|
|
819
|
+
try {
|
|
820
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
821
|
+
}
|
|
822
|
+
finally { if (e_1) throw e_1.error; }
|
|
823
|
+
}
|
|
824
|
+
Object.defineProperty(this, key, {
|
|
825
|
+
writable: true,
|
|
826
|
+
configurable: true,
|
|
827
|
+
enumerable: updatedDescriptor.enumerable,
|
|
828
|
+
value: boundFn,
|
|
829
|
+
});
|
|
830
|
+
return boundFn;
|
|
831
|
+
};
|
|
832
|
+
delete updatedDescriptor.value;
|
|
833
|
+
delete updatedDescriptor.writable;
|
|
834
|
+
return updatedDescriptor;
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
var __assign = (undefined && undefined.__assign) || function () {
|
|
838
|
+
__assign = Object.assign || function(t) {
|
|
839
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
840
|
+
s = arguments[i];
|
|
841
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
842
|
+
t[p] = s[p];
|
|
843
|
+
}
|
|
844
|
+
return t;
|
|
845
|
+
};
|
|
846
|
+
return __assign.apply(this, arguments);
|
|
847
|
+
};
|
|
848
|
+
/** Method decorator that configures the method to always run the tick after it's invoked */
|
|
849
|
+
function tickDelay(target, propertyKey, descriptor) {
|
|
850
|
+
var originalDescriptorCopy = __assign({}, descriptor);
|
|
851
|
+
originalDescriptorCopy.get = function get() {
|
|
852
|
+
/*
|
|
853
|
+
* Make a new copy each time; if you don't then every instance after the first
|
|
854
|
+
* one of the class containing the decorated method will break.
|
|
855
|
+
*/
|
|
856
|
+
var newDescriptor = __assign({}, originalDescriptorCopy);
|
|
857
|
+
var boundFn = originalDescriptorCopy.value.bind(this);
|
|
858
|
+
newDescriptor.value = function () { return setTimeout(boundFn, 0); };
|
|
859
|
+
Object.defineProperty(this, propertyKey, newDescriptor);
|
|
860
|
+
return newDescriptor.value;
|
|
861
|
+
};
|
|
862
|
+
originalDescriptorCopy.configurable = true;
|
|
863
|
+
delete originalDescriptorCopy.writable;
|
|
864
|
+
delete originalDescriptorCopy.value;
|
|
865
|
+
return originalDescriptorCopy;
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* Constrains a number to the given range. If the number is below the
|
|
870
|
+
* low end of the range, the low end will be returned. If the number is
|
|
871
|
+
* above the top end of the range, the top end will be returned. Otherwise
|
|
872
|
+
* the number itself will be returned.
|
|
873
|
+
*/
|
|
874
|
+
function constrain(n, range) {
|
|
875
|
+
if (!n || n < range[0]) {
|
|
876
|
+
return range[0];
|
|
877
|
+
}
|
|
878
|
+
if (n > range[1]) {
|
|
879
|
+
return range[1];
|
|
880
|
+
}
|
|
881
|
+
return n;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* Progressively rounds `num` to `decimalPlaces` places. This differs from other
|
|
886
|
+
* rounding methods out there such as lodash's, which are not progressive. For example,
|
|
887
|
+
* `(0.149).toFixed(1)` and lodash `_.round(0.149, 1)` both return `0.1`, but this
|
|
888
|
+
* function rounds `0.149` to `0.15` and then `0.15` to `0.2` and returns `0.2`.
|
|
889
|
+
*/
|
|
890
|
+
function decimalRound(num, decimalPlaces) {
|
|
891
|
+
if (decimalPlaces === void 0) { decimalPlaces = 0; }
|
|
892
|
+
var integralAndFractionalSplit = String(num).split(".");
|
|
893
|
+
var allDecimalPlaces = integralAndFractionalSplit.length > 1
|
|
894
|
+
? integralAndFractionalSplit[1].length
|
|
895
|
+
: 0;
|
|
896
|
+
var roundedNum = num;
|
|
897
|
+
for (var i = allDecimalPlaces - 1; i >= decimalPlaces; i -= 1) {
|
|
898
|
+
roundedNum = Number(Math.round(Number(roundedNum + "e" + i)) + "e-" + i);
|
|
899
|
+
}
|
|
900
|
+
return roundedNum;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Converts a file size in bytes to a human-friendly string. For example,
|
|
905
|
+
* `toFileSizeString(2048)` will return `"2.00KB"`.
|
|
906
|
+
*/
|
|
907
|
+
function toFileSizeString(n, precision) {
|
|
908
|
+
if (precision === void 0) { precision = 2; }
|
|
909
|
+
if (n > Number.MAX_SAFE_INTEGER) {
|
|
910
|
+
throw new Error("Number is greater than MAX_SAFE_INTEGER; "
|
|
911
|
+
+ "toFileSizeString does not support orders of magnitude "
|
|
912
|
+
+ "higher than petabytes for this reason until BigInt "
|
|
913
|
+
+ "achieves broad browser support.");
|
|
914
|
+
}
|
|
915
|
+
var magnitude = Math.min(Math.floor(Math.log(n) / Math.log(1024)), 5);
|
|
916
|
+
var unit = ["B",
|
|
917
|
+
"KB",
|
|
918
|
+
"MB",
|
|
919
|
+
"GB",
|
|
920
|
+
"TB",
|
|
921
|
+
"PB"][magnitude];
|
|
922
|
+
var decimalPlaces = magnitude ? precision : 0;
|
|
923
|
+
return decimalRound(n / (Math.pow(1024, magnitude)), decimalPlaces).toFixed(decimalPlaces) + unit;
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
/**
|
|
927
|
+
* Converts a path to crumbs.
|
|
928
|
+
* For example:
|
|
929
|
+
* "a.b[0].c" -> ["a", "b", "0", "c"]
|
|
930
|
+
*/
|
|
931
|
+
function crumblePath(path) {
|
|
932
|
+
return typeof path === "string" ? path.match(/[^.[\]]+/g) || [] : [].concat(path);
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Copy a property from one object to another using its property descriptor.
|
|
937
|
+
* In other words, if it's a getter/setter on `sourceObject` it'll be the same
|
|
938
|
+
* getter/setter on `destObject`. If it's just a value it'll be just a value.
|
|
939
|
+
*/
|
|
940
|
+
function copyProperty(propName, sourceObject, destObject) {
|
|
941
|
+
Object.defineProperty(destObject, propName, Object.getOwnPropertyDescriptor(sourceObject, propName));
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
945
|
+
|
|
946
|
+
/**
|
|
947
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
948
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
949
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
950
|
+
* Released under MIT license <https://lodash.com/license>
|
|
951
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
952
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
953
|
+
*/
|
|
954
|
+
|
|
955
|
+
/** `Object#toString` result references. */
|
|
956
|
+
var objectTag = '[object Object]';
|
|
957
|
+
|
|
958
|
+
/**
|
|
959
|
+
* Checks if `value` is a host object in IE < 9.
|
|
960
|
+
*
|
|
961
|
+
* @private
|
|
962
|
+
* @param {*} value The value to check.
|
|
963
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
964
|
+
*/
|
|
965
|
+
function isHostObject(value) {
|
|
966
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
967
|
+
// despite having improperly defined `toString` methods.
|
|
968
|
+
var result = false;
|
|
969
|
+
if (value != null && typeof value.toString != 'function') {
|
|
970
|
+
try {
|
|
971
|
+
result = !!(value + '');
|
|
972
|
+
} catch (e) {}
|
|
973
|
+
}
|
|
974
|
+
return result;
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
979
|
+
*
|
|
980
|
+
* @private
|
|
981
|
+
* @param {Function} func The function to wrap.
|
|
982
|
+
* @param {Function} transform The argument transform.
|
|
983
|
+
* @returns {Function} Returns the new function.
|
|
984
|
+
*/
|
|
985
|
+
function overArg(func, transform) {
|
|
986
|
+
return function(arg) {
|
|
987
|
+
return func(transform(arg));
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/** Used for built-in method references. */
|
|
992
|
+
var funcProto = Function.prototype,
|
|
993
|
+
objectProto = Object.prototype;
|
|
994
|
+
|
|
995
|
+
/** Used to resolve the decompiled source of functions. */
|
|
996
|
+
var funcToString = funcProto.toString;
|
|
997
|
+
|
|
998
|
+
/** Used to check objects for own properties. */
|
|
999
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1000
|
+
|
|
1001
|
+
/** Used to infer the `Object` constructor. */
|
|
1002
|
+
var objectCtorString = funcToString.call(Object);
|
|
1003
|
+
|
|
1004
|
+
/**
|
|
1005
|
+
* Used to resolve the
|
|
1006
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1007
|
+
* of values.
|
|
1008
|
+
*/
|
|
1009
|
+
var objectToString = objectProto.toString;
|
|
1010
|
+
|
|
1011
|
+
/** Built-in value references. */
|
|
1012
|
+
var getPrototype = overArg(Object.getPrototypeOf, Object);
|
|
1013
|
+
|
|
1014
|
+
/**
|
|
1015
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1016
|
+
* and has a `typeof` result of "object".
|
|
1017
|
+
*
|
|
1018
|
+
* @static
|
|
1019
|
+
* @memberOf _
|
|
1020
|
+
* @since 4.0.0
|
|
1021
|
+
* @category Lang
|
|
1022
|
+
* @param {*} value The value to check.
|
|
1023
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1024
|
+
* @example
|
|
1025
|
+
*
|
|
1026
|
+
* _.isObjectLike({});
|
|
1027
|
+
* // => true
|
|
1028
|
+
*
|
|
1029
|
+
* _.isObjectLike([1, 2, 3]);
|
|
1030
|
+
* // => true
|
|
1031
|
+
*
|
|
1032
|
+
* _.isObjectLike(_.noop);
|
|
1033
|
+
* // => false
|
|
1034
|
+
*
|
|
1035
|
+
* _.isObjectLike(null);
|
|
1036
|
+
* // => false
|
|
1037
|
+
*/
|
|
1038
|
+
function isObjectLike(value) {
|
|
1039
|
+
return !!value && typeof value == 'object';
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Checks if `value` is a plain object, that is, an object created by the
|
|
1044
|
+
* `Object` constructor or one with a `[[Prototype]]` of `null`.
|
|
1045
|
+
*
|
|
1046
|
+
* @static
|
|
1047
|
+
* @memberOf _
|
|
1048
|
+
* @since 0.8.0
|
|
1049
|
+
* @category Lang
|
|
1050
|
+
* @param {*} value The value to check.
|
|
1051
|
+
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
|
|
1052
|
+
* @example
|
|
1053
|
+
*
|
|
1054
|
+
* function Foo() {
|
|
1055
|
+
* this.a = 1;
|
|
1056
|
+
* }
|
|
1057
|
+
*
|
|
1058
|
+
* _.isPlainObject(new Foo);
|
|
1059
|
+
* // => false
|
|
1060
|
+
*
|
|
1061
|
+
* _.isPlainObject([1, 2, 3]);
|
|
1062
|
+
* // => false
|
|
1063
|
+
*
|
|
1064
|
+
* _.isPlainObject({ 'x': 0, 'y': 0 });
|
|
1065
|
+
* // => true
|
|
1066
|
+
*
|
|
1067
|
+
* _.isPlainObject(Object.create(null));
|
|
1068
|
+
* // => true
|
|
1069
|
+
*/
|
|
1070
|
+
function isPlainObject(value) {
|
|
1071
|
+
if (!isObjectLike(value) ||
|
|
1072
|
+
objectToString.call(value) != objectTag || isHostObject(value)) {
|
|
1073
|
+
return false;
|
|
1074
|
+
}
|
|
1075
|
+
var proto = getPrototype(value);
|
|
1076
|
+
if (proto === null) {
|
|
1077
|
+
return true;
|
|
1078
|
+
}
|
|
1079
|
+
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
|
|
1080
|
+
return (typeof Ctor == 'function' &&
|
|
1081
|
+
Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
var lodash_isplainobject = isPlainObject;
|
|
1085
|
+
|
|
1086
|
+
var __values$a = (undefined && undefined.__values) || function(o) {
|
|
1087
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1088
|
+
if (m) return m.call(o);
|
|
1089
|
+
if (o && typeof o.length === "number") return {
|
|
1090
|
+
next: function () {
|
|
1091
|
+
if (o && i >= o.length) o = void 0;
|
|
1092
|
+
return { value: o && o[i++], done: !o };
|
|
1093
|
+
}
|
|
1094
|
+
};
|
|
1095
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1096
|
+
};
|
|
1097
|
+
/*
|
|
1098
|
+
* Recursive Object.freeze on plain objects and arrays
|
|
1099
|
+
*/
|
|
1100
|
+
function deepFreeze(obj) {
|
|
1101
|
+
var e_1, _a;
|
|
1102
|
+
Object.freeze(obj);
|
|
1103
|
+
try {
|
|
1104
|
+
for (var _b = __values$a(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1105
|
+
var key = _c.value;
|
|
1106
|
+
var val = obj[key];
|
|
1107
|
+
if (lodash_isplainobject(val) || Array.isArray(val)) {
|
|
1108
|
+
deepFreeze(val);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1113
|
+
finally {
|
|
1114
|
+
try {
|
|
1115
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1116
|
+
}
|
|
1117
|
+
finally { if (e_1) throw e_1.error; }
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
var __read$3 = (undefined && undefined.__read) || function (o, n) {
|
|
1122
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1123
|
+
if (!m) return o;
|
|
1124
|
+
var i = m.call(o), r, ar = [], e;
|
|
1125
|
+
try {
|
|
1126
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1127
|
+
}
|
|
1128
|
+
catch (error) { e = { error: error }; }
|
|
1129
|
+
finally {
|
|
1130
|
+
try {
|
|
1131
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1132
|
+
}
|
|
1133
|
+
finally { if (e) throw e.error; }
|
|
1134
|
+
}
|
|
1135
|
+
return ar;
|
|
1136
|
+
};
|
|
1137
|
+
var __spreadArray$1 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
1138
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1139
|
+
if (ar || !(i in from)) {
|
|
1140
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
1141
|
+
ar[i] = from[i];
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
1145
|
+
};
|
|
1146
|
+
var __values$9 = (undefined && undefined.__values) || function(o) {
|
|
1147
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1148
|
+
if (m) return m.call(o);
|
|
1149
|
+
if (o && typeof o.length === "number") return {
|
|
1150
|
+
next: function () {
|
|
1151
|
+
if (o && i >= o.length) o = void 0;
|
|
1152
|
+
return { value: o && o[i++], done: !o };
|
|
1153
|
+
}
|
|
1154
|
+
};
|
|
1155
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1156
|
+
};
|
|
1157
|
+
exports.DiffChange = void 0;
|
|
1158
|
+
(function (DiffChange) {
|
|
1159
|
+
DiffChange[DiffChange["ADDITION"] = 0] = "ADDITION";
|
|
1160
|
+
DiffChange[DiffChange["DELETION"] = 1] = "DELETION";
|
|
1161
|
+
DiffChange[DiffChange["ALTERATION"] = 2] = "ALTERATION";
|
|
1162
|
+
})(exports.DiffChange || (exports.DiffChange = {}));
|
|
1163
|
+
function diff(o1, o2, parentPath) {
|
|
1164
|
+
var e_1, _a;
|
|
1165
|
+
if (parentPath === void 0) { parentPath = []; }
|
|
1166
|
+
var d = [];
|
|
1167
|
+
try {
|
|
1168
|
+
for (var _b = __values$9(new Set(__spreadArray$1(__spreadArray$1([], __read$3(Object.keys(o1)), false), __read$3(Object.keys(o2)), false))), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1169
|
+
var key = _c.value;
|
|
1170
|
+
var o1HasKey = Object.prototype.hasOwnProperty.call(o1, key);
|
|
1171
|
+
var o2HasKey = Object.prototype.hasOwnProperty.call(o2, key);
|
|
1172
|
+
if (o1HasKey && !o2HasKey) {
|
|
1173
|
+
d.push({
|
|
1174
|
+
type: exports.DiffChange.DELETION,
|
|
1175
|
+
key: key,
|
|
1176
|
+
parentPath: parentPath,
|
|
1177
|
+
objects: [o1, o2],
|
|
1178
|
+
});
|
|
1179
|
+
}
|
|
1180
|
+
else if (!o1HasKey && o2HasKey) {
|
|
1181
|
+
d.push({
|
|
1182
|
+
type: exports.DiffChange.ADDITION,
|
|
1183
|
+
key: key,
|
|
1184
|
+
parentPath: parentPath,
|
|
1185
|
+
objects: [o1, o2],
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
else if ((lodash_isplainobject(o1[key]) && lodash_isplainobject(o2[key]))
|
|
1189
|
+
|| (Array.isArray(o1[key]) && Array.isArray(o2[key]))) {
|
|
1190
|
+
d = d.concat(diff(o1[key], o2[key], __spreadArray$1(__spreadArray$1([], __read$3(parentPath), false), [key], false)));
|
|
1191
|
+
}
|
|
1192
|
+
else if (o1[key] !== o2[key]) {
|
|
1193
|
+
d.push({
|
|
1194
|
+
type: exports.DiffChange.ALTERATION,
|
|
1195
|
+
key: key,
|
|
1196
|
+
parentPath: parentPath,
|
|
1197
|
+
objects: [o1, o2],
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1203
|
+
finally {
|
|
1204
|
+
try {
|
|
1205
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1206
|
+
}
|
|
1207
|
+
finally { if (e_1) throw e_1.error; }
|
|
1208
|
+
}
|
|
1209
|
+
return d;
|
|
1210
|
+
}
|
|
1211
|
+
|
|
1212
|
+
var __values$8 = (undefined && undefined.__values) || function(o) {
|
|
1213
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1214
|
+
if (m) return m.call(o);
|
|
1215
|
+
if (o && typeof o.length === "number") return {
|
|
1216
|
+
next: function () {
|
|
1217
|
+
if (o && i >= o.length) o = void 0;
|
|
1218
|
+
return { value: o && o[i++], done: !o };
|
|
1219
|
+
}
|
|
1220
|
+
};
|
|
1221
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1222
|
+
};
|
|
1223
|
+
/**
|
|
1224
|
+
* Recursively navigate a nested object & call `fn` for each key/value pair
|
|
1225
|
+
*/
|
|
1226
|
+
function forEachEntryDeep(object, fn) {
|
|
1227
|
+
var e_1, _a;
|
|
1228
|
+
try {
|
|
1229
|
+
for (var _b = __values$8(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1230
|
+
var key = _c.value;
|
|
1231
|
+
var value = object[key];
|
|
1232
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
1233
|
+
forEachEntryDeep(value, fn);
|
|
1234
|
+
}
|
|
1235
|
+
else {
|
|
1236
|
+
fn(key, value, object);
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1241
|
+
finally {
|
|
1242
|
+
try {
|
|
1243
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1244
|
+
}
|
|
1245
|
+
finally { if (e_1) throw e_1.error; }
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
var __values$7 = (undefined && undefined.__values) || function(o) {
|
|
1250
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1251
|
+
if (m) return m.call(o);
|
|
1252
|
+
if (o && typeof o.length === "number") return {
|
|
1253
|
+
next: function () {
|
|
1254
|
+
if (o && i >= o.length) o = void 0;
|
|
1255
|
+
return { value: o && o[i++], done: !o };
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1259
|
+
};
|
|
1260
|
+
/**
|
|
1261
|
+
* Recursively navigate a nested object & call `fn` for each subobject
|
|
1262
|
+
*/
|
|
1263
|
+
function forEachNestedObject(object, fn, path) {
|
|
1264
|
+
var e_1, _a;
|
|
1265
|
+
if (path === void 0) { path = []; }
|
|
1266
|
+
fn(path, object);
|
|
1267
|
+
try {
|
|
1268
|
+
for (var _b = __values$7(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
1269
|
+
var key = _c.value;
|
|
1270
|
+
var value = object[key];
|
|
1271
|
+
if (lodash_isplainobject(value) || Array.isArray(value)) {
|
|
1272
|
+
var newPath = path.concat(key);
|
|
1273
|
+
forEachNestedObject(value, fn, newPath);
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
}
|
|
1277
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1278
|
+
finally {
|
|
1279
|
+
try {
|
|
1280
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
1281
|
+
}
|
|
1282
|
+
finally { if (e_1) throw e_1.error; }
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
|
|
1286
|
+
/**
|
|
1287
|
+
* lodash 4.0.0 (Custom Build) <https://lodash.com/>
|
|
1288
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1289
|
+
* Copyright 2012-2016 The Dojo Foundation <http://dojofoundation.org/>
|
|
1290
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1291
|
+
* Copyright 2009-2016 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1292
|
+
* Available under MIT license <https://lodash.com/license>
|
|
1293
|
+
*/
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Checks if `value` is `null` or `undefined`.
|
|
1297
|
+
*
|
|
1298
|
+
* @static
|
|
1299
|
+
* @memberOf _
|
|
1300
|
+
* @category Lang
|
|
1301
|
+
* @param {*} value The value to check.
|
|
1302
|
+
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
|
|
1303
|
+
* @example
|
|
1304
|
+
*
|
|
1305
|
+
* _.isNil(null);
|
|
1306
|
+
* // => true
|
|
1307
|
+
*
|
|
1308
|
+
* _.isNil(void 0);
|
|
1309
|
+
* // => true
|
|
1310
|
+
*
|
|
1311
|
+
* _.isNil(NaN);
|
|
1312
|
+
* // => false
|
|
1313
|
+
*/
|
|
1314
|
+
function isNil$1(value) {
|
|
1315
|
+
return value == null;
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
var lodash_isnil = isNil$1;
|
|
1319
|
+
|
|
1320
|
+
var isNilImport = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
1321
|
+
__proto__: null,
|
|
1322
|
+
'default': lodash_isnil
|
|
1323
|
+
}, [lodash_isnil]));
|
|
1324
|
+
|
|
1325
|
+
var lodash_isempty$1 = {exports: {}};
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* lodash (Custom Build) <https://lodash.com/>
|
|
1329
|
+
* Build: `lodash modularize exports="npm" -o ./`
|
|
1330
|
+
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
1331
|
+
* Released under MIT license <https://lodash.com/license>
|
|
1332
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
1333
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
1334
|
+
*/
|
|
1335
|
+
|
|
1336
|
+
(function (module, exports) {
|
|
1337
|
+
/** Used as references for various `Number` constants. */
|
|
1338
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1339
|
+
|
|
1340
|
+
/** `Object#toString` result references. */
|
|
1341
|
+
var argsTag = '[object Arguments]',
|
|
1342
|
+
funcTag = '[object Function]',
|
|
1343
|
+
genTag = '[object GeneratorFunction]',
|
|
1344
|
+
mapTag = '[object Map]',
|
|
1345
|
+
objectTag = '[object Object]',
|
|
1346
|
+
promiseTag = '[object Promise]',
|
|
1347
|
+
setTag = '[object Set]',
|
|
1348
|
+
weakMapTag = '[object WeakMap]';
|
|
1349
|
+
|
|
1350
|
+
var dataViewTag = '[object DataView]';
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Used to match `RegExp`
|
|
1354
|
+
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
1355
|
+
*/
|
|
1356
|
+
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
1357
|
+
|
|
1358
|
+
/** Used to detect host constructors (Safari). */
|
|
1359
|
+
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
1360
|
+
|
|
1361
|
+
/** Detect free variable `global` from Node.js. */
|
|
1362
|
+
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1363
|
+
|
|
1364
|
+
/** Detect free variable `self`. */
|
|
1365
|
+
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
1366
|
+
|
|
1367
|
+
/** Used as a reference to the global object. */
|
|
1368
|
+
var root = freeGlobal || freeSelf || Function('return this')();
|
|
1369
|
+
|
|
1370
|
+
/** Detect free variable `exports`. */
|
|
1371
|
+
var freeExports = exports && !exports.nodeType && exports;
|
|
1372
|
+
|
|
1373
|
+
/** Detect free variable `module`. */
|
|
1374
|
+
var freeModule = freeExports && 'object' == 'object' && module && !module.nodeType && module;
|
|
1375
|
+
|
|
1376
|
+
/** Detect the popular CommonJS extension `module.exports`. */
|
|
1377
|
+
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
1378
|
+
|
|
1379
|
+
/**
|
|
1380
|
+
* Gets the value at `key` of `object`.
|
|
1381
|
+
*
|
|
1382
|
+
* @private
|
|
1383
|
+
* @param {Object} [object] The object to query.
|
|
1384
|
+
* @param {string} key The key of the property to get.
|
|
1385
|
+
* @returns {*} Returns the property value.
|
|
1386
|
+
*/
|
|
1387
|
+
function getValue(object, key) {
|
|
1388
|
+
return object == null ? undefined : object[key];
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
/**
|
|
1392
|
+
* Checks if `value` is a host object in IE < 9.
|
|
1393
|
+
*
|
|
1394
|
+
* @private
|
|
1395
|
+
* @param {*} value The value to check.
|
|
1396
|
+
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
1397
|
+
*/
|
|
1398
|
+
function isHostObject(value) {
|
|
1399
|
+
// Many host objects are `Object` objects that can coerce to strings
|
|
1400
|
+
// despite having improperly defined `toString` methods.
|
|
1401
|
+
var result = false;
|
|
1402
|
+
if (value != null && typeof value.toString != 'function') {
|
|
1403
|
+
try {
|
|
1404
|
+
result = !!(value + '');
|
|
1405
|
+
} catch (e) {}
|
|
1406
|
+
}
|
|
1407
|
+
return result;
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
/**
|
|
1411
|
+
* Creates a unary function that invokes `func` with its argument transformed.
|
|
1412
|
+
*
|
|
1413
|
+
* @private
|
|
1414
|
+
* @param {Function} func The function to wrap.
|
|
1415
|
+
* @param {Function} transform The argument transform.
|
|
1416
|
+
* @returns {Function} Returns the new function.
|
|
1417
|
+
*/
|
|
1418
|
+
function overArg(func, transform) {
|
|
1419
|
+
return function(arg) {
|
|
1420
|
+
return func(transform(arg));
|
|
1421
|
+
};
|
|
1422
|
+
}
|
|
1423
|
+
|
|
1424
|
+
/** Used for built-in method references. */
|
|
1425
|
+
var funcProto = Function.prototype,
|
|
1426
|
+
objectProto = Object.prototype;
|
|
1427
|
+
|
|
1428
|
+
/** Used to detect overreaching core-js shims. */
|
|
1429
|
+
var coreJsData = root['__core-js_shared__'];
|
|
1430
|
+
|
|
1431
|
+
/** Used to detect methods masquerading as native. */
|
|
1432
|
+
var maskSrcKey = (function() {
|
|
1433
|
+
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
|
|
1434
|
+
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
1435
|
+
}());
|
|
1436
|
+
|
|
1437
|
+
/** Used to resolve the decompiled source of functions. */
|
|
1438
|
+
var funcToString = funcProto.toString;
|
|
1439
|
+
|
|
1440
|
+
/** Used to check objects for own properties. */
|
|
1441
|
+
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
1442
|
+
|
|
1443
|
+
/**
|
|
1444
|
+
* Used to resolve the
|
|
1445
|
+
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
1446
|
+
* of values.
|
|
1447
|
+
*/
|
|
1448
|
+
var objectToString = objectProto.toString;
|
|
1449
|
+
|
|
1450
|
+
/** Used to detect if a method is native. */
|
|
1451
|
+
var reIsNative = RegExp('^' +
|
|
1452
|
+
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
1453
|
+
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
1454
|
+
);
|
|
1455
|
+
|
|
1456
|
+
/** Built-in value references. */
|
|
1457
|
+
var Buffer = moduleExports ? root.Buffer : undefined,
|
|
1458
|
+
propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
|
1459
|
+
|
|
1460
|
+
/* Built-in method references for those with the same name as other `lodash` methods. */
|
|
1461
|
+
var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
|
|
1462
|
+
nativeKeys = overArg(Object.keys, Object);
|
|
1463
|
+
|
|
1464
|
+
/* Built-in method references that are verified to be native. */
|
|
1465
|
+
var DataView = getNative(root, 'DataView'),
|
|
1466
|
+
Map = getNative(root, 'Map'),
|
|
1467
|
+
Promise = getNative(root, 'Promise'),
|
|
1468
|
+
Set = getNative(root, 'Set'),
|
|
1469
|
+
WeakMap = getNative(root, 'WeakMap');
|
|
1470
|
+
|
|
1471
|
+
/** Detect if properties shadowing those on `Object.prototype` are non-enumerable. */
|
|
1472
|
+
var nonEnumShadows = !propertyIsEnumerable.call({ 'valueOf': 1 }, 'valueOf');
|
|
1473
|
+
|
|
1474
|
+
/** Used to detect maps, sets, and weakmaps. */
|
|
1475
|
+
var dataViewCtorString = toSource(DataView),
|
|
1476
|
+
mapCtorString = toSource(Map),
|
|
1477
|
+
promiseCtorString = toSource(Promise),
|
|
1478
|
+
setCtorString = toSource(Set),
|
|
1479
|
+
weakMapCtorString = toSource(WeakMap);
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
* The base implementation of `getTag`.
|
|
1483
|
+
*
|
|
1484
|
+
* @private
|
|
1485
|
+
* @param {*} value The value to query.
|
|
1486
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1487
|
+
*/
|
|
1488
|
+
function baseGetTag(value) {
|
|
1489
|
+
return objectToString.call(value);
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
/**
|
|
1493
|
+
* The base implementation of `_.isNative` without bad shim checks.
|
|
1494
|
+
*
|
|
1495
|
+
* @private
|
|
1496
|
+
* @param {*} value The value to check.
|
|
1497
|
+
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
1498
|
+
* else `false`.
|
|
1499
|
+
*/
|
|
1500
|
+
function baseIsNative(value) {
|
|
1501
|
+
if (!isObject(value) || isMasked(value)) {
|
|
1502
|
+
return false;
|
|
1503
|
+
}
|
|
1504
|
+
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
1505
|
+
return pattern.test(toSource(value));
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Gets the native function at `key` of `object`.
|
|
1510
|
+
*
|
|
1511
|
+
* @private
|
|
1512
|
+
* @param {Object} object The object to query.
|
|
1513
|
+
* @param {string} key The key of the method to get.
|
|
1514
|
+
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
1515
|
+
*/
|
|
1516
|
+
function getNative(object, key) {
|
|
1517
|
+
var value = getValue(object, key);
|
|
1518
|
+
return baseIsNative(value) ? value : undefined;
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* Gets the `toStringTag` of `value`.
|
|
1523
|
+
*
|
|
1524
|
+
* @private
|
|
1525
|
+
* @param {*} value The value to query.
|
|
1526
|
+
* @returns {string} Returns the `toStringTag`.
|
|
1527
|
+
*/
|
|
1528
|
+
var getTag = baseGetTag;
|
|
1529
|
+
|
|
1530
|
+
// Fallback for data views, maps, sets, and weak maps in IE 11,
|
|
1531
|
+
// for data views in Edge < 14, and promises in Node.js.
|
|
1532
|
+
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
|
|
1533
|
+
(Map && getTag(new Map) != mapTag) ||
|
|
1534
|
+
(Promise && getTag(Promise.resolve()) != promiseTag) ||
|
|
1535
|
+
(Set && getTag(new Set) != setTag) ||
|
|
1536
|
+
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
|
|
1537
|
+
getTag = function(value) {
|
|
1538
|
+
var result = objectToString.call(value),
|
|
1539
|
+
Ctor = result == objectTag ? value.constructor : undefined,
|
|
1540
|
+
ctorString = Ctor ? toSource(Ctor) : undefined;
|
|
1541
|
+
|
|
1542
|
+
if (ctorString) {
|
|
1543
|
+
switch (ctorString) {
|
|
1544
|
+
case dataViewCtorString: return dataViewTag;
|
|
1545
|
+
case mapCtorString: return mapTag;
|
|
1546
|
+
case promiseCtorString: return promiseTag;
|
|
1547
|
+
case setCtorString: return setTag;
|
|
1548
|
+
case weakMapCtorString: return weakMapTag;
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
return result;
|
|
1552
|
+
};
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Checks if `func` has its source masked.
|
|
1557
|
+
*
|
|
1558
|
+
* @private
|
|
1559
|
+
* @param {Function} func The function to check.
|
|
1560
|
+
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
1561
|
+
*/
|
|
1562
|
+
function isMasked(func) {
|
|
1563
|
+
return !!maskSrcKey && (maskSrcKey in func);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
/**
|
|
1567
|
+
* Checks if `value` is likely a prototype object.
|
|
1568
|
+
*
|
|
1569
|
+
* @private
|
|
1570
|
+
* @param {*} value The value to check.
|
|
1571
|
+
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
|
|
1572
|
+
*/
|
|
1573
|
+
function isPrototype(value) {
|
|
1574
|
+
var Ctor = value && value.constructor,
|
|
1575
|
+
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
|
|
1576
|
+
|
|
1577
|
+
return value === proto;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
/**
|
|
1581
|
+
* Converts `func` to its source code.
|
|
1582
|
+
*
|
|
1583
|
+
* @private
|
|
1584
|
+
* @param {Function} func The function to process.
|
|
1585
|
+
* @returns {string} Returns the source code.
|
|
1586
|
+
*/
|
|
1587
|
+
function toSource(func) {
|
|
1588
|
+
if (func != null) {
|
|
1589
|
+
try {
|
|
1590
|
+
return funcToString.call(func);
|
|
1591
|
+
} catch (e) {}
|
|
1592
|
+
try {
|
|
1593
|
+
return (func + '');
|
|
1594
|
+
} catch (e) {}
|
|
1595
|
+
}
|
|
1596
|
+
return '';
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
/**
|
|
1600
|
+
* Checks if `value` is likely an `arguments` object.
|
|
1601
|
+
*
|
|
1602
|
+
* @static
|
|
1603
|
+
* @memberOf _
|
|
1604
|
+
* @since 0.1.0
|
|
1605
|
+
* @category Lang
|
|
1606
|
+
* @param {*} value The value to check.
|
|
1607
|
+
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
|
|
1608
|
+
* else `false`.
|
|
1609
|
+
* @example
|
|
1610
|
+
*
|
|
1611
|
+
* _.isArguments(function() { return arguments; }());
|
|
1612
|
+
* // => true
|
|
1613
|
+
*
|
|
1614
|
+
* _.isArguments([1, 2, 3]);
|
|
1615
|
+
* // => false
|
|
1616
|
+
*/
|
|
1617
|
+
function isArguments(value) {
|
|
1618
|
+
// Safari 8.1 makes `arguments.callee` enumerable in strict mode.
|
|
1619
|
+
return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
|
|
1620
|
+
(!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
|
|
1621
|
+
}
|
|
1622
|
+
|
|
1623
|
+
/**
|
|
1624
|
+
* Checks if `value` is classified as an `Array` object.
|
|
1625
|
+
*
|
|
1626
|
+
* @static
|
|
1627
|
+
* @memberOf _
|
|
1628
|
+
* @since 0.1.0
|
|
1629
|
+
* @category Lang
|
|
1630
|
+
* @param {*} value The value to check.
|
|
1631
|
+
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
|
|
1632
|
+
* @example
|
|
1633
|
+
*
|
|
1634
|
+
* _.isArray([1, 2, 3]);
|
|
1635
|
+
* // => true
|
|
1636
|
+
*
|
|
1637
|
+
* _.isArray(document.body.children);
|
|
1638
|
+
* // => false
|
|
1639
|
+
*
|
|
1640
|
+
* _.isArray('abc');
|
|
1641
|
+
* // => false
|
|
1642
|
+
*
|
|
1643
|
+
* _.isArray(_.noop);
|
|
1644
|
+
* // => false
|
|
1645
|
+
*/
|
|
1646
|
+
var isArray = Array.isArray;
|
|
1647
|
+
|
|
1648
|
+
/**
|
|
1649
|
+
* Checks if `value` is array-like. A value is considered array-like if it's
|
|
1650
|
+
* not a function and has a `value.length` that's an integer greater than or
|
|
1651
|
+
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
|
|
1652
|
+
*
|
|
1653
|
+
* @static
|
|
1654
|
+
* @memberOf _
|
|
1655
|
+
* @since 4.0.0
|
|
1656
|
+
* @category Lang
|
|
1657
|
+
* @param {*} value The value to check.
|
|
1658
|
+
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
|
|
1659
|
+
* @example
|
|
1660
|
+
*
|
|
1661
|
+
* _.isArrayLike([1, 2, 3]);
|
|
1662
|
+
* // => true
|
|
1663
|
+
*
|
|
1664
|
+
* _.isArrayLike(document.body.children);
|
|
1665
|
+
* // => true
|
|
1666
|
+
*
|
|
1667
|
+
* _.isArrayLike('abc');
|
|
1668
|
+
* // => true
|
|
1669
|
+
*
|
|
1670
|
+
* _.isArrayLike(_.noop);
|
|
1671
|
+
* // => false
|
|
1672
|
+
*/
|
|
1673
|
+
function isArrayLike(value) {
|
|
1674
|
+
return value != null && isLength(value.length) && !isFunction(value);
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/**
|
|
1678
|
+
* This method is like `_.isArrayLike` except that it also checks if `value`
|
|
1679
|
+
* is an object.
|
|
1680
|
+
*
|
|
1681
|
+
* @static
|
|
1682
|
+
* @memberOf _
|
|
1683
|
+
* @since 4.0.0
|
|
1684
|
+
* @category Lang
|
|
1685
|
+
* @param {*} value The value to check.
|
|
1686
|
+
* @returns {boolean} Returns `true` if `value` is an array-like object,
|
|
1687
|
+
* else `false`.
|
|
1688
|
+
* @example
|
|
1689
|
+
*
|
|
1690
|
+
* _.isArrayLikeObject([1, 2, 3]);
|
|
1691
|
+
* // => true
|
|
1692
|
+
*
|
|
1693
|
+
* _.isArrayLikeObject(document.body.children);
|
|
1694
|
+
* // => true
|
|
1695
|
+
*
|
|
1696
|
+
* _.isArrayLikeObject('abc');
|
|
1697
|
+
* // => false
|
|
1698
|
+
*
|
|
1699
|
+
* _.isArrayLikeObject(_.noop);
|
|
1700
|
+
* // => false
|
|
1701
|
+
*/
|
|
1702
|
+
function isArrayLikeObject(value) {
|
|
1703
|
+
return isObjectLike(value) && isArrayLike(value);
|
|
1704
|
+
}
|
|
1705
|
+
|
|
1706
|
+
/**
|
|
1707
|
+
* Checks if `value` is a buffer.
|
|
1708
|
+
*
|
|
1709
|
+
* @static
|
|
1710
|
+
* @memberOf _
|
|
1711
|
+
* @since 4.3.0
|
|
1712
|
+
* @category Lang
|
|
1713
|
+
* @param {*} value The value to check.
|
|
1714
|
+
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
|
|
1715
|
+
* @example
|
|
1716
|
+
*
|
|
1717
|
+
* _.isBuffer(new Buffer(2));
|
|
1718
|
+
* // => true
|
|
1719
|
+
*
|
|
1720
|
+
* _.isBuffer(new Uint8Array(2));
|
|
1721
|
+
* // => false
|
|
1722
|
+
*/
|
|
1723
|
+
var isBuffer = nativeIsBuffer || stubFalse;
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* Checks if `value` is an empty object, collection, map, or set.
|
|
1727
|
+
*
|
|
1728
|
+
* Objects are considered empty if they have no own enumerable string keyed
|
|
1729
|
+
* properties.
|
|
1730
|
+
*
|
|
1731
|
+
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
|
|
1732
|
+
* jQuery-like collections are considered empty if they have a `length` of `0`.
|
|
1733
|
+
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
|
|
1734
|
+
*
|
|
1735
|
+
* @static
|
|
1736
|
+
* @memberOf _
|
|
1737
|
+
* @since 0.1.0
|
|
1738
|
+
* @category Lang
|
|
1739
|
+
* @param {*} value The value to check.
|
|
1740
|
+
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
|
|
1741
|
+
* @example
|
|
1742
|
+
*
|
|
1743
|
+
* _.isEmpty(null);
|
|
1744
|
+
* // => true
|
|
1745
|
+
*
|
|
1746
|
+
* _.isEmpty(true);
|
|
1747
|
+
* // => true
|
|
1748
|
+
*
|
|
1749
|
+
* _.isEmpty(1);
|
|
1750
|
+
* // => true
|
|
1751
|
+
*
|
|
1752
|
+
* _.isEmpty([1, 2, 3]);
|
|
1753
|
+
* // => false
|
|
1754
|
+
*
|
|
1755
|
+
* _.isEmpty({ 'a': 1 });
|
|
1756
|
+
* // => false
|
|
1757
|
+
*/
|
|
1758
|
+
function isEmpty(value) {
|
|
1759
|
+
if (isArrayLike(value) &&
|
|
1760
|
+
(isArray(value) || typeof value == 'string' ||
|
|
1761
|
+
typeof value.splice == 'function' || isBuffer(value) || isArguments(value))) {
|
|
1762
|
+
return !value.length;
|
|
1763
|
+
}
|
|
1764
|
+
var tag = getTag(value);
|
|
1765
|
+
if (tag == mapTag || tag == setTag) {
|
|
1766
|
+
return !value.size;
|
|
1767
|
+
}
|
|
1768
|
+
if (nonEnumShadows || isPrototype(value)) {
|
|
1769
|
+
return !nativeKeys(value).length;
|
|
1770
|
+
}
|
|
1771
|
+
for (var key in value) {
|
|
1772
|
+
if (hasOwnProperty.call(value, key)) {
|
|
1773
|
+
return false;
|
|
1774
|
+
}
|
|
1775
|
+
}
|
|
1776
|
+
return true;
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
/**
|
|
1780
|
+
* Checks if `value` is classified as a `Function` object.
|
|
1781
|
+
*
|
|
1782
|
+
* @static
|
|
1783
|
+
* @memberOf _
|
|
1784
|
+
* @since 0.1.0
|
|
1785
|
+
* @category Lang
|
|
1786
|
+
* @param {*} value The value to check.
|
|
1787
|
+
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
1788
|
+
* @example
|
|
1789
|
+
*
|
|
1790
|
+
* _.isFunction(_);
|
|
1791
|
+
* // => true
|
|
1792
|
+
*
|
|
1793
|
+
* _.isFunction(/abc/);
|
|
1794
|
+
* // => false
|
|
1795
|
+
*/
|
|
1796
|
+
function isFunction(value) {
|
|
1797
|
+
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
1798
|
+
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
1799
|
+
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
1800
|
+
return tag == funcTag || tag == genTag;
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
/**
|
|
1804
|
+
* Checks if `value` is a valid array-like length.
|
|
1805
|
+
*
|
|
1806
|
+
* **Note:** This method is loosely based on
|
|
1807
|
+
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
|
|
1808
|
+
*
|
|
1809
|
+
* @static
|
|
1810
|
+
* @memberOf _
|
|
1811
|
+
* @since 4.0.0
|
|
1812
|
+
* @category Lang
|
|
1813
|
+
* @param {*} value The value to check.
|
|
1814
|
+
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
|
|
1815
|
+
* @example
|
|
1816
|
+
*
|
|
1817
|
+
* _.isLength(3);
|
|
1818
|
+
* // => true
|
|
1819
|
+
*
|
|
1820
|
+
* _.isLength(Number.MIN_VALUE);
|
|
1821
|
+
* // => false
|
|
1822
|
+
*
|
|
1823
|
+
* _.isLength(Infinity);
|
|
1824
|
+
* // => false
|
|
1825
|
+
*
|
|
1826
|
+
* _.isLength('3');
|
|
1827
|
+
* // => false
|
|
1828
|
+
*/
|
|
1829
|
+
function isLength(value) {
|
|
1830
|
+
return typeof value == 'number' &&
|
|
1831
|
+
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
/**
|
|
1835
|
+
* Checks if `value` is the
|
|
1836
|
+
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
1837
|
+
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
1838
|
+
*
|
|
1839
|
+
* @static
|
|
1840
|
+
* @memberOf _
|
|
1841
|
+
* @since 0.1.0
|
|
1842
|
+
* @category Lang
|
|
1843
|
+
* @param {*} value The value to check.
|
|
1844
|
+
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
1845
|
+
* @example
|
|
1846
|
+
*
|
|
1847
|
+
* _.isObject({});
|
|
1848
|
+
* // => true
|
|
1849
|
+
*
|
|
1850
|
+
* _.isObject([1, 2, 3]);
|
|
1851
|
+
* // => true
|
|
1852
|
+
*
|
|
1853
|
+
* _.isObject(_.noop);
|
|
1854
|
+
* // => true
|
|
1855
|
+
*
|
|
1856
|
+
* _.isObject(null);
|
|
1857
|
+
* // => false
|
|
1858
|
+
*/
|
|
1859
|
+
function isObject(value) {
|
|
1860
|
+
var type = typeof value;
|
|
1861
|
+
return !!value && (type == 'object' || type == 'function');
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
/**
|
|
1865
|
+
* Checks if `value` is object-like. A value is object-like if it's not `null`
|
|
1866
|
+
* and has a `typeof` result of "object".
|
|
1867
|
+
*
|
|
1868
|
+
* @static
|
|
1869
|
+
* @memberOf _
|
|
1870
|
+
* @since 4.0.0
|
|
1871
|
+
* @category Lang
|
|
1872
|
+
* @param {*} value The value to check.
|
|
1873
|
+
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
|
|
1874
|
+
* @example
|
|
1875
|
+
*
|
|
1876
|
+
* _.isObjectLike({});
|
|
1877
|
+
* // => true
|
|
1878
|
+
*
|
|
1879
|
+
* _.isObjectLike([1, 2, 3]);
|
|
1880
|
+
* // => true
|
|
1881
|
+
*
|
|
1882
|
+
* _.isObjectLike(_.noop);
|
|
1883
|
+
* // => false
|
|
1884
|
+
*
|
|
1885
|
+
* _.isObjectLike(null);
|
|
1886
|
+
* // => false
|
|
1887
|
+
*/
|
|
1888
|
+
function isObjectLike(value) {
|
|
1889
|
+
return !!value && typeof value == 'object';
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
/**
|
|
1893
|
+
* This method returns `false`.
|
|
1894
|
+
*
|
|
1895
|
+
* @static
|
|
1896
|
+
* @memberOf _
|
|
1897
|
+
* @since 4.13.0
|
|
1898
|
+
* @category Util
|
|
1899
|
+
* @returns {boolean} Returns `false`.
|
|
1900
|
+
* @example
|
|
1901
|
+
*
|
|
1902
|
+
* _.times(2, _.stubFalse);
|
|
1903
|
+
* // => [false, false]
|
|
1904
|
+
*/
|
|
1905
|
+
function stubFalse() {
|
|
1906
|
+
return false;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
module.exports = isEmpty;
|
|
1910
|
+
}(lodash_isempty$1, lodash_isempty$1.exports));
|
|
1911
|
+
|
|
1912
|
+
var lodash_isempty = lodash_isempty$1.exports;
|
|
1913
|
+
|
|
1914
|
+
var isEmptyImport = /*#__PURE__*/Object.freeze(/*#__PURE__*/_mergeNamespaces({
|
|
1915
|
+
__proto__: null,
|
|
1916
|
+
'default': lodash_isempty
|
|
1917
|
+
}, [lodash_isempty$1.exports]));
|
|
1918
|
+
|
|
1919
|
+
var __values$6 = (undefined && undefined.__values) || function(o) {
|
|
1920
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1921
|
+
if (m) return m.call(o);
|
|
1922
|
+
if (o && typeof o.length === "number") return {
|
|
1923
|
+
next: function () {
|
|
1924
|
+
if (o && i >= o.length) o = void 0;
|
|
1925
|
+
return { value: o && o[i++], done: !o };
|
|
1926
|
+
}
|
|
1927
|
+
};
|
|
1928
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1929
|
+
};
|
|
1930
|
+
var __read$2 = (undefined && undefined.__read) || function (o, n) {
|
|
1931
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1932
|
+
if (!m) return o;
|
|
1933
|
+
var i = m.call(o), r, ar = [], e;
|
|
1934
|
+
try {
|
|
1935
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
1936
|
+
}
|
|
1937
|
+
catch (error) { e = { error: error }; }
|
|
1938
|
+
finally {
|
|
1939
|
+
try {
|
|
1940
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
1941
|
+
}
|
|
1942
|
+
finally { if (e) throw e.error; }
|
|
1943
|
+
}
|
|
1944
|
+
return ar;
|
|
1945
|
+
};
|
|
1946
|
+
var isNil = lodash_isnil || isNilImport;
|
|
1947
|
+
var isEmpty$1 = lodash_isempty || isEmptyImport;
|
|
1948
|
+
/**
|
|
1949
|
+
* Get the value at `path` starting from `object`.
|
|
1950
|
+
* Allows optional chaining, e.g. `get(obj, 'a.b?.c')`
|
|
1951
|
+
*/
|
|
1952
|
+
function getPath(object, path, defaultValue, allOptional) {
|
|
1953
|
+
var e_1, _a, _b;
|
|
1954
|
+
if (allOptional === void 0) { allOptional = false; }
|
|
1955
|
+
if (isEmpty$1(path)) {
|
|
1956
|
+
return object;
|
|
1957
|
+
}
|
|
1958
|
+
var value = object;
|
|
1959
|
+
try {
|
|
1960
|
+
for (var _c = __values$6(crumblePath(path)), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
1961
|
+
var crumb = _d.value;
|
|
1962
|
+
var key = crumb;
|
|
1963
|
+
var optional = void 0;
|
|
1964
|
+
if (typeof crumb === "string") {
|
|
1965
|
+
_b = __read$2(/^([^?]+)(\?)?$/.exec(crumb), 3), key = _b[1], optional = _b[2];
|
|
1966
|
+
}
|
|
1967
|
+
value = value[key];
|
|
1968
|
+
if (isNil(value) && (optional || allOptional)) {
|
|
1969
|
+
return defaultValue;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1974
|
+
finally {
|
|
1975
|
+
try {
|
|
1976
|
+
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
1977
|
+
}
|
|
1978
|
+
finally { if (e_1) throw e_1.error; }
|
|
1979
|
+
}
|
|
1980
|
+
return isNil(value) ? defaultValue : value;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
var __values$5 = (undefined && undefined.__values) || function(o) {
|
|
1984
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
1985
|
+
if (m) return m.call(o);
|
|
1986
|
+
if (o && typeof o.length === "number") return {
|
|
1987
|
+
next: function () {
|
|
1988
|
+
if (o && i >= o.length) o = void 0;
|
|
1989
|
+
return { value: o && o[i++], done: !o };
|
|
1990
|
+
}
|
|
1991
|
+
};
|
|
1992
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
1993
|
+
};
|
|
1994
|
+
/*
|
|
1995
|
+
* Return a copy of `obj` without the key `key`
|
|
1996
|
+
*/
|
|
1997
|
+
function omit(obj) {
|
|
1998
|
+
var e_1, _a;
|
|
1999
|
+
var keys = [];
|
|
2000
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2001
|
+
keys[_i - 1] = arguments[_i];
|
|
2002
|
+
}
|
|
2003
|
+
var keySet = new Set(keys);
|
|
2004
|
+
var result = {};
|
|
2005
|
+
try {
|
|
2006
|
+
for (var _b = __values$5(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2007
|
+
var k = _c.value;
|
|
2008
|
+
if (!keySet.has(k)) {
|
|
2009
|
+
result[k] = obj[k];
|
|
2010
|
+
}
|
|
2011
|
+
}
|
|
2012
|
+
}
|
|
2013
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2014
|
+
finally {
|
|
2015
|
+
try {
|
|
2016
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2017
|
+
}
|
|
2018
|
+
finally { if (e_1) throw e_1.error; }
|
|
2019
|
+
}
|
|
2020
|
+
return result;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
var __values$4 = (undefined && undefined.__values) || function(o) {
|
|
2024
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2025
|
+
if (m) return m.call(o);
|
|
2026
|
+
if (o && typeof o.length === "number") return {
|
|
2027
|
+
next: function () {
|
|
2028
|
+
if (o && i >= o.length) o = void 0;
|
|
2029
|
+
return { value: o && o[i++], done: !o };
|
|
2030
|
+
}
|
|
2031
|
+
};
|
|
2032
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2033
|
+
};
|
|
2034
|
+
var isEmpty = lodash_isempty || isEmptyImport;
|
|
2035
|
+
/** Set the value at `path` on `object`. */
|
|
2036
|
+
function setPath(object, path, newValue) {
|
|
2037
|
+
var e_1, _a;
|
|
2038
|
+
if (typeof object !== "object") {
|
|
2039
|
+
throw new Error("object is required");
|
|
2040
|
+
}
|
|
2041
|
+
if (isEmpty(path)) {
|
|
2042
|
+
throw new Error("path is required");
|
|
2043
|
+
}
|
|
2044
|
+
var crumbs = crumblePath(path);
|
|
2045
|
+
var finalCrumb = crumbs.splice(crumbs.length - 1, 1)[0];
|
|
2046
|
+
var current = object;
|
|
2047
|
+
try {
|
|
2048
|
+
for (var crumbs_1 = __values$4(crumbs), crumbs_1_1 = crumbs_1.next(); !crumbs_1_1.done; crumbs_1_1 = crumbs_1.next()) {
|
|
2049
|
+
var crumb = crumbs_1_1.value;
|
|
2050
|
+
current = current[crumb];
|
|
2051
|
+
if (typeof current !== "object") {
|
|
2052
|
+
throw new Error("Cannot set value at given path: Path deadends at " + String(crumb));
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2057
|
+
finally {
|
|
2058
|
+
try {
|
|
2059
|
+
if (crumbs_1_1 && !crumbs_1_1.done && (_a = crumbs_1.return)) _a.call(crumbs_1);
|
|
2060
|
+
}
|
|
2061
|
+
finally { if (e_1) throw e_1.error; }
|
|
2062
|
+
}
|
|
2063
|
+
current[finalCrumb] = newValue;
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
2067
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
2068
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
2069
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
2070
|
+
function step(op) {
|
|
2071
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
2072
|
+
while (_) try {
|
|
2073
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
2074
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
2075
|
+
switch (op[0]) {
|
|
2076
|
+
case 0: case 1: t = op; break;
|
|
2077
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
2078
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
2079
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
2080
|
+
default:
|
|
2081
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
2082
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
2083
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
2084
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
2085
|
+
if (t[2]) _.ops.pop();
|
|
2086
|
+
_.trys.pop(); continue;
|
|
2087
|
+
}
|
|
2088
|
+
op = body.call(thisArg, _);
|
|
2089
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2090
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2091
|
+
}
|
|
2092
|
+
};
|
|
2093
|
+
var __values$3 = (undefined && undefined.__values) || function(o) {
|
|
2094
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2095
|
+
if (m) return m.call(o);
|
|
2096
|
+
if (o && typeof o.length === "number") return {
|
|
2097
|
+
next: function () {
|
|
2098
|
+
if (o && i >= o.length) o = void 0;
|
|
2099
|
+
return { value: o && o[i++], done: !o };
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2103
|
+
};
|
|
2104
|
+
/** Generator for iterating down a path on an object. */
|
|
2105
|
+
function traversePath(object, path) {
|
|
2106
|
+
var obj, _a, _b, crumb, e_1_1;
|
|
2107
|
+
var e_1, _c;
|
|
2108
|
+
return __generator(this, function (_d) {
|
|
2109
|
+
switch (_d.label) {
|
|
2110
|
+
case 0: return [4 /*yield*/, object];
|
|
2111
|
+
case 1:
|
|
2112
|
+
_d.sent();
|
|
2113
|
+
obj = object;
|
|
2114
|
+
_d.label = 2;
|
|
2115
|
+
case 2:
|
|
2116
|
+
_d.trys.push([2, 7, 8, 9]);
|
|
2117
|
+
_a = __values$3(crumblePath(path)), _b = _a.next();
|
|
2118
|
+
_d.label = 3;
|
|
2119
|
+
case 3:
|
|
2120
|
+
if (!!_b.done) return [3 /*break*/, 6];
|
|
2121
|
+
crumb = _b.value;
|
|
2122
|
+
obj = obj[crumb];
|
|
2123
|
+
return [4 /*yield*/, obj];
|
|
2124
|
+
case 4:
|
|
2125
|
+
_d.sent();
|
|
2126
|
+
_d.label = 5;
|
|
2127
|
+
case 5:
|
|
2128
|
+
_b = _a.next();
|
|
2129
|
+
return [3 /*break*/, 3];
|
|
2130
|
+
case 6: return [3 /*break*/, 9];
|
|
2131
|
+
case 7:
|
|
2132
|
+
e_1_1 = _d.sent();
|
|
2133
|
+
e_1 = { error: e_1_1 };
|
|
2134
|
+
return [3 /*break*/, 9];
|
|
2135
|
+
case 8:
|
|
2136
|
+
try {
|
|
2137
|
+
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
2138
|
+
}
|
|
2139
|
+
finally { if (e_1) throw e_1.error; }
|
|
2140
|
+
return [7 /*endfinally*/];
|
|
2141
|
+
case 9: return [2 /*return*/];
|
|
2142
|
+
}
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2146
|
+
var __values$2 = (undefined && undefined.__values) || function(o) {
|
|
2147
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2148
|
+
if (m) return m.call(o);
|
|
2149
|
+
if (o && typeof o.length === "number") return {
|
|
2150
|
+
next: function () {
|
|
2151
|
+
if (o && i >= o.length) o = void 0;
|
|
2152
|
+
return { value: o && o[i++], done: !o };
|
|
2153
|
+
}
|
|
2154
|
+
};
|
|
2155
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2156
|
+
};
|
|
2157
|
+
/**
|
|
2158
|
+
* Recursive merge of any number of objects
|
|
2159
|
+
*/
|
|
2160
|
+
function mergeDeep() {
|
|
2161
|
+
var e_1, _a, e_2, _b;
|
|
2162
|
+
var objectsToMerge = [];
|
|
2163
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2164
|
+
objectsToMerge[_i] = arguments[_i];
|
|
2165
|
+
}
|
|
2166
|
+
var result = {};
|
|
2167
|
+
try {
|
|
2168
|
+
for (var objectsToMerge_1 = __values$2(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2169
|
+
var mergee = objectsToMerge_1_1.value;
|
|
2170
|
+
try {
|
|
2171
|
+
for (var _c = (e_2 = void 0, __values$2(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2172
|
+
var key = _d.value;
|
|
2173
|
+
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2174
|
+
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2175
|
+
&& lodash_isplainobject(result[key])) {
|
|
2176
|
+
result[key] = mergeDeep(result[key], mergee[key]);
|
|
2177
|
+
}
|
|
2178
|
+
else if (lodash_isplainobject(mergee[key])) {
|
|
2179
|
+
result[key] = mergeDeep({}, mergee[key]);
|
|
2180
|
+
}
|
|
2181
|
+
else {
|
|
2182
|
+
result[key] = mergee[key];
|
|
2183
|
+
}
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2187
|
+
finally {
|
|
2188
|
+
try {
|
|
2189
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2190
|
+
}
|
|
2191
|
+
finally { if (e_2) throw e_2.error; }
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
}
|
|
2195
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2196
|
+
finally {
|
|
2197
|
+
try {
|
|
2198
|
+
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2199
|
+
}
|
|
2200
|
+
finally { if (e_1) throw e_1.error; }
|
|
2201
|
+
}
|
|
2202
|
+
return result;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
var __values$1 = (undefined && undefined.__values) || function(o) {
|
|
2206
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2207
|
+
if (m) return m.call(o);
|
|
2208
|
+
if (o && typeof o.length === "number") return {
|
|
2209
|
+
next: function () {
|
|
2210
|
+
if (o && i >= o.length) o = void 0;
|
|
2211
|
+
return { value: o && o[i++], done: !o };
|
|
2212
|
+
}
|
|
2213
|
+
};
|
|
2214
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2215
|
+
};
|
|
2216
|
+
/**
|
|
2217
|
+
* Recursive merge of any number of objects using `copyProperty()` rather than assignment
|
|
2218
|
+
*/
|
|
2219
|
+
function mergePropertiesDeep() {
|
|
2220
|
+
var e_1, _a, e_2, _b;
|
|
2221
|
+
var objectsToMerge = [];
|
|
2222
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
2223
|
+
objectsToMerge[_i] = arguments[_i];
|
|
2224
|
+
}
|
|
2225
|
+
var result = {};
|
|
2226
|
+
try {
|
|
2227
|
+
for (var objectsToMerge_1 = __values$1(objectsToMerge), objectsToMerge_1_1 = objectsToMerge_1.next(); !objectsToMerge_1_1.done; objectsToMerge_1_1 = objectsToMerge_1.next()) {
|
|
2228
|
+
var mergee = objectsToMerge_1_1.value;
|
|
2229
|
+
try {
|
|
2230
|
+
for (var _c = (e_2 = void 0, __values$1(Object.keys(mergee))), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
2231
|
+
var key = _d.value;
|
|
2232
|
+
if (Object.prototype.hasOwnProperty.call(result, key)
|
|
2233
|
+
&& Object.getOwnPropertyDescriptor(result, key).writable
|
|
2234
|
+
&& lodash_isplainobject(result[key])) {
|
|
2235
|
+
result[key] = mergePropertiesDeep(result[key], mergee[key]);
|
|
2236
|
+
}
|
|
2237
|
+
else if (lodash_isplainobject(mergee[key])) {
|
|
2238
|
+
result[key] = mergePropertiesDeep({}, mergee[key]);
|
|
2239
|
+
}
|
|
2240
|
+
else {
|
|
2241
|
+
copyProperty(key, mergee, result);
|
|
2242
|
+
}
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
2246
|
+
finally {
|
|
2247
|
+
try {
|
|
2248
|
+
if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
|
|
2249
|
+
}
|
|
2250
|
+
finally { if (e_2) throw e_2.error; }
|
|
2251
|
+
}
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2255
|
+
finally {
|
|
2256
|
+
try {
|
|
2257
|
+
if (objectsToMerge_1_1 && !objectsToMerge_1_1.done && (_a = objectsToMerge_1.return)) _a.call(objectsToMerge_1);
|
|
2258
|
+
}
|
|
2259
|
+
finally { if (e_1) throw e_1.error; }
|
|
2260
|
+
}
|
|
2261
|
+
return result;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
var __values = (undefined && undefined.__values) || function(o) {
|
|
2265
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2266
|
+
if (m) return m.call(o);
|
|
2267
|
+
if (o && typeof o.length === "number") return {
|
|
2268
|
+
next: function () {
|
|
2269
|
+
if (o && i >= o.length) o = void 0;
|
|
2270
|
+
return { value: o && o[i++], done: !o };
|
|
2271
|
+
}
|
|
2272
|
+
};
|
|
2273
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2274
|
+
};
|
|
2275
|
+
/** Returns the values of an object. */
|
|
2276
|
+
function values(object) {
|
|
2277
|
+
var e_1, _a;
|
|
2278
|
+
var vals = [];
|
|
2279
|
+
try {
|
|
2280
|
+
for (var _b = __values(Object.keys(object)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2281
|
+
var key = _c.value;
|
|
2282
|
+
vals.push(object[key]);
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2286
|
+
finally {
|
|
2287
|
+
try {
|
|
2288
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2289
|
+
}
|
|
2290
|
+
finally { if (e_1) throw e_1.error; }
|
|
2291
|
+
}
|
|
2292
|
+
return vals;
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
var __read$1 = (undefined && undefined.__read) || function (o, n) {
|
|
2296
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2297
|
+
if (!m) return o;
|
|
2298
|
+
var i = m.call(o), r, ar = [], e;
|
|
2299
|
+
try {
|
|
2300
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2301
|
+
}
|
|
2302
|
+
catch (error) { e = { error: error }; }
|
|
2303
|
+
finally {
|
|
2304
|
+
try {
|
|
2305
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2306
|
+
}
|
|
2307
|
+
finally { if (e) throw e.error; }
|
|
2308
|
+
}
|
|
2309
|
+
return ar;
|
|
2310
|
+
};
|
|
2311
|
+
var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
2312
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2313
|
+
if (ar || !(i in from)) {
|
|
2314
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
2315
|
+
ar[i] = from[i];
|
|
2316
|
+
}
|
|
2317
|
+
}
|
|
2318
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
2319
|
+
};
|
|
2320
|
+
/** Template tag function for making strings containing code blocks easier to deal with. */
|
|
2321
|
+
function code(strings) {
|
|
2322
|
+
var interpolations = [];
|
|
2323
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2324
|
+
interpolations[_i - 1] = arguments[_i];
|
|
2325
|
+
}
|
|
2326
|
+
var s = strings.reduce(function (a, b, i) { return "" + a + (i <= interpolations.length ? String(interpolations[i - 1]) : "") + b; });
|
|
2327
|
+
var leadingWhitespace = Math.min.apply(Math, __spreadArray([], __read$1(s.split(/[\r\n]/)
|
|
2328
|
+
.filter(function (l) { return l.trim(); })
|
|
2329
|
+
.map(function (l) { return (/^ */.exec(l))[0].length; })), false));
|
|
2330
|
+
return s.replace(new RegExp("^ {" + leadingWhitespace + "}", "gm"), "").trim();
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
var __read = (undefined && undefined.__read) || function (o, n) {
|
|
2334
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2335
|
+
if (!m) return o;
|
|
2336
|
+
var i = m.call(o), r, ar = [], e;
|
|
2337
|
+
try {
|
|
2338
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
2339
|
+
}
|
|
2340
|
+
catch (error) { e = { error: error }; }
|
|
2341
|
+
finally {
|
|
2342
|
+
try {
|
|
2343
|
+
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
2344
|
+
}
|
|
2345
|
+
finally { if (e) throw e.error; }
|
|
2346
|
+
}
|
|
2347
|
+
return ar;
|
|
2348
|
+
};
|
|
2349
|
+
/**
|
|
2350
|
+
* Parses a string as a file size and returns the size in bytes. For example,
|
|
2351
|
+
* `parseFileSize("2KB")` will return `2048`.
|
|
2352
|
+
*/
|
|
2353
|
+
function parseFileSize(fileSize) {
|
|
2354
|
+
var unitMatch = /[A-Z]?B$/.exec(fileSize);
|
|
2355
|
+
if (!unitMatch) {
|
|
2356
|
+
throw new Error("Input to parseFileSize (\"" + fileSize + "\") doesn't seem like a file size; "
|
|
2357
|
+
+ "cannot identify a unit (e.g. KB, GB)");
|
|
2358
|
+
}
|
|
2359
|
+
var _a = __read(unitMatch, 1), unit = _a[0];
|
|
2360
|
+
var num = Number(fileSize.replace(unit, ""));
|
|
2361
|
+
if (Number.isNaN(num)) {
|
|
2362
|
+
throw new Error("Could not parse a number out of input to parseFileSize (\"" + fileSize + "\")");
|
|
2363
|
+
}
|
|
2364
|
+
var magnitude = ["B",
|
|
2365
|
+
"KB",
|
|
2366
|
+
"MB",
|
|
2367
|
+
"GB",
|
|
2368
|
+
"TB",
|
|
2369
|
+
"PB"].indexOf(unit);
|
|
2370
|
+
if (magnitude === -1) {
|
|
2371
|
+
throw new Error("parseFileSize does not support units above PB");
|
|
2372
|
+
}
|
|
2373
|
+
return Math.ceil(num * (Math.pow(1024, magnitude)));
|
|
2374
|
+
}
|
|
2375
|
+
|
|
2376
|
+
var REGEX_REPLACEMENT = /(<%=|{{)(.+?)(%>|}})/g;
|
|
2377
|
+
var REGEX_IF = /<%\?(.+?)%>(.+?)<\/%>/g;
|
|
2378
|
+
var SYMBOL_TEMPLATE_SOURCE = Symbol("sps.utils.templateSrc");
|
|
2379
|
+
/**
|
|
2380
|
+
* Every string templating thing out there whether lodash, doT, handlebars, etc
|
|
2381
|
+
* is extremely complicated to cover a variety of use cases. This just has two
|
|
2382
|
+
* very simple features and great caution should be exercised in making it any more
|
|
2383
|
+
* complex than that. A value can be interpolated like so:
|
|
2384
|
+
* `<%= foo.bar %>`
|
|
2385
|
+
* And a basic "if" conditional can be used like so:
|
|
2386
|
+
* `<%? a?.b?.c %>This part will only appear if a.b.c is truthy!</%>`
|
|
2387
|
+
* You can put interpolations inside a conditional, as you'd expect. That's it.
|
|
2388
|
+
*/
|
|
2389
|
+
function template(string) {
|
|
2390
|
+
var fn = function (data) { return string
|
|
2391
|
+
.replace(REGEX_IF, function (match, pathToCheck, content) { return (getPath(data, pathToCheck.trim()) ? content : ""); })
|
|
2392
|
+
.replace(REGEX_REPLACEMENT, function (match, _, pathToInterpolate) { return getPath(data, pathToInterpolate.trim(), ""); }); };
|
|
2393
|
+
fn[SYMBOL_TEMPLATE_SOURCE] = string;
|
|
2394
|
+
return fn;
|
|
2395
|
+
}
|
|
2396
|
+
function isTemplate(x) {
|
|
2397
|
+
return typeof x === "string" && (REGEX_REPLACEMENT.test(x) || REGEX_IF.test(x));
|
|
2398
|
+
}
|
|
2399
|
+
function isTemplateFn(x) {
|
|
2400
|
+
return typeof x === "function" && Object.prototype.hasOwnProperty.call(x, SYMBOL_TEMPLATE_SOURCE);
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
exports.CustomEvent = CustomEvent;
|
|
2404
|
+
exports.EDI_DOCUMENT_TYPE = EDI_DOCUMENT_TYPE;
|
|
2405
|
+
exports.Op = Op;
|
|
2406
|
+
exports.castToNumber = castToNumber;
|
|
2407
|
+
exports.code = code;
|
|
2408
|
+
exports.constrain = constrain;
|
|
2409
|
+
exports.copyProperty = copyProperty;
|
|
2410
|
+
exports.crumblePath = crumblePath;
|
|
2411
|
+
exports.debounce = debounce;
|
|
2412
|
+
exports.debounced = debounced;
|
|
2413
|
+
exports.decimalRound = decimalRound;
|
|
2414
|
+
exports.deepFreeze = deepFreeze;
|
|
2415
|
+
exports.diff = diff;
|
|
2416
|
+
exports.flatten = flatten;
|
|
2417
|
+
exports.forEachEntryDeep = forEachEntryDeep;
|
|
2418
|
+
exports.forEachNestedObject = forEachNestedObject;
|
|
2419
|
+
exports.getPath = getPath;
|
|
2420
|
+
exports.isSubset = isSubset;
|
|
2421
|
+
exports.isTemplate = isTemplate;
|
|
2422
|
+
exports.isTemplateFn = isTemplateFn;
|
|
2423
|
+
exports.lockToAnimationFrames = lockToAnimationFrames;
|
|
2424
|
+
exports.lockedToAnimationFrames = lockedToAnimationFrames;
|
|
2425
|
+
exports.mergeDeep = mergeDeep;
|
|
2426
|
+
exports.mergePropertiesDeep = mergePropertiesDeep;
|
|
2427
|
+
exports.omit = omit;
|
|
2428
|
+
exports.onNextTick = onNextTick;
|
|
2429
|
+
exports.parseFileSize = parseFileSize;
|
|
2430
|
+
exports.range = range;
|
|
2431
|
+
exports.setPath = setPath;
|
|
2432
|
+
exports.simpleMetadataDecoratorApplicator = simpleMetadataDecoratorApplicator;
|
|
2433
|
+
exports.template = template;
|
|
2434
|
+
exports.tickDelay = tickDelay;
|
|
2435
|
+
exports.toFileSizeString = toFileSizeString;
|
|
2436
|
+
exports.traversePath = traversePath;
|
|
2437
|
+
exports.values = values;
|