LogoLogo

Schema Benchmarks

    • home
      Home

    • download_2
      Download
    • timer
      Initialization
    • check_circle
      Validation
    • output_circle
      Parsing

    • article
      Blog
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
Expand sidebarExpand sidebar
joi/Compiled (minified)Compiled (minified)
Code styleCode style
Normal styleNormal style
System themeSystem theme
Light themeLight theme
Dark themeDark theme
github
GitHubGitHub
schemas/libraries/joi/download_compiled/minified.js
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=((n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)))(o(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.joi=r():n.joi=r()})(self,()=>(()=>{var e={86:(e,t)=>{t.keys=function(e,t={}){return!1===t.symbols?Object.getOwnPropertyNames(e):Reflect.ownKeys(e)}},125:()=>{},362:(e,t)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.TLDS=void 0,t.TLDS=`AAA.AARP.ABB.ABBOTT.ABBVIE.ABC.ABLE.ABOGADO.ABUDHABI.AC.ACADEMY.ACCENTURE.ACCOUNTANT.ACCOUNTANTS.ACO.ACTOR.AD.ADS.ADULT.AE.AEG.AERO.AETNA.AF.AFL.AFRICA.AG.AGAKHAN.AGENCY.AI.AIG.AIRBUS.AIRFORCE.AIRTEL.AKDN.AL.ALIBABA.ALIPAY.ALLFINANZ.ALLSTATE.ALLY.ALSACE.ALSTOM.AM.AMAZON.AMERICANEXPRESS.AMERICANFAMILY.AMEX.AMFAM.AMICA.AMSTERDAM.ANALYTICS.ANDROID.ANQUAN.ANZ.AO.AOL.APARTMENTS.APP.APPLE.AQ.AQUARELLE.AR.ARAB.ARAMCO.ARCHI.ARMY.ARPA.ART.ARTE.AS.ASDA.ASIA.ASSOCIATES.AT.ATHLETA.ATTORNEY.AU.AUCTION.AUDI.AUDIBLE.AUDIO.AUSPOST.AUTHOR.AUTO.AUTOS.AW.AWS.AX.AXA.AZ.AZURE.BA.BABY.BAIDU.BANAMEX.BAND.BANK.BAR.BARCELONA.BARCLAYCARD.BARCLAYS.BAREFOOT.BARGAINS.BASEBALL.BASKETBALL.BAUHAUS.BAYERN.BB.BBC.BBT.BBVA.BCG.BCN.BD.BE.BEATS.BEAUTY.BEER.BERLIN.BEST.BESTBUY.BET.BF.BG.BH.BHARTI.BI.BIBLE.BID.BIKE.BING.BINGO.BIO.BIZ.BJ.BLACK.BLACKFRIDAY.BLOCKBUSTER.BLOG.BLOOMBERG.BLUE.BM.BMS.BMW.BN.BNPPARIBAS.BO.BOATS.BOEHRINGER.BOFA.BOM.BOND.BOO.BOOK.BOOKING.BOSCH.BOSTIK.BOSTON.BOT.BOUTIQUE.BOX.BR.BRADESCO.BRIDGESTONE.BROADWAY.BROKER.BROTHER.BRUSSELS.BS.BT.BUILD.BUILDERS.BUSINESS.BUY.BUZZ.BV.BW.BY.BZ.BZH.CA.CAB.CAFE.CAL.CALL.CALVINKLEIN.CAM.CAMERA.CAMP.CANON.CAPETOWN.CAPITAL.CAPITALONE.CAR.CARAVAN.CARDS.CARE.CAREER.CAREERS.CARS.CASA.CASE.CASH.CASINO.CAT.CATERING.CATHOLIC.CBA.CBN.CBRE.CC.CD.CENTER.CEO.CERN.CF.CFA.CFD.CG.CH.CHANEL.CHANNEL.CHARITY.CHASE.CHAT.CHEAP.CHINTAI.CHRISTMAS.CHROME.CHURCH.CI.CIPRIANI.CIRCLE.CISCO.CITADEL.CITI.CITIC.CITY.CK.CL.CLAIMS.CLEANING.CLICK.CLINIC.CLINIQUE.CLOTHING.CLOUD.CLUB.CLUBMED.CM.CN.CO.COACH.CODES.COFFEE.COLLEGE.COLOGNE.COM.COMMBANK.COMMUNITY.COMPANY.COMPARE.COMPUTER.COMSEC.CONDOS.CONSTRUCTION.CONSULTING.CONTACT.CONTRACTORS.COOKING.COOL.COOP.CORSICA.COUNTRY.COUPON.COUPONS.COURSES.CPA.CR.CREDIT.CREDITCARD.CREDITUNION.CRICKET.CROWN.CRS.CRUISE.CRUISES.CU.CUISINELLA.CV.CW.CX.CY.CYMRU.CYOU.CZ.DAD.DANCE.DATA.DATE.DATING.DATSUN.DAY.DCLK.DDS.DE.DEAL.DEALER.DEALS.DEGREE.DELIVERY.DELL.DELOITTE.DELTA.DEMOCRAT.DENTAL.DENTIST.DESI.DESIGN.DEV.DHL.DIAMONDS.DIET.DIGITAL.DIRECT.DIRECTORY.DISCOUNT.DISCOVER.DISH.DIY.DJ.DK.DM.DNP.DO.DOCS.DOCTOR.DOG.DOMAINS.DOT.DOWNLOAD.DRIVE.DTV.DUBAI.DUNLOP.DUPONT.DURBAN.DVAG.DVR.DZ.EARTH.EAT.EC.ECO.EDEKA.EDU.EDUCATION.EE.EG.EMAIL.EMERCK.ENERGY.ENGINEER.ENGINEERING.ENTERPRISES.EPSON.EQUIPMENT.ER.ERICSSON.ERNI.ES.ESQ.ESTATE.ET.EU.EUROVISION.EUS.EVENTS.EXCHANGE.EXPERT.EXPOSED.EXPRESS.EXTRASPACE.FAGE.FAIL.FAIRWINDS.FAITH.FAMILY.FAN.FANS.FARM.FARMERS.FASHION.FAST.FEDEX.FEEDBACK.FERRARI.FERRERO.FI.FIDELITY.FIDO.FILM.FINAL.FINANCE.FINANCIAL.FIRE.FIRESTONE.FIRMDALE.FISH.FISHING.FIT.FITNESS.FJ.FK.FLICKR.FLIGHTS.FLIR.FLORIST.FLOWERS.FLY.FM.FO.FOO.FOOD.FOOTBALL.FORD.FOREX.FORSALE.FORUM.FOUNDATION.FOX.FR.FREE.FRESENIUS.FRL.FROGANS.FRONTIER.FTR.FUJITSU.FUN.FUND.FURNITURE.FUTBOL.FYI.GA.GAL.GALLERY.GALLO.GALLUP.GAME.GAMES.GAP.GARDEN.GAY.GB.GBIZ.GD.GDN.GE.GEA.GENT.GENTING.GEORGE.GF.GG.GGEE.GH.GI.GIFT.GIFTS.GIVES.GIVING.GL.GLASS.GLE.GLOBAL.GLOBO.GM.GMAIL.GMBH.GMO.GMX.GN.GODADDY.GOLD.GOLDPOINT.GOLF.GOO.GOODYEAR.GOOG.GOOGLE.GOP.GOT.GOV.GP.GQ.GR.GRAINGER.GRAPHICS.GRATIS.GREEN.GRIPE.GROCERY.GROUP.GS.GT.GU.GUCCI.GUGE.GUIDE.GUITARS.GURU.GW.GY.HAIR.HAMBURG.HANGOUT.HAUS.HBO.HDFC.HDFCBANK.HEALTH.HEALTHCARE.HELP.HELSINKI.HERE.HERMES.HIPHOP.HISAMITSU.HITACHI.HIV.HK.HKT.HM.HN.HOCKEY.HOLDINGS.HOLIDAY.HOMEDEPOT.HOMEGOODS.HOMES.HOMESENSE.HONDA.HORSE.HOSPITAL.HOST.HOSTING.HOT.HOTELS.HOTMAIL.HOUSE.HOW.HR.HSBC.HT.HU.HUGHES.HYATT.HYUNDAI.IBM.ICBC.ICE.ICU.ID.IE.IEEE.IFM.IKANO.IL.IM.IMAMAT.IMDB.IMMO.IMMOBILIEN.IN.INC.INDUSTRIES.INFINITI.INFO.ING.INK.INSTITUTE.INSURANCE.INSURE.INT.INTERNATIONAL.INTUIT.INVESTMENTS.IO.IPIRANGA.IQ.IR.IRISH.IS.ISMAILI.IST.ISTANBUL.IT.ITAU.ITV.JAGUAR.JAVA.JCB.JE.JEEP.JETZT.JEWELRY.JIO.JLL.JM.JMP.JNJ.JO.JOBS.JOBURG.JOT.JOY.JP.JPMORGAN.JPRS.JUEGOS.JUNIPER.KAUFEN.KDDI.KE.KERRYHOTELS.KERRYPROPERTIES.KFH.KG.KH.KI.KIA.KIDS.KIM.KINDLE.KITCHEN.KIWI.KM.KN.KOELN.KOMATSU.KOSHER.KP.KPMG.KPN.KR.KRD.KRED.KUOKGROUP.KW.KY.KYOTO.KZ.LA.LACAIXA.LAMBORGHINI.LAMER.LAND.LANDROVER.LANXESS.LASALLE.LAT.LATINO.LATROBE.LAW.LAWYER.LB.LC.LDS.LEASE.LECLERC.LEFRAK.LEGAL.LEGO.LEXUS.LGBT.LI.LIDL.LIFE.LIFEINSURANCE.LIFESTYLE.LIGHTING.LIKE.LILLY.LIMITED.LIMO.LINCOLN.LINK.LIVE.LIVING.LK.LLC.LLP.LOAN.LOANS.LOCKER.LOCUS.LOL.LONDON.LOTTE.LOTTO.LOVE.LPL.LPLFINANCIAL.LR.LS.LT.LTD.LTDA.LU.LUNDBECK.LUXE.LUXURY.LV.LY.MA.MADRID.MAIF.MAISON.MAKEUP.MAN.MANAGEMENT.MANGO.MAP.MARKET.MARKETING.MARKETS.MARRIOTT.MARSHALLS.MATTEL.MBA.MC.MCKINSEY.MD.ME.MED.MEDIA.MEET.MELBOURNE.MEME.MEMORIAL.MEN.MENU.MERCKMSD.MG.MH.MIAMI.MICROSOFT.MIL.MINI.MINT.MIT.MITSUBISHI.MK.ML.MLB.MLS.MM.MMA.MN.MO.MOBI.MOBILE.MODA.MOE.MOI.MOM.MONASH.MONEY.MONSTER.MORMON.MORTGAGE.MOSCOW.MOTO.MOTORCYCLES.MOV.MOVIE.MP.MQ.MR.MS.MSD.MT.MTN.MTR.MU.MUSEUM.MUSIC.MV.MW.MX.MY.MZ.NA.NAB.NAGOYA.NAME.NAVY.NBA.NC.NE.NEC.NET.NETBANK.NETFLIX.NETWORK.NEUSTAR.NEW.NEWS.NEXT.NEXTDIRECT.NEXUS.NF.NFL.NG.NGO.NHK.NI.NICO.NIKE.NIKON.NINJA.NISSAN.NISSAY.NL.NO.NOKIA.NORTON.NOW.NOWRUZ.NOWTV.NP.NR.NRA.NRW.NTT.NU.NYC.NZ.OBI.OBSERVER.OFFICE.OKINAWA.OLAYAN.OLAYANGROUP.OLLO.OM.OMEGA.ONE.ONG.ONL.ONLINE.OOO.OPEN.ORACLE.ORANGE.ORG.ORGANIC.ORIGINS.OSAKA.OTSUKA.OTT.OVH.PA.PAGE.PANASONIC.PARIS.PARS.PARTNERS.PARTS.PARTY.PAY.PCCW.PE.PET.PF.PFIZER.PG.PH.PHARMACY.PHD.PHILIPS.PHONE.PHOTO.PHOTOGRAPHY.PHOTOS.PHYSIO.PICS.PICTET.PICTURES.PID.PIN.PING.PINK.PIONEER.PIZZA.PK.PL.PLACE.PLAY.PLAYSTATION.PLUMBING.PLUS.PM.PN.PNC.POHL.POKER.POLITIE.PORN.POST.PR.PRAXI.PRESS.PRIME.PRO.PROD.PRODUCTIONS.PROF.PROGRESSIVE.PROMO.PROPERTIES.PROPERTY.PROTECTION.PRU.PRUDENTIAL.PS.PT.PUB.PW.PWC.PY.QA.QPON.QUEBEC.QUEST.RACING.RADIO.RE.READ.REALESTATE.REALTOR.REALTY.RECIPES.RED.REDSTONE.REDUMBRELLA.REHAB.REISE.REISEN.REIT.RELIANCE.REN.RENT.RENTALS.REPAIR.REPORT.REPUBLICAN.REST.RESTAURANT.REVIEW.REVIEWS.REXROTH.RICH.RICHARDLI.RICOH.RIL.RIO.RIP.RO.ROCKS.RODEO.ROGERS.ROOM.RS.RSVP.RU.RUGBY.RUHR.RUN.RW.RWE.RYUKYU.SA.SAARLAND.SAFE.SAFETY.SAKURA.SALE.SALON.SAMSCLUB.SAMSUNG.SANDVIK.SANDVIKCOROMANT.SANOFI.SAP.SARL.SAS.SAVE.SAXO.SB.SBI.SBS.SC.SCB.SCHAEFFLER.SCHMIDT.SCHOLARSHIPS.SCHOOL.SCHULE.SCHWARZ.SCIENCE.SCOT.SD.SE.SEARCH.SEAT.SECURE.SECURITY.SEEK.SELECT.SENER.SERVICES.SEVEN.SEW.SEX.SEXY.SFR.SG.SH.SHANGRILA.SHARP.SHELL.SHIA.SHIKSHA.SHOES.SHOP.SHOPPING.SHOUJI.SHOW.SI.SILK.SINA.SINGLES.SITE.SJ.SK.SKI.SKIN.SKY.SKYPE.SL.SLING.SM.SMART.SMILE.SN.SNCF.SO.SOCCER.SOCIAL.SOFTBANK.SOFTWARE.SOHU.SOLAR.SOLUTIONS.SONG.SONY.SOY.SPA.SPACE.SPORT.SPOT.SR.SRL.SS.ST.STADA.STAPLES.STAR.STATEBANK.STATEFARM.STC.STCGROUP.STOCKHOLM.STORAGE.STORE.STREAM.STUDIO.STUDY.STYLE.SU.SUCKS.SUPPLIES.SUPPLY.SUPPORT.SURF.SURGERY.SUZUKI.SV.SWATCH.SWISS.SX.SY.SYDNEY.SYSTEMS.SZ.TAB.TAIPEI.TALK.TAOBAO.TARGET.TATAMOTORS.TATAR.TATTOO.TAX.TAXI.TC.TCI.TD.TDK.TEAM.TECH.TECHNOLOGY.TEL.TEMASEK.TENNIS.TEVA.TF.TG.TH.THD.THEATER.THEATRE.TIAA.TICKETS.TIENDA.TIPS.TIRES.TIROL.TJ.TJMAXX.TJX.TK.TKMAXX.TL.TM.TMALL.TN.TO.TODAY.TOKYO.TOOLS.TOP.TORAY.TOSHIBA.TOTAL.TOURS.TOWN.TOYOTA.TOYS.TR.TRADE.TRADING.TRAINING.TRAVEL.TRAVELERS.TRAVELERSINSURANCE.TRUST.TRV.TT.TUBE.TUI.TUNES.TUSHU.TV.TVS.TW.TZ.UA.UBANK.UBS.UG.UK.UNICOM.UNIVERSITY.UNO.UOL.UPS.US.UY.UZ.VA.VACATIONS.VANA.VANGUARD.VC.VE.VEGAS.VENTURES.VERISIGN.VERSICHERUNG.VET.VG.VI.VIAJES.VIDEO.VIG.VIKING.VILLAS.VIN.VIP.VIRGIN.VISA.VISION.VIVA.VIVO.VLAANDEREN.VN.VODKA.VOLVO.VOTE.VOTING.VOTO.VOYAGE.VU.WALES.WALMART.WALTER.WANG.WANGGOU.WATCH.WATCHES.WEATHER.WEATHERCHANNEL.WEBCAM.WEBER.WEBSITE.WED.WEDDING.WEIBO.WEIR.WF.WHOSWHO.WIEN.WIKI.WILLIAMHILL.WIN.WINDOWS.WINE.WINNERS.WME.WOLTERSKLUWER.WOODSIDE.WORK.WORKS.WORLD.WOW.WS.WTC.WTF.XBOX.XEROX.XIHUAN.XIN.XN--11B4C3D.XN--1CK2E1B.XN--1QQW23A.XN--2SCRJ9C.XN--30RR7Y.XN--3BST00M.XN--3DS443G.XN--3E0B707E.XN--3HCRJ9C.XN--3PXU8K.XN--42C2D9A.XN--45BR5CYL.XN--45BRJ9C.XN--45Q11C.XN--4DBRK0CE.XN--4GBRIM.XN--54B7FTA0CC.XN--55QW42G.XN--55QX5D.XN--5SU34J936BGSG.XN--5TZM5G.XN--6FRZ82G.XN--6QQ986B3XL.XN--80ADXHKS.XN--80AO21A.XN--80AQECDR1A.XN--80ASEHDB.XN--80ASWG.XN--8Y0A063A.XN--90A3AC.XN--90AE.XN--90AIS.XN--9DBQ2A.XN--9ET52U.XN--9KRT00A.XN--B4W605FERD.XN--BCK1B9A5DRE4C.XN--C1AVG.XN--C2BR7G.XN--CCK2B3B.XN--CCKWCXETD.XN--CG4BKI.XN--CLCHC0EA0B2G2A9GCD.XN--CZR694B.XN--CZRS0T.XN--CZRU2D.XN--D1ACJ3B.XN--D1ALF.XN--E1A4C.XN--ECKVDTC9D.XN--EFVY88H.XN--FCT429K.XN--FHBEI.XN--FIQ228C5HS.XN--FIQ64B.XN--FIQS8S.XN--FIQZ9S.XN--FJQ720A.XN--FLW351E.XN--FPCRJ9C3D.XN--FZC2C9E2C.XN--FZYS8D69UVGM.XN--G2XX48C.XN--GCKR3F0F.XN--GECRJ9C.XN--GK3AT1E.XN--H2BREG3EVE.XN--H2BRJ9C.XN--H2BRJ9C8C.XN--HXT814E.XN--I1B6B1A6A2E.XN--IMR513N.XN--IO0A7I.XN--J1AEF.XN--J1AMH.XN--J6W193G.XN--JLQ480N2RG.XN--JVR189M.XN--KCRX77D1X4A.XN--KPRW13D.XN--KPRY57D.XN--KPUT3I.XN--L1ACC.XN--LGBBAT1AD8J.XN--MGB9AWBF.XN--MGBA3A3EJT.XN--MGBA3A4F16A.XN--MGBA7C0BBN0A.XN--MGBAAM7A8H.XN--MGBAB2BD.XN--MGBAH1A3HJKRD.XN--MGBAI9AZGQP6J.XN--MGBAYH7GPA.XN--MGBBH1A.XN--MGBBH1A71E.XN--MGBC0A9AZCG.XN--MGBCA7DZDO.XN--MGBCPQ6GPA1A.XN--MGBERP4A5D4AR.XN--MGBGU82A.XN--MGBI4ECEXP.XN--MGBPL2FH.XN--MGBT3DHD.XN--MGBTX2B.XN--MGBX4CD0AB.XN--MIX891F.XN--MK1BU44C.XN--MXTQ1M.XN--NGBC5AZD.XN--NGBE9E0A.XN--NGBRX.XN--NODE.XN--NQV7F.XN--NQV7FS00EMA.XN--NYQY26A.XN--O3CW4H.XN--OGBPF8FL.XN--OTU796D.XN--P1ACF.XN--P1AI.XN--PGBS0DH.XN--PSSY2U.XN--Q7CE6A.XN--Q9JYB4C.XN--QCKA1PMC.XN--QXA6A.XN--QXAM.XN--RHQV96G.XN--ROVU88B.XN--RVC1E0AM3E.XN--S9BRJ9C.XN--SES554G.XN--T60B56A.XN--TCKWE.XN--TIQ49XQYJ.XN--UNUP4Y.XN--VERMGENSBERATER-CTB.XN--VERMGENSBERATUNG-PWB.XN--VHQUV.XN--VUQ861B.XN--W4R85EL8FHU5DNRA.XN--W4RS40L.XN--WGBH1C.XN--WGBL6A.XN--XHQ521B.XN--XKC2AL3HYE2A.XN--XKC2DL3A5EE0H.XN--Y9A3AQ.XN--YFRO4I67O.XN--YGBI2AMMX.XN--ZFR164B.XXX.XYZ.YACHTS.YAHOO.YAMAXUN.YANDEX.YE.YODOBASHI.YOGA.YOKOHAMA.YOU.YOUTUBE.YT.YUN.ZA.ZAPPOS.ZARA.ZERO.ZIP.ZM.ZONE.ZUERICH.ZW`.split(`.`)},554:()=>{},679:(e,t)=>{let n={operators:[`!`,`^`,`*`,`/`,`%`,`+`,`-`,`<`,`<=`,`>`,`>=`,`==`,`!=`,`&&`,`||`,`??`],operatorCharacters:[`!`,`^`,`*`,`/`,`%`,`+`,`-`,`<`,`=`,`>`,`&`,`|`,`?`],operatorsOrder:[[`^`],[`*`,`/`,`%`],[`+`,`-`],[`<`,`<=`,`>`,`>=`],[`==`,`!=`],[`&&`],[`||`,`??`]],operatorsPrefix:[`!`,`n`],literals:{'"':`"`,"`":"`","'":`'`,"[":`]`},numberRx:/^(?:[0-9]*(\.[0-9]*)?){1}$/,tokenRx:/^[\w\$\#\.\@\:\{\}]+$/,symbol:Symbol(`formula`),settings:Symbol(`settings`)};t.Parser=class{constructor(e,t={}){if(!t[n.settings]&&t.constants)for(let e in t.constants){let n=t.constants[e];if(n!==null&&![`boolean`,`number`,`string`].includes(typeof n))throw Error(`Formula constant ${e} contains invalid ${typeof n} value type`)}this.settings=t[n.settings]?t:Object.assign({[n.settings]:!0,constants:{},functions:{}},t),this.single=null,this._parts=null,this._parse(e)}_parse(e){let r=[],i=``,a=0,o=!1,s=e=>{if(a)throw Error(`Formula missing closing parenthesis`);let s=r.length?r[r.length-1]:null;if(o||i||e){if(s&&s.type===`reference`&&e===`)`)return s.type=`function`,s.value=this._subFormula(i,s.value),void(i=``);if(e===`)`){let e=new t.Parser(i,this.settings);r.push({type:`segment`,value:e})}else if(o){if(o===`]`)return r.push({type:`reference`,value:i}),void(i=``);r.push({type:`literal`,value:i})}else if(n.operatorCharacters.includes(i))s&&s.type===`operator`&&n.operators.includes(s.value+i)?s.value+=i:r.push({type:`operator`,value:i});else if(i.match(n.numberRx))r.push({type:`constant`,value:parseFloat(i)});else if(this.settings.constants[i]!==void 0)r.push({type:`constant`,value:this.settings.constants[i]});else{if(!i.match(n.tokenRx))throw Error(`Formula contains invalid token: ${i}`);r.push({type:`reference`,value:i})}i=``}};for(let t of e)o?t===o?(s(),o=!1):i+=t:a?t===`(`?(i+=t,++a):t===`)`?(--a,a?i+=t:s(t)):i+=t:t in n.literals?o=n.literals[t]:t===`(`?(s(),++a):n.operatorCharacters.includes(t)?(s(),i=t,s()):t===` `?s():i+=t;s(),r=r.map((e,t)=>e.type!==`operator`||e.value!==`-`||t&&r[t-1].type!==`operator`?e:{type:`operator`,value:`n`});let c=!1;for(let e of r){if(e.type===`operator`){if(n.operatorsPrefix.includes(e.value))continue;if(!c)throw Error(`Formula contains an operator in invalid position`);if(!n.operators.includes(e.value))throw Error(`Formula contains an unknown operator ${e.value}`)}else if(c)throw Error(`Formula missing expected operator`);c=!c}if(!c)throw Error(`Formula contains invalid trailing operator`);r.length===1&&[`reference`,`literal`,`constant`].includes(r[0].type)&&(this.single={type:r[0].type===`reference`?`reference`:`value`,value:r[0].value}),this._parts=r.map(e=>{if(e.type===`operator`)return n.operatorsPrefix.includes(e.value)?e:e.value;if(e.type!==`reference`)return e.value;if(this.settings.tokenRx&&!this.settings.tokenRx.test(e.value))throw Error(`Formula contains invalid reference ${e.value}`);return this.settings.reference?this.settings.reference(e.value):n.reference(e.value)})}_subFormula(e,r){let i=this.settings.functions[r];if(typeof i!=`function`)throw Error(`Formula contains unknown function ${r}`);let a=[];if(e){let t=``,i=0,o=!1,s=()=>{if(!t)throw Error(`Formula contains function ${r} with invalid arguments ${e}`);a.push(t),t=``};for(let r=0;r<e.length;++r){let a=e[r];o?(t+=a,a===o&&(o=!1)):a in n.literals&&!i?(t+=a,o=n.literals[a]):a!==`,`||i?(t+=a,a===`(`?++i:a===`)`&&--i):s()}s()}return a=a.map(e=>new t.Parser(e,this.settings)),function(e){let t=[];for(let n of a)t.push(n.evaluate(e));return i.call(e,...t)}}evaluate(e){let t=this._parts.slice();for(let r=t.length-2;r>=0;--r){let i=t[r];if(i&&i.type===`operator`){let a=t[r+1];t.splice(r+1,1);let o=n.evaluate(a,e);t[r]=n.single(i.value,o)}}return n.operatorsOrder.forEach(r=>{for(let i=1;i<t.length-1;)if(r.includes(t[i])){let r=t[i],a=n.evaluate(t[i-1],e),o=n.evaluate(t[i+1],e);t.splice(i,2);let s=n.calculate(r,a,o);t[i-1]=s===0?0:s}else i+=2}),n.evaluate(t[0],e)}},t.Parser.prototype[n.symbol]=!0,n.reference=function(e){return function(t){return t&&t[e]!==void 0?t[e]:null}},n.evaluate=function(e,t){return e===null?null:typeof e==`function`?e(t):e[n.symbol]?e.evaluate(t):e},n.single=function(e,t){if(e===`!`)return!t;let n=-t;return n===0?0:n},n.calculate=function(e,t,r){if(e===`??`)return n.exists(t)?t:r;if(typeof t==`string`||typeof r==`string`){if(e===`+`)return(t=n.exists(t)?t:``)+(n.exists(r)?r:``)}else switch(e){case`^`:return t**+r;case`*`:return t*r;case`/`:return t/r;case`%`:return t%r;case`+`:return t+r;case`-`:return t-r}switch(e){case`<`:return t<r;case`<=`:return t<=r;case`>`:return t>r;case`>=`:return t>=r;case`==`:return t===r;case`!=`:return t!==r;case`&&`:return t&&r;case`||`:return t||r}return null},n.exists=function(e){return e!=null}},680:(e,t,n)=>{let{assert:r}=n(3115),i=n(2115),a=n(9415),o=n(6162);e.exports=i.extend({type:`any`,flags:{only:{default:!1}},terms:{alterations:{init:null},examples:{init:null},externals:{init:null},metas:{init:[]},notes:{init:[]},shared:{init:null},tags:{init:[]},whens:{init:null}},rules:{custom:{method(e,t){return r(typeof e==`function`,`Method must be a function`),r(t===void 0||t&&typeof t==`string`,`Description must be a non-empty string`),this.$_addRule({name:`custom`,args:{method:e,description:t}})},validate(e,t,{method:n}){try{return n(e,t)}catch(e){return t.error(`any.custom`,{error:e})}},args:[`method`,`description`],multi:!0},messages:{method(e){return this.prefs({messages:e})}},shared:{method(e){r(a.isSchema(e)&&e._flags.id,`Schema must be a schema with an id`);let t=this.clone();return t.$_terms.shared=t.$_terms.shared||[],t.$_terms.shared.push(e),t.$_mutateRegister(e),t}},warning:{method(e,t){return r(e&&typeof e==`string`,`Invalid warning code`),this.$_addRule({name:`warning`,args:{code:e,local:t},warn:!0})},validate:(e,t,{code:n,local:r})=>t.error(n,r),args:[`code`,`local`],multi:!0}},modifiers:{keep(e,t=!0){e.keep=t},message(e,t){e.message=o.compile(t)},warn(e,t=!0){e.warn=t}},manifest:{build(e,t){for(let n in t){let r=t[n];if([`examples`,`externals`,`metas`,`notes`,`tags`].includes(n))for(let t of r)e=e[n.slice(0,-1)](t);else{if(n===`alterations`){let t={};for(let{target:e,adjuster:n}of r)t[e]=n;e=e.alter(t);continue}if(n!==`whens`){if(n===`shared`)for(let t of r)e=e.shared(t)}else for(let t of r){let{ref:n,is:r,not:i,then:a,otherwise:o,concat:s}=t;e=s?e.concat(s):n?e.when(n,{is:r,not:i,then:a,otherwise:o,switch:t.switch,break:t.break}):e.when(r,{then:a,otherwise:o,break:t.break})}}}return e}},messages:{"any.custom":`{{#label}} failed custom validation because {{#error.message}}`,"any.default":`{{#label}} threw an error when running default method`,"any.failover":`{{#label}} threw an error when running failover method`,"any.invalid":`{{#label}} contains an invalid value`,"any.only":`{{#label}} must be {if(#valids.length == 1, "", "one of ")}{{#valids}}`,"any.ref":`{{#label}} {{#arg}} references {{:#ref}} which {{#reason}}`,"any.required":`{{#label}} is required`,"any.unknown":`{{#label}} is not allowed`}})},834:e=>{e.exports=function(e){return typeof e?.then==`function`}},1100:(e,t,n)=>{let{assert:r,clone:i}=n(3115),a=n(2130),o=n(9415),s=n(3541),c=n(8013),l=n(2062),u=n(9017),d=n(8529),f=n(1532),p=n(125),m,h={types:{alternatives:n(4972),any:n(680),array:n(2591),boolean:n(6186),date:n(2588),function:n(4840),link:n(9556),number:n(4709),object:n(7487),string:n(9033),symbol:n(5008)},aliases:{alt:`alternatives`,bool:`boolean`,func:`function`},root:function(){let e={_types:new Set(Object.keys(h.types))};for(let t of e._types)e[t]=function(...e){return r(!e.length||[`alternatives`,`link`,`object`].includes(t),`The`,t,`type does not allow arguments`),h.generate(this,h.types[t],e)};for(let t of[`allow`,`custom`,`disallow`,`equal`,`exist`,`forbidden`,`invalid`,`not`,`only`,`optional`,`options`,`prefs`,`preferences`,`required`,`strip`,`valid`,`when`])e[t]=function(...e){return this.any()[t](...e)};Object.assign(e,h.methods);for(let t in h.aliases)e[t]=e[h.aliases[t]];return e.x=e.expression,p.setup&&p.setup(e),e}};h.methods={ValidationError:c.ValidationError,version:o.version,cache:a.provider,assert(e,t,...n){h.assert(e,t,!0,n)},attempt:(e,t,...n)=>h.assert(e,t,!1,n),build(e){return r(typeof u.build==`function`,`Manifest functionality disabled`),u.build(this,e)},checkPreferences(e){o.checkPreferences(e)},compile(e,t){return s.compile(this,e,t)},defaults(e){r(typeof e==`function`,`modifier must be a function`);let t=Object.assign({},this);for(let n of t._types){let i=e(t[n]());r(o.isSchema(i),`modifier must return a valid schema object`),t[n]=function(...e){return h.generate(this,i,e)}}return t},expression:(...e)=>new f(...e),extend(...e){o.verifyFlat(e,`extend`),m||=n(1688),r(e.length,`You need to provide at least one extension`),this.assert(e,m.extensions);let t=Object.assign({},this);t._types=new Set(t._types);for(let n of e){typeof n==`function`&&(n=n(t)),this.assert(n,m.extension);let e=h.expandExtension(n,t);for(let n of e){r(t[n.type]===void 0||t._types.has(n.type),`Cannot override name`,n.type);let e=n.base||this.any(),i=l.type(e,n);t._types.add(n.type),t[n.type]=function(...e){return h.generate(this,i,e)}}}return t},isError:c.ValidationError.isError,isExpression:f.isTemplate,isRef:d.isRef,isSchema:o.isSchema,in:(...e)=>d.in(...e),override:o.symbols.override,ref:(...e)=>d.create(...e),types(){let e={};for(let t of this._types)e[t]=this[t]();for(let t in h.aliases)e[t]=this[t]();return e}},h.assert=function(e,t,n,r){let a=r[0]instanceof Error||typeof r[0]==`string`?r[0]:null,s=a===null?r[0]:r[1],l=t.validate(e,o.preferences({errors:{stack:!0}},s||{})),u=l.error;if(!u)return l.value;if(a instanceof Error)throw a;let d=n&&typeof u.annotate==`function`?u.annotate():u.message;throw u instanceof c.ValidationError==0&&(u=i(u)),u.message=a?`${a} ${d}`:d,u},h.generate=function(e,t,n){return r(e,`Must be invoked on a Joi instance.`),t.$_root=e,t._definition.args&&n.length?t._definition.args(t,...n):t},h.expandExtension=function(e,t){if(typeof e.type==`string`)return[e];let n=[];for(let r of t._types)if(e.type.test(r)){let i=Object.assign({},e);i.type=r,i.base=t[r](),n.push(i)}return n},e.exports=h.root()},1190:(e,t,n)=>{let{assert:r,clone:i,ignore:a,reach:o}=n(3115),s=n(9415),c=n(8013),l=n(4957),u={result:Symbol(`result`)};t.entry=function(e,t,n){let i=s.defaults;n&&(r(n.warnings===void 0,`Cannot override warnings preference in synchronous validation`),r(n.artifacts===void 0,`Cannot override artifacts preference in synchronous validation`),i=s.preferences(s.defaults,n));let a=u.entry(e,t,i);r(!a.mainstay.externals.length,`Schema with external rules must use validateAsync()`);let o={value:a.value};return a.error&&(o.error=a.error),a.mainstay.warnings.length&&(o.warning=c.details(a.mainstay.warnings)),a.mainstay.debug&&(o.debug=a.mainstay.debug),a.mainstay.artifacts&&(o.artifacts=a.mainstay.artifacts),o},t.entryAsync=async function(e,t,n){let r=s.defaults;n&&(r=s.preferences(s.defaults,n));let i=u.entry(e,t,r),a=i.mainstay;if(i.error)throw a.debug&&(i.error.debug=a.debug),i.error;if(a.externals.length){let t=i.value,l=[];for(let i of a.externals){let d=i.state.path,f=i.schema.type===`link`?a.links.get(i.schema):null,p,m,h=t,g=d.length?[t]:[],_=d.length?o(e,d):e;if(d.length){p=d[d.length-1];let e=t;for(let t of d.slice(0,-1))e=e[t],g.unshift(e);m=g[0],h=m[p]}try{let e=await i.method(h,{schema:i.schema,linked:f,state:i.state,prefs:n,original:_,error:(e,t)=>(f||i.schema).$_createError(e,h,t,i.state,r),errorsArray:u.errorsArray,warn:(e,t)=>a.warnings.push((f||i.schema).$_createError(e,h,t,i.state,r)),message:(e,t)=>(f||i.schema).$_createError(`external`,h,t,i.state,r,{messages:e})});if(e===void 0||e===h)continue;if(e instanceof c.Report){if(a.tracer.log(i.schema,i.state,`rule`,`external`,`error`),l.push(e),r.abortEarly)break;continue}if(Array.isArray(e)&&e[s.symbols.errors]){if(a.tracer.log(i.schema,i.state,`rule`,`external`,`error`),l.push(...e),r.abortEarly)break;continue}m?(a.tracer.value(i.state,`rule`,h,e,`external`),m[p]=e):(a.tracer.value(i.state,`rule`,t,e,`external`),t=e)}catch(e){throw r.errors.label&&(e.message+=` (${i.label})`),e}}if(i.value=t,l.length)throw i.error=c.process(l,e,r),a.debug&&(i.error.debug=a.debug),i.error}if(!r.warnings&&!r.debug&&!r.artifacts)return i.value;let l={value:i.value};return a.warnings.length&&(l.warning=c.details(a.warnings)),a.debug&&(l.debug=a.debug),a.artifacts&&(l.artifacts=a.artifacts),l},t.standard=function(e,n){return n.isAsync()?t.entryAsync(e,n):t.entry(e,n)},u.Mainstay=class{constructor(e,t,n){this.externals=[],this.warnings=[],this.tracer=e,this.debug=t,this.links=n,this.shadow=null,this.artifacts=null,this._snapshots=[]}snapshot(){this._snapshots.push({externals:this.externals.slice(),warnings:this.warnings.slice()})}restore(){let e=this._snapshots.pop();this.externals=e.externals,this.warnings=e.warnings}commit(){this._snapshots.pop()}},u.entry=function(e,n,r){let{tracer:i,cleanup:a}=u.tracer(n,r),o=r.debug?[]:null,s=n._ids._schemaChain?new Map:null,d=new u.Mainstay(i,o,s),f=new l([],[],{mainstay:d,schemas:n._ids._schemaChain?[{schema:n}]:null}),p=t.validate(e,n,f,r);a&&n.$_root.untrace();let m=c.process(p.errors,e,r);return{value:p.value,error:m,mainstay:d}},u.tracer=function(e,t){return e.$_root._tracer?{tracer:e.$_root._tracer._register(e)}:t.debug?(r(e.$_root.trace,`Debug mode not supported`),{tracer:e.$_root.trace()._register(e),cleanup:!0}):{tracer:u.ignore}},t.validate=function(e,t,n,r,i={}){if(t.$_terms.whens&&(t=t._generate(e,n,r).schema),t._preferences&&(r=u.prefs(t,r)),t._cache&&r.cache){let r=t._cache.get(e);if(n.mainstay.tracer.debug(n,`validate`,`cached`,!!r),r)return r}let a=(i,a,o)=>t.$_createError(i,e,a,o||n,r),o={original:e,prefs:r,schema:t,state:n,error:a,errorsArray:u.errorsArray,warn:(e,t,r)=>n.mainstay.warnings.push(a(e,t,r)),message:(i,a)=>t.$_createError(`custom`,e,a,n,r,{messages:i})};n.mainstay.tracer.entry(t,n);let c=t._definition;if(c.prepare&&e!==void 0&&r.convert){let t=c.prepare(e,o);if(t){if(n.mainstay.tracer.value(n,`prepare`,e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}if(c.coerce&&e!==void 0&&r.convert&&(!c.coerce.from||c.coerce.from.includes(typeof e))){let t=c.coerce.method(e,o);if(t){if(n.mainstay.tracer.value(n,`coerced`,e,t.value),t.errors)return u.finalize(t.value,[].concat(t.errors),o);e=t.value}}let l=t._flags.empty;l&&l.$_match(u.trim(e,t),n.nest(l),s.defaults)&&(n.mainstay.tracer.value(n,`empty`,e,void 0),e=void 0);let d=i.presence||t._flags.presence||(t._flags._endedSwitch?null:r.presence);if(e===void 0){if(d===`forbidden`)return u.finalize(e,null,o);if(d===`required`)return u.finalize(e,[t.$_createError(`any.required`,e,null,n,r)],o);if(d===`optional`){if(t._flags.default!==s.symbols.deepDefault)return u.finalize(e,null,o);n.mainstay.tracer.value(n,`default`,e,{}),e={}}}else if(d===`forbidden`)return u.finalize(e,[t.$_createError(`any.unknown`,e,null,n,r)],o);let f=[];if(t._valids){let i=t._valids.get(e,n,r,t._flags.insensitive);if(i)return r.convert&&(n.mainstay.tracer.value(n,`valids`,e,i.value),e=i.value),n.mainstay.tracer.filter(t,n,`valid`,i),u.finalize(e,null,o);if(t._flags.only){let i=t.$_createError(`any.only`,e,{valids:t._valids.values({display:!0})},n,r);if(r.abortEarly)return u.finalize(e,[i],o);f.push(i)}}if(t._invalids){let i=t._invalids.get(e,n,r,t._flags.insensitive);if(i){n.mainstay.tracer.filter(t,n,`invalid`,i);let a=t.$_createError(`any.invalid`,e,{invalids:t._invalids.values({display:!0})},n,r);if(r.abortEarly)return u.finalize(e,[a],o);f.push(a)}}if(c.validate){let t=c.validate(e,o);if(t&&(n.mainstay.tracer.value(n,`base`,e,t.value),e=t.value,t.errors)){if(!Array.isArray(t.errors))return f.push(t.errors),u.finalize(e,f,o);if(t.errors.length)return f.push(...t.errors),u.finalize(e,f,o)}}return t._rules.length?u.rules(e,f,o):u.finalize(e,f,o)},u.rules=function(e,t,n){let{schema:r,state:i,prefs:a}=n;for(let o of r._rules){let c=r._definition.rules[o.method];if(c.convert&&a.convert){i.mainstay.tracer.log(r,i,`rule`,o.name,`full`);continue}let l,d=o.args;if(o._resolve.length){d=Object.assign({},d);for(let t of o._resolve){let n=c.argsByName.get(t),o=d[t].resolve(e,i,a),u=n.normalize?n.normalize(o):o,f=s.validateArg(u,null,n);if(f){l=r.$_createError(`any.ref`,o,{arg:t,ref:d[t],reason:f},i,a);break}d[t]=u}}l||=c.validate(e,n,d,o);let f=u.rule(l,o);if(f.errors){if(i.mainstay.tracer.log(r,i,`rule`,o.name,`error`),o.warn){i.mainstay.warnings.push(...f.errors);continue}if(a.abortEarly)return u.finalize(e,f.errors,n);t.push(...f.errors)}else i.mainstay.tracer.log(r,i,`rule`,o.name,`pass`),i.mainstay.tracer.value(i,`rule`,e,f.value,o.name),e=f.value}return u.finalize(e,t,n)},u.rule=function(e,t){return e instanceof c.Report?(u.error(e,t),{errors:[e],value:null}):Array.isArray(e)&&e[s.symbols.errors]?(e.forEach(e=>u.error(e,t)),{errors:e,value:null}):{errors:null,value:e}},u.error=function(e,t){return t.message&&e._setTemplate(t.message),e},u.finalize=function(e,t,n){t||=[];let{schema:i,state:a,prefs:o}=n;if(t.length){let r=u.default(`failover`,void 0,t,n);r!==void 0&&(a.mainstay.tracer.value(a,`failover`,e,r),e=r,t=[])}if(t.length&&i._flags.error)if(typeof i._flags.error==`function`){t=i._flags.error(t),Array.isArray(t)||(t=[t]);for(let e of t)r(e instanceof Error||e instanceof c.Report,`error() must return an Error object`)}else t=[i._flags.error];if(e===void 0){let r=u.default(`default`,e,t,n);a.mainstay.tracer.value(a,`default`,e,r),e=r}if(i._flags.cast&&e!==void 0){let t=i._definition.cast[i._flags.cast];if(t.from(e)){let r=t.to(e,n);a.mainstay.tracer.value(a,`cast`,e,r,i._flags.cast),e=r}}if(i.$_terms.externals&&o.externals&&!1!==o._externals)for(let{method:e}of i.$_terms.externals)a.mainstay.externals.push({method:e,schema:i,state:a,label:c.label(i._flags,a,o)});let s={value:e,errors:t.length?t:null};return i._flags.result&&(s.value=i._flags.result===`strip`?void 0:n.original,a.mainstay.tracer.value(a,i._flags.result,e,s.value),a.shadow(e,i._flags.result)),i._cache&&!1!==o.cache&&!i._refs.length&&i._cache.set(n.original,s),e===void 0||s.errors||i._flags.artifact===void 0||(a.mainstay.artifacts=a.mainstay.artifacts||new Map,a.mainstay.artifacts.has(i._flags.artifact)||a.mainstay.artifacts.set(i._flags.artifact,[]),a.mainstay.artifacts.get(i._flags.artifact).push(a.path)),s},u.prefs=function(e,t){let n=t===s.defaults;return n&&e._preferences[s.symbols.prefs]?e._preferences[s.symbols.prefs]:(t=s.preferences(t,e._preferences),n&&(e._preferences[s.symbols.prefs]=t),t)},u.default=function(e,t,n,r){let{schema:a,state:o,prefs:c}=r,l=a._flags[e];if(c.noDefaults||l===void 0)return t;if(o.mainstay.tracer.log(a,o,`rule`,e,`full`),!l)return l;if(typeof l==`function`){let t=l.length?[i(o.ancestors[0]),r]:[];try{return l(...t)}catch(t){n.push(a.$_createError(`any.${e}`,null,{error:t},o,c));return}}return typeof l==`object`?l[s.symbols.literal]?l.literal:s.isResolvable(l)?l.resolve(t,o,c):i(l):l},u.trim=function(e,t){if(typeof e!=`string`)return e;let n=t.$_getRule(`trim`);return n&&n.args.enabled?e.trim():e},u.ignore={active:!1,debug:a,entry:a,filter:a,log:a,resolve:a,value:a},u.errorsArray=function(){let e=[];return e[s.symbols.errors]=!0,e}},1528:(e,t,n)=>{let r=n(8253),i={};e.exports=function(e,t,n){if(!1===t||t==null)return e;typeof(n||={})==`string`&&(n={separator:n});let a=Array.isArray(t);r(!a||!n.separator,`Separator option is not valid for array-based chain`);let o=a?t:t.split(n.separator||`.`),s=e;for(let e=0;e<o.length;++e){let a=o[e],c=n.iterables&&i.iterables(s);if(Array.isArray(s)||c===`set`){let e=Number(a);Number.isInteger(e)&&(a=e<0?s.length+e:e)}if(!s||typeof s==`function`&&!1===n.functions||!c&&s[a]===void 0){r(!n.strict||e+1===o.length,`Missing segment`,a,`in reach path `,t),r(typeof s==`object`||!0===n.functions||typeof s!=`function`,`Invalid segment`,a,`in reach path `,t),s=n.default;break}s=c?c===`set`?[...s][a]:s.get(a):s[a]}return s},i.iterables=function(e){return e instanceof Set?`set`:e instanceof Map?`map`:void 0}},1532:(e,t,n)=>{let{assert:r,clone:i,escapeHtml:a}=n(3115),o=n(679),s=n(9415),c=n(8013),l=n(8529),u={symbol:Symbol(`template`),opens:Array(1e3).join(`\0`),closes:Array(1e3).join(``),dateFormat:{date:Date.prototype.toDateString,iso:Date.prototype.toISOString,string:Date.prototype.toString,time:Date.prototype.toTimeString,utc:Date.prototype.toUTCString}};e.exports=u.Template=class{constructor(e,t){if(r(typeof e==`string`,`Template source must be a string`),r(!e.includes(`\0`)&&!e.includes(``),`Template source cannot contain reserved control characters`),this.source=e,this.rendered=e,this._template=null,t){let{functions:e,...n}=t;this._settings=Object.keys(n).length?i(n):void 0,this._functions=e,this._functions&&(r(Object.keys(this._functions).every(e=>typeof e==`string`),`Functions keys must be strings`),r(Object.values(this._functions).every(e=>typeof e==`function`),`Functions values must be functions`))}else this._settings=void 0,this._functions=void 0;this._parse()}_parse(){if(!this.source.includes(`{`))return;let e=u.encode(this.source),t=u.split(e),n=!1,r=[],i=t.shift();i&&r.push(i);for(let e of t){let t=e[0]!==`{`,i=t?`}`:`}}`,a=e.indexOf(i);if(a===-1||e[1]===`{`){r.push(`{${u.decode(e)}`);continue}let o=e.slice(t?0:1,a),s=o[0]===`:`;s&&(o=o.slice(1));let c=this._ref(u.decode(o),{raw:t,wrapped:s});r.push(c),typeof c!=`string`&&(n=!0);let l=e.slice(a+i.length);l&&r.push(u.decode(l))}n?this._template=r:this.rendered=r.join(``)}static date(e,t){return u.dateFormat[t.dateFormat].call(e)}describe(e={}){if(!this._settings&&e.compact)return this.source;let t={template:this.source};return this._settings&&(t.options=this._settings),this._functions&&(t.functions=this._functions),t}static build(e){return new u.Template(e.template,e.options||e.functions?{...e.options,functions:e.functions}:void 0)}isDynamic(){return!!this._template}static isTemplate(e){return!!e&&!!e[s.symbols.template]}refs(){if(!this._template)return;let e=[];for(let t of this._template)typeof t!=`string`&&e.push(...t.refs);return e}resolve(e,t,n,r){return this._template&&this._template.length===1?this._part(this._template[0],e,t,n,r,{}):this.render(e,t,n,r)}_part(e,...t){return e.ref?e.ref.resolve(...t):e.formula.evaluate(t)}render(e,t,n,r,i={}){if(!this.isDynamic())return this.rendered;let o=[];for(let s of this._template)if(typeof s==`string`)o.push(s);else{let c=this._part(s,e,t,n,r,i),l=u.stringify(c,e,t,n,r,i);if(l!==void 0){let e=s.raw||!1===(i.errors&&i.errors.escapeHtml)?l:a(l);o.push(u.wrap(e,s.wrapped&&n.errors.wrap.label))}}return o.join(``)}_ref(e,{raw:t,wrapped:n}){let r=[],i=e=>{let t=l.create(e,this._settings);return r.push(t),e=>{let n=t.resolve(...e);return n===void 0?null:n}};try{let t=this._functions?{...u.functions,...this._functions}:u.functions;var a=new o.Parser(e,{reference:i,functions:t,constants:u.constants})}catch(t){throw t.message=`Invalid template variable "${e}" fails due to: ${t.message}`,t}if(a.single){if(a.single.type===`reference`){let e=r[0];return{ref:e,raw:t,refs:r,wrapped:n||e.type===`local`&&e.key===`label`}}return u.stringify(a.single.value)}return{formula:a,raw:t,refs:r}}toString(){return this.source}},u.Template.prototype[s.symbols.template]=!0,u.Template.prototype.isImmutable=!0,u.encode=function(e){return e.replace(/\\(\{+)/g,(e,t)=>u.opens.slice(0,t.length)).replace(/\\(\}+)/g,(e,t)=>u.closes.slice(0,t.length))},u.decode=function(e){return e.replace(/\u0000/g,`{`).replace(/\u0001/g,`}`)},u.split=function(e){let t=[],n=``;for(let r=0;r<e.length;++r){let i=e[r];if(i===`{`){let i=``;for(;r+1<e.length&&e[r+1]===`{`;)i+=`{`,++r;t.push(n),n=i}else n+=i}return t.push(n),t},u.wrap=function(e,t){return t?t.length===1?`${t}${e}${t}`:`${t[0]}${e}${t[1]}`:e},u.stringify=function(e,t,n,r,i,a={}){let o=typeof e,s=r&&r.errors&&r.errors.wrap||{},c=!1;if(l.isRef(e)&&e.render&&(c=e.in,e=e.resolve(t,n,r,i,{in:e.in,...a})),e===null)return`null`;if(o===`string`)return u.wrap(e,a.arrayItems&&s.string);if(o===`number`||o===`function`||o===`symbol`)return e.toString();if(o!==`object`)return JSON.stringify(e);if(e instanceof Date)return u.Template.date(e,r);if(e instanceof Map){let t=[];for(let[n,r]of e.entries())t.push(`${n.toString()} -> ${r.toString()}`);e=t}if(!Array.isArray(e))return e.toString();let d=[];for(let o of e)d.push(u.stringify(o,t,n,r,i,{arrayItems:!0,...a}));return u.wrap(d.join(`, `),!c&&s.array)},u.constants={true:!0,false:!1,null:null,second:1e3,minute:6e4,hour:36e5,day:864e5},u.functions={if:(e,t,n)=>e?t:n,length:e=>typeof e==`string`?e.length:e&&typeof e==`object`?Array.isArray(e)?e.length:Object.keys(e).length:null,msg(e){let[t,n,r,i,a]=this,o=a.messages;if(!o)return``;let s=c.template(t,o[0],e,n,r)||c.template(t,o[1],e,n,r);return s?s.render(t,n,r,i,a):``},number:e=>typeof e==`number`?e:typeof e==`string`?parseFloat(e):typeof e==`boolean`?e?1:0:e instanceof Date?e.getTime():null}},1626:(e,t,n)=>{let r=n(1528);e.exports=function(e,t,n){return t.replace(/{([^{}]+)}/g,(t,i)=>r(e,i,n)??``)}},1688:(e,t,n)=>{let r=n(1100),i={};i.wrap=r.string().min(1).max(2).allow(!1),t.preferences=r.object({allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),context:r.object(),convert:r.boolean(),dateFormat:r.valid(`date`,`iso`,`string`,`time`,`utc`),debug:r.boolean(),errors:{escapeHtml:r.boolean(),label:r.valid(`path`,`key`,!1),language:[r.string(),r.object().ref()],render:r.boolean(),stack:r.boolean(),wrap:{label:i.wrap,array:i.wrap,string:i.wrap}},externals:r.boolean(),messages:r.object(),noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:r.valid(`required`,`optional`,`forbidden`),skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or(`arrays`,`objects`).allow(!0,!1),warnings:r.boolean()}).strict(),i.nameRx=/^[a-zA-Z0-9]\w*$/,i.rule=r.object({alias:r.array().items(r.string().pattern(i.nameRx)).single(),args:r.array().items(r.string(),r.object({name:r.string().pattern(i.nameRx).required(),ref:r.boolean(),assert:r.alternatives([r.function(),r.object().schema()]).conditional(`ref`,{is:!0,then:r.required()}),normalize:r.function(),message:r.string().when(`assert`,{is:r.function(),then:r.required()})})),convert:r.boolean(),manifest:r.boolean(),method:r.function().allow(!1),multi:r.boolean(),validate:r.function()}),t.extension=r.object({type:r.alternatives([r.string(),r.object().regex()]).required(),args:r.function(),cast:r.object().pattern(i.nameRx,r.object({from:r.function().maxArity(1).required(),to:r.function().minArity(1).maxArity(2).required()})),base:r.object().schema().when(`type`,{is:r.object().regex(),then:r.forbidden()}),coerce:[r.function().maxArity(3),r.object({method:r.function().maxArity(3).required(),from:r.array().items(r.string()).single()})],flags:r.object().pattern(i.nameRx,r.object({setter:r.string(),default:r.any()})),manifest:{build:r.function().arity(2)},messages:[r.object(),r.string()],modifiers:r.object().pattern(i.nameRx,r.function().minArity(1).maxArity(2)),overrides:r.object().pattern(i.nameRx,r.function()),prepare:r.function().maxArity(3),rebuild:r.function().arity(1),rules:r.object().pattern(i.nameRx,i.rule),terms:r.object().pattern(i.nameRx,r.object({init:r.array().allow(null).required(),manifest:r.object().pattern(/.+/,[r.valid(`schema`,`single`),r.object({mapped:r.object({from:r.string().required(),to:r.string().required()}).required()})])})),validate:r.function().maxArity(3)}).strict(),t.extensions=r.array().items(r.object(),r.function().arity(1)).strict(),i.desc={buffer:r.object({buffer:r.string()}),func:r.object({function:r.function().required(),options:{literal:!0}}),override:r.object({override:!0}),ref:r.object({ref:r.object({type:r.valid(`value`,`global`,`local`),path:r.array().required(),separator:r.string().length(1).allow(!1),ancestor:r.number().min(0).integer().allow(`root`),map:r.array().items(r.array().length(2)).min(1),adjust:r.function(),iterables:r.boolean(),in:r.boolean(),render:r.boolean()}).required()}),regex:r.object({regex:r.string().min(3)}),special:r.object({special:r.valid(`deep`).required()}),template:r.object({template:r.string().required(),options:r.object()}),value:r.object({value:r.alternatives([r.object(),r.array()]).required()})},i.desc.entity=r.alternatives([r.array().items(r.link(`...`)),r.boolean(),r.function(),r.number(),r.string(),i.desc.buffer,i.desc.func,i.desc.ref,i.desc.regex,i.desc.special,i.desc.template,i.desc.value,r.link(`/`)]),i.desc.values=r.array().items(null,r.boolean(),r.function(),r.number().allow(1/0,-1/0),r.string().allow(``),r.symbol(),i.desc.buffer,i.desc.func,i.desc.override,i.desc.ref,i.desc.regex,i.desc.template,i.desc.value),i.desc.messages=r.object().pattern(/.+/,[r.string(),i.desc.template,r.object().pattern(/.+/,[r.string(),i.desc.template])]),t.description=r.object({type:r.string().required(),flags:r.object({cast:r.string(),default:r.any(),description:r.string(),empty:r.link(`/`),failover:i.desc.entity,id:r.string(),label:r.string(),only:!0,presence:[`optional`,`required`,`forbidden`],result:[`raw`,`strip`],strip:r.boolean(),unit:r.string()}).unknown(),preferences:{allowUnknown:r.boolean(),abortEarly:r.boolean(),artifacts:r.boolean(),cache:r.boolean(),convert:r.boolean(),dateFormat:[`date`,`iso`,`string`,`time`,`utc`],errors:{escapeHtml:r.boolean(),label:[`path`,`key`],language:[r.string(),i.desc.ref],wrap:{label:i.wrap,array:i.wrap}},externals:r.boolean(),messages:i.desc.messages,noDefaults:r.boolean(),nonEnumerables:r.boolean(),presence:[`required`,`optional`,`forbidden`],skipFunctions:r.boolean(),stripUnknown:r.object({arrays:r.boolean(),objects:r.boolean()}).or(`arrays`,`objects`).allow(!0,!1),warnings:r.boolean()},allow:i.desc.values,invalid:i.desc.values,rules:r.array().min(1).items({name:r.string().required(),args:r.object().min(1),keep:r.boolean(),message:[r.string(),i.desc.messages],warn:r.boolean()}),keys:r.object().pattern(/.*/,r.link(`/`)),link:i.desc.ref}).pattern(/^[a-z]\w*$/,r.any())},1803:e=>{e.exports=class extends Error{constructor(e,t){var n,r,i;super(e||`Unknown error`),n=this,i=`AssertError`,(r=function(e){var t=function(e){if(typeof e!=`object`||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,`string`);if(typeof n!=`object`)return n;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}(e);return typeof t==`symbol`?t:t+``}(r=`name`))in n?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,typeof Error.captureStackTrace==`function`&&Error.captureStackTrace(this,t)}}},2062:(e,t,n)=>{let{assert:r,clone:i}=n(3115),a=n(9415),o=n(6162),s={};t.type=function(e,t){let n=Object.getPrototypeOf(e),c=i(n),l=e._assign(Object.create(c)),u=Object.assign({},t);delete u.base,c._definition=u;let d=n._definition||{};u.messages=o.merge(d.messages,u.messages),u.properties=Object.assign({},d.properties,u.properties),l.type=u.type,u.flags=Object.assign({},d.flags,u.flags);let f=Object.assign({},d.terms);if(u.terms)for(let e in u.terms){let t=u.terms[e];r(l.$_terms[e]===void 0,`Invalid term override for`,u.type,e),l.$_terms[e]=t.init,f[e]=t}u.terms=f,u.args||=d.args,u.prepare=s.prepare(u.prepare,d.prepare),u.coerce&&(typeof u.coerce==`function`&&(u.coerce={method:u.coerce}),u.coerce.from&&!Array.isArray(u.coerce.from)&&(u.coerce={method:u.coerce.method,from:[].concat(u.coerce.from)})),u.coerce=s.coerce(u.coerce,d.coerce),u.validate=s.validate(u.validate,d.validate);let p=Object.assign({},d.rules);if(u.rules)for(let e in u.rules){let t=u.rules[e];r(typeof t==`object`,`Invalid rule definition for`,u.type,e);let n=t.method;if(n===void 0&&(n=function(){return this.$_addRule(e)}),n&&(r(!c[e],`Rule conflict in`,u.type,e),c[e]=n),r(!p[e],`Rule conflict in`,u.type,e),p[e]=t,t.alias){let e=[].concat(t.alias);for(let n of e)c[n]=t.method}t.args&&=(t.argsByName=new Map,t.args.map(e=>(typeof e==`string`&&(e={name:e}),r(!t.argsByName.has(e.name),`Duplicated argument name`,e.name),a.isSchema(e.assert)&&(e.assert=e.assert.strict().label(e.name)),t.argsByName.set(e.name,e),e)))}u.rules=p;let m=Object.assign({},d.modifiers);if(u.modifiers)for(let e in u.modifiers){r(!c[e],`Rule conflict in`,u.type,e);let t=u.modifiers[e];r(typeof t==`function`,`Invalid modifier definition for`,u.type,e),c[e]=function(t){return this.rule({[e]:t})},m[e]=t}if(u.modifiers=m,u.overrides){c._super=n,l.$_super={};for(let e in u.overrides)r(n[e],`Cannot override missing`,e),u.overrides[e][a.symbols.parent]=n[e],l.$_super[e]=n[e].bind(l);Object.assign(c,u.overrides)}u.cast=Object.assign({},d.cast,u.cast);let h=Object.assign({},d.manifest,u.manifest);return h.build=s.build(u.manifest&&u.manifest.build,d.manifest&&d.manifest.build),u.manifest=h,u.rebuild=s.rebuild(u.rebuild,d.rebuild),l},s.build=function(e,t){return e&&t?function(n,r){return t(e(n,r),r)}:e||t},s.coerce=function(e,t){return e&&t?{from:e.from&&t.from?[...new Set([...e.from,...t.from])]:null,method(n,r){let i;if((!t.from||t.from.includes(typeof n))&&(i=t.method(n,r),i)){if(i.errors||i.value===void 0)return i;n=i.value}if(!e.from||e.from.includes(typeof n)){let t=e.method(n,r);if(t)return t}return i}}:e||t},s.prepare=function(e,t){return e&&t?function(n,r){let i=e(n,r);if(i){if(i.errors||i.value===void 0)return i;n=i.value}return t(n,r)||i}:e||t},s.rebuild=function(e,t){return e&&t?function(n){t(n),e(n)}:e||t},s.validate=function(e,t){return e&&t?function(n,r){let i=t(n,r);if(i){if(i.errors&&(!Array.isArray(i.errors)||i.errors.length))return i;n=i.value}return e(n,r)||i}:e||t}},2115:(e,t,n)=>{let{assert:r,clone:i,deepEqual:a,merge:o}=n(3115),s=n(2130),c=n(9415),l=n(3541),u=n(8013),d=n(2062),f=n(9017),p=n(6162),m=n(5844),h=n(8529),g=n(125),_=n(1190),v=n(6220),y={Base:class{constructor(e){this.type=e,this.$_root=null,this._definition={},this._reset()}_reset(){this._ids=new m.Ids,this._preferences=null,this._refs=new h.Manager,this._cache=null,this._valids=null,this._invalids=null,this._flags={},this._rules=[],this._singleRules=new Map,this.$_terms={},this.$_temp={ruleset:null,whens:{}}}describe(){return r(typeof f.describe==`function`,`Manifest functionality disabled`),f.describe(this)}allow(...e){return c.verifyFlat(e,`allow`),this._values(e,`_valids`)}alter(e){r(e&&typeof e==`object`&&!Array.isArray(e),`Invalid targets argument`),r(!this._inRuleset(),`Cannot set alterations inside a ruleset`);let t=this.clone();t.$_terms.alterations=t.$_terms.alterations||[];for(let n in e){let i=e[n];r(typeof i==`function`,`Alteration adjuster for`,n,`must be a function`),t.$_terms.alterations.push({target:n,adjuster:i})}return t.$_temp.ruleset=!1,t}artifact(e){return r(e!==void 0,`Artifact cannot be undefined`),r(!this._cache,`Cannot set an artifact with a rule cache`),this.$_setFlag(`artifact`,e)}cast(e){return r(!1===e||typeof e==`string`,`Invalid to value`),r(!1===e||this._definition.cast[e],`Type`,this.type,`does not support casting to`,e),this.$_setFlag(`cast`,!1===e?void 0:e)}default(e,t){return this._default(`default`,e,t)}description(e){return r(e&&typeof e==`string`,`Description must be a non-empty string`),this.$_setFlag(`description`,e)}empty(e){let t=this.clone();return e!==void 0&&(e=t.$_compile(e,{override:!1})),t.$_setFlag(`empty`,e,{clone:!1})}error(e){return r(e,`Missing error`),r(e instanceof Error||typeof e==`function`,`Must provide a valid Error object or a function`),this.$_setFlag(`error`,e)}example(e,t={}){return r(e!==void 0,`Missing example`),c.assertOptions(t,[`override`]),this._inner(`examples`,e,{single:!0,override:t.override})}external(e,t){return typeof e==`object`&&(r(!t,`Cannot combine options with description`),t=e.description,e=e.method),r(typeof e==`function`,`Method must be a function`),r(t===void 0||t&&typeof t==`string`,`Description must be a non-empty string`),this._inner(`externals`,{method:e,description:t},{single:!0})}failover(e,t){return this._default(`failover`,e,t)}forbidden(){return this.presence(`forbidden`)}id(e){return e?(r(typeof e==`string`,`id must be a non-empty string`),r(/^[^\.]+$/.test(e),`id cannot contain period character`),this.$_setFlag(`id`,e)):this.$_setFlag(`id`,void 0)}invalid(...e){return this._values(e,`_invalids`)}label(e){return r(e&&typeof e==`string`,`Label name must be a non-empty string`),this.$_setFlag(`label`,e)}meta(e){return r(e!==void 0,`Meta cannot be undefined`),this._inner(`metas`,e,{single:!0})}note(...e){r(e.length,`Missing notes`);for(let t of e)r(t&&typeof t==`string`,`Notes must be non-empty strings`);return this._inner(`notes`,e)}only(e=!0){return r(typeof e==`boolean`,`Invalid mode:`,e),this.$_setFlag(`only`,e)}optional(){return this.presence(`optional`)}prefs(e){r(e,`Missing preferences`),r(e.context===void 0,`Cannot override context`),r(e.externals===void 0,`Cannot override externals`),r(e.warnings===void 0,`Cannot override warnings`),r(e.debug===void 0,`Cannot override debug`),c.checkPreferences(e);let t=this.clone();return t._preferences=c.preferences(t._preferences,e),t}presence(e){return r([`optional`,`required`,`forbidden`].includes(e),`Unknown presence mode`,e),this.$_setFlag(`presence`,e)}raw(e=!0){return this.$_setFlag(`result`,e?`raw`:void 0)}result(e){return r([`raw`,`strip`].includes(e),`Unknown result mode`,e),this.$_setFlag(`result`,e)}required(){return this.presence(`required`)}strict(e){let t=this.clone(),n=e!==void 0&&!e;return t._preferences=c.preferences(t._preferences,{convert:n}),t}strip(e=!0){return this.$_setFlag(`result`,e?`strip`:void 0)}tag(...e){r(e.length,`Missing tags`);for(let t of e)r(t&&typeof t==`string`,`Tags must be non-empty strings`);return this._inner(`tags`,e)}unit(e){return r(e&&typeof e==`string`,`Unit name must be a non-empty string`),this.$_setFlag(`unit`,e)}valid(...e){c.verifyFlat(e,`valid`);let t=this.allow(...e);return t.$_setFlag(`only`,!!t._valids,{clone:!1}),t}when(e,t){let n=this.clone();n.$_terms.whens||(n.$_terms.whens=[]);let i=l.when(n,e,t);if(![`any`,`link`].includes(n.type)){let e=i.is?[i]:i.switch;for(let t of e)r(!t.then||t.then.type===`any`||t.then.type===n.type,`Cannot combine`,n.type,`with`,t.then&&t.then.type),r(!t.otherwise||t.otherwise.type===`any`||t.otherwise.type===n.type,`Cannot combine`,n.type,`with`,t.otherwise&&t.otherwise.type)}return n.$_terms.whens.push(i),n.$_mutateRebuild()}cache(e){r(!this._inRuleset(),`Cannot set caching inside a ruleset`),r(!this._cache,`Cannot override schema cache`),r(this._flags.artifact===void 0,`Cannot cache a rule with an artifact`);let t=this.clone();return t._cache=e||s.provider.provision(),t.$_temp.ruleset=!1,t}clone(){let e=Object.create(Object.getPrototypeOf(this));return this._assign(e)}concat(e){r(c.isSchema(e),`Invalid schema object`),r(this.type===`any`||e.type===`any`||e.type===this.type,`Cannot merge type`,this.type,`with another type:`,e.type),r(!this._inRuleset(),`Cannot concatenate onto a schema with open ruleset`),r(!e._inRuleset(),`Cannot concatenate a schema with open ruleset`);let t=this.clone();if(this.type===`any`&&e.type!==`any`){let n=e.clone();for(let e of Object.keys(t))e!==`type`&&(n[e]=t[e]);t=n}t._ids.concat(e._ids),t._refs.register(e,h.toSibling),t._preferences=t._preferences?c.preferences(t._preferences,e._preferences):e._preferences,t._valids=v.merge(t._valids,e._valids,e._invalids),t._invalids=v.merge(t._invalids,e._invalids,e._valids);for(let n of e._singleRules.keys())t._singleRules.has(n)&&(t._rules=t._rules.filter(e=>e.keep||e.name!==n),t._singleRules.delete(n));for(let n of e._rules)e._definition.rules[n.method].multi||t._singleRules.set(n.name,n),t._rules.push(n);if(t._flags.empty&&e._flags.empty){t._flags.empty=t._flags.empty.concat(e._flags.empty);let n=Object.assign({},e._flags);delete n.empty,o(t._flags,n)}else if(e._flags.empty){t._flags.empty=e._flags.empty;let n=Object.assign({},e._flags);delete n.empty,o(t._flags,n)}else o(t._flags,e._flags);for(let n in e.$_terms){let r=e.$_terms[n];r?t.$_terms[n]?t.$_terms[n]=t.$_terms[n].concat(r):t.$_terms[n]=r.slice():t.$_terms[n]||(t.$_terms[n]=r)}return this.$_root._tracer&&this.$_root._tracer._combine(t,[this,e]),t.$_mutateRebuild()}extend(e){return r(!e.base,`Cannot extend type with another base`),d.type(this,e)}extract(e){return e=Array.isArray(e)?e:e.split(`.`),this._ids.reach(e)}fork(e,t){r(!this._inRuleset(),`Cannot fork inside a ruleset`);let n=this;for(let r of[].concat(e))r=Array.isArray(r)?r:r.split(`.`),n=n._ids.fork(r,t,n);return n.$_temp.ruleset=!1,n}isAsync(){if(this.$_terms.externals?.length)return!0;if(this.$_terms.whens)for(let i of this.$_terms.whens){var e,t;if((e=i.then)!=null&&e.isAsync()||(t=i.otherwise)!=null&&t.isAsync())return!0;if(i.switch)for(let e of i.switch){var n,r;if((n=e.then)!=null&&n.isAsync()||(r=e.otherwise)!=null&&r.isAsync())return!0}}return!1}rule(e){let t=this._definition;c.assertOptions(e,Object.keys(t.modifiers)),r(!1!==this.$_temp.ruleset,`Cannot apply rules to empty ruleset or the last rule added does not support rule properties`);let n=this.$_temp.ruleset===null?this._rules.length-1:this.$_temp.ruleset;r(n>=0&&n<this._rules.length,`Cannot apply rules to empty ruleset`);let a=this.clone();for(let o=n;o<a._rules.length;++o){let n=a._rules[o],s=i(n);for(let i in e)t.modifiers[i](s,e[i]),r(s.name===n.name,`Cannot change rule name`);a._rules[o]=s,a._singleRules.get(s.name)===n&&a._singleRules.set(s.name,s)}return a.$_temp.ruleset=!1,a.$_mutateRebuild()}get ruleset(){r(!this._inRuleset(),`Cannot start a new ruleset without closing the previous one`);let e=this.clone();return e.$_temp.ruleset=e._rules.length,e}get $(){return this.ruleset}tailor(e){e=[].concat(e),r(!this._inRuleset(),`Cannot tailor inside a ruleset`);let t=this;if(this.$_terms.alterations)for(let{target:n,adjuster:i}of this.$_terms.alterations)e.includes(n)&&(t=i(t),r(c.isSchema(t),`Alteration adjuster for`,n,`failed to return a schema object`));return t=t.$_modify({each:t=>t.tailor(e),ref:!1}),t.$_temp.ruleset=!1,t.$_mutateRebuild()}tracer(){return g.location?g.location(this):this}validate(e,t){return _.entry(e,this,t)}validateAsync(e,t){return _.entryAsync(e,this,t)}$_addRule(e){typeof e==`string`&&(e={name:e}),r(e&&typeof e==`object`,`Invalid options`),r(e.name&&typeof e.name==`string`,`Invalid rule name`);for(let t in e)r(t[0]!==`_`,`Cannot set private rule properties`);let t=Object.assign({},e);t._resolve=[],t.method=t.method||t.name;let n=this._definition.rules[t.method],i=t.args;r(n,`Unknown rule`,t.method);let a=this.clone();if(i){r(Object.keys(i).length===1||Object.keys(i).length===this._definition.rules[t.name].args.length,`Invalid rule definition for`,this.type,t.name);for(let e in i){let o=i[e];if(n.argsByName){let s=n.argsByName.get(e);if(s.ref&&c.isResolvable(o))t._resolve.push(e),a.$_mutateRegister(o);else if(s.normalize&&(o=s.normalize(o),i[e]=o),s.assert){let t=c.validateArg(o,e,s);r(!t,t,`or reference`)}}o===void 0?delete i[e]:i[e]=o}}return n.multi||(a._ruleRemove(t.name,{clone:!1}),a._singleRules.set(t.name,t)),!1===a.$_temp.ruleset&&(a.$_temp.ruleset=null),n.priority?a._rules.unshift(t):a._rules.push(t),a}$_compile(e,t){return l.schema(this.$_root,e,t)}$_createError(e,t,n,r,i,a={}){let o=!1===a.flags?{}:this._flags,s=a.messages?p.merge(this._definition.messages,a.messages):this._definition.messages;return new u.Report(e,t,n,o,s,r,i)}$_getFlag(e){return this._flags[e]}$_getRule(e){return this._singleRules.get(e)}$_mapLabels(e){return e=Array.isArray(e)?e:e.split(`.`),this._ids.labels(e)}$_match(e,t,n,r){(n=Object.assign({},n)).abortEarly=!0,n._externals=!1,t.snapshot();let i=!_.validate(e,this,t,n,r).errors;return t.restore(),i}$_modify(e){return c.assertOptions(e,[`each`,`once`,`ref`,`schema`]),m.schema(this,e)||this}$_mutateRebuild(){return r(!this._inRuleset(),`Cannot add this rule inside a ruleset`),this._refs.reset(),this._ids.reset(),this.$_modify({each:(e,{source:t,name:n,path:r,key:i})=>{let a=this._definition[t][n]&&this._definition[t][n].register;!1!==a&&this.$_mutateRegister(e,{family:a,key:i})}}),this._definition.rebuild&&this._definition.rebuild(this),this.$_temp.ruleset=!1,this}$_mutateRegister(e,{family:t,key:n}={}){this._refs.register(e,t),this._ids.register(e,{key:n})}$_property(e){return this._definition.properties[e]}$_reach(e){return this._ids.reach(e)}$_rootReferences(){return this._refs.roots()}$_setFlag(e,t,n={}){r(e[0]===`_`||!this._inRuleset(),`Cannot set flag inside a ruleset`);let i=this._definition.flags[e]||{};if(a(t,i.default)&&(t=void 0),a(t,this._flags[e]))return this;let o=!1===n.clone?this:this.clone();return t===void 0?delete o._flags[e]:(o._flags[e]=t,o.$_mutateRegister(t)),e[0]!==`_`&&(o.$_temp.ruleset=!1),o}$_parent(e,...t){return this[e][c.symbols.parent].call(this,...t)}$_validate(e,t,n){return _.validate(e,this,t,n)}_assign(e){e.type=this.type,e.$_root=this.$_root,e.$_temp=Object.assign({},this.$_temp),e.$_temp.whens={},e._ids=this._ids.clone(),e._preferences=this._preferences,e._valids=this._valids&&this._valids.clone(),e._invalids=this._invalids&&this._invalids.clone(),e._rules=this._rules.slice(),e._singleRules=i(this._singleRules,{shallow:!0}),e._refs=this._refs.clone(),e._flags=Object.assign({},this._flags),e._cache=null,e.$_terms={};for(let t in this.$_terms)e.$_terms[t]=this.$_terms[t]?this.$_terms[t].slice():null;e.$_super={};for(let t in this.$_super)e.$_super[t]=this._super[t].bind(e);return e}_bare(){let e=this.clone();e._reset();let t=e._definition.terms;for(let n in t){let r=t[n];e.$_terms[n]=r.init}return e.$_mutateRebuild()}_default(e,t,n={}){return c.assertOptions(n,`literal`),r(t!==void 0,`Missing`,e,`value`),r(typeof t==`function`||!n.literal,`Only function value supports literal option`),typeof t==`function`&&n.literal&&(t={[c.symbols.literal]:!0,literal:t}),this.$_setFlag(e,t)}_generate(e,t,n){if(!this.$_terms.whens)return{schema:this};let r=[],i=[];for(let a=0;a<this.$_terms.whens.length;++a){let o=this.$_terms.whens[a];if(o.concat){r.push(o.concat),i.push(`${a}.concat`);continue}let s=o.ref?o.ref.resolve(e,t,n):e,c=o.is?[o]:o.switch,l=i.length;for(let l=0;l<c.length;++l){let{is:u,then:d,otherwise:f}=c[l],p=`${a}${o.switch?`.`+l:``}`;if(u.$_match(s,t.nest(u,`${p}.is`),n)){if(d){let a=t.localize([...t.path,`${p}.then`],t.ancestors,t.schemas),{schema:o,id:s}=d._generate(e,a,n);r.push(o),i.push(`${p}.then${s?`(${s})`:``}`);break}}else if(f){let a=t.localize([...t.path,`${p}.otherwise`],t.ancestors,t.schemas),{schema:o,id:s}=f._generate(e,a,n);r.push(o),i.push(`${p}.otherwise${s?`(${s})`:``}`);break}}if(o.break&&i.length>l)break}let a=i.join(`, `);if(t.mainstay.tracer.debug(t,`rule`,`when`,a),!a)return{schema:this};if(!t.mainstay.tracer.active&&this.$_temp.whens[a])return{schema:this.$_temp.whens[a],id:a};let o=this;this._definition.generate&&(o=this._definition.generate(this,e,t,n));for(let e of r)o=o.concat(e);return this.$_root._tracer&&this.$_root._tracer._combine(o,[this,...r]),this.$_temp.whens[a]=o,{schema:o,id:a}}_inner(e,t,n={}){r(!this._inRuleset(),`Cannot set ${e} inside a ruleset`);let i=this.clone();return i.$_terms[e]&&!n.override||(i.$_terms[e]=[]),n.single?i.$_terms[e].push(t):i.$_terms[e].push(...t),i.$_temp.ruleset=!1,i}_inRuleset(){return this.$_temp.ruleset!==null&&!1!==this.$_temp.ruleset}_ruleRemove(e,t={}){if(!this._singleRules.has(e))return this;let n=!1===t.clone?this:this.clone();n._singleRules.delete(e);let r=[];for(let t=0;t<n._rules.length;++t){let i=n._rules[t];i.name!==e||i.keep?r.push(i):n._inRuleset()&&t<n.$_temp.ruleset&&--n.$_temp.ruleset}return n._rules=r,n}_values(e,t){c.verifyFlat(e,t.slice(1,-1));let n=this.clone(),i=e[0]===c.symbols.override;if(i&&(e=e.slice(1)),!n[t]&&e.length?n[t]=new v:i&&(n[t]=e.length?new v:null,n.$_mutateRebuild()),!n[t])return n;i&&n[t].override();for(let i of e){r(i!==void 0,`Cannot call allow/valid/invalid with undefined`),r(i!==c.symbols.override,`Override must be the first value`);let e=t===`_invalids`?`_valids`:`_invalids`;n[e]&&(n[e].remove(i),n[e].length||(r(t===`_valids`||!n._flags.only,`Setting invalid value`,i,`leaves schema rejecting all values due to previous valid rule`),n[e]=null)),n[t].add(i,n._refs)}return n}get"~standard"(){let e=e=>{let t;return t=u.ValidationError.isError(e)?e.details.map(({message:e,path:t})=>({message:e,path:t})):[{message:e.message}],{issues:t}},t=e=>({value:e});return{version:1,vendor:`joi`,validate:n=>{let r=_.standard(n,this);return r instanceof Promise?r.then(t,e):r.error?e(r.error):t(r.value)}}}}};y.Base.prototype[c.symbols.any]={version:c.version,compile:l.compile,root:`$_root`},y.Base.prototype.isImmutable=!0,y.Base.prototype.deny=y.Base.prototype.invalid,y.Base.prototype.disallow=y.Base.prototype.invalid,y.Base.prototype.equal=y.Base.prototype.valid,y.Base.prototype.exist=y.Base.prototype.required,y.Base.prototype.not=y.Base.prototype.invalid,y.Base.prototype.options=y.Base.prototype.prefs,y.Base.prototype.preferences=y.Base.prototype.prefs,e.exports=new y.Base},2130:(e,t,n)=>{let{assert:r,clone:i}=n(3115),a=n(9415),o={max:1e3,supported:new Set([`undefined`,`boolean`,`number`,`string`])};t.provider={provision:e=>new o.Cache(e)},o.Cache=class{constructor(e={}){a.assertOptions(e,[`max`]),r(e.max===void 0||e.max&&e.max>0&&isFinite(e.max),`Invalid max cache size`),this._max=e.max||o.max,this._map=new Map,this._list=new o.List}get length(){return this._map.size}set(e,t){if(e!==null&&!o.supported.has(typeof e))return;let n=this._map.get(e);if(n)return n.value=t,void this._list.first(n);n=this._list.unshift({key:e,value:t}),this._map.set(e,n),this._compact()}get(e){let t=this._map.get(e);if(t)return this._list.first(t),i(t.value)}_compact(){if(this._map.size>this._max){let e=this._list.pop();this._map.delete(e.key)}}},o.List=class{constructor(){this.tail=null,this.head=null}unshift(e){return e.next=null,e.prev=this.head,this.head&&(this.head.next=e),this.head=e,this.tail||=e,e}first(e){e!==this.head&&(this._remove(e),this.unshift(e))}pop(){return this._remove(this.tail)}_remove(e){let{next:t,prev:n}=e;return t.prev=n,n&&(n.next=t),e===this.tail&&(this.tail=t),e.prev=null,e.next=null,e}}},2588:(e,t,n)=>{let{assert:r}=n(3115),i=n(680),a=n(9415),o=n(1532),s={isDate:function(e){return e instanceof Date}};e.exports=i.extend({type:`date`,coerce:{from:[`number`,`string`],method:(e,{schema:t})=>({value:s.parse(e,t._flags.format)||e})},validate(e,{schema:t,error:n,prefs:r}){if(e instanceof Date&&!isNaN(e.getTime()))return;let i=t._flags.format;return r.convert&&i&&typeof e==`string`?{value:e,errors:n(`date.format`,{format:i})}:{value:e,errors:n(`date.base`)}},rules:{compare:{method:!1,validate(e,t,{date:n},{name:r,operator:i,args:o}){let s=n===`now`?Date.now():n.getTime();return a.compare(e.getTime(),s,i)?e:t.error(`date.`+r,{limit:o.date,value:e})},args:[{name:`date`,ref:!0,normalize:e=>e===`now`?e:s.parse(e),assert:e=>e!==null,message:`must have a valid date format`}]},format:{method(e){return r([`iso`,`javascript`,`unix`].includes(e),`Unknown date format`,e),this.$_setFlag(`format`,e)}},greater:{method(e){return this.$_addRule({name:`greater`,method:`compare`,args:{date:e},operator:`>`})}},iso:{method(){return this.format(`iso`)}},less:{method(e){return this.$_addRule({name:`less`,method:`compare`,args:{date:e},operator:`<`})}},max:{method(e){return this.$_addRule({name:`max`,method:`compare`,args:{date:e},operator:`<=`})}},min:{method(e){return this.$_addRule({name:`min`,method:`compare`,args:{date:e},operator:`>=`})}},timestamp:{method(e=`javascript`){return r([`javascript`,`unix`].includes(e),`"type" must be one of "javascript, unix"`),this.format(e)}}},cast:{number:{from:s.isDate,to:(e,t)=>e.getTime()},string:{from:s.isDate,to:(e,{prefs:t})=>o.date(e,t)}},messages:{"date.base":`{{#label}} must be a valid date`,"date.format":`{{#label}} must be in {msg("date.format." + #format) || #format} format`,"date.greater":`{{#label}} must be greater than {{:#limit}}`,"date.less":`{{#label}} must be less than {{:#limit}}`,"date.max":`{{#label}} must be less than or equal to {{:#limit}}`,"date.min":`{{#label}} must be greater than or equal to {{:#limit}}`,"date.format.iso":`ISO 8601 date`,"date.format.javascript":`timestamp or number of milliseconds`,"date.format.unix":`timestamp or number of seconds`}}),s.parse=function(e,t){if(e instanceof Date)return e;if(typeof e!=`string`&&(isNaN(e)||!isFinite(e))||/^\s*$/.test(e))return null;if(t===`iso`)return a.isIsoDate(e)?s.date(e.toString()):null;let n=e;if(typeof e==`string`&&/^[+-]?\d+(\.\d+)?$/.test(e)&&(e=parseFloat(e)),t){if(t===`javascript`)return s.date(1*e);if(t===`unix`)return s.date(1e3*e);if(typeof n==`string`)return null}return s.date(e)},s.date=function(e){let t=new Date(e);return isNaN(t.getTime())?null:t}},2591:(e,t,n)=>{let{assert:r,deepEqual:i,reach:a}=n(3115),o=n(680),s=n(9415),c=n(3541),l={};e.exports=o.extend({type:`array`,flags:{single:{default:!1},sparse:{default:!1}},terms:{items:{init:[],manifest:`schema`},ordered:{init:[],manifest:`schema`},_exclusions:{init:[]},_inclusions:{init:[]},_requireds:{init:[]}},coerce:{from:`object`,method(e,{schema:t,state:n,prefs:r}){if(!Array.isArray(e))return;let i=t.$_getRule(`sort`);return i?l.sort(t,e,i.args.options,n,r):void 0}},validate(e,{schema:t,error:n}){if(!Array.isArray(e)){if(t._flags.single){let t=[e];return t[s.symbols.arraySingle]=!0,{value:t}}return{errors:n(`array.base`)}}if(t.$_getRule(`items`)||t.$_terms.externals)return{value:e.slice()}},rules:{has:{method(e){e=this.$_compile(e,{appendPath:!0});let t=this.$_addRule({name:`has`,args:{schema:e}});return t.$_mutateRegister(e),t},validate(e,{state:t,prefs:n,error:r},{schema:i}){let a=[e,...t.ancestors];for(let r=0;r<e.length;++r){let o=t.localize([...t.path,r],a,i);if(i.$_match(e[r],o,n))return e}let o=i._flags.label;return o?r(`array.hasKnown`,{patternLabel:o}):r(`array.hasUnknown`,null)},multi:!0},items:{method(...e){s.verifyFlat(e,`items`);let t=this.$_addRule(`items`);for(let n=0;n<e.length;++n){let r=s.tryWithPath(()=>this.$_compile(e[n]),n,{append:!0});t.$_terms.items.push(r)}return t.$_mutateRebuild()},validate(e,{schema:t,error:n,state:r,prefs:i,errorsArray:a}){let o=t.$_terms._requireds.slice(),c=t.$_terms.ordered.slice(),u=[...t.$_terms._inclusions,...o],d=!e[s.symbols.arraySingle];delete e[s.symbols.arraySingle];let f=a(),p=e.length;for(let a=0;a<p;++a){let s=e[a],m=!1,h=!1,g=d?a:new Number(a),_=[...r.path,g];if(!t._flags.sparse&&s===void 0){if(f.push(n(`array.sparse`,{key:g,path:_,pos:a,value:void 0},r.localize(_))),i.abortEarly)return f;c.shift();continue}let v=[e,...r.ancestors];for(let e of t.$_terms._exclusions)if(e.$_match(s,r.localize(_,v,e),i,{presence:`ignore`})){if(f.push(n(`array.excludes`,{pos:a,value:s},r.localize(_))),i.abortEarly)return f;m=!0,c.shift();break}if(m)continue;if(t.$_terms.ordered.length){if(c.length){let o=c.shift(),u=o.$_validate(s,r.localize(_,v,o),i);if(u.errors){if(f.push(...u.errors),i.abortEarly)return f}else if(o._flags.result===`strip`)l.fastSplice(e,a),--a,--p;else{if(!t._flags.sparse&&u.value===void 0){if(f.push(n(`array.sparse`,{key:g,path:_,pos:a,value:void 0},r.localize(_))),i.abortEarly)return f;continue}e[a]=u.value}continue}if(!t.$_terms.items.length){if(f.push(n(`array.orderedLength`,{pos:a,limit:t.$_terms.ordered.length})),i.abortEarly)return f;break}}let y=[],b=o.length;for(let c=0;c<b;++c){let u=r.localize(_,v,o[c]);u.snapshot();let d=o[c].$_validate(s,u,i);if(y[c]=d,!d.errors){if(u.commit(),e[a]=d.value,h=!0,l.fastSplice(o,c),--c,--b,!t._flags.sparse&&d.value===void 0&&(f.push(n(`array.sparse`,{key:g,path:_,pos:a,value:void 0},r.localize(_))),i.abortEarly))return f;break}u.restore()}if(h)continue;let x=i.stripUnknown&&!!i.stripUnknown.arrays||!1;b=u.length;for(let c of u){let u,d=o.indexOf(c);if(d!==-1)u=y[d];else{let o=r.localize(_,v,c);if(o.snapshot(),u=c.$_validate(s,o,i),!u.errors){o.commit(),c._flags.result===`strip`?(l.fastSplice(e,a),--a,--p):t._flags.sparse||u.value!==void 0?e[a]=u.value:(f.push(n(`array.sparse`,{key:g,path:_,pos:a,value:void 0},r.localize(_))),m=!0),h=!0;break}o.restore()}if(b===1){if(x){l.fastSplice(e,a),--a,--p,h=!0;break}if(f.push(...u.errors),i.abortEarly)return f;m=!0;break}}if(!m&&(t.$_terms._inclusions.length||t.$_terms._requireds.length)&&!h){if(x){l.fastSplice(e,a),--a,--p;continue}if(f.push(n(`array.includes`,{pos:a,value:s},r.localize(_))),i.abortEarly)return f}}return o.length&&l.fillMissedErrors(t,f,o,e,r,i),c.length&&(l.fillOrderedErrors(t,f,c,e,r,i),f.length||l.fillDefault(c,e,r,i)),f.length?f:e},priority:!0,manifest:!1},length:{method(e){return this.$_addRule({name:`length`,args:{limit:e},operator:`=`})},validate:(e,t,{limit:n},{name:r,operator:i,args:a})=>s.compare(e.length,n,i)?e:t.error(`array.`+r,{limit:a.limit,value:e}),args:[{name:`limit`,ref:!0,assert:s.limit,message:`must be a positive integer`}]},max:{method(e){return this.$_addRule({name:`max`,method:`length`,args:{limit:e},operator:`<=`})}},min:{method(e){return this.$_addRule({name:`min`,method:`length`,args:{limit:e},operator:`>=`})}},ordered:{method(...e){s.verifyFlat(e,`ordered`);let t=this.$_addRule(`items`);for(let n=0;n<e.length;++n){let r=s.tryWithPath(()=>this.$_compile(e[n]),n,{append:!0});l.validateSingle(r,t),t.$_mutateRegister(r),t.$_terms.ordered.push(r)}return t.$_mutateRebuild()}},single:{method(e){let t=e===void 0||!!e;return r(!t||!this._flags._arrayItems,`Cannot specify single rule when array has array items`),this.$_setFlag(`single`,t)}},sort:{method(e={}){s.assertOptions(e,[`by`,`order`]);let t={order:e.order||`ascending`};return e.by&&(t.by=c.ref(e.by,{ancestor:0}),r(!t.by.ancestor,`Cannot sort by ancestor`)),this.$_addRule({name:`sort`,args:{options:t}})},validate(e,{error:t,state:n,prefs:r,schema:i},{options:a}){let{value:o,errors:s}=l.sort(i,e,a,n,r);if(s)return s;for(let n=0;n<e.length;++n)if(e[n]!==o[n])return t(`array.sort`,{order:a.order,by:a.by?a.by.key:`value`});return e},convert:!0},sparse:{method(e){let t=e===void 0||!!e;return this._flags.sparse===t?this:(t?this.clone():this.$_addRule(`items`)).$_setFlag(`sparse`,t,{clone:!1})}},unique:{method(e,t={}){r(!e||typeof e==`function`||typeof e==`string`,`comparator must be a function or a string`),s.assertOptions(t,[`ignoreUndefined`,`separator`]);let n={name:`unique`,args:{options:t,comparator:e}};if(e)if(typeof e==`string`){let r=s.default(t.separator,`.`);n.path=r?e.split(r):[e]}else n.comparator=e;return this.$_addRule(n)},validate(e,{state:t,error:n,schema:o},{comparator:s,options:c},{comparator:l,path:u}){let d={string:Object.create(null),number:Object.create(null),undefined:Object.create(null),boolean:Object.create(null),bigint:Object.create(null),object:new Map,function:new Map,custom:new Map},f=l||i,p=c.ignoreUndefined;for(let i=0;i<e.length;++i){let o=u?a(e[i],u):e[i],c=l?d.custom:d[typeof o];if(r(c,`Failed to find unique map container for type`,typeof o),c instanceof Map){let r=c.entries(),a;for(;!(a=r.next()).done;)if(f(a.value[0],o)){let r=t.localize([...t.path,i],[e,...t.ancestors]),o={pos:i,value:e[i],dupePos:a.value[1],dupeValue:e[a.value[1]]};return u&&(o.path=s),n(`array.unique`,o,r)}c.set(o,i)}else{if((!p||o!==void 0)&&c[o]!==void 0){let r={pos:i,value:e[i],dupePos:c[o],dupeValue:e[c[o]]};return u&&(r.path=s),n(`array.unique`,r,t.localize([...t.path,i],[e,...t.ancestors]))}c[o]=i}}return e},args:[`comparator`,`options`],multi:!0}},overrides:{isAsync(){var e;if((e=this.$_terms.externals)!=null&&e.length)return!0;for(let e of this.$_terms.items)if(e.isAsync())return!0;for(let e of this.$_terms.ordered)if(e.isAsync())return!0;return!1}},cast:{set:{from:Array.isArray,to:(e,t)=>new Set(e)}},rebuild(e){e.$_terms._inclusions=[],e.$_terms._exclusions=[],e.$_terms._requireds=[];for(let t of e.$_terms.items)l.validateSingle(t,e),t._flags.presence===`required`?e.$_terms._requireds.push(t):t._flags.presence===`forbidden`?e.$_terms._exclusions.push(t):e.$_terms._inclusions.push(t);for(let t of e.$_terms.ordered)l.validateSingle(t,e)},manifest:{build:(e,t)=>(t.items&&(e=e.items(...t.items)),t.ordered&&(e=e.ordered(...t.ordered)),e)},messages:{"array.base":`{{#label}} must be an array`,"array.excludes":`{{#label}} contains an excluded value`,"array.hasKnown":`{{#label}} does not contain at least one required match for type {:#patternLabel}`,"array.hasUnknown":`{{#label}} does not contain at least one required match`,"array.includes":`{{#label}} does not match any of the allowed types`,"array.includesRequiredBoth":`{{#label}} does not contain {{#knownMisses}} and {{#unknownMisses}} other required value(s)`,"array.includesRequiredKnowns":`{{#label}} does not contain {{#knownMisses}}`,"array.includesRequiredUnknowns":`{{#label}} does not contain {{#unknownMisses}} required value(s)`,"array.length":`{{#label}} must contain {{#limit}} items`,"array.max":`{{#label}} must contain less than or equal to {{#limit}} items`,"array.min":`{{#label}} must contain at least {{#limit}} items`,"array.orderedLength":`{{#label}} must contain at most {{#limit}} items`,"array.sort":`{{#label}} must be sorted in {#order} order by {{#by}}`,"array.sort.mismatching":`{{#label}} cannot be sorted due to mismatching types`,"array.sort.unsupported":`{{#label}} cannot be sorted due to unsupported type {#type}`,"array.sparse":`{{#label}} must not be a sparse array item`,"array.unique":`{{#label}} contains a duplicate value`}}),l.fillMissedErrors=function(e,t,n,r,i,a){let o=[],s=0;for(let e of n){let t=e._flags.label;t?o.push(t):++s}o.length?s?t.push(e.$_createError(`array.includesRequiredBoth`,r,{knownMisses:o,unknownMisses:s},i,a)):t.push(e.$_createError(`array.includesRequiredKnowns`,r,{knownMisses:o},i,a)):t.push(e.$_createError(`array.includesRequiredUnknowns`,r,{unknownMisses:s},i,a))},l.fillOrderedErrors=function(e,t,n,r,i,a){let o=[];for(let e of n)e._flags.presence===`required`&&o.push(e);o.length&&l.fillMissedErrors(e,t,o,r,i,a)},l.fillDefault=function(e,t,n,r){let i=[],a=!0;for(let o=e.length-1;o>=0;--o){let s=e[o],c=[t,...n.ancestors],l=s.$_validate(void 0,n.localize(n.path,c,s),r).value;if(a){if(l===void 0)continue;a=!1}i.unshift(l)}i.length&&t.push(...i)},l.fastSplice=function(e,t){let n=t;for(;n<e.length;)e[n++]=e[n];--e.length},l.validateSingle=function(e,t){(e.type===`array`||e._flags._arrayItems)&&(r(!t._flags.single,`Cannot specify array item with single rule enabled`),t.$_setFlag(`_arrayItems`,!0,{clone:!1}))},l.sort=function(e,t,n,r,i){let a=n.order===`ascending`?1:-1,o=-1*a,s=a,c=(c,u)=>{let d=l.compare(c,u,o,s);if(d!==null||(n.by&&(c=n.by.resolve(c,r,i),u=n.by.resolve(u,r,i)),d=l.compare(c,u,o,s),d!==null))return d;let f=typeof c;if(f!==typeof u)throw e.$_createError(`array.sort.mismatching`,t,null,r,i);if(f!==`number`&&f!==`string`)throw e.$_createError(`array.sort.unsupported`,t,{type:f},r,i);return f===`number`?(c-u)*a:c<u?o:s};try{return{value:t.slice().sort(c)}}catch(e){return{errors:e}}},l.compare=function(e,t,n,r){return e===t?0:e===void 0?1:t===void 0?-1:e===null?r:t===null?n:null}},2847:(e,t,n)=>{let r=n(8253),i=n(7125),a=n(8669),o=n(86),s={};e.exports=function(e,t,n={}){return typeof t!=`object`&&(t=[t]),r(!Array.isArray(t)||t.length,`Values array cannot be empty`),typeof e==`string`?s.string(e,t,n):Array.isArray(e)?s.array(e,t,n):(r(typeof e==`object`,`Reference must be string or an object`),s.object(e,t,n))},s.array=function(e,t,n){if(Array.isArray(t)||(t=[t]),!e.length||n.only&&n.once&&e.length!==t.length)return!1;let r,i=new Map;for(let e of t)if(n.deep&&e&&typeof e==`object`){r??=s.compare(n);let t=!1;for(let[n,a]of i.entries())if(r(n,e)){++a.allowed,t=!0;break}t||i.set(e,{allowed:1,hits:0})}else{let t=i.get(e);t?++t.allowed:i.set(e,{allowed:1,hits:0})}let a=0;for(let t of e){let e;if(n.deep&&t&&typeof t==`object`){r??=s.compare(n);for(let[n,a]of i.entries())if(r(n,t)){e=a;break}}else e=i.get(t);if(e&&(++e.hits,++a,n.once&&e.hits>e.allowed))return!1}if(n.only&&a!==e.length)return!1;for(let e of i.values())if(e.hits!==e.allowed&&e.hits<e.allowed&&!n.part)return!1;return!!a},s.object=function(e,t,n){r(n.once===void 0,`Cannot use option once with object`);let i=o.keys(e,n);if(!i.length)return!1;if(Array.isArray(t))return s.array(i,t,n);let a=Object.getOwnPropertySymbols(t).filter(e=>t.propertyIsEnumerable(e)),c=[...Object.keys(t),...a],l=s.compare(n),u=new Set(c);for(let r of i)if(u.has(r)){if(!l(t[r],e[r]))return!1;u.delete(r)}else if(n.only)return!1;return!u.size||!!n.part&&u.size<c.length},s.string=function(e,t,n){if(e===``)return t.length===1&&t[0]===``||!n.once&&!t.some(e=>e!==``);let i=new Map,o=[];for(let e of t)if(r(typeof e==`string`,`Cannot compare string reference to non-string value`),e){let t=i.get(e);t?++t.allowed:(i.set(e,{allowed:1,hits:0}),o.push(a(e)))}else if(n.once||n.only)return!1;if(!o.length)return!0;let s=RegExp(`(${o.join(`|`)})`,`g`),c=e.replace(s,(e,t)=>(++i.get(t).hits,``));if(n.only&&c)return!1;let l=!1;for(let e of i.values())if(e.hits&&(l=!0),e.hits!==e.allowed&&(e.hits<e.allowed&&!n.part||n.once))return!1;return!!l},s.compare=function(e){if(!e.deep)return s.shallow;let t=e.only!==void 0,n=e.part!==void 0,r={prototype:t?e.only:!!n&&!e.part,part:t?!e.only:!!n&&e.part};return(e,t)=>i(e,t,r)},s.shallow=function(e,t){return e===t}},2888:(e,t,n)=>{let{applyToDefaults:r,assert:i,clone:a}=n(3115),o=n(8248),s=n(680),c=n(9415),l=n(3541),u=n(8013),d=n(8529),f=n(1532),p={renameDefaults:{alias:!1,multiple:!1,override:!1}};e.exports=s.extend({type:`_keys`,properties:{typeof:`object`},flags:{unknown:{default:void 0}},terms:{dependencies:{init:null},keys:{init:null,manifest:{mapped:{from:`schema`,to:`key`}}},patterns:{init:null},renames:{init:null}},args:(e,t)=>e.keys(t),validate(e,{schema:t,error:n,state:r,prefs:i}){if(!e||typeof e!==t.$_property(`typeof`)||Array.isArray(e))return{value:e,errors:n(`object.base`,{type:t.$_property(`typeof`)})};if(!(t.$_terms.renames||t.$_terms.dependencies||t.$_terms.keys||t.$_terms.patterns||t.$_terms.externals))return;e=p.clone(e,i);let a=[];if(t.$_terms.renames&&!p.rename(t,e,r,i,a)||!t.$_terms.keys&&!t.$_terms.patterns&&!t.$_terms.dependencies)return{value:e,errors:a};let o=new Set(Object.keys(e));if(t.$_terms.keys){let n=[e,...r.ancestors];for(let s of t.$_terms.keys){let t=s.key,c=e[t];o.delete(t);let l=r.localize([...r.path,t],n,s),u=s.schema.$_validate(c,l,i);if(u.errors){if(i.abortEarly)return{value:e,errors:u.errors};u.value!==void 0&&(e[t]=u.value),a.push(...u.errors)}else s.schema._flags.result===`strip`||u.value===void 0&&c!==void 0?delete e[t]:u.value!==void 0&&(e[t]=u.value)}}if(o.size||t._flags._hasPatternMatch){let n=p.unknown(t,e,o,a,r,i);if(n)return n}if(t.$_terms.dependencies)for(let n of t.$_terms.dependencies){if(n.key!==null&&!1===p.isPresent(n.options)(n.key.resolve(e,r,i,null,{shadow:!1})))continue;let o=p.dependencies[n.rel](t,n,e,r,i);if(o){let n=t.$_createError(o.code,e,o.context,r,i);if(i.abortEarly)return{value:e,errors:n};a.push(n)}}return{value:e,errors:a}},rules:{and:{method(...e){return c.verifyFlat(e,`and`),p.dependency(this,`and`,null,e)}},append:{method(e){return e==null||Object.keys(e).length===0?this:this.keys(e)}},assert:{method(e,t,n){f.isTemplate(e)||(e=l.ref(e)),i(n===void 0||typeof n==`string`,`Message must be a string`),t=this.$_compile(t,{appendPath:!0});let r=this.$_addRule({name:`assert`,args:{subject:e,schema:t,message:n}});return r.$_mutateRegister(e),r.$_mutateRegister(t),r},validate(e,{error:t,prefs:n,state:r},{subject:i,schema:a,message:o}){let s=i.resolve(e,r,n),c=d.isRef(i)?i.absolute(r):[];return a.$_match(s,r.localize(c,[e,...r.ancestors],a),n)?e:t(`object.assert`,{subject:i,message:o})},args:[`subject`,`schema`,`message`],multi:!0},instance:{method(e,t){return i(typeof e==`function`,`constructor must be a function`),t||=e.name,this.$_addRule({name:`instance`,args:{constructor:e,name:t}})},validate:(e,t,{constructor:n,name:r})=>e instanceof n?e:t.error(`object.instance`,{type:r,value:e}),args:[`constructor`,`name`]},keys:{method(e){i(e===void 0||typeof e==`object`,`Object schema must be a valid object`),i(!c.isSchema(e),`Object schema cannot be a joi schema`);let t=this.clone();if(e)if(Object.keys(e).length){t.$_terms.keys=t.$_terms.keys?t.$_terms.keys.filter(t=>!e.hasOwnProperty(t.key)):new p.Keys;for(let n in e)c.tryWithPath(()=>t.$_terms.keys.push({key:n,schema:this.$_compile(e[n])}),n)}else t.$_terms.keys=new p.Keys;else t.$_terms.keys=null;return t.$_mutateRebuild()}},length:{method(e){return this.$_addRule({name:`length`,args:{limit:e},operator:`=`})},validate:(e,t,{limit:n},{name:r,operator:i,args:a})=>c.compare(Object.keys(e).length,n,i)?e:t.error(`object.`+r,{limit:a.limit,value:e}),args:[{name:`limit`,ref:!0,assert:c.limit,message:`must be a positive integer`}]},max:{method(e){return this.$_addRule({name:`max`,method:`length`,args:{limit:e},operator:`<=`})}},min:{method(e){return this.$_addRule({name:`min`,method:`length`,args:{limit:e},operator:`>=`})}},nand:{method(...e){return c.verifyFlat(e,`nand`),p.dependency(this,`nand`,null,e)}},or:{method(...e){return c.verifyFlat(e,`or`),p.dependency(this,`or`,null,e)}},oxor:{method(...e){return p.dependency(this,`oxor`,null,e)}},pattern:{method(e,t,n={}){let r=e instanceof RegExp;r||(e=this.$_compile(e,{appendPath:!0})),i(t!==void 0,`Invalid rule`),c.assertOptions(n,[`fallthrough`,`matches`]),r&&i(!e.flags.includes(`g`)&&!e.flags.includes(`y`),`pattern should not use global or sticky mode`),t=this.$_compile(t,{appendPath:!0});let a=this.clone();a.$_terms.patterns=a.$_terms.patterns||[];let o={[r?`regex`:`schema`]:e,rule:t};return n.matches&&(o.matches=this.$_compile(n.matches),o.matches.type!==`array`&&(o.matches=o.matches.$_root.array().items(o.matches)),a.$_mutateRegister(o.matches),a.$_setFlag(`_hasPatternMatch`,!0,{clone:!1})),n.fallthrough&&(o.fallthrough=!0),a.$_terms.patterns.push(o),a.$_mutateRegister(t),a}},ref:{method(){return this.$_addRule(`ref`)},validate:(e,t)=>d.isRef(e)?e:t.error(`object.refType`,{value:e})},regex:{method(){return this.$_addRule(`regex`)},validate:(e,t)=>e instanceof RegExp?e:t.error(`object.regex`,{value:e})},rename:{method(e,t,n={}){i(typeof e==`string`||e instanceof RegExp,`Rename missing the from argument`),i(typeof t==`string`||t instanceof f,`Invalid rename to argument`),i(t!==e,`Cannot rename key to same name:`,e),c.assertOptions(n,[`alias`,`ignoreUndefined`,`override`,`multiple`]);let a=this.clone();a.$_terms.renames=a.$_terms.renames||[];for(let t of a.$_terms.renames)i(t.from!==e,`Cannot rename the same key multiple times`);return t instanceof f&&a.$_mutateRegister(t),a.$_terms.renames.push({from:e,to:t,options:r(p.renameDefaults,n)}),a}},schema:{method(e=`any`){return this.$_addRule({name:`schema`,args:{type:e}})},validate:(e,t,{type:n})=>!c.isSchema(e)||n!==`any`&&e.type!==n?t.error(`object.schema`,{type:n}):e},unknown:{method(e){return this.$_setFlag(`unknown`,!1!==e)}},with:{method(e,t,n={}){return p.dependency(this,`with`,e,t,n)}},without:{method(e,t,n={}){return p.dependency(this,`without`,e,t,n)}},xor:{method(...e){return c.verifyFlat(e,`xor`),p.dependency(this,`xor`,null,e)}}},overrides:{default(e,t){return e===void 0&&(e=c.symbols.deepDefault),this.$_parent(`default`,e,t)},isAsync(){var e,t,n;if((e=this.$_terms.externals)!=null&&e.length)return!0;if((t=this.$_terms.keys)!=null&&t.length){for(let e of this.$_terms.keys)if(e.schema.isAsync())return!0}if((n=this.$_terms.patterns)!=null&&n.length){for(let e of this.$_terms.patterns)if(e.rule.isAsync())return!0}return!1}},rebuild(e){if(e.$_terms.keys){let t=new o.Sorter;for(let n of e.$_terms.keys)c.tryWithPath(()=>t.add(n,{after:n.schema.$_rootReferences(),group:n.key}),n.key);e.$_terms.keys=new p.Keys(...t.nodes)}},manifest:{build(e,t){if(t.keys&&(e=e.keys(t.keys)),t.dependencies)for(let{rel:n,key:r=null,peers:i,options:a}of t.dependencies)e=p.dependency(e,n,r,i,a);if(t.patterns)for(let{regex:n,schema:r,rule:i,fallthrough:a,matches:o}of t.patterns)e=e.pattern(n||r,i,{fallthrough:a,matches:o});if(t.renames)for(let{from:n,to:r,options:i}of t.renames)e=e.rename(n,r,i);return e}},messages:{"object.and":`{{#label}} contains {{#presentWithLabels}} without its required peers {{#missingWithLabels}}`,"object.assert":'{{#label}} is invalid because {if(#subject.key, `"` + #subject.key + `" failed to ` + (#message || "pass the assertion test"), #message || "the assertion failed")}',"object.base":`{{#label}} must be of type {{#type}}`,"object.instance":`{{#label}} must be an instance of {{:#type}}`,"object.length":`{{#label}} must have {{#limit}} key{if(#limit == 1, "", "s")}`,"object.max":`{{#label}} must have less than or equal to {{#limit}} key{if(#limit == 1, "", "s")}`,"object.min":`{{#label}} must have at least {{#limit}} key{if(#limit == 1, "", "s")}`,"object.missing":`{{#label}} must contain at least one of {{#peersWithLabels}}`,"object.nand":`{{:#mainWithLabel}} must not exist simultaneously with {{#peersWithLabels}}`,"object.oxor":`{{#label}} contains a conflict between optional exclusive peers {{#peersWithLabels}}`,"object.pattern.match":`{{#label}} keys failed to match pattern requirements`,"object.refType":`{{#label}} must be a Joi reference`,"object.regex":`{{#label}} must be a RegExp object`,"object.rename.multiple":`{{#label}} cannot rename {{:#from}} because multiple renames are disabled and another key was already renamed to {{:#to}}`,"object.rename.override":`{{#label}} cannot rename {{:#from}} because override is disabled and target {{:#to}} exists`,"object.schema":`{{#label}} must be a Joi schema of {{#type}} type`,"object.unknown":`{{#label}} is not allowed`,"object.with":`{{:#mainWithLabel}} missing required peer {{:#peerWithLabel}}`,"object.without":`{{:#mainWithLabel}} conflict with forbidden peer {{:#peerWithLabel}}`,"object.xor":`{{#label}} contains a conflict between exclusive peers {{#peersWithLabels}}`}}),p.clone=function(e,t){if(typeof e==`object`){if(t.nonEnumerables)return a(e,{shallow:!0});let n=Object.create(Object.getPrototypeOf(e));return Object.assign(n,e),n}let n=function(...t){return e.apply(this,t)};return n.prototype=a(e.prototype),Object.defineProperty(n,`name`,{value:e.name,writable:!1}),Object.defineProperty(n,`length`,{value:e.length,writable:!1}),Object.assign(n,e),n},p.dependency=function(e,t,n,r,a){i(n===null||typeof n==`string`,t,`key must be a strings`),a||=r.length>1&&typeof r[r.length-1]==`object`?r.pop():{},c.assertOptions(a,[`separator`,`isPresent`]),r=[].concat(r);let o=c.default(a.separator,`.`),s=[];for(let e of r)i(typeof e==`string`,t,`peers must be strings`),s.push(l.ref(e,{separator:o,ancestor:0,prefix:!1}));n!==null&&(n=l.ref(n,{separator:o,ancestor:0,prefix:!1}));let u=e.clone();return u.$_terms.dependencies=u.$_terms.dependencies||[],u.$_terms.dependencies.push(new p.Dependency(t,n,s,r,a)),u},p.dependencies={and(e,t,n,r,i){let a=[],o=[],s=t.peers.length,c=p.isPresent(t.options);for(let e of t.peers)!1===c(e.resolve(n,r,i,null,{shadow:!1}))?a.push(e.key):o.push(e.key);if(a.length!==s&&o.length!==s)return{code:`object.and`,context:{present:o,presentWithLabels:p.keysToLabels(e,o),missing:a,missingWithLabels:p.keysToLabels(e,a)}}},nand(e,t,n,r,i){let a=[],o=p.isPresent(t.options);for(let e of t.peers)o(e.resolve(n,r,i,null,{shadow:!1}))&&a.push(e.key);if(a.length!==t.peers.length)return;let s=t.paths[0],c=t.paths.slice(1);return{code:`object.nand`,context:{main:s,mainWithLabel:p.keysToLabels(e,s),peers:c,peersWithLabels:p.keysToLabels(e,c)}}},or(e,t,n,r,i){let a=p.isPresent(t.options);for(let e of t.peers)if(a(e.resolve(n,r,i,null,{shadow:!1})))return;return{code:`object.missing`,context:{peers:t.paths,peersWithLabels:p.keysToLabels(e,t.paths)}}},oxor(e,t,n,r,i){let a=[],o=p.isPresent(t.options);for(let e of t.peers)o(e.resolve(n,r,i,null,{shadow:!1}))&&a.push(e.key);if(!a.length||a.length===1)return;let s={peers:t.paths,peersWithLabels:p.keysToLabels(e,t.paths)};return s.present=a,s.presentWithLabels=p.keysToLabels(e,a),{code:`object.oxor`,context:s}},with(e,t,n,r,i){let a=p.isPresent(t.options);for(let o of t.peers)if(!1===a(o.resolve(n,r,i,null,{shadow:!1})))return{code:`object.with`,context:{main:t.key.key,mainWithLabel:p.keysToLabels(e,t.key.key),peer:o.key,peerWithLabel:p.keysToLabels(e,o.key)}}},without(e,t,n,r,i){let a=p.isPresent(t.options);for(let o of t.peers)if(a(o.resolve(n,r,i,null,{shadow:!1})))return{code:`object.without`,context:{main:t.key.key,mainWithLabel:p.keysToLabels(e,t.key.key),peer:o.key,peerWithLabel:p.keysToLabels(e,o.key)}}},xor(e,t,n,r,i){let a=[],o=p.isPresent(t.options);for(let e of t.peers)o(e.resolve(n,r,i,null,{shadow:!1}))&&a.push(e.key);if(a.length===1)return;let s={peers:t.paths,peersWithLabels:p.keysToLabels(e,t.paths)};return a.length===0?{code:`object.missing`,context:s}:(s.present=a,s.presentWithLabels=p.keysToLabels(e,a),{code:`object.xor`,context:s})}},p.keysToLabels=function(e,t){return Array.isArray(t)?t.map(t=>e.$_mapLabels(t)):e.$_mapLabels(t)},p.isPresent=function(e){return typeof e.isPresent==`function`?e.isPresent:e=>e!==void 0},p.rename=function(e,t,n,r,i){let a={};for(let o of e.$_terms.renames){let s=[],c=typeof o.from!=`string`;if(c)for(let e in t){if(t[e]===void 0&&o.options.ignoreUndefined||e===o.to)continue;let n=o.from.exec(e);n&&s.push({from:e,to:o.to,match:n})}else !Object.prototype.hasOwnProperty.call(t,o.from)||t[o.from]===void 0&&o.options.ignoreUndefined||s.push(o);for(let l of s){let s=l.from,u=l.to;if(u instanceof f&&(u=u.render(t,n,r,l.match)),s!==u){if(!o.options.multiple&&a[u]&&(i.push(e.$_createError(`object.rename.multiple`,t,{from:s,to:u,pattern:c},n,r)),r.abortEarly)||Object.prototype.hasOwnProperty.call(t,u)&&!o.options.override&&!a[u]&&(i.push(e.$_createError(`object.rename.override`,t,{from:s,to:u,pattern:c},n,r)),r.abortEarly))return!1;t[s]===void 0?delete t[u]:t[u]=t[s],a[u]=!0,o.options.alias||delete t[s]}}}return!0},p.unknown=function(e,t,n,r,i,a){if(e.$_terms.patterns){let o=!1,s=e.$_terms.patterns.map(e=>{if(e.matches)return o=!0,[]}),c=[t,...i.ancestors];for(let o of n){let l=t[o],u=[...i.path,o];for(let d=0;d<e.$_terms.patterns.length;++d){let f=e.$_terms.patterns[d];if(f.regex){let e=f.regex.test(o);if(i.mainstay.tracer.debug(i,`rule`,`pattern.${d}`,e?`pass`:`error`),!e)continue}else if(!f.schema.$_match(o,i.nest(f.schema,`pattern.${d}`),a))continue;n.delete(o);let p=i.localize(u,c,{schema:f.rule,key:o}),m=f.rule.$_validate(l,p,a);if(m.errors){if(a.abortEarly)return{value:t,errors:m.errors};r.push(...m.errors)}if(f.matches&&s[d].push(o),t[o]=m.value,!f.fallthrough)break}}if(o)for(let n=0;n<s.length;++n){let o=s[n];if(!o)continue;let l=e.$_terms.patterns[n].matches,d=i.localize(i.path,c,l),f=l.$_validate(o,d,a);if(f.errors){let n=u.details(f.errors,{override:!1});n.matches=o;let s=e.$_createError(`object.pattern.match`,t,n,i,a);if(a.abortEarly)return{value:t,errors:s};r.push(s)}}}if(n.size&&(e.$_terms.keys||e.$_terms.patterns)){if(a.stripUnknown&&e._flags.unknown===void 0||a.skipFunctions){let e=!(!a.stripUnknown||!0!==a.stripUnknown&&!a.stripUnknown.objects);for(let r of n)e?(delete t[r],n.delete(r)):typeof t[r]==`function`&&n.delete(r)}if(!c.default(e._flags.unknown,a.allowUnknown))for(let o of n){let n=i.localize([...i.path,o],[]),s=e.$_createError(`object.unknown`,t[o],{child:o},n,a,{flags:!1});if(a.abortEarly)return{value:t,errors:s};r.push(s)}}},p.Dependency=class{constructor(e,t,n,r,i){this.rel=e,this.key=t,this.peers=n,this.paths=r,this.options=i}describe(){let e={rel:this.rel,peers:this.paths};return this.key!==null&&(e.key=this.key.key),this.peers[0].separator!==`.`&&(e.options={...e.options,separator:this.peers[0].separator}),this.options.isPresent&&(e.options={...e.options,isPresent:this.options.isPresent}),e}},p.Keys=class extends Array{concat(e){let t=this.slice(),n=new Map;for(let e=0;e<t.length;++e)n.set(t[e].key,e);for(let r of e){let e=r.key,i=n.get(e);i===void 0?t.push(r):t[i]={key:e,schema:t[i].schema.concat(r.schema)}}return t}}},3110:e=>{let t={};e.exports=function(e,n,r={}){if(!e||!n)return r.first?null:[];let i=[],a=Array.isArray(e)?new Set(e):e,o=new Set;for(let e of n)if(t.has(a,e)&&!o.has(e)){if(r.first)return e;i.push(e),o.add(e)}return r.first?null:i},t.has=function(e,t){return typeof e.has==`function`?e.has(t):e[t]!==void 0}},3115:(e,t,n)=>{t.applyToDefaults=n(6084),t.assert=n(8253),t.AssertError=n(1803),t.Bench=n(9145),t.block=n(3386),t.clone=n(4126),t.contain=n(2847),t.deepEqual=n(7125),t.escapeHeaderAttribute=n(9241),t.escapeHtml=n(8121),t.escapeJson=n(5570),t.escapeRegex=n(8669),t.flatten=n(5553),t.ignore=n(9725),t.intersect=n(3110),t.isPromise=n(834),t.merge=n(9315),t.once=n(8762),t.reach=n(1528),t.reachTemplate=n(1626),t.stringify=n(8314),t.wait=n(7858)},3305:(e,t,n)=>{n.r(t),n.d(t,{analyzeDomain:()=>p,analyzeEmail:()=>y,errorCodes:()=>i,ipRegex:()=>F,isDomainValid:()=>m,isEmailValid:()=>b,uriDecode:()=>R,uriRegex:()=>P,validateDomainOptions:()=>h});var r=n(8663);let i={EMPTY_STRING:`Address must be a non-empty string`,FORBIDDEN_UNICODE:`Address contains forbidden Unicode characters`,MULTIPLE_AT_CHAR:`Address cannot contain more than one @ character`,MISSING_AT_CHAR:`Address must contain one @ character`,EMPTY_LOCAL:`Address local part cannot be empty`,ADDRESS_TOO_LONG:`Address too long`,LOCAL_TOO_LONG:`Address local part too long`,EMPTY_LOCAL_SEGMENT:`Address local part contains empty dot-separated segment`,INVALID_LOCAL_CHARS:`Address local part contains invalid character`,DOMAIN_NON_EMPTY_STRING:`Domain must be a non-empty string`,DOMAIN_TOO_LONG:`Domain too long`,DOMAIN_INVALID_UNICODE_CHARS:`Domain contains forbidden Unicode characters`,DOMAIN_INVALID_CHARS:`Domain contains invalid character`,DOMAIN_INVALID_TLDS_CHARS:`Domain contains invalid tld character`,DOMAIN_SEGMENTS_COUNT:`Domain lacks the minimum required number of segments`,DOMAIN_SEGMENTS_COUNT_MAX:`Domain contains too many segments`,DOMAIN_FORBIDDEN_TLDS:`Domain uses forbidden TLD`,DOMAIN_EMPTY_SEGMENT:`Domain contains empty dot-separated segment`,DOMAIN_LONG_SEGMENT:`Domain contains dot-separated segment that is too long`};function a(e){return{code:e,error:i[e]}}let o=/[^\x00-\x7f]/,s=/[\x00-\x20@\:\/\\#!\$&\'\(\)\*\+,;=\?]/,c=/^[a-zA-Z](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,l=/^[a-zA-Z0-9](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,u=/^[a-zA-Z0-9_](?:[a-zA-Z0-9\-]*[a-zA-Z0-9])?$/,d=r.URL||URL;function f(e){return!!e.allow}function p(e,t={}){if(!e)return a(`DOMAIN_NON_EMPTY_STRING`);if(typeof e!=`string`)throw Error(`Invalid input: domain must be a string`);if(e.length>256)return a(`DOMAIN_TOO_LONG`);if(o.test(e)){if(!1===t.allowUnicode)return a(`DOMAIN_INVALID_UNICODE_CHARS`);e=e.normalize(`NFC`)}if(s.test(e))return a(`DOMAIN_INVALID_CHARS`);e=function(e){e.includes(`%`)&&(e=e.replace(/%/g,`%25`));try{return new d(`http://${e}`).host}catch{return e}}(e),t.allowFullyQualified&&e[e.length-1]===`.`&&(e=e.slice(0,-1));let n=t.minDomainSegments||2,r=e.split(`.`);if(r.length<n)return a(`DOMAIN_SEGMENTS_COUNT`);if(t.maxDomainSegments&&r.length>t.maxDomainSegments)return a(`DOMAIN_SEGMENTS_COUNT_MAX`);let i=t.tlds;if(i){let e=r[r.length-1].toLowerCase();if(f(i)){if(!i.allow.has(e))return a(`DOMAIN_FORBIDDEN_TLDS`)}else if(i.deny.has(e))return a(`DOMAIN_FORBIDDEN_TLDS`)}for(let e=0;e<r.length;++e){let n=r[e];if(!n.length)return a(`DOMAIN_EMPTY_SEGMENT`);if(n.length>63)return a(`DOMAIN_LONG_SEGMENT`);if(e<r.length-1){if(t.allowUnderscore){if(!u.test(n))return a(`DOMAIN_INVALID_CHARS`)}else if(!l.test(n))return a(`DOMAIN_INVALID_CHARS`)}else if(!c.test(n))return a(`DOMAIN_INVALID_TLDS_CHARS`)}return null}function m(e,t){return!p(e,t)}function h(e){if(e){if(typeof e.tlds!=`object`)throw Error(`Invalid options: tlds must be a boolean or an object`);if(f(e.tlds)){if(e.tlds.allow instanceof Set==0)throw Error(`Invalid options: tlds.allow must be a Set object or true`);if(e.tlds.deny)throw Error(`Invalid options: cannot specify both tlds.allow and tlds.deny lists`)}else if(e.tlds.deny instanceof Set==0)throw Error(`Invalid options: tlds.deny must be a Set object`)}}var g=n(6984);let _=/[^\x00-\x7f]/,v=new(g.TextEncoder||TextEncoder);function y(e,t){return x(e,t)}function b(e,t){return!x(e,t)}function x(e,t={}){if(typeof e!=`string`)throw Error(`Invalid input: email must be a string`);if(!e)return a(`EMPTY_STRING`);let n=!_.test(e);if(!n){if(!1===t.allowUnicode)return a(`FORBIDDEN_UNICODE`);e=e.normalize(`NFC`)}let r=e.split(`@`);if(r.length!==2)return r.length>2?a(`MULTIPLE_AT_CHAR`):a(`MISSING_AT_CHAR`);let[i,o]=r;if(!i)return a(`EMPTY_LOCAL`);if(!t.ignoreLength){if(e.length>254)return a(`ADDRESS_TOO_LONG`);if(v.encode(i).length>64)return a(`LOCAL_TOO_LONG`)}return function(e,t){let n=e.split(`.`);for(let e of n){if(!e.length)return a(`EMPTY_LOCAL_SEGMENT`);if(t){if(!C.test(e))return a(`INVALID_LOCAL_CHARS`)}else for(let t of e){if(C.test(t))continue;let e=S(t);if(!w.test(e))return a(`INVALID_LOCAL_CHARS`)}}return null}(i,n)||p(o,t)}function S(e){return Array.from(v.encode(e),e=>String.fromCharCode(e)).join(``)}let C=/^[\w!#\$%&'\*\+\-/=\?\^`\{\|\}~]+$/,w=new RegExp([`(?:[\\xc2-\\xdf][\\x80-\\xbf])`,`(?:\\xe0[\\xa0-\\xbf][\\x80-\\xbf])|(?:[\\xe1-\\xec][\\x80-\\xbf]{2})|(?:\\xed[\\x80-\\x9f][\\x80-\\xbf])|(?:[\\xee-\\xef][\\x80-\\xbf]{2})`,`(?:\\xf0[\\x90-\\xbf][\\x80-\\xbf]{2})|(?:[\\xf1-\\xf3][\\x80-\\xbf]{3})|(?:\\xf4[\\x80-\\x8f][\\x80-\\xbf]{2})`].join(`|`));var T=n(8253),E=n.n(T),D=n(8669),O=n.n(D);let k=function(){let e={},t=`\\dA-Fa-f`,n=`[`+t+`]`,r=`\\w-\\.~`,i=`!\\$&'\\(\\)\\*\\+,;=`,a=`%`+t,o=r+a+i+`:@`,s=`[`+o+`]`;e.ipv4address=`(?:(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])\\.){3}(?:0{0,2}\\d|0?[1-9]\\d|1\\d\\d|2[0-4]\\d|25[0-5])`;let c=n+`{1,4}`,l=`(?:`+c+`:[\\dA-Fa-f]{1,4}|`+e.ipv4address+`)`,u=`(?:`+c+`:){6}`+l,d=`::(?:`+c+`:){5}`+l,f=`(?:`+c+`)?::(?:[\\dA-Fa-f]{1,4}:){4}`+l,p=`(?:(?:`+c+`:){0,1}[\\dA-Fa-f]{1,4})?::(?:[\\dA-Fa-f]{1,4}:){3}`+l,m=`(?:(?:`+c+`:){0,2}[\\dA-Fa-f]{1,4})?::(?:[\\dA-Fa-f]{1,4}:){2}`+l,h=`(?:(?:`+c+`:){0,3}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}:`+l,g=`(?:(?:`+c+`:){0,4}[\\dA-Fa-f]{1,4})?::`+l;``+c,``+c,e.ipv4Cidr=`(?:\\d|[1-2]\\d|3[0-2])`,e.ipv6Cidr=`(?:0{0,2}\\d|0?[1-9]\\d|1[01]\\d|12[0-8])`,e.ipv6address=`(?:`+u+`|`+d+`|`+f+`|`+p+`|`+m+`|`+h+`|`+g+`|(?:(?:[\\dA-Fa-f]{1,4}:){0,5}[\\dA-Fa-f]{1,4})?::[\\dA-Fa-f]{1,4}|(?:(?:[\\dA-Fa-f]{1,4}:){0,6}[\\dA-Fa-f]{1,4})?::)`,e.ipvFuture=`v`+n+`+\\.[\\w-\\.~!\\$&'\\(\\)\\*\\+,;=:]+`,e.scheme=`[a-zA-Z][a-zA-Z\\d+-\\.]*`,e.schemeRegex=new RegExp(e.scheme);let _=`[`+r+a+i+`:]*`;``+r+a+i;let v=`(?:\\[(?:`+e.ipv6address+`|`+e.ipvFuture+`)\\]|`+e.ipv4address+`|[\\w-\\.~%\\dA-Fa-f!\\$&'\\(\\)\\*\\+,;=]{1,255})`,y=`(?:`+_+`@)?`+v+`(?::\\d*)?`,b=`(?:`+_+`@)?(`+v+`)(?::\\d*)?`,x=s+`*`,S=s+`+`,C=`(?:\\/`+x+`)*`,w=`\\/(?:`+S+C+`)?`,T=S+C,E=`[`+r+a+i+`@]+`+C,D=`(?:\\/\\/\\/`+x+C+`)`;return e.hierPart=`(?:(?:\\/\\/`+y+C+`)|`+w+`|`+T+`|`+D+`)`,e.hierPartCapture=`(?:(?:\\/\\/`+b+C+`)|`+w+`|`+T+`)`,e.relativeRef=`(?:(?:\\/\\/`+y+C+`)|`+w+`|`+E+`|)`,e.relativeRefCapture=`(?:(?:\\/\\/`+b+C+`)|`+w+`|`+E+`|)`,e.query=`[`+o+`\\/\\?]*(?=#|$)`,e.queryWithSquareBrackets=`[`+o+`\\[\\]\\/\\?]*(?=#|$)`,e.fragment=`[`+o+`\\/\\?]*`,e}(),A={v4Cidr:k.ipv4Cidr,v6Cidr:k.ipv6Cidr,ipv4:k.ipv4address,ipv6:k.ipv6address,ipvfuture:k.ipvFuture};function j(e){let t=k,n=`(?:\\?`+(e.allowQuerySquareBrackets?t.queryWithSquareBrackets:t.query)+`)?(?:#`+t.fragment+`)?`,r=e.domain?t.relativeRefCapture:t.relativeRef;if(e.relativeOnly)return M(r+n);let i=``;if(e.scheme){E()(e.scheme instanceof RegExp||typeof e.scheme==`string`||Array.isArray(e.scheme),`scheme must be a RegExp, String, or Array`);let n=[].concat(e.scheme);E()(n.length>=1,`scheme must have at least 1 scheme specified`);let r=[];for(let e=0;e<n.length;++e){let i=n[e];E()(i instanceof RegExp||typeof i==`string`,`scheme at position `+e+` must be a RegExp or String`),i instanceof RegExp?r.push(i.source.toString()):(E()(t.schemeRegex.test(i),`scheme at position `+e+` must be a valid scheme`),r.push(O()(i)))}i=r.join(`|`)}let a=`(?:`+(i?`(?:`+i+`)`:t.scheme)+`:`+(e.domain?t.hierPartCapture:t.hierPart)+`)`;return M((e.allowRelative?`(?:`+a+`|`+r+`)`:a)+n,i)}function M(e,t=null){return{raw:e=`(?=.)(?!https?:/(?:$|[^/]))(?!https?:///)(?!https?:[^/])${e}`,regex:RegExp(`^${e}$`),scheme:t}}let N=j({});function P(e={}){return e.scheme||e.allowRelative||e.relativeOnly||e.allowQuerySquareBrackets||e.domain?j(e):N}function F(e={}){let t=e.cidr||`optional`;E()([`required`,`optional`,`forbidden`].includes(t),`options.cidr must be one of required, optional, forbidden`),E()(e.version===void 0||typeof e.version==`string`||Array.isArray(e.version),`options.version must be a string or an array of string`);let n=e.version||[`ipv4`,`ipv6`,`ipvfuture`];Array.isArray(n)||(n=[n]),E()(n.length>=1,`options.version must have at least 1 version specified`);for(let e of n)E()(typeof e==`string`&&e===e.toLowerCase(),`Invalid options.version value`),E()([`ipv4`,`ipv6`,`ipvfuture`].includes(e),`options.version contains unknown version `+e+` - must be one of ipv4, ipv6, ipvfuture`);n=Array.from(new Set(n));let r=`(?:${n.map(e=>{if(t===`forbidden`)return A[e];let n=`\\/${e===`ipv4`?A.v4Cidr:A.v6Cidr}`;return t===`required`?`${A[e]}${n}`:`${A[e]}(?:${n})?`}).join(`|`)})`,i=RegExp(`^${r}$`);return{cidr:t,versions:n,regex:i,raw:r}}let I={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},L={accept:12,reject:0,data:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,7,7,7,7,7,7,7,7,7,7,7,7,8,7,7,10,9,9,9,11,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,24,36,48,60,72,84,96,0,12,12,12,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,24,24,24,0,0,0,0,0,0,0,0,0,24,24,0,0,0,0,0,0,0,0,0,0,48,48,48,0,0,0,0,0,0,0,0,0,0,48,48,0,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,127,63,63,63,0,31,15,15,15,7,7,7]};function R(e){let t=e.indexOf(`%`);if(t===-1)return e;let n=``,r=0,i=0,a=t,o=L.accept;for(;t>-1&&t<e.length;){let s=z(e[t+1],4)|z(e[t+2],0),c=L.data[s];if(o=L.data[256+o+c],i=i<<6|s&L.data[364+c],o!==L.accept){if(o===L.reject||(t+=3,t>=e.length||e[t]!==`%`))return null}else n+=e.slice(r,a),n+=i<=65535?String.fromCharCode(i):String.fromCharCode(55232+(i>>10),56320+(1023&i)),i=0,r=t+3,t=e.indexOf(`%`,r),a=t}return n+e.slice(r)}function z(e,t){let n=I[e];return n===void 0?255:n<<t}},3386:(e,t,n)=>{let r=n(9725);e.exports=function(){return new Promise(r)}},3541:(e,t,n)=>{let{assert:r}=n(3115),i=n(9415),a=n(8529),o={};t.schema=function(e,t,n={}){i.assertOptions(n,[`appendPath`,`override`]);try{return o.schema(e,t,n)}catch(e){throw n.appendPath&&e.path!==void 0&&(e.message=`${e.message} (${e.path})`),e}},o.schema=function(e,t,n){r(t!==void 0,`Invalid undefined schema`),Array.isArray(t)&&(r(t.length,`Invalid empty array schema`),t.length===1&&(t=t[0]));let a=(t,...r)=>!1===n.override?t.valid(...r):t.valid(e.override,...r);if(o.simple(t))return a(e,t);if(typeof t==`function`)return e.custom(t);if(r(typeof t==`object`,`Invalid schema content:`,typeof t),i.isResolvable(t))return a(e,t);if(i.isSchema(t))return t;if(Array.isArray(t)){for(let n of t)if(!o.simple(n))return e.alternatives().try(...t);return a(e,...t)}return t instanceof RegExp?e.string().regex(t):t instanceof Date?a(e.date(),t):(r(Object.getPrototypeOf(t)===Object.getPrototypeOf({}),`Schema can only contain plain objects`),e.object().keys(t))},t.ref=function(e,t){return a.isRef(e)?e:a.create(e,t)},t.compile=function(e,n,a={}){i.assertOptions(a,[`legacy`]);let s=n&&n[i.symbols.any];if(s)return r(a.legacy||s.version===i.version,`Cannot mix different versions of joi schemas:`,s.version,i.version),n;if(typeof n!=`object`||!a.legacy)return t.schema(e,n,{appendPath:!0});let c=o.walk(n);return c?c.compile(c.root,n):t.schema(e,n,{appendPath:!0})},o.walk=function(e){if(typeof e!=`object`)return null;if(Array.isArray(e)){for(let t of e){let e=o.walk(t);if(e)return e}return null}let t=e[i.symbols.any];if(t)return{root:e[t.root],compile:t.compile};r(Object.getPrototypeOf(e)===Object.getPrototypeOf({}),`Schema can only contain plain objects`);for(let t in e){let n=o.walk(e[t]);if(n)return n}return null},o.simple=function(e){return e===null||[`boolean`,`string`,`number`].includes(typeof e)},t.when=function(e,n,s){if(s===void 0&&(r(n&&typeof n==`object`,`Missing options`),s=n,n=a.create(`.`)),Array.isArray(s)&&(s={switch:s}),i.assertOptions(s,[`is`,`not`,`then`,`otherwise`,`switch`,`break`]),i.isSchema(n))return r(s.is===void 0,`"is" can not be used with a schema condition`),r(s.not===void 0,`"not" can not be used with a schema condition`),r(s.switch===void 0,`"switch" can not be used with a schema condition`),o.condition(e,{is:n,then:s.then,otherwise:s.otherwise,break:s.break});if(r(a.isRef(n)||typeof n==`string`,`Invalid condition:`,n),r(s.not===void 0||s.is===void 0,`Cannot combine "is" with "not"`),s.switch===void 0){let c=s;s.not!==void 0&&(c={is:s.not,then:s.otherwise,otherwise:s.then,break:s.break});let l=c.is===void 0?e.$_root.invalid(null,!1,0,``).required():e.$_compile(c.is);return r(c.then!==void 0||c.otherwise!==void 0,`options must have at least one of "then", "otherwise", or "switch"`),r(c.break===void 0||c.then===void 0||c.otherwise===void 0,`Cannot specify then, otherwise, and break all together`),s.is===void 0||a.isRef(s.is)||i.isSchema(s.is)||(l=l.required()),o.condition(e,{ref:t.ref(n),is:l,then:c.then,otherwise:c.otherwise,break:c.break})}r(Array.isArray(s.switch),`"switch" must be an array`),r(s.is===void 0,`Cannot combine "switch" with "is"`),r(s.not===void 0,`Cannot combine "switch" with "not"`),r(s.then===void 0,`Cannot combine "switch" with "then"`);let c={ref:t.ref(n),switch:[],break:s.break};for(let t=0;t<s.switch.length;++t){let n=s.switch[t],o=t===s.switch.length-1;i.assertOptions(n,o?[`is`,`then`,`otherwise`]:[`is`,`then`]),r(n.is!==void 0,`Switch statement missing "is"`),r(n.then!==void 0,`Switch statement missing "then"`);let l={is:e.$_compile(n.is),then:e.$_compile(n.then)};if(a.isRef(n.is)||i.isSchema(n.is)||(l.is=l.is.required()),o){r(s.otherwise===void 0||n.otherwise===void 0,`Cannot specify "otherwise" inside and outside a "switch"`);let t=s.otherwise===void 0?n.otherwise:s.otherwise;t!==void 0&&(r(c.break===void 0,`Cannot specify both otherwise and break`),l.otherwise=e.$_compile(t))}c.switch.push(l)}return c},o.condition=function(e,t){for(let n of[`then`,`otherwise`])t[n]===void 0?delete t[n]:t[n]=e.$_compile(t[n]);return t}},3738:(e,t)=>{let n={};t=e.exports={array:Array.prototype,buffer:!1,date:Date.prototype,error:Error.prototype,generic:Object.prototype,map:Map.prototype,promise:Promise.prototype,regex:RegExp.prototype,set:Set.prototype,url:URL.prototype,weakMap:WeakMap.prototype,weakSet:WeakSet.prototype},n.typeMap=new Map([[`[object Error]`,t.error],[`[object Map]`,t.map],[`[object Promise]`,t.promise],[`[object Set]`,t.set],[`[object URL]`,t.url],[`[object WeakMap]`,t.weakMap],[`[object WeakSet]`,t.weakSet]]),t.getInternalProto=function(e){if(Array.isArray(e))return t.array;if(e instanceof Date)return t.date;if(e instanceof RegExp)return t.regex;if(e instanceof Error)return t.error;let r=Object.prototype.toString.call(e);return n.typeMap.get(r)||t.generic}},4126:(e,t,n)=>{let r=n(1528),i=n(3738),a=n(86),o={needsProtoHack:new Set([i.set,i.map,i.weakSet,i.weakMap]),structuredCloneExists:typeof structuredClone==`function`};e.exports=o.clone=function(e,t={},n=null){if(typeof e!=`object`||!e)return e;let r=o.clone,s=n;if(t.shallow){if(!0!==t.shallow)return o.cloneWithShallow(e,t);r=e=>e}else if(s){let t=s.get(e);if(t)return t}else s=new Map;let c=i.getInternalProto(e);switch(c){case i.buffer:return(!1).from(e);case i.date:return new Date(e.getTime());case i.regex:case i.url:return new c.constructor(e)}let l=o.base(e,c,t);if(l===e)return e;if(s&&s.set(e,l),c===i.set)for(let n of e)l.add(r(n,t,s));else if(c===i.map)for(let[n,i]of e)l.set(n,r(i,t,s));let u=a.keys(e,t);for(let n of u){if(n===`__proto__`)continue;if(c===i.array&&n===`length`){l.length=e.length;continue}if(o.structuredCloneExists&&c===i.error&&n===`stack`)continue;let a=Object.getOwnPropertyDescriptor(e,n);a?a.get||a.set?Object.defineProperty(l,n,a):a.enumerable?l[n]=r(e[n],t,s):Object.defineProperty(l,n,{enumerable:!1,writable:!0,configurable:!0,value:r(e[n],t,s)}):Object.defineProperty(l,n,{enumerable:!0,writable:!0,configurable:!0,value:r(e[n],t,s)})}return l},o.cloneWithShallow=function(e,t){let n=t.shallow;(t=Object.assign({},t)).shallow=!1;let i=new Map;for(let t of n){let n=r(e,t);typeof n!=`object`&&typeof n!=`function`||i.set(n,n)}return o.clone(e,t,i)},o.base=function(e,t,n){if(!1===n.prototype)return o.needsProtoHack.has(t)?new t.constructor:t===i.array?[]:{};let r=Object.getPrototypeOf(e);if(r&&r.isImmutable)return e;if(t===i.array){let e=[];return r!==t&&Object.setPrototypeOf(e,r),e}if(t===i.error&&o.structuredCloneExists&&(r===t||Error.isPrototypeOf(r.constructor))){let t=structuredClone(e);return Object.getPrototypeOf(t)!==r&&Object.setPrototypeOf(t,r),t}if(o.needsProtoHack.has(t)){let e=new r.constructor;return r!==t&&Object.setPrototypeOf(e,r),e}return Object.create(r)}},4709:(e,t,n)=>{let{assert:r}=n(3115),i=n(680),a=n(9415),o={numberRx:/^\s*[+-]?(?:(?:\d+(?:\.\d*)?)|(?:\.\d+))(?:e([+-]?\d+))?\s*$/i,precisionRx:/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/,exponentialPartRegex:/[eE][+-]?\d+$/,leadingSignAndZerosRegex:/^[+-]?(0*)?/,dotRegex:/\./,trailingZerosRegex:/0+$/,decimalPlaces(e){let t=e.toString(),n=t.indexOf(`.`),r=t.indexOf(`e`);return(n<0?0:(r<0?t.length:r)-n-1)+(r<0?0:Math.max(0,-parseInt(t.slice(r+1))))}};e.exports=i.extend({type:`number`,flags:{unsafe:{default:!1}},coerce:{from:`string`,method(e,{schema:t,error:n}){if(!e.match(o.numberRx))return;e=e.trim();let r={value:parseFloat(e)};if(r.value===0&&(r.value=0),!t._flags.unsafe)if(e.match(/e/i)){if(o.extractSignificantDigits(e)!==o.extractSignificantDigits(String(r.value)))return r.errors=n(`number.unsafe`),r}else{let t=r.value.toString();if(t.match(/e/i))return r;if(t!==o.normalizeDecimal(e))return r.errors=n(`number.unsafe`),r}return r}},validate(e,{schema:t,error:n,prefs:r}){if(e===1/0||e===-1/0)return{value:e,errors:n(`number.infinity`)};if(!a.isNumber(e))return{value:e,errors:n(`number.base`)};let i={value:e};if(r.convert){let e=t.$_getRule(`precision`);if(e){let t=10**e.args.limit;i.value=Math.round(i.value*t)/t}}return i.value===0&&(i.value=0),!t._flags.unsafe&&(e>2**53-1||e<-(2**53-1))&&(i.errors=n(`number.unsafe`)),i},rules:{compare:{method:!1,validate:(e,t,{limit:n},{name:r,operator:i,args:o})=>a.compare(e,n,i)?e:t.error(`number.`+r,{limit:o.limit,value:e}),args:[{name:`limit`,ref:!0,assert:a.isNumber,message:`must be a number`}]},greater:{method(e){return this.$_addRule({name:`greater`,method:`compare`,args:{limit:e},operator:`>`})}},integer:{method(){return this.$_addRule(`integer`)},validate:(e,t)=>Math.trunc(e)-e===0?e:t.error(`number.integer`)},less:{method(e){return this.$_addRule({name:`less`,method:`compare`,args:{limit:e},operator:`<`})}},max:{method(e){return this.$_addRule({name:`max`,method:`compare`,args:{limit:e},operator:`<=`})}},min:{method(e){return this.$_addRule({name:`min`,method:`compare`,args:{limit:e},operator:`>=`})}},multiple:{method(e){let t=typeof e==`number`?o.decimalPlaces(e):null,n=10**t;return this.$_addRule({name:`multiple`,args:{base:e,baseDecimalPlace:t,pfactor:n}})},validate:(e,t,{base:n,baseDecimalPlace:r,pfactor:i},a)=>o.decimalPlaces(e)>r?t.error(`number.multiple`,{multiple:a.args.base,value:e}):Math.round(i*e)%Math.round(i*n)===0?e:t.error(`number.multiple`,{multiple:a.args.base,value:e}),args:[{name:`base`,ref:!0,assert:e=>typeof e==`number`&&isFinite(e)&&e>0,message:`must be a positive number`},`baseDecimalPlace`,`pfactor`],multi:!0},negative:{method(){return this.sign(`negative`)}},port:{method(){return this.$_addRule(`port`)},validate:(e,t)=>Number.isSafeInteger(e)&&e>=0&&e<=65535?e:t.error(`number.port`)},positive:{method(){return this.sign(`positive`)}},precision:{method(e){return r(Number.isSafeInteger(e),`limit must be an integer`),this.$_addRule({name:`precision`,args:{limit:e}})},validate(e,t,{limit:n}){let r=e.toString().match(o.precisionRx);return Math.max((r[1]?r[1].length:0)-(r[2]?parseInt(r[2],10):0),0)<=n?e:t.error(`number.precision`,{limit:n,value:e})},convert:!0},sign:{method(e){return r([`negative`,`positive`].includes(e),`Invalid sign`,e),this.$_addRule({name:`sign`,args:{sign:e}})},validate:(e,t,{sign:n})=>n===`negative`&&e<0||n===`positive`&&e>0?e:t.error(`number.${n}`)},unsafe:{method(e=!0){return r(typeof e==`boolean`,`enabled must be a boolean`),this.$_setFlag(`unsafe`,e)}}},cast:{string:{from:e=>typeof e==`number`,to:(e,t)=>e.toString()}},messages:{"number.base":`{{#label}} must be a number`,"number.greater":`{{#label}} must be greater than {{#limit}}`,"number.infinity":`{{#label}} cannot be infinity`,"number.integer":`{{#label}} must be an integer`,"number.less":`{{#label}} must be less than {{#limit}}`,"number.max":`{{#label}} must be less than or equal to {{#limit}}`,"number.min":`{{#label}} must be greater than or equal to {{#limit}}`,"number.multiple":`{{#label}} must be a multiple of {{#multiple}}`,"number.negative":`{{#label}} must be a negative number`,"number.port":`{{#label}} must be a valid port`,"number.positive":`{{#label}} must be a positive number`,"number.precision":`{{#label}} must have no more than {{#limit}} decimal places`,"number.unsafe":`{{#label}} must be a safe number`}}),o.extractSignificantDigits=function(e){return e.replace(o.exponentialPartRegex,``).replace(o.dotRegex,``).replace(o.trailingZerosRegex,``).replace(o.leadingSignAndZerosRegex,``)},o.normalizeDecimal=function(e){return(e=e.replace(/^\+/,``).replace(/\.0*$/,``).replace(/^(-?)\.([^\.]*)$/,`$10.$2`).replace(/^(-?)0+([0-9])/,`$1$2`)).includes(`.`)&&e.endsWith(`0`)&&(e=e.replace(/0+$/,``)),e===`-0`?`0`:e}},4840:(e,t,n)=>{let{assert:r}=n(3115);e.exports=n(2888).extend({type:`function`,properties:{typeof:`function`},rules:{arity:{method(e){return r(Number.isSafeInteger(e)&&e>=0,`n must be a positive integer`),this.$_addRule({name:`arity`,args:{n:e}})},validate:(e,t,{n})=>e.length===n?e:t.error(`function.arity`,{n})},class:{method(){return this.$_addRule(`class`)},validate:(e,t)=>/^\s*class\s/.test(e.toString())?e:t.error(`function.class`,{value:e})},minArity:{method(e){return r(Number.isSafeInteger(e)&&e>0,`n must be a strict positive integer`),this.$_addRule({name:`minArity`,args:{n:e}})},validate:(e,t,{n})=>e.length>=n?e:t.error(`function.minArity`,{n})},maxArity:{method(e){return r(Number.isSafeInteger(e)&&e>=0,`n must be a positive integer`),this.$_addRule({name:`maxArity`,args:{n:e}})},validate:(e,t,{n})=>e.length<=n?e:t.error(`function.maxArity`,{n})}},messages:{"function.arity":`{{#label}} must have an arity of {{#n}}`,"function.class":`{{#label}} must be a class`,"function.maxArity":`{{#label}} must have an arity lesser or equal to {{#n}}`,"function.minArity":`{{#label}} must have an arity greater or equal to {{#n}}`}})},4895:(e,t,n)=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.tlds=void 0;let r=n(362);t.tlds=new Set(r.TLDS.map(e=>e.toLowerCase()))},4957:(e,t,n)=>{let{clone:r,reach:i}=n(3115),a=n(9415),o={value:Symbol(`value`)};e.exports=o.State=class{constructor(e,t,n){this.path=e,this.ancestors=t,this.mainstay=n.mainstay,this.schemas=n.schemas,this.debug=null}localize(e,t=null,n=null){let r=new o.State(e,t,this);return n&&r.schemas&&(r.schemas=[o.schemas(n),...r.schemas]),r}nest(e,t){let n=new o.State(this.path,this.ancestors,this);return n.schemas=n.schemas&&[o.schemas(e),...n.schemas],n.debug=t,n}shadow(e,t){this.mainstay.shadow=this.mainstay.shadow||new o.Shadow,this.mainstay.shadow.set(this.path,e,t)}snapshot(){this.mainstay.shadow&&(this._snapshot=r(this.mainstay.shadow.node(this.path))),this.mainstay.snapshot()}restore(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.restore()}commit(){this.mainstay.shadow&&(this.mainstay.shadow.override(this.path,this._snapshot),this._snapshot=void 0),this.mainstay.commit()}},o.schemas=function(e){return a.isSchema(e)?{schema:e}:e},o.Shadow=class{constructor(){this._values=null}set(e,t,n){if(!e.length||n===`strip`&&typeof e[e.length-1]==`number`)return;this._values=this._values||new Map;let r=this._values;for(let t=0;t<e.length;++t){let n=e[t],i=r.get(n);i||(i=new Map,r.set(n,i)),r=i}r[o.value]=t}get(e){let t=this.node(e);if(t)return t[o.value]}node(e){if(this._values)return i(this._values,e,{iterables:!0})}override(e,t){if(!this._values)return;let n=e.slice(0,-1),r=e[e.length-1],a=i(this._values,n,{iterables:!0});t?a.set(r,t):a&&a.delete(r)}}},4972:(e,t,n)=>{let{assert:r,merge:i}=n(3115),a=n(680),o=n(9415),s=n(3541),c=n(8013),l=n(8529),u={};e.exports=a.extend({type:`alternatives`,flags:{match:{default:`any`}},terms:{matches:{init:[],register:l.toSibling}},args:(e,...t)=>t.length===1&&Array.isArray(t[0])?e.try(...t[0]):e.try(...t),validate(e,t){let{schema:n,error:r,state:a,prefs:o}=t;if(n._flags.match){let t=[],s=[];for(let r=0;r<n.$_terms.matches.length;++r){let i=n.$_terms.matches[r],c=a.nest(i.schema,`match.${r}`);c.snapshot();let l=i.schema.$_validate(e,c,o);l.errors?(s.push(l.errors),c.restore()):(t.push(l.value),c.commit())}if(t.length===0)return{errors:r(`alternatives.any`,{details:s.map(e=>c.details(e,{override:!1}))})};if(n._flags.match===`one`)return t.length===1?{value:t[0]}:{errors:r(`alternatives.one`)};if(t.length!==n.$_terms.matches.length)return{errors:r(`alternatives.all`,{details:s.map(e=>c.details(e,{override:!1}))})};let l=e=>e.$_terms.matches.some(e=>e.schema.type===`object`||e.schema.type===`alternatives`&&l(e.schema));return l(n)?{value:t.reduce((e,t)=>i(e,t,{mergeArrays:!1}))}:{value:t[t.length-1]}}let s=[];for(let t=0;t<n.$_terms.matches.length;++t){let r=n.$_terms.matches[t];if(r.schema){let n=a.nest(r.schema,`match.${t}`);n.snapshot();let i=r.schema.$_validate(e,n,o);if(!i.errors)return n.commit(),i;n.restore(),s.push({schema:r.schema,reports:i.errors});continue}let i=r.ref?r.ref.resolve(e,a,o):e,c=r.is?[r]:r.switch;for(let n=0;n<c.length;++n){let{is:s,then:l,otherwise:u}=c[n],d=`match.${t}${r.switch?`.`+n:``}`;if(s.$_match(i,a.nest(s,`${d}.is`),o)){if(l)return l.$_validate(e,a.nest(l,`${d}.then`),o)}else if(u)return u.$_validate(e,a.nest(u,`${d}.otherwise`),o)}}return u.errors(s,t)},rules:{conditional:{method(e,t){r(!this._flags._endedSwitch,`Unreachable condition`),r(!this._flags.match,`Cannot combine match mode`,this._flags.match,`with conditional rule`),r(t.break===void 0,`Cannot use break option with alternatives conditional`);let n=this.clone(),i=s.when(n,e,t),a=i.is?[i]:i.switch;for(let e of a)if(e.then&&e.otherwise){n.$_setFlag(`_endedSwitch`,!0,{clone:!1});break}return n.$_terms.matches.push(i),n.$_mutateRebuild()}},match:{method(e){if(r([`any`,`one`,`all`].includes(e),`Invalid alternatives match mode`,e),e!==`any`)for(let t of this.$_terms.matches)r(t.schema,`Cannot combine match mode`,e,`with conditional rules`);return this.$_setFlag(`match`,e)}},try:{method(...e){r(e.length,`Missing alternative schemas`),o.verifyFlat(e,`try`),r(!this._flags._endedSwitch,`Unreachable condition`);let t=this.clone();for(let n of e)t.$_terms.matches.push({schema:t.$_compile(n)});return t.$_mutateRebuild()}}},overrides:{label(e){return this.$_parent(`label`,e).$_modify({each:(t,n)=>n.path[0]!==`is`&&typeof t._flags.label!=`string`?t.label(e):void 0,ref:!1})},isAsync(){var e;if((e=this.$_terms.externals)!=null&&e.length)return!0;for(let e of this.$_terms.matches){var t,n,r;if((t=e.schema)!=null&&t.isAsync()||(n=e.then)!=null&&n.isAsync()||(r=e.otherwise)!=null&&r.isAsync())return!0}return!1}},rebuild(e){e.$_modify({each:t=>{o.isSchema(t)&&t.type===`array`&&e.$_setFlag(`_arrayItems`,!0,{clone:!1})}})},manifest:{build(e,t){if(t.matches)for(let n of t.matches){let{schema:t,ref:r,is:i,not:a,then:o,otherwise:s}=n;e=t?e.try(t):r?e.conditional(r,{is:i,then:o,not:a,otherwise:s,switch:n.switch}):e.conditional(i,{then:o,otherwise:s})}return e}},messages:{"alternatives.all":`{{#label}} does not match all of the required types`,"alternatives.any":`{{#label}} does not match any of the allowed types`,"alternatives.match":`{{#label}} does not match any of the allowed types`,"alternatives.one":`{{#label}} matches more than one allowed type`,"alternatives.types":`{{#label}} must be one of {{#types}}`}}),u.errors=function(e,{error:t,state:n}){if(!e.length)return{errors:t(`alternatives.any`)};if(e.length===1)return{errors:e[0].reports};let r=new Set,i=[];for(let{reports:a,schema:o}of e){if(a.length>1)return u.unmatched(e,t);let s=a[0];if(s instanceof c.Report==0)return u.unmatched(e,t);if(s.state.path.length!==n.path.length){i.push({type:o.type,report:s});continue}if(s.code===`any.only`){for(let e of s.local.valids)r.add(e);continue}let[l,d]=s.code.split(`.`);d===`base`?s.code===`object.base`?r.add(s.local.type):r.add(l):i.push({type:o.type,report:s})}return i.length?i.length===1?{errors:i[0].report}:u.unmatched(e,t):{errors:t(`alternatives.types`,{types:[...r]})}},u.unmatched=function(e,t){let n=[];for(let t of e)n.push(...t.reports);return{errors:t(`alternatives.match`,c.details(n,{override:!1}))}}},5008:(e,t,n)=>{let{assert:r}=n(3115),i=n(680),a={};a.Map=class extends Map{slice(){return new a.Map(this)}},e.exports=i.extend({type:`symbol`,terms:{map:{init:new a.Map}},coerce:{method(e,{schema:t,error:n}){let r=t.$_terms.map.get(e);return r&&(e=r),t._flags.only&&typeof e!=`symbol`?{value:e,errors:n(`symbol.map`,{map:t.$_terms.map})}:{value:e}}},validate(e,{error:t}){if(typeof e!=`symbol`)return{value:e,errors:t(`symbol.base`)}},rules:{map:{method(e){e&&!e[Symbol.iterator]&&typeof e==`object`&&(e=Object.entries(e)),r(e&&e[Symbol.iterator],`Iterable must be an iterable or object`);let t=this.clone(),n=[];for(let i of e){r(i&&i[Symbol.iterator],`Entry must be an iterable`);let[e,a]=i;r(typeof e!=`object`&&typeof e!=`function`&&typeof e!=`symbol`,`Key must not be of type object, function, or Symbol`),r(typeof a==`symbol`,`Value must be a Symbol`),t.$_terms.map.set(e,a),n.push(a)}return t.valid(...n)}}},manifest:{build:(e,t)=>(t.map&&(e=e.map(t.map)),e)},messages:{"symbol.base":`{{#label}} must be a symbol`,"symbol.map":`{{#label}} must be one of {{#map}}`}})},5553:e=>{let t={};e.exports=t.flatten=function(e,n){let r=n||[];for(let n of e)Array.isArray(n)?t.flatten(n,r):r.push(n);return r}},5570:e=>{let t={};e.exports=function(e){return e?e.replace(/[<>&\u2028\u2029]/g,t.escape):``},t.escape=function(e){return t.replacements.get(e)},t.replacements=new Map([[`<`,`\\u003c`],[`>`,`\\u003e`],[`&`,`\\u0026`],[`\u2028`,`\\u2028`],[`\u2029`,`\\u2029`]])},5844:(e,t,n)=>{let{assert:r}=n(3115),i=n(9415),a=n(8529),o={};t.Ids=o.Ids=class{constructor(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}clone(){let e=new o.Ids;return e._byId=new Map(this._byId),e._byKey=new Map(this._byKey),e._schemaChain=this._schemaChain,e}concat(e){e._schemaChain&&(this._schemaChain=!0);for(let[t,n]of e._byId.entries())r(!this._byKey.has(t),`Schema id conflicts with existing key:`,t),this._byId.set(t,n);for(let[t,n]of e._byKey.entries())r(!this._byId.has(t),`Schema key conflicts with existing id:`,t),this._byKey.set(t,n)}fork(e,t,n){let a=this._collect(e);a.push({schema:n});let s=a.shift(),c={id:s.id,schema:t(s.schema)};r(i.isSchema(c.schema),`adjuster function failed to return a joi schema type`);for(let e of a)c={id:e.id,schema:o.fork(e.schema,c.id,c.schema)};return c.schema}labels(e,t=[]){let n=e[0],r=this._get(n);if(!r)return[...t,...e].join(`.`);let i=e.slice(1);return t=[...t,r.schema._flags.label||n],i.length?r.schema._ids.labels(i,t):t.join(`.`)}reach(e,t=[]){let n=e[0],i=this._get(n);r(i,`Schema does not contain path`,[...t,...e].join(`.`));let a=e.slice(1);return a.length?i.schema._ids.reach(a,[...t,n]):i.schema}register(e,{key:t}={}){if(!e||!i.isSchema(e))return;(e.$_property(`schemaChain`)||e._ids._schemaChain)&&(this._schemaChain=!0);let n=e._flags.id;if(n){let t=this._byId.get(n);r(!t||t.schema===e,`Cannot add different schemas with the same id:`,n),r(!this._byKey.has(n),`Schema id conflicts with existing key:`,n),this._byId.set(n,{schema:e,id:n})}t&&(r(!this._byKey.has(t),`Schema already contains key:`,t),r(!this._byId.has(t),`Schema key conflicts with existing id:`,t),this._byKey.set(t,{schema:e,id:t}))}reset(){this._byId=new Map,this._byKey=new Map,this._schemaChain=!1}_collect(e,t=[],n=[]){let i=e[0],a=this._get(i);r(a,`Schema does not contain path`,[...t,...e].join(`.`)),n=[a,...n];let o=e.slice(1);return o.length?a.schema._ids._collect(o,[...t,i],n):n}_get(e){return this._byId.get(e)||this._byKey.get(e)}},o.fork=function(e,n,r){let i=t.schema(e,{each:(e,{key:t})=>{if(n===(e._flags.id||t))return r},ref:!1});return i?i.$_mutateRebuild():e},t.schema=function(e,t){let n;for(let r in e._flags){if(r[0]===`_`)continue;let i=o.scan(e._flags[r],{source:`flags`,name:r},t);i!==void 0&&(n||=e.clone(),n._flags[r]=i)}for(let r=0;r<e._rules.length;++r){let i=e._rules[r],a=o.scan(i.args,{source:`rules`,name:i.name},t);if(a!==void 0){n||=e.clone();let t=Object.assign({},i);t.args=a,n._rules[r]=t,n._singleRules.get(i.name)===i&&n._singleRules.set(i.name,t)}}for(let r in e.$_terms){if(r[0]===`_`)continue;let i=o.scan(e.$_terms[r],{source:`terms`,name:r},t);i!==void 0&&(n||=e.clone(),n.$_terms[r]=i)}return n},o.scan=function(e,t,n,r,s){let c=r||[];if(typeof e!=`object`||!e)return;let l;if(Array.isArray(e)){for(let r=0;r<e.length;++r){let i=t.source===`terms`&&t.name===`keys`&&e[r].key,a=o.scan(e[r],t,n,[r,...c],i);a!==void 0&&(l||=e.slice(),l[r]=a)}return l}if(!1!==n.schema&&i.isSchema(e)||!1!==n.ref&&a.isRef(e)){let r=n.each(e,{...t,path:c,key:s});return r===e?void 0:r}for(let r in e){if(r[0]===`_`)continue;let i=o.scan(e[r],t,n,[r,...c],s);i!==void 0&&(l||=Object.assign({},e),l[r]=i)}return l}},6084:(e,t,n)=>{let r=n(8253),i=n(4126),a=n(9315),o=n(1528),s={};e.exports=function(e,t,n={}){if(r(e&&typeof e==`object`,`Invalid defaults value: must be an object`),r(!t||!0===t||typeof t==`object`,`Invalid source value: must be true, falsy or an object`),r(typeof n==`object`,`Invalid options: must be an object`),!t)return null;if(n.shallow)return s.applyToDefaultsWithShallow(e,t,n);let o=i(e);return!0===t?o:a(o,t,{nullOverride:n.nullOverride!==void 0&&n.nullOverride,mergeArrays:!1})},s.applyToDefaultsWithShallow=function(e,t,n){let c=n.shallow;r(Array.isArray(c),`Invalid keys`);let l=new Map,u=!0===t?null:new Set;for(let n of c){n=Array.isArray(n)?n:n.split(`.`);let r=o(e,n);r&&typeof r==`object`?l.set(r,u&&o(t,n)||r):u&&u.add(n)}let d=i(e,{},l);if(!u)return d;for(let e of u)s.reachCopy(d,t,e);return a(d,t,{nullOverride:n.nullOverride!==void 0&&n.nullOverride,mergeArrays:!1})},s.reachCopy=function(e,t,n){for(let e of n){if(!(e in t))return;let n=t[e];if(typeof n!=`object`||!n)return;t=n}let r=t,i=e;for(let e=0;e<n.length-1;++e){let t=n[e];typeof i[t]!=`object`&&(i[t]={}),i=i[t]}i[n[n.length-1]]=r}},6162:(e,t,n)=>{let{assert:r,clone:i}=n(3115),a=n(1532);t.compile=function(e,t){if(typeof e==`string`)return r(!t,`Cannot set single message string`),new a(e);if(a.isTemplate(e))return r(!t,`Cannot set single message template`),e;r(typeof e==`object`&&!Array.isArray(e),`Invalid message options`),t=t?i(t):{};for(let n in e){let i=e[n];if(n===`root`||a.isTemplate(i)){t[n]=i;continue}if(typeof i==`string`){t[n]=new a(i);continue}r(typeof i==`object`&&!Array.isArray(i),`Invalid message for`,n);let o=n;for(n in t[o]=t[o]||{},i){let e=i[n];n===`root`||a.isTemplate(e)?t[o][n]=e:(r(typeof e==`string`,`Invalid message for`,n,`in`,o),t[o][n]=new a(e))}}return t},t.decompile=function(e){let t={};for(let n in e){let r=e[n];if(n===`root`){t.root=r;continue}if(a.isTemplate(r)){t[n]=r.describe({compact:!0});continue}let i=n;for(n in t[i]={},r){let e=r[n];n===`root`?t[i].root=e:t[i][n]=e.describe({compact:!0})}}return t},t.merge=function(e,n){if(!e)return t.compile(n);if(!n)return e;if(typeof n==`string`)return new a(n);if(a.isTemplate(n))return n;let o=i(e);for(let e in n){let t=n[e];if(e===`root`||a.isTemplate(t)){o[e]=t;continue}if(typeof t==`string`){o[e]=new a(t);continue}r(typeof t==`object`&&!Array.isArray(t),`Invalid message for`,e);let i=e;for(e in o[i]=o[i]||{},t){let n=t[e];e===`root`||a.isTemplate(n)?o[i][e]=n:(r(typeof n==`string`,`Invalid message for`,e,`in`,i),o[i][e]=new a(n))}}return o}},6186:(e,t,n)=>{let{assert:r}=n(3115),i=n(680),a=n(9415),o=n(6220),s={isBool:function(e){return typeof e==`boolean`}};e.exports=i.extend({type:`boolean`,flags:{sensitive:{default:!1}},terms:{falsy:{init:null,manifest:`values`},truthy:{init:null,manifest:`values`}},coerce(e,{schema:t}){if(typeof e!=`boolean`){if(typeof e==`string`){let n=e.trim(),r=t._flags.sensitive?n:n.toLowerCase();e=r===`true`||r!==`false`&&e}return typeof e!=`boolean`&&(e=t.$_terms.truthy&&t.$_terms.truthy.has(e,null,null,!t._flags.sensitive)||(!t.$_terms.falsy||!t.$_terms.falsy.has(e,null,null,!t._flags.sensitive))&&e),{value:e}}},validate(e,{error:t}){if(typeof e!=`boolean`)return{value:e,errors:t(`boolean.base`)}},rules:{truthy:{method(...e){a.verifyFlat(e,`truthy`);let t=this.clone();t.$_terms.truthy=t.$_terms.truthy||new o;for(let n=0;n<e.length;++n){let i=e[n];r(i!==void 0,`Cannot call truthy with undefined`),t.$_terms.truthy.add(i)}return t}},falsy:{method(...e){a.verifyFlat(e,`falsy`);let t=this.clone();t.$_terms.falsy=t.$_terms.falsy||new o;for(let n=0;n<e.length;++n){let i=e[n];r(i!==void 0,`Cannot call falsy with undefined`),t.$_terms.falsy.add(i)}return t}},sensitive:{method(e=!0){return this.$_setFlag(`sensitive`,e)}}},cast:{number:{from:s.isBool,to:(e,t)=>e?1:0},string:{from:s.isBool,to:(e,t)=>e?`true`:`false`}},manifest:{build:(e,t)=>(t.truthy&&(e=e.truthy(...t.truthy)),t.falsy&&(e=e.falsy(...t.falsy)),e)},messages:{"boolean.base":`{{#label}} must be a boolean`}})},6220:(e,t,n)=>{let{assert:r,deepEqual:i}=n(3115),a=n(9415),o={};e.exports=o.Values=class{constructor(e,t){this._values=new Set(e),this._refs=new Set(t),this._lowercase=o.lowercases(e),this._override=!1}get length(){return this._values.size+this._refs.size}add(e,t){a.isResolvable(e)?this._refs.has(e)||(this._refs.add(e),t&&t.register(e)):this.has(e,null,null,!1)||(this._values.add(e),typeof e==`string`&&this._lowercase.set(e.toLowerCase(),e))}static merge(e,t,n){if(e||=new o.Values,t){if(t._override)return t.clone();for(let n of[...t._values,...t._refs])e.add(n)}if(n)for(let t of[...n._values,...n._refs])e.remove(t);return e.length?e:null}remove(e){a.isResolvable(e)?this._refs.delete(e):(this._values.delete(e),typeof e==`string`&&this._lowercase.delete(e.toLowerCase()))}has(e,t,n,r){return!!this.get(e,t,n,r)}get(e,t,n,r){if(!this.length)return!1;if(this._values.has(e))return{value:e};if(typeof e==`string`&&e&&r){let t=this._lowercase.get(e.toLowerCase());if(t)return{value:t}}if(!this._refs.size&&typeof e!=`object`)return!1;if(typeof e==`object`){for(let t of this._values)if(i(t,e))return{value:t}}if(t)for(let a of this._refs){let o=a.resolve(e,t,n,null,{in:!0});if(o===void 0)continue;let s=a.in&&typeof o==`object`?Array.isArray(o)?o:Object.keys(o):[o];for(let t of s)if(typeof t==typeof e){if(r&&e&&typeof e==`string`){if(t.toLowerCase()===e.toLowerCase())return{value:t,ref:a}}else if(i(t,e))return{value:t,ref:a}}}return!1}override(){this._override=!0}values(e){if(e&&e.display){let e=[];for(let t of[...this._values,...this._refs])t!==void 0&&e.push(t);return e}return Array.from([...this._values,...this._refs])}clone(){let e=new o.Values(this._values,this._refs);return e._override=this._override,e}concat(e){r(!e._override,`Cannot concat override set of values`);let t=new o.Values([...this._values,...e._values],[...this._refs,...e._refs]);return t._override=this._override,t}describe(){let e=[];this._override&&e.push({override:!0});for(let t of this._values.values())e.push(t&&typeof t==`object`?{value:t}:t);for(let t of this._refs.values())e.push(t.describe());return e}},o.Values.prototype[a.symbols.values]=!0,o.Values.prototype.slice=o.Values.prototype.clone,o.lowercases=function(e){let t=new Map;if(e)for(let n of e)typeof n==`string`&&t.set(n.toLowerCase(),n);return t}},6913:e=>{e.exports={version:`18.0.2`}},6984:()=>{},7125:(e,t,n)=>{let r=n(3738),i={mismatched:null};e.exports=function(e,t,n){return n=Object.assign({prototype:!0},n),!!i.isDeepEqual(e,t,n,[])},i.isDeepEqual=function(e,t,n,a){if(e===t)return e!==0||1/e==1/t;let o=typeof e;if(o!==typeof t||e===null||t===null)return!1;if(o===`function`){if(!n.deepFunction||e.toString()!==t.toString())return!1}else if(o!==`object`)return e!=e&&t!=t;let s=i.getSharedType(e,t,!!n.prototype);switch(s){case r.buffer:return!1;case r.promise:return e===t;case r.regex:case r.url:return e.toString()===t.toString();case i.mismatched:return!1}for(let n=a.length-1;n>=0;--n)if(a[n].isSame(e,t))return!0;a.push(new i.SeenEntry(e,t));try{return!!i.isDeepEqualObj(s,e,t,n,a)}finally{a.pop()}},i.getSharedType=function(e,t,n){if(n)return Object.getPrototypeOf(e)===Object.getPrototypeOf(t)?r.getInternalProto(e):i.mismatched;let a=r.getInternalProto(e);return a===r.getInternalProto(t)?a:i.mismatched},i.valueOf=function(e){let t=e.valueOf;if(t===void 0)return e;try{return t.call(e)}catch(e){return e}},i.hasOwnEnumerableProperty=function(e,t){return Object.prototype.propertyIsEnumerable.call(e,t)},i.isSetSimpleEqual=function(e,t){for(let n of Set.prototype.values.call(e))if(!Set.prototype.has.call(t,n))return!1;return!0},i.isDeepEqualObj=function(e,t,n,a,o){let{isDeepEqual:s,valueOf:c,hasOwnEnumerableProperty:l}=i,{keys:u,getOwnPropertySymbols:d}=Object;if(e===r.array){if(!a.part){if(t.length!==n.length)return!1;for(let e=0;e<t.length;++e)if(!s(t[e],n[e],a,o))return!1;return!0}for(let e of t)for(let t of n)if(s(e,t,a,o))return!0}else if(e===r.set){if(t.size!==n.size)return!1;if(!i.isSetSimpleEqual(t,n)){let e=new Set(Set.prototype.values.call(n));for(let n of Set.prototype.values.call(t)){if(e.delete(n))continue;let t=!1;for(let r of e)if(s(n,r,a,o)){e.delete(r),t=!0;break}if(!t)return!1}}}else if(e===r.map){if(t.size!==n.size)return!1;for(let[e,r]of Map.prototype.entries.call(t))if(r===void 0&&!Map.prototype.has.call(n,e)||!s(r,Map.prototype.get.call(n,e),a,o))return!1}else if(e===r.error&&(t.name!==n.name||t.message!==n.message))return!1;let f=c(t),p=c(n);if((t!==f||n!==p)&&!s(f,p,a,o))return!1;let m=u(t);if(!a.part&&m.length!==u(n).length&&!a.skip)return!1;let h=0;for(let e of m)if(a.skip&&a.skip.includes(e))n[e]===void 0&&++h;else if(!l(n,e)||!s(t[e],n[e],a,o))return!1;if(!a.part&&m.length-h!==u(n).length)return!1;if(!1!==a.symbols){let e=d(t),r=new Set(d(n));for(let i of e){var g;if((g=a.skip)==null||!g.includes(i)){if(l(t,i)){if(!l(n,i)||!s(t[i],n[i],a,o))return!1}else if(l(n,i))return!1}r.delete(i)}for(let e of r)if(l(n,e))return!1}return!0},i.SeenEntry=class{constructor(e,t){this.obj=e,this.ref=t}isSame(e,t){return this.obj===e&&this.ref===t}}},7487:(e,t,n)=>{e.exports=n(2888).extend({type:`object`,cast:{map:{from:e=>e&&typeof e==`object`,to:(e,t)=>new Map(Object.entries(e))}}})},7858:e=>{e.exports=function(e,t,n){if(typeof e==`bigint`&&(e=Number(e)),e>=2**53-1&&(e=1/0),typeof e!=`number`&&e!==void 0)throw TypeError(`Timeout must be a number or bigint`);return new Promise(r=>{let i=n?n.setTimeout:setTimeout,a=()=>{let n=Math.min(e,2147483647);e-=n,i(()=>e>0?a():r(t),n)};e!==1/0&&a()})}},8013:(e,t,n)=>{let r=n(554),i=n(9415),a=n(1532);t.Report=class{constructor(e,n,r,i,a,o,s){if(this.code=e,this.flags=i,this.messages=a,this.path=o.path,this.prefs=s,this.state=o,this.value=n,this.message=null,this.template=null,this.local=r||{},this.local.label=t.label(this.flags,this.state,this.prefs,this.messages),this.value===void 0||this.local.hasOwnProperty(`value`)||(this.local.value=this.value),this.path.length){let e=this.path[this.path.length-1];typeof e!=`object`&&(this.local.key=e)}}_setTemplate(e){if(this.template=e,!this.flags.label&&this.path.length===0){let e=this._template(this.template,`root`);e&&(this.local.label=e)}}toString(){if(this.message)return this.message;let e=this.code;if(!this.prefs.errors.render)return this.code;let t=this._template(this.template)||this._template(this.prefs.messages)||this._template(this.messages);return t===void 0?`Error code "${e}" is not defined, your custom type is missing the correct messages definition`:(this.message=t.render(this.value,this.state,this.prefs,this.local,{errors:this.prefs.errors,messages:[this.prefs.messages,this.messages]}),this.prefs.errors.label||(this.message=this.message.replace(/^"" /,``).trim()),this.message)}_template(e,n){return t.template(this.value,e,n||this.code,this.state,this.prefs)}},t.path=function(e){let t=``;for(let n of e)typeof n!=`object`&&(typeof n==`string`?(t&&(t+=`.`),t+=n):t+=`[${n}]`);return t},t.template=function(e,t,n,r,o){if(!t)return;if(a.isTemplate(t))return n===`root`?null:t;let s=o.errors.language;if(i.isResolvable(s)&&(s=s.resolve(e,r,o)),s&&t[s]){if(t[s][n]!==void 0)return t[s][n];if(t[s][`*`]!==void 0)return t[s][`*`]}return t[n]?t[n]:t[`*`]},t.label=function(e,n,r,i){if(!r.errors.label)return``;if(e.label)return e.label;let a=n.path;return r.errors.label===`key`&&n.path.length>1&&(a=n.path.slice(-1)),t.path(a)||t.template(null,r.messages,`root`,n,r)||i&&t.template(null,i,`root`,n,r)||`value`},t.process=function(e,n,r){if(!e)return null;let{override:i,message:a,details:o}=t.details(e);if(i)return i;if(r.errors.stack)return new t.ValidationError(a,o,n);let s=Error.stackTraceLimit;Error.stackTraceLimit=0;let c=new t.ValidationError(a,o,n);return Error.stackTraceLimit=s,c},t.details=function(e,t={}){let n=[],r=[];for(let i of e){if(i instanceof Error){if(!1!==t.override)return{override:i};let e=i.toString();n.push(e),r.push({message:e,type:`override`,context:{error:i}});continue}let e=i.toString();n.push(e),r.push({message:e,path:i.path.filter(e=>typeof e!=`object`),type:i.code,context:i.local})}return n.length>1&&(n=[...new Set(n)]),{message:n.join(`. `),details:r}},t.ValidationError=class extends Error{constructor(e,t,n){super(e),this._original=n,this.details=t}static isError(e){return e instanceof t.ValidationError}},t.ValidationError.prototype.isJoi=!0,t.ValidationError.prototype.name=`ValidationError`,t.ValidationError.prototype.annotate=r.error},8121:e=>{let t={};e.exports=function(e){if(!e)return``;let n=``;for(let r=0;r<e.length;++r){let i=e.charCodeAt(r);t.isSafe(i)?n+=e[r]:n+=t.escapeHtmlChar(i)}return n},t.escapeHtmlChar=function(e){return t.namedHtml.get(e)||(e>=256?`&#`+e+`;`:`&#x${e.toString(16).padStart(2,`0`)};`)},t.isSafe=function(e){return t.safeCharCodes.has(e)},t.namedHtml=new Map([[38,`&amp;`],[60,`&lt;`],[62,`&gt;`],[34,`&quot;`],[160,`&nbsp;`],[162,`&cent;`],[163,`&pound;`],[164,`&curren;`],[169,`&copy;`],[174,`&reg;`]]),t.safeCharCodes=function(){let e=new Set;for(let t=32;t<123;++t)(t>=97||t>=65&&t<=90||t>=48&&t<=57||t===32||t===46||t===44||t===45||t===58||t===95)&&e.add(t);return e}()},8248:(e,t,n)=>{let{assert:r}=n(3115),i={};t.Sorter=class{constructor(){this._items=[],this.nodes=[]}add(e,t){let n=[].concat((t??={}).before??[]),i=[].concat(t.after??[]),a=t.group??`?`,o=t.sort??0;r(!n.includes(a),`Item cannot come before itself: ${a}`),r(!n.includes(`?`),`Item cannot come before unassociated items`),r(!i.includes(a),`Item cannot come after itself: ${a}`),r(!i.includes(`?`),`Item cannot come after unassociated items`),Array.isArray(e)||(e=[e]);for(let t of e){let e={seq:this._items.length,sort:o,before:n,after:i,group:a,node:t};this._items.push(e)}return t.manual||r(this._sort(),`item`,a===`?`?``:`added into group ${a}`,`created a dependencies error`),this.nodes}merge(e){Array.isArray(e)||(e=[e]);for(let t of e)if(t)for(let e of t._items)this._items.push(Object.assign({},e));this._items.sort(i.mergeSort);for(let e=0;e<this._items.length;++e)this._items[e].seq=e;return r(this._sort(),`merge created a dependencies error`),this.nodes}sort(){return r(this._sort(),`sort created a dependencies error`),this.nodes}_sort(){let e={},t=Object.create(null),n=Object.create(null);for(let r of this._items){let i=r.seq,a=r.group;n[a]=n[a]??[],n[a].push(i),e[i]=r.before;for(let e of r.after)t[e]=t[e]??[],t[e].push(i)}for(let t in e){let r=[];for(let i in e[t]){let a=e[t][i];n[a]=n[a]??[],r.push(...n[a])}e[t]=r}for(let r in t)if(n[r])for(let i of n[r])e[i].push(...t[r]);let r={};for(let t in e){let n=e[t];for(let e of n)r[e]=r[e]??[],r[e].push(t)}let i={},a=[];for(let e=0;e<this._items.length;++e){let t=e;if(r[e]){t=null;for(let e=0;e<this._items.length;++e){if(!0===i[e])continue;r[e]||(r[e]=[]);let n=r[e].length,a=0;for(let t=0;t<n;++t)i[r[e][t]]&&++a;if(a===n){t=e;break}}}t!==null&&(i[t]=!0,a.push(t))}if(a.length!==this._items.length)return!1;let o={};for(let e of this._items)o[e.seq]=e;this._items=[],this.nodes=[];for(let e of a){let t=o[e];this.nodes.push(t.node),this._items.push(t)}return!0}},i.mergeSort=(e,t)=>e.sort===t.sort?0:e.sort<t.sort?-1:1},8253:(e,t,n)=>{let r=n(1803),i=n(8314),a=e.exports=function(e,...t){if(!e)throw t.length===1&&t[0]instanceof Error?t[0]:new r(t.filter(e=>e!==``).map(e=>typeof e==`string`?e:e instanceof Error?e.message:i(e)).join(` `),a)}},8314:e=>{e.exports=function(...e){try{return JSON.stringify(...e)}catch(e){return`[Cannot display object: `+e.message+`]`}}},8529:(e,t,n)=>{let{assert:r,clone:i,reach:a}=n(3115),o=n(9415),s,c={symbol:Symbol(`ref`),defaults:{adjust:null,in:!1,iterables:null,map:null,separator:`.`,type:`value`}};t.create=function(e,t={}){r(typeof e==`string`,`Invalid reference key:`,e),o.assertOptions(t,[`adjust`,`ancestor`,`in`,`iterables`,`map`,`prefix`,`render`,`separator`]),r(!t.prefix||typeof t.prefix==`object`,`options.prefix must be of type object`);let n=Object.assign({},c.defaults,t);delete n.prefix;let i=n.separator,a=c.context(e,i,t.prefix);if(n.type=a.type,e=a.key,n.type===`value`)if(a.root&&(r(!i||e[0]!==i,`Cannot specify relative path with root prefix`),n.ancestor=`root`,e||=null),i&&i===e)e=null,n.ancestor=0;else if(n.ancestor!==void 0)r(!i||!e||e[0]!==i,`Cannot combine prefix with ancestor option`);else{let[t,r]=c.ancestor(e,i);r&&(e=e.slice(r))===``&&(e=null),n.ancestor=t}return n.path=i?e===null?[]:e.split(i):[e],new c.Ref(n)},t.in=function(e,n={}){return t.create(e,{...n,in:!0})},t.isRef=function(e){return!!e&&!!e[o.symbols.ref]},c.Ref=class{constructor(e){r(typeof e==`object`,`Invalid reference construction`),o.assertOptions(e,[`adjust`,`ancestor`,`in`,`iterables`,`map`,`path`,`render`,`separator`,`type`,`depth`,`key`,`root`,`display`]),r([!1,void 0].includes(e.separator)||typeof e.separator==`string`&&e.separator.length===1,`Invalid separator`),r(!e.adjust||typeof e.adjust==`function`,`options.adjust must be a function`),r(!e.map||Array.isArray(e.map),`options.map must be an array`),r(!e.map||!e.adjust,`Cannot set both map and adjust options`),Object.assign(this,c.defaults,e),r(this.type===`value`||this.ancestor===void 0,`Non-value references cannot reference ancestors`),Array.isArray(this.map)&&(this.map=new Map(this.map)),this.depth=this.path.length,this.key=this.path.length?this.path.join(this.separator):null,this.root=this.path[0],this.updateDisplay()}resolve(e,t,n,i,a={}){return r(!this.in||a.in,`Invalid in() reference usage`),this.type===`global`?this._resolve(n.context,t,a):this.type===`local`?this._resolve(i,t,a):this.ancestor?this.ancestor===`root`?this._resolve(t.ancestors[t.ancestors.length-1],t,a):(r(this.ancestor<=t.ancestors.length,`Invalid reference exceeds the schema root:`,this.display),this._resolve(t.ancestors[this.ancestor-1],t,a)):this._resolve(e,t,a)}_resolve(e,t,n){let r;if(this.type===`value`&&t.mainstay.shadow&&!1!==n.shadow&&(r=t.mainstay.shadow.get(this.absolute(t))),r===void 0&&(r=a(e,this.path,{iterables:this.iterables,functions:!0})),this.adjust&&(r=this.adjust(r)),this.map){let e=this.map.get(r);e!==void 0&&(r=e)}return t.mainstay&&t.mainstay.tracer.resolve(t,this,r),r}toString(){return this.display}absolute(e){return[...e.path.slice(0,-this.ancestor),...this.path]}clone(){return new c.Ref(this)}describe(){let e={path:this.path};this.type!==`value`&&(e.type=this.type),this.separator!==`.`&&(e.separator=this.separator),this.type===`value`&&this.ancestor!==1&&(e.ancestor=this.ancestor),this.map&&(e.map=[...this.map]);for(let t of[`adjust`,`iterables`,`render`])this[t]!==null&&this[t]!==void 0&&(e[t]=this[t]);return!1!==this.in&&(e.in=!0),{ref:e}}updateDisplay(){let e=this.key===null?``:this.key;if(this.type!==`value`)return void(this.display=`ref:${this.type}:${e}`);if(!this.separator)return void(this.display=`ref:${e}`);if(!this.ancestor)return void(this.display=`ref:${this.separator}${e}`);if(this.ancestor===`root`)return void(this.display=`ref:root:${e}`);if(this.ancestor===1)return void(this.display=`ref:${e||`..`}`);this.display=`ref:${Array(this.ancestor+1).fill(this.separator).join(``)}${e||``}`}},c.Ref.prototype[o.symbols.ref]=!0,t.build=function(e){return(e=Object.assign({},c.defaults,e)).type===`value`&&e.ancestor===void 0&&(e.ancestor=1),new c.Ref(e)},c.context=function(e,t,n={}){if(e=e.trim(),n){let r=n.global===void 0?`$`:n.global;if(r!==t&&e.startsWith(r))return{key:e.slice(r.length),type:`global`};let i=n.local===void 0?`#`:n.local;if(i!==t&&e.startsWith(i))return{key:e.slice(i.length),type:`local`};let a=n.root===void 0?`/`:n.root;if(a!==t&&e.startsWith(a))return{key:e.slice(a.length),type:`value`,root:!0}}return{key:e,type:`value`}},c.ancestor=function(e,t){if(!t||e[0]!==t)return[1,0];if(e[1]!==t)return[0,1];let n=2;for(;e[n]===t;)++n;return[n-1,n]},t.toSibling=0,t.toParent=1,t.Manager=class{constructor(){this.refs=[]}register(e,r){if(e)if(r=r===void 0?t.toParent:r,Array.isArray(e))for(let t of e)this.register(t,r);else if(o.isSchema(e))for(let t of e._refs.refs)t.ancestor-r>=0&&this.refs.push({ancestor:t.ancestor-r,root:t.root});else t.isRef(e)&&e.type===`value`&&e.ancestor-r>=0&&this.refs.push({ancestor:e.ancestor-r,root:e.root}),s||=n(1532),s.isTemplate(e)&&this.register(e.refs(),r)}get length(){return this.refs.length}clone(){let e=new t.Manager;return e.refs=i(this.refs),e}reset(){this.refs=[]}roots(){return this.refs.filter(e=>!e.ancestor).map(e=>e.root)}}},8663:()=>{},8669:e=>{e.exports=function(e){return e.replace(/[\^\$\.\*\+\-\?\=\!\:\|\\\/\(\)\[\]\{\}\,]/g,`\\$&`)}},8762:e=>{let t=Symbol(`wrapped`);e.exports=function(e){if(e[t])return e;let n=!1,r=function(...t){n||(n=!0,e(...t))};return r[t]=!0,r}},9017:()=>{},9033:(e,t,n)=>{let{assert:r,escapeRegex:i}=n(3115),{isDomainValid:a,isEmailValid:o,ipRegex:s,uriRegex:c}=n(3305),l=n(4895),u=n(680),d=n(9415),f={tlds:l.tlds instanceof Set&&{tlds:{allow:l.tlds,deny:null}},base64Regex:{true:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}==|[\w\-]{3}=)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$/},false:{true:/^(?:[\w\-]{2}[\w\-]{2})*(?:[\w\-]{2}(==)?|[\w\-]{3}=?)?$/,false:/^(?:[A-Za-z0-9+\/]{2}[A-Za-z0-9+\/]{2})*(?:[A-Za-z0-9+\/]{2}(==)?|[A-Za-z0-9+\/]{3}=?)?$/}},dataUriRegex:/^data:[\w+.-]+\/[\w+.-]+;((charset=[\w-]+|base64),)?(.*)$/,hexRegex:{withPrefix:/^0x[0-9a-f]+$/i,withOptionalPrefix:/^(?:0x)?[0-9a-f]+$/i,withoutPrefix:/^[0-9a-f]+$/i},ipRegex:s({cidr:`forbidden`}).regex,isoDurationRegex:/^P(?!$)(\d+Y)?(\d+M)?(\d+W)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?$/,guidBrackets:{"{":`}`,"[":`]`,"(":`)`,"":``},guidVersions:{uuidv1:`1`,uuidv2:`2`,uuidv3:`3`,uuidv4:`4`,uuidv5:`5`,uuidv6:`6`,uuidv7:`7`,uuidv8:`8`},guidSeparators:new Set([void 0,!0,!1,`-`,`:`]),normalizationForms:[`NFC`,`NFD`,`NFKC`,`NFKD`]};e.exports=u.extend({type:`string`,flags:{insensitive:{default:!1},truncate:{default:!1}},terms:{replacements:{init:null}},coerce:{from:`string`,method(e,{schema:t,state:n,prefs:r}){let i=t.$_getRule(`normalize`);i&&(e=e.normalize(i.args.form));let a=t.$_getRule(`case`);a&&(e=a.args.direction===`upper`?e.toLocaleUpperCase():e.toLocaleLowerCase());let o=t.$_getRule(`trim`);if(o&&o.args.enabled&&(e=e.trim()),t.$_terms.replacements)for(let n of t.$_terms.replacements)e=e.replace(n.pattern,n.replacement);let s=t.$_getRule(`hex`);if(s&&s.args.options.byteAligned&&e.length%2!=0&&(e=`0${e}`),t.$_getRule(`isoDate`)){let t=f.isoDate(e);t&&(e=t)}if(t._flags.truncate){let i=t.$_getRule(`max`);if(i){let a=i.args.limit;if(d.isResolvable(a)&&(a=a.resolve(e,n,r),!d.limit(a)))return{value:e,errors:t.$_createError(`any.ref`,a,{ref:i.args.limit,arg:`limit`,reason:`must be a positive integer`},n,r)};e=e.slice(0,a)}}return{value:e}}},validate(e,{schema:t,error:n}){if(typeof e!=`string`)return{value:e,errors:n(`string.base`)};if(e===``){let r=t.$_getRule(`min`);return r&&r.args.limit===0?void 0:{value:e,errors:n(`string.empty`)}}},rules:{alphanum:{method(){return this.$_addRule(`alphanum`)},validate:(e,t)=>/^[a-zA-Z0-9]+$/.test(e)?e:t.error(`string.alphanum`)},base64:{method(e={}){return d.assertOptions(e,[`paddingRequired`,`urlSafe`]),e={urlSafe:!1,paddingRequired:!0,...e},r(typeof e.paddingRequired==`boolean`,`paddingRequired must be boolean`),r(typeof e.urlSafe==`boolean`,`urlSafe must be boolean`),this.$_addRule({name:`base64`,args:{options:e}})},validate:(e,t,{options:n})=>f.base64Regex[n.paddingRequired][n.urlSafe].test(e)?e:t.error(`string.base64`)},case:{method(e){return r([`lower`,`upper`].includes(e),`Invalid case:`,e),this.$_addRule({name:`case`,args:{direction:e}})},validate:(e,t,{direction:n})=>n===`lower`&&e===e.toLocaleLowerCase()||n===`upper`&&e===e.toLocaleUpperCase()?e:t.error(`string.${n}case`),convert:!0},creditCard:{method(){return this.$_addRule(`creditCard`)},validate(e,t){let n=e.length,r=0,i=1;for(;n--;){let t=e.charAt(n)*i;r+=t-9*(t>9),i^=3}return r>0&&r%10==0?e:t.error(`string.creditCard`)}},dataUri:{method(e={}){return d.assertOptions(e,[`paddingRequired`]),e={paddingRequired:!0,...e},r(typeof e.paddingRequired==`boolean`,`paddingRequired must be boolean`),this.$_addRule({name:`dataUri`,args:{options:e}})},validate(e,t,{options:n}){let r=e.match(f.dataUriRegex);return r&&(!r[2]||r[2]!==`base64`||f.base64Regex[n.paddingRequired].false.test(r[3]))?e:t.error(`string.dataUri`)}},domain:{method(e){e&&d.assertOptions(e,[`allowFullyQualified`,`allowUnicode`,`allowUnderscore`,`maxDomainSegments`,`minDomainSegments`,`tlds`]);let t=f.addressOptions(e);return this.$_addRule({name:`domain`,args:{options:e},address:t})},validate:(e,t,n,{address:r})=>a(e,r)?e:t.error(`string.domain`)},email:{method(e={}){d.assertOptions(e,[`allowFullyQualified`,`allowUnicode`,`ignoreLength`,`maxDomainSegments`,`minDomainSegments`,`multiple`,`separator`,`tlds`]),r(e.multiple===void 0||typeof e.multiple==`boolean`,`multiple option must be an boolean`);let t=f.addressOptions(e),n=RegExp(`\\s*[${e.separator?i(e.separator):`,`}]\\s*`);return this.$_addRule({name:`email`,args:{options:e},regex:n,address:t})},validate(e,t,{options:n},{regex:r,address:i}){let a=n.multiple?e.split(r):[e],s=[];for(let e of a)o(e,i)||s.push(e);return s.length?t.error(`string.email`,{value:e,invalids:s}):e}},guid:{alias:`uuid`,method(e={}){d.assertOptions(e,[`version`,`separator`,`wrapper`]),r(e.wrapper===void 0||typeof e.wrapper==`boolean`||typeof e.wrapper==`string`&&typeof f.guidBrackets[e.wrapper]==`string`,`"wrapper" must be true, false, or one of "${Object.keys(f.guidBrackets).filter(Boolean).join(`", "`)}"`);let t=``;if(e.version){let n=[].concat(e.version);r(n.length>=1,`version must have at least 1 valid version specified`);let i=new Set;for(let e=0;e<n.length;++e){let a=n[e];r(typeof a==`string`,`version at position `+e+` must be a string`);let o=f.guidVersions[a.toLowerCase()];r(o,`version at position `+e+` must be one of `+Object.keys(f.guidVersions).join(`, `)),r(!i.has(o),`version at position `+e+` must not be a duplicate`),t+=o,i.add(o)}}r(f.guidSeparators.has(e.separator),`separator must be one of true, false, "-", or ":"`);let n=e.separator===void 0?`[:-]?`:!0===e.separator?`[:-]`:!1===e.separator?`[]?`:`\\${e.separator}`,a,o;e.wrapper===void 0?(a=`[\\[{\\(]?`,o=`[\\]}\\)]?`):!0===e.wrapper?(a=`[\\[{\\(]`,o=`[\\]}\\)]`):!1===e.wrapper?(a=``,o=``):(a=i(e.wrapper),o=i(f.guidBrackets[e.wrapper]));let s=RegExp(`^(${a})[0-9A-F]{8}(${n})[0-9A-F]{4}\\2?[${t||`0-9A-F`}][0-9A-F]{3}\\2?[${t?`89AB`:`0-9A-F`}][0-9A-F]{3}\\2?[0-9A-F]{12}(${o})$`,`i`);return this.$_addRule({name:`guid`,args:{options:e},regex:s})},validate(e,t,n,{regex:r}){let i=r.exec(e);if(!i)return t.error(`string.guid`);let a=i[1],o=i[i.length-1];return(a||o)&&f.guidBrackets[a]!==o?t.error(`string.guid`):e}},hex:{method(e={}){return d.assertOptions(e,[`byteAligned`,`prefix`]),e={byteAligned:!1,prefix:!1,...e},r(typeof e.byteAligned==`boolean`,`byteAligned must be boolean`),r(typeof e.prefix==`boolean`||e.prefix===`optional`,`prefix must be boolean or "optional"`),this.$_addRule({name:`hex`,args:{options:e}})},validate:(e,t,{options:n})=>(n.prefix===`optional`?f.hexRegex.withOptionalPrefix:!0===n.prefix?f.hexRegex.withPrefix:f.hexRegex.withoutPrefix).test(e)?n.byteAligned&&e.length%2!=0?t.error(`string.hexAlign`):e:t.error(`string.hex`)},hostname:{method(){return this.$_addRule(`hostname`)},validate:(e,t)=>a(e,{minDomainSegments:1})||f.ipRegex.test(e)?e:t.error(`string.hostname`)},insensitive:{method(){return this.$_setFlag(`insensitive`,!0)}},ip:{method(e={}){d.assertOptions(e,[`cidr`,`version`]);let{cidr:t,versions:n,regex:r}=s(e),i=e.version?n:void 0;return this.$_addRule({name:`ip`,args:{options:{cidr:t,version:i}},regex:r})},validate:(e,t,{options:n},{regex:r})=>r.test(e)?e:n.version?t.error(`string.ipVersion`,{value:e,cidr:n.cidr,version:n.version}):t.error(`string.ip`,{value:e,cidr:n.cidr})},isoDate:{method(){return this.$_addRule(`isoDate`)},validate:(e,{error:t})=>f.isoDate(e)?e:t(`string.isoDate`)},isoDuration:{method(){return this.$_addRule(`isoDuration`)},validate:(e,t)=>f.isoDurationRegex.test(e)?e:t.error(`string.isoDuration`)},length:{method(e,t){return f.length(this,`length`,e,`=`,t)},validate(e,t,{limit:n,encoding:r},{name:i,operator:a,args:o}){let s=!r&&e.length;return d.compare(s,n,a)?e:t.error(`string.`+i,{limit:o.limit,value:e,encoding:r})},args:[{name:`limit`,ref:!0,assert:d.limit,message:`must be a positive integer`},`encoding`]},lowercase:{method(){return this.case(`lower`)}},max:{method(e,t){return f.length(this,`max`,e,`<=`,t)},args:[`limit`,`encoding`]},min:{method(e,t){return f.length(this,`min`,e,`>=`,t)},args:[`limit`,`encoding`]},normalize:{method(e=`NFC`){return r(f.normalizationForms.includes(e),`normalization form must be one of `+f.normalizationForms.join(`, `)),this.$_addRule({name:`normalize`,args:{form:e}})},validate:(e,{error:t},{form:n})=>e===e.normalize(n)?e:t(`string.normalize`,{value:e,form:n}),convert:!0},pattern:{alias:`regex`,method(e,t={}){r(e instanceof RegExp,`regex must be a RegExp`),r(!e.flags.includes(`g`)&&!e.flags.includes(`y`),`regex should not use global or sticky mode`),typeof t==`string`&&(t={name:t}),d.assertOptions(t,[`invert`,`name`]);let n=[`string.pattern`,t.invert?`.invert`:``,t.name?`.name`:`.base`].join(``);return this.$_addRule({name:`pattern`,args:{regex:e,options:t},errorCode:n})},validate:(e,t,{regex:n,options:r},{errorCode:i})=>n.test(e)^r.invert?e:t.error(i,{name:r.name,regex:n,value:e}),args:[`regex`,`options`],multi:!0},replace:{method(e,t){typeof e==`string`&&(e=new RegExp(i(e),`g`)),r(e instanceof RegExp,`pattern must be a RegExp`),r(typeof t==`string`,`replacement must be a String`);let n=this.clone();return n.$_terms.replacements||(n.$_terms.replacements=[]),n.$_terms.replacements.push({pattern:e,replacement:t}),n}},token:{method(){return this.$_addRule(`token`)},validate:(e,t)=>/^\w+$/.test(e)?e:t.error(`string.token`)},trim:{method(e=!0){return r(typeof e==`boolean`,`enabled must be a boolean`),this.$_addRule({name:`trim`,args:{enabled:e}})},validate:(e,t,{enabled:n})=>n&&e!==e.trim()?t.error(`string.trim`):e,convert:!0},truncate:{method(e=!0){return r(typeof e==`boolean`,`enabled must be a boolean`),this.$_setFlag(`truncate`,e)}},uppercase:{method(){return this.case(`upper`)}},uri:{method(e={}){d.assertOptions(e,[`allowRelative`,`allowQuerySquareBrackets`,`domain`,`relativeOnly`,`scheme`,`encodeUri`]),e.domain&&d.assertOptions(e.domain,[`allowFullyQualified`,`allowUnicode`,`maxDomainSegments`,`minDomainSegments`,`tlds`]);let{regex:t,scheme:n}=c(e),r=e.domain?f.addressOptions(e.domain):null;return this.$_addRule({name:`uri`,args:{options:e},regex:t,domain:r,scheme:n})},validate(e,t,{options:n},{regex:r,domain:i,scheme:o}){if([`http:/`,`https:/`].includes(e))return t.error(`string.uri`);let s=r.exec(e);if(!s&&t.prefs.convert&&n.encodeUri){let t=encodeURI(e);s=r.exec(t),s&&(e=t)}if(s){let r=s[1]||s[2];return!i||n.allowRelative&&!r||a(r,i)?e:t.error(`string.domain`,{value:r})}return n.relativeOnly?t.error(`string.uriRelativeOnly`):n.scheme?t.error(`string.uriCustomScheme`,{scheme:o,value:e}):t.error(`string.uri`)}}},manifest:{build(e,t){if(t.replacements)for(let{pattern:n,replacement:r}of t.replacements)e=e.replace(n,r);return e}},messages:{"string.alphanum":`{{#label}} must only contain alpha-numeric characters`,"string.base":`{{#label}} must be a string`,"string.base64":`{{#label}} must be a valid base64 string`,"string.creditCard":`{{#label}} must be a credit card`,"string.dataUri":`{{#label}} must be a valid dataUri string`,"string.domain":`{{#label}} must contain a valid domain name`,"string.email":`{{#label}} must be a valid email`,"string.empty":`{{#label}} is not allowed to be empty`,"string.guid":`{{#label}} must be a valid GUID`,"string.hex":`{{#label}} must only contain hexadecimal characters`,"string.hexAlign":`{{#label}} hex decoded representation must be byte aligned`,"string.hostname":`{{#label}} must be a valid hostname`,"string.ip":`{{#label}} must be a valid ip address with a {{#cidr}} CIDR`,"string.ipVersion":`{{#label}} must be a valid ip address of one of the following versions {{#version}} with a {{#cidr}} CIDR`,"string.isoDate":`{{#label}} must be in iso format`,"string.isoDuration":`{{#label}} must be a valid ISO 8601 duration`,"string.length":`{{#label}} length must be {{#limit}} characters long`,"string.lowercase":`{{#label}} must only contain lowercase characters`,"string.max":`{{#label}} length must be less than or equal to {{#limit}} characters long`,"string.min":`{{#label}} length must be at least {{#limit}} characters long`,"string.normalize":`{{#label}} must be unicode normalized in the {{#form}} form`,"string.token":`{{#label}} must only contain alpha-numeric and underscore characters`,"string.pattern.base":`{{#label}} with value {:[.]} fails to match the required pattern: {{#regex}}`,"string.pattern.name":`{{#label}} with value {:[.]} fails to match the {{#name}} pattern`,"string.pattern.invert.base":`{{#label}} with value {:[.]} matches the inverted pattern: {{#regex}}`,"string.pattern.invert.name":`{{#label}} with value {:[.]} matches the inverted {{#name}} pattern`,"string.trim":`{{#label}} must not have leading or trailing whitespace`,"string.uri":`{{#label}} must be a valid uri`,"string.uriCustomScheme":`{{#label}} must be a valid uri with a scheme matching the {{#scheme}} pattern`,"string.uriRelativeOnly":`{{#label}} must be a valid relative uri`,"string.uppercase":`{{#label}} must only contain uppercase characters`}}),f.addressOptions=function(e){if(!e)return f.tlds||e;if(r(e.minDomainSegments===void 0||Number.isSafeInteger(e.minDomainSegments)&&e.minDomainSegments>0,`minDomainSegments must be a positive integer`),r(e.maxDomainSegments===void 0||Number.isSafeInteger(e.maxDomainSegments)&&e.maxDomainSegments>0,`maxDomainSegments must be a positive integer`),!1===e.tlds)return e;if(!0===e.tlds||e.tlds===void 0)return r(f.tlds,`Built-in TLD list disabled`),Object.assign({},e,f.tlds);r(typeof e.tlds==`object`,`tlds must be true, false, or an object`);let t=e.tlds.deny;if(t)return Array.isArray(t)&&(e=Object.assign({},e,{tlds:{deny:new Set(t)}})),r(e.tlds.deny instanceof Set,`tlds.deny must be an array, Set, or boolean`),r(!e.tlds.allow,`Cannot specify both tlds.allow and tlds.deny lists`),f.validateTlds(e.tlds.deny,`tlds.deny`),e;let n=e.tlds.allow;return n?!0===n?(r(f.tlds,`Built-in TLD list disabled`),Object.assign({},e,f.tlds)):(Array.isArray(n)&&(e=Object.assign({},e,{tlds:{allow:new Set(n)}})),r(e.tlds.allow instanceof Set,`tlds.allow must be an array, Set, or boolean`),f.validateTlds(e.tlds.allow,`tlds.allow`),e):{...e,tlds:!1}},f.validateTlds=function(e,t){for(let n of e)r(a(n,{minDomainSegments:1,maxDomainSegments:1}),`${t} must contain valid top level domain names`)},f.isoDate=function(e){if(!d.isIsoDate(e))return null;/.*T.*[+-]\d\d$/.test(e)&&(e+=`00`);let t=new Date(e);return isNaN(t.getTime())?null:t.toISOString()},f.length=function(e,t,n,i,a){return r(!a||!1,`Invalid encoding:`,a),e.$_addRule({name:t,method:`length`,args:{limit:n,encoding:a},operator:i})}},9145:e=>{let t={};e.exports=t.Bench=class{constructor(){this.ts=0,this.reset()}reset(){this.ts=t.Bench.now()}elapsed(){return t.Bench.now()-this.ts}static now(){let e=process.hrtime();return 1e3*e[0]+e[1]/1e6}}},9241:(e,t,n)=>{let r=n(8253);e.exports=function(e){return r(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~\"\\]*$/.test(e),`Bad attribute value (`+e+`)`),e.replace(/\\/g,`\\\\`).replace(/\"/g,`\\"`)}},9315:(e,t,n)=>{let r=n(8253),i=n(4126),a=n(86),o={};e.exports=o.merge=function(e,t,n){if(r(e&&typeof e==`object`,`Invalid target value: must be an object`),r(t==null||typeof t==`object`,`Invalid source value: must be null, undefined, or an object`),!t)return e;if(n=Object.assign({nullOverride:!0,mergeArrays:!0},n),Array.isArray(t)){r(Array.isArray(e),`Cannot merge array onto an object`),n.mergeArrays||(e.length=0);for(let r=0;r<t.length;++r)e.push(i(t[r],{symbols:n.symbols}));return e}let s=a.keys(t,n);for(let r=0;r<s.length;++r){let a=s[r];if(a===`__proto__`||!Object.prototype.propertyIsEnumerable.call(t,a))continue;let c=t[a];if(c&&typeof c==`object`){if(e[a]===c)continue;!e[a]||typeof e[a]!=`object`||Array.isArray(e[a])!==Array.isArray(c)||c instanceof Date||c instanceof RegExp?e[a]=i(c,{symbols:n.symbols}):o.merge(e[a],c,n)}else (c!=null||n.nullOverride)&&(e[a]=c)}return e}},9415:(e,t,n)=>{let{assert:r,AssertError:i}=n(3115),a=n(6913),o,s,c={isoDate:/^(?:[-+]\d{2})?(?:\d{4}(?!\d{2}\b))(?:(-?)(?:(?:0[1-9]|1[0-2])(?:\1(?:[12]\d|0[1-9]|3[01]))?|W(?:[0-4]\d|5[0-2])(?:-?[1-7])?|(?:00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[1-6])))(?![T]$|[T][\d]+Z$)(?:[T\s](?:(?:(?:[01]\d|2[0-3])(?:(:?)[0-5]\d)?|24\:?00)(?:[.,]\d+(?!:))?)(?:\2[0-5]\d(?:[.,]\d+)?)?(?:[Z]|(?:[+-])(?:[01]\d|2[0-3])(?::?[0-5]\d)?)?)?)?$/};t.version=a.version,t.defaults={abortEarly:!0,allowUnknown:!1,artifacts:!1,cache:!0,context:null,convert:!0,dateFormat:`iso`,errors:{escapeHtml:!1,label:`path`,language:null,render:!0,stack:!1,wrap:{label:`"`,array:`[]`}},externals:!0,messages:{},nonEnumerables:!1,noDefaults:!1,presence:`optional`,skipFunctions:!1,stripUnknown:!1,warnings:!1},t.symbols={any:Symbol.for(`@hapi/joi/schema`),arraySingle:Symbol(`arraySingle`),deepDefault:Symbol(`deepDefault`),errors:Symbol(`errors`),literal:Symbol(`literal`),override:Symbol(`override`),parent:Symbol(`parent`),prefs:Symbol(`prefs`),ref:Symbol(`ref`),template:Symbol(`template`),values:Symbol(`values`)},t.assertOptions=function(e,t,n=`Options`){r(e&&typeof e==`object`&&!Array.isArray(e),`Options must be of type object`);let i=Object.keys(e).filter(e=>!t.includes(e));r(i.length===0,`${n} contain unknown keys: ${i}`)},t.checkPreferences=function(e){s||=n(1688);let t=s.preferences.validate(e);if(t.error)throw new i([t.error.details[0].message])},t.compare=function(e,t,n){switch(n){case`=`:return e===t;case`>`:return e>t;case`<`:return e<t;case`>=`:return e>=t;case`<=`:return e<=t}},t.default=function(e,t){return e===void 0?t:e},t.isIsoDate=function(e){return c.isoDate.test(e)},t.isNumber=function(e){return typeof e==`number`&&!isNaN(e)},t.isResolvable=function(e){return!!e&&(e[t.symbols.ref]||e[t.symbols.template])},t.isSchema=function(e,n={}){let i=e&&e[t.symbols.any];return!!i&&(r(n.legacy||i.version===t.version,`Cannot mix different versions of joi schemas`),!0)},t.isValues=function(e){return e[t.symbols.values]},t.limit=function(e){return Number.isSafeInteger(e)&&e>=0},t.preferences=function(e,r){o||=n(6162),e||={},r||={};let i=Object.assign({},e,r);return r.errors&&e.errors&&(i.errors=Object.assign({},e.errors,r.errors),i.errors.wrap=Object.assign({},e.errors.wrap,r.errors.wrap)),r.messages&&(i.messages=o.compile(r.messages,e.messages)),delete i[t.symbols.prefs],i},t.tryWithPath=function(e,t,n={}){try{return e()}catch(e){throw e.path===void 0?e.path=t:e.path=t+`.`+e.path,n.append&&(e.message=`${e.message} (${e.path})`),e}},t.validateArg=function(e,n,{assert:r,message:i}){if(t.isSchema(r)){let t=r.validate(e);return t.error?t.error.message:void 0}if(!r(e))return n?`${n} ${i}`:i},t.verifyFlat=function(e,t){for(let n of e)r(!Array.isArray(n),`Method no longer accepts array arguments:`,t)}},9556:(e,t,n)=>{let{assert:r}=n(3115),i=n(680),a=n(9415),o=n(3541),s=n(8013),c={};e.exports=i.extend({type:`link`,properties:{schemaChain:!0},terms:{link:{init:null,manifest:`single`,register:!1}},args:(e,t)=>e.ref(t),validate(e,{schema:t,state:n,prefs:i}){r(t.$_terms.link,`Uninitialized link schema`);let a=c.generate(t,e,n,i),o=t.$_terms.link[0].ref;return a.$_validate(e,n.nest(a,`link:${o.display}:${a.type}`),i)},generate:(e,t,n,r)=>c.generate(e,t,n,r),rules:{ref:{method(e){r(!this.$_terms.link,`Cannot reinitialize schema`),e=o.ref(e),r(e.type===`value`||e.type===`local`,`Invalid reference type:`,e.type),r(e.type===`local`||e.ancestor===`root`||e.ancestor>0,`Link cannot reference itself`);let t=this.clone();return t.$_terms.link=[{ref:e}],t}},relative:{method(e=!0){return this.$_setFlag(`relative`,e)}}},overrides:{concat(e){r(this.$_terms.link,`Uninitialized link schema`),r(a.isSchema(e),`Invalid schema object`),r(e.type!==`link`,`Cannot merge type link with another link`);let t=this.clone();return t.$_terms.whens||(t.$_terms.whens=[]),t.$_terms.whens.push({concat:e}),t.$_mutateRebuild()}},manifest:{build:(e,t)=>(r(t.link,`Invalid link description missing link`),e.ref(t.link))}}),c.generate=function(e,t,n,r){let i=n.mainstay.links.get(e);if(i)return i._generate(t,n,r).schema;let a=e.$_terms.link[0].ref,{perspective:o,path:s}=c.perspective(a,n);c.assert(o,`which is outside of schema boundaries`,a,e,n,r);try{i=s.length?o.$_reach(s):o}catch{c.assert(!1,`to non-existing schema`,a,e,n,r)}return c.assert(i.type!==`link`,`which is another link`,a,e,n,r),e._flags.relative||n.mainstay.links.set(e,i),i._generate(t,n,r).schema},c.perspective=function(e,t){if(e.type===`local`){for(let{schema:n,key:r}of t.schemas){if((n._flags.id||r)===e.path[0])return{perspective:n,path:e.path.slice(1)};if(n.$_terms.shared){for(let t of n.$_terms.shared)if(t._flags.id===e.path[0])return{perspective:t,path:e.path.slice(1)}}}return{perspective:null,path:null}}return e.ancestor===`root`?{perspective:t.schemas[t.schemas.length-1].schema,path:e.path}:{perspective:t.schemas[e.ancestor]&&t.schemas[e.ancestor].schema,path:e.path}},c.assert=function(e,t,n,i,a,o){e||r(!1,`"${s.label(i._flags,a,o)}" contains link reference "${n.display}" ${t}`)}},9725:e=>{e.exports=function(){}}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,`__esModule`,{value:!0})},n(1100)})())}))(),1);const l=c.default.object({id:c.default.number().required(),created:c.default.date().required(),title:c.default.string().min(1).max(100).required(),type:c.default.string().valid(`jpg`,`png`).required(),size:c.default.number().required(),url:c.default.string().uri().required()}),u=c.default.object({id:c.default.number().required(),stars:c.default.number().min(0).max(5).required(),title:c.default.string().min(1).max(100).required(),text:c.default.string().min(1).max(1e3).required(),images:c.default.array().items(l).required()});c.default.object({id:c.default.number().required(),created:c.default.date().required(),title:c.default.string().min(1).max(100).required(),brand:c.default.string().min(1).max(30).required(),description:c.default.string().min(1).max(500).required(),price:c.default.number().min(1).max(1e4).required(),discount:c.default.number().min(1).max(100).allow(null).required(),quantity:c.default.number().min(0).max(10).required(),tags:c.default.array().items(c.default.string().min(1).max(30)).required(),images:c.default.array().items(l).required(),ratings:c.default.array().items(u).required()}).validate({});
Created by eskimojo for Open Circle