/*! For license information please see 9594.eda1d632.js.LICENSE.txt */ (self.webpackChunkweb=self.webpackChunkweb||[]).push([[9594],{85897:()=>{},51517:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=n(17438).default},49377:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=n(7869).default},34081:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/AntDesign.163adab9dbd7cb1ed12a.ttf",i=JSON.parse('{"stepforward":58880,"stepbackward":58881,"forward":58882,"banckward":58883,"caretright":58884,"caretleft":58885,"caretdown":58886,"caretup":58887,"rightcircle":58888,"leftcircle":58889,"upcircle":58890,"downcircle":58891,"rightcircleo":58892,"leftcircleo":58893,"upcircleo":58894,"downcircleo":58895,"verticleleft":58896,"verticleright":58897,"back":58898,"retweet":58899,"shrink":58900,"arrowsalt":58901,"doubleright":58903,"doubleleft":58904,"arrowdown":58905,"arrowup":58906,"arrowright":58907,"arrowleft":58908,"down":58909,"up":58910,"right":58911,"left":58912,"minussquareo":58913,"minuscircle":58914,"minuscircleo":58915,"minus":58916,"pluscircleo":58917,"pluscircle":58918,"plus":58919,"infocirlce":58920,"infocirlceo":58921,"info":58922,"exclamation":58923,"exclamationcircle":58924,"exclamationcircleo":58925,"closecircle":58926,"closecircleo":58927,"checkcircle":58928,"checkcircleo":58929,"check":58930,"close":58931,"customerservice":58932,"creditcard":58933,"codesquareo":58934,"book":58935,"barschart":58936,"bars":58937,"question":58938,"questioncircle":58939,"questioncircleo":58940,"pause":58941,"pausecircle":58942,"pausecircleo":58943,"clockcircle":58944,"clockcircleo":58945,"swap":58946,"swapleft":58947,"swapright":58948,"plussquareo":58949,"frown":58950,"menufold":58968,"mail":58969,"link":58971,"areachart":58972,"linechart":58973,"home":58974,"laptop":58975,"star":58976,"staro":58977,"filter":58979,"meho":58982,"meh":58983,"shoppingcart":58984,"save":58985,"user":58986,"videocamera":58987,"totop":58988,"team":58989,"sharealt":58993,"setting":58994,"picture":58996,"phone":58997,"paperclip":58998,"notification":58999,"menuunfold":59001,"inbox":59002,"lock":59003,"qrcode":59004,"tags":59005,"tagso":59006,"cloudo":59007,"cloud":59008,"cloudupload":59009,"clouddownload":59010,"clouddownloado":59011,"clouduploado":59012,"enviroment":59013,"enviromento":59014,"eye":59015,"eyeo":59016,"camera":59017,"camerao":59018,"windows":59019,"export2":59024,"export":59025,"circledowno":59027,"circledown":59028,"hdd":59034,"ie":59035,"delete":59039,"enter":59040,"pushpino":59041,"pushpin":59042,"heart":59043,"hearto":59044,"smile-circle":59047,"smileo":59048,"frowno":59049,"calculator":59050,"chrome":59052,"github":59053,"iconfontdesktop":59060,"caretcircleoup":59061,"upload":59062,"download":59063,"piechart":59064,"lock1":59065,"unlock":59066,"windowso":59068,"dotchart":59069,"barchart":59070,"codesquare":59071,"plussquare":59072,"minussquare":59073,"closesquare":59074,"closesquareo":59075,"checksquare":59076,"checksquareo":59077,"fastbackward":59078,"fastforward":59079,"upsquare":59080,"downsquare":59081,"leftsquare":59082,"rightsquare":59083,"rightsquareo":59084,"leftsquareo":59085,"down-square-o":59086,"up-square-o":59087,"play":59088,"playcircleo":59089,"tag":59090,"tago":59091,"addfile":59664,"folder1":58978,"file1":58980,"switcher":59667,"addfolder":59668,"folderopen":59033,"search1":58992,"ellipsis1":58951,"calendar":59067,"filetext1":59032,"copy1":58952,"jpgfile1":59036,"pdffile1":59059,"exclefile1":59056,"pptfile1":59057,"unknowfile1":59055,"wordfile1":59058,"dingding":59683,"dingding-o":59685,"mobile1":59000,"tablet1":58990,"bells":58958,"disconnect":58959,"database":58960,"barcode":58962,"hourglass":58963,"key":58964,"flag":58965,"layout":58966,"printer":58995,"USB":59095,"skin":59096,"tool":59097,"car":59100,"addusergroup":59101,"carryout":59103,"deleteuser":59104,"deleteusergroup":59105,"man":59106,"isv":59107,"gift":59108,"idcard":59109,"medicinebox":59110,"redenvelopes":59111,"rest":59112,"Safety":59114,"wallet":59115,"woman":59116,"adduser":59117,"bank":59118,"Trophy":59119,"loading1":59054,"loading2":58957,"like2":59037,"dislike2":59038,"like1":58956,"dislike1":58955,"bulb1":58953,"rocket1":59663,"select1":58954,"apple1":59020,"apple-o":59092,"android1":59704,"android":59021,"aliwangwang-o1":59023,"aliwangwang":59022,"pay-circle1":59045,"pay-circle-o1":59046,"poweroff":59093,"trademark":58961,"find":59099,"copyright":59102,"sound":59113,"earth":59121,"wifi":59094,"sync":59098,"login":58967,"logout":58970,"reload1":58902,"message1":59051,"shake":59727,"API":59729,"appstore-o":59029,"appstore1":59030,"scan1":59031,"exception1":58981,"contacts":59120,"solution1":58991,"fork":59122,"edit":59026,"form":59798,"warning":59799,"table":59800,"profile":59801,"dashboard":59802,"indent-left":59814,"indent-right":59815,"menu-unfold":59820,"menu-fold":59821,"antdesign":59826,"alipay-square":59827,"codepen-circle":59828,"google":59829,"amazon":59830,"codepen":59831,"facebook-square":59832,"dropbox":59833,"googleplus":59834,"linkedin-square":59835,"medium-monogram":59836,"gitlab":59837,"medium-wordmark":59838,"QQ":59839,"skype":59840,"taobao-square":59841,"alipay-circle":59842,"youtube":59843,"wechat":59844,"twitter":59845,"weibo":59846,"HTML":59847,"taobao-circle":59123,"weibo-circle":59124,"weibo-square":59125,"CodeSandbox":59860,"aliyun":59892,"zhihu":59139,"behance":59143,"dribbble":59145,"dribbble-square":59146,"behance-square":59144,"file-markdown":59140,"instagram":59147,"yuque":59148,"slack":59141,"slack-square":59142}'),o=(0,r.default)(i,"anticon",a)},26042:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/Entypo.fc6169344c041cffcdae.ttf",i=JSON.parse('{"500px":61696,"500px-with-circle":61697,"add-to-list":61698,"add-user":61699,"address":61700,"adjust":61701,"air":61702,"aircraft":61703,"aircraft-landing":61704,"aircraft-take-off":61705,"align-bottom":61706,"align-horizontal-middle":61707,"align-left":61708,"align-right":61709,"align-top":61710,"align-vertical-middle":61711,"app-store":61712,"archive":61713,"area-graph":61714,"arrow-bold-down":61715,"arrow-bold-left":61716,"arrow-bold-right":61717,"arrow-bold-up":61718,"arrow-down":61719,"arrow-left":61720,"arrow-long-down":61721,"arrow-long-left":61722,"arrow-long-right":61723,"arrow-long-up":61724,"arrow-right":61725,"arrow-up":61726,"arrow-with-circle-down":61727,"arrow-with-circle-left":61728,"arrow-with-circle-right":61729,"arrow-with-circle-up":61730,"attachment":61731,"awareness-ribbon":61732,"back":61733,"back-in-time":61734,"baidu":61735,"bar-graph":61736,"basecamp":61737,"battery":61738,"beamed-note":61739,"behance":61740,"bell":61741,"blackboard":61742,"block":61743,"book":61744,"bookmark":61745,"bookmarks":61746,"bowl":61747,"box":61748,"briefcase":61749,"browser":61750,"brush":61751,"bucket":61752,"bug":61753,"cake":61754,"calculator":61755,"calendar":61756,"camera":61757,"ccw":61758,"chat":61759,"check":61760,"chevron-down":61761,"chevron-left":61762,"chevron-right":61763,"chevron-small-down":61764,"chevron-small-left":61765,"chevron-small-right":61766,"chevron-small-up":61767,"chevron-thin-down":61768,"chevron-thin-left":61769,"chevron-thin-right":61770,"chevron-thin-up":61771,"chevron-up":61772,"chevron-with-circle-down":61773,"chevron-with-circle-left":61774,"chevron-with-circle-right":61775,"chevron-with-circle-up":61776,"circle":61777,"circle-with-cross":61778,"circle-with-minus":61779,"circle-with-plus":61780,"circular-graph":61781,"clapperboard":61782,"classic-computer":61783,"clipboard":61784,"clock":61785,"cloud":61786,"code":61787,"cog":61788,"colours":61789,"compass":61790,"controller-fast-backward":61791,"controller-fast-forward":61792,"controller-jump-to-start":61793,"controller-next":61794,"controller-paus":61795,"controller-play":61796,"controller-record":61797,"controller-stop":61798,"controller-volume":61799,"copy":61800,"creative-cloud":61801,"creative-commons":61802,"creative-commons-attribution":61803,"creative-commons-noderivs":61804,"creative-commons-noncommercial-eu":61805,"creative-commons-noncommercial-us":61806,"creative-commons-public-domain":61807,"creative-commons-remix":61808,"creative-commons-share":61809,"creative-commons-sharealike":61810,"credit":61811,"credit-card":61812,"crop":61813,"cross":61814,"cup":61815,"cw":61816,"cycle":61817,"database":61818,"dial-pad":61819,"direction":61820,"document":61821,"document-landscape":61822,"documents":61823,"dot-single":61824,"dots-three-horizontal":61825,"dots-three-vertical":61826,"dots-two-horizontal":61827,"dots-two-vertical":61828,"download":61829,"dribbble":61830,"dribbble-with-circle":61831,"drink":61832,"drive":61833,"drop":61834,"dropbox":61835,"edit":61836,"email":61837,"emoji-flirt":61838,"emoji-happy":61839,"emoji-neutral":61840,"emoji-sad":61841,"erase":61842,"eraser":61843,"evernote":61844,"export":61845,"eye":61846,"eye-with-line":61847,"facebook":61848,"facebook-with-circle":61849,"feather":61850,"fingerprint":61851,"flag":61852,"flash":61853,"flashlight":61854,"flat-brush":61855,"flattr":61856,"flickr":61857,"flickr-with-circle":61858,"flow-branch":61859,"flow-cascade":61860,"flow-line":61861,"flow-parallel":61862,"flow-tree":61863,"flower":61864,"folder":61865,"folder-images":61866,"folder-music":61867,"folder-video":61868,"forward":61869,"foursquare":61870,"funnel":61871,"game-controller":61872,"gauge":61873,"github":61874,"github-with-circle":61875,"globe":61876,"google-":61877,"google--with-circle":61878,"google-drive":61879,"google-hangouts":61880,"google-play":61881,"graduation-cap":61882,"grid":61883,"grooveshark":61884,"hair-cross":61885,"hand":61886,"heart":61887,"heart-outlined":61888,"help":61889,"help-with-circle":61890,"home":61891,"hour-glass":61892,"houzz":61893,"icloud":61894,"image":61895,"image-inverted":61896,"images":61897,"inbox":61898,"infinity":61899,"info":61900,"info-with-circle":61901,"instagram":61902,"instagram-with-circle":61903,"install":61904,"key":61905,"keyboard":61906,"lab-flask":61907,"landline":61908,"language":61909,"laptop":61910,"lastfm":61911,"lastfm-with-circle":61912,"layers":61913,"leaf":61914,"level-down":61915,"level-up":61916,"lifebuoy":61917,"light-bulb":61918,"light-down":61919,"light-up":61920,"line-graph":61921,"link":61922,"linkedin":61923,"linkedin-with-circle":61924,"list":61925,"location":61926,"location-pin":61927,"lock":61928,"lock-open":61929,"log-out":61930,"login":61931,"loop":61932,"magnet":61933,"magnifying-glass":61934,"mail":61935,"mail-with-circle":61936,"man":61937,"map":61938,"mask":61939,"medal":61940,"medium":61941,"medium-with-circle":61942,"megaphone":61943,"menu":61944,"merge":61945,"message":61946,"mic":61947,"minus":61948,"mixi":61949,"mobile":61950,"modern-mic":61951,"moon":61952,"mouse":61953,"mouse-pointer":61954,"music":61955,"network":61956,"new":61957,"new-message":61958,"news":61959,"newsletter":61960,"note":61961,"notification":61962,"notifications-off":61963,"old-mobile":61964,"old-phone":61965,"onedrive":61966,"open-book":61967,"palette":61968,"paper-plane":61969,"paypal":61970,"pencil":61971,"phone":61972,"picasa":61973,"pie-chart":61974,"pin":61975,"pinterest":61976,"pinterest-with-circle":61977,"plus":61978,"popup":61979,"power-plug":61980,"price-ribbon":61981,"price-tag":61982,"print":61983,"progress-empty":61984,"progress-full":61985,"progress-one":61986,"progress-two":61987,"publish":61988,"qq":61989,"qq-with-circle":61990,"quote":61991,"radio":61992,"raft":61993,"raft-with-circle":61994,"rainbow":61995,"rdio":61996,"rdio-with-circle":61997,"remove-user":61998,"renren":61999,"reply":62000,"reply-all":62001,"resize-100":62002,"resize-full-screen":62003,"retweet":62004,"rocket":62005,"round-brush":62006,"rss":62007,"ruler":62008,"save":62009,"scissors":62010,"scribd":62011,"select-arrows":62012,"share":62013,"share-alternative":62014,"shareable":62015,"shield":62016,"shop":62017,"shopping-bag":62018,"shopping-basket":62019,"shopping-cart":62020,"shuffle":62021,"signal":62022,"sina-weibo":62023,"skype":62024,"skype-with-circle":62025,"slideshare":62026,"smashing":62027,"sound":62028,"sound-mix":62029,"sound-mute":62030,"soundcloud":62031,"sports-club":62032,"spotify":62033,"spotify-with-circle":62034,"spreadsheet":62035,"squared-cross":62036,"squared-minus":62037,"squared-plus":62038,"star":62039,"star-outlined":62040,"stopwatch":62041,"stumbleupon":62042,"stumbleupon-with-circle":62043,"suitcase":62044,"swap":62045,"swarm":62046,"sweden":62047,"switch":62048,"tablet":62049,"tablet-mobile-combo":62050,"tag":62051,"text":62052,"text-document":62053,"text-document-inverted":62054,"thermometer":62055,"thumbs-down":62056,"thumbs-up":62057,"thunder-cloud":62058,"ticket":62059,"time-slot":62060,"tools":62061,"traffic-cone":62062,"trash":62063,"tree":62064,"triangle-down":62065,"triangle-left":62066,"triangle-right":62067,"triangle-up":62068,"tripadvisor":62069,"trophy":62070,"tumblr":62071,"tumblr-with-circle":62072,"tv":62073,"twitter":62074,"twitter-with-circle":62075,"typing":62076,"uninstall":62077,"unread":62078,"untag":62079,"upload":62080,"upload-to-cloud":62081,"user":62082,"users":62083,"v-card":62084,"video":62085,"video-camera":62086,"vimeo":62087,"vimeo-with-circle":62088,"vine":62089,"vine-with-circle":62090,"vinyl":62091,"vk":62092,"vk-alternitive":62093,"vk-with-circle":62094,"voicemail":62095,"wallet":62096,"warning":62097,"water":62098,"windows-store":62099,"xing":62100,"xing-with-circle":62101,"yelp":62102,"youko":62103,"youko-with-circle":62104,"youtube":62105,"youtube-with-circle":62106}'),o=(0,r.default)(i,"entypo",a)},23862:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/EvilIcons.699664b33ac2837d5bee.ttf",i=JSON.parse('{"archive":61696,"arrow-down":61697,"arrow-left":61698,"arrow-right":61699,"arrow-up":61700,"bell":61701,"calendar":61702,"camera":61703,"cart":61704,"chart":61705,"check":61706,"chevron-down":61707,"chevron-left":61708,"chevron-right":61709,"chevron-up":61710,"clock":61711,"close":61712,"close-o":61713,"comment":61714,"credit-card":61715,"envelope":61716,"exclamation":61717,"external-link":61718,"eye":61719,"gear":61720,"heart":61721,"image":61722,"like":61723,"link":61724,"location":61725,"lock":61726,"minus":61727,"navicon":61728,"paperclip":61729,"pencil":61730,"play":61731,"plus":61732,"pointer":61733,"question":61734,"redo":61735,"refresh":61736,"retweet":61737,"sc-facebook":61738,"sc-github":61739,"sc-google-plus":61740,"sc-instagram":61741,"sc-linkedin":61742,"sc-odnoklassniki":61743,"sc-pinterest":61744,"sc-skype":61745,"sc-soundcloud":61746,"sc-telegram":61747,"sc-tumblr":61748,"sc-twitter":61749,"sc-vimeo":61750,"sc-vk":61751,"sc-youtube":61752,"search":61753,"share-apple":61754,"share-google":61755,"spinner":61756,"spinner-2":61757,"spinner-3":61758,"star":61759,"tag":61760,"trash":61761,"trophy":61762,"undo":61763,"unlock":61764,"user":61765}'),o=(0,r.default)(i,"evilicons",a)},44459:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/Feather.0f5d9cede2e831f3fc80.ttf",i=JSON.parse('{"activity":61696,"airplay":61697,"alert-circle":61698,"alert-octagon":61699,"alert-triangle":61700,"align-center":61701,"align-justify":61702,"align-left":61703,"align-right":61704,"anchor":61705,"aperture":61706,"archive":61707,"arrow-down":61708,"arrow-down-circle":61709,"arrow-down-left":61710,"arrow-down-right":61711,"arrow-left":61712,"arrow-left-circle":61713,"arrow-right":61714,"arrow-right-circle":61715,"arrow-up":61716,"arrow-up-circle":61717,"arrow-up-left":61718,"arrow-up-right":61719,"at-sign":61720,"award":61721,"bar-chart":61722,"bar-chart-2":61723,"battery":61724,"battery-charging":61725,"bell":61726,"bell-off":61727,"bluetooth":61728,"bold":61729,"book":61730,"book-open":61731,"bookmark":61732,"box":61733,"briefcase":61734,"calendar":61735,"camera":61736,"camera-off":61737,"cast":61738,"check":61739,"check-circle":61740,"check-square":61741,"chevron-down":61742,"chevron-left":61743,"chevron-right":61744,"chevron-up":61745,"chevrons-down":61746,"chevrons-left":61747,"chevrons-right":61748,"chevrons-up":61749,"chrome":61750,"circle":61751,"clipboard":61752,"clock":61753,"cloud":61754,"cloud-drizzle":61755,"cloud-lightning":61756,"cloud-off":61757,"cloud-rain":61758,"cloud-snow":61759,"code":61760,"codepen":61761,"codesandbox":61762,"coffee":61763,"columns":61764,"command":61765,"compass":61766,"copy":61767,"corner-down-left":61768,"corner-down-right":61769,"corner-left-down":61770,"corner-left-up":61771,"corner-right-down":61772,"corner-right-up":61773,"corner-up-left":61774,"corner-up-right":61775,"cpu":61776,"credit-card":61777,"crop":61778,"crosshair":61779,"database":61780,"delete":61781,"disc":61782,"divide":61783,"divide-circle":61784,"divide-square":61785,"dollar-sign":61786,"download":61787,"download-cloud":61788,"dribbble":61789,"droplet":61790,"edit":61791,"edit-2":61792,"edit-3":61793,"external-link":61794,"eye":61795,"eye-off":61796,"facebook":61797,"fast-forward":61798,"feather":61799,"figma":61800,"file":61801,"file-minus":61802,"file-plus":61803,"file-text":61804,"film":61805,"filter":61806,"flag":61807,"folder":61808,"folder-minus":61809,"folder-plus":61810,"framer":61811,"frown":61812,"gift":61813,"git-branch":61814,"git-commit":61815,"git-merge":61816,"git-pull-request":61817,"github":61818,"gitlab":61819,"globe":61820,"grid":61821,"hard-drive":61822,"hash":61823,"headphones":61824,"heart":61825,"help-circle":61826,"hexagon":61827,"home":61828,"image":61829,"inbox":61830,"info":61831,"instagram":61832,"italic":61833,"key":61834,"layers":61835,"layout":61836,"life-buoy":61837,"link":61838,"link-2":61839,"linkedin":61840,"list":61841,"loader":61842,"lock":61843,"log-in":61844,"log-out":61845,"mail":61846,"map":61847,"map-pin":61848,"maximize":61849,"maximize-2":61850,"meh":61851,"menu":61852,"message-circle":61853,"message-square":61854,"mic":61855,"mic-off":61856,"minimize":61857,"minimize-2":61858,"minus":61859,"minus-circle":61860,"minus-square":61861,"monitor":61862,"moon":61863,"more-horizontal":61864,"more-vertical":61865,"mouse-pointer":61866,"move":61867,"music":61868,"navigation":61869,"navigation-2":61870,"octagon":61871,"package":61872,"paperclip":61873,"pause":61874,"pause-circle":61875,"pen-tool":61876,"percent":61877,"phone":61878,"phone-call":61879,"phone-forwarded":61880,"phone-incoming":61881,"phone-missed":61882,"phone-off":61883,"phone-outgoing":61884,"pie-chart":61885,"play":61886,"play-circle":61887,"plus":61888,"plus-circle":61889,"plus-square":61890,"pocket":61891,"power":61892,"printer":61893,"radio":61894,"refresh-ccw":61895,"refresh-cw":61896,"repeat":61897,"rewind":61898,"rotate-ccw":61899,"rotate-cw":61900,"rss":61901,"save":61902,"scissors":61903,"search":61904,"send":61905,"server":61906,"settings":61907,"share":61908,"share-2":61909,"shield":61910,"shield-off":61911,"shopping-bag":61912,"shopping-cart":61913,"shuffle":61914,"sidebar":61915,"skip-back":61916,"skip-forward":61917,"slack":61918,"slash":61919,"sliders":61920,"smartphone":61921,"smile":61922,"speaker":61923,"square":61924,"star":61925,"stop-circle":61926,"sun":61927,"sunrise":61928,"sunset":61929,"tablet":61930,"tag":61931,"target":61932,"terminal":61933,"thermometer":61934,"thumbs-down":61935,"thumbs-up":61936,"toggle-left":61937,"toggle-right":61938,"tool":61939,"trash":61940,"trash-2":61941,"trello":61942,"trending-down":61943,"trending-up":61944,"triangle":61945,"truck":61946,"tv":61947,"twitch":61948,"twitter":61949,"type":61950,"umbrella":61951,"underline":61952,"unlock":61953,"upload":61954,"upload-cloud":61955,"user":61956,"user-check":61957,"user-minus":61958,"user-plus":61959,"user-x":61960,"users":61961,"video":61962,"video-off":61963,"voicemail":61964,"volume":61965,"volume-1":61966,"volume-2":61967,"volume-x":61968,"watch":61969,"wifi":61970,"wifi-off":61971,"wind":61972,"x":61973,"x-circle":61974,"x-octagon":61975,"x-square":61976,"youtube":61977,"zap":61978,"zap-off":61979,"zoom-in":61980,"zoom-out":61981}'),o=(0,r.default)(i,"feather",a)},17438:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/FontAwesome.1e59d2330b4c6deb84b3.ttf",i=JSON.parse('{"glass":61440,"music":61441,"search":61442,"envelope-o":61443,"heart":61444,"star":61445,"star-o":61446,"user":61447,"film":61448,"th-large":61449,"th":61450,"th-list":61451,"check":61452,"remove":61453,"close":61453,"times":61453,"search-plus":61454,"search-minus":61456,"power-off":61457,"signal":61458,"gear":61459,"cog":61459,"trash-o":61460,"home":61461,"file-o":61462,"clock-o":61463,"road":61464,"download":61465,"arrow-circle-o-down":61466,"arrow-circle-o-up":61467,"inbox":61468,"play-circle-o":61469,"rotate-right":61470,"repeat":61470,"refresh":61473,"list-alt":61474,"lock":61475,"flag":61476,"headphones":61477,"volume-off":61478,"volume-down":61479,"volume-up":61480,"qrcode":61481,"barcode":61482,"tag":61483,"tags":61484,"book":61485,"bookmark":61486,"print":61487,"camera":61488,"font":61489,"bold":61490,"italic":61491,"text-height":61492,"text-width":61493,"align-left":61494,"align-center":61495,"align-right":61496,"align-justify":61497,"list":61498,"dedent":61499,"outdent":61499,"indent":61500,"video-camera":61501,"photo":61502,"image":61502,"picture-o":61502,"pencil":61504,"map-marker":61505,"adjust":61506,"tint":61507,"edit":61508,"pencil-square-o":61508,"share-square-o":61509,"check-square-o":61510,"arrows":61511,"step-backward":61512,"fast-backward":61513,"backward":61514,"play":61515,"pause":61516,"stop":61517,"forward":61518,"fast-forward":61520,"step-forward":61521,"eject":61522,"chevron-left":61523,"chevron-right":61524,"plus-circle":61525,"minus-circle":61526,"times-circle":61527,"check-circle":61528,"question-circle":61529,"info-circle":61530,"crosshairs":61531,"times-circle-o":61532,"check-circle-o":61533,"ban":61534,"arrow-left":61536,"arrow-right":61537,"arrow-up":61538,"arrow-down":61539,"mail-forward":61540,"share":61540,"expand":61541,"compress":61542,"plus":61543,"minus":61544,"asterisk":61545,"exclamation-circle":61546,"gift":61547,"leaf":61548,"fire":61549,"eye":61550,"eye-slash":61552,"warning":61553,"exclamation-triangle":61553,"plane":61554,"calendar":61555,"random":61556,"comment":61557,"magnet":61558,"chevron-up":61559,"chevron-down":61560,"retweet":61561,"shopping-cart":61562,"folder":61563,"folder-open":61564,"arrows-v":61565,"arrows-h":61566,"bar-chart-o":61568,"bar-chart":61568,"twitter-square":61569,"facebook-square":61570,"camera-retro":61571,"key":61572,"gears":61573,"cogs":61573,"comments":61574,"thumbs-o-up":61575,"thumbs-o-down":61576,"star-half":61577,"heart-o":61578,"sign-out":61579,"linkedin-square":61580,"thumb-tack":61581,"external-link":61582,"sign-in":61584,"trophy":61585,"github-square":61586,"upload":61587,"lemon-o":61588,"phone":61589,"square-o":61590,"bookmark-o":61591,"phone-square":61592,"twitter":61593,"facebook-f":61594,"facebook":61594,"github":61595,"unlock":61596,"credit-card":61597,"feed":61598,"rss":61598,"hdd-o":61600,"bullhorn":61601,"bell":61683,"certificate":61603,"hand-o-right":61604,"hand-o-left":61605,"hand-o-up":61606,"hand-o-down":61607,"arrow-circle-left":61608,"arrow-circle-right":61609,"arrow-circle-up":61610,"arrow-circle-down":61611,"globe":61612,"wrench":61613,"tasks":61614,"filter":61616,"briefcase":61617,"arrows-alt":61618,"group":61632,"users":61632,"chain":61633,"link":61633,"cloud":61634,"flask":61635,"cut":61636,"scissors":61636,"copy":61637,"files-o":61637,"paperclip":61638,"save":61639,"floppy-o":61639,"square":61640,"navicon":61641,"reorder":61641,"bars":61641,"list-ul":61642,"list-ol":61643,"strikethrough":61644,"underline":61645,"table":61646,"magic":61648,"truck":61649,"pinterest":61650,"pinterest-square":61651,"google-plus-square":61652,"google-plus":61653,"money":61654,"caret-down":61655,"caret-up":61656,"caret-left":61657,"caret-right":61658,"columns":61659,"unsorted":61660,"sort":61660,"sort-down":61661,"sort-desc":61661,"sort-up":61662,"sort-asc":61662,"envelope":61664,"linkedin":61665,"rotate-left":61666,"undo":61666,"legal":61667,"gavel":61667,"dashboard":61668,"tachometer":61668,"comment-o":61669,"comments-o":61670,"flash":61671,"bolt":61671,"sitemap":61672,"umbrella":61673,"paste":61674,"clipboard":61674,"lightbulb-o":61675,"exchange":61676,"cloud-download":61677,"cloud-upload":61678,"user-md":61680,"stethoscope":61681,"suitcase":61682,"bell-o":61602,"coffee":61684,"cutlery":61685,"file-text-o":61686,"building-o":61687,"hospital-o":61688,"ambulance":61689,"medkit":61690,"fighter-jet":61691,"beer":61692,"h-square":61693,"plus-square":61694,"angle-double-left":61696,"angle-double-right":61697,"angle-double-up":61698,"angle-double-down":61699,"angle-left":61700,"angle-right":61701,"angle-up":61702,"angle-down":61703,"desktop":61704,"laptop":61705,"tablet":61706,"mobile-phone":61707,"mobile":61707,"circle-o":61708,"quote-left":61709,"quote-right":61710,"spinner":61712,"circle":61713,"mail-reply":61714,"reply":61714,"github-alt":61715,"folder-o":61716,"folder-open-o":61717,"smile-o":61720,"frown-o":61721,"meh-o":61722,"gamepad":61723,"keyboard-o":61724,"flag-o":61725,"flag-checkered":61726,"terminal":61728,"code":61729,"mail-reply-all":61730,"reply-all":61730,"star-half-empty":61731,"star-half-full":61731,"star-half-o":61731,"location-arrow":61732,"crop":61733,"code-fork":61734,"unlink":61735,"chain-broken":61735,"question":61736,"info":61737,"exclamation":61738,"superscript":61739,"subscript":61740,"eraser":61741,"puzzle-piece":61742,"microphone":61744,"microphone-slash":61745,"shield":61746,"calendar-o":61747,"fire-extinguisher":61748,"rocket":61749,"maxcdn":61750,"chevron-circle-left":61751,"chevron-circle-right":61752,"chevron-circle-up":61753,"chevron-circle-down":61754,"html5":61755,"css3":61756,"anchor":61757,"unlock-alt":61758,"bullseye":61760,"ellipsis-h":61761,"ellipsis-v":61762,"rss-square":61763,"play-circle":61764,"ticket":61765,"minus-square":61766,"minus-square-o":61767,"level-up":61768,"level-down":61769,"check-square":61770,"pencil-square":61771,"external-link-square":61772,"share-square":61773,"compass":61774,"toggle-down":61776,"caret-square-o-down":61776,"toggle-up":61777,"caret-square-o-up":61777,"toggle-right":61778,"caret-square-o-right":61778,"euro":61779,"eur":61779,"gbp":61780,"dollar":61781,"usd":61781,"rupee":61782,"inr":61782,"cny":61783,"rmb":61783,"yen":61783,"jpy":61783,"ruble":61784,"rouble":61784,"rub":61784,"won":61785,"krw":61785,"bitcoin":61786,"btc":61786,"file":61787,"file-text":61788,"sort-alpha-asc":61789,"sort-alpha-desc":61790,"sort-amount-asc":61792,"sort-amount-desc":61793,"sort-numeric-asc":61794,"sort-numeric-desc":61795,"thumbs-up":61796,"thumbs-down":61797,"youtube-square":61798,"youtube":61799,"xing":61800,"xing-square":61801,"youtube-play":61802,"dropbox":61803,"stack-overflow":61804,"instagram":61805,"flickr":61806,"adn":61808,"bitbucket":61809,"bitbucket-square":61810,"tumblr":61811,"tumblr-square":61812,"long-arrow-down":61813,"long-arrow-up":61814,"long-arrow-left":61815,"long-arrow-right":61816,"apple":61817,"windows":61818,"android":61819,"linux":61820,"dribbble":61821,"skype":61822,"foursquare":61824,"trello":61825,"female":61826,"male":61827,"gittip":61828,"gratipay":61828,"sun-o":61829,"moon-o":61830,"archive":61831,"bug":61832,"vk":61833,"weibo":61834,"renren":61835,"pagelines":61836,"stack-exchange":61837,"arrow-circle-o-right":61838,"arrow-circle-o-left":61840,"toggle-left":61841,"caret-square-o-left":61841,"dot-circle-o":61842,"wheelchair":61843,"vimeo-square":61844,"turkish-lira":61845,"try":61845,"plus-square-o":61846,"space-shuttle":61847,"slack":61848,"envelope-square":61849,"wordpress":61850,"openid":61851,"institution":61852,"bank":61852,"university":61852,"mortar-board":61853,"graduation-cap":61853,"yahoo":61854,"google":61856,"reddit":61857,"reddit-square":61858,"stumbleupon-circle":61859,"stumbleupon":61860,"delicious":61861,"digg":61862,"pied-piper-pp":61863,"pied-piper-alt":61864,"drupal":61865,"joomla":61866,"language":61867,"fax":61868,"building":61869,"child":61870,"paw":61872,"spoon":61873,"cube":61874,"cubes":61875,"behance":61876,"behance-square":61877,"steam":61878,"steam-square":61879,"recycle":61880,"automobile":61881,"car":61881,"cab":61882,"taxi":61882,"tree":61883,"spotify":61884,"deviantart":61885,"soundcloud":61886,"database":61888,"file-pdf-o":61889,"file-word-o":61890,"file-excel-o":61891,"file-powerpoint-o":61892,"file-photo-o":61893,"file-picture-o":61893,"file-image-o":61893,"file-zip-o":61894,"file-archive-o":61894,"file-sound-o":61895,"file-audio-o":61895,"file-movie-o":61896,"file-video-o":61896,"file-code-o":61897,"vine":61898,"codepen":61899,"jsfiddle":61900,"life-bouy":61901,"life-buoy":61901,"life-saver":61901,"support":61901,"life-ring":61901,"circle-o-notch":61902,"ra":61904,"resistance":61904,"rebel":61904,"ge":61905,"empire":61905,"git-square":61906,"git":61907,"y-combinator-square":61908,"yc-square":61908,"hacker-news":61908,"tencent-weibo":61909,"qq":61910,"wechat":61911,"weixin":61911,"send":61912,"paper-plane":61912,"send-o":61913,"paper-plane-o":61913,"history":61914,"circle-thin":61915,"header":61916,"paragraph":61917,"sliders":61918,"share-alt":61920,"share-alt-square":61921,"bomb":61922,"soccer-ball-o":61923,"futbol-o":61923,"tty":61924,"binoculars":61925,"plug":61926,"slideshare":61927,"twitch":61928,"yelp":61929,"newspaper-o":61930,"wifi":61931,"calculator":61932,"paypal":61933,"google-wallet":61934,"cc-visa":61936,"cc-mastercard":61937,"cc-discover":61938,"cc-amex":61939,"cc-paypal":61940,"cc-stripe":61941,"bell-slash":61942,"bell-slash-o":61943,"trash":61944,"copyright":61945,"at":61946,"eyedropper":61947,"paint-brush":61948,"birthday-cake":61949,"area-chart":61950,"pie-chart":61952,"line-chart":61953,"lastfm":61954,"lastfm-square":61955,"toggle-off":61956,"toggle-on":61957,"bicycle":61958,"bus":61959,"ioxhost":61960,"angellist":61961,"cc":61962,"shekel":61963,"sheqel":61963,"ils":61963,"meanpath":61964,"buysellads":61965,"connectdevelop":61966,"dashcube":61968,"forumbee":61969,"leanpub":61970,"sellsy":61971,"shirtsinbulk":61972,"simplybuilt":61973,"skyatlas":61974,"cart-plus":61975,"cart-arrow-down":61976,"diamond":61977,"ship":61978,"user-secret":61979,"motorcycle":61980,"street-view":61981,"heartbeat":61982,"venus":61985,"mars":61986,"mercury":61987,"intersex":61988,"transgender":61988,"transgender-alt":61989,"venus-double":61990,"mars-double":61991,"venus-mars":61992,"mars-stroke":61993,"mars-stroke-v":61994,"mars-stroke-h":61995,"neuter":61996,"genderless":61997,"facebook-official":62000,"pinterest-p":62001,"whatsapp":62002,"server":62003,"user-plus":62004,"user-times":62005,"hotel":62006,"bed":62006,"viacoin":62007,"train":62008,"subway":62009,"medium":62010,"yc":62011,"y-combinator":62011,"optin-monster":62012,"opencart":62013,"expeditedssl":62014,"battery-4":62016,"battery":62016,"battery-full":62016,"battery-3":62017,"battery-three-quarters":62017,"battery-2":62018,"battery-half":62018,"battery-1":62019,"battery-quarter":62019,"battery-0":62020,"battery-empty":62020,"mouse-pointer":62021,"i-cursor":62022,"object-group":62023,"object-ungroup":62024,"sticky-note":62025,"sticky-note-o":62026,"cc-jcb":62027,"cc-diners-club":62028,"clone":62029,"balance-scale":62030,"hourglass-o":62032,"hourglass-1":62033,"hourglass-start":62033,"hourglass-2":62034,"hourglass-half":62034,"hourglass-3":62035,"hourglass-end":62035,"hourglass":62036,"hand-grab-o":62037,"hand-rock-o":62037,"hand-stop-o":62038,"hand-paper-o":62038,"hand-scissors-o":62039,"hand-lizard-o":62040,"hand-spock-o":62041,"hand-pointer-o":62042,"hand-peace-o":62043,"trademark":62044,"registered":62045,"creative-commons":62046,"gg":62048,"gg-circle":62049,"tripadvisor":62050,"odnoklassniki":62051,"odnoklassniki-square":62052,"get-pocket":62053,"wikipedia-w":62054,"safari":62055,"chrome":62056,"firefox":62057,"opera":62058,"internet-explorer":62059,"tv":62060,"television":62060,"contao":62061,"500px":62062,"amazon":62064,"calendar-plus-o":62065,"calendar-minus-o":62066,"calendar-times-o":62067,"calendar-check-o":62068,"industry":62069,"map-pin":62070,"map-signs":62071,"map-o":62072,"map":62073,"commenting":62074,"commenting-o":62075,"houzz":62076,"vimeo":62077,"black-tie":62078,"fonticons":62080,"reddit-alien":62081,"edge":62082,"credit-card-alt":62083,"codiepie":62084,"modx":62085,"fort-awesome":62086,"usb":62087,"product-hunt":62088,"mixcloud":62089,"scribd":62090,"pause-circle":62091,"pause-circle-o":62092,"stop-circle":62093,"stop-circle-o":62094,"shopping-bag":62096,"shopping-basket":62097,"hashtag":62098,"bluetooth":62099,"bluetooth-b":62100,"percent":62101,"gitlab":62102,"wpbeginner":62103,"wpforms":62104,"envira":62105,"universal-access":62106,"wheelchair-alt":62107,"question-circle-o":62108,"blind":62109,"audio-description":62110,"volume-control-phone":62112,"braille":62113,"assistive-listening-systems":62114,"asl-interpreting":62115,"american-sign-language-interpreting":62115,"deafness":62116,"hard-of-hearing":62116,"deaf":62116,"glide":62117,"glide-g":62118,"signing":62119,"sign-language":62119,"low-vision":62120,"viadeo":62121,"viadeo-square":62122,"snapchat":62123,"snapchat-ghost":62124,"snapchat-square":62125,"pied-piper":62126,"first-order":62128,"yoast":62129,"themeisle":62130,"google-plus-circle":62131,"google-plus-official":62131,"fa":62132,"font-awesome":62132,"handshake-o":62133,"envelope-open":62134,"envelope-open-o":62135,"linode":62136,"address-book":62137,"address-book-o":62138,"vcard":62139,"address-card":62139,"vcard-o":62140,"address-card-o":62140,"user-circle":62141,"user-circle-o":62142,"user-o":62144,"id-badge":62145,"drivers-license":62146,"id-card":62146,"drivers-license-o":62147,"id-card-o":62147,"quora":62148,"free-code-camp":62149,"telegram":62150,"thermometer-4":62151,"thermometer":62151,"thermometer-full":62151,"thermometer-3":62152,"thermometer-three-quarters":62152,"thermometer-2":62153,"thermometer-half":62153,"thermometer-1":62154,"thermometer-quarter":62154,"thermometer-0":62155,"thermometer-empty":62155,"shower":62156,"bathtub":62157,"s15":62157,"bath":62157,"podcast":62158,"window-maximize":62160,"window-minimize":62161,"window-restore":62162,"times-rectangle":62163,"window-close":62163,"times-rectangle-o":62164,"window-close-o":62164,"bandcamp":62165,"grav":62166,"etsy":62167,"imdb":62168,"ravelry":62169,"eercast":62170,"microchip":62171,"snowflake-o":62172,"superpowers":62173,"wpexplorer":62174,"meetup":62176}'),o=(0,r.default)(i,"FontAwesome",a)},92288:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FA5Style:()=>s,default:()=>l});var r=n(59815);const a=JSON.parse('{"500px":62062,"accessible-icon":62312,"accusoft":62313,"acquisitions-incorporated":63151,"ad":63041,"address-book":62137,"address-card":62139,"adjust":61506,"adn":61808,"adversal":62314,"affiliatetheme":62315,"air-freshener":62928,"airbnb":63540,"algolia":62316,"align-center":61495,"align-justify":61497,"align-left":61494,"align-right":61496,"alipay":63042,"allergies":62561,"amazon":62064,"amazon-pay":62508,"ambulance":61689,"american-sign-language-interpreting":62115,"amilia":62317,"anchor":61757,"android":61819,"angellist":61961,"angle-double-down":61699,"angle-double-left":61696,"angle-double-right":61697,"angle-double-up":61698,"angle-down":61703,"angle-left":61700,"angle-right":61701,"angle-up":61702,"angry":62806,"angrycreative":62318,"angular":62496,"ankh":63044,"app-store":62319,"app-store-ios":62320,"apper":62321,"apple":61817,"apple-alt":62929,"apple-pay":62485,"archive":61831,"archway":62807,"arrow-alt-circle-down":62296,"arrow-alt-circle-left":62297,"arrow-alt-circle-right":62298,"arrow-alt-circle-up":62299,"arrow-circle-down":61611,"arrow-circle-left":61608,"arrow-circle-right":61609,"arrow-circle-up":61610,"arrow-down":61539,"arrow-left":61536,"arrow-right":61537,"arrow-up":61538,"arrows-alt":61618,"arrows-alt-h":62263,"arrows-alt-v":62264,"artstation":63354,"assistive-listening-systems":62114,"asterisk":61545,"asymmetrik":62322,"at":61946,"atlas":62808,"atlassian":63355,"atom":62930,"audible":62323,"audio-description":62110,"autoprefixer":62492,"avianex":62324,"aviato":62497,"award":62809,"aws":62325,"baby":63356,"baby-carriage":63357,"backspace":62810,"backward":61514,"bacon":63461,"bacteria":57433,"bacterium":57434,"bahai":63078,"balance-scale":62030,"balance-scale-left":62741,"balance-scale-right":62742,"ban":61534,"band-aid":62562,"bandcamp":62165,"barcode":61482,"bars":61641,"baseball-ball":62515,"basketball-ball":62516,"bath":62157,"battery-empty":62020,"battery-full":62016,"battery-half":62018,"battery-quarter":62019,"battery-three-quarters":62017,"battle-net":63541,"bed":62006,"beer":61692,"behance":61876,"behance-square":61877,"bell":61683,"bell-slash":61942,"bezier-curve":62811,"bible":63047,"bicycle":61958,"biking":63562,"bimobject":62328,"binoculars":61925,"biohazard":63360,"birthday-cake":61949,"bitbucket":61809,"bitcoin":62329,"bity":62330,"black-tie":62078,"blackberry":62331,"blender":62743,"blender-phone":63158,"blind":62109,"blog":63361,"blogger":62332,"blogger-b":62333,"bluetooth":62099,"bluetooth-b":62100,"bold":61490,"bolt":61671,"bomb":61922,"bone":62935,"bong":62812,"book":61485,"book-dead":63159,"book-medical":63462,"book-open":62744,"book-reader":62938,"bookmark":61486,"bootstrap":63542,"border-all":63564,"border-none":63568,"border-style":63571,"bowling-ball":62518,"box":62566,"box-open":62622,"box-tissue":57435,"boxes":62568,"braille":62113,"brain":62940,"bread-slice":63468,"briefcase":61617,"briefcase-medical":62569,"broadcast-tower":62745,"broom":62746,"brush":62813,"btc":61786,"buffer":63543,"bug":61832,"building":61869,"bullhorn":61601,"bullseye":61760,"burn":62570,"buromobelexperte":62335,"bus":61959,"bus-alt":62814,"business-time":63050,"buy-n-large":63654,"buysellads":61965,"calculator":61932,"calendar":61747,"calendar-alt":61555,"calendar-check":62068,"calendar-day":63363,"calendar-minus":62066,"calendar-plus":62065,"calendar-times":62067,"calendar-week":63364,"camera":61488,"camera-retro":61571,"campground":63163,"canadian-maple-leaf":63365,"candy-cane":63366,"cannabis":62815,"capsules":62571,"car":61881,"car-alt":62942,"car-battery":62943,"car-crash":62945,"car-side":62948,"caravan":63743,"caret-down":61655,"caret-left":61657,"caret-right":61658,"caret-square-down":61776,"caret-square-left":61841,"caret-square-right":61778,"caret-square-up":61777,"caret-up":61656,"carrot":63367,"cart-arrow-down":61976,"cart-plus":61975,"cash-register":63368,"cat":63166,"cc-amazon-pay":62509,"cc-amex":61939,"cc-apple-pay":62486,"cc-diners-club":62028,"cc-discover":61938,"cc-jcb":62027,"cc-mastercard":61937,"cc-paypal":61940,"cc-stripe":61941,"cc-visa":61936,"centercode":62336,"centos":63369,"certificate":61603,"chair":63168,"chalkboard":62747,"chalkboard-teacher":62748,"charging-station":62951,"chart-area":61950,"chart-bar":61568,"chart-line":61953,"chart-pie":61952,"check":61452,"check-circle":61528,"check-double":62816,"check-square":61770,"cheese":63471,"chess":62521,"chess-bishop":62522,"chess-board":62524,"chess-king":62527,"chess-knight":62529,"chess-pawn":62531,"chess-queen":62533,"chess-rook":62535,"chevron-circle-down":61754,"chevron-circle-left":61751,"chevron-circle-right":61752,"chevron-circle-up":61753,"chevron-down":61560,"chevron-left":61523,"chevron-right":61524,"chevron-up":61559,"child":61870,"chrome":62056,"chromecast":63544,"church":62749,"circle":61713,"circle-notch":61902,"city":63055,"clinic-medical":63474,"clipboard":62248,"clipboard-check":62572,"clipboard-list":62573,"clock":61463,"clone":62029,"closed-captioning":61962,"cloud":61634,"cloud-download-alt":62337,"cloud-meatball":63291,"cloud-moon":63171,"cloud-moon-rain":63292,"cloud-rain":63293,"cloud-showers-heavy":63296,"cloud-sun":63172,"cloud-sun-rain":63299,"cloud-upload-alt":62338,"cloudflare":57469,"cloudscale":62339,"cloudsmith":62340,"cloudversify":62341,"cocktail":62817,"code":61729,"code-branch":61734,"codepen":61899,"codiepie":62084,"coffee":61684,"cog":61459,"cogs":61573,"coins":62750,"columns":61659,"comment":61557,"comment-alt":62074,"comment-dollar":63057,"comment-dots":62637,"comment-medical":63477,"comment-slash":62643,"comments":61574,"comments-dollar":63059,"compact-disc":62751,"compass":61774,"compress":61542,"compress-alt":62498,"compress-arrows-alt":63372,"concierge-bell":62818,"confluence":63373,"connectdevelop":61966,"contao":62061,"cookie":62819,"cookie-bite":62820,"copy":61637,"copyright":61945,"cotton-bureau":63646,"couch":62648,"cpanel":62344,"creative-commons":62046,"creative-commons-by":62695,"creative-commons-nc":62696,"creative-commons-nc-eu":62697,"creative-commons-nc-jp":62698,"creative-commons-nd":62699,"creative-commons-pd":62700,"creative-commons-pd-alt":62701,"creative-commons-remix":62702,"creative-commons-sa":62703,"creative-commons-sampling":62704,"creative-commons-sampling-plus":62705,"creative-commons-share":62706,"creative-commons-zero":62707,"credit-card":61597,"critical-role":63177,"crop":61733,"crop-alt":62821,"cross":63060,"crosshairs":61531,"crow":62752,"crown":62753,"crutch":63479,"css3":61756,"css3-alt":62347,"cube":61874,"cubes":61875,"cut":61636,"cuttlefish":62348,"d-and-d":62349,"d-and-d-beyond":63178,"dailymotion":57426,"dashcube":61968,"database":61888,"deaf":62116,"deezer":57463,"delicious":61861,"democrat":63303,"deploydog":62350,"deskpro":62351,"desktop":61704,"dev":63180,"deviantart":61885,"dharmachakra":63061,"dhl":63376,"diagnoses":62576,"diaspora":63377,"dice":62754,"dice-d20":63183,"dice-d6":63185,"dice-five":62755,"dice-four":62756,"dice-one":62757,"dice-six":62758,"dice-three":62759,"dice-two":62760,"digg":61862,"digital-ocean":62353,"digital-tachograph":62822,"directions":62955,"discord":62354,"discourse":62355,"disease":63482,"divide":62761,"dizzy":62823,"dna":62577,"dochub":62356,"docker":62357,"dog":63187,"dollar-sign":61781,"dolly":62578,"dolly-flatbed":62580,"donate":62649,"door-closed":62762,"door-open":62763,"dot-circle":61842,"dove":62650,"download":61465,"draft2digital":62358,"drafting-compass":62824,"dragon":63189,"draw-polygon":62958,"dribbble":61821,"dribbble-square":62359,"dropbox":61803,"drum":62825,"drum-steelpan":62826,"drumstick-bite":63191,"drupal":61865,"dumbbell":62539,"dumpster":63379,"dumpster-fire":63380,"dungeon":63193,"dyalog":62361,"earlybirds":62362,"ebay":62708,"edge":62082,"edge-legacy":57464,"edit":61508,"egg":63483,"eject":61522,"elementor":62512,"ellipsis-h":61761,"ellipsis-v":61762,"ello":62961,"ember":62499,"empire":61905,"envelope":61664,"envelope-open":62134,"envelope-open-text":63064,"envelope-square":61849,"envira":62105,"equals":62764,"eraser":61741,"erlang":62365,"ethereum":62510,"ethernet":63382,"etsy":62167,"euro-sign":61779,"evernote":63545,"exchange-alt":62306,"exclamation":61738,"exclamation-circle":61546,"exclamation-triangle":61553,"expand":61541,"expand-alt":62500,"expand-arrows-alt":62238,"expeditedssl":62014,"external-link-alt":62301,"external-link-square-alt":62304,"eye":61550,"eye-dropper":61947,"eye-slash":61552,"facebook":61594,"facebook-f":62366,"facebook-messenger":62367,"facebook-square":61570,"fan":63587,"fantasy-flight-games":63196,"fast-backward":61513,"fast-forward":61520,"faucet":57349,"fax":61868,"feather":62765,"feather-alt":62827,"fedex":63383,"fedora":63384,"female":61826,"fighter-jet":61691,"figma":63385,"file":61787,"file-alt":61788,"file-archive":61894,"file-audio":61895,"file-code":61897,"file-contract":62828,"file-csv":63197,"file-download":62829,"file-excel":61891,"file-export":62830,"file-image":61893,"file-import":62831,"file-invoice":62832,"file-invoice-dollar":62833,"file-medical":62583,"file-medical-alt":62584,"file-pdf":61889,"file-powerpoint":61892,"file-prescription":62834,"file-signature":62835,"file-upload":62836,"file-video":61896,"file-word":61890,"fill":62837,"fill-drip":62838,"film":61448,"filter":61616,"fingerprint":62839,"fire":61549,"fire-alt":63460,"fire-extinguisher":61748,"firefox":62057,"firefox-browser":57351,"first-aid":62585,"first-order":62128,"first-order-alt":62730,"firstdraft":62369,"fish":62840,"fist-raised":63198,"flag":61476,"flag-checkered":61726,"flag-usa":63309,"flask":61635,"flickr":61806,"flipboard":62541,"flushed":62841,"fly":62487,"folder":61563,"folder-minus":63069,"folder-open":61564,"folder-plus":63070,"font":61489,"font-awesome":62132,"font-awesome-alt":62300,"font-awesome-flag":62501,"font-awesome-logo-full":62694,"fonticons":62080,"fonticons-fi":62370,"football-ball":62542,"fort-awesome":62086,"fort-awesome-alt":62371,"forumbee":61969,"forward":61518,"foursquare":61824,"free-code-camp":62149,"freebsd":62372,"frog":62766,"frown":61721,"frown-open":62842,"fulcrum":62731,"funnel-dollar":63074,"futbol":61923,"galactic-republic":62732,"galactic-senate":62733,"gamepad":61723,"gas-pump":62767,"gavel":61667,"gem":62373,"genderless":61997,"get-pocket":62053,"gg":62048,"gg-circle":62049,"ghost":63202,"gift":61547,"gifts":63388,"git":61907,"git-alt":63553,"git-square":61906,"github":61595,"github-alt":61715,"github-square":61586,"gitkraken":62374,"gitlab":62102,"gitter":62502,"glass-cheers":63391,"glass-martini":61440,"glass-martini-alt":62843,"glass-whiskey":63392,"glasses":62768,"glide":62117,"glide-g":62118,"globe":61612,"globe-africa":62844,"globe-americas":62845,"globe-asia":62846,"globe-europe":63394,"gofore":62375,"golf-ball":62544,"goodreads":62376,"goodreads-g":62377,"google":61856,"google-drive":62378,"google-pay":57465,"google-play":62379,"google-plus":62131,"google-plus-g":61653,"google-plus-square":61652,"google-wallet":61934,"gopuram":63076,"graduation-cap":61853,"gratipay":61828,"grav":62166,"greater-than":62769,"greater-than-equal":62770,"grimace":62847,"grin":62848,"grin-alt":62849,"grin-beam":62850,"grin-beam-sweat":62851,"grin-hearts":62852,"grin-squint":62853,"grin-squint-tears":62854,"grin-stars":62855,"grin-tears":62856,"grin-tongue":62857,"grin-tongue-squint":62858,"grin-tongue-wink":62859,"grin-wink":62860,"grip-horizontal":62861,"grip-lines":63396,"grip-lines-vertical":63397,"grip-vertical":62862,"gripfire":62380,"grunt":62381,"guilded":57470,"guitar":63398,"gulp":62382,"h-square":61693,"hacker-news":61908,"hacker-news-square":62383,"hackerrank":62967,"hamburger":63493,"hammer":63203,"hamsa":63077,"hand-holding":62653,"hand-holding-heart":62654,"hand-holding-medical":57436,"hand-holding-usd":62656,"hand-holding-water":62657,"hand-lizard":62040,"hand-middle-finger":63494,"hand-paper":62038,"hand-peace":62043,"hand-point-down":61607,"hand-point-left":61605,"hand-point-right":61604,"hand-point-up":61606,"hand-pointer":62042,"hand-rock":62037,"hand-scissors":62039,"hand-sparkles":57437,"hand-spock":62041,"hands":62658,"hands-helping":62660,"hands-wash":57438,"handshake":62133,"handshake-alt-slash":57439,"handshake-slash":57440,"hanukiah":63206,"hard-hat":63495,"hashtag":62098,"hat-cowboy":63680,"hat-cowboy-side":63681,"hat-wizard":63208,"hdd":61600,"head-side-cough":57441,"head-side-cough-slash":57442,"head-side-mask":57443,"head-side-virus":57444,"heading":61916,"headphones":61477,"headphones-alt":62863,"headset":62864,"heart":61444,"heart-broken":63401,"heartbeat":61982,"helicopter":62771,"highlighter":62865,"hiking":63212,"hippo":63213,"hips":62546,"hire-a-helper":62384,"history":61914,"hive":57471,"hockey-puck":62547,"holly-berry":63402,"home":61461,"hooli":62503,"hornbill":62866,"horse":63216,"horse-head":63403,"hospital":61688,"hospital-alt":62589,"hospital-symbol":62590,"hospital-user":63501,"hot-tub":62867,"hotdog":63503,"hotel":62868,"hotjar":62385,"hourglass":62036,"hourglass-end":62035,"hourglass-half":62034,"hourglass-start":62033,"house-damage":63217,"house-user":57445,"houzz":62076,"hryvnia":63218,"html5":61755,"hubspot":62386,"i-cursor":62022,"ice-cream":63504,"icicles":63405,"icons":63597,"id-badge":62145,"id-card":62146,"id-card-alt":62591,"ideal":57363,"igloo":63406,"image":61502,"images":62210,"imdb":62168,"inbox":61468,"indent":61500,"industry":62069,"infinity":62772,"info":61737,"info-circle":61530,"innosoft":57472,"instagram":61805,"instagram-square":57429,"instalod":57473,"intercom":63407,"internet-explorer":62059,"invision":63408,"ioxhost":61960,"italic":61491,"itch-io":63546,"itunes":62388,"itunes-note":62389,"java":62692,"jedi":63081,"jedi-order":62734,"jenkins":62390,"jira":63409,"joget":62391,"joint":62869,"joomla":61866,"journal-whills":63082,"js":62392,"js-square":62393,"jsfiddle":61900,"kaaba":63083,"kaggle":62970,"key":61572,"keybase":62709,"keyboard":61724,"keycdn":62394,"khanda":63085,"kickstarter":62395,"kickstarter-k":62396,"kiss":62870,"kiss-beam":62871,"kiss-wink-heart":62872,"kiwi-bird":62773,"korvue":62511,"landmark":63087,"language":61867,"laptop":61705,"laptop-code":62972,"laptop-house":57446,"laptop-medical":63506,"laravel":62397,"lastfm":61954,"lastfm-square":61955,"laugh":62873,"laugh-beam":62874,"laugh-squint":62875,"laugh-wink":62876,"layer-group":62973,"leaf":61548,"leanpub":61970,"lemon":61588,"less":62493,"less-than":62774,"less-than-equal":62775,"level-down-alt":62398,"level-up-alt":62399,"life-ring":61901,"lightbulb":61675,"line":62400,"link":61633,"linkedin":61580,"linkedin-in":61665,"linode":62136,"linux":61820,"lira-sign":61845,"list":61498,"list-alt":61474,"list-ol":61643,"list-ul":61642,"location-arrow":61732,"lock":61475,"lock-open":62401,"long-arrow-alt-down":62217,"long-arrow-alt-left":62218,"long-arrow-alt-right":62219,"long-arrow-alt-up":62220,"low-vision":62120,"luggage-cart":62877,"lungs":62980,"lungs-virus":57447,"lyft":62403,"magento":62404,"magic":61648,"magnet":61558,"mail-bulk":63092,"mailchimp":62878,"male":61827,"mandalorian":62735,"map":62073,"map-marked":62879,"map-marked-alt":62880,"map-marker":61505,"map-marker-alt":62405,"map-pin":62070,"map-signs":62071,"markdown":62991,"marker":62881,"mars":61986,"mars-double":61991,"mars-stroke":61993,"mars-stroke-h":61995,"mars-stroke-v":61994,"mask":63226,"mastodon":62710,"maxcdn":61750,"mdb":63690,"medal":62882,"medapps":62406,"medium":62010,"medium-m":62407,"medkit":61690,"medrt":62408,"meetup":62176,"megaport":62883,"meh":61722,"meh-blank":62884,"meh-rolling-eyes":62885,"memory":62776,"mendeley":63411,"menorah":63094,"mercury":61987,"meteor":63315,"microblog":57370,"microchip":62171,"microphone":61744,"microphone-alt":62409,"microphone-alt-slash":62777,"microphone-slash":61745,"microscope":62992,"microsoft":62410,"minus":61544,"minus-circle":61526,"minus-square":61766,"mitten":63413,"mix":62411,"mixcloud":62089,"mixer":57430,"mizuni":62412,"mobile":61707,"mobile-alt":62413,"modx":62085,"monero":62416,"money-bill":61654,"money-bill-alt":62417,"money-bill-wave":62778,"money-bill-wave-alt":62779,"money-check":62780,"money-check-alt":62781,"monument":62886,"moon":61830,"mortar-pestle":62887,"mosque":63096,"motorcycle":61980,"mountain":63228,"mouse":63692,"mouse-pointer":62021,"mug-hot":63414,"music":61441,"napster":62418,"neos":62994,"network-wired":63231,"neuter":61996,"newspaper":61930,"nimblr":62888,"node":62489,"node-js":62419,"not-equal":62782,"notes-medical":62593,"npm":62420,"ns8":62421,"nutritionix":62422,"object-group":62023,"object-ungroup":62024,"octopus-deploy":57474,"odnoklassniki":62051,"odnoklassniki-square":62052,"oil-can":62995,"old-republic":62736,"om":63097,"opencart":62013,"openid":61851,"opera":62058,"optin-monster":62012,"orcid":63698,"osi":62490,"otter":63232,"outdent":61499,"page4":62423,"pagelines":61836,"pager":63509,"paint-brush":61948,"paint-roller":62890,"palette":62783,"palfed":62424,"pallet":62594,"paper-plane":61912,"paperclip":61638,"parachute-box":62669,"paragraph":61917,"parking":62784,"passport":62891,"pastafarianism":63099,"paste":61674,"patreon":62425,"pause":61516,"pause-circle":62091,"paw":61872,"paypal":61933,"peace":63100,"pen":62212,"pen-alt":62213,"pen-fancy":62892,"pen-nib":62893,"pen-square":61771,"pencil-alt":62211,"pencil-ruler":62894,"penny-arcade":63236,"people-arrows":57448,"people-carry":62670,"pepper-hot":63510,"perbyte":57475,"percent":62101,"percentage":62785,"periscope":62426,"person-booth":63318,"phabricator":62427,"phoenix-framework":62428,"phoenix-squadron":62737,"phone":61589,"phone-alt":63609,"phone-slash":62429,"phone-square":61592,"phone-square-alt":63611,"phone-volume":62112,"photo-video":63612,"php":62551,"pied-piper":62126,"pied-piper-alt":61864,"pied-piper-hat":62693,"pied-piper-pp":61863,"pied-piper-square":57374,"piggy-bank":62675,"pills":62596,"pinterest":61650,"pinterest-p":62001,"pinterest-square":61651,"pizza-slice":63512,"place-of-worship":63103,"plane":61554,"plane-arrival":62895,"plane-departure":62896,"plane-slash":57449,"play":61515,"play-circle":61764,"playstation":62431,"plug":61926,"plus":61543,"plus-circle":61525,"plus-square":61694,"podcast":62158,"poll":63105,"poll-h":63106,"poo":62206,"poo-storm":63322,"poop":63001,"portrait":62432,"pound-sign":61780,"power-off":61457,"pray":63107,"praying-hands":63108,"prescription":62897,"prescription-bottle":62597,"prescription-bottle-alt":62598,"print":61487,"procedures":62599,"product-hunt":62088,"project-diagram":62786,"pump-medical":57450,"pump-soap":57451,"pushed":62433,"puzzle-piece":61742,"python":62434,"qq":61910,"qrcode":61481,"question":61736,"question-circle":61529,"quidditch":62552,"quinscape":62553,"quora":62148,"quote-left":61709,"quote-right":61710,"quran":63111,"r-project":62711,"radiation":63417,"radiation-alt":63418,"rainbow":63323,"random":61556,"raspberry-pi":63419,"ravelry":62169,"react":62491,"reacteurope":63325,"readme":62677,"rebel":61904,"receipt":62787,"record-vinyl":63705,"recycle":61880,"red-river":62435,"reddit":61857,"reddit-alien":62081,"reddit-square":61858,"redhat":63420,"redo":61470,"redo-alt":62201,"registered":62045,"remove-format":63613,"renren":61835,"reply":62437,"reply-all":61730,"replyd":62438,"republican":63326,"researchgate":62712,"resolving":62439,"restroom":63421,"retweet":61561,"rev":62898,"ribbon":62678,"ring":63243,"road":61464,"robot":62788,"rocket":61749,"rocketchat":62440,"rockrms":62441,"route":62679,"rss":61598,"rss-square":61763,"ruble-sign":61784,"ruler":62789,"ruler-combined":62790,"ruler-horizontal":62791,"ruler-vertical":62792,"running":63244,"rupee-sign":61782,"rust":57466,"sad-cry":62899,"sad-tear":62900,"safari":62055,"salesforce":63547,"sass":62494,"satellite":63423,"satellite-dish":63424,"save":61639,"schlix":62442,"school":62793,"screwdriver":62794,"scribd":62090,"scroll":63246,"sd-card":63426,"search":61442,"search-dollar":63112,"search-location":63113,"search-minus":61456,"search-plus":61454,"searchengin":62443,"seedling":62680,"sellcast":62170,"sellsy":61971,"server":62003,"servicestack":62444,"shapes":63007,"share":61540,"share-alt":61920,"share-alt-square":61921,"share-square":61773,"shekel-sign":61963,"shield-alt":62445,"shield-virus":57452,"ship":61978,"shipping-fast":62603,"shirtsinbulk":61972,"shoe-prints":62795,"shopify":57431,"shopping-bag":62096,"shopping-basket":62097,"shopping-cart":61562,"shopware":62901,"shower":62156,"shuttle-van":62902,"sign":62681,"sign-in-alt":62198,"sign-language":62119,"sign-out-alt":62197,"signal":61458,"signature":62903,"sim-card":63428,"simplybuilt":61973,"sink":57453,"sistrix":62446,"sitemap":61672,"sith":62738,"skating":63429,"sketch":63430,"skiing":63433,"skiing-nordic":63434,"skull":62796,"skull-crossbones":63252,"skyatlas":61974,"skype":61822,"slack":61848,"slack-hash":62447,"slash":63253,"sleigh":63436,"sliders-h":61918,"slideshare":61927,"smile":61720,"smile-beam":62904,"smile-wink":62682,"smog":63327,"smoking":62605,"smoking-ban":62797,"sms":63437,"snapchat":62123,"snapchat-ghost":62124,"snapchat-square":62125,"snowboarding":63438,"snowflake":62172,"snowman":63440,"snowplow":63442,"soap":57454,"socks":63126,"solar-panel":62906,"sort":61660,"sort-alpha-down":61789,"sort-alpha-down-alt":63617,"sort-alpha-up":61790,"sort-alpha-up-alt":63618,"sort-amount-down":61792,"sort-amount-down-alt":63620,"sort-amount-up":61793,"sort-amount-up-alt":63621,"sort-down":61661,"sort-numeric-down":61794,"sort-numeric-down-alt":63622,"sort-numeric-up":61795,"sort-numeric-up-alt":63623,"sort-up":61662,"soundcloud":61886,"sourcetree":63443,"spa":62907,"space-shuttle":61847,"speakap":62451,"speaker-deck":63548,"spell-check":63633,"spider":63255,"spinner":61712,"splotch":62908,"spotify":61884,"spray-can":62909,"square":61640,"square-full":62556,"square-root-alt":63128,"squarespace":62910,"stack-exchange":61837,"stack-overflow":61804,"stackpath":63554,"stamp":62911,"star":61445,"star-and-crescent":63129,"star-half":61577,"star-half-alt":62912,"star-of-david":63130,"star-of-life":63009,"staylinked":62453,"steam":61878,"steam-square":61879,"steam-symbol":62454,"step-backward":61512,"step-forward":61521,"stethoscope":61681,"sticker-mule":62455,"sticky-note":62025,"stop":61517,"stop-circle":62093,"stopwatch":62194,"stopwatch-20":57455,"store":62798,"store-alt":62799,"store-alt-slash":57456,"store-slash":57457,"strava":62504,"stream":62800,"street-view":61981,"strikethrough":61644,"stripe":62505,"stripe-s":62506,"stroopwafel":62801,"studiovinari":62456,"stumbleupon":61860,"stumbleupon-circle":61859,"subscript":61740,"subway":62009,"suitcase":61682,"suitcase-rolling":62913,"sun":61829,"superpowers":62173,"superscript":61739,"supple":62457,"surprise":62914,"suse":63446,"swatchbook":62915,"swift":63713,"swimmer":62916,"swimming-pool":62917,"symfony":63549,"synagogue":63131,"sync":61473,"sync-alt":62193,"syringe":62606,"table":61646,"table-tennis":62557,"tablet":61706,"tablet-alt":62458,"tablets":62608,"tachometer-alt":62461,"tag":61483,"tags":61484,"tape":62683,"tasks":61614,"taxi":61882,"teamspeak":62713,"teeth":63022,"teeth-open":63023,"telegram":62150,"telegram-plane":62462,"temperature-high":63337,"temperature-low":63339,"tencent-weibo":61909,"tenge":63447,"terminal":61728,"text-height":61492,"text-width":61493,"th":61450,"th-large":61449,"th-list":61451,"the-red-yeti":63133,"theater-masks":63024,"themeco":62918,"themeisle":62130,"thermometer":62609,"thermometer-empty":62155,"thermometer-full":62151,"thermometer-half":62153,"thermometer-quarter":62154,"thermometer-three-quarters":62152,"think-peaks":63281,"thumbs-down":61797,"thumbs-up":61796,"thumbtack":61581,"ticket-alt":62463,"tiktok":57467,"times":61453,"times-circle":61527,"tint":61507,"tint-slash":62919,"tired":62920,"toggle-off":61956,"toggle-on":61957,"toilet":63448,"toilet-paper":63262,"toilet-paper-slash":57458,"toolbox":62802,"tools":63449,"tooth":62921,"torah":63136,"torii-gate":63137,"tractor":63266,"trade-federation":62739,"trademark":62044,"traffic-light":63031,"trailer":57409,"train":62008,"tram":63450,"transgender":61988,"transgender-alt":61989,"trash":61944,"trash-alt":62189,"trash-restore":63529,"trash-restore-alt":63530,"tree":61883,"trello":61825,"tripadvisor":62050,"trophy":61585,"truck":61649,"truck-loading":62686,"truck-monster":63035,"truck-moving":62687,"truck-pickup":63036,"tshirt":62803,"tty":61924,"tumblr":61811,"tumblr-square":61812,"tv":62060,"twitch":61928,"twitter":61593,"twitter-square":61569,"typo3":62507,"uber":62466,"ubuntu":63455,"uikit":62467,"umbraco":63720,"umbrella":61673,"umbrella-beach":62922,"uncharted":57476,"underline":61645,"undo":61666,"undo-alt":62186,"uniregistry":62468,"unity":57417,"universal-access":62106,"university":61852,"unlink":61735,"unlock":61596,"unlock-alt":61758,"unsplash":57468,"untappd":62469,"upload":61587,"ups":63456,"usb":62087,"user":61447,"user-alt":62470,"user-alt-slash":62714,"user-astronaut":62715,"user-check":62716,"user-circle":62141,"user-clock":62717,"user-cog":62718,"user-edit":62719,"user-friends":62720,"user-graduate":62721,"user-injured":63272,"user-lock":62722,"user-md":61680,"user-minus":62723,"user-ninja":62724,"user-nurse":63535,"user-plus":62004,"user-secret":61979,"user-shield":62725,"user-slash":62726,"user-tag":62727,"user-tie":62728,"user-times":62005,"users":61632,"users-cog":62729,"users-slash":57459,"usps":63457,"ussunnah":62471,"utensil-spoon":62181,"utensils":62183,"vaadin":62472,"vector-square":62923,"venus":61985,"venus-double":61990,"venus-mars":61992,"vest":57477,"vest-patches":57478,"viacoin":62007,"viadeo":62121,"viadeo-square":62122,"vial":62610,"vials":62611,"viber":62473,"video":61501,"video-slash":62690,"vihara":63143,"vimeo":62474,"vimeo-square":61844,"vimeo-v":62077,"vine":61898,"virus":57460,"virus-slash":57461,"viruses":57462,"vk":61833,"vnv":62475,"voicemail":63639,"volleyball-ball":62559,"volume-down":61479,"volume-mute":63145,"volume-off":61478,"volume-up":61480,"vote-yea":63346,"vr-cardboard":63273,"vuejs":62495,"walking":62804,"wallet":62805,"warehouse":62612,"watchman-monitoring":57479,"water":63347,"wave-square":63550,"waze":63551,"weebly":62924,"weibo":61834,"weight":62614,"weight-hanging":62925,"weixin":61911,"whatsapp":62002,"whatsapp-square":62476,"wheelchair":61843,"whmcs":62477,"wifi":61931,"wikipedia-w":62054,"wind":63278,"window-close":62480,"window-maximize":62160,"window-minimize":62161,"window-restore":62162,"windows":61818,"wine-bottle":63279,"wine-glass":62691,"wine-glass-alt":62926,"wix":62927,"wizards-of-the-coast":63280,"wodu":57480,"wolf-pack-battalion":62740,"won-sign":61785,"wordpress":61850,"wordpress-simple":62481,"wpbeginner":62103,"wpexplorer":62174,"wpforms":62104,"wpressr":62436,"wrench":61613,"x-ray":62615,"xbox":62482,"xing":61800,"xing-square":61801,"y-combinator":62011,"yahoo":61854,"yammer":63552,"yandex":62483,"yandex-international":62484,"yarn":63459,"yelp":61929,"yen-sign":61783,"yin-yang":63149,"yoast":62129,"youtube":61799,"youtube-square":62513,"zhihu":63039}'),i=JSON.parse('{"brands":["500px","accessible-icon","accusoft","acquisitions-incorporated","adn","adversal","affiliatetheme","airbnb","algolia","alipay","amazon-pay","amazon","amilia","android","angellist","angrycreative","angular","app-store-ios","app-store","apper","apple-pay","apple","artstation","asymmetrik","atlassian","audible","autoprefixer","avianex","aviato","aws","bandcamp","battle-net","behance-square","behance","bimobject","bitbucket","bitcoin","bity","black-tie","blackberry","blogger-b","blogger","bluetooth-b","bluetooth","bootstrap","btc","buffer","buromobelexperte","buy-n-large","buysellads","canadian-maple-leaf","cc-amazon-pay","cc-amex","cc-apple-pay","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","centercode","centos","chrome","chromecast","cloudflare","cloudscale","cloudsmith","cloudversify","codepen","codiepie","confluence","connectdevelop","contao","cotton-bureau","cpanel","creative-commons-by","creative-commons-nc-eu","creative-commons-nc-jp","creative-commons-nc","creative-commons-nd","creative-commons-pd-alt","creative-commons-pd","creative-commons-remix","creative-commons-sa","creative-commons-sampling-plus","creative-commons-sampling","creative-commons-share","creative-commons-zero","creative-commons","critical-role","css3-alt","css3","cuttlefish","d-and-d-beyond","d-and-d","dailymotion","dashcube","deezer","delicious","deploydog","deskpro","dev","deviantart","dhl","diaspora","digg","digital-ocean","discord","discourse","dochub","docker","draft2digital","dribbble-square","dribbble","dropbox","drupal","dyalog","earlybirds","ebay","edge-legacy","edge","elementor","ello","ember","empire","envira","erlang","ethereum","etsy","evernote","expeditedssl","facebook-f","facebook-messenger","facebook-square","facebook","fantasy-flight-games","fedex","fedora","figma","firefox-browser","firefox","first-order-alt","first-order","firstdraft","flickr","flipboard","fly","font-awesome-alt","font-awesome-flag","font-awesome-logo-full","font-awesome","fonticons-fi","fonticons","fort-awesome-alt","fort-awesome","forumbee","foursquare","free-code-camp","freebsd","fulcrum","galactic-republic","galactic-senate","get-pocket","gg-circle","gg","git-alt","git-square","git","github-alt","github-square","github","gitkraken","gitlab","gitter","glide-g","glide","gofore","goodreads-g","goodreads","google-drive","google-pay","google-play","google-plus-g","google-plus-square","google-plus","google-wallet","google","gratipay","grav","gripfire","grunt","guilded","gulp","hacker-news-square","hacker-news","hackerrank","hips","hire-a-helper","hive","hooli","hornbill","hotjar","houzz","html5","hubspot","ideal","imdb","innosoft","instagram-square","instagram","instalod","intercom","internet-explorer","invision","ioxhost","itch-io","itunes-note","itunes","java","jedi-order","jenkins","jira","joget","joomla","js-square","js","jsfiddle","kaggle","keybase","keycdn","kickstarter-k","kickstarter","korvue","laravel","lastfm-square","lastfm","leanpub","less","line","linkedin-in","linkedin","linode","linux","lyft","magento","mailchimp","mandalorian","markdown","mastodon","maxcdn","mdb","medapps","medium-m","medium","medrt","meetup","megaport","mendeley","microblog","microsoft","mix","mixcloud","mixer","mizuni","modx","monero","napster","neos","nimblr","node-js","node","npm","ns8","nutritionix","octopus-deploy","odnoklassniki-square","odnoklassniki","old-republic","opencart","openid","opera","optin-monster","orcid","osi","page4","pagelines","palfed","patreon","paypal","penny-arcade","perbyte","periscope","phabricator","phoenix-framework","phoenix-squadron","php","pied-piper-alt","pied-piper-hat","pied-piper-pp","pied-piper-square","pied-piper","pinterest-p","pinterest-square","pinterest","playstation","product-hunt","pushed","python","qq","quinscape","quora","r-project","raspberry-pi","ravelry","react","reacteurope","readme","rebel","red-river","reddit-alien","reddit-square","reddit","redhat","renren","replyd","researchgate","resolving","rev","rocketchat","rockrms","rust","safari","salesforce","sass","schlix","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","shopify","shopware","simplybuilt","sistrix","sith","sketch","skyatlas","skype","slack-hash","slack","slideshare","snapchat-ghost","snapchat-square","snapchat","soundcloud","sourcetree","speakap","speaker-deck","spotify","squarespace","stack-exchange","stack-overflow","stackpath","staylinked","steam-square","steam-symbol","steam","sticker-mule","strava","stripe-s","stripe","studiovinari","stumbleupon-circle","stumbleupon","superpowers","supple","suse","swift","symfony","teamspeak","telegram-plane","telegram","tencent-weibo","the-red-yeti","themeco","themeisle","think-peaks","tiktok","trade-federation","trello","tripadvisor","tumblr-square","tumblr","twitch","twitter-square","twitter","typo3","uber","ubuntu","uikit","umbraco","uncharted","uniregistry","unity","unsplash","untappd","ups","usb","usps","ussunnah","vaadin","viacoin","viadeo-square","viadeo","viber","vimeo-square","vimeo-v","vimeo","vine","vk","vnv","vuejs","watchman-monitoring","waze","weebly","weibo","weixin","whatsapp-square","whatsapp","whmcs","wikipedia-w","windows","wix","wizards-of-the-coast","wodu","wolf-pack-battalion","wordpress-simple","wordpress","wpbeginner","wpexplorer","wpforms","wpressr","xbox","xing-square","xing","y-combinator","yahoo","yammer","yandex-international","yandex","yarn","yelp","yoast","youtube-square","youtube","zhihu"],"regular":["address-book","address-card","angry","arrow-alt-circle-down","arrow-alt-circle-left","arrow-alt-circle-right","arrow-alt-circle-up","bell-slash","bell","bookmark","building","calendar-alt","calendar-check","calendar-minus","calendar-plus","calendar-times","calendar","caret-square-down","caret-square-left","caret-square-right","caret-square-up","chart-bar","check-circle","check-square","circle","clipboard","clock","clone","closed-captioning","comment-alt","comment-dots","comment","comments","compass","copy","copyright","credit-card","dizzy","dot-circle","edit","envelope-open","envelope","eye-slash","eye","file-alt","file-archive","file-audio","file-code","file-excel","file-image","file-pdf","file-powerpoint","file-video","file-word","file","flag","flushed","folder-open","folder","font-awesome-logo-full","frown-open","frown","futbol","gem","grimace","grin-alt","grin-beam-sweat","grin-beam","grin-hearts","grin-squint-tears","grin-squint","grin-stars","grin-tears","grin-tongue-squint","grin-tongue-wink","grin-tongue","grin-wink","grin","hand-lizard","hand-paper","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-rock","hand-scissors","hand-spock","handshake","hdd","heart","hospital","hourglass","id-badge","id-card","image","images","keyboard","kiss-beam","kiss-wink-heart","kiss","laugh-beam","laugh-squint","laugh-wink","laugh","lemon","life-ring","lightbulb","list-alt","map","meh-blank","meh-rolling-eyes","meh","minus-square","money-bill-alt","moon","newspaper","object-group","object-ungroup","paper-plane","pause-circle","play-circle","plus-square","question-circle","registered","sad-cry","sad-tear","save","share-square","smile-beam","smile-wink","smile","snowflake","square","star-half","star","sticky-note","stop-circle","sun","surprise","thumbs-down","thumbs-up","times-circle","tired","trash-alt","user-circle","user","window-close","window-maximize","window-minimize","window-restore"],"solid":["ad","address-book","address-card","adjust","air-freshener","align-center","align-justify","align-left","align-right","allergies","ambulance","american-sign-language-interpreting","anchor","angle-double-down","angle-double-left","angle-double-right","angle-double-up","angle-down","angle-left","angle-right","angle-up","angry","ankh","apple-alt","archive","archway","arrow-alt-circle-down","arrow-alt-circle-left","arrow-alt-circle-right","arrow-alt-circle-up","arrow-circle-down","arrow-circle-left","arrow-circle-right","arrow-circle-up","arrow-down","arrow-left","arrow-right","arrow-up","arrows-alt-h","arrows-alt-v","arrows-alt","assistive-listening-systems","asterisk","at","atlas","atom","audio-description","award","baby-carriage","baby","backspace","backward","bacon","bacteria","bacterium","bahai","balance-scale-left","balance-scale-right","balance-scale","ban","band-aid","barcode","bars","baseball-ball","basketball-ball","bath","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed","beer","bell-slash","bell","bezier-curve","bible","bicycle","biking","binoculars","biohazard","birthday-cake","blender-phone","blender","blind","blog","bold","bolt","bomb","bone","bong","book-dead","book-medical","book-open","book-reader","book","bookmark","border-all","border-none","border-style","bowling-ball","box-open","box-tissue","box","boxes","braille","brain","bread-slice","briefcase-medical","briefcase","broadcast-tower","broom","brush","bug","building","bullhorn","bullseye","burn","bus-alt","bus","business-time","calculator","calendar-alt","calendar-check","calendar-day","calendar-minus","calendar-plus","calendar-times","calendar-week","calendar","camera-retro","camera","campground","candy-cane","cannabis","capsules","car-alt","car-battery","car-crash","car-side","car","caravan","caret-down","caret-left","caret-right","caret-square-down","caret-square-left","caret-square-right","caret-square-up","caret-up","carrot","cart-arrow-down","cart-plus","cash-register","cat","certificate","chair","chalkboard-teacher","chalkboard","charging-station","chart-area","chart-bar","chart-line","chart-pie","check-circle","check-double","check-square","check","cheese","chess-bishop","chess-board","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","chess","chevron-circle-down","chevron-circle-left","chevron-circle-right","chevron-circle-up","chevron-down","chevron-left","chevron-right","chevron-up","child","church","circle-notch","circle","city","clinic-medical","clipboard-check","clipboard-list","clipboard","clock","clone","closed-captioning","cloud-download-alt","cloud-meatball","cloud-moon-rain","cloud-moon","cloud-rain","cloud-showers-heavy","cloud-sun-rain","cloud-sun","cloud-upload-alt","cloud","cocktail","code-branch","code","coffee","cog","cogs","coins","columns","comment-alt","comment-dollar","comment-dots","comment-medical","comment-slash","comment","comments-dollar","comments","compact-disc","compass","compress-alt","compress-arrows-alt","compress","concierge-bell","cookie-bite","cookie","copy","copyright","couch","credit-card","crop-alt","crop","cross","crosshairs","crow","crown","crutch","cube","cubes","cut","database","deaf","democrat","desktop","dharmachakra","diagnoses","dice-d20","dice-d6","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","dice","digital-tachograph","directions","disease","divide","dizzy","dna","dog","dollar-sign","dolly-flatbed","dolly","donate","door-closed","door-open","dot-circle","dove","download","drafting-compass","dragon","draw-polygon","drum-steelpan","drum","drumstick-bite","dumbbell","dumpster-fire","dumpster","dungeon","edit","egg","eject","ellipsis-h","ellipsis-v","envelope-open-text","envelope-open","envelope-square","envelope","equals","eraser","ethernet","euro-sign","exchange-alt","exclamation-circle","exclamation-triangle","exclamation","expand-alt","expand-arrows-alt","expand","external-link-alt","external-link-square-alt","eye-dropper","eye-slash","eye","fan","fast-backward","fast-forward","faucet","fax","feather-alt","feather","female","fighter-jet","file-alt","file-archive","file-audio","file-code","file-contract","file-csv","file-download","file-excel","file-export","file-image","file-import","file-invoice-dollar","file-invoice","file-medical-alt","file-medical","file-pdf","file-powerpoint","file-prescription","file-signature","file-upload","file-video","file-word","file","fill-drip","fill","film","filter","fingerprint","fire-alt","fire-extinguisher","fire","first-aid","fish","fist-raised","flag-checkered","flag-usa","flag","flask","flushed","folder-minus","folder-open","folder-plus","folder","font-awesome-logo-full","font","football-ball","forward","frog","frown-open","frown","funnel-dollar","futbol","gamepad","gas-pump","gavel","gem","genderless","ghost","gift","gifts","glass-cheers","glass-martini-alt","glass-martini","glass-whiskey","glasses","globe-africa","globe-americas","globe-asia","globe-europe","globe","golf-ball","gopuram","graduation-cap","greater-than-equal","greater-than","grimace","grin-alt","grin-beam-sweat","grin-beam","grin-hearts","grin-squint-tears","grin-squint","grin-stars","grin-tears","grin-tongue-squint","grin-tongue-wink","grin-tongue","grin-wink","grin","grip-horizontal","grip-lines-vertical","grip-lines","grip-vertical","guitar","h-square","hamburger","hammer","hamsa","hand-holding-heart","hand-holding-medical","hand-holding-usd","hand-holding-water","hand-holding","hand-lizard","hand-middle-finger","hand-paper","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-rock","hand-scissors","hand-sparkles","hand-spock","hands-helping","hands-wash","hands","handshake-alt-slash","handshake-slash","handshake","hanukiah","hard-hat","hashtag","hat-cowboy-side","hat-cowboy","hat-wizard","hdd","head-side-cough-slash","head-side-cough","head-side-mask","head-side-virus","heading","headphones-alt","headphones","headset","heart-broken","heart","heartbeat","helicopter","highlighter","hiking","hippo","history","hockey-puck","holly-berry","home","horse-head","horse","hospital-alt","hospital-symbol","hospital-user","hospital","hot-tub","hotdog","hotel","hourglass-end","hourglass-half","hourglass-start","hourglass","house-damage","house-user","hryvnia","i-cursor","ice-cream","icicles","icons","id-badge","id-card-alt","id-card","igloo","image","images","inbox","indent","industry","infinity","info-circle","info","italic","jedi","joint","journal-whills","kaaba","key","keyboard","khanda","kiss-beam","kiss-wink-heart","kiss","kiwi-bird","landmark","language","laptop-code","laptop-house","laptop-medical","laptop","laugh-beam","laugh-squint","laugh-wink","laugh","layer-group","leaf","lemon","less-than-equal","less-than","level-down-alt","level-up-alt","life-ring","lightbulb","link","lira-sign","list-alt","list-ol","list-ul","list","location-arrow","lock-open","lock","long-arrow-alt-down","long-arrow-alt-left","long-arrow-alt-right","long-arrow-alt-up","low-vision","luggage-cart","lungs-virus","lungs","magic","magnet","mail-bulk","male","map-marked-alt","map-marked","map-marker-alt","map-marker","map-pin","map-signs","map","marker","mars-double","mars-stroke-h","mars-stroke-v","mars-stroke","mars","mask","medal","medkit","meh-blank","meh-rolling-eyes","meh","memory","menorah","mercury","meteor","microchip","microphone-alt-slash","microphone-alt","microphone-slash","microphone","microscope","minus-circle","minus-square","minus","mitten","mobile-alt","mobile","money-bill-alt","money-bill-wave-alt","money-bill-wave","money-bill","money-check-alt","money-check","monument","moon","mortar-pestle","mosque","motorcycle","mountain","mouse-pointer","mouse","mug-hot","music","network-wired","neuter","newspaper","not-equal","notes-medical","object-group","object-ungroup","oil-can","om","otter","outdent","pager","paint-brush","paint-roller","palette","pallet","paper-plane","paperclip","parachute-box","paragraph","parking","passport","pastafarianism","paste","pause-circle","pause","paw","peace","pen-alt","pen-fancy","pen-nib","pen-square","pen","pencil-alt","pencil-ruler","people-arrows","people-carry","pepper-hot","percent","percentage","person-booth","phone-alt","phone-slash","phone-square-alt","phone-square","phone-volume","phone","photo-video","piggy-bank","pills","pizza-slice","place-of-worship","plane-arrival","plane-departure","plane-slash","plane","play-circle","play","plug","plus-circle","plus-square","plus","podcast","poll-h","poll","poo-storm","poo","poop","portrait","pound-sign","power-off","pray","praying-hands","prescription-bottle-alt","prescription-bottle","prescription","print","procedures","project-diagram","pump-medical","pump-soap","puzzle-piece","qrcode","question-circle","question","quidditch","quote-left","quote-right","quran","radiation-alt","radiation","rainbow","random","receipt","record-vinyl","recycle","redo-alt","redo","registered","remove-format","reply-all","reply","republican","restroom","retweet","ribbon","ring","road","robot","rocket","route","rss-square","rss","ruble-sign","ruler-combined","ruler-horizontal","ruler-vertical","ruler","running","rupee-sign","sad-cry","sad-tear","satellite-dish","satellite","save","school","screwdriver","scroll","sd-card","search-dollar","search-location","search-minus","search-plus","search","seedling","server","shapes","share-alt-square","share-alt","share-square","share","shekel-sign","shield-alt","shield-virus","ship","shipping-fast","shoe-prints","shopping-bag","shopping-basket","shopping-cart","shower","shuttle-van","sign-in-alt","sign-language","sign-out-alt","sign","signal","signature","sim-card","sink","sitemap","skating","skiing-nordic","skiing","skull-crossbones","skull","slash","sleigh","sliders-h","smile-beam","smile-wink","smile","smog","smoking-ban","smoking","sms","snowboarding","snowflake","snowman","snowplow","soap","socks","solar-panel","sort-alpha-down-alt","sort-alpha-down","sort-alpha-up-alt","sort-alpha-up","sort-amount-down-alt","sort-amount-down","sort-amount-up-alt","sort-amount-up","sort-down","sort-numeric-down-alt","sort-numeric-down","sort-numeric-up-alt","sort-numeric-up","sort-up","sort","spa","space-shuttle","spell-check","spider","spinner","splotch","spray-can","square-full","square-root-alt","square","stamp","star-and-crescent","star-half-alt","star-half","star-of-david","star-of-life","star","step-backward","step-forward","stethoscope","sticky-note","stop-circle","stop","stopwatch-20","stopwatch","store-alt-slash","store-alt","store-slash","store","stream","street-view","strikethrough","stroopwafel","subscript","subway","suitcase-rolling","suitcase","sun","superscript","surprise","swatchbook","swimmer","swimming-pool","synagogue","sync-alt","sync","syringe","table-tennis","table","tablet-alt","tablet","tablets","tachometer-alt","tag","tags","tape","tasks","taxi","teeth-open","teeth","temperature-high","temperature-low","tenge","terminal","text-height","text-width","th-large","th-list","th","theater-masks","thermometer-empty","thermometer-full","thermometer-half","thermometer-quarter","thermometer-three-quarters","thermometer","thumbs-down","thumbs-up","thumbtack","ticket-alt","times-circle","times","tint-slash","tint","tired","toggle-off","toggle-on","toilet-paper-slash","toilet-paper","toilet","toolbox","tools","tooth","torah","torii-gate","tractor","trademark","traffic-light","trailer","train","tram","transgender-alt","transgender","trash-alt","trash-restore-alt","trash-restore","trash","tree","trophy","truck-loading","truck-monster","truck-moving","truck-pickup","truck","tshirt","tty","tv","umbrella-beach","umbrella","underline","undo-alt","undo","universal-access","university","unlink","unlock-alt","unlock","upload","user-alt-slash","user-alt","user-astronaut","user-check","user-circle","user-clock","user-cog","user-edit","user-friends","user-graduate","user-injured","user-lock","user-md","user-minus","user-ninja","user-nurse","user-plus","user-secret","user-shield","user-slash","user-tag","user-tie","user-times","user","users-cog","users-slash","users","utensil-spoon","utensils","vector-square","venus-double","venus-mars","venus","vest-patches","vest","vial","vials","video-slash","video","vihara","virus-slash","virus","viruses","voicemail","volleyball-ball","volume-down","volume-mute","volume-off","volume-up","vote-yea","vr-cardboard","walking","wallet","warehouse","water","wave-square","weight-hanging","weight","wheelchair","wifi","wind","window-close","window-maximize","window-minimize","window-restore","wine-bottle","wine-glass-alt","wine-glass","won-sign","wrench","x-ray","yen-sign","yin-yang"]}'),o={Regular:n(40394),Light:n(40394),Solid:n(46363),Brand:n(55156)},s={regular:"regular",light:"light",solid:"solid",brand:"brand"},l=function(e,t={},n,a=!1){const i=Object.keys(t),o="FontAwesome5"+(a?"Pro":"Free");function s(t,r,a=o){return{fontFamily:`${a}-${t}`,fontFile:n[t],fontStyle:{},glyphMap:e}}const l=s("Brand"),u=s("Light"),c=s("Regular"),d=s("Solid");return(0,r.default)({brand:l,light:u,regular:c,solid:d},{defaultStyle:"regular",fallbackFamily:function(e){for(let n=0;n{"use strict";n.r(t),n.d(t,{FA6Style:()=>s,default:()=>l});var r=n(59815);const a=JSON.parse('{"0":48,"1":49,"2":50,"3":51,"4":52,"5":53,"6":54,"7":55,"8":56,"9":57,"fill-drip":62838,"arrows-to-circle":58557,"circle-chevron-right":61752,"chevron-circle-right":61752,"at":64,"trash-can":62189,"trash-alt":62189,"text-height":61492,"user-xmark":62005,"user-times":62005,"stethoscope":61681,"message":62074,"comment-alt":62074,"info":61737,"down-left-and-up-right-to-center":62498,"compress-alt":62498,"explosion":58601,"file-lines":61788,"file-alt":61788,"file-text":61788,"wave-square":63550,"ring":63243,"building-un":58585,"dice-three":62759,"calendar-days":61555,"calendar-alt":61555,"anchor-circle-check":58538,"building-circle-arrow-right":58577,"volleyball":62559,"volleyball-ball":62559,"arrows-up-to-line":58562,"sort-down":61661,"sort-desc":61661,"circle-minus":61526,"minus-circle":61526,"door-open":62763,"right-from-bracket":62197,"sign-out-alt":62197,"atom":62930,"soap":57454,"icons":63597,"heart-music-camera-bolt":63597,"microphone-lines-slash":62777,"microphone-alt-slash":62777,"bridge-circle-check":58569,"pump-medical":57450,"fingerprint":62839,"hand-point-right":61604,"magnifying-glass-location":63113,"search-location":63113,"forward-step":61521,"step-forward":61521,"face-smile-beam":62904,"smile-beam":62904,"flag-checkered":61726,"football":62542,"football-ball":62542,"school-circle-exclamation":58732,"crop":61733,"angles-down":61699,"angle-double-down":61699,"users-rectangle":58772,"people-roof":58679,"people-line":58676,"beer-mug-empty":61692,"beer":61692,"diagram-predecessor":58487,"arrow-up-long":61814,"long-arrow-up":61814,"fire-flame-simple":62570,"burn":62570,"person":61827,"male":61827,"laptop":61705,"file-csv":63197,"menorah":63094,"truck-plane":58767,"record-vinyl":63705,"face-grin-stars":62855,"grin-stars":62855,"bong":62812,"spaghetti-monster-flying":63099,"pastafarianism":63099,"arrow-down-up-across-line":58543,"spoon":62181,"utensil-spoon":62181,"jar-wheat":58647,"envelopes-bulk":63092,"mail-bulk":63092,"file-circle-exclamation":58603,"circle-h":62590,"hospital-symbol":62590,"pager":63509,"address-book":62137,"contact-book":62137,"strikethrough":61644,"k":75,"landmark-flag":58652,"pencil":62211,"pencil-alt":62211,"backward":61514,"caret-right":61658,"comments":61574,"paste":61674,"file-clipboard":61674,"code-pull-request":57660,"clipboard-list":62573,"truck-ramp-box":62686,"truck-loading":62686,"user-check":62716,"vial-virus":58775,"sheet-plastic":58737,"blog":63361,"user-ninja":62724,"person-arrow-up-from-line":58681,"scroll-torah":63136,"torah":63136,"broom-ball":62552,"quidditch":62552,"quidditch-broom-ball":62552,"toggle-off":61956,"box-archive":61831,"archive":61831,"person-drowning":58693,"arrow-down-9-1":63622,"sort-numeric-desc":63622,"sort-numeric-down-alt":63622,"face-grin-tongue-squint":62858,"grin-tongue-squint":62858,"spray-can":62909,"truck-monster":63035,"w":87,"earth-africa":62844,"globe-africa":62844,"rainbow":63323,"circle-notch":61902,"tablet-screen-button":62458,"tablet-alt":62458,"paw":61872,"cloud":61634,"trowel-bricks":58762,"face-flushed":62841,"flushed":62841,"hospital-user":63501,"tent-arrow-left-right":58751,"gavel":61667,"legal":61667,"binoculars":61925,"microphone-slash":61745,"box-tissue":57435,"motorcycle":61980,"bell-concierge":62818,"concierge-bell":62818,"pen-ruler":62894,"pencil-ruler":62894,"people-arrows":57448,"people-arrows-left-right":57448,"mars-and-venus-burst":58659,"square-caret-right":61778,"caret-square-right":61778,"scissors":61636,"cut":61636,"sun-plant-wilt":58746,"toilets-portable":58756,"hockey-puck":62547,"table":61646,"magnifying-glass-arrow-right":58657,"tachograph-digital":62822,"digital-tachograph":62822,"users-slash":57459,"clover":57657,"reply":62437,"mail-reply":62437,"star-and-crescent":63129,"house-fire":58636,"square-minus":61766,"minus-square":61766,"helicopter":62771,"compass":61774,"square-caret-down":61776,"caret-square-down":61776,"file-circle-question":58607,"laptop-code":62972,"swatchbook":62915,"prescription-bottle":62597,"bars":61641,"navicon":61641,"people-group":58675,"hourglass-end":62035,"hourglass-3":62035,"heart-crack":63401,"heart-broken":63401,"square-up-right":62304,"external-link-square-alt":62304,"face-kiss-beam":62871,"kiss-beam":62871,"film":61448,"ruler-horizontal":62791,"people-robbery":58678,"lightbulb":61675,"caret-left":61657,"circle-exclamation":61546,"exclamation-circle":61546,"school-circle-xmark":58733,"arrow-right-from-bracket":61579,"sign-out":61579,"circle-chevron-down":61754,"chevron-circle-down":61754,"unlock-keyhole":61758,"unlock-alt":61758,"cloud-showers-heavy":63296,"headphones-simple":62863,"headphones-alt":62863,"sitemap":61672,"circle-dollar-to-slot":62649,"donate":62649,"memory":62776,"road-spikes":58728,"fire-burner":58609,"flag":61476,"hanukiah":63206,"feather":62765,"volume-low":61479,"volume-down":61479,"comment-slash":62643,"cloud-sun-rain":63299,"compress":61542,"wheat-awn":58061,"wheat-alt":58061,"ankh":63044,"hands-holding-child":58618,"asterisk":42,"square-check":61770,"check-square":61770,"peseta-sign":57889,"heading":61916,"header":61916,"ghost":63202,"list":61498,"list-squares":61498,"square-phone-flip":63611,"phone-square-alt":63611,"cart-plus":61975,"gamepad":61723,"circle-dot":61842,"dot-circle":61842,"face-dizzy":62823,"dizzy":62823,"egg":63483,"house-medical-circle-xmark":58643,"campground":63163,"folder-plus":63070,"futbol":61923,"futbol-ball":61923,"soccer-ball":61923,"paintbrush":61948,"paint-brush":61948,"lock":61475,"gas-pump":62767,"hot-tub-person":62867,"hot-tub":62867,"map-location":62879,"map-marked":62879,"house-flood-water":58638,"tree":61883,"bridge-lock":58572,"sack-dollar":63517,"pen-to-square":61508,"edit":61508,"car-side":62948,"share-nodes":61920,"share-alt":61920,"heart-circle-minus":58623,"hourglass-half":62034,"hourglass-2":62034,"microscope":62992,"sink":57453,"bag-shopping":62096,"shopping-bag":62096,"arrow-down-z-a":63617,"sort-alpha-desc":63617,"sort-alpha-down-alt":63617,"mitten":63413,"person-rays":58701,"users":61632,"eye-slash":61552,"flask-vial":58611,"hand":62038,"hand-paper":62038,"om":63097,"worm":58777,"house-circle-xmark":58635,"plug":61926,"chevron-up":61559,"hand-spock":62041,"stopwatch":62194,"face-kiss":62870,"kiss":62870,"bridge-circle-xmark":58571,"face-grin-tongue":62857,"grin-tongue":62857,"chess-bishop":62522,"face-grin-wink":62860,"grin-wink":62860,"ear-deaf":62116,"deaf":62116,"deafness":62116,"hard-of-hearing":62116,"road-circle-check":58724,"dice-five":62755,"square-rss":61763,"rss-square":61763,"land-mine-on":58651,"i-cursor":62022,"stamp":62911,"stairs":57993,"i":73,"hryvnia-sign":63218,"hryvnia":63218,"pills":62596,"face-grin-wide":62849,"grin-alt":62849,"tooth":62921,"v":86,"bangladeshi-taka-sign":58086,"bicycle":61958,"staff-snake":58745,"rod-asclepius":58745,"rod-snake":58745,"staff-aesculapius":58745,"head-side-cough-slash":57442,"truck-medical":61689,"ambulance":61689,"wheat-awn-circle-exclamation":58776,"snowman":63440,"mortar-pestle":62887,"road-barrier":58722,"school":62793,"igloo":63406,"joint":62869,"angle-right":61701,"horse":63216,"q":81,"g":71,"notes-medical":62593,"temperature-half":62153,"temperature-2":62153,"thermometer-2":62153,"thermometer-half":62153,"dong-sign":57705,"capsules":62571,"poo-storm":63322,"poo-bolt":63322,"face-frown-open":62842,"frown-open":62842,"hand-point-up":61606,"money-bill":61654,"bookmark":61486,"align-justify":61497,"umbrella-beach":62922,"helmet-un":58627,"bullseye":61760,"bacon":63461,"hand-point-down":61607,"arrow-up-from-bracket":57498,"folder":61563,"folder-blank":61563,"file-waveform":62584,"file-medical-alt":62584,"radiation":63417,"chart-simple":58483,"mars-stroke":61993,"vial":62610,"gauge":63012,"dashboard":63012,"gauge-med":63012,"tachometer-alt-average":63012,"wand-magic-sparkles":58058,"magic-wand-sparkles":58058,"e":69,"pen-clip":62213,"pen-alt":62213,"bridge-circle-exclamation":58570,"user":61447,"school-circle-check":58731,"dumpster":63379,"van-shuttle":62902,"shuttle-van":62902,"building-user":58586,"square-caret-left":61841,"caret-square-left":61841,"highlighter":62865,"key":61572,"bullhorn":61601,"globe":61612,"synagogue":63131,"person-half-dress":58696,"road-bridge":58723,"location-arrow":61732,"c":67,"tablet-button":61706,"building-lock":58582,"pizza-slice":63512,"money-bill-wave":62778,"chart-area":61950,"area-chart":61950,"house-flag":58637,"person-circle-minus":58688,"ban":61534,"cancel":61534,"camera-rotate":57560,"spray-can-sparkles":62928,"air-freshener":62928,"star":61445,"repeat":62307,"cross":63060,"box":62566,"venus-mars":61992,"arrow-pointer":62021,"mouse-pointer":62021,"maximize":62238,"expand-arrows-alt":62238,"charging-station":62951,"shapes":63007,"triangle-circle-square":63007,"shuffle":61556,"random":61556,"person-running":63244,"running":63244,"mobile-retro":58663,"grip-lines-vertical":63397,"spider":63255,"hands-bound":58617,"file-invoice-dollar":62833,"plane-circle-exclamation":58710,"x-ray":62615,"spell-check":63633,"slash":63253,"computer-mouse":63692,"mouse":63692,"arrow-right-to-bracket":61584,"sign-in":61584,"shop-slash":57456,"store-alt-slash":57456,"server":62003,"virus-covid-slash":58537,"shop-lock":58533,"hourglass-start":62033,"hourglass-1":62033,"blender-phone":63158,"building-wheat":58587,"person-breastfeeding":58682,"right-to-bracket":62198,"sign-in-alt":62198,"venus":61985,"passport":62891,"thumbtack-slash":59023,"thumb-tack-slash":59023,"heart-pulse":61982,"heartbeat":61982,"people-carry-box":62670,"people-carry":62670,"temperature-high":63337,"microchip":62171,"crown":62753,"weight-hanging":62925,"xmarks-lines":58778,"file-prescription":62834,"weight-scale":62614,"weight":62614,"user-group":62720,"user-friends":62720,"arrow-up-a-z":61790,"sort-alpha-up":61790,"chess-knight":62529,"face-laugh-squint":62875,"laugh-squint":62875,"wheelchair":61843,"circle-arrow-up":61610,"arrow-circle-up":61610,"toggle-on":61957,"person-walking":62804,"walking":62804,"l":76,"fire":61549,"bed-pulse":62599,"procedures":62599,"shuttle-space":61847,"space-shuttle":61847,"face-laugh":62873,"laugh":62873,"folder-open":61564,"heart-circle-plus":58624,"code-fork":57659,"city":63055,"microphone-lines":62409,"microphone-alt":62409,"pepper-hot":63510,"unlock":61596,"colon-sign":57664,"headset":62864,"store-slash":57457,"road-circle-xmark":58726,"user-minus":62723,"mars-stroke-up":61994,"mars-stroke-v":61994,"champagne-glasses":63391,"glass-cheers":63391,"clipboard":62248,"house-circle-exclamation":58634,"file-arrow-up":62836,"file-upload":62836,"wifi":61931,"wifi-3":61931,"wifi-strong":61931,"bath":62157,"bathtub":62157,"underline":61645,"user-pen":62719,"user-edit":62719,"signature":62903,"stroopwafel":62801,"bold":61490,"anchor-lock":58541,"building-ngo":58583,"manat-sign":57813,"not-equal":62782,"border-top-left":63571,"border-style":63571,"map-location-dot":62880,"map-marked-alt":62880,"jedi":63081,"square-poll-vertical":63105,"poll":63105,"mug-hot":63414,"car-battery":62943,"battery-car":62943,"gift":61547,"dice-two":62760,"chess-queen":62533,"glasses":62768,"chess-board":62524,"building-circle-check":58578,"person-chalkboard":58685,"mars-stroke-right":61995,"mars-stroke-h":61995,"hand-back-fist":62037,"hand-rock":62037,"square-caret-up":61777,"caret-square-up":61777,"cloud-showers-water":58596,"chart-bar":61568,"bar-chart":61568,"hands-bubbles":57438,"hands-wash":57438,"less-than-equal":62775,"train":62008,"eye-low-vision":62120,"low-vision":62120,"crow":62752,"sailboat":58437,"window-restore":62162,"square-plus":61694,"plus-square":61694,"torii-gate":63137,"frog":62766,"bucket":58575,"image":61502,"microphone":61744,"cow":63176,"caret-up":61656,"screwdriver":62794,"folder-closed":57733,"house-tsunami":58645,"square-nfi":58742,"arrow-up-from-ground-water":58549,"martini-glass":62843,"glass-martini-alt":62843,"rotate-left":62186,"rotate-back":62186,"rotate-backward":62186,"undo-alt":62186,"table-columns":61659,"columns":61659,"lemon":61588,"head-side-mask":57443,"handshake":62133,"gem":62373,"dolly":62578,"dolly-box":62578,"smoking":62605,"minimize":63372,"compress-arrows-alt":63372,"monument":62886,"snowplow":63442,"angles-right":61697,"angle-double-right":61697,"cannabis":62815,"circle-play":61764,"play-circle":61764,"tablets":62608,"ethernet":63382,"euro-sign":61779,"eur":61779,"euro":61779,"chair":63168,"circle-check":61528,"check-circle":61528,"circle-stop":62093,"stop-circle":62093,"compass-drafting":62824,"drafting-compass":62824,"plate-wheat":58714,"icicles":63405,"person-shelter":58703,"neuter":61996,"id-badge":62145,"marker":62881,"face-laugh-beam":62874,"laugh-beam":62874,"helicopter-symbol":58626,"universal-access":62106,"circle-chevron-up":61753,"chevron-circle-up":61753,"lari-sign":57800,"volcano":63344,"person-walking-dashed-line-arrow-right":58707,"sterling-sign":61780,"gbp":61780,"pound-sign":61780,"viruses":57462,"square-person-confined":58743,"user-tie":62728,"arrow-down-long":61813,"long-arrow-down":61813,"tent-arrow-down-to-line":58750,"certificate":61603,"reply-all":61730,"mail-reply-all":61730,"suitcase":61682,"person-skating":63429,"skating":63429,"filter-circle-dollar":63074,"funnel-dollar":63074,"camera-retro":61571,"circle-arrow-down":61611,"arrow-circle-down":61611,"file-import":62831,"arrow-right-to-file":62831,"square-arrow-up-right":61772,"external-link-square":61772,"box-open":62622,"scroll":63246,"spa":62907,"location-pin-lock":58655,"pause":61516,"hill-avalanche":58631,"temperature-empty":62155,"temperature-0":62155,"thermometer-0":62155,"thermometer-empty":62155,"bomb":61922,"registered":62045,"address-card":62139,"contact-card":62139,"vcard":62139,"scale-unbalanced-flip":62742,"balance-scale-right":62742,"subscript":61740,"diamond-turn-right":62955,"directions":62955,"burst":58588,"house-laptop":57446,"laptop-house":57446,"face-tired":62920,"tired":62920,"money-bills":57843,"smog":63327,"crutch":63479,"cloud-arrow-up":61678,"cloud-upload":61678,"cloud-upload-alt":61678,"palette":62783,"arrows-turn-right":58560,"vest":57477,"ferry":58602,"arrows-down-to-people":58553,"seedling":62680,"sprout":62680,"left-right":62263,"arrows-alt-h":62263,"boxes-packing":58567,"circle-arrow-left":61608,"arrow-circle-left":61608,"group-arrows-rotate":58614,"bowl-food":58566,"candy-cane":63366,"arrow-down-wide-short":61792,"sort-amount-asc":61792,"sort-amount-down":61792,"cloud-bolt":63340,"thunderstorm":63340,"text-slash":63613,"remove-format":63613,"face-smile-wink":62682,"smile-wink":62682,"file-word":61890,"file-powerpoint":61892,"arrows-left-right":61566,"arrows-h":61566,"house-lock":58640,"cloud-arrow-down":61677,"cloud-download":61677,"cloud-download-alt":61677,"children":58593,"chalkboard":62747,"blackboard":62747,"user-large-slash":62714,"user-alt-slash":62714,"envelope-open":62134,"handshake-simple-slash":57439,"handshake-alt-slash":57439,"mattress-pillow":58661,"guarani-sign":57754,"arrows-rotate":61473,"refresh":61473,"sync":61473,"fire-extinguisher":61748,"cruzeiro-sign":57682,"greater-than-equal":62770,"shield-halved":62445,"shield-alt":62445,"book-atlas":62808,"atlas":62808,"virus":57460,"envelope-circle-check":58600,"layer-group":62973,"arrows-to-dot":58558,"archway":62807,"heart-circle-check":58621,"house-chimney-crack":63217,"house-damage":63217,"file-zipper":61894,"file-archive":61894,"square":61640,"martini-glass-empty":61440,"glass-martini":61440,"couch":62648,"cedi-sign":57567,"italic":61491,"table-cells-column-lock":59000,"church":62749,"comments-dollar":63059,"democrat":63303,"z":90,"person-skiing":63433,"skiing":63433,"road-lock":58727,"a":65,"temperature-arrow-down":57407,"temperature-down":57407,"feather-pointed":62827,"feather-alt":62827,"p":80,"snowflake":62172,"newspaper":61930,"rectangle-ad":63041,"ad":63041,"circle-arrow-right":61609,"arrow-circle-right":61609,"filter-circle-xmark":57723,"locust":58656,"sort":61660,"unsorted":61660,"list-ol":61643,"list-1-2":61643,"list-numeric":61643,"person-dress-burst":58692,"money-check-dollar":62781,"money-check-alt":62781,"vector-square":62923,"bread-slice":63468,"language":61867,"face-kiss-wink-heart":62872,"kiss-wink-heart":62872,"filter":61616,"question":63,"file-signature":62835,"up-down-left-right":61618,"arrows-alt":61618,"house-chimney-user":57445,"hand-holding-heart":62654,"puzzle-piece":61742,"money-check":62780,"star-half-stroke":62912,"star-half-alt":62912,"code":61729,"whiskey-glass":63392,"glass-whiskey":63392,"building-circle-exclamation":58579,"magnifying-glass-chart":58658,"arrow-up-right-from-square":61582,"external-link":61582,"cubes-stacked":58598,"won-sign":61785,"krw":61785,"won":61785,"virus-covid":58536,"austral-sign":57513,"f":70,"leaf":61548,"road":61464,"taxi":61882,"cab":61882,"person-circle-plus":58689,"chart-pie":61952,"pie-chart":61952,"bolt-lightning":57527,"sack-xmark":58730,"file-excel":61891,"file-contract":62828,"fish-fins":58610,"building-flag":58581,"face-grin-beam":62850,"grin-beam":62850,"object-ungroup":62024,"poop":63001,"location-pin":61505,"map-marker":61505,"kaaba":63083,"toilet-paper":63262,"helmet-safety":63495,"hard-hat":63495,"hat-hard":63495,"eject":61522,"circle-right":62298,"arrow-alt-circle-right":62298,"plane-circle-check":58709,"face-rolling-eyes":62885,"meh-rolling-eyes":62885,"object-group":62023,"chart-line":61953,"line-chart":61953,"mask-ventilator":58660,"arrow-right":61537,"signs-post":62071,"map-signs":62071,"cash-register":63368,"person-circle-question":58690,"h":72,"tarp":58747,"screwdriver-wrench":63449,"tools":63449,"arrows-to-eye":58559,"plug-circle-bolt":58715,"heart":61444,"mars-and-venus":61988,"house-user":57776,"home-user":57776,"dumpster-fire":63380,"house-crack":58289,"martini-glass-citrus":62817,"cocktail":62817,"face-surprise":62914,"surprise":62914,"bottle-water":58565,"circle-pause":62091,"pause-circle":62091,"toilet-paper-slash":57458,"apple-whole":62929,"apple-alt":62929,"kitchen-set":58650,"r":82,"temperature-quarter":62154,"temperature-1":62154,"thermometer-1":62154,"thermometer-quarter":62154,"cube":61874,"bitcoin-sign":57524,"shield-dog":58739,"solar-panel":62906,"lock-open":62401,"elevator":57709,"money-bill-transfer":58664,"money-bill-trend-up":58665,"house-flood-water-circle-arrow-right":58639,"square-poll-horizontal":63106,"poll-h":63106,"circle":61713,"backward-fast":61513,"fast-backward":61513,"recycle":61880,"user-astronaut":62715,"plane-slash":57449,"trademark":62044,"basketball":62516,"basketball-ball":62516,"satellite-dish":63424,"circle-up":62299,"arrow-alt-circle-up":62299,"mobile-screen-button":62413,"mobile-alt":62413,"volume-high":61480,"volume-up":61480,"users-rays":58771,"wallet":62805,"clipboard-check":62572,"file-audio":61895,"burger":63493,"hamburger":63493,"wrench":61613,"bugs":58576,"rupee-sign":61782,"rupee":61782,"file-image":61893,"circle-question":61529,"question-circle":61529,"plane-departure":62896,"handshake-slash":57440,"book-bookmark":57531,"code-branch":61734,"hat-cowboy":63680,"bridge":58568,"phone-flip":63609,"phone-alt":63609,"truck-front":58039,"cat":63166,"anchor-circle-exclamation":58539,"truck-field":58765,"route":62679,"clipboard-question":58595,"panorama":57865,"comment-medical":63477,"teeth-open":63023,"file-circle-minus":58605,"tags":61484,"wine-glass":62691,"forward-fast":61520,"fast-forward":61520,"face-meh-blank":62884,"meh-blank":62884,"square-parking":62784,"parking":62784,"house-signal":57362,"bars-progress":63528,"tasks-alt":63528,"faucet-drip":57350,"cart-flatbed":62580,"dolly-flatbed":62580,"ban-smoking":62797,"smoking-ban":62797,"terminal":61728,"mobile-button":61707,"house-medical-flag":58644,"basket-shopping":62097,"shopping-basket":62097,"tape":62683,"bus-simple":62814,"bus-alt":62814,"eye":61550,"face-sad-cry":62899,"sad-cry":62899,"audio-description":62110,"person-military-to-person":58700,"file-shield":58608,"user-slash":62726,"pen":62212,"tower-observation":58758,"file-code":61897,"signal":61458,"signal-5":61458,"signal-perfect":61458,"bus":61959,"heart-circle-xmark":58625,"house-chimney":58287,"home-lg":58287,"window-maximize":62160,"face-frown":61721,"frown":61721,"prescription":62897,"shop":62799,"store-alt":62799,"floppy-disk":61639,"save":61639,"vihara":63143,"scale-unbalanced":62741,"balance-scale-left":62741,"sort-up":61662,"sort-asc":61662,"comment-dots":62637,"commenting":62637,"plant-wilt":58794,"diamond":61977,"face-grin-squint":62853,"grin-squint":62853,"hand-holding-dollar":62656,"hand-holding-usd":62656,"bacterium":57434,"hand-pointer":62042,"drum-steelpan":62826,"hand-scissors":62039,"hands-praying":63108,"praying-hands":63108,"arrow-rotate-right":61470,"arrow-right-rotate":61470,"arrow-rotate-forward":61470,"redo":61470,"biohazard":63360,"location-crosshairs":62977,"location":62977,"mars-double":61991,"child-dress":58780,"users-between-lines":58769,"lungs-virus":57447,"face-grin-tears":62856,"grin-tears":62856,"phone":61589,"calendar-xmark":62067,"calendar-times":62067,"child-reaching":58781,"head-side-virus":57444,"user-gear":62718,"user-cog":62718,"arrow-up-1-9":61795,"sort-numeric-up":61795,"door-closed":62762,"shield-virus":57452,"dice-six":62758,"mosquito-net":58668,"bridge-water":58574,"person-booth":63318,"text-width":61493,"hat-wizard":63208,"pen-fancy":62892,"person-digging":63582,"digging":63582,"trash":61944,"gauge-simple":63017,"gauge-simple-med":63017,"tachometer-average":63017,"book-medical":63462,"poo":62206,"quote-right":61710,"quote-right-alt":61710,"shirt":62803,"t-shirt":62803,"tshirt":62803,"cubes":61875,"divide":62761,"tenge-sign":63447,"tenge":63447,"headphones":61477,"hands-holding":62658,"hands-clapping":57768,"republican":63326,"arrow-left":61536,"person-circle-xmark":58691,"ruler":62789,"align-left":61494,"dice-d6":63185,"restroom":63421,"j":74,"users-viewfinder":58773,"file-video":61896,"up-right-from-square":62301,"external-link-alt":62301,"table-cells":61450,"th":61450,"file-pdf":61889,"book-bible":63047,"bible":63047,"o":79,"suitcase-medical":61690,"medkit":61690,"user-secret":61979,"otter":63232,"person-dress":61826,"female":61826,"comment-dollar":63057,"business-time":63050,"briefcase-clock":63050,"table-cells-large":61449,"th-large":61449,"book-tanakh":63527,"tanakh":63527,"phone-volume":62112,"volume-control-phone":62112,"hat-cowboy-side":63681,"clipboard-user":63475,"child":61870,"lira-sign":61845,"satellite":63423,"plane-lock":58712,"tag":61483,"comment":61557,"cake-candles":61949,"birthday-cake":61949,"cake":61949,"envelope":61664,"angles-up":61698,"angle-double-up":61698,"paperclip":61638,"arrow-right-to-city":58547,"ribbon":62678,"lungs":62980,"arrow-up-9-1":63623,"sort-numeric-up-alt":63623,"litecoin-sign":57811,"border-none":63568,"circle-nodes":58594,"parachute-box":62669,"indent":61500,"truck-field-un":58766,"hourglass":62036,"hourglass-empty":62036,"mountain":63228,"user-doctor":61680,"user-md":61680,"circle-info":61530,"info-circle":61530,"cloud-meatball":63291,"camera":61488,"camera-alt":61488,"square-virus":58744,"meteor":63315,"car-on":58589,"sleigh":63436,"arrow-down-1-9":61794,"sort-numeric-asc":61794,"sort-numeric-down":61794,"hand-holding-droplet":62657,"hand-holding-water":62657,"water":63347,"calendar-check":62068,"braille":62113,"prescription-bottle-medical":62598,"prescription-bottle-alt":62598,"landmark":63087,"truck":61649,"crosshairs":61531,"person-cane":58684,"tent":58749,"vest-patches":57478,"check-double":62816,"arrow-down-a-z":61789,"sort-alpha-asc":61789,"sort-alpha-down":61789,"money-bill-wheat":58666,"cookie":62819,"arrow-rotate-left":61666,"arrow-left-rotate":61666,"arrow-rotate-back":61666,"arrow-rotate-backward":61666,"undo":61666,"hard-drive":61600,"hdd":61600,"face-grin-squint-tears":62854,"grin-squint-tears":62854,"dumbbell":62539,"rectangle-list":61474,"list-alt":61474,"tarp-droplet":58748,"house-medical-circle-check":58641,"person-skiing-nordic":63434,"skiing-nordic":63434,"calendar-plus":62065,"plane-arrival":62895,"circle-left":62297,"arrow-alt-circle-left":62297,"train-subway":62009,"subway":62009,"chart-gantt":57572,"indian-rupee-sign":57788,"indian-rupee":57788,"inr":57788,"crop-simple":62821,"crop-alt":62821,"money-bill-1":62417,"money-bill-alt":62417,"left-long":62218,"long-arrow-alt-left":62218,"dna":62577,"virus-slash":57461,"minus":61544,"subtract":61544,"chess":62521,"arrow-left-long":61815,"long-arrow-left":61815,"plug-circle-check":58716,"street-view":61981,"franc-sign":57743,"volume-off":61478,"hands-asl-interpreting":62115,"american-sign-language-interpreting":62115,"asl-interpreting":62115,"hands-american-sign-language-interpreting":62115,"gear":61459,"cog":61459,"droplet-slash":62919,"tint-slash":62919,"mosque":63096,"mosquito":58667,"star-of-david":63130,"person-military-rifle":58699,"cart-shopping":61562,"shopping-cart":61562,"vials":62611,"plug-circle-plus":58719,"place-of-worship":63103,"grip-vertical":62862,"arrow-turn-up":61768,"level-up":61768,"u":85,"square-root-variable":63128,"square-root-alt":63128,"clock":61463,"clock-four":61463,"backward-step":61512,"step-backward":61512,"pallet":62594,"faucet":57349,"baseball-bat-ball":62514,"s":83,"timeline":58012,"keyboard":61724,"caret-down":61655,"house-chimney-medical":63474,"clinic-medical":63474,"temperature-three-quarters":62152,"temperature-3":62152,"thermometer-3":62152,"thermometer-three-quarters":62152,"mobile-screen":62415,"mobile-android-alt":62415,"plane-up":57901,"piggy-bank":62675,"battery-half":62018,"battery-3":62018,"mountain-city":58670,"coins":62750,"khanda":63085,"sliders":61918,"sliders-h":61918,"folder-tree":63490,"network-wired":63231,"map-pin":62070,"hamsa":63077,"cent-sign":58357,"flask":61635,"person-pregnant":58142,"wand-sparkles":63275,"ellipsis-vertical":61762,"ellipsis-v":61762,"ticket":61765,"power-off":61457,"right-long":62219,"long-arrow-alt-right":62219,"flag-usa":63309,"laptop-file":58653,"tty":61924,"teletype":61924,"diagram-next":58486,"person-rifle":58702,"house-medical-circle-exclamation":58642,"closed-captioning":61962,"person-hiking":63212,"hiking":63212,"venus-double":61990,"images":62210,"calculator":61932,"people-pulling":58677,"n":78,"cable-car":63450,"tram":63450,"cloud-rain":63293,"building-circle-xmark":58580,"ship":61978,"arrows-down-to-line":58552,"download":61465,"face-grin":62848,"grin":62848,"delete-left":62810,"backspace":62810,"eye-dropper":61947,"eye-dropper-empty":61947,"eyedropper":61947,"file-circle-check":58784,"forward":61518,"mobile":62414,"mobile-android":62414,"mobile-phone":62414,"face-meh":61722,"meh":61722,"align-center":61495,"book-skull":63159,"book-dead":63159,"id-card":62146,"drivers-license":62146,"outdent":61499,"dedent":61499,"heart-circle-exclamation":58622,"house":61461,"home":61461,"home-alt":61461,"home-lg-alt":61461,"calendar-week":63364,"laptop-medical":63506,"b":66,"file-medical":62583,"dice-one":62757,"kiwi-bird":62773,"arrow-right-arrow-left":61676,"exchange":61676,"rotate-right":62201,"redo-alt":62201,"rotate-forward":62201,"utensils":62183,"cutlery":62183,"arrow-up-wide-short":61793,"sort-amount-up":61793,"mill-sign":57837,"bowl-rice":58091,"skull":62796,"tower-broadcast":62745,"broadcast-tower":62745,"truck-pickup":63036,"up-long":62220,"long-arrow-alt-up":62220,"stop":61517,"code-merge":62343,"upload":61587,"hurricane":63313,"mound":58669,"toilet-portable":58755,"compact-disc":62751,"file-arrow-down":62829,"file-download":62829,"caravan":63743,"shield-cat":58738,"bolt":61671,"zap":61671,"glass-water":58612,"oil-well":58674,"vault":58053,"mars":61986,"toilet":63448,"plane-circle-xmark":58711,"yen-sign":61783,"cny":61783,"jpy":61783,"rmb":61783,"yen":61783,"ruble-sign":61784,"rouble":61784,"rub":61784,"ruble":61784,"sun":61829,"guitar":63398,"face-laugh-wink":62876,"laugh-wink":62876,"horse-head":63403,"bore-hole":58563,"industry":62069,"circle-down":62296,"arrow-alt-circle-down":62296,"arrows-turn-to-dots":58561,"florin-sign":57732,"arrow-down-short-wide":63620,"sort-amount-desc":63620,"sort-amount-down-alt":63620,"less-than":60,"angle-down":61703,"car-tunnel":58590,"head-side-cough":57441,"grip-lines":63396,"thumbs-down":61797,"user-lock":62722,"arrow-right-long":61816,"long-arrow-right":61816,"anchor-circle-xmark":58540,"ellipsis":61761,"ellipsis-h":61761,"chess-pawn":62531,"kit-medical":62585,"first-aid":62585,"person-through-window":58793,"toolbox":62802,"hands-holding-circle":58619,"bug":61832,"credit-card":61597,"credit-card-alt":61597,"car":61881,"automobile":61881,"hand-holding-hand":58615,"book-open-reader":62938,"book-reader":62938,"mountain-sun":58671,"arrows-left-right-to-line":58554,"dice-d20":63183,"truck-droplet":58764,"file-circle-xmark":58785,"temperature-arrow-up":57408,"temperature-up":57408,"medal":62882,"bed":62006,"square-h":61693,"h-square":61693,"podcast":62158,"temperature-full":62151,"temperature-4":62151,"thermometer-4":62151,"thermometer-full":62151,"bell":61683,"superscript":61739,"plug-circle-xmark":58720,"star-of-life":63009,"phone-slash":62429,"paint-roller":62890,"handshake-angle":62660,"hands-helping":62660,"location-dot":62405,"map-marker-alt":62405,"file":61787,"greater-than":62,"person-swimming":62916,"swimmer":62916,"arrow-down":61539,"droplet":61507,"tint":61507,"eraser":61741,"earth-americas":62845,"earth":62845,"earth-america":62845,"globe-americas":62845,"person-burst":58683,"dove":62650,"battery-empty":62020,"battery-0":62020,"socks":63126,"inbox":61468,"section":58439,"gauge-high":63013,"tachometer-alt":63013,"tachometer-alt-fast":63013,"envelope-open-text":63064,"hospital":61688,"hospital-alt":61688,"hospital-wide":61688,"wine-bottle":63279,"chess-rook":62535,"bars-staggered":62800,"reorder":62800,"stream":62800,"dharmachakra":63061,"hotdog":63503,"person-walking-with-cane":62109,"blind":62109,"drum":62825,"ice-cream":63504,"heart-circle-bolt":58620,"fax":61868,"paragraph":61917,"check-to-slot":63346,"vote-yea":63346,"star-half":61577,"boxes-stacked":62568,"boxes":62568,"boxes-alt":62568,"link":61633,"chain":61633,"ear-listen":62114,"assistive-listening-systems":62114,"tree-city":58759,"play":61515,"font":61489,"table-cells-row-lock":59002,"rupiah-sign":57917,"magnifying-glass":61442,"search":61442,"table-tennis-paddle-ball":62557,"ping-pong-paddle-ball":62557,"table-tennis":62557,"person-dots-from-line":62576,"diagnoses":62576,"trash-can-arrow-up":63530,"trash-restore-alt":63530,"naira-sign":57846,"cart-arrow-down":61976,"walkie-talkie":63727,"file-pen":62236,"file-edit":62236,"receipt":62787,"square-pen":61771,"pen-square":61771,"pencil-square":61771,"suitcase-rolling":62913,"person-circle-exclamation":58687,"chevron-down":61560,"battery-full":62016,"battery":62016,"battery-5":62016,"skull-crossbones":63252,"code-compare":57658,"list-ul":61642,"list-dots":61642,"school-lock":58735,"tower-cell":58757,"down-long":62217,"long-arrow-alt-down":62217,"ranking-star":58721,"chess-king":62527,"person-harassing":58697,"brazilian-real-sign":58476,"landmark-dome":63314,"landmark-alt":63314,"arrow-up":61538,"tv":62060,"television":62060,"tv-alt":62060,"shrimp":58440,"list-check":61614,"tasks":61614,"jug-detergent":58649,"circle-user":62141,"user-circle":62141,"user-shield":62725,"wind":63278,"car-burst":62945,"car-crash":62945,"y":89,"person-snowboarding":63438,"snowboarding":63438,"truck-fast":62603,"shipping-fast":62603,"fish":62840,"user-graduate":62721,"circle-half-stroke":61506,"adjust":61506,"clapperboard":57649,"circle-radiation":63418,"radiation-alt":63418,"baseball":62515,"baseball-ball":62515,"jet-fighter-up":58648,"diagram-project":62786,"project-diagram":62786,"copy":61637,"volume-xmark":63145,"volume-mute":63145,"volume-times":63145,"hand-sparkles":57437,"grip":62861,"grip-horizontal":62861,"share-from-square":61773,"share-square":61773,"child-combatant":58592,"child-rifle":58592,"gun":57755,"square-phone":61592,"phone-square":61592,"plus":43,"add":43,"expand":61541,"computer":58597,"xmark":61453,"close":61453,"multiply":61453,"remove":61453,"times":61453,"arrows-up-down-left-right":61511,"arrows":61511,"chalkboard-user":62748,"chalkboard-teacher":62748,"peso-sign":57890,"building-shield":58584,"baby":63356,"users-line":58770,"quote-left":61709,"quote-left-alt":61709,"tractor":63266,"trash-arrow-up":63529,"trash-restore":63529,"arrow-down-up-lock":58544,"lines-leaning":58654,"ruler-combined":62790,"copyright":61945,"equals":61,"blender":62743,"teeth":63022,"shekel-sign":61963,"ils":61963,"shekel":61963,"sheqel":61963,"sheqel-sign":61963,"map":62073,"rocket":61749,"photo-film":63612,"photo-video":63612,"folder-minus":63069,"store":62798,"arrow-trend-up":57496,"plug-circle-minus":58718,"sign-hanging":62681,"sign":62681,"bezier-curve":62811,"bell-slash":61942,"tablet":62459,"tablet-android":62459,"school-flag":58734,"fill":62837,"angle-up":61702,"drumstick-bite":63191,"holly-berry":63402,"chevron-left":61523,"bacteria":57433,"hand-lizard":62040,"notdef":57854,"disease":63482,"briefcase-medical":62569,"genderless":61997,"chevron-right":61524,"retweet":61561,"car-rear":62942,"car-alt":62942,"pump-soap":57451,"video-slash":62690,"battery-quarter":62019,"battery-2":62019,"radio":63703,"baby-carriage":63357,"carriage-baby":63357,"traffic-light":63031,"thermometer":62609,"vr-cardboard":63273,"hand-middle-finger":63494,"percent":37,"percentage":37,"truck-moving":62687,"glass-water-droplet":58613,"display":57699,"face-smile":61720,"smile":61720,"thumbtack":61581,"thumb-tack":61581,"trophy":61585,"person-praying":63107,"pray":63107,"hammer":63203,"hand-peace":62043,"rotate":62193,"sync-alt":62193,"spinner":61712,"robot":62788,"peace":63100,"gears":61573,"cogs":61573,"warehouse":62612,"arrow-up-right-dots":58551,"splotch":62908,"face-grin-hearts":62852,"grin-hearts":62852,"dice-four":62756,"sim-card":63428,"transgender":61989,"transgender-alt":61989,"mercury":61987,"arrow-turn-down":61769,"level-down":61769,"person-falling-burst":58695,"award":62809,"ticket-simple":62463,"ticket-alt":62463,"building":61869,"angles-left":61696,"angle-double-left":61696,"qrcode":61481,"clock-rotate-left":61914,"history":61914,"face-grin-beam-sweat":62851,"grin-beam-sweat":62851,"file-export":62830,"arrow-right-from-file":62830,"shield":61746,"shield-blank":61746,"arrow-up-short-wide":63621,"sort-amount-up-alt":63621,"house-medical":58290,"golf-ball-tee":62544,"golf-ball":62544,"circle-chevron-left":61751,"chevron-circle-left":61751,"house-chimney-window":57357,"pen-nib":62893,"tent-arrow-turn-left":58752,"tents":58754,"wand-magic":61648,"magic":61648,"dog":63187,"carrot":63367,"moon":61830,"wine-glass-empty":62926,"wine-glass-alt":62926,"cheese":63471,"yin-yang":63149,"music":61441,"code-commit":62342,"temperature-low":63339,"person-biking":63562,"biking":63562,"broom":62746,"shield-heart":58740,"gopuram":63076,"earth-oceania":58491,"globe-oceania":58491,"square-xmark":62163,"times-square":62163,"xmark-square":62163,"hashtag":35,"up-right-and-down-left-from-center":62500,"expand-alt":62500,"oil-can":62995,"t":84,"hippo":63213,"chart-column":57571,"infinity":62772,"vial-circle-check":58774,"person-arrow-down-to-line":58680,"voicemail":63639,"fan":63587,"person-walking-luggage":58708,"up-down":62264,"arrows-alt-v":62264,"cloud-moon-rain":63292,"calendar":61747,"trailer":57409,"bahai":63078,"haykal":63078,"sd-card":63426,"dragon":63189,"shoe-prints":62795,"circle-plus":61525,"plus-circle":61525,"face-grin-tongue-wink":62859,"grin-tongue-wink":62859,"hand-holding":62653,"plug-circle-exclamation":58717,"link-slash":61735,"chain-broken":61735,"chain-slash":61735,"unlink":61735,"clone":62029,"person-walking-arrow-loop-left":58705,"arrow-up-z-a":63618,"sort-alpha-up-alt":63618,"fire-flame-curved":63460,"fire-alt":63460,"tornado":63343,"file-circle-plus":58516,"book-quran":63111,"quran":63111,"anchor":61757,"border-all":63564,"face-angry":62806,"angry":62806,"cookie-bite":62820,"arrow-trend-down":57495,"rss":61598,"feed":61598,"draw-polygon":62958,"scale-balanced":62030,"balance-scale":62030,"gauge-simple-high":63018,"tachometer":63018,"tachometer-fast":63018,"shower":62156,"desktop":62352,"desktop-alt":62352,"m":77,"table-list":61451,"th-list":61451,"comment-sms":63437,"sms":63437,"book":61485,"user-plus":62004,"check":61452,"battery-three-quarters":62017,"battery-4":62017,"house-circle-check":58633,"angle-left":61700,"diagram-successor":58490,"truck-arrow-right":58763,"arrows-split-up-and-left":58556,"hand-fist":63198,"fist-raised":63198,"cloud-moon":63171,"briefcase":61617,"person-falling":58694,"image-portrait":62432,"portrait":62432,"user-tag":62727,"rug":58729,"earth-europe":63394,"globe-europe":63394,"cart-flatbed-suitcase":62877,"luggage-cart":62877,"rectangle-xmark":62480,"rectangle-times":62480,"times-rectangle":62480,"window-close":62480,"baht-sign":57516,"book-open":62744,"book-journal-whills":63082,"journal-whills":63082,"handcuffs":58616,"triangle-exclamation":61553,"exclamation-triangle":61553,"warning":61553,"database":61888,"share":61540,"mail-forward":61540,"bottle-droplet":58564,"mask-face":57815,"hill-rockslide":58632,"right-left":62306,"exchange-alt":62306,"paper-plane":61912,"road-circle-exclamation":58725,"dungeon":63193,"align-right":61496,"money-bill-1-wave":62779,"money-bill-wave-alt":62779,"life-ring":61901,"hands":62119,"sign-language":62119,"signing":62119,"calendar-day":63363,"water-ladder":62917,"ladder-water":62917,"swimming-pool":62917,"arrows-up-down":61565,"arrows-v":61565,"face-grimace":62847,"grimace":62847,"wheelchair-move":58062,"wheelchair-alt":58062,"turn-down":62398,"level-down-alt":62398,"person-walking-arrow-right":58706,"square-envelope":61849,"envelope-square":61849,"dice":62754,"bowling-ball":62518,"brain":62940,"bandage":62562,"band-aid":62562,"calendar-minus":62066,"circle-xmark":61527,"times-circle":61527,"xmark-circle":61527,"gifts":63388,"hotel":62868,"earth-asia":62846,"globe-asia":62846,"id-card-clip":62591,"id-card-alt":62591,"magnifying-glass-plus":61454,"search-plus":61454,"thumbs-up":61796,"user-clock":62717,"hand-dots":62561,"allergies":62561,"file-invoice":62832,"window-minimize":62161,"mug-saucer":61684,"coffee":61684,"brush":62813,"mask":63226,"magnifying-glass-minus":61456,"search-minus":61456,"ruler-vertical":62792,"user-large":62470,"user-alt":62470,"train-tram":58804,"user-nurse":63535,"syringe":62606,"cloud-sun":63172,"stopwatch-20":57455,"square-full":62556,"magnet":61558,"jar":58646,"note-sticky":62025,"sticky-note":62025,"bug-slash":58512,"arrow-up-from-water-pump":58550,"bone":62935,"table-cells-row-unlock":59025,"user-injured":63272,"face-sad-tear":62900,"sad-tear":62900,"plane":61554,"tent-arrows-down":58753,"exclamation":33,"arrows-spin":58555,"print":61487,"turkish-lira-sign":58043,"try":58043,"turkish-lira":58043,"dollar-sign":36,"dollar":36,"usd":36,"x":88,"magnifying-glass-dollar":63112,"search-dollar":63112,"users-gear":62729,"users-cog":62729,"person-military-pointing":58698,"building-columns":61852,"bank":61852,"institution":61852,"museum":61852,"university":61852,"umbrella":61673,"trowel":58761,"d":68,"stapler":58799,"masks-theater":63024,"theater-masks":63024,"kip-sign":57796,"hand-point-left":61605,"handshake-simple":62662,"handshake-alt":62662,"jet-fighter":61691,"fighter-jet":61691,"square-share-nodes":61921,"share-alt-square":61921,"barcode":61482,"plus-minus":58428,"video":61501,"video-camera":61501,"graduation-cap":61853,"mortar-board":61853,"hand-holding-medical":57436,"person-circle-check":58686,"turn-up":62399,"level-up-alt":62399,"monero":62416,"hooli":62503,"yelp":61929,"cc-visa":61936,"lastfm":61954,"shopware":62901,"creative-commons-nc":62696,"aws":62325,"redhat":63420,"yoast":62129,"cloudflare":57469,"ups":63456,"pixiv":58944,"wpexplorer":62174,"dyalog":62361,"bity":62330,"stackpath":63554,"buysellads":61965,"first-order":62128,"modx":62085,"guilded":57470,"vnv":62475,"square-js":62393,"js-square":62393,"microsoft":62410,"qq":61910,"orcid":63698,"java":62692,"invision":63408,"creative-commons-pd-alt":62701,"centercode":62336,"glide-g":62118,"drupal":61865,"jxl":59003,"dart-lang":59027,"hire-a-helper":62384,"creative-commons-by":62695,"unity":57417,"whmcs":62477,"rocketchat":62440,"vk":61833,"untappd":62469,"mailchimp":62878,"css3-alt":62347,"square-reddit":61858,"reddit-square":61858,"vimeo-v":62077,"contao":62061,"square-font-awesome":58797,"deskpro":62351,"brave":58940,"sistrix":62446,"square-instagram":57429,"instagram-square":57429,"battle-net":63541,"the-red-yeti":63133,"square-hacker-news":62383,"hacker-news-square":62383,"edge":62082,"threads":58904,"napster":62418,"square-snapchat":62125,"snapchat-square":62125,"google-plus-g":61653,"artstation":63354,"markdown":62991,"sourcetree":63443,"google-plus":62131,"diaspora":63377,"foursquare":61824,"stack-overflow":61804,"github-alt":61715,"phoenix-squadron":62737,"pagelines":61836,"algolia":62316,"red-river":62435,"creative-commons-sa":62703,"safari":62055,"google":61856,"square-font-awesome-stroke":62300,"font-awesome-alt":62300,"atlassian":63355,"linkedin-in":61665,"digital-ocean":62353,"nimblr":62888,"chromecast":63544,"evernote":63545,"hacker-news":61908,"creative-commons-sampling":62704,"adversal":62314,"creative-commons":62046,"watchman-monitoring":57479,"fonticons":62080,"weixin":61911,"shirtsinbulk":61972,"codepen":61899,"git-alt":63553,"lyft":62403,"rev":62898,"windows":61818,"wizards-of-the-coast":63280,"square-viadeo":62122,"viadeo-square":62122,"meetup":62176,"centos":63369,"adn":61808,"cloudsmith":62340,"opensuse":58923,"pied-piper-alt":61864,"square-dribbble":62359,"dribbble-square":62359,"codiepie":62084,"node":62489,"mix":62411,"steam":61878,"cc-apple-pay":62486,"scribd":62090,"debian":58891,"openid":61851,"instalod":57473,"expeditedssl":62014,"sellcast":62170,"square-twitter":61569,"twitter-square":61569,"r-project":62711,"delicious":61861,"freebsd":62372,"vuejs":62495,"accusoft":62313,"ioxhost":61960,"fonticons-fi":62370,"app-store":62319,"cc-mastercard":61937,"itunes-note":62389,"golang":58383,"kickstarter":62395,"square-kickstarter":62395,"grav":62166,"weibo":61834,"uncharted":57476,"firstdraft":62369,"square-youtube":62513,"youtube-square":62513,"wikipedia-w":62054,"wpressr":62436,"rendact":62436,"angellist":61961,"galactic-republic":62732,"nfc-directional":58672,"skype":61822,"joget":62391,"fedora":63384,"stripe-s":62506,"meta":58523,"laravel":62397,"hotjar":62385,"bluetooth-b":62100,"square-letterboxd":58926,"sticker-mule":62455,"creative-commons-zero":62707,"hips":62546,"behance":61876,"reddit":61857,"discord":62354,"chrome":62056,"app-store-ios":62320,"cc-discover":61938,"wpbeginner":62103,"confluence":63373,"shoelace":58892,"mdb":63690,"dochub":62356,"accessible-icon":62312,"ebay":62708,"amazon":62064,"unsplash":57468,"yarn":63459,"square-steam":61879,"steam-square":61879,"500px":62062,"square-vimeo":61844,"vimeo-square":61844,"asymmetrik":62322,"font-awesome":62132,"font-awesome-flag":62132,"font-awesome-logo-full":62132,"gratipay":61828,"apple":61817,"hive":57471,"gitkraken":62374,"keybase":62709,"apple-pay":62485,"padlet":58528,"amazon-pay":62508,"square-github":61586,"github-square":61586,"stumbleupon":61860,"fedex":63383,"phoenix-framework":62428,"shopify":57431,"neos":62994,"square-threads":58905,"hackerrank":62967,"researchgate":62712,"swift":63713,"angular":62496,"speakap":62451,"angrycreative":62318,"y-combinator":62011,"empire":61905,"envira":62105,"google-scholar":58939,"square-gitlab":58798,"gitlab-square":58798,"studiovinari":62456,"pied-piper":62126,"wordpress":61850,"product-hunt":62088,"firefox":62057,"linode":62136,"goodreads":62376,"square-odnoklassniki":62052,"odnoklassniki-square":62052,"jsfiddle":61900,"sith":62738,"themeisle":62130,"page4":62423,"hashnode":58521,"react":62491,"cc-paypal":61940,"squarespace":62910,"cc-stripe":61941,"creative-commons-share":62706,"bitcoin":62329,"keycdn":62394,"opera":62058,"itch-io":63546,"umbraco":63720,"galactic-senate":62733,"ubuntu":63455,"draft2digital":62358,"stripe":62505,"houzz":62076,"gg":62048,"dhl":63376,"square-pinterest":61651,"pinterest-square":61651,"xing":61800,"blackberry":62331,"creative-commons-pd":62700,"playstation":62431,"quinscape":62553,"less":62493,"blogger-b":62333,"opencart":62013,"vine":61898,"signal-messenger":58979,"paypal":61933,"gitlab":62102,"typo3":62507,"reddit-alien":62081,"yahoo":61854,"dailymotion":57426,"affiliatetheme":62315,"pied-piper-pp":61863,"bootstrap":63542,"odnoklassniki":62051,"nfc-symbol":58673,"mintbit":58927,"ethereum":62510,"speaker-deck":63548,"creative-commons-nc-eu":62697,"patreon":62425,"avianex":62324,"ello":62961,"gofore":62375,"bimobject":62328,"brave-reverse":58941,"facebook-f":62366,"square-google-plus":61652,"google-plus-square":61652,"web-awesome":59010,"mandalorian":62735,"first-order-alt":62730,"osi":62490,"google-wallet":61934,"d-and-d-beyond":63178,"periscope":62426,"fulcrum":62731,"cloudscale":62339,"forumbee":61969,"mizuni":62412,"schlix":62442,"square-xing":61801,"xing-square":61801,"bandcamp":62165,"wpforms":62104,"cloudversify":62341,"usps":63457,"megaport":62883,"magento":62404,"spotify":61884,"optin-monster":62012,"fly":62487,"aviato":62497,"itunes":62388,"cuttlefish":62348,"blogger":62332,"flickr":61806,"viber":62473,"soundcloud":61886,"digg":61862,"tencent-weibo":61909,"letterboxd":58925,"symfony":63549,"maxcdn":61750,"etsy":62167,"facebook-messenger":62367,"audible":62323,"think-peaks":63281,"bilibili":58329,"erlang":62365,"x-twitter":58907,"cotton-bureau":63646,"dashcube":61968,"42-group":57472,"innosoft":57472,"stack-exchange":61837,"elementor":62512,"square-pied-piper":57374,"pied-piper-square":57374,"creative-commons-nd":62699,"palfed":62424,"superpowers":62173,"resolving":62439,"xbox":62482,"square-web-awesome-stroke":59012,"searchengin":62443,"tiktok":57467,"square-facebook":61570,"facebook-square":61570,"renren":61835,"linux":61820,"glide":62117,"linkedin":61580,"hubspot":62386,"deploydog":62350,"twitch":61928,"flutter":59028,"ravelry":62169,"mixer":57430,"square-lastfm":61955,"lastfm-square":61955,"vimeo":62474,"mendeley":63411,"uniregistry":62468,"figma":63385,"creative-commons-remix":62702,"cc-amazon-pay":62509,"dropbox":61803,"instagram":61805,"cmplid":58208,"upwork":58945,"facebook":61594,"gripfire":62380,"jedi-order":62734,"uikit":62467,"fort-awesome-alt":62371,"phabricator":62427,"ussunnah":62471,"earlybirds":62362,"trade-federation":62739,"autoprefixer":62492,"whatsapp":62002,"square-upwork":59004,"slideshare":61927,"google-play":62379,"viadeo":62121,"line":62400,"google-drive":62378,"servicestack":62444,"simplybuilt":61973,"bitbucket":61809,"imdb":62168,"deezer":57463,"raspberry-pi":63419,"jira":63409,"docker":62357,"screenpal":58736,"bluetooth":62099,"gitter":62502,"d-and-d":62349,"microblog":57370,"cc-diners-club":62028,"gg-circle":62049,"pied-piper-hat":62693,"kickstarter-k":62396,"yandex":62483,"readme":62677,"html5":61755,"sellsy":61971,"square-web-awesome":59011,"sass":62494,"wirsindhandwerk":58064,"wsh":58064,"buromobelexperte":62335,"salesforce":63547,"octopus-deploy":57474,"medapps":62406,"ns8":62421,"pinterest-p":62001,"apper":62321,"fort-awesome":62086,"waze":63551,"bluesky":58993,"cc-jcb":62027,"snapchat":62123,"snapchat-ghost":62123,"fantasy-flight-games":63196,"rust":57466,"wix":62927,"square-behance":61877,"behance-square":61877,"supple":62457,"webflow":58972,"rebel":61904,"css3":61756,"staylinked":62453,"kaggle":62970,"space-awesome":58796,"deviantart":61885,"cpanel":62344,"goodreads-g":62377,"square-git":61906,"git-square":61906,"square-tumblr":61812,"tumblr-square":61812,"trello":61825,"creative-commons-nc-jp":62698,"get-pocket":62053,"perbyte":57475,"grunt":62381,"weebly":62924,"connectdevelop":61966,"leanpub":61970,"black-tie":62078,"themeco":62918,"python":62434,"android":61819,"bots":58176,"free-code-camp":62149,"hornbill":62866,"js":62392,"ideal":57363,"git":61907,"dev":63180,"sketch":63430,"yandex-international":62484,"cc-amex":61939,"uber":62466,"github":61595,"php":62551,"alipay":63042,"youtube":61799,"skyatlas":61974,"firefox-browser":57351,"replyd":62438,"suse":63446,"jenkins":62390,"twitter":61593,"rockrms":62441,"pinterest":61650,"buffer":63543,"npm":62420,"yammer":63552,"btc":61786,"dribbble":61821,"stumbleupon-circle":61859,"internet-explorer":62059,"stubber":58823,"telegram":62150,"telegram-plane":62150,"old-republic":62736,"odysee":58822,"square-whatsapp":62476,"whatsapp-square":62476,"node-js":62419,"edge-legacy":57464,"slack":61848,"slack-hash":61848,"medrt":62408,"usb":62087,"tumblr":61811,"vaadin":62472,"quora":62148,"square-x-twitter":58906,"reacteurope":63325,"medium":62010,"medium-m":62010,"amilia":62317,"mixcloud":62089,"flipboard":62541,"viacoin":62007,"critical-role":63177,"sitrox":58442,"discourse":62355,"joomla":61866,"mastodon":62710,"airbnb":63540,"wolf-pack-battalion":62740,"buy-n-large":63654,"gulp":62382,"creative-commons-sampling-plus":62705,"strava":62504,"ember":62499,"canadian-maple-leaf":63365,"teamspeak":62713,"pushed":62433,"wordpress-simple":62481,"nutritionix":62422,"wodu":57480,"google-pay":57465,"intercom":63407,"zhihu":63039,"korvue":62511,"pix":58426,"steam-symbol":62454}'),i=JSON.parse('{"brands":["42-group","500px","accessible-icon","accusoft","adn","adversal","affiliatetheme","airbnb","algolia","alipay","amazon-pay","amazon","amilia","android","angellist","angrycreative","angular","app-store-ios","app-store","apper","apple-pay","apple","artstation","asymmetrik","atlassian","audible","autoprefixer","avianex","aviato","aws","bandcamp","battle-net","behance","bilibili","bimobject","bitbucket","bitcoin","bity","black-tie","blackberry","blogger-b","blogger","bluesky","bluetooth-b","bluetooth","bootstrap","bots","brave-reverse","brave","btc","buffer","buromobelexperte","buy-n-large","buysellads","canadian-maple-leaf","cc-amazon-pay","cc-amex","cc-apple-pay","cc-diners-club","cc-discover","cc-jcb","cc-mastercard","cc-paypal","cc-stripe","cc-visa","centercode","centos","chrome","chromecast","cloudflare","cloudscale","cloudsmith","cloudversify","cmplid","codepen","codiepie","confluence","connectdevelop","contao","cotton-bureau","cpanel","creative-commons-by","creative-commons-nc-eu","creative-commons-nc-jp","creative-commons-nc","creative-commons-nd","creative-commons-pd-alt","creative-commons-pd","creative-commons-remix","creative-commons-sa","creative-commons-sampling-plus","creative-commons-sampling","creative-commons-share","creative-commons-zero","creative-commons","critical-role","css3-alt","css3","cuttlefish","d-and-d-beyond","d-and-d","dailymotion","dart-lang","dashcube","debian","deezer","delicious","deploydog","deskpro","dev","deviantart","dhl","diaspora","digg","digital-ocean","discord","discourse","dochub","docker","draft2digital","dribbble","dropbox","drupal","dyalog","earlybirds","ebay","edge-legacy","edge","elementor","ello","ember","empire","envira","erlang","ethereum","etsy","evernote","expeditedssl","facebook-f","facebook-messenger","facebook","fantasy-flight-games","fedex","fedora","figma","firefox-browser","firefox","first-order-alt","first-order","firstdraft","flickr","flipboard","flutter","fly","font-awesome","fonticons-fi","fonticons","fort-awesome-alt","fort-awesome","forumbee","foursquare","free-code-camp","freebsd","fulcrum","galactic-republic","galactic-senate","get-pocket","gg-circle","gg","git-alt","git","github-alt","github","gitkraken","gitlab","gitter","glide-g","glide","gofore","golang","goodreads-g","goodreads","google-drive","google-pay","google-play","google-plus-g","google-plus","google-scholar","google-wallet","google","gratipay","grav","gripfire","grunt","guilded","gulp","hacker-news","hackerrank","hashnode","hips","hire-a-helper","hive","hooli","hornbill","hotjar","houzz","html5","hubspot","ideal","imdb","instagram","instalod","intercom","internet-explorer","invision","ioxhost","itch-io","itunes-note","itunes","java","jedi-order","jenkins","jira","joget","joomla","js","jsfiddle","jxl","kaggle","keybase","keycdn","kickstarter-k","kickstarter","korvue","laravel","lastfm","leanpub","less","letterboxd","line","linkedin-in","linkedin","linode","linux","lyft","magento","mailchimp","mandalorian","markdown","mastodon","maxcdn","mdb","medapps","medium","medrt","meetup","megaport","mendeley","meta","microblog","microsoft","mintbit","mix","mixcloud","mixer","mizuni","modx","monero","napster","neos","nfc-directional","nfc-symbol","nimblr","node-js","node","npm","ns8","nutritionix","octopus-deploy","odnoklassniki","odysee","old-republic","opencart","openid","opensuse","opera","optin-monster","orcid","osi","padlet","page4","pagelines","palfed","patreon","paypal","perbyte","periscope","phabricator","phoenix-framework","phoenix-squadron","php","pied-piper-alt","pied-piper-hat","pied-piper-pp","pied-piper","pinterest-p","pinterest","pix","pixiv","playstation","product-hunt","pushed","python","qq","quinscape","quora","r-project","raspberry-pi","ravelry","react","reacteurope","readme","rebel","red-river","reddit-alien","reddit","redhat","renren","replyd","researchgate","resolving","rev","rocketchat","rockrms","rust","safari","salesforce","sass","schlix","screenpal","scribd","searchengin","sellcast","sellsy","servicestack","shirtsinbulk","shoelace","shopify","shopware","signal-messenger","simplybuilt","sistrix","sith","sitrox","sketch","skyatlas","skype","slack","slideshare","snapchat","soundcloud","sourcetree","space-awesome","speakap","speaker-deck","spotify","square-behance","square-dribbble","square-facebook","square-font-awesome-stroke","square-font-awesome","square-git","square-github","square-gitlab","square-google-plus","square-hacker-news","square-instagram","square-js","square-lastfm","square-letterboxd","square-odnoklassniki","square-pied-piper","square-pinterest","square-reddit","square-snapchat","square-steam","square-threads","square-tumblr","square-twitter","square-upwork","square-viadeo","square-vimeo","square-web-awesome-stroke","square-web-awesome","square-whatsapp","square-x-twitter","square-xing","square-youtube","squarespace","stack-exchange","stack-overflow","stackpath","staylinked","steam-symbol","steam","sticker-mule","strava","stripe-s","stripe","stubber","studiovinari","stumbleupon-circle","stumbleupon","superpowers","supple","suse","swift","symfony","teamspeak","telegram","tencent-weibo","the-red-yeti","themeco","themeisle","think-peaks","threads","tiktok","trade-federation","trello","tumblr","twitch","twitter","typo3","uber","ubuntu","uikit","umbraco","uncharted","uniregistry","unity","unsplash","untappd","ups","upwork","usb","usps","ussunnah","vaadin","viacoin","viadeo","viber","vimeo-v","vimeo","vine","vk","vnv","vuejs","watchman-monitoring","waze","web-awesome","webflow","weebly","weibo","weixin","whatsapp","whmcs","wikipedia-w","windows","wirsindhandwerk","wix","wizards-of-the-coast","wodu","wolf-pack-battalion","wordpress-simple","wordpress","wpbeginner","wpexplorer","wpforms","wpressr","x-twitter","xbox","xing","y-combinator","yahoo","yammer","yandex-international","yandex","yarn","yelp","yoast","youtube","zhihu"],"regular":["address-book","address-card","bell-slash","bell","bookmark","building","calendar-check","calendar-days","calendar-minus","calendar-plus","calendar-xmark","calendar","chart-bar","chess-bishop","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","circle-check","circle-dot","circle-down","circle-left","circle-pause","circle-play","circle-question","circle-right","circle-stop","circle-up","circle-user","circle-xmark","circle","clipboard","clock","clone","closed-captioning","comment-dots","comment","comments","compass","copy","copyright","credit-card","envelope-open","envelope","eye-slash","eye","face-angry","face-dizzy","face-flushed","face-frown-open","face-frown","face-grimace","face-grin-beam-sweat","face-grin-beam","face-grin-hearts","face-grin-squint-tears","face-grin-squint","face-grin-stars","face-grin-tears","face-grin-tongue-squint","face-grin-tongue-wink","face-grin-tongue","face-grin-wide","face-grin-wink","face-grin","face-kiss-beam","face-kiss-wink-heart","face-kiss","face-laugh-beam","face-laugh-squint","face-laugh-wink","face-laugh","face-meh-blank","face-meh","face-rolling-eyes","face-sad-cry","face-sad-tear","face-smile-beam","face-smile-wink","face-smile","face-surprise","face-tired","file-audio","file-code","file-excel","file-image","file-lines","file-pdf","file-powerpoint","file-video","file-word","file-zipper","file","flag","floppy-disk","folder-closed","folder-open","folder","font-awesome","futbol","gem","hand-back-fist","hand-lizard","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-scissors","hand-spock","hand","handshake","hard-drive","heart","hospital","hourglass-half","hourglass","id-badge","id-card","image","images","keyboard","lemon","life-ring","lightbulb","map","message","money-bill-1","moon","newspaper","note-sticky","object-group","object-ungroup","paper-plane","paste","pen-to-square","rectangle-list","rectangle-xmark","registered","share-from-square","snowflake","square-caret-down","square-caret-left","square-caret-right","square-caret-up","square-check","square-full","square-minus","square-plus","square","star-half-stroke","star-half","star","sun","thumbs-down","thumbs-up","trash-can","user","window-maximize","window-minimize","window-restore"],"solid":["0","1","2","3","4","5","6","7","8","9","a","address-book","address-card","align-center","align-justify","align-left","align-right","anchor-circle-check","anchor-circle-exclamation","anchor-circle-xmark","anchor-lock","anchor","angle-down","angle-left","angle-right","angle-up","angles-down","angles-left","angles-right","angles-up","ankh","apple-whole","archway","arrow-down-1-9","arrow-down-9-1","arrow-down-a-z","arrow-down-long","arrow-down-short-wide","arrow-down-up-across-line","arrow-down-up-lock","arrow-down-wide-short","arrow-down-z-a","arrow-down","arrow-left-long","arrow-left","arrow-pointer","arrow-right-arrow-left","arrow-right-from-bracket","arrow-right-long","arrow-right-to-bracket","arrow-right-to-city","arrow-right","arrow-rotate-left","arrow-rotate-right","arrow-trend-down","arrow-trend-up","arrow-turn-down","arrow-turn-up","arrow-up-1-9","arrow-up-9-1","arrow-up-a-z","arrow-up-from-bracket","arrow-up-from-ground-water","arrow-up-from-water-pump","arrow-up-long","arrow-up-right-dots","arrow-up-right-from-square","arrow-up-short-wide","arrow-up-wide-short","arrow-up-z-a","arrow-up","arrows-down-to-line","arrows-down-to-people","arrows-left-right-to-line","arrows-left-right","arrows-rotate","arrows-spin","arrows-split-up-and-left","arrows-to-circle","arrows-to-dot","arrows-to-eye","arrows-turn-right","arrows-turn-to-dots","arrows-up-down-left-right","arrows-up-down","arrows-up-to-line","asterisk","at","atom","audio-description","austral-sign","award","b","baby-carriage","baby","backward-fast","backward-step","backward","bacon","bacteria","bacterium","bag-shopping","bahai","baht-sign","ban-smoking","ban","bandage","bangladeshi-taka-sign","barcode","bars-progress","bars-staggered","bars","baseball-bat-ball","baseball","basket-shopping","basketball","bath","battery-empty","battery-full","battery-half","battery-quarter","battery-three-quarters","bed-pulse","bed","beer-mug-empty","bell-concierge","bell-slash","bell","bezier-curve","bicycle","binoculars","biohazard","bitcoin-sign","blender-phone","blender","blog","bold","bolt-lightning","bolt","bomb","bone","bong","book-atlas","book-bible","book-bookmark","book-journal-whills","book-medical","book-open-reader","book-open","book-quran","book-skull","book-tanakh","book","bookmark","border-all","border-none","border-top-left","bore-hole","bottle-droplet","bottle-water","bowl-food","bowl-rice","bowling-ball","box-archive","box-open","box-tissue","box","boxes-packing","boxes-stacked","braille","brain","brazilian-real-sign","bread-slice","bridge-circle-check","bridge-circle-exclamation","bridge-circle-xmark","bridge-lock","bridge-water","bridge","briefcase-medical","briefcase","broom-ball","broom","brush","bucket","bug-slash","bug","bugs","building-circle-arrow-right","building-circle-check","building-circle-exclamation","building-circle-xmark","building-columns","building-flag","building-lock","building-ngo","building-shield","building-un","building-user","building-wheat","building","bullhorn","bullseye","burger","burst","bus-simple","bus","business-time","c","cable-car","cake-candles","calculator","calendar-check","calendar-day","calendar-days","calendar-minus","calendar-plus","calendar-week","calendar-xmark","calendar","camera-retro","camera-rotate","camera","campground","candy-cane","cannabis","capsules","car-battery","car-burst","car-on","car-rear","car-side","car-tunnel","car","caravan","caret-down","caret-left","caret-right","caret-up","carrot","cart-arrow-down","cart-flatbed-suitcase","cart-flatbed","cart-plus","cart-shopping","cash-register","cat","cedi-sign","cent-sign","certificate","chair","chalkboard-user","chalkboard","champagne-glasses","charging-station","chart-area","chart-bar","chart-column","chart-gantt","chart-line","chart-pie","chart-simple","check-double","check-to-slot","check","cheese","chess-bishop","chess-board","chess-king","chess-knight","chess-pawn","chess-queen","chess-rook","chess","chevron-down","chevron-left","chevron-right","chevron-up","child-combatant","child-dress","child-reaching","child","children","church","circle-arrow-down","circle-arrow-left","circle-arrow-right","circle-arrow-up","circle-check","circle-chevron-down","circle-chevron-left","circle-chevron-right","circle-chevron-up","circle-dollar-to-slot","circle-dot","circle-down","circle-exclamation","circle-h","circle-half-stroke","circle-info","circle-left","circle-minus","circle-nodes","circle-notch","circle-pause","circle-play","circle-plus","circle-question","circle-radiation","circle-right","circle-stop","circle-up","circle-user","circle-xmark","circle","city","clapperboard","clipboard-check","clipboard-list","clipboard-question","clipboard-user","clipboard","clock-rotate-left","clock","clone","closed-captioning","cloud-arrow-down","cloud-arrow-up","cloud-bolt","cloud-meatball","cloud-moon-rain","cloud-moon","cloud-rain","cloud-showers-heavy","cloud-showers-water","cloud-sun-rain","cloud-sun","cloud","clover","code-branch","code-commit","code-compare","code-fork","code-merge","code-pull-request","code","coins","colon-sign","comment-dollar","comment-dots","comment-medical","comment-slash","comment-sms","comment","comments-dollar","comments","compact-disc","compass-drafting","compass","compress","computer-mouse","computer","cookie-bite","cookie","copy","copyright","couch","cow","credit-card","crop-simple","crop","cross","crosshairs","crow","crown","crutch","cruzeiro-sign","cube","cubes-stacked","cubes","d","database","delete-left","democrat","desktop","dharmachakra","diagram-next","diagram-predecessor","diagram-project","diagram-successor","diamond-turn-right","diamond","dice-d20","dice-d6","dice-five","dice-four","dice-one","dice-six","dice-three","dice-two","dice","disease","display","divide","dna","dog","dollar-sign","dolly","dong-sign","door-closed","door-open","dove","down-left-and-up-right-to-center","down-long","download","dragon","draw-polygon","droplet-slash","droplet","drum-steelpan","drum","drumstick-bite","dumbbell","dumpster-fire","dumpster","dungeon","e","ear-deaf","ear-listen","earth-africa","earth-americas","earth-asia","earth-europe","earth-oceania","egg","eject","elevator","ellipsis-vertical","ellipsis","envelope-circle-check","envelope-open-text","envelope-open","envelope","envelopes-bulk","equals","eraser","ethernet","euro-sign","exclamation","expand","explosion","eye-dropper","eye-low-vision","eye-slash","eye","f","face-angry","face-dizzy","face-flushed","face-frown-open","face-frown","face-grimace","face-grin-beam-sweat","face-grin-beam","face-grin-hearts","face-grin-squint-tears","face-grin-squint","face-grin-stars","face-grin-tears","face-grin-tongue-squint","face-grin-tongue-wink","face-grin-tongue","face-grin-wide","face-grin-wink","face-grin","face-kiss-beam","face-kiss-wink-heart","face-kiss","face-laugh-beam","face-laugh-squint","face-laugh-wink","face-laugh","face-meh-blank","face-meh","face-rolling-eyes","face-sad-cry","face-sad-tear","face-smile-beam","face-smile-wink","face-smile","face-surprise","face-tired","fan","faucet-drip","faucet","fax","feather-pointed","feather","ferry","file-arrow-down","file-arrow-up","file-audio","file-circle-check","file-circle-exclamation","file-circle-minus","file-circle-plus","file-circle-question","file-circle-xmark","file-code","file-contract","file-csv","file-excel","file-export","file-image","file-import","file-invoice-dollar","file-invoice","file-lines","file-medical","file-pdf","file-pen","file-powerpoint","file-prescription","file-shield","file-signature","file-video","file-waveform","file-word","file-zipper","file","fill-drip","fill","film","filter-circle-dollar","filter-circle-xmark","filter","fingerprint","fire-burner","fire-extinguisher","fire-flame-curved","fire-flame-simple","fire","fish-fins","fish","flag-checkered","flag-usa","flag","flask-vial","flask","floppy-disk","florin-sign","folder-closed","folder-minus","folder-open","folder-plus","folder-tree","folder","font-awesome","font","football","forward-fast","forward-step","forward","franc-sign","frog","futbol","g","gamepad","gas-pump","gauge-high","gauge-simple-high","gauge-simple","gauge","gavel","gear","gears","gem","genderless","ghost","gift","gifts","glass-water-droplet","glass-water","glasses","globe","golf-ball-tee","gopuram","graduation-cap","greater-than-equal","greater-than","grip-lines-vertical","grip-lines","grip-vertical","grip","group-arrows-rotate","guarani-sign","guitar","gun","h","hammer","hamsa","hand-back-fist","hand-dots","hand-fist","hand-holding-dollar","hand-holding-droplet","hand-holding-hand","hand-holding-heart","hand-holding-medical","hand-holding","hand-lizard","hand-middle-finger","hand-peace","hand-point-down","hand-point-left","hand-point-right","hand-point-up","hand-pointer","hand-scissors","hand-sparkles","hand-spock","hand","handcuffs","hands-asl-interpreting","hands-bound","hands-bubbles","hands-clapping","hands-holding-child","hands-holding-circle","hands-holding","hands-praying","hands","handshake-angle","handshake-simple-slash","handshake-simple","handshake-slash","handshake","hanukiah","hard-drive","hashtag","hat-cowboy-side","hat-cowboy","hat-wizard","head-side-cough-slash","head-side-cough","head-side-mask","head-side-virus","heading","headphones-simple","headphones","headset","heart-circle-bolt","heart-circle-check","heart-circle-exclamation","heart-circle-minus","heart-circle-plus","heart-circle-xmark","heart-crack","heart-pulse","heart","helicopter-symbol","helicopter","helmet-safety","helmet-un","highlighter","hill-avalanche","hill-rockslide","hippo","hockey-puck","holly-berry","horse-head","horse","hospital-user","hospital","hot-tub-person","hotdog","hotel","hourglass-end","hourglass-half","hourglass-start","hourglass","house-chimney-crack","house-chimney-medical","house-chimney-user","house-chimney-window","house-chimney","house-circle-check","house-circle-exclamation","house-circle-xmark","house-crack","house-fire","house-flag","house-flood-water-circle-arrow-right","house-flood-water","house-laptop","house-lock","house-medical-circle-check","house-medical-circle-exclamation","house-medical-circle-xmark","house-medical-flag","house-medical","house-signal","house-tsunami","house-user","house","hryvnia-sign","hurricane","i-cursor","i","ice-cream","icicles","icons","id-badge","id-card-clip","id-card","igloo","image-portrait","image","images","inbox","indent","indian-rupee-sign","industry","infinity","info","italic","j","jar-wheat","jar","jedi","jet-fighter-up","jet-fighter","joint","jug-detergent","k","kaaba","key","keyboard","khanda","kip-sign","kit-medical","kitchen-set","kiwi-bird","l","land-mine-on","landmark-dome","landmark-flag","landmark","language","laptop-code","laptop-file","laptop-medical","laptop","lari-sign","layer-group","leaf","left-long","left-right","lemon","less-than-equal","less-than","life-ring","lightbulb","lines-leaning","link-slash","link","lira-sign","list-check","list-ol","list-ul","list","litecoin-sign","location-arrow","location-crosshairs","location-dot","location-pin-lock","location-pin","lock-open","lock","locust","lungs-virus","lungs","m","magnet","magnifying-glass-arrow-right","magnifying-glass-chart","magnifying-glass-dollar","magnifying-glass-location","magnifying-glass-minus","magnifying-glass-plus","magnifying-glass","manat-sign","map-location-dot","map-location","map-pin","map","marker","mars-and-venus-burst","mars-and-venus","mars-double","mars-stroke-right","mars-stroke-up","mars-stroke","mars","martini-glass-citrus","martini-glass-empty","martini-glass","mask-face","mask-ventilator","mask","masks-theater","mattress-pillow","maximize","medal","memory","menorah","mercury","message","meteor","microchip","microphone-lines-slash","microphone-lines","microphone-slash","microphone","microscope","mill-sign","minimize","minus","mitten","mobile-button","mobile-retro","mobile-screen-button","mobile-screen","mobile","money-bill-1-wave","money-bill-1","money-bill-transfer","money-bill-trend-up","money-bill-wave","money-bill-wheat","money-bill","money-bills","money-check-dollar","money-check","monument","moon","mortar-pestle","mosque","mosquito-net","mosquito","motorcycle","mound","mountain-city","mountain-sun","mountain","mug-hot","mug-saucer","music","n","naira-sign","network-wired","neuter","newspaper","not-equal","notdef","note-sticky","notes-medical","o","object-group","object-ungroup","oil-can","oil-well","om","otter","outdent","p","pager","paint-roller","paintbrush","palette","pallet","panorama","paper-plane","paperclip","parachute-box","paragraph","passport","paste","pause","paw","peace","pen-clip","pen-fancy","pen-nib","pen-ruler","pen-to-square","pen","pencil","people-arrows","people-carry-box","people-group","people-line","people-pulling","people-robbery","people-roof","pepper-hot","percent","person-arrow-down-to-line","person-arrow-up-from-line","person-biking","person-booth","person-breastfeeding","person-burst","person-cane","person-chalkboard","person-circle-check","person-circle-exclamation","person-circle-minus","person-circle-plus","person-circle-question","person-circle-xmark","person-digging","person-dots-from-line","person-dress-burst","person-dress","person-drowning","person-falling-burst","person-falling","person-half-dress","person-harassing","person-hiking","person-military-pointing","person-military-rifle","person-military-to-person","person-praying","person-pregnant","person-rays","person-rifle","person-running","person-shelter","person-skating","person-skiing-nordic","person-skiing","person-snowboarding","person-swimming","person-through-window","person-walking-arrow-loop-left","person-walking-arrow-right","person-walking-dashed-line-arrow-right","person-walking-luggage","person-walking-with-cane","person-walking","person","peseta-sign","peso-sign","phone-flip","phone-slash","phone-volume","phone","photo-film","piggy-bank","pills","pizza-slice","place-of-worship","plane-arrival","plane-circle-check","plane-circle-exclamation","plane-circle-xmark","plane-departure","plane-lock","plane-slash","plane-up","plane","plant-wilt","plate-wheat","play","plug-circle-bolt","plug-circle-check","plug-circle-exclamation","plug-circle-minus","plug-circle-plus","plug-circle-xmark","plug","plus-minus","plus","podcast","poo-storm","poo","poop","power-off","prescription-bottle-medical","prescription-bottle","prescription","print","pump-medical","pump-soap","puzzle-piece","q","qrcode","question","quote-left","quote-right","r","radiation","radio","rainbow","ranking-star","receipt","record-vinyl","rectangle-ad","rectangle-list","rectangle-xmark","recycle","registered","repeat","reply-all","reply","republican","restroom","retweet","ribbon","right-from-bracket","right-left","right-long","right-to-bracket","ring","road-barrier","road-bridge","road-circle-check","road-circle-exclamation","road-circle-xmark","road-lock","road-spikes","road","robot","rocket","rotate-left","rotate-right","rotate","route","rss","ruble-sign","rug","ruler-combined","ruler-horizontal","ruler-vertical","ruler","rupee-sign","rupiah-sign","s","sack-dollar","sack-xmark","sailboat","satellite-dish","satellite","scale-balanced","scale-unbalanced-flip","scale-unbalanced","school-circle-check","school-circle-exclamation","school-circle-xmark","school-flag","school-lock","school","scissors","screwdriver-wrench","screwdriver","scroll-torah","scroll","sd-card","section","seedling","server","shapes","share-from-square","share-nodes","share","sheet-plastic","shekel-sign","shield-cat","shield-dog","shield-halved","shield-heart","shield-virus","shield","ship","shirt","shoe-prints","shop-lock","shop-slash","shop","shower","shrimp","shuffle","shuttle-space","sign-hanging","signal","signature","signs-post","sim-card","sink","sitemap","skull-crossbones","skull","slash","sleigh","sliders","smog","smoking","snowflake","snowman","snowplow","soap","socks","solar-panel","sort-down","sort-up","sort","spa","spaghetti-monster-flying","spell-check","spider","spinner","splotch","spoon","spray-can-sparkles","spray-can","square-arrow-up-right","square-caret-down","square-caret-left","square-caret-right","square-caret-up","square-check","square-envelope","square-full","square-h","square-minus","square-nfi","square-parking","square-pen","square-person-confined","square-phone-flip","square-phone","square-plus","square-poll-horizontal","square-poll-vertical","square-root-variable","square-rss","square-share-nodes","square-up-right","square-virus","square-xmark","square","staff-snake","stairs","stamp","stapler","star-and-crescent","star-half-stroke","star-half","star-of-david","star-of-life","star","sterling-sign","stethoscope","stop","stopwatch-20","stopwatch","store-slash","store","street-view","strikethrough","stroopwafel","subscript","suitcase-medical","suitcase-rolling","suitcase","sun-plant-wilt","sun","superscript","swatchbook","synagogue","syringe","t","table-cells-column-lock","table-cells-large","table-cells-row-lock","table-cells-row-unlock","table-cells","table-columns","table-list","table-tennis-paddle-ball","table","tablet-button","tablet-screen-button","tablet","tablets","tachograph-digital","tag","tags","tape","tarp-droplet","tarp","taxi","teeth-open","teeth","temperature-arrow-down","temperature-arrow-up","temperature-empty","temperature-full","temperature-half","temperature-high","temperature-low","temperature-quarter","temperature-three-quarters","tenge-sign","tent-arrow-down-to-line","tent-arrow-left-right","tent-arrow-turn-left","tent-arrows-down","tent","tents","terminal","text-height","text-slash","text-width","thermometer","thumbs-down","thumbs-up","thumbtack-slash","thumbtack","ticket-simple","ticket","timeline","toggle-off","toggle-on","toilet-paper-slash","toilet-paper","toilet-portable","toilet","toilets-portable","toolbox","tooth","torii-gate","tornado","tower-broadcast","tower-cell","tower-observation","tractor","trademark","traffic-light","trailer","train-subway","train-tram","train","transgender","trash-arrow-up","trash-can-arrow-up","trash-can","trash","tree-city","tree","triangle-exclamation","trophy","trowel-bricks","trowel","truck-arrow-right","truck-droplet","truck-fast","truck-field-un","truck-field","truck-front","truck-medical","truck-monster","truck-moving","truck-pickup","truck-plane","truck-ramp-box","truck","tty","turkish-lira-sign","turn-down","turn-up","tv","u","umbrella-beach","umbrella","underline","universal-access","unlock-keyhole","unlock","up-down-left-right","up-down","up-long","up-right-and-down-left-from-center","up-right-from-square","upload","user-astronaut","user-check","user-clock","user-doctor","user-gear","user-graduate","user-group","user-injured","user-large-slash","user-large","user-lock","user-minus","user-ninja","user-nurse","user-pen","user-plus","user-secret","user-shield","user-slash","user-tag","user-tie","user-xmark","user","users-between-lines","users-gear","users-line","users-rays","users-rectangle","users-slash","users-viewfinder","users","utensils","v","van-shuttle","vault","vector-square","venus-double","venus-mars","venus","vest-patches","vest","vial-circle-check","vial-virus","vial","vials","video-slash","video","vihara","virus-covid-slash","virus-covid","virus-slash","virus","viruses","voicemail","volcano","volleyball","volume-high","volume-low","volume-off","volume-xmark","vr-cardboard","w","walkie-talkie","wallet","wand-magic-sparkles","wand-magic","wand-sparkles","warehouse","water-ladder","water","wave-square","web-awesome","weight-hanging","weight-scale","wheat-awn-circle-exclamation","wheat-awn","wheelchair-move","wheelchair","whiskey-glass","wifi","wind","window-maximize","window-minimize","window-restore","wine-bottle","wine-glass-empty","wine-glass","won-sign","worm","wrench","x-ray","x","xmark","xmarks-lines","y","yen-sign","yin-yang","z"]}'),o={Regular:n(78801),Light:n(78801),Solid:n(7852),Brands:n(54353),Sharp_Regular:n(78801),Sharp_Light:n(78801),Sharp_Solid:n(7852),Duotone:n(7852),Thin:n(78801)},s={regular:"regular",light:"light",solid:"solid",brand:"brand",sharp:"sharp",sharpLight:"sharpLight",sharpSolid:"sharpSolid",duotone:"duotone",thin:"thin"},l=function(e,t={},n,a=!1){const i=Object.keys(t),o="FontAwesome6"+(a?"Pro":"Free");function s(t,r,a=o){let i=t;const s=n[i];return"Brands"===i&&(i="Regular"),"Duotone"===i&&(i="Solid"),i=i.replace("Sharp_",""),{fontFamily:`${a}-${i}`,fontFile:s,fontStyle:{},glyphMap:e}}const l=s("Brands",0,"FontAwesome6Brands"),u=s("Light"),c=s("Regular"),d=s("Solid"),h=s("Sharp_Light",0,"FontAwesome6Sharp"),f=s("Sharp_Regular",0,"FontAwesome6Sharp"),p=s("Sharp_Solid",0,"FontAwesome6Sharp"),m=s("Duotone",0,"FontAwesome6Duotone"),g=s("Thin");return(0,r.default)({brand:l,light:u,regular:c,solid:d,sharp:f,sharpLight:h,sharpSolid:p,duotone:m,thin:g},{defaultStyle:"regular",fallbackFamily:function(e){for(let n=0;n{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/Ionicons.9b6b1954a5eb6efeaf11.ttf",i=JSON.parse('{"accessibility":59905,"accessibility-outline":59906,"accessibility-sharp":59907,"add":59908,"add-circle":59909,"add-circle-outline":59910,"add-circle-sharp":59911,"add-outline":59912,"add-sharp":59913,"airplane":59914,"airplane-outline":59915,"airplane-sharp":59916,"alarm":59917,"alarm-outline":59918,"alarm-sharp":59919,"albums":59920,"albums-outline":59921,"albums-sharp":59922,"alert":59923,"alert-circle":59924,"alert-circle-outline":59925,"alert-circle-sharp":59926,"alert-outline":59927,"alert-sharp":59928,"american-football":59929,"american-football-outline":59930,"american-football-sharp":59931,"analytics":59932,"analytics-outline":59933,"analytics-sharp":59934,"aperture":59935,"aperture-outline":59936,"aperture-sharp":59937,"apps":59938,"apps-outline":59939,"apps-sharp":59940,"archive":59941,"archive-outline":59942,"archive-sharp":59943,"arrow-back":59944,"arrow-back-circle":59945,"arrow-back-circle-outline":59946,"arrow-back-circle-sharp":59947,"arrow-back-outline":59948,"arrow-back-sharp":59949,"arrow-down":59950,"arrow-down-circle":59951,"arrow-down-circle-outline":59952,"arrow-down-circle-sharp":59953,"arrow-down-outline":59954,"arrow-down-sharp":59955,"arrow-forward":59956,"arrow-forward-circle":59957,"arrow-forward-circle-outline":59958,"arrow-forward-circle-sharp":59959,"arrow-forward-outline":59960,"arrow-forward-sharp":59961,"arrow-redo":59962,"arrow-redo-circle":59963,"arrow-redo-circle-outline":59964,"arrow-redo-circle-sharp":59965,"arrow-redo-outline":59966,"arrow-redo-sharp":59967,"arrow-undo":59968,"arrow-undo-circle":59969,"arrow-undo-circle-outline":59970,"arrow-undo-circle-sharp":59971,"arrow-undo-outline":59972,"arrow-undo-sharp":59973,"arrow-up":59974,"arrow-up-circle":59975,"arrow-up-circle-outline":59976,"arrow-up-circle-sharp":59977,"arrow-up-outline":59978,"arrow-up-sharp":59979,"at":59980,"at-circle":59981,"at-circle-outline":59982,"at-circle-sharp":59983,"at-outline":59984,"at-sharp":59985,"attach":59986,"attach-outline":59987,"attach-sharp":59988,"backspace":59989,"backspace-outline":59990,"backspace-sharp":59991,"bag":59992,"bag-add":59993,"bag-add-outline":59994,"bag-add-sharp":59995,"bag-check":59996,"bag-check-outline":59997,"bag-check-sharp":59998,"bag-handle":59999,"bag-handle-outline":60000,"bag-handle-sharp":60001,"bag-outline":60002,"bag-remove":60003,"bag-remove-outline":60004,"bag-remove-sharp":60005,"bag-sharp":60006,"balloon":60007,"balloon-outline":60008,"balloon-sharp":60009,"ban":60010,"ban-outline":60011,"ban-sharp":60012,"bandage":60013,"bandage-outline":60014,"bandage-sharp":60015,"bar-chart":60016,"bar-chart-outline":60017,"bar-chart-sharp":60018,"barbell":60019,"barbell-outline":60020,"barbell-sharp":60021,"barcode":60022,"barcode-outline":60023,"barcode-sharp":60024,"baseball":60025,"baseball-outline":60026,"baseball-sharp":60027,"basket":60028,"basket-outline":60029,"basket-sharp":60030,"basketball":60031,"basketball-outline":60032,"basketball-sharp":60033,"battery-charging":60034,"battery-charging-outline":60035,"battery-charging-sharp":60036,"battery-dead":60037,"battery-dead-outline":60038,"battery-dead-sharp":60039,"battery-full":60040,"battery-full-outline":60041,"battery-full-sharp":60042,"battery-half":60043,"battery-half-outline":60044,"battery-half-sharp":60045,"beaker":60046,"beaker-outline":60047,"beaker-sharp":60048,"bed":60049,"bed-outline":60050,"bed-sharp":60051,"beer":60052,"beer-outline":60053,"beer-sharp":60054,"bicycle":60055,"bicycle-outline":60056,"bicycle-sharp":60057,"bluetooth":60058,"bluetooth-outline":60059,"bluetooth-sharp":60060,"boat":60061,"boat-outline":60062,"boat-sharp":60063,"body":60064,"body-outline":60065,"body-sharp":60066,"bonfire":60067,"bonfire-outline":60068,"bonfire-sharp":60069,"book":60070,"book-outline":60071,"book-sharp":60072,"bookmark":60073,"bookmark-outline":60074,"bookmark-sharp":60075,"bookmarks":60076,"bookmarks-outline":60077,"bookmarks-sharp":60078,"bowling-ball":60079,"bowling-ball-outline":60080,"bowling-ball-sharp":60081,"briefcase":60082,"briefcase-outline":60083,"briefcase-sharp":60084,"browsers":60085,"browsers-outline":60086,"browsers-sharp":60087,"brush":60088,"brush-outline":60089,"brush-sharp":60090,"bug":60091,"bug-outline":60092,"bug-sharp":60093,"build":60094,"build-outline":60095,"build-sharp":60096,"bulb":60097,"bulb-outline":60098,"bulb-sharp":60099,"bus":60100,"bus-outline":60101,"bus-sharp":60102,"business":60103,"business-outline":60104,"business-sharp":60105,"cafe":60106,"cafe-outline":60107,"cafe-sharp":60108,"calculator":60109,"calculator-outline":60110,"calculator-sharp":60111,"calendar":60112,"calendar-clear":60113,"calendar-clear-outline":60114,"calendar-clear-sharp":60115,"calendar-number":60116,"calendar-number-outline":60117,"calendar-number-sharp":60118,"calendar-outline":60119,"calendar-sharp":60120,"call":60121,"call-outline":60122,"call-sharp":60123,"camera":60124,"camera-outline":60125,"camera-reverse":60126,"camera-reverse-outline":60127,"camera-reverse-sharp":60128,"camera-sharp":60129,"car":60130,"car-outline":60131,"car-sharp":60132,"car-sport":60133,"car-sport-outline":60134,"car-sport-sharp":60135,"card":60136,"card-outline":60137,"card-sharp":60138,"caret-back":60139,"caret-back-circle":60140,"caret-back-circle-outline":60141,"caret-back-circle-sharp":60142,"caret-back-outline":60143,"caret-back-sharp":60144,"caret-down":60145,"caret-down-circle":60146,"caret-down-circle-outline":60147,"caret-down-circle-sharp":60148,"caret-down-outline":60149,"caret-down-sharp":60150,"caret-forward":60151,"caret-forward-circle":60152,"caret-forward-circle-outline":60153,"caret-forward-circle-sharp":60154,"caret-forward-outline":60155,"caret-forward-sharp":60156,"caret-up":60157,"caret-up-circle":60158,"caret-up-circle-outline":60159,"caret-up-circle-sharp":60160,"caret-up-outline":60161,"caret-up-sharp":60162,"cart":60163,"cart-outline":60164,"cart-sharp":60165,"cash":60166,"cash-outline":60167,"cash-sharp":60168,"cellular":60169,"cellular-outline":60170,"cellular-sharp":60171,"chatbox":60172,"chatbox-ellipses":60173,"chatbox-ellipses-outline":60174,"chatbox-ellipses-sharp":60175,"chatbox-outline":60176,"chatbox-sharp":60177,"chatbubble":60178,"chatbubble-ellipses":60179,"chatbubble-ellipses-outline":60180,"chatbubble-ellipses-sharp":60181,"chatbubble-outline":60182,"chatbubble-sharp":60183,"chatbubbles":60184,"chatbubbles-outline":60185,"chatbubbles-sharp":60186,"checkbox":60187,"checkbox-outline":60188,"checkbox-sharp":60189,"checkmark":60190,"checkmark-circle":60191,"checkmark-circle-outline":60192,"checkmark-circle-sharp":60193,"checkmark-done":60194,"checkmark-done-circle":60195,"checkmark-done-circle-outline":60196,"checkmark-done-circle-sharp":60197,"checkmark-done-outline":60198,"checkmark-done-sharp":60199,"checkmark-outline":60200,"checkmark-sharp":60201,"chevron-back":60202,"chevron-back-circle":60203,"chevron-back-circle-outline":60204,"chevron-back-circle-sharp":60205,"chevron-back-outline":60206,"chevron-back-sharp":60207,"chevron-collapse":60208,"chevron-collapse-outline":60209,"chevron-collapse-sharp":60210,"chevron-down":60211,"chevron-down-circle":60212,"chevron-down-circle-outline":60213,"chevron-down-circle-sharp":60214,"chevron-down-outline":60215,"chevron-down-sharp":60216,"chevron-expand":60217,"chevron-expand-outline":60218,"chevron-expand-sharp":60219,"chevron-forward":60220,"chevron-forward-circle":60221,"chevron-forward-circle-outline":60222,"chevron-forward-circle-sharp":60223,"chevron-forward-outline":60224,"chevron-forward-sharp":60225,"chevron-up":60226,"chevron-up-circle":60227,"chevron-up-circle-outline":60228,"chevron-up-circle-sharp":60229,"chevron-up-outline":60230,"chevron-up-sharp":60231,"clipboard":60232,"clipboard-outline":60233,"clipboard-sharp":60234,"close":60235,"close-circle":60236,"close-circle-outline":60237,"close-circle-sharp":60238,"close-outline":60239,"close-sharp":60240,"cloud":60241,"cloud-circle":60242,"cloud-circle-outline":60243,"cloud-circle-sharp":60244,"cloud-done":60245,"cloud-done-outline":60246,"cloud-done-sharp":60247,"cloud-download":60248,"cloud-download-outline":60249,"cloud-download-sharp":60250,"cloud-offline":60251,"cloud-offline-outline":60252,"cloud-offline-sharp":60253,"cloud-outline":60254,"cloud-sharp":60255,"cloud-upload":60256,"cloud-upload-outline":60257,"cloud-upload-sharp":60258,"cloudy":60259,"cloudy-night":60260,"cloudy-night-outline":60261,"cloudy-night-sharp":60262,"cloudy-outline":60263,"cloudy-sharp":60264,"code":60265,"code-download":60266,"code-download-outline":60267,"code-download-sharp":60268,"code-outline":60269,"code-sharp":60270,"code-slash":60271,"code-slash-outline":60272,"code-slash-sharp":60273,"code-working":60274,"code-working-outline":60275,"code-working-sharp":60276,"cog":60277,"cog-outline":60278,"cog-sharp":60279,"color-fill":60280,"color-fill-outline":60281,"color-fill-sharp":60282,"color-filter":60283,"color-filter-outline":60284,"color-filter-sharp":60285,"color-palette":60286,"color-palette-outline":60287,"color-palette-sharp":60288,"color-wand":60289,"color-wand-outline":60290,"color-wand-sharp":60291,"compass":60292,"compass-outline":60293,"compass-sharp":60294,"construct":60295,"construct-outline":60296,"construct-sharp":60297,"contract":60298,"contract-outline":60299,"contract-sharp":60300,"contrast":60301,"contrast-outline":60302,"contrast-sharp":60303,"copy":60304,"copy-outline":60305,"copy-sharp":60306,"create":60307,"create-outline":60308,"create-sharp":60309,"crop":60310,"crop-outline":60311,"crop-sharp":60312,"cube":60313,"cube-outline":60314,"cube-sharp":60315,"cut":60316,"cut-outline":60317,"cut-sharp":60318,"desktop":60319,"desktop-outline":60320,"desktop-sharp":60321,"diamond":60322,"diamond-outline":60323,"diamond-sharp":60324,"dice":60325,"dice-outline":60326,"dice-sharp":60327,"disc":60328,"disc-outline":60329,"disc-sharp":60330,"document":60331,"document-attach":60332,"document-attach-outline":60333,"document-attach-sharp":60334,"document-lock":60335,"document-lock-outline":60336,"document-lock-sharp":60337,"document-outline":60338,"document-sharp":60339,"document-text":60340,"document-text-outline":60341,"document-text-sharp":60342,"documents":60343,"documents-outline":60344,"documents-sharp":60345,"download":60346,"download-outline":60347,"download-sharp":60348,"duplicate":60349,"duplicate-outline":60350,"duplicate-sharp":60351,"ear":60352,"ear-outline":60353,"ear-sharp":60354,"earth":60355,"earth-outline":60356,"earth-sharp":60357,"easel":60358,"easel-outline":60359,"easel-sharp":60360,"egg":60361,"egg-outline":60362,"egg-sharp":60363,"ellipse":60364,"ellipse-outline":60365,"ellipse-sharp":60366,"ellipsis-horizontal":60367,"ellipsis-horizontal-circle":60368,"ellipsis-horizontal-circle-outline":60369,"ellipsis-horizontal-circle-sharp":60370,"ellipsis-horizontal-outline":60371,"ellipsis-horizontal-sharp":60372,"ellipsis-vertical":60373,"ellipsis-vertical-circle":60374,"ellipsis-vertical-circle-outline":60375,"ellipsis-vertical-circle-sharp":60376,"ellipsis-vertical-outline":60377,"ellipsis-vertical-sharp":60378,"enter":60379,"enter-outline":60380,"enter-sharp":60381,"exit":60382,"exit-outline":60383,"exit-sharp":60384,"expand":60385,"expand-outline":60386,"expand-sharp":60387,"extension-puzzle":60388,"extension-puzzle-outline":60389,"extension-puzzle-sharp":60390,"eye":60391,"eye-off":60392,"eye-off-outline":60393,"eye-off-sharp":60394,"eye-outline":60395,"eye-sharp":60396,"eyedrop":60397,"eyedrop-outline":60398,"eyedrop-sharp":60399,"fast-food":60400,"fast-food-outline":60401,"fast-food-sharp":60402,"female":60403,"female-outline":60404,"female-sharp":60405,"file-tray":60406,"file-tray-full":60407,"file-tray-full-outline":60408,"file-tray-full-sharp":60409,"file-tray-outline":60410,"file-tray-sharp":60411,"file-tray-stacked":60412,"file-tray-stacked-outline":60413,"file-tray-stacked-sharp":60414,"film":60415,"film-outline":60416,"film-sharp":60417,"filter":60418,"filter-circle":60419,"filter-circle-outline":60420,"filter-circle-sharp":60421,"filter-outline":60422,"filter-sharp":60423,"finger-print":60424,"finger-print-outline":60425,"finger-print-sharp":60426,"fish":60427,"fish-outline":60428,"fish-sharp":60429,"fitness":60430,"fitness-outline":60431,"fitness-sharp":60432,"flag":60433,"flag-outline":60434,"flag-sharp":60435,"flame":60436,"flame-outline":60437,"flame-sharp":60438,"flash":60439,"flash-off":60440,"flash-off-outline":60441,"flash-off-sharp":60442,"flash-outline":60443,"flash-sharp":60444,"flashlight":60445,"flashlight-outline":60446,"flashlight-sharp":60447,"flask":60448,"flask-outline":60449,"flask-sharp":60450,"flower":60451,"flower-outline":60452,"flower-sharp":60453,"folder":60454,"folder-open":60455,"folder-open-outline":60456,"folder-open-sharp":60457,"folder-outline":60458,"folder-sharp":60459,"football":60460,"football-outline":60461,"football-sharp":60462,"footsteps":60463,"footsteps-outline":60464,"footsteps-sharp":60465,"funnel":60466,"funnel-outline":60467,"funnel-sharp":60468,"game-controller":60469,"game-controller-outline":60470,"game-controller-sharp":60471,"gift":60472,"gift-outline":60473,"gift-sharp":60474,"git-branch":60475,"git-branch-outline":60476,"git-branch-sharp":60477,"git-commit":60478,"git-commit-outline":60479,"git-commit-sharp":60480,"git-compare":60481,"git-compare-outline":60482,"git-compare-sharp":60483,"git-merge":60484,"git-merge-outline":60485,"git-merge-sharp":60486,"git-network":60487,"git-network-outline":60488,"git-network-sharp":60489,"git-pull-request":60490,"git-pull-request-outline":60491,"git-pull-request-sharp":60492,"glasses":60493,"glasses-outline":60494,"glasses-sharp":60495,"globe":60496,"globe-outline":60497,"globe-sharp":60498,"golf":60499,"golf-outline":60500,"golf-sharp":60501,"grid":60502,"grid-outline":60503,"grid-sharp":60504,"hammer":60505,"hammer-outline":60506,"hammer-sharp":60507,"hand-left":60508,"hand-left-outline":60509,"hand-left-sharp":60510,"hand-right":60511,"hand-right-outline":60512,"hand-right-sharp":60513,"happy":60514,"happy-outline":60515,"happy-sharp":60516,"hardware-chip":60517,"hardware-chip-outline":60518,"hardware-chip-sharp":60519,"headset":60520,"headset-outline":60521,"headset-sharp":60522,"heart":60523,"heart-circle":60524,"heart-circle-outline":60525,"heart-circle-sharp":60526,"heart-dislike":60527,"heart-dislike-circle":60528,"heart-dislike-circle-outline":60529,"heart-dislike-circle-sharp":60530,"heart-dislike-outline":60531,"heart-dislike-sharp":60532,"heart-half":60533,"heart-half-outline":60534,"heart-half-sharp":60535,"heart-outline":60536,"heart-sharp":60537,"help":60538,"help-buoy":60539,"help-buoy-outline":60540,"help-buoy-sharp":60541,"help-circle":60542,"help-circle-outline":60543,"help-circle-sharp":60544,"help-outline":60545,"help-sharp":60546,"home":60547,"home-outline":60548,"home-sharp":60549,"hourglass":60550,"hourglass-outline":60551,"hourglass-sharp":60552,"ice-cream":60553,"ice-cream-outline":60554,"ice-cream-sharp":60555,"id-card":60556,"id-card-outline":60557,"id-card-sharp":60558,"image":60559,"image-outline":60560,"image-sharp":60561,"images":60562,"images-outline":60563,"images-sharp":60564,"infinite":60565,"infinite-outline":60566,"infinite-sharp":60567,"information":60568,"information-circle":60569,"information-circle-outline":60570,"information-circle-sharp":60571,"information-outline":60572,"information-sharp":60573,"invert-mode":60574,"invert-mode-outline":60575,"invert-mode-sharp":60576,"journal":60577,"journal-outline":60578,"journal-sharp":60579,"key":60580,"key-outline":60581,"key-sharp":60582,"keypad":60583,"keypad-outline":60584,"keypad-sharp":60585,"language":60586,"language-outline":60587,"language-sharp":60588,"laptop":60589,"laptop-outline":60590,"laptop-sharp":60591,"layers":60592,"layers-outline":60593,"layers-sharp":60594,"leaf":60595,"leaf-outline":60596,"leaf-sharp":60597,"library":60598,"library-outline":60599,"library-sharp":60600,"link":60601,"link-outline":60602,"link-sharp":60603,"list":60604,"list-circle":60605,"list-circle-outline":60606,"list-circle-sharp":60607,"list-outline":60608,"list-sharp":60609,"locate":60610,"locate-outline":60611,"locate-sharp":60612,"location":60613,"location-outline":60614,"location-sharp":60615,"lock-closed":60616,"lock-closed-outline":60617,"lock-closed-sharp":60618,"lock-open":60619,"lock-open-outline":60620,"lock-open-sharp":60621,"log-in":60622,"log-in-outline":60623,"log-in-sharp":60624,"log-out":60625,"log-out-outline":60626,"log-out-sharp":60627,"logo-alipay":60628,"logo-amazon":60629,"logo-amplify":60630,"logo-android":60631,"logo-angular":60632,"logo-apple":60633,"logo-apple-appstore":60634,"logo-apple-ar":60635,"logo-behance":60636,"logo-bitbucket":60637,"logo-bitcoin":60638,"logo-buffer":60639,"logo-capacitor":60640,"logo-chrome":60641,"logo-closed-captioning":60642,"logo-codepen":60643,"logo-css3":60644,"logo-designernews":60645,"logo-deviantart":60646,"logo-discord":60647,"logo-docker":60648,"logo-dribbble":60649,"logo-dropbox":60650,"logo-edge":60651,"logo-electron":60652,"logo-euro":60653,"logo-facebook":60654,"logo-figma":60655,"logo-firebase":60656,"logo-firefox":60657,"logo-flickr":60658,"logo-foursquare":60659,"logo-github":60660,"logo-gitlab":60661,"logo-google":60662,"logo-google-playstore":60663,"logo-hackernews":60664,"logo-html5":60665,"logo-instagram":60666,"logo-ionic":60667,"logo-ionitron":60668,"logo-javascript":60669,"logo-laravel":60670,"logo-linkedin":60671,"logo-markdown":60672,"logo-mastodon":60673,"logo-medium":60674,"logo-microsoft":60675,"logo-no-smoking":60676,"logo-nodejs":60677,"logo-npm":60678,"logo-octocat":60679,"logo-paypal":60680,"logo-pinterest":60681,"logo-playstation":60682,"logo-pwa":60683,"logo-python":60684,"logo-react":60685,"logo-reddit":60686,"logo-rss":60687,"logo-sass":60688,"logo-skype":60689,"logo-slack":60690,"logo-snapchat":60691,"logo-soundcloud":60692,"logo-stackoverflow":60693,"logo-steam":60694,"logo-stencil":60695,"logo-tableau":60696,"logo-tiktok":60697,"logo-tumblr":60698,"logo-tux":60699,"logo-twitch":60700,"logo-twitter":60701,"logo-usd":60702,"logo-venmo":60703,"logo-vercel":60704,"logo-vimeo":60705,"logo-vk":60706,"logo-vue":60707,"logo-web-component":60708,"logo-wechat":60709,"logo-whatsapp":60710,"logo-windows":60711,"logo-wordpress":60712,"logo-xbox":60713,"logo-xing":60714,"logo-yahoo":60715,"logo-yen":60716,"logo-youtube":60717,"magnet":60718,"magnet-outline":60719,"magnet-sharp":60720,"mail":60721,"mail-open":60722,"mail-open-outline":60723,"mail-open-sharp":60724,"mail-outline":60725,"mail-sharp":60726,"mail-unread":60727,"mail-unread-outline":60728,"mail-unread-sharp":60729,"male":60730,"male-female":60731,"male-female-outline":60732,"male-female-sharp":60733,"male-outline":60734,"male-sharp":60735,"man":60736,"man-outline":60737,"man-sharp":60738,"map":60739,"map-outline":60740,"map-sharp":60741,"medal":60742,"medal-outline":60743,"medal-sharp":60744,"medical":60745,"medical-outline":60746,"medical-sharp":60747,"medkit":60748,"medkit-outline":60749,"medkit-sharp":60750,"megaphone":60751,"megaphone-outline":60752,"megaphone-sharp":60753,"menu":60754,"menu-outline":60755,"menu-sharp":60756,"mic":60757,"mic-circle":60758,"mic-circle-outline":60759,"mic-circle-sharp":60760,"mic-off":60761,"mic-off-circle":60762,"mic-off-circle-outline":60763,"mic-off-circle-sharp":60764,"mic-off-outline":60765,"mic-off-sharp":60766,"mic-outline":60767,"mic-sharp":60768,"moon":60769,"moon-outline":60770,"moon-sharp":60771,"move":60772,"move-outline":60773,"move-sharp":60774,"musical-note":60775,"musical-note-outline":60776,"musical-note-sharp":60777,"musical-notes":60778,"musical-notes-outline":60779,"musical-notes-sharp":60780,"navigate":60781,"navigate-circle":60782,"navigate-circle-outline":60783,"navigate-circle-sharp":60784,"navigate-outline":60785,"navigate-sharp":60786,"newspaper":60787,"newspaper-outline":60788,"newspaper-sharp":60789,"notifications":60790,"notifications-circle":60791,"notifications-circle-outline":60792,"notifications-circle-sharp":60793,"notifications-off":60794,"notifications-off-circle":60795,"notifications-off-circle-outline":60796,"notifications-off-circle-sharp":60797,"notifications-off-outline":60798,"notifications-off-sharp":60799,"notifications-outline":60800,"notifications-sharp":60801,"nuclear":60802,"nuclear-outline":60803,"nuclear-sharp":60804,"nutrition":60805,"nutrition-outline":60806,"nutrition-sharp":60807,"open":60808,"open-outline":60809,"open-sharp":60810,"options":60811,"options-outline":60812,"options-sharp":60813,"paper-plane":60814,"paper-plane-outline":60815,"paper-plane-sharp":60816,"partly-sunny":60817,"partly-sunny-outline":60818,"partly-sunny-sharp":60819,"pause":60820,"pause-circle":60821,"pause-circle-outline":60822,"pause-circle-sharp":60823,"pause-outline":60824,"pause-sharp":60825,"paw":60826,"paw-outline":60827,"paw-sharp":60828,"pencil":60829,"pencil-outline":60830,"pencil-sharp":60831,"people":60832,"people-circle":60833,"people-circle-outline":60834,"people-circle-sharp":60835,"people-outline":60836,"people-sharp":60837,"person":60838,"person-add":60839,"person-add-outline":60840,"person-add-sharp":60841,"person-circle":60842,"person-circle-outline":60843,"person-circle-sharp":60844,"person-outline":60845,"person-remove":60846,"person-remove-outline":60847,"person-remove-sharp":60848,"person-sharp":60849,"phone-landscape":60850,"phone-landscape-outline":60851,"phone-landscape-sharp":60852,"phone-portrait":60853,"phone-portrait-outline":60854,"phone-portrait-sharp":60855,"pie-chart":60856,"pie-chart-outline":60857,"pie-chart-sharp":60858,"pin":60859,"pin-outline":60860,"pin-sharp":60861,"pint":60862,"pint-outline":60863,"pint-sharp":60864,"pizza":60865,"pizza-outline":60866,"pizza-sharp":60867,"planet":60868,"planet-outline":60869,"planet-sharp":60870,"play":60871,"play-back":60872,"play-back-circle":60873,"play-back-circle-outline":60874,"play-back-circle-sharp":60875,"play-back-outline":60876,"play-back-sharp":60877,"play-circle":60878,"play-circle-outline":60879,"play-circle-sharp":60880,"play-forward":60881,"play-forward-circle":60882,"play-forward-circle-outline":60883,"play-forward-circle-sharp":60884,"play-forward-outline":60885,"play-forward-sharp":60886,"play-outline":60887,"play-sharp":60888,"play-skip-back":60889,"play-skip-back-circle":60890,"play-skip-back-circle-outline":60891,"play-skip-back-circle-sharp":60892,"play-skip-back-outline":60893,"play-skip-back-sharp":60894,"play-skip-forward":60895,"play-skip-forward-circle":60896,"play-skip-forward-circle-outline":60897,"play-skip-forward-circle-sharp":60898,"play-skip-forward-outline":60899,"play-skip-forward-sharp":60900,"podium":60901,"podium-outline":60902,"podium-sharp":60903,"power":60904,"power-outline":60905,"power-sharp":60906,"pricetag":60907,"pricetag-outline":60908,"pricetag-sharp":60909,"pricetags":60910,"pricetags-outline":60911,"pricetags-sharp":60912,"print":60913,"print-outline":60914,"print-sharp":60915,"prism":60916,"prism-outline":60917,"prism-sharp":60918,"pulse":60919,"pulse-outline":60920,"pulse-sharp":60921,"push":60922,"push-outline":60923,"push-sharp":60924,"qr-code":60925,"qr-code-outline":60926,"qr-code-sharp":60927,"radio":60928,"radio-button-off":60929,"radio-button-off-outline":60930,"radio-button-off-sharp":60931,"radio-button-on":60932,"radio-button-on-outline":60933,"radio-button-on-sharp":60934,"radio-outline":60935,"radio-sharp":60936,"rainy":60937,"rainy-outline":60938,"rainy-sharp":60939,"reader":60940,"reader-outline":60941,"reader-sharp":60942,"receipt":60943,"receipt-outline":60944,"receipt-sharp":60945,"recording":60946,"recording-outline":60947,"recording-sharp":60948,"refresh":60949,"refresh-circle":60950,"refresh-circle-outline":60951,"refresh-circle-sharp":60952,"refresh-outline":60953,"refresh-sharp":60954,"reload":60955,"reload-circle":60956,"reload-circle-outline":60957,"reload-circle-sharp":60958,"reload-outline":60959,"reload-sharp":60960,"remove":60961,"remove-circle":60962,"remove-circle-outline":60963,"remove-circle-sharp":60964,"remove-outline":60965,"remove-sharp":60966,"reorder-four":60967,"reorder-four-outline":60968,"reorder-four-sharp":60969,"reorder-three":60970,"reorder-three-outline":60971,"reorder-three-sharp":60972,"reorder-two":60973,"reorder-two-outline":60974,"reorder-two-sharp":60975,"repeat":60976,"repeat-outline":60977,"repeat-sharp":60978,"resize":60979,"resize-outline":60980,"resize-sharp":60981,"restaurant":60982,"restaurant-outline":60983,"restaurant-sharp":60984,"return-down-back":60985,"return-down-back-outline":60986,"return-down-back-sharp":60987,"return-down-forward":60988,"return-down-forward-outline":60989,"return-down-forward-sharp":60990,"return-up-back":60991,"return-up-back-outline":60992,"return-up-back-sharp":60993,"return-up-forward":60994,"return-up-forward-outline":60995,"return-up-forward-sharp":60996,"ribbon":60997,"ribbon-outline":60998,"ribbon-sharp":60999,"rocket":61000,"rocket-outline":61001,"rocket-sharp":61002,"rose":61003,"rose-outline":61004,"rose-sharp":61005,"sad":61006,"sad-outline":61007,"sad-sharp":61008,"save":61009,"save-outline":61010,"save-sharp":61011,"scale":61012,"scale-outline":61013,"scale-sharp":61014,"scan":61015,"scan-circle":61016,"scan-circle-outline":61017,"scan-circle-sharp":61018,"scan-outline":61019,"scan-sharp":61020,"school":61021,"school-outline":61022,"school-sharp":61023,"search":61024,"search-circle":61025,"search-circle-outline":61026,"search-circle-sharp":61027,"search-outline":61028,"search-sharp":61029,"send":61030,"send-outline":61031,"send-sharp":61032,"server":61033,"server-outline":61034,"server-sharp":61035,"settings":61036,"settings-outline":61037,"settings-sharp":61038,"shapes":61039,"shapes-outline":61040,"shapes-sharp":61041,"share":61042,"share-outline":61043,"share-sharp":61044,"share-social":61045,"share-social-outline":61046,"share-social-sharp":61047,"shield":61048,"shield-checkmark":61049,"shield-checkmark-outline":61050,"shield-checkmark-sharp":61051,"shield-half":61052,"shield-half-outline":61053,"shield-half-sharp":61054,"shield-outline":61055,"shield-sharp":61056,"shirt":61057,"shirt-outline":61058,"shirt-sharp":61059,"shuffle":61060,"shuffle-outline":61061,"shuffle-sharp":61062,"skull":61063,"skull-outline":61064,"skull-sharp":61065,"snow":61066,"snow-outline":61067,"snow-sharp":61068,"sparkles":61069,"sparkles-outline":61070,"sparkles-sharp":61071,"speedometer":61072,"speedometer-outline":61073,"speedometer-sharp":61074,"square":61075,"square-outline":61076,"square-sharp":61077,"star":61078,"star-half":61079,"star-half-outline":61080,"star-half-sharp":61081,"star-outline":61082,"star-sharp":61083,"stats-chart":61084,"stats-chart-outline":61085,"stats-chart-sharp":61086,"stop":61087,"stop-circle":61088,"stop-circle-outline":61089,"stop-circle-sharp":61090,"stop-outline":61091,"stop-sharp":61092,"stopwatch":61093,"stopwatch-outline":61094,"stopwatch-sharp":61095,"storefront":61096,"storefront-outline":61097,"storefront-sharp":61098,"subway":61099,"subway-outline":61100,"subway-sharp":61101,"sunny":61102,"sunny-outline":61103,"sunny-sharp":61104,"swap-horizontal":61105,"swap-horizontal-outline":61106,"swap-horizontal-sharp":61107,"swap-vertical":61108,"swap-vertical-outline":61109,"swap-vertical-sharp":61110,"sync":61111,"sync-circle":61112,"sync-circle-outline":61113,"sync-circle-sharp":61114,"sync-outline":61115,"sync-sharp":61116,"tablet-landscape":61117,"tablet-landscape-outline":61118,"tablet-landscape-sharp":61119,"tablet-portrait":61120,"tablet-portrait-outline":61121,"tablet-portrait-sharp":61122,"telescope":61123,"telescope-outline":61124,"telescope-sharp":61125,"tennisball":61126,"tennisball-outline":61127,"tennisball-sharp":61128,"terminal":61129,"terminal-outline":61130,"terminal-sharp":61131,"text":61132,"text-outline":61133,"text-sharp":61134,"thermometer":61135,"thermometer-outline":61136,"thermometer-sharp":61137,"thumbs-down":61138,"thumbs-down-outline":61139,"thumbs-down-sharp":61140,"thumbs-up":61141,"thumbs-up-outline":61142,"thumbs-up-sharp":61143,"thunderstorm":61144,"thunderstorm-outline":61145,"thunderstorm-sharp":61146,"ticket":61147,"ticket-outline":61148,"ticket-sharp":61149,"time":61150,"time-outline":61151,"time-sharp":61152,"timer":61153,"timer-outline":61154,"timer-sharp":61155,"today":61156,"today-outline":61157,"today-sharp":61158,"toggle":61159,"toggle-outline":61160,"toggle-sharp":61161,"trail-sign":61162,"trail-sign-outline":61163,"trail-sign-sharp":61164,"train":61165,"train-outline":61166,"train-sharp":61167,"transgender":61168,"transgender-outline":61169,"transgender-sharp":61170,"trash":61171,"trash-bin":61172,"trash-bin-outline":61173,"trash-bin-sharp":61174,"trash-outline":61175,"trash-sharp":61176,"trending-down":61177,"trending-down-outline":61178,"trending-down-sharp":61179,"trending-up":61180,"trending-up-outline":61181,"trending-up-sharp":61182,"triangle":61183,"triangle-outline":61184,"triangle-sharp":61185,"trophy":61186,"trophy-outline":61187,"trophy-sharp":61188,"tv":61189,"tv-outline":61190,"tv-sharp":61191,"umbrella":61192,"umbrella-outline":61193,"umbrella-sharp":61194,"unlink":61195,"unlink-outline":61196,"unlink-sharp":61197,"videocam":61198,"videocam-off":61199,"videocam-off-outline":61200,"videocam-off-sharp":61201,"videocam-outline":61202,"videocam-sharp":61203,"volume-high":61204,"volume-high-outline":61205,"volume-high-sharp":61206,"volume-low":61207,"volume-low-outline":61208,"volume-low-sharp":61209,"volume-medium":61210,"volume-medium-outline":61211,"volume-medium-sharp":61212,"volume-mute":61213,"volume-mute-outline":61214,"volume-mute-sharp":61215,"volume-off":61216,"volume-off-outline":61217,"volume-off-sharp":61218,"walk":61219,"walk-outline":61220,"walk-sharp":61221,"wallet":61222,"wallet-outline":61223,"wallet-sharp":61224,"warning":61225,"warning-outline":61226,"warning-sharp":61227,"watch":61228,"watch-outline":61229,"watch-sharp":61230,"water":61231,"water-outline":61232,"water-sharp":61233,"wifi":61234,"wifi-outline":61235,"wifi-sharp":61236,"wine":61237,"wine-outline":61238,"wine-sharp":61239,"woman":61240,"woman-outline":61241,"woman-sharp":61242}'),o=(0,r.default)(i,"ionicons",a)},7869:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/MaterialCommunityIcons.5d42b4e60858731e7b65.ttf",i=JSON.parse('{"ab-testing":983497,"abacus":988896,"abjad-arabic":987944,"abjad-hebrew":987945,"abugida-devanagari":987946,"abugida-thai":987947,"access-point":983043,"access-point-check":988472,"access-point-minus":988473,"access-point-network":983042,"access-point-network-off":986081,"access-point-off":988433,"access-point-plus":988474,"access-point-remove":988475,"account":983044,"account-alert":983045,"account-alert-outline":985936,"account-arrow-down":989288,"account-arrow-down-outline":989289,"account-arrow-left":985937,"account-arrow-left-outline":985938,"account-arrow-right":985939,"account-arrow-right-outline":985940,"account-arrow-up":989287,"account-arrow-up-outline":989290,"account-box":983046,"account-box-multiple":985396,"account-box-multiple-outline":987146,"account-box-outline":983047,"account-cancel":987871,"account-cancel-outline":987872,"account-cash":987287,"account-cash-outline":987288,"account-check":983048,"account-check-outline":986082,"account-child":985737,"account-child-circle":985738,"account-child-outline":987336,"account-circle":983049,"account-circle-outline":985941,"account-clock":985942,"account-clock-outline":985943,"account-cog":988016,"account-cog-outline":988017,"account-convert":983050,"account-convert-outline":987905,"account-cowboy-hat":986779,"account-cowboy-hat-outline":989171,"account-details":984625,"account-details-outline":988018,"account-edit":984764,"account-edit-outline":987131,"account-eye":984096,"account-eye-outline":987771,"account-filter":985398,"account-filter-outline":987037,"account-group":985161,"account-group-outline":985944,"account-hard-hat":984501,"account-heart":985241,"account-heart-outline":986083,"account-injury":989205,"account-injury-outline":989206,"account-key":983051,"account-key-outline":986084,"account-lock":987486,"account-lock-open":989536,"account-lock-open-outline":989537,"account-lock-outline":987487,"account-minus":983053,"account-minus-outline":985836,"account-multiple":983054,"account-multiple-check":985285,"account-multiple-check-outline":987646,"account-multiple-minus":984531,"account-multiple-minus-outline":986085,"account-multiple-outline":983055,"account-multiple-plus":983056,"account-multiple-plus-outline":985088,"account-multiple-remove":987658,"account-multiple-remove-outline":987659,"account-music":985091,"account-music-outline":986345,"account-network":983057,"account-network-outline":986086,"account-off":983058,"account-off-outline":986087,"account-outline":983059,"account-plus":983060,"account-plus-outline":985089,"account-question":985945,"account-question-outline":985946,"account-reactivate":988459,"account-reactivate-outline":988460,"account-remove":983061,"account-remove-outline":985837,"account-search":983062,"account-search-outline":985397,"account-settings":984624,"account-settings-outline":987337,"account-star":983063,"account-star-outline":986088,"account-supervisor":985739,"account-supervisor-circle":985740,"account-supervisor-circle-outline":988396,"account-supervisor-outline":987437,"account-switch":983065,"account-switch-outline":984267,"account-sync":989467,"account-sync-outline":989468,"account-tie":986339,"account-tie-hat":989336,"account-tie-hat-outline":989337,"account-tie-outline":987338,"account-tie-voice":987912,"account-tie-voice-off":987914,"account-tie-voice-off-outline":987915,"account-tie-voice-outline":987913,"account-voice":984523,"account-voice-off":986836,"account-wrench":989338,"account-wrench-outline":989339,"adjust":983066,"advertisements":989482,"advertisements-off":989483,"air-conditioner":983067,"air-filter":986435,"air-horn":986540,"air-humidifier":987289,"air-humidifier-off":988262,"air-purifier":986436,"airbag":986089,"airballoon":983068,"airballoon-outline":987147,"airplane":983069,"airplane-alert":989306,"airplane-check":989307,"airplane-clock":989308,"airplane-cog":989309,"airplane-edit":989310,"airplane-landing":984532,"airplane-marker":989311,"airplane-minus":989312,"airplane-off":983070,"airplane-plus":989313,"airplane-remove":989314,"airplane-search":989315,"airplane-settings":989316,"airplane-takeoff":984533,"airport":985163,"alarm":983072,"alarm-bell":984974,"alarm-check":983073,"alarm-light":984975,"alarm-light-off":988958,"alarm-light-off-outline":988959,"alarm-light-outline":986090,"alarm-multiple":983074,"alarm-note":986737,"alarm-note-off":986738,"alarm-off":983075,"alarm-panel":988612,"alarm-panel-outline":988613,"alarm-plus":983076,"alarm-snooze":984718,"album":983077,"alert":983078,"alert-box":983079,"alert-box-outline":986340,"alert-circle":983080,"alert-circle-check":987629,"alert-circle-check-outline":987630,"alert-circle-outline":984534,"alert-decagram":984765,"alert-decagram-outline":986341,"alert-minus":988347,"alert-minus-outline":988350,"alert-octagon":983081,"alert-octagon-outline":986342,"alert-octagram":984935,"alert-octagram-outline":986343,"alert-outline":983082,"alert-plus":988346,"alert-plus-outline":988349,"alert-remove":988348,"alert-remove-outline":988351,"alert-rhombus":987598,"alert-rhombus-outline":987599,"alien":985242,"alien-outline":987339,"align-horizontal-center":987587,"align-horizontal-distribute":989538,"align-horizontal-left":987586,"align-horizontal-right":987588,"align-vertical-bottom":987589,"align-vertical-center":987590,"align-vertical-distribute":989539,"align-vertical-top":987591,"all-inclusive":984766,"all-inclusive-box":989325,"all-inclusive-box-outline":989326,"allergy":987736,"alpha":983083,"alpha-a":985838,"alpha-a-box":985864,"alpha-a-box-outline":986091,"alpha-a-circle":986092,"alpha-a-circle-outline":986093,"alpha-b":985839,"alpha-b-box":985865,"alpha-b-box-outline":986094,"alpha-b-circle":986095,"alpha-b-circle-outline":986096,"alpha-c":985840,"alpha-c-box":985866,"alpha-c-box-outline":986097,"alpha-c-circle":986098,"alpha-c-circle-outline":986099,"alpha-d":985841,"alpha-d-box":985867,"alpha-d-box-outline":986100,"alpha-d-circle":986101,"alpha-d-circle-outline":986102,"alpha-e":985842,"alpha-e-box":985868,"alpha-e-box-outline":986103,"alpha-e-circle":986104,"alpha-e-circle-outline":986105,"alpha-f":985843,"alpha-f-box":985869,"alpha-f-box-outline":986106,"alpha-f-circle":986107,"alpha-f-circle-outline":986108,"alpha-g":985844,"alpha-g-box":985870,"alpha-g-box-outline":986109,"alpha-g-circle":986110,"alpha-g-circle-outline":986111,"alpha-h":985845,"alpha-h-box":985871,"alpha-h-box-outline":986112,"alpha-h-circle":986113,"alpha-h-circle-outline":986114,"alpha-i":985846,"alpha-i-box":985872,"alpha-i-box-outline":986115,"alpha-i-circle":986116,"alpha-i-circle-outline":986117,"alpha-j":985847,"alpha-j-box":985873,"alpha-j-box-outline":986118,"alpha-j-circle":986119,"alpha-j-circle-outline":986120,"alpha-k":985848,"alpha-k-box":985874,"alpha-k-box-outline":986121,"alpha-k-circle":986122,"alpha-k-circle-outline":986123,"alpha-l":985849,"alpha-l-box":985875,"alpha-l-box-outline":986124,"alpha-l-circle":986125,"alpha-l-circle-outline":986126,"alpha-m":985850,"alpha-m-box":985876,"alpha-m-box-outline":986127,"alpha-m-circle":986128,"alpha-m-circle-outline":986129,"alpha-n":985851,"alpha-n-box":985877,"alpha-n-box-outline":986130,"alpha-n-circle":986131,"alpha-n-circle-outline":986132,"alpha-o":985852,"alpha-o-box":985878,"alpha-o-box-outline":986133,"alpha-o-circle":986134,"alpha-o-circle-outline":986135,"alpha-p":985853,"alpha-p-box":985879,"alpha-p-box-outline":986136,"alpha-p-circle":986137,"alpha-p-circle-outline":986138,"alpha-q":985854,"alpha-q-box":985880,"alpha-q-box-outline":986139,"alpha-q-circle":986140,"alpha-q-circle-outline":986141,"alpha-r":985855,"alpha-r-box":985881,"alpha-r-box-outline":986142,"alpha-r-circle":986143,"alpha-r-circle-outline":986144,"alpha-s":985856,"alpha-s-box":985882,"alpha-s-box-outline":986145,"alpha-s-circle":986146,"alpha-s-circle-outline":986147,"alpha-t":985857,"alpha-t-box":985883,"alpha-t-box-outline":986148,"alpha-t-circle":986149,"alpha-t-circle-outline":986150,"alpha-u":985858,"alpha-u-box":985884,"alpha-u-box-outline":986151,"alpha-u-circle":986152,"alpha-u-circle-outline":986153,"alpha-v":985859,"alpha-v-box":985885,"alpha-v-box-outline":986154,"alpha-v-circle":986155,"alpha-v-circle-outline":986156,"alpha-w":985860,"alpha-w-box":985886,"alpha-w-box-outline":986157,"alpha-w-circle":986158,"alpha-w-circle-outline":986159,"alpha-x":985861,"alpha-x-box":985887,"alpha-x-box-outline":986160,"alpha-x-circle":986161,"alpha-x-circle-outline":986162,"alpha-y":985862,"alpha-y-box":985888,"alpha-y-box-outline":986163,"alpha-y-circle":986164,"alpha-y-circle-outline":986165,"alpha-z":985863,"alpha-z-box":985889,"alpha-z-box-outline":986166,"alpha-z-circle":986167,"alpha-z-circle-outline":986168,"alphabet-aurebesh":987948,"alphabet-cyrillic":987949,"alphabet-greek":987950,"alphabet-latin":987951,"alphabet-piqad":987952,"alphabet-tengwar":987959,"alphabetical":983084,"alphabetical-off":987148,"alphabetical-variant":987149,"alphabetical-variant-off":987150,"altimeter":984535,"ambulance":983087,"ammunition":986344,"ampersand":985741,"amplifier":983088,"amplifier-off":987573,"anchor":983089,"android":983090,"android-messages":986437,"android-studio":983092,"angle-acute":985399,"angle-obtuse":985400,"angle-right":985401,"angular":984754,"angularjs":984767,"animation":984536,"animation-outline":985743,"animation-play":985402,"animation-play-outline":985744,"ansible":987290,"antenna":987417,"anvil":985243,"apache-kafka":987151,"api":987291,"api-off":987735,"apple":983093,"apple-finder":983094,"apple-icloud":983096,"apple-ios":983095,"apple-keyboard-caps":984626,"apple-keyboard-command":984627,"apple-keyboard-control":984628,"apple-keyboard-option":984629,"apple-keyboard-shift":984630,"apple-safari":983097,"application":985286,"application-array":987381,"application-array-outline":987382,"application-braces":987383,"application-braces-outline":987384,"application-brackets":986251,"application-brackets-outline":986252,"application-cog":984693,"application-cog-outline":988535,"application-edit":983214,"application-edit-outline":984601,"application-export":986541,"application-import":986542,"application-outline":984596,"application-parentheses":987385,"application-parentheses-outline":987386,"application-settings":985952,"application-settings-outline":988501,"application-variable":987387,"application-variable-outline":987388,"approximately-equal":987038,"approximately-equal-box":987039,"apps":983099,"apps-box":986438,"arch":985287,"archive":983100,"archive-alert":988413,"archive-alert-outline":988414,"archive-arrow-down":987737,"archive-arrow-down-outline":987738,"archive-arrow-up":987739,"archive-arrow-up-outline":987740,"archive-cancel":989003,"archive-cancel-outline":989004,"archive-check":989005,"archive-check-outline":989006,"archive-clock":989007,"archive-clock-outline":989008,"archive-cog":989009,"archive-cog-outline":989010,"archive-edit":989011,"archive-edit-outline":989012,"archive-eye":989013,"archive-eye-outline":989014,"archive-lock":989015,"archive-lock-open":989016,"archive-lock-open-outline":989017,"archive-lock-outline":989018,"archive-marker":989019,"archive-marker-outline":989020,"archive-minus":989021,"archive-minus-outline":989022,"archive-music":989023,"archive-music-outline":989024,"archive-off":989025,"archive-off-outline":989026,"archive-outline":987662,"archive-plus":989027,"archive-plus-outline":989028,"archive-refresh":989029,"archive-refresh-outline":989030,"archive-remove":989031,"archive-remove-outline":989032,"archive-search":989033,"archive-search-outline":989034,"archive-settings":989035,"archive-settings-outline":989036,"archive-star":989037,"archive-star-outline":989038,"archive-sync":989039,"archive-sync-outline":989040,"arm-flex":987095,"arm-flex-outline":987094,"arrange-bring-forward":983101,"arrange-bring-to-front":983102,"arrange-send-backward":983103,"arrange-send-to-back":983104,"arrow-all":983105,"arrow-bottom-left":983106,"arrow-bottom-left-bold-box":989540,"arrow-bottom-left-bold-box-outline":989541,"arrow-bottom-left-bold-outline":985527,"arrow-bottom-left-thick":985528,"arrow-bottom-left-thin":989622,"arrow-bottom-left-thin-circle-outline":988566,"arrow-bottom-right":983107,"arrow-bottom-right-bold-box":989542,"arrow-bottom-right-bold-box-outline":989543,"arrow-bottom-right-bold-outline":985529,"arrow-bottom-right-thick":985530,"arrow-bottom-right-thin":989623,"arrow-bottom-right-thin-circle-outline":988565,"arrow-collapse":984597,"arrow-collapse-all":983108,"arrow-collapse-down":984978,"arrow-collapse-horizontal":985164,"arrow-collapse-left":984979,"arrow-collapse-right":984980,"arrow-collapse-up":984981,"arrow-collapse-vertical":985165,"arrow-decision":985531,"arrow-decision-auto":985532,"arrow-decision-auto-outline":985533,"arrow-decision-outline":985534,"arrow-down":983109,"arrow-down-bold":984878,"arrow-down-bold-box":984879,"arrow-down-bold-box-outline":984880,"arrow-down-bold-circle":983111,"arrow-down-bold-circle-outline":983112,"arrow-down-bold-hexagon-outline":983113,"arrow-down-bold-outline":985535,"arrow-down-box":984768,"arrow-down-circle":986331,"arrow-down-circle-outline":986332,"arrow-down-drop-circle":983114,"arrow-down-drop-circle-outline":983115,"arrow-down-left":989089,"arrow-down-left-bold":989090,"arrow-down-right":989091,"arrow-down-right-bold":989092,"arrow-down-thick":983110,"arrow-down-thin":989619,"arrow-down-thin-circle-outline":988569,"arrow-expand":984598,"arrow-expand-all":983116,"arrow-expand-down":984982,"arrow-expand-horizontal":985166,"arrow-expand-left":984983,"arrow-expand-right":984984,"arrow-expand-up":984985,"arrow-expand-vertical":985167,"arrow-horizontal-lock":987483,"arrow-left":983117,"arrow-left-bold":984881,"arrow-left-bold-box":984882,"arrow-left-bold-box-outline":984883,"arrow-left-bold-circle":983119,"arrow-left-bold-circle-outline":983120,"arrow-left-bold-hexagon-outline":983121,"arrow-left-bold-outline":985536,"arrow-left-bottom":989093,"arrow-left-bottom-bold":989094,"arrow-left-box":984769,"arrow-left-circle":986333,"arrow-left-circle-outline":986334,"arrow-left-drop-circle":983122,"arrow-left-drop-circle-outline":983123,"arrow-left-right":986739,"arrow-left-right-bold":986740,"arrow-left-right-bold-outline":985537,"arrow-left-thick":983118,"arrow-left-thin":989617,"arrow-left-thin-circle-outline":988570,"arrow-left-top":989095,"arrow-left-top-bold":989096,"arrow-projectile":989248,"arrow-projectile-multiple":989247,"arrow-right":983124,"arrow-right-bold":984884,"arrow-right-bold-box":984885,"arrow-right-bold-box-outline":984886,"arrow-right-bold-circle":983126,"arrow-right-bold-circle-outline":983127,"arrow-right-bold-hexagon-outline":983128,"arrow-right-bold-outline":985538,"arrow-right-bottom":989097,"arrow-right-bottom-bold":989098,"arrow-right-box":984770,"arrow-right-circle":986335,"arrow-right-circle-outline":986336,"arrow-right-drop-circle":983129,"arrow-right-drop-circle-outline":983130,"arrow-right-thick":983125,"arrow-right-thin":989616,"arrow-right-thin-circle-outline":988568,"arrow-right-top":989099,"arrow-right-top-bold":989100,"arrow-split-horizontal":985403,"arrow-split-vertical":985404,"arrow-top-left":983131,"arrow-top-left-bold-box":989544,"arrow-top-left-bold-box-outline":989545,"arrow-top-left-bold-outline":985539,"arrow-top-left-bottom-right":986741,"arrow-top-left-bottom-right-bold":986742,"arrow-top-left-thick":985540,"arrow-top-left-thin":989621,"arrow-top-left-thin-circle-outline":988563,"arrow-top-right":983132,"arrow-top-right-bold-box":989546,"arrow-top-right-bold-box-outline":989547,"arrow-top-right-bold-outline":985541,"arrow-top-right-bottom-left":986743,"arrow-top-right-bottom-left-bold":986744,"arrow-top-right-thick":985542,"arrow-top-right-thin":989620,"arrow-top-right-thin-circle-outline":988564,"arrow-u-down-left":989101,"arrow-u-down-left-bold":989102,"arrow-u-down-right":989103,"arrow-u-down-right-bold":989104,"arrow-u-left-bottom":989105,"arrow-u-left-bottom-bold":989106,"arrow-u-left-top":989107,"arrow-u-left-top-bold":989108,"arrow-u-right-bottom":989109,"arrow-u-right-bottom-bold":989110,"arrow-u-right-top":989111,"arrow-u-right-top-bold":989112,"arrow-u-up-left":989113,"arrow-u-up-left-bold":989114,"arrow-u-up-right":989115,"arrow-u-up-right-bold":989116,"arrow-up":983133,"arrow-up-bold":984887,"arrow-up-bold-box":984888,"arrow-up-bold-box-outline":984889,"arrow-up-bold-circle":983135,"arrow-up-bold-circle-outline":983136,"arrow-up-bold-hexagon-outline":983137,"arrow-up-bold-outline":985543,"arrow-up-box":984771,"arrow-up-circle":986337,"arrow-up-circle-outline":986338,"arrow-up-down":986745,"arrow-up-down-bold":986746,"arrow-up-down-bold-outline":985544,"arrow-up-drop-circle":983138,"arrow-up-drop-circle-outline":983139,"arrow-up-left":989117,"arrow-up-left-bold":989118,"arrow-up-right":989119,"arrow-up-right-bold":989120,"arrow-up-thick":983134,"arrow-up-thin":989618,"arrow-up-thin-circle-outline":988567,"arrow-vertical-lock":987484,"artstation":985947,"aspect-ratio":985636,"assistant":983140,"asterisk":984772,"at":983141,"atlassian":985092,"atm":986439,"atom":984936,"atom-variant":986747,"attachment":983142,"audio-input-rca":989291,"audio-input-stereo-minijack":989292,"audio-input-xlr":989293,"audio-video":985405,"audio-video-off":987574,"augmented-reality":985168,"auto-download":988030,"auto-fix":983144,"auto-upload":983145,"autorenew":983146,"av-timer":983147,"aws":986639,"axe":985288,"axe-battle":989250,"axis":986440,"axis-arrow":986441,"axis-arrow-info":988174,"axis-arrow-lock":986442,"axis-lock":986443,"axis-x-arrow":986444,"axis-x-arrow-lock":986445,"axis-x-rotate-clockwise":986446,"axis-x-rotate-counterclockwise":986447,"axis-x-y-arrow-lock":986448,"axis-y-arrow":986449,"axis-y-arrow-lock":986450,"axis-y-rotate-clockwise":986451,"axis-y-rotate-counterclockwise":986452,"axis-z-arrow":986453,"axis-z-arrow-lock":986454,"axis-z-rotate-clockwise":986455,"axis-z-rotate-counterclockwise":986456,"babel":985637,"baby":983148,"baby-bottle":986937,"baby-bottle-outline":986938,"baby-buggy":988128,"baby-carriage":984719,"baby-carriage-off":987040,"baby-face":986748,"baby-face-outline":986749,"backburger":983149,"backspace":983150,"backspace-outline":985948,"backspace-reverse":986750,"backspace-reverse-outline":986751,"backup-restore":983151,"bacteria":986837,"bacteria-outline":986838,"badge-account":986535,"badge-account-alert":986536,"badge-account-alert-outline":986537,"badge-account-horizontal":986637,"badge-account-horizontal-outline":986638,"badge-account-outline":986538,"badminton":985169,"bag-carry-on":986939,"bag-carry-on-check":986469,"bag-carry-on-off":986940,"bag-checked":986941,"bag-personal":986640,"bag-personal-off":986641,"bag-personal-off-outline":986642,"bag-personal-outline":986643,"bag-suitcase":988555,"bag-suitcase-off":988557,"bag-suitcase-off-outline":988558,"bag-suitcase-outline":988556,"baguette":986942,"balcony":989207,"balloon":985638,"ballot":985545,"ballot-outline":985546,"ballot-recount":986169,"ballot-recount-outline":986170,"bandage":986543,"bank":983152,"bank-check":988757,"bank-minus":986544,"bank-off":988758,"bank-off-outline":988759,"bank-outline":986752,"bank-plus":986545,"bank-remove":986546,"bank-transfer":985639,"bank-transfer-in":985640,"bank-transfer-out":985641,"barcode":983153,"barcode-off":987702,"barcode-scan":983154,"barley":983155,"barley-off":985949,"barn":985950,"barrel":983156,"baseball":985170,"baseball-bat":985171,"baseball-diamond":988652,"baseball-diamond-outline":988653,"bash":987523,"basket":983158,"basket-check":989413,"basket-check-outline":989414,"basket-fill":983159,"basket-minus":988451,"basket-minus-outline":988452,"basket-off":988453,"basket-off-outline":988454,"basket-outline":987521,"basket-plus":988455,"basket-plus-outline":988456,"basket-remove":988457,"basket-remove-outline":988458,"basket-unfill":983160,"basketball":985094,"basketball-hoop":986171,"basketball-hoop-outline":986172,"bat":985951,"bathtub":989208,"bathtub-outline":989209,"battery":983161,"battery-10":983162,"battery-10-bluetooth":985406,"battery-20":983163,"battery-20-bluetooth":985407,"battery-30":983164,"battery-30-bluetooth":985408,"battery-40":983165,"battery-40-bluetooth":985409,"battery-50":983166,"battery-50-bluetooth":985410,"battery-60":983167,"battery-60-bluetooth":985411,"battery-70":983168,"battery-70-bluetooth":985412,"battery-80":983169,"battery-80-bluetooth":985413,"battery-90":983170,"battery-90-bluetooth":985414,"battery-alert":983171,"battery-alert-bluetooth":985415,"battery-alert-variant":987340,"battery-alert-variant-outline":987341,"battery-arrow-down":989150,"battery-arrow-down-outline":989151,"battery-arrow-up":989152,"battery-arrow-up-outline":989153,"battery-bluetooth":985416,"battery-bluetooth-variant":985417,"battery-charging":983172,"battery-charging-10":985244,"battery-charging-100":983173,"battery-charging-20":983174,"battery-charging-30":983175,"battery-charging-40":983176,"battery-charging-50":985245,"battery-charging-60":983177,"battery-charging-70":985246,"battery-charging-80":983178,"battery-charging-90":983179,"battery-charging-high":987814,"battery-charging-low":987812,"battery-charging-medium":987813,"battery-charging-outline":985247,"battery-charging-wireless":985095,"battery-charging-wireless-10":985096,"battery-charging-wireless-20":985097,"battery-charging-wireless-30":985098,"battery-charging-wireless-40":985099,"battery-charging-wireless-50":985100,"battery-charging-wireless-60":985101,"battery-charging-wireless-70":985102,"battery-charging-wireless-80":985103,"battery-charging-wireless-90":985104,"battery-charging-wireless-alert":985105,"battery-charging-wireless-outline":985106,"battery-check":989154,"battery-check-outline":989155,"battery-heart":987663,"battery-heart-outline":987664,"battery-heart-variant":987665,"battery-high":987811,"battery-lock":989084,"battery-lock-open":989085,"battery-low":987809,"battery-medium":987810,"battery-minus":989156,"battery-minus-outline":989157,"battery-minus-variant":983180,"battery-negative":983181,"battery-off":987741,"battery-off-outline":987742,"battery-outline":983182,"battery-plus":989158,"battery-plus-outline":989159,"battery-plus-variant":983183,"battery-positive":983184,"battery-remove":989160,"battery-remove-outline":989161,"battery-sync":989236,"battery-sync-outline":989237,"battery-unknown":983185,"battery-unknown-bluetooth":985418,"beach":983186,"beaker":986346,"beaker-alert":987689,"beaker-alert-outline":987690,"beaker-check":987691,"beaker-check-outline":987692,"beaker-minus":987693,"beaker-minus-outline":987694,"beaker-outline":984720,"beaker-plus":987695,"beaker-plus-outline":987696,"beaker-question":987697,"beaker-question-outline":987698,"beaker-remove":987699,"beaker-remove-outline":987700,"bed":983779,"bed-double":987092,"bed-double-outline":987091,"bed-empty":985248,"bed-king":987090,"bed-king-outline":987089,"bed-outline":983193,"bed-queen":987088,"bed-queen-outline":987099,"bed-single":987245,"bed-single-outline":987246,"bee":987041,"bee-flower":987042,"beehive-off-outline":988141,"beehive-outline":987342,"beekeeper":988386,"beer":983192,"beer-outline":987916,"bell":983194,"bell-alert":986457,"bell-alert-outline":986753,"bell-badge":987499,"bell-badge-outline":983416,"bell-cancel":988135,"bell-cancel-outline":988136,"bell-check":987621,"bell-check-outline":987622,"bell-circle":986458,"bell-circle-outline":986459,"bell-minus":988137,"bell-minus-outline":988138,"bell-off":983195,"bell-off-outline":985745,"bell-outline":983196,"bell-plus":983197,"bell-plus-outline":985746,"bell-remove":988139,"bell-remove-outline":988140,"bell-ring":983198,"bell-ring-outline":983199,"bell-sleep":983200,"bell-sleep-outline":985747,"beta":983201,"betamax":985547,"biathlon":986644,"bicycle":987292,"bicycle-basket":987701,"bicycle-cargo":989340,"bicycle-electric":988596,"bicycle-penny-farthing":988649,"bike":983203,"bike-fast":987423,"billboard":987152,"billiards":985953,"billiards-rack":985954,"binoculars":983205,"bio":983206,"biohazard":983207,"bird":988614,"bitbucket":983208,"bitcoin":985107,"black-mesa":983209,"blender":986347,"blender-outline":989210,"blender-software":983211,"blinds":983212,"blinds-open":987153,"block-helper":983213,"blood-bag":986348,"bluetooth":983215,"bluetooth-audio":983216,"bluetooth-connect":983217,"bluetooth-off":983218,"bluetooth-settings":983219,"bluetooth-transfer":983220,"blur":983221,"blur-linear":983222,"blur-off":983223,"blur-radial":983224,"bolt":986547,"bomb":984721,"bomb-off":984773,"bone":983225,"book":983226,"book-account":988077,"book-account-outline":988078,"book-alert":988796,"book-alert-outline":988797,"book-alphabet":984605,"book-arrow-down":988798,"book-arrow-down-outline":988799,"book-arrow-left":988800,"book-arrow-left-outline":988801,"book-arrow-right":988802,"book-arrow-right-outline":988803,"book-arrow-up":988804,"book-arrow-up-outline":988805,"book-cancel":988806,"book-cancel-outline":988807,"book-check":988403,"book-check-outline":988404,"book-clock":988808,"book-clock-outline":988809,"book-cog":988810,"book-cog-outline":988811,"book-cross":983202,"book-edit":988812,"book-edit-outline":988813,"book-education":988873,"book-education-outline":988874,"book-information-variant":987247,"book-lock":984986,"book-lock-open":984987,"book-lock-open-outline":988814,"book-lock-outline":988815,"book-marker":988816,"book-marker-outline":988817,"book-minus":984537,"book-minus-multiple":985748,"book-minus-multiple-outline":985355,"book-minus-outline":988818,"book-multiple":983227,"book-multiple-outline":984118,"book-music":983143,"book-music-outline":988819,"book-off":988820,"book-off-outline":988821,"book-open":983229,"book-open-blank-variant":983230,"book-open-outline":985955,"book-open-page-variant":984538,"book-open-page-variant-outline":988630,"book-open-variant":988407,"book-outline":985956,"book-play":986754,"book-play-outline":986755,"book-plus":984539,"book-plus-multiple":985749,"book-plus-multiple-outline":985822,"book-plus-outline":988822,"book-refresh":988823,"book-refresh-outline":988824,"book-remove":985751,"book-remove-multiple":985750,"book-remove-multiple-outline":984266,"book-remove-outline":988825,"book-search":986756,"book-search-outline":986757,"book-settings":988826,"book-settings-outline":988827,"book-sync":988828,"book-sync-outline":988872,"book-variant":983231,"book-variant-multiple":983228,"bookmark":983232,"bookmark-box-multiple":989548,"bookmark-box-multiple-outline":989549,"bookmark-check":983233,"bookmark-check-outline":988027,"bookmark-minus":985548,"bookmark-minus-outline":985549,"bookmark-multiple":986645,"bookmark-multiple-outline":986646,"bookmark-music":983234,"bookmark-music-outline":988025,"bookmark-off":985550,"bookmark-off-outline":985551,"bookmark-outline":983235,"bookmark-plus":983237,"bookmark-plus-outline":983236,"bookmark-remove":983238,"bookmark-remove-outline":988026,"bookshelf":987743,"boom-gate":986758,"boom-gate-alert":986759,"boom-gate-alert-outline":986760,"boom-gate-arrow-down":986761,"boom-gate-arrow-down-outline":986762,"boom-gate-arrow-up":986764,"boom-gate-arrow-up-outline":986765,"boom-gate-outline":986763,"boom-gate-up":989177,"boom-gate-up-outline":989178,"boombox":984540,"boomerang":987343,"bootstrap":984774,"border-all":983239,"border-all-variant":985249,"border-bottom":983240,"border-bottom-variant":985250,"border-color":983241,"border-horizontal":983242,"border-inside":983243,"border-left":983244,"border-left-variant":985251,"border-none":983245,"border-none-variant":985252,"border-outside":983246,"border-right":983247,"border-right-variant":985253,"border-style":983248,"border-top":983249,"border-top-variant":985254,"border-vertical":983250,"bottle-soda":987248,"bottle-soda-classic":987249,"bottle-soda-classic-outline":988003,"bottle-soda-outline":987250,"bottle-tonic":987438,"bottle-tonic-outline":987439,"bottle-tonic-plus":987440,"bottle-tonic-plus-outline":987441,"bottle-tonic-skull":987442,"bottle-tonic-skull-outline":987443,"bottle-wine":985172,"bottle-wine-outline":987920,"bow-arrow":989249,"bow-tie":984696,"bowl":983694,"bowl-mix":984599,"bowl-mix-outline":983780,"bowl-outline":983721,"bowling":983251,"box":983252,"box-cutter":983253,"box-cutter-off":985930,"box-shadow":984631,"boxing-glove":985957,"braille":985552,"brain":985553,"bread-slice":986350,"bread-slice-outline":986351,"bridge":984600,"briefcase":983254,"briefcase-account":986352,"briefcase-account-outline":986353,"briefcase-check":983255,"briefcase-check-outline":987934,"briefcase-clock":987344,"briefcase-clock-outline":987345,"briefcase-download":983256,"briefcase-download-outline":986173,"briefcase-edit":985752,"briefcase-edit-outline":986174,"briefcase-eye":989145,"briefcase-eye-outline":989146,"briefcase-minus":985642,"briefcase-minus-outline":986175,"briefcase-off":988760,"briefcase-off-outline":988761,"briefcase-outline":985108,"briefcase-plus":985643,"briefcase-plus-outline":986176,"briefcase-remove":985644,"briefcase-remove-outline":986177,"briefcase-search":985645,"briefcase-search-outline":986178,"briefcase-upload":983257,"briefcase-upload-outline":986179,"briefcase-variant":988308,"briefcase-variant-off":988762,"briefcase-variant-off-outline":988763,"briefcase-variant-outline":988309,"brightness-1":983258,"brightness-2":983259,"brightness-3":983260,"brightness-4":983261,"brightness-5":983262,"brightness-6":983263,"brightness-7":983264,"brightness-auto":983265,"brightness-percent":986354,"broadcast":988960,"broadcast-off":988961,"broom":983266,"brush":983267,"brush-off":989041,"brush-variant":989203,"bucket":988181,"bucket-outline":988182,"buffet":984440,"bug":983268,"bug-check":985646,"bug-check-outline":985647,"bug-outline":985648,"bugle":986548,"bulldozer":985890,"bullet":986355,"bulletin-board":983269,"bullhorn":983270,"bullhorn-outline":985891,"bullhorn-variant":989550,"bullhorn-variant-outline":989551,"bullseye":984541,"bullseye-arrow":985289,"bulma":987879,"bunk-bed":987906,"bunk-bed-outline":983191,"bus":983271,"bus-alert":985753,"bus-articulated-end":984988,"bus-articulated-front":984989,"bus-clock":985290,"bus-double-decker":984990,"bus-electric":989469,"bus-marker":987666,"bus-multiple":986943,"bus-school":984991,"bus-side":984992,"bus-stop":987154,"bus-stop-covered":987155,"bus-stop-uncovered":987156,"butterfly":988553,"butterfly-outline":988554,"cabin-a-frame":989324,"cable-data":988052,"cached":983272,"cactus":986549,"cake":983273,"cake-layered":983274,"cake-variant":983275,"cake-variant-outline":989168,"calculator":983276,"calculator-variant":985754,"calculator-variant-outline":988582,"calendar":983277,"calendar-account":986839,"calendar-account-outline":986840,"calendar-alert":985649,"calendar-arrow-left":987444,"calendar-arrow-right":987445,"calendar-blank":983278,"calendar-blank-multiple":987251,"calendar-blank-outline":985958,"calendar-check":983279,"calendar-check-outline":986180,"calendar-clock":983280,"calendar-clock-outline":988897,"calendar-collapse-horizontal":989341,"calendar-cursor":988539,"calendar-edit":985255,"calendar-end":988780,"calendar-expand-horizontal":989342,"calendar-export":985892,"calendar-heart":985554,"calendar-import":985893,"calendar-lock":988737,"calendar-lock-outline":988738,"calendar-minus":986460,"calendar-month":986647,"calendar-month-outline":986648,"calendar-multiple":983281,"calendar-multiple-check":983282,"calendar-multiselect":985650,"calendar-outline":985959,"calendar-plus":983283,"calendar-question":984722,"calendar-range":984697,"calendar-range-outline":985960,"calendar-refresh":983521,"calendar-refresh-outline":983555,"calendar-remove":983284,"calendar-remove-outline":986181,"calendar-search":985420,"calendar-star":985555,"calendar-start":988781,"calendar-sync":986766,"calendar-sync-outline":986767,"calendar-text":983285,"calendar-text-outline":986182,"calendar-today":983286,"calendar-week":985651,"calendar-week-begin":985652,"calendar-weekend":986841,"calendar-weekend-outline":986842,"call-made":983287,"call-merge":983288,"call-missed":983289,"call-received":983290,"call-split":983291,"camcorder":983292,"camcorder-off":983295,"camera":983296,"camera-account":985291,"camera-burst":984723,"camera-control":985961,"camera-document":989297,"camera-document-off":989298,"camera-enhance":983297,"camera-enhance-outline":985962,"camera-flip":988633,"camera-flip-outline":988634,"camera-front":983298,"camera-front-variant":983299,"camera-gopro":984993,"camera-image":985292,"camera-iris":983300,"camera-marker":989607,"camera-marker-outline":989608,"camera-metering-center":984994,"camera-metering-matrix":984995,"camera-metering-partial":984996,"camera-metering-spot":984997,"camera-off":984543,"camera-off-outline":989631,"camera-outline":986461,"camera-party-mode":983301,"camera-plus":986843,"camera-plus-outline":986844,"camera-rear":983302,"camera-rear-variant":983303,"camera-retake":986649,"camera-retake-outline":986650,"camera-switch":983304,"camera-switch-outline":985162,"camera-timer":983305,"camera-wireless":986550,"camera-wireless-outline":986551,"campfire":986845,"cancel":984890,"candelabra":989138,"candelabra-fire":989139,"candle":984546,"candy":989552,"candy-off":989553,"candy-off-outline":989554,"candy-outline":989555,"candycane":983306,"cannabis":984998,"cannabis-off":988782,"caps-lock":985755,"car":983307,"car-2-plus":987157,"car-3-plus":987158,"car-arrow-left":988082,"car-arrow-right":988083,"car-back":986651,"car-battery":983308,"car-brake-abs":986183,"car-brake-alert":986184,"car-brake-fluid-level":989449,"car-brake-hold":986462,"car-brake-low-pressure":989450,"car-brake-parking":986463,"car-brake-retarder":987159,"car-brake-temperature":989451,"car-brake-worn-linings":989452,"car-child-seat":987043,"car-clock":989556,"car-clutch":987160,"car-cog":988108,"car-connected":983309,"car-convertible":984999,"car-coolant-level":987161,"car-cruise-control":986464,"car-defrost-front":986465,"car-defrost-rear":986466,"car-door":985963,"car-door-lock":987293,"car-electric":985964,"car-electric-outline":988597,"car-emergency":988687,"car-esp":986185,"car-estate":985000,"car-hatchback":985001,"car-info":987582,"car-key":985965,"car-lifted-pickup":988461,"car-light-alert":989453,"car-light-dimmed":986186,"car-light-fog":986187,"car-light-high":986188,"car-limousine":985293,"car-multiple":985966,"car-off":986652,"car-outline":988397,"car-parking-lights":986467,"car-pickup":985002,"car-seat":987044,"car-seat-cooler":987045,"car-seat-heater":987046,"car-select":989305,"car-settings":988109,"car-shift-pattern":986944,"car-side":985003,"car-speed-limiter":989454,"car-sports":985004,"car-tire-alert":986189,"car-traction-control":986468,"car-turbocharger":987162,"car-wash":983310,"car-windshield":987163,"car-windshield-outline":987164,"car-wireless":989304,"car-wrench":989204,"carabiner":988352,"caravan":985005,"card":985967,"card-account-details":984530,"card-account-details-outline":986539,"card-account-details-star":983715,"card-account-details-star-outline":984795,"card-account-mail":983438,"card-account-mail-outline":986776,"card-account-phone":986777,"card-account-phone-outline":986778,"card-bulleted":985968,"card-bulleted-off":985969,"card-bulleted-off-outline":985970,"card-bulleted-outline":985971,"card-bulleted-settings":985972,"card-bulleted-settings-outline":985973,"card-minus":988672,"card-minus-outline":988673,"card-multiple":989169,"card-multiple-outline":989170,"card-off":988674,"card-off-outline":988675,"card-outline":985974,"card-plus":987647,"card-plus-outline":987648,"card-remove":988676,"card-remove-outline":988677,"card-search":987252,"card-search-outline":987253,"card-text":985975,"card-text-outline":985976,"cards":984632,"cards-club":985294,"cards-club-outline":989343,"cards-diamond":985295,"cards-diamond-outline":987165,"cards-heart":985296,"cards-heart-outline":989344,"cards-outline":984633,"cards-playing":989345,"cards-playing-club":989346,"cards-playing-club-multiple":989347,"cards-playing-club-multiple-outline":989348,"cards-playing-club-outline":989349,"cards-playing-diamond":989350,"cards-playing-diamond-multiple":989351,"cards-playing-diamond-multiple-outline":989352,"cards-playing-diamond-outline":989353,"cards-playing-heart":989354,"cards-playing-heart-multiple":989355,"cards-playing-heart-multiple-outline":989356,"cards-playing-heart-outline":989357,"cards-playing-outline":984634,"cards-playing-spade":989358,"cards-playing-spade-multiple":989359,"cards-playing-spade-multiple-outline":989360,"cards-playing-spade-outline":989361,"cards-spade":985297,"cards-spade-outline":989362,"cards-variant":984775,"carrot":983311,"cart":983312,"cart-arrow-down":986470,"cart-arrow-right":986190,"cart-arrow-up":986471,"cart-check":988650,"cart-heart":989408,"cart-minus":986472,"cart-off":984683,"cart-outline":983313,"cart-plus":983314,"cart-remove":986473,"cart-variant":988651,"case-sensitive-alt":983315,"cash":983316,"cash-100":983317,"cash-check":988398,"cash-fast":989276,"cash-lock":988394,"cash-lock-open":988395,"cash-marker":986552,"cash-minus":987744,"cash-multiple":983318,"cash-plus":987745,"cash-refund":985756,"cash-register":986356,"cash-remove":987746,"cassette":985556,"cast":983320,"cast-audio":987166,"cast-audio-variant":989001,"cast-connected":983321,"cast-education":986653,"cast-off":984970,"cast-variant":983071,"castle":983322,"cat":983323,"cctv":985006,"cctv-off":989279,"ceiling-fan":989079,"ceiling-fan-light":989080,"ceiling-light":984937,"ceiling-light-multiple":989405,"ceiling-light-multiple-outline":989406,"ceiling-light-outline":989127,"cellphone":983324,"cellphone-arrow-down":985557,"cellphone-basic":983326,"cellphone-charging":988055,"cellphone-check":989181,"cellphone-cog":985425,"cellphone-dock":983327,"cellphone-information":986945,"cellphone-key":985422,"cellphone-link":983329,"cellphone-link-off":983330,"cellphone-lock":985423,"cellphone-marker":989242,"cellphone-message":985299,"cellphone-message-off":987346,"cellphone-nfc":986768,"cellphone-nfc-off":987864,"cellphone-off":985424,"cellphone-play":987167,"cellphone-remove":985421,"cellphone-screenshot":985653,"cellphone-settings":983331,"cellphone-sound":985426,"cellphone-text":985298,"cellphone-wireless":985109,"centos":987418,"certificate":983332,"certificate-outline":987528,"chair-rolling":986952,"chair-school":983333,"chandelier":989075,"charity":986191,"chart-arc":983334,"chart-areaspline":983335,"chart-areaspline-variant":986769,"chart-bar":983336,"chart-bar-stacked":984938,"chart-bell-curve":986192,"chart-bell-curve-cumulative":987047,"chart-box":988493,"chart-box-outline":988494,"chart-box-plus-outline":988495,"chart-bubble":984547,"chart-donut":985007,"chart-donut-variant":985008,"chart-gantt":984684,"chart-histogram":983337,"chart-line":983338,"chart-line-stacked":984939,"chart-line-variant":985009,"chart-multiline":985300,"chart-multiple":987667,"chart-pie":983339,"chart-ppf":988032,"chart-sankey":987615,"chart-sankey-variant":987616,"chart-scatter-plot":986770,"chart-scatter-plot-hexbin":984685,"chart-timeline":984686,"chart-timeline-variant":986771,"chart-timeline-variant-shimmer":988598,"chart-tree":986772,"chart-waterfall":989464,"chat":985977,"chat-alert":985978,"chat-alert-outline":987849,"chat-minus":988176,"chat-minus-outline":988179,"chat-outline":986846,"chat-plus":988175,"chat-plus-outline":988178,"chat-processing":985979,"chat-processing-outline":987850,"chat-question":988984,"chat-question-outline":988985,"chat-remove":988177,"chat-remove-outline":988180,"chat-sleep":987857,"chat-sleep-outline":987858,"check":983340,"check-all":983341,"check-bold":986654,"check-circle":984544,"check-circle-outline":984545,"check-decagram":984977,"check-decagram-outline":988992,"check-network":986195,"check-network-outline":986196,"check-outline":985173,"check-underline":986655,"check-underline-circle":986656,"check-underline-circle-outline":986657,"checkbook":985757,"checkbox-blank":983342,"checkbox-blank-badge":987510,"checkbox-blank-badge-outline":983319,"checkbox-blank-circle":983343,"checkbox-blank-circle-outline":983344,"checkbox-blank-off":987884,"checkbox-blank-off-outline":987885,"checkbox-blank-outline":983345,"checkbox-intermediate":985174,"checkbox-marked":983346,"checkbox-marked-circle":983347,"checkbox-marked-circle-outline":983348,"checkbox-marked-circle-plus-outline":989479,"checkbox-marked-outline":983349,"checkbox-multiple-blank":983350,"checkbox-multiple-blank-circle":984635,"checkbox-multiple-blank-circle-outline":984636,"checkbox-multiple-blank-outline":983351,"checkbox-multiple-marked":983352,"checkbox-multiple-marked-circle":984637,"checkbox-multiple-marked-circle-outline":984638,"checkbox-multiple-marked-outline":983353,"checkbox-multiple-outline":986193,"checkbox-outline":986194,"checkerboard":983354,"checkerboard-minus":987650,"checkerboard-plus":987649,"checkerboard-remove":987651,"cheese":987833,"cheese-off":988142,"chef-hat":985980,"chemical-weapon":983355,"chess-bishop":985180,"chess-king":985175,"chess-knight":985176,"chess-pawn":985177,"chess-queen":985178,"chess-rook":985179,"chevron-double-down":983356,"chevron-double-left":983357,"chevron-double-right":983358,"chevron-double-up":983359,"chevron-down":983360,"chevron-down-box":985558,"chevron-down-box-outline":985559,"chevron-down-circle":985894,"chevron-down-circle-outline":985895,"chevron-left":983361,"chevron-left-box":985560,"chevron-left-box-outline":985561,"chevron-left-circle":985896,"chevron-left-circle-outline":985897,"chevron-right":983362,"chevron-right-box":985562,"chevron-right-box-outline":985563,"chevron-right-circle":985898,"chevron-right-circle-outline":985899,"chevron-triple-down":986553,"chevron-triple-left":986554,"chevron-triple-right":986555,"chevron-triple-up":986556,"chevron-up":983363,"chevron-up-box":985564,"chevron-up-box-outline":985565,"chevron-up-circle":985900,"chevron-up-circle-outline":985901,"chili-alert":989162,"chili-alert-outline":989163,"chili-hot":985010,"chili-hot-outline":989164,"chili-medium":985011,"chili-medium-outline":989165,"chili-mild":985012,"chili-mild-outline":989166,"chili-off":988263,"chili-off-outline":989167,"chip":984602,"church":983364,"cigar":987529,"cigar-off":988187,"circle":984933,"circle-box":988636,"circle-box-outline":988637,"circle-double":986773,"circle-edit-outline":985301,"circle-expand":986774,"circle-half":988053,"circle-half-full":988054,"circle-medium":985566,"circle-multiple":985912,"circle-multiple-outline":984725,"circle-off-outline":987347,"circle-opacity":989267,"circle-outline":984934,"circle-slice-1":985758,"circle-slice-2":985759,"circle-slice-3":985760,"circle-slice-4":985761,"circle-slice-5":985762,"circle-slice-6":985763,"circle-slice-7":985764,"circle-slice-8":985765,"circle-small":985567,"circular-saw":986658,"city":983366,"city-variant":985654,"city-variant-outline":985655,"clipboard":983367,"clipboard-account":983368,"clipboard-account-outline":986197,"clipboard-alert":983369,"clipboard-alert-outline":986359,"clipboard-arrow-down":983370,"clipboard-arrow-down-outline":986198,"clipboard-arrow-left":983371,"clipboard-arrow-left-outline":986360,"clipboard-arrow-right":986361,"clipboard-arrow-right-outline":986362,"clipboard-arrow-up":986199,"clipboard-arrow-up-outline":986200,"clipboard-check":983374,"clipboard-check-multiple":987747,"clipboard-check-multiple-outline":987748,"clipboard-check-outline":985256,"clipboard-clock":988898,"clipboard-clock-outline":988899,"clipboard-edit":988389,"clipboard-edit-outline":988390,"clipboard-file":987749,"clipboard-file-outline":987750,"clipboard-flow":984776,"clipboard-flow-outline":987415,"clipboard-list":987348,"clipboard-list-outline":987349,"clipboard-minus":988696,"clipboard-minus-outline":988697,"clipboard-multiple":987751,"clipboard-multiple-outline":987752,"clipboard-off":988698,"clipboard-off-outline":988699,"clipboard-outline":983372,"clipboard-play":986201,"clipboard-play-multiple":987753,"clipboard-play-multiple-outline":987754,"clipboard-play-outline":986202,"clipboard-plus":984913,"clipboard-plus-outline":987935,"clipboard-pulse":985181,"clipboard-pulse-outline":985182,"clipboard-remove":988700,"clipboard-remove-outline":988701,"clipboard-search":988702,"clipboard-search-outline":988703,"clipboard-text":983373,"clipboard-text-clock":989433,"clipboard-text-clock-outline":989434,"clipboard-text-multiple":987755,"clipboard-text-multiple-outline":987756,"clipboard-text-off":988704,"clipboard-text-off-outline":988705,"clipboard-text-outline":985656,"clipboard-text-play":986203,"clipboard-text-play-outline":986204,"clipboard-text-search":988706,"clipboard-text-search-outline":988707,"clippy":983375,"clock":985428,"clock-alert":985429,"clock-alert-outline":984526,"clock-check":987048,"clock-check-outline":987049,"clock-digital":986775,"clock-edit":989626,"clock-edit-outline":989627,"clock-end":983377,"clock-fast":983378,"clock-in":983379,"clock-minus":989283,"clock-minus-outline":989284,"clock-out":983380,"clock-outline":983376,"clock-plus":989281,"clock-plus-outline":989282,"clock-remove":989285,"clock-remove-outline":989286,"clock-start":983381,"clock-time-eight":988230,"clock-time-eight-outline":988242,"clock-time-eleven":988233,"clock-time-eleven-outline":988245,"clock-time-five":988227,"clock-time-five-outline":988239,"clock-time-four":988226,"clock-time-four-outline":988238,"clock-time-nine":988231,"clock-time-nine-outline":988243,"clock-time-one":988223,"clock-time-one-outline":988235,"clock-time-seven":988229,"clock-time-seven-outline":988241,"clock-time-six":988228,"clock-time-six-outline":988240,"clock-time-ten":988232,"clock-time-ten-outline":988244,"clock-time-three":988225,"clock-time-three-outline":988237,"clock-time-twelve":988234,"clock-time-twelve-outline":988246,"clock-time-two":988224,"clock-time-two-outline":988236,"close":983382,"close-box":983383,"close-box-multiple":986205,"close-box-multiple-outline":986206,"close-box-outline":983384,"close-circle":983385,"close-circle-multiple":984618,"close-circle-multiple-outline":985219,"close-circle-outline":983386,"close-network":983387,"close-network-outline":986207,"close-octagon":983388,"close-octagon-outline":983389,"close-outline":984777,"close-thick":988056,"closed-caption":983390,"closed-caption-outline":986557,"cloud":983391,"cloud-alert":985568,"cloud-braces":985013,"cloud-check":983392,"cloud-check-outline":987852,"cloud-circle":983393,"cloud-download":983394,"cloud-download-outline":985981,"cloud-lock":987633,"cloud-lock-outline":987634,"cloud-off-outline":983396,"cloud-outline":983395,"cloud-print":983397,"cloud-print-outline":983398,"cloud-question":985657,"cloud-refresh":984362,"cloud-search":985430,"cloud-search-outline":985431,"cloud-sync":984639,"cloud-sync-outline":987862,"cloud-tags":985014,"cloud-upload":983399,"cloud-upload-outline":985982,"clover":985110,"coach-lamp":987168,"coat-rack":987294,"code-array":983400,"code-braces":983401,"code-braces-box":987350,"code-brackets":983402,"code-equal":983403,"code-greater-than":983404,"code-greater-than-or-equal":983405,"code-json":984614,"code-less-than":983406,"code-less-than-or-equal":983407,"code-not-equal":983408,"code-not-equal-variant":983409,"code-parentheses":983410,"code-parentheses-box":987351,"code-string":983411,"code-tags":983412,"code-tags-check":984724,"codepen":983413,"coffee":983414,"coffee-maker":987295,"coffee-maker-check":989489,"coffee-maker-check-outline":989490,"coffee-maker-outline":989211,"coffee-off":987050,"coffee-off-outline":987051,"coffee-outline":984778,"coffee-to-go":983415,"coffee-to-go-outline":987918,"coffin":985983,"cog":984211,"cog-box":984212,"cog-clockwise":987613,"cog-counterclockwise":987614,"cog-off":988110,"cog-off-outline":988111,"cog-outline":985275,"cog-pause":989491,"cog-pause-outline":989492,"cog-play":989493,"cog-play-outline":989494,"cog-refresh":988254,"cog-refresh-outline":988255,"cog-stop":989495,"cog-stop-outline":989496,"cog-sync":988256,"cog-sync-outline":988257,"cog-transfer":987227,"cog-transfer-outline":987228,"cogs":985302,"collage":984640,"collapse-all":985766,"collapse-all-outline":985767,"color-helper":983417,"comma":986659,"comma-box":986667,"comma-box-outline":986660,"comma-circle":986661,"comma-circle-outline":986662,"comment":983418,"comment-account":983419,"comment-account-outline":983420,"comment-alert":983421,"comment-alert-outline":983422,"comment-arrow-left":985569,"comment-arrow-left-outline":985570,"comment-arrow-right":985571,"comment-arrow-right-outline":985572,"comment-bookmark":988590,"comment-bookmark-outline":988591,"comment-check":983423,"comment-check-outline":983424,"comment-edit":987583,"comment-edit-outline":987844,"comment-eye":985658,"comment-eye-outline":985659,"comment-flash":988592,"comment-flash-outline":988593,"comment-minus":988639,"comment-minus-outline":988640,"comment-multiple":985183,"comment-multiple-outline":983425,"comment-off":988641,"comment-off-outline":988642,"comment-outline":983426,"comment-plus":985573,"comment-plus-outline":983427,"comment-processing":983428,"comment-processing-outline":983429,"comment-question":985111,"comment-question-outline":983430,"comment-quote":987169,"comment-quote-outline":987170,"comment-remove":984542,"comment-remove-outline":983431,"comment-search":985660,"comment-search-outline":985661,"comment-text":983432,"comment-text-multiple":985184,"comment-text-multiple-outline":985185,"comment-text-outline":983433,"compare":983434,"compare-horizontal":988306,"compare-remove":989363,"compare-vertical":988307,"compass":983435,"compass-off":985984,"compass-off-outline":985985,"compass-outline":983436,"compass-rose":988034,"cone":989516,"cone-off":989517,"connection":988694,"console":983437,"console-line":985015,"console-network":985257,"console-network-outline":986208,"consolidate":987352,"contactless-payment":986474,"contactless-payment-circle":983841,"contactless-payment-circle-outline":984072,"contacts":984779,"contacts-outline":984504,"contain":985662,"contain-end":985663,"contain-start":985664,"content-copy":983439,"content-cut":983440,"content-duplicate":983441,"content-paste":983442,"content-save":983443,"content-save-alert":986946,"content-save-alert-outline":986947,"content-save-all":983444,"content-save-all-outline":986948,"content-save-check":989418,"content-save-check-outline":989419,"content-save-cog":988251,"content-save-cog-outline":988252,"content-save-edit":986363,"content-save-edit-outline":986364,"content-save-move":986663,"content-save-move-outline":986664,"content-save-off":988739,"content-save-off-outline":988740,"content-save-outline":985112,"content-save-settings":984603,"content-save-settings-outline":985902,"contrast":983445,"contrast-box":983446,"contrast-circle":983447,"controller-classic":985986,"controller-classic-outline":985987,"cookie":983448,"cookie-alert":988880,"cookie-alert-outline":988881,"cookie-check":988882,"cookie-check-outline":988883,"cookie-clock":988900,"cookie-clock-outline":988901,"cookie-cog":988884,"cookie-cog-outline":988885,"cookie-edit":988902,"cookie-edit-outline":988903,"cookie-lock":988904,"cookie-lock-outline":988905,"cookie-minus":988890,"cookie-minus-outline":988891,"cookie-off":988906,"cookie-off-outline":988907,"cookie-outline":988894,"cookie-plus":988886,"cookie-plus-outline":988887,"cookie-refresh":988908,"cookie-refresh-outline":988909,"cookie-remove":988888,"cookie-remove-outline":988889,"cookie-settings":988892,"cookie-settings-outline":988893,"coolant-temperature":984008,"copyleft":989497,"copyright":984550,"cordova":985432,"corn":985016,"corn-off":988143,"cosine-wave":988281,"counter":983449,"countertop":989212,"countertop-outline":989213,"cow":983450,"cow-off":989436,"cpu-32-bit":986847,"cpu-64-bit":986848,"cradle":989579,"cradle-outline":989585,"crane":985186,"creation":984692,"creative-commons":986475,"credit-card":987119,"credit-card-check":988112,"credit-card-check-outline":988113,"credit-card-chip":989455,"credit-card-chip-outline":989456,"credit-card-clock":986849,"credit-card-clock-outline":986850,"credit-card-edit":989143,"credit-card-edit-outline":989144,"credit-card-fast":989457,"credit-card-fast-outline":989458,"credit-card-lock":989415,"credit-card-lock-outline":989416,"credit-card-marker":984744,"credit-card-marker-outline":986558,"credit-card-minus":987052,"credit-card-minus-outline":987053,"credit-card-multiple":987120,"credit-card-multiple-outline":983452,"credit-card-off":987121,"credit-card-off-outline":984548,"credit-card-outline":983451,"credit-card-plus":987122,"credit-card-plus-outline":984694,"credit-card-refresh":988741,"credit-card-refresh-outline":988742,"credit-card-refund":987123,"credit-card-refund-outline":985768,"credit-card-remove":987054,"credit-card-remove-outline":987055,"credit-card-scan":987124,"credit-card-scan-outline":983453,"credit-card-search":988743,"credit-card-search-outline":988744,"credit-card-settings":987125,"credit-card-settings-outline":985303,"credit-card-sync":988745,"credit-card-sync-outline":988746,"credit-card-wireless":985090,"credit-card-wireless-off":984442,"credit-card-wireless-off-outline":984443,"credit-card-wireless-outline":986476,"cricket":986477,"crop":983454,"crop-free":983455,"crop-landscape":983456,"crop-portrait":983457,"crop-rotate":984726,"crop-square":983458,"cross":985427,"cross-bolnisi":986349,"cross-celtic":986357,"cross-outline":986358,"crosshairs":983459,"crosshairs-gps":983460,"crosshairs-off":986949,"crosshairs-question":987446,"crowd":989557,"crown":983461,"crown-circle":989148,"crown-circle-outline":989149,"crown-outline":987600,"cryengine":985433,"crystal-ball":985903,"cube":983462,"cube-off":988188,"cube-off-outline":988189,"cube-outline":983463,"cube-scan":985988,"cube-send":983464,"cube-unfolded":983465,"cup":983466,"cup-off":984549,"cup-off-outline":988029,"cup-outline":987919,"cup-water":983467,"cupboard":986950,"cupboard-outline":986951,"cupcake":985434,"curling":985187,"currency-bdt":985188,"currency-brl":985989,"currency-btc":983468,"currency-cny":985018,"currency-eth":985019,"currency-eur":983469,"currency-eur-off":987925,"currency-gbp":983470,"currency-ils":986209,"currency-inr":983471,"currency-jpy":985020,"currency-krw":985021,"currency-kzt":985189,"currency-mnt":988434,"currency-ngn":983472,"currency-php":985574,"currency-rial":986780,"currency-rub":983473,"currency-rupee":989558,"currency-sign":985022,"currency-try":983474,"currency-twd":985023,"currency-usd":983489,"currency-usd-off":984698,"current-ac":988288,"current-dc":985436,"cursor-default":983488,"cursor-default-click":986365,"cursor-default-click-outline":986366,"cursor-default-gesture":987431,"cursor-default-gesture-outline":987432,"cursor-default-outline":983487,"cursor-move":983486,"cursor-pointer":983485,"cursor-text":984551,"curtains":989254,"curtains-closed":989255,"cylinder":989518,"cylinder-off":989519,"dance-ballroom":988667,"dance-pole":988536,"data-matrix":988476,"data-matrix-edit":988477,"data-matrix-minus":988478,"data-matrix-plus":988479,"data-matrix-remove":988480,"data-matrix-scan":988481,"database":983484,"database-alert":988730,"database-alert-outline":988708,"database-arrow-down":988731,"database-arrow-down-outline":988709,"database-arrow-left":988732,"database-arrow-left-outline":988710,"database-arrow-right":988733,"database-arrow-right-outline":988711,"database-arrow-up":988734,"database-arrow-up-outline":988712,"database-check":985769,"database-check-outline":988713,"database-clock":988735,"database-clock-outline":988714,"database-cog":988747,"database-cog-outline":988748,"database-edit":985990,"database-edit-outline":988715,"database-export":985438,"database-export-outline":988716,"database-eye":989471,"database-eye-off":989472,"database-eye-off-outline":989473,"database-eye-outline":989474,"database-import":985437,"database-import-outline":988717,"database-lock":985770,"database-lock-outline":988718,"database-marker":987894,"database-marker-outline":988719,"database-minus":983483,"database-minus-outline":988720,"database-off":988736,"database-off-outline":988721,"database-outline":988722,"database-plus":983482,"database-plus-outline":988723,"database-refresh":984514,"database-refresh-outline":988724,"database-remove":986368,"database-remove-outline":988725,"database-search":985190,"database-search-outline":988726,"database-settings":986369,"database-settings-outline":988727,"database-sync":986367,"database-sync-outline":988728,"death-star":985304,"death-star-variant":985305,"deathly-hallows":985991,"debian":985306,"debug-step-into":983481,"debug-step-out":983480,"debug-step-over":983479,"decagram":984940,"decagram-outline":984941,"decimal":987297,"decimal-comma":987298,"decimal-comma-decrease":987299,"decimal-comma-increase":987300,"decimal-decrease":983478,"decimal-increase":983477,"delete":983476,"delete-alert":987301,"delete-alert-outline":987302,"delete-circle":984707,"delete-circle-outline":985992,"delete-clock":988502,"delete-clock-outline":988503,"delete-empty":984780,"delete-empty-outline":986781,"delete-forever":984552,"delete-forever-outline":985993,"delete-off":987303,"delete-off-outline":987304,"delete-outline":985575,"delete-restore":985113,"delete-sweep":984553,"delete-sweep-outline":986210,"delete-variant":983475,"delta":983490,"desk":987705,"desk-lamp":985439,"deskphone":983491,"desktop-classic":985024,"desktop-mac":983492,"desktop-mac-dashboard":985576,"desktop-tower":983493,"desktop-tower-monitor":985771,"details":983494,"dev-to":986478,"developer-board":984727,"deviantart":983495,"devices":987056,"dharmachakra":985419,"diabetes":987430,"dialpad":984604,"diameter":986211,"diameter-outline":986212,"diameter-variant":986213,"diamond":985994,"diamond-outline":985995,"diamond-stone":983496,"dice-1":983498,"dice-1-outline":987466,"dice-2":983499,"dice-2-outline":987467,"dice-3":983500,"dice-3-outline":987468,"dice-4":983501,"dice-4-outline":987469,"dice-5":983502,"dice-5-outline":987470,"dice-6":983503,"dice-6-outline":987471,"dice-d10":987475,"dice-d10-outline":984943,"dice-d12":987476,"dice-d12-outline":985191,"dice-d20":987477,"dice-d20-outline":984554,"dice-d4":987472,"dice-d4-outline":984555,"dice-d6":987473,"dice-d6-outline":984557,"dice-d8":987474,"dice-d8-outline":984556,"dice-multiple":984942,"dice-multiple-outline":987478,"digital-ocean":987703,"dip-switch":985025,"directions":983504,"directions-fork":984641,"disc":984558,"disc-alert":983505,"disc-player":985440,"discord":984687,"dishwasher":985772,"dishwasher-alert":987576,"dishwasher-off":987577,"disqus":983506,"distribute-horizontal-center":987593,"distribute-horizontal-left":987592,"distribute-horizontal-right":987594,"distribute-vertical-bottom":987595,"distribute-vertical-center":987596,"distribute-vertical-top":987597,"diversify":989303,"diving":989559,"diving-flippers":986559,"diving-helmet":986560,"diving-scuba":986561,"diving-scuba-flag":986562,"diving-scuba-tank":986563,"diving-scuba-tank-multiple":986564,"diving-snorkel":986565,"division":983508,"division-box":983509,"dlna":985665,"dna":984708,"dns":983510,"dns-outline":985996,"dock-bottom":987305,"dock-left":987306,"dock-right":987307,"dock-top":988435,"dock-window":987308,"docker":985192,"doctor":985666,"dog":985667,"dog-service":985773,"dog-side":985668,"dog-side-off":988910,"dolby":984755,"dolly":986782,"dolphin":989364,"domain":983511,"domain-off":986479,"domain-plus":987309,"domain-remove":987310,"dome-light":988190,"domino-mask":987171,"donkey":985026,"door":985114,"door-closed":985115,"door-closed-lock":987311,"door-open":985116,"door-sliding":989214,"door-sliding-lock":989215,"door-sliding-open":989216,"doorbell":987878,"doorbell-video":985193,"dot-net":985774,"dots-circle":989560,"dots-grid":988668,"dots-hexagon":988671,"dots-horizontal":983512,"dots-horizontal-circle":985027,"dots-horizontal-circle-outline":985997,"dots-square":988669,"dots-triangle":988670,"dots-vertical":983513,"dots-vertical-circle":985028,"dots-vertical-circle-outline":985998,"download":983514,"download-box":988258,"download-box-outline":988259,"download-circle":988260,"download-circle-outline":988261,"download-lock":987936,"download-lock-outline":987937,"download-multiple":985577,"download-network":984820,"download-network-outline":986214,"download-off":987312,"download-off-outline":987313,"download-outline":985999,"drag":983515,"drag-horizontal":983516,"drag-horizontal-variant":987888,"drag-variant":986000,"drag-vertical":983517,"drag-vertical-variant":987889,"drama-masks":986370,"draw":986953,"draw-pen":989625,"drawing":983518,"drawing-box":983519,"dresser":986954,"dresser-outline":986955,"drone":983522,"dropbox":983523,"drupal":983524,"duck":983525,"dumbbell":983526,"dump-truck":986215,"ear-hearing":985029,"ear-hearing-off":985669,"earbuds":989263,"earbuds-off":989264,"earbuds-off-outline":989265,"earbuds-outline":989266,"earth":983527,"earth-arrow-right":987921,"earth-box":984781,"earth-box-minus":988167,"earth-box-off":984782,"earth-box-plus":988166,"earth-box-remove":988168,"earth-minus":988164,"earth-off":983528,"earth-plus":988163,"earth-remove":988165,"egg":985775,"egg-easter":985776,"egg-fried":989258,"egg-off":988144,"egg-off-outline":988145,"egg-outline":988146,"eiffel-tower":988523,"eight-track":985578,"eject":983530,"eject-outline":986001,"electric-switch":986783,"electric-switch-closed":987353,"electron-framework":987172,"elephant":985030,"elevation-decline":983531,"elevation-rise":983532,"elevator":983533,"elevator-down":987842,"elevator-passenger":988033,"elevator-passenger-off":989561,"elevator-passenger-off-outline":989562,"elevator-passenger-outline":989563,"elevator-up":987841,"ellipse":986784,"ellipse-outline":986785,"email":983534,"email-alert":984783,"email-alert-outline":986434,"email-box":986371,"email-check":985777,"email-check-outline":985778,"email-edit":986851,"email-edit-outline":986852,"email-fast":989295,"email-fast-outline":989296,"email-lock":983537,"email-mark-as-unread":986002,"email-minus":986853,"email-minus-outline":986854,"email-multiple":986855,"email-multiple-outline":986856,"email-newsletter":987057,"email-off":988131,"email-off-outline":988132,"email-open":983535,"email-open-multiple":986857,"email-open-multiple-outline":986858,"email-open-outline":984559,"email-outline":983536,"email-plus":985579,"email-plus-outline":985580,"email-receive":987354,"email-receive-outline":987355,"email-remove":988769,"email-remove-outline":988770,"email-seal":989531,"email-seal-outline":989532,"email-search":985441,"email-search-outline":985442,"email-send":987356,"email-send-outline":987357,"email-sync":987847,"email-sync-outline":987848,"email-variant":984560,"ember":985904,"emby":984756,"emoticon":986216,"emoticon-angry":986217,"emoticon-angry-outline":986218,"emoticon-confused":987358,"emoticon-confused-outline":987359,"emoticon-cool":986219,"emoticon-cool-outline":983539,"emoticon-cry":986220,"emoticon-cry-outline":986221,"emoticon-dead":986222,"emoticon-dead-outline":984731,"emoticon-devil":986223,"emoticon-devil-outline":983540,"emoticon-excited":986224,"emoticon-excited-outline":984732,"emoticon-frown":986956,"emoticon-frown-outline":986957,"emoticon-happy":986225,"emoticon-happy-outline":983541,"emoticon-kiss":986226,"emoticon-kiss-outline":986227,"emoticon-lol":987668,"emoticon-lol-outline":987669,"emoticon-neutral":986228,"emoticon-neutral-outline":983542,"emoticon-outline":983538,"emoticon-poop":983543,"emoticon-poop-outline":986229,"emoticon-sad":986230,"emoticon-sad-outline":983544,"emoticon-sick":988540,"emoticon-sick-outline":988541,"emoticon-tongue":983545,"emoticon-tongue-outline":986231,"emoticon-wink":986232,"emoticon-wink-outline":986233,"engine":983546,"engine-off":985670,"engine-off-outline":985671,"engine-outline":983547,"epsilon":987360,"equal":983548,"equal-box":983549,"equalizer":986786,"equalizer-outline":986787,"eraser":983550,"eraser-variant":984642,"escalator":983551,"escalator-box":988057,"escalator-down":987840,"escalator-up":987839,"eslint":986234,"et":985779,"ethereum":985194,"ethernet":983552,"ethernet-cable":983553,"ethernet-cable-off":983554,"ev-plug-ccs1":988441,"ev-plug-ccs2":988442,"ev-plug-chademo":988443,"ev-plug-tesla":988444,"ev-plug-type1":988445,"ev-plug-type2":988446,"ev-station":984561,"evernote":983556,"excavator":987173,"exclamation":983557,"exclamation-thick":987704,"exit-run":985672,"exit-to-app":983558,"expand-all":985780,"expand-all-outline":985781,"expansion-card":985262,"expansion-card-variant":987058,"exponent":985443,"exponent-box":985444,"export":983559,"export-variant":986003,"eye":983560,"eye-arrow-left":989437,"eye-arrow-left-outline":989438,"eye-arrow-right":989439,"eye-arrow-right-outline":989440,"eye-check":986372,"eye-check-outline":986373,"eye-circle":986004,"eye-circle-outline":986005,"eye-minus":987174,"eye-minus-outline":987175,"eye-off":983561,"eye-off-outline":984785,"eye-outline":984784,"eye-plus":985195,"eye-plus-outline":985196,"eye-refresh":989564,"eye-refresh-outline":989565,"eye-remove":988643,"eye-remove-outline":988644,"eye-settings":985197,"eye-settings-outline":985198,"eyedropper":983562,"eyedropper-minus":988125,"eyedropper-off":988127,"eyedropper-plus":988124,"eyedropper-remove":988126,"eyedropper-variant":983563,"face-agent":986480,"face-man":984643,"face-man-outline":986006,"face-man-profile":984644,"face-man-shimmer":988620,"face-man-shimmer-outline":988621,"face-mask":988550,"face-mask-outline":988551,"face-recognition":986235,"face-woman":987255,"face-woman-outline":987256,"face-woman-profile":987254,"face-woman-shimmer":988622,"face-woman-shimmer-outline":988623,"facebook":983564,"facebook-gaming":985053,"facebook-messenger":983566,"facebook-workplace":985905,"factory":983567,"family-tree":988686,"fan":983568,"fan-alert":988268,"fan-auto":988957,"fan-chevron-down":988269,"fan-chevron-up":988270,"fan-minus":988272,"fan-off":985117,"fan-plus":988271,"fan-remove":988273,"fan-speed-1":988274,"fan-speed-2":988275,"fan-speed-3":988276,"fast-forward":983569,"fast-forward-10":986481,"fast-forward-15":989498,"fast-forward-30":986374,"fast-forward-5":987640,"fast-forward-60":988683,"fast-forward-outline":984786,"fax":983570,"feather":984787,"feature-search":985673,"feature-search-outline":985674,"fedora":985307,"fence":989082,"fence-electric":989174,"fencing":988353,"ferris-wheel":986788,"ferry":983571,"file":983572,"file-account":984891,"file-account-outline":987176,"file-alert":985675,"file-alert-outline":985676,"file-cabinet":985782,"file-cad":986859,"file-cad-box":986860,"file-cancel":986566,"file-cancel-outline":986567,"file-certificate":987526,"file-certificate-outline":987527,"file-chart":983573,"file-chart-outline":987177,"file-check":983574,"file-check-outline":986665,"file-clock":987873,"file-clock-outline":987874,"file-cloud":983575,"file-cloud-outline":987178,"file-code":983598,"file-code-outline":987179,"file-cog":987259,"file-cog-outline":987260,"file-compare":985258,"file-delimited":983576,"file-delimited-outline":986789,"file-document":983577,"file-document-edit":986568,"file-document-edit-outline":986569,"file-document-multiple":988439,"file-document-multiple-outline":988440,"file-document-outline":985582,"file-download":985445,"file-download-outline":985446,"file-edit":987623,"file-edit-outline":987624,"file-excel":983579,"file-excel-box":983580,"file-excel-box-outline":987180,"file-excel-outline":987181,"file-export":983581,"file-export-outline":987182,"file-eye":986570,"file-eye-outline":986571,"file-find":983582,"file-find-outline":986007,"file-gif-box":986488,"file-hidden":984595,"file-image":983583,"file-image-marker":989042,"file-image-marker-outline":989043,"file-image-minus":989499,"file-image-minus-outline":989500,"file-image-outline":986800,"file-image-plus":989501,"file-image-plus-outline":989502,"file-image-remove":989503,"file-image-remove-outline":989504,"file-import":983584,"file-import-outline":987183,"file-jpg-box":983589,"file-key":987524,"file-key-outline":987525,"file-link":987511,"file-link-outline":987512,"file-lock":983585,"file-lock-outline":987184,"file-marker":989044,"file-marker-outline":989045,"file-move":985785,"file-move-outline":987185,"file-multiple":983586,"file-multiple-outline":987186,"file-music":983587,"file-music-outline":986666,"file-outline":983588,"file-pdf-box":983590,"file-percent":985118,"file-percent-outline":987187,"file-phone":987513,"file-phone-outline":987514,"file-plus":984914,"file-plus-outline":986861,"file-png-box":986669,"file-powerpoint":983591,"file-powerpoint-box":983592,"file-powerpoint-box-outline":987188,"file-powerpoint-outline":987189,"file-presentation-box":983593,"file-question":985199,"file-question-outline":987190,"file-refresh":985368,"file-refresh-outline":984385,"file-remove":986008,"file-remove-outline":987191,"file-replace":985906,"file-replace-outline":985907,"file-restore":984688,"file-restore-outline":987192,"file-search":986236,"file-search-outline":986237,"file-send":983594,"file-send-outline":987193,"file-settings":987257,"file-settings-outline":987258,"file-sign":989635,"file-star":987194,"file-star-outline":987195,"file-swap":987060,"file-swap-outline":987061,"file-sync":987670,"file-sync-outline":987671,"file-table":986238,"file-table-box":987361,"file-table-box-multiple":987362,"file-table-box-multiple-outline":987363,"file-table-box-outline":987364,"file-table-outline":986239,"file-tree":984645,"file-tree-outline":988114,"file-undo":985308,"file-undo-outline":987196,"file-upload":985677,"file-upload-outline":985678,"file-video":983595,"file-video-outline":986668,"file-word":983596,"file-word-box":983597,"file-word-box-outline":987197,"file-word-outline":987198,"film":983599,"filmstrip":983600,"filmstrip-box":983858,"filmstrip-box-multiple":986392,"filmstrip-off":983601,"filter":983602,"filter-check":989420,"filter-check-outline":989421,"filter-menu":987365,"filter-menu-outline":987366,"filter-minus":986862,"filter-minus-outline":986863,"filter-off":988399,"filter-off-outline":988400,"filter-outline":983603,"filter-plus":986864,"filter-plus-outline":986865,"filter-remove":983604,"filter-remove-outline":983605,"filter-variant":983606,"filter-variant-minus":987410,"filter-variant-plus":987411,"filter-variant-remove":987199,"finance":985119,"find-replace":984788,"fingerprint":983607,"fingerprint-off":986801,"fire":983608,"fire-alert":988631,"fire-circle":989191,"fire-extinguisher":986866,"fire-hydrant":987447,"fire-hydrant-alert":987448,"fire-hydrant-off":987449,"fire-off":988962,"fire-truck":985259,"firebase":985447,"firefox":983609,"fireplace":986670,"fireplace-off":986671,"firewire":984510,"firework":986672,"firework-off":988963,"fish":983610,"fish-off":988147,"fishbowl":986867,"fishbowl-outline":986868,"fit-to-page":986869,"fit-to-page-outline":986870,"fit-to-screen":989428,"fit-to-screen-outline":989429,"flag":983611,"flag-checkered":983612,"flag-minus":986009,"flag-minus-outline":987314,"flag-off":989422,"flag-off-outline":989423,"flag-outline":983613,"flag-plus":986010,"flag-plus-outline":987315,"flag-remove":986011,"flag-remove-outline":987316,"flag-triangle":983615,"flag-variant":983616,"flag-variant-outline":983614,"flare":986482,"flash":983617,"flash-alert":986871,"flash-alert-outline":986872,"flash-auto":983618,"flash-off":983619,"flash-outline":984789,"flash-red-eye":984699,"flashlight":983620,"flashlight-off":983621,"flask":983187,"flask-empty":983188,"flask-empty-minus":987706,"flask-empty-minus-outline":987707,"flask-empty-off":988148,"flask-empty-off-outline":988149,"flask-empty-outline":983189,"flask-empty-plus":987708,"flask-empty-plus-outline":987709,"flask-empty-remove":987710,"flask-empty-remove-outline":987711,"flask-minus":987712,"flask-minus-outline":987713,"flask-off":988150,"flask-off-outline":988151,"flask-outline":983190,"flask-plus":987714,"flask-plus-outline":987715,"flask-remove":987716,"flask-remove-outline":987717,"flask-round-bottom":987723,"flask-round-bottom-empty":987724,"flask-round-bottom-empty-outline":987725,"flask-round-bottom-outline":987726,"fleur-de-lis":987907,"flip-horizontal":987367,"flip-to-back":983623,"flip-to-front":983624,"flip-vertical":987368,"floor-lamp":985309,"floor-lamp-dual":987200,"floor-lamp-dual-outline":989134,"floor-lamp-outline":989128,"floor-lamp-torchiere":988999,"floor-lamp-torchiere-outline":989142,"floor-lamp-torchiere-variant":987201,"floor-lamp-torchiere-variant-outline":989135,"floor-plan":985121,"floppy":983625,"floppy-variant":985583,"flower":983626,"flower-outline":985584,"flower-pollen":989317,"flower-pollen-outline":989318,"flower-poppy":986376,"flower-tulip":985585,"flower-tulip-outline":985586,"focus-auto":986958,"focus-field":986959,"focus-field-horizontal":986960,"focus-field-vertical":986961,"folder":983627,"folder-account":983628,"folder-account-outline":986012,"folder-alert":986572,"folder-alert-outline":986573,"folder-check":989566,"folder-check-outline":989567,"folder-clock":985786,"folder-clock-outline":985787,"folder-cog":987263,"folder-cog-outline":987264,"folder-download":983629,"folder-download-outline":987369,"folder-edit":985310,"folder-edit-outline":986574,"folder-eye":989066,"folder-eye-outline":989067,"folder-google-drive":983630,"folder-heart":987370,"folder-heart-outline":987371,"folder-hidden":989086,"folder-home":987317,"folder-home-outline":987318,"folder-image":983631,"folder-information":987319,"folder-information-outline":987320,"folder-key":985260,"folder-key-network":985261,"folder-key-network-outline":986240,"folder-key-outline":987372,"folder-lock":983632,"folder-lock-open":983633,"folder-marker":987757,"folder-marker-outline":987758,"folder-move":983634,"folder-move-outline":987718,"folder-multiple":983635,"folder-multiple-image":983636,"folder-multiple-outline":983637,"folder-multiple-plus":988286,"folder-multiple-plus-outline":988287,"folder-music":987993,"folder-music-outline":987994,"folder-network":985200,"folder-network-outline":986241,"folder-open":984944,"folder-open-outline":986575,"folder-outline":983638,"folder-plus":983639,"folder-plus-outline":986013,"folder-pound":986377,"folder-pound-outline":986378,"folder-refresh":984905,"folder-refresh-outline":984386,"folder-remove":983640,"folder-remove-outline":986014,"folder-search":985448,"folder-search-outline":985449,"folder-settings":987261,"folder-settings-outline":987262,"folder-star":984733,"folder-star-multiple":988115,"folder-star-multiple-outline":988116,"folder-star-outline":986015,"folder-swap":987062,"folder-swap-outline":987063,"folder-sync":986379,"folder-sync-outline":986380,"folder-table":987875,"folder-table-outline":987876,"folder-text":986242,"folder-text-outline":986243,"folder-upload":983641,"folder-upload-outline":987373,"folder-zip":984811,"folder-zip-outline":985017,"font-awesome":983098,"food":983642,"food-apple":983643,"food-apple-outline":986244,"food-croissant":985032,"food-drumstick":988191,"food-drumstick-off":988264,"food-drumstick-off-outline":988265,"food-drumstick-outline":988192,"food-fork-drink":984562,"food-halal":988530,"food-hot-dog":989259,"food-kosher":988531,"food-off":984563,"food-off-outline":989461,"food-outline":989462,"food-steak":988266,"food-steak-off":988267,"food-takeout-box":989238,"food-takeout-box-outline":989239,"food-turkey":988956,"food-variant":983644,"food-variant-off":988133,"foot-print":986962,"football":983645,"football-australian":983646,"football-helmet":983647,"forest":989335,"forklift":985033,"form-dropdown":988160,"form-select":988161,"form-textarea":987285,"form-textbox":984590,"form-textbox-lock":987997,"form-textbox-password":985077,"format-align-bottom":984915,"format-align-center":983648,"format-align-justify":983649,"format-align-left":983650,"format-align-middle":984916,"format-align-right":983651,"format-align-top":984917,"format-annotation-minus":985788,"format-annotation-plus":984646,"format-bold":983652,"format-clear":983653,"format-color-fill":983654,"format-color-highlight":986673,"format-color-marker-cancel":987923,"format-color-text":984734,"format-columns":985311,"format-float-center":983655,"format-float-left":983656,"format-float-none":983657,"format-float-right":983658,"format-font":984790,"format-font-size-decrease":985587,"format-font-size-increase":985588,"format-header-1":983659,"format-header-2":983660,"format-header-3":983661,"format-header-4":983662,"format-header-5":983663,"format-header-6":983664,"format-header-decrease":983665,"format-header-equal":983666,"format-header-increase":983667,"format-header-pound":983668,"format-horizontal-align-center":984606,"format-horizontal-align-left":984607,"format-horizontal-align-right":984608,"format-indent-decrease":983669,"format-indent-increase":983670,"format-italic":983671,"format-letter-case":985908,"format-letter-case-lower":985909,"format-letter-case-upper":985910,"format-letter-ends-with":987064,"format-letter-matches":987065,"format-letter-spacing":989526,"format-letter-starts-with":987066,"format-line-spacing":983672,"format-line-style":984520,"format-line-weight":984521,"format-list-bulleted":983673,"format-list-bulleted-square":986576,"format-list-bulleted-triangle":986802,"format-list-bulleted-type":983674,"format-list-checkbox":985450,"format-list-checks":984918,"format-list-group":989280,"format-list-numbered":983675,"format-list-numbered-rtl":986381,"format-list-text":987759,"format-overline":986803,"format-page-break":984791,"format-page-split":989463,"format-paint":983676,"format-paragraph":983677,"format-pilcrow":984792,"format-quote-close":983678,"format-quote-close-outline":987560,"format-quote-open":984919,"format-quote-open-outline":987559,"format-rotate-90":984746,"format-section":984735,"format-size":983679,"format-strikethrough":983680,"format-strikethrough-variant":983681,"format-subscript":983682,"format-superscript":983683,"format-text":983684,"format-text-rotation-angle-down":987067,"format-text-rotation-angle-up":987068,"format-text-rotation-down":986483,"format-text-rotation-down-vertical":987069,"format-text-rotation-none":986484,"format-text-rotation-up":987070,"format-text-rotation-vertical":987071,"format-text-variant":986674,"format-text-variant-outline":988431,"format-text-wrapping-clip":986382,"format-text-wrapping-overflow":986383,"format-text-wrapping-wrap":986384,"format-textbox":986385,"format-textdirection-l-to-r":983685,"format-textdirection-r-to-l":983686,"format-title":984564,"format-underline":983687,"format-underline-wavy":989417,"format-vertical-align-bottom":984609,"format-vertical-align-center":984610,"format-vertical-align-top":984611,"format-wrap-inline":983688,"format-wrap-square":983689,"format-wrap-tight":983690,"format-wrap-top-bottom":983691,"forum":983692,"forum-outline":985122,"forward":983693,"forwardburger":986485,"fountain":985451,"fountain-pen":986386,"fountain-pen-tip":986387,"fraction-one-half":989586,"freebsd":985312,"french-fries":989527,"frequently-asked-questions":986804,"fridge":983696,"fridge-alert":987569,"fridge-alert-outline":987570,"fridge-bottom":983698,"fridge-industrial":988654,"fridge-industrial-alert":988655,"fridge-industrial-alert-outline":988656,"fridge-industrial-off":988657,"fridge-industrial-off-outline":988658,"fridge-industrial-outline":988659,"fridge-off":987567,"fridge-off-outline":987568,"fridge-outline":983695,"fridge-top":983697,"fridge-variant":988660,"fridge-variant-alert":988661,"fridge-variant-alert-outline":988662,"fridge-variant-off":988663,"fridge-variant-off-outline":988664,"fridge-variant-outline":988665,"fruit-cherries":987202,"fruit-cherries-off":988152,"fruit-citrus":987203,"fruit-citrus-off":988153,"fruit-grapes":987204,"fruit-grapes-outline":987205,"fruit-pineapple":987206,"fruit-watermelon":987207,"fuel":985034,"fuel-cell":989365,"fullscreen":983699,"fullscreen-exit":983700,"function":983701,"function-variant":985201,"furigana-horizontal":987265,"furigana-vertical":987266,"fuse":986245,"fuse-alert":988205,"fuse-blade":986246,"fuse-off":988204,"gamepad":983702,"gamepad-circle":986675,"gamepad-circle-down":986676,"gamepad-circle-left":986677,"gamepad-circle-outline":986678,"gamepad-circle-right":986679,"gamepad-circle-up":986680,"gamepad-down":986681,"gamepad-left":986682,"gamepad-outline":989465,"gamepad-right":986683,"gamepad-round":986684,"gamepad-round-down":986685,"gamepad-round-left":986686,"gamepad-round-outline":986687,"gamepad-round-right":986688,"gamepad-round-up":986689,"gamepad-square":986805,"gamepad-square-outline":986806,"gamepad-up":986690,"gamepad-variant":983703,"gamepad-variant-outline":986807,"gamma":987374,"gantry-crane":986577,"garage":984793,"garage-alert":985202,"garage-alert-variant":987861,"garage-lock":989179,"garage-open":984794,"garage-open-variant":987860,"garage-variant":987859,"garage-variant-lock":989180,"gas-cylinder":984647,"gas-station":983704,"gas-station-off":988169,"gas-station-off-outline":988170,"gas-station-outline":986808,"gate":983705,"gate-alert":989176,"gate-and":985313,"gate-arrow-left":989175,"gate-arrow-right":987497,"gate-nand":985314,"gate-nor":985315,"gate-not":985316,"gate-open":987498,"gate-or":985317,"gate-xnor":985318,"gate-xor":985319,"gatsby":986691,"gauge":983706,"gauge-empty":985203,"gauge-full":985204,"gauge-low":985205,"gavel":983707,"gender-female":983708,"gender-male":983709,"gender-male-female":983710,"gender-male-female-variant":987455,"gender-non-binary":987456,"gender-transgender":983711,"gentoo":985320,"gesture":985035,"gesture-double-tap":984892,"gesture-pinch":985789,"gesture-spread":985790,"gesture-swipe":986486,"gesture-swipe-down":984893,"gesture-swipe-horizontal":985791,"gesture-swipe-left":984894,"gesture-swipe-right":984895,"gesture-swipe-up":984896,"gesture-swipe-vertical":985792,"gesture-tap":984897,"gesture-tap-box":987817,"gesture-tap-button":987816,"gesture-tap-hold":986487,"gesture-two-double-tap":984898,"gesture-two-tap":984899,"ghost":983712,"ghost-off":985589,"ghost-off-outline":988764,"ghost-outline":988765,"gift":986692,"gift-off":988911,"gift-off-outline":988912,"gift-open":988913,"gift-open-outline":988914,"gift-outline":983713,"git":983714,"github":983716,"gitlab":986016,"glass-cocktail":983894,"glass-cocktail-off":988646,"glass-flute":983717,"glass-fragile":989299,"glass-mug":983718,"glass-mug-off":988647,"glass-mug-variant":987414,"glass-mug-variant-off":988648,"glass-pint-outline":987917,"glass-stange":983719,"glass-tulip":983720,"glass-wine":985206,"glasses":983722,"globe-light":987863,"globe-model":985321,"gmail":983723,"gnome":983724,"go-kart":986489,"go-kart-track":986490,"gog":986017,"gold":987727,"golf":985123,"golf-cart":987556,"golf-tee":987267,"gondola":984710,"goodreads":986491,"google":983725,"google-ads":986247,"google-analytics":985036,"google-assistant":985037,"google-cardboard":983726,"google-chrome":983727,"google-circles":983728,"google-circles-communities":983729,"google-circles-extended":983730,"google-circles-group":983731,"google-classroom":983744,"google-cloud":987638,"google-controller":983732,"google-controller-off":983733,"google-downasaur":988002,"google-drive":983734,"google-earth":983735,"google-fit":985452,"google-glass":983736,"google-hangouts":983753,"google-home":985124,"google-keep":984796,"google-lens":985590,"google-maps":984565,"google-my-business":987208,"google-nearby":983737,"google-play":983740,"google-plus":983741,"google-podcast":986809,"google-spreadsheet":985591,"google-street-view":986248,"google-translate":983743,"gradient-horizontal":989002,"gradient-vertical":984736,"grain":986492,"graph":987209,"graph-outline":987210,"graphql":985207,"grass":988432,"grave-stone":986018,"grease-pencil":984648,"greater-than":985453,"greater-than-or-equal":985454,"greenhouse":983085,"grid":983745,"grid-large":984920,"grid-off":983746,"grill":986693,"grill-outline":987530,"group":983747,"guitar-acoustic":984945,"guitar-electric":983748,"guitar-pick":983749,"guitar-pick-outline":983750,"guy-fawkes-mask":985125,"hail":985793,"hair-dryer":987375,"hair-dryer-outline":987376,"halloween":986019,"hamburger":984709,"hamburger-check":989046,"hamburger-minus":989047,"hamburger-off":989048,"hamburger-plus":989049,"hamburger-remove":989050,"hammer":985322,"hammer-screwdriver":987938,"hammer-sickle":989319,"hammer-wrench":987939,"hand-back-left":986694,"hand-back-left-off":989232,"hand-back-left-off-outline":989234,"hand-back-left-outline":989228,"hand-back-right":986695,"hand-back-right-off":989233,"hand-back-right-off-outline":989235,"hand-back-right-outline":989229,"hand-clap":989515,"hand-coin":989327,"hand-coin-outline":989328,"hand-extended":989366,"hand-extended-outline":989367,"hand-front-left":989227,"hand-front-left-outline":989230,"hand-front-right":985679,"hand-front-right-outline":989231,"hand-heart":987377,"hand-heart-outline":988542,"hand-okay":985680,"hand-peace":985681,"hand-peace-variant":985682,"hand-pointing-down":985683,"hand-pointing-left":985684,"hand-pointing-right":983751,"hand-pointing-up":985685,"hand-saw":986696,"hand-wash":988543,"hand-wash-outline":988544,"hand-water":988063,"hand-wave":989217,"hand-wave-outline":989218,"handball":986963,"handcuffs":987454,"hands-pray":984441,"handshake":987672,"handshake-outline":988577,"hanger":983752,"hard-hat":985455,"harddisk":983754,"harddisk-plus":987211,"harddisk-remove":987212,"hat-fedora":986020,"hazard-lights":986249,"hdr":986493,"hdr-off":986494,"head":987998,"head-alert":987960,"head-alert-outline":987961,"head-check":987962,"head-check-outline":987963,"head-cog":987964,"head-cog-outline":987965,"head-dots-horizontal":987966,"head-dots-horizontal-outline":987967,"head-flash":987968,"head-flash-outline":987969,"head-heart":987970,"head-heart-outline":987971,"head-lightbulb":987972,"head-lightbulb-outline":987973,"head-minus":987974,"head-minus-outline":987975,"head-outline":987999,"head-plus":987976,"head-plus-outline":987977,"head-question":987978,"head-question-outline":987979,"head-remove":987980,"head-remove-outline":987981,"head-snowflake":987982,"head-snowflake-outline":987983,"head-sync":987984,"head-sync-outline":987985,"headphones":983755,"headphones-bluetooth":985456,"headphones-box":983756,"headphones-off":985038,"headphones-settings":983757,"headset":983758,"headset-dock":983759,"headset-off":983760,"heart":983761,"heart-box":983762,"heart-box-outline":983763,"heart-broken":983764,"heart-broken-outline":986388,"heart-circle":985457,"heart-circle-outline":985458,"heart-cog":988771,"heart-cog-outline":988772,"heart-flash":986873,"heart-half":984799,"heart-half-full":984798,"heart-half-outline":984800,"heart-minus":988207,"heart-minus-outline":988210,"heart-multiple":985686,"heart-multiple-outline":985687,"heart-off":984921,"heart-off-outline":988212,"heart-outline":983765,"heart-plus":988206,"heart-plus-outline":988209,"heart-pulse":984566,"heart-remove":988208,"heart-remove-outline":988211,"heart-settings":988773,"heart-settings-outline":988774,"helicopter":985794,"help":983766,"help-box":984971,"help-circle":983767,"help-circle-outline":984613,"help-network":984821,"help-network-outline":986250,"help-rhombus":986021,"help-rhombus-outline":986022,"hexadecimal":987815,"hexagon":983768,"hexagon-multiple":984801,"hexagon-multiple-outline":987378,"hexagon-outline":983769,"hexagon-slice-1":985795,"hexagon-slice-2":985796,"hexagon-slice-3":985797,"hexagon-slice-4":985798,"hexagon-slice-5":985799,"hexagon-slice-6":985800,"hexagram":985801,"hexagram-outline":985802,"high-definition":985039,"high-definition-box":985208,"highway":984567,"hiking":986495,"history":983770,"hockey-puck":985209,"hockey-sticks":985210,"hololens":983771,"home":983772,"home-account":985126,"home-alert":985211,"home-alert-outline":988624,"home-analytics":986810,"home-assistant":985040,"home-automation":985041,"home-battery":989441,"home-battery-outline":989442,"home-circle":985042,"home-circle-outline":987213,"home-city":986389,"home-city-outline":986390,"home-edit":987481,"home-edit-outline":987482,"home-export-outline":987035,"home-flood":986874,"home-floor-0":986578,"home-floor-1":986496,"home-floor-2":986497,"home-floor-3":986498,"home-floor-a":986499,"home-floor-b":986500,"home-floor-g":986501,"home-floor-l":986502,"home-floor-negative-1":986579,"home-group":986580,"home-group-minus":989633,"home-group-plus":989632,"home-group-remove":989634,"home-heart":985127,"home-import-outline":987036,"home-lightbulb":987729,"home-lightbulb-outline":987730,"home-lightning-bolt":989443,"home-lightning-bolt-outline":989444,"home-lock":985323,"home-lock-open":985324,"home-map-marker":984568,"home-minus":985460,"home-minus-outline":988117,"home-modern":983773,"home-outline":984737,"home-plus":985461,"home-plus-outline":988118,"home-remove":987719,"home-remove-outline":988119,"home-roof":987435,"home-search":988080,"home-search-outline":988081,"home-switch":989076,"home-switch-outline":989077,"home-thermometer":986964,"home-thermometer-outline":986965,"home-variant":983774,"home-variant-outline":986023,"hook":984802,"hook-off":984803,"hoop-house":986710,"hops":983775,"horizontal-rotate-clockwise":987379,"horizontal-rotate-counterclockwise":987380,"horse":988607,"horse-human":988608,"horse-variant":988609,"horse-variant-fast":989294,"horseshoe":985688,"hospital":987126,"hospital-box":983776,"hospital-box-outline":987127,"hospital-building":983777,"hospital-marker":983778,"hot-tub":985128,"hours-24":988280,"hubspot":986391,"hulu":985129,"human":983782,"human-baby-changing-table":988043,"human-cane":988545,"human-capacity-decrease":988571,"human-capacity-increase":988572,"human-child":983783,"human-dolly":989568,"human-edit":988392,"human-female":984649,"human-female-boy":985689,"human-female-dance":988617,"human-female-female":985690,"human-female-girl":985691,"human-greeting":989124,"human-greeting-proximity":988573,"human-greeting-variant":984650,"human-handsdown":984651,"human-handsup":984652,"human-male":984653,"human-male-board":985232,"human-male-board-poll":985158,"human-male-boy":985692,"human-male-child":988044,"human-male-female":983784,"human-male-female-child":989219,"human-male-girl":985693,"human-male-height":986875,"human-male-height-variant":986876,"human-male-male":985694,"human-non-binary":989256,"human-pregnant":984527,"human-queue":988529,"human-scooter":987625,"human-wheelchair":988045,"human-white-cane":989569,"humble-bundle":984900,"hvac":987986,"hvac-off":988574,"hydraulic-oil-level":987940,"hydraulic-oil-temperature":987941,"hydro-power":987877,"hydrogen-station":989332,"ice-cream":985130,"ice-cream-off":986706,"ice-pop":986877,"id-card":987072,"identifier":986878,"ideogram-cjk":987953,"ideogram-cjk-variant":987954,"image":983785,"image-album":983786,"image-area":983787,"image-area-close":983788,"image-auto-adjust":987073,"image-broken":983789,"image-broken-variant":983790,"image-edit":987619,"image-edit-outline":987620,"image-filter-black-white":983792,"image-filter-center-focus":983793,"image-filter-center-focus-strong":986879,"image-filter-center-focus-strong-outline":986880,"image-filter-center-focus-weak":983794,"image-filter-drama":983795,"image-filter-frames":983796,"image-filter-hdr":983797,"image-filter-none":983798,"image-filter-tilt-shift":983799,"image-filter-vintage":983800,"image-frame":986697,"image-marker":989051,"image-marker-outline":989052,"image-minus":988185,"image-move":985592,"image-multiple":983801,"image-multiple-outline":983791,"image-off":985131,"image-off-outline":987601,"image-outline":985462,"image-plus":985212,"image-remove":988184,"image-search":985463,"image-search-outline":985464,"image-size-select-actual":986253,"image-size-select-large":986254,"image-size-select-small":986255,"image-text":988685,"import":983802,"inbox":984711,"inbox-arrow-down":983803,"inbox-arrow-down-outline":987760,"inbox-arrow-up":984017,"inbox-arrow-up-outline":987761,"inbox-full":987762,"inbox-full-outline":987763,"inbox-multiple":985264,"inbox-multiple-outline":986024,"inbox-outline":987764,"inbox-remove":988575,"inbox-remove-outline":988576,"incognito":984569,"incognito-circle":988193,"incognito-circle-off":988194,"incognito-off":983157,"induction":989260,"infinity":984804,"information":983804,"information-off":989068,"information-off-outline":989069,"information-outline":983805,"information-variant":984654,"instagram":983806,"instrument-triangle":987214,"integrated-circuit-chip":989459,"invert-colors":983809,"invert-colors-off":986698,"iobroker":987880,"ip":985695,"ip-network":985696,"ip-network-outline":986256,"ip-outline":989570,"ipod":986257,"iron":989220,"iron-board":989240,"iron-outline":989221,"island":987215,"iv-bag":987321,"jabber":986581,"jeepney":983810,"jellyfish":986881,"jellyfish-outline":986882,"jira":983811,"jquery":985213,"jsfiddle":983812,"jump-rope":987903,"kabaddi":986503,"kangaroo":988504,"karate":985132,"kayaking":985263,"keg":983813,"kettle":984570,"kettle-alert":987927,"kettle-alert-outline":987928,"kettle-off":987931,"kettle-off-outline":987932,"kettle-outline":986966,"kettle-pour-over":988988,"kettle-steam":987929,"kettle-steam-outline":987930,"kettlebell":987904,"key":983814,"key-alert":989571,"key-alert-outline":989572,"key-arrow-right":987922,"key-chain":988532,"key-chain-variant":988533,"key-change":983815,"key-link":987551,"key-minus":983816,"key-outline":986582,"key-plus":983817,"key-remove":983818,"key-star":987550,"key-variant":983819,"key-wireless":987074,"keyboard":983820,"keyboard-backspace":983821,"keyboard-caps":983822,"keyboard-close":983823,"keyboard-esc":987831,"keyboard-f1":987819,"keyboard-f10":987828,"keyboard-f11":987829,"keyboard-f12":987830,"keyboard-f2":987820,"keyboard-f3":987821,"keyboard-f4":987822,"keyboard-f5":987823,"keyboard-f6":987824,"keyboard-f7":987825,"keyboard-f8":987826,"keyboard-f9":987827,"keyboard-off":983824,"keyboard-off-outline":986699,"keyboard-outline":985467,"keyboard-return":983825,"keyboard-settings":985593,"keyboard-settings-outline":985594,"keyboard-space":987216,"keyboard-tab":983826,"keyboard-tab-reverse":983845,"keyboard-variant":983827,"khanda":987389,"kickstarter":984901,"kite":989573,"kite-outline":989574,"kitesurfing":988996,"klingon":987995,"knife":985595,"knife-military":985596,"koala":988991,"kodi":983828,"kubernetes":987390,"label":983829,"label-multiple":988021,"label-multiple-outline":988022,"label-off":985803,"label-off-outline":985804,"label-outline":983830,"label-percent":987882,"label-percent-outline":987883,"label-variant":985805,"label-variant-outline":985806,"ladder":988578,"ladybug":985133,"lambda":984615,"lamp":984757,"lamp-outline":989136,"lamps":988534,"lamps-outline":989137,"lan":983831,"lan-check":987818,"lan-connect":983832,"lan-disconnect":983833,"lan-pending":983834,"language-c":984689,"language-cpp":984690,"language-csharp":983835,"language-css3":983836,"language-fortran":987674,"language-go":985043,"language-haskell":986258,"language-html5":983837,"language-java":985911,"language-javascript":983838,"language-kotlin":987673,"language-lua":985265,"language-markdown":983892,"language-markdown-outline":986971,"language-php":983839,"language-python":983840,"language-r":985044,"language-ruby":986413,"language-ruby-on-rails":985807,"language-rust":988695,"language-swift":984805,"language-typescript":984806,"language-xaml":984691,"laptop":983842,"laptop-off":984807,"laravel":985808,"laser-pointer":988292,"lasso":986883,"lastpass":984134,"latitude":986967,"launch":983847,"lava-lamp":985045,"layers":983848,"layers-edit":989330,"layers-minus":986700,"layers-off":983849,"layers-off-outline":985597,"layers-outline":985598,"layers-plus":986701,"layers-remove":986702,"layers-search":987654,"layers-search-outline":987655,"layers-triple":986968,"layers-triple-outline":986969,"lead-pencil":984655,"leaf":983850,"leaf-circle":989445,"leaf-circle-outline":989446,"leaf-maple":986259,"leaf-maple-off":987866,"leaf-off":987865,"leak":986583,"leak-off":986584,"led-off":983851,"led-on":983852,"led-outline":983853,"led-strip":985046,"led-strip-variant":987217,"led-variant-off":983854,"led-variant-on":983855,"led-variant-outline":983856,"leek":987517,"less-than":985468,"less-than-or-equal":985469,"library":983857,"library-shelves":986025,"license":987075,"lifebuoy":985214,"light-flood-down":989575,"light-flood-up":989576,"light-recessed":989083,"light-switch":985470,"lightbulb":983861,"lightbulb-auto":989184,"lightbulb-auto-outline":989185,"lightbulb-cfl":987656,"lightbulb-cfl-off":987657,"lightbulb-cfl-spiral":987765,"lightbulb-cfl-spiral-off":987843,"lightbulb-fluorescent-tube":989188,"lightbulb-fluorescent-tube-outline":989189,"lightbulb-group":987731,"lightbulb-group-off":987853,"lightbulb-group-off-outline":987854,"lightbulb-group-outline":987732,"lightbulb-multiple":987733,"lightbulb-multiple-off":987855,"lightbulb-multiple-off-outline":987856,"lightbulb-multiple-outline":987734,"lightbulb-off":986703,"lightbulb-off-outline":986704,"lightbulb-on":984808,"lightbulb-on-outline":984809,"lightbulb-outline":983862,"lightbulb-spot":989172,"lightbulb-spot-off":989173,"lightbulb-variant":989186,"lightbulb-variant-outline":989187,"lighthouse":985599,"lighthouse-on":985600,"lightning-bolt":988171,"lightning-bolt-circle":985120,"lightning-bolt-outline":988172,"line-scan":984612,"lingerie":988278,"link":983863,"link-box":986394,"link-box-outline":986395,"link-box-variant":986396,"link-box-variant-outline":986397,"link-lock":987322,"link-off":983864,"link-plus":986260,"link-variant":983865,"link-variant-minus":987391,"link-variant-off":983866,"link-variant-plus":987392,"link-variant-remove":987393,"linkedin":983867,"linux":983869,"linux-mint":985325,"lipstick":988085,"liquid-spot":989222,"liquor":989470,"list-status":988587,"litecoin":985697,"loading":984946,"location-enter":987076,"location-exit":987077,"lock":983870,"lock-alert":985326,"lock-alert-outline":988625,"lock-check":988058,"lock-check-outline":988840,"lock-clock":985471,"lock-minus":988841,"lock-minus-outline":988842,"lock-off":988785,"lock-off-outline":988786,"lock-open":983871,"lock-open-alert":988059,"lock-open-alert-outline":988626,"lock-open-check":988060,"lock-open-check-outline":988843,"lock-open-minus":988844,"lock-open-minus-outline":988845,"lock-open-outline":983872,"lock-open-plus":988846,"lock-open-plus-outline":988847,"lock-open-remove":988848,"lock-open-remove-outline":988849,"lock-open-variant":987078,"lock-open-variant-outline":987079,"lock-outline":983873,"lock-pattern":984810,"lock-plus":984571,"lock-plus-outline":988850,"lock-question":985327,"lock-remove":988851,"lock-remove-outline":988852,"lock-reset":984947,"lock-smart":985266,"locker":985047,"locker-multiple":985048,"login":983874,"login-variant":984572,"logout":983875,"logout-variant":984573,"longitude":986970,"looks":983876,"lotion":988546,"lotion-outline":988547,"lotion-plus":988548,"lotion-plus-outline":988549,"loupe":983877,"lumx":983878,"lungs":987268,"mace":989251,"magazine-pistol":983844,"magazine-rifle":983843,"magic-staff":989252,"magnet":983879,"magnet-on":983880,"magnify":983881,"magnify-close":985472,"magnify-expand":989300,"magnify-minus":983882,"magnify-minus-cursor":985698,"magnify-minus-outline":984812,"magnify-plus":983883,"magnify-plus-cursor":985699,"magnify-plus-outline":984813,"magnify-remove-cursor":987660,"magnify-remove-outline":987661,"magnify-scan":987766,"mail":986811,"mailbox":984814,"mailbox-open":986504,"mailbox-open-outline":986505,"mailbox-open-up":986506,"mailbox-open-up-outline":986507,"mailbox-outline":986508,"mailbox-up":986509,"mailbox-up-outline":986510,"manjaro":988682,"map":983885,"map-check":986812,"map-check-outline":986813,"map-clock":986398,"map-clock-outline":986399,"map-legend":985601,"map-marker":983886,"map-marker-account":989411,"map-marker-account-outline":989412,"map-marker-alert":986885,"map-marker-alert-outline":986886,"map-marker-check":986261,"map-marker-check-outline":987899,"map-marker-circle":983887,"map-marker-distance":985328,"map-marker-down":987394,"map-marker-left":987867,"map-marker-left-outline":987869,"map-marker-minus":984656,"map-marker-minus-outline":987897,"map-marker-multiple":983888,"map-marker-multiple-outline":987767,"map-marker-off":983889,"map-marker-off-outline":987901,"map-marker-outline":985049,"map-marker-path":986400,"map-marker-plus":984657,"map-marker-plus-outline":987896,"map-marker-question":986887,"map-marker-question-outline":986888,"map-marker-radius":983890,"map-marker-radius-outline":987900,"map-marker-remove":986889,"map-marker-remove-outline":987898,"map-marker-remove-variant":986890,"map-marker-right":987868,"map-marker-right-outline":987870,"map-marker-star":988680,"map-marker-star-outline":988681,"map-marker-up":987395,"map-minus":985473,"map-outline":985474,"map-plus":985475,"map-search":985476,"map-search-outline":985477,"mapbox":986026,"margin":983891,"marker":984658,"marker-cancel":986585,"marker-check":983893,"mastodon":985809,"material-design":985478,"material-ui":983895,"math-compass":983896,"math-cos":986262,"math-integral":987080,"math-integral-box":987081,"math-log":987269,"math-norm":987082,"math-norm-box":987083,"math-sin":986263,"math-tan":986264,"matrix":984616,"medal":985479,"medal-outline":987942,"medical-bag":984815,"meditation":987515,"memory":983899,"menorah":989140,"menorah-fire":989141,"menu":983900,"menu-down":983901,"menu-down-outline":984758,"menu-left":983902,"menu-left-outline":985602,"menu-open":986027,"menu-right":983903,"menu-right-outline":985603,"menu-swap":985700,"menu-swap-outline":985701,"menu-up":983904,"menu-up-outline":984759,"merge":986972,"message":983905,"message-alert":983906,"message-alert-outline":985604,"message-arrow-left":987890,"message-arrow-left-outline":987891,"message-arrow-right":987892,"message-arrow-right-outline":987893,"message-badge":989505,"message-badge-outline":989506,"message-bookmark":988588,"message-bookmark-outline":988589,"message-bulleted":984738,"message-bulleted-off":984739,"message-cog":984817,"message-cog-outline":987506,"message-draw":983907,"message-flash":988585,"message-flash-outline":988586,"message-image":983908,"message-image-outline":987500,"message-lock":987084,"message-lock-outline":987501,"message-minus":987502,"message-minus-outline":987503,"message-off":988749,"message-off-outline":988750,"message-outline":983909,"message-plus":984659,"message-plus-outline":987323,"message-processing":983910,"message-processing-outline":987504,"message-question":988986,"message-question-outline":988987,"message-reply":983911,"message-reply-outline":988989,"message-reply-text":983912,"message-reply-text-outline":988990,"message-settings":984816,"message-settings-outline":987505,"message-star":984730,"message-star-outline":987728,"message-text":983913,"message-text-clock":987507,"message-text-clock-outline":987508,"message-text-lock":987085,"message-text-lock-outline":987509,"message-text-outline":983914,"message-video":983915,"meteor":984617,"metronome":985050,"metronome-tick":985051,"micro-sd":985052,"microphone":983916,"microphone-minus":985267,"microphone-off":983917,"microphone-outline":983918,"microphone-plus":985268,"microphone-question":989577,"microphone-question-outline":989578,"microphone-settings":983919,"microphone-variant":983920,"microphone-variant-off":983921,"microscope":984660,"microsoft":983922,"microsoft-access":988046,"microsoft-azure":985093,"microsoft-azure-devops":987093,"microsoft-bing":983204,"microsoft-dynamics-365":985480,"microsoft-edge":983529,"microsoft-excel":988047,"microsoft-internet-explorer":983808,"microsoft-office":984006,"microsoft-onedrive":984010,"microsoft-onenote":984903,"microsoft-outlook":986402,"microsoft-powerpoint":988048,"microsoft-sharepoint":988049,"microsoft-teams":983739,"microsoft-visual-studio":984592,"microsoft-visual-studio-code":985630,"microsoft-windows":984499,"microsoft-windows-classic":985633,"microsoft-word":988050,"microsoft-xbox":984505,"microsoft-xbox-controller":984506,"microsoft-xbox-controller-battery-alert":984907,"microsoft-xbox-controller-battery-charging":985634,"microsoft-xbox-controller-battery-empty":984908,"microsoft-xbox-controller-battery-full":984909,"microsoft-xbox-controller-battery-low":984910,"microsoft-xbox-controller-battery-medium":984911,"microsoft-xbox-controller-battery-unknown":984912,"microsoft-xbox-controller-menu":986735,"microsoft-xbox-controller-off":984507,"microsoft-xbox-controller-view":986736,"microwave":986265,"microwave-off":988195,"middleware":986973,"middleware-outline":986974,"midi":985329,"midi-port":985330,"mine":986586,"minecraft":983923,"mini-sd":985605,"minidisc":985606,"minus":983924,"minus-box":983925,"minus-box-multiple":987457,"minus-box-multiple-outline":987458,"minus-box-outline":984818,"minus-circle":983926,"minus-circle-multiple":983898,"minus-circle-multiple-outline":985811,"minus-circle-off":988249,"minus-circle-off-outline":988250,"minus-circle-outline":983927,"minus-network":983928,"minus-network-outline":986266,"minus-thick":988729,"mirror":987645,"mirror-rectangle":989087,"mirror-variant":989088,"mixed-martial-arts":986511,"mixed-reality":985215,"molecule":986028,"molecule-co":987902,"molecule-co2":985060,"monitor":983929,"monitor-cellphone":985481,"monitor-cellphone-star":985482,"monitor-dashboard":985607,"monitor-edit":987846,"monitor-eye":988084,"monitor-lock":986587,"monitor-multiple":983930,"monitor-off":986512,"monitor-screenshot":986705,"monitor-share":988291,"monitor-shimmer":987396,"monitor-small":989302,"monitor-speaker":986975,"monitor-speaker-off":986976,"monitor-star":986588,"moon-first-quarter":986977,"moon-full":986978,"moon-last-quarter":986979,"moon-new":986980,"moon-waning-crescent":986981,"moon-waning-gibbous":986982,"moon-waxing-crescent":986983,"moon-waxing-gibbous":986984,"moped":987270,"moped-electric":988599,"moped-electric-outline":988600,"moped-outline":988601,"more":983931,"mortar-pestle":989000,"mortar-pestle-plus":984049,"mosque":989223,"mother-heart":987924,"mother-nurse":986401,"motion":988594,"motion-outline":988595,"motion-pause":988560,"motion-pause-outline":988562,"motion-play":988559,"motion-play-outline":988561,"motion-sensor":986513,"motion-sensor-off":988213,"motorbike":983932,"motorbike-electric":988602,"mouse":983933,"mouse-bluetooth":985483,"mouse-move-down":988496,"mouse-move-up":988497,"mouse-move-vertical":988498,"mouse-off":983934,"mouse-variant":983935,"mouse-variant-off":983936,"move-resize":984661,"move-resize-variant":984662,"movie":983937,"movie-check":988915,"movie-check-outline":988916,"movie-cog":988917,"movie-cog-outline":988918,"movie-edit":987426,"movie-edit-outline":987427,"movie-filter":987428,"movie-filter-outline":987429,"movie-minus":988919,"movie-minus-outline":988920,"movie-off":988921,"movie-off-outline":988922,"movie-open":987086,"movie-open-check":988923,"movie-open-check-outline":988924,"movie-open-cog":988925,"movie-open-cog-outline":988926,"movie-open-edit":988927,"movie-open-edit-outline":988928,"movie-open-minus":988929,"movie-open-minus-outline":988930,"movie-open-off":988931,"movie-open-off-outline":988932,"movie-open-outline":987087,"movie-open-play":988933,"movie-open-play-outline":988934,"movie-open-plus":988935,"movie-open-plus-outline":988936,"movie-open-remove":988937,"movie-open-remove-outline":988938,"movie-open-settings":988939,"movie-open-settings-outline":988940,"movie-open-star":988941,"movie-open-star-outline":988942,"movie-outline":986589,"movie-play":988943,"movie-play-outline":988944,"movie-plus":988945,"movie-plus-outline":988946,"movie-remove":988947,"movie-remove-outline":988948,"movie-roll":985054,"movie-search":987602,"movie-search-outline":987603,"movie-settings":988949,"movie-settings-outline":988950,"movie-star":988951,"movie-star-outline":988952,"mower":988783,"mower-bag":988784,"muffin":985484,"multicast":989331,"multiplication":983938,"multiplication-box":983939,"mushroom":985055,"mushroom-off":988154,"mushroom-off-outline":988155,"mushroom-outline":985056,"music":984922,"music-accidental-double-flat":986985,"music-accidental-double-sharp":986986,"music-accidental-flat":986987,"music-accidental-natural":986988,"music-accidental-sharp":986989,"music-box":983940,"music-box-multiple":983859,"music-box-multiple-outline":986884,"music-box-outline":983941,"music-circle":983942,"music-circle-outline":985812,"music-clef-alto":986990,"music-clef-bass":986991,"music-clef-treble":986992,"music-note":983943,"music-note-bluetooth":984574,"music-note-bluetooth-off":984575,"music-note-eighth":983944,"music-note-eighth-dotted":986993,"music-note-half":983945,"music-note-half-dotted":986994,"music-note-off":983946,"music-note-off-outline":986995,"music-note-outline":986996,"music-note-plus":986590,"music-note-quarter":983947,"music-note-quarter-dotted":986997,"music-note-sixteenth":983948,"music-note-sixteenth-dotted":986998,"music-note-whole":983949,"music-note-whole-dotted":986999,"music-off":984923,"music-rest-eighth":987000,"music-rest-half":987001,"music-rest-quarter":987002,"music-rest-sixteenth":987003,"music-rest-whole":987004,"mustache":988638,"nail":986591,"nas":985331,"nativescript":985216,"nature":983950,"nature-people":983951,"navigation":983952,"navigation-outline":988679,"navigation-variant":989424,"navigation-variant-outline":989425,"near-me":984525,"necklace":986891,"needle":983953,"netflix":984902,"network":984819,"network-off":986267,"network-off-outline":986268,"network-outline":986269,"network-strength-1":985332,"network-strength-1-alert":985333,"network-strength-2":985334,"network-strength-2-alert":985335,"network-strength-3":985336,"network-strength-3-alert":985337,"network-strength-4":985338,"network-strength-4-alert":985339,"network-strength-4-cog":989466,"network-strength-off":985340,"network-strength-off-outline":985341,"network-strength-outline":985342,"new-box":983956,"newspaper":983957,"newspaper-check":989507,"newspaper-minus":986892,"newspaper-plus":986893,"newspaper-remove":989508,"newspaper-variant":987137,"newspaper-variant-multiple":987138,"newspaper-variant-multiple-outline":987139,"newspaper-variant-outline":987140,"nfc":983958,"nfc-search-variant":986707,"nfc-tap":983959,"nfc-variant":983960,"nfc-variant-off":986708,"ninja":984948,"nintendo-game-boy":988051,"nintendo-switch":985057,"nintendo-wii":984491,"nintendo-wiiu":984877,"nix":987397,"nodejs":983961,"noodles":987518,"not-equal":985485,"not-equal-variant":985486,"note":983962,"note-alert":989053,"note-alert-outline":989054,"note-check":989055,"note-check-outline":989056,"note-edit":989057,"note-edit-outline":989058,"note-minus":988751,"note-minus-outline":988752,"note-multiple":984760,"note-multiple-outline":984761,"note-off":989059,"note-off-outline":989060,"note-outline":983963,"note-plus":983964,"note-plus-outline":983965,"note-remove":988753,"note-remove-outline":988754,"note-search":988755,"note-search-outline":988756,"note-text":983966,"note-text-outline":987607,"notebook":985134,"notebook-check":988405,"notebook-check-outline":988406,"notebook-edit":988391,"notebook-edit-outline":988393,"notebook-minus":988688,"notebook-minus-outline":988689,"notebook-multiple":986709,"notebook-outline":986815,"notebook-plus":988690,"notebook-plus-outline":988691,"notebook-remove":988692,"notebook-remove-outline":988693,"notification-clear-all":983967,"npm":984823,"nuke":984740,"null":985058,"numeric":983968,"numeric-0":985913,"numeric-0-box":983969,"numeric-0-box-multiple":986894,"numeric-0-box-multiple-outline":983970,"numeric-0-box-outline":983971,"numeric-0-circle":986270,"numeric-0-circle-outline":986271,"numeric-1":985914,"numeric-1-box":983972,"numeric-1-box-multiple":986895,"numeric-1-box-multiple-outline":983973,"numeric-1-box-outline":983974,"numeric-1-circle":986272,"numeric-1-circle-outline":986273,"numeric-10":987113,"numeric-10-box":987005,"numeric-10-box-multiple":987114,"numeric-10-box-multiple-outline":987115,"numeric-10-box-outline":987006,"numeric-10-circle":987116,"numeric-10-circle-outline":987117,"numeric-2":985915,"numeric-2-box":983975,"numeric-2-box-multiple":986896,"numeric-2-box-multiple-outline":983976,"numeric-2-box-outline":983977,"numeric-2-circle":986274,"numeric-2-circle-outline":986275,"numeric-3":985916,"numeric-3-box":983978,"numeric-3-box-multiple":986897,"numeric-3-box-multiple-outline":983979,"numeric-3-box-outline":983980,"numeric-3-circle":986276,"numeric-3-circle-outline":986277,"numeric-4":985917,"numeric-4-box":983981,"numeric-4-box-multiple":986898,"numeric-4-box-multiple-outline":983986,"numeric-4-box-outline":983982,"numeric-4-circle":986278,"numeric-4-circle-outline":986279,"numeric-5":985918,"numeric-5-box":983985,"numeric-5-box-multiple":986899,"numeric-5-box-multiple-outline":983983,"numeric-5-box-outline":983984,"numeric-5-circle":986280,"numeric-5-circle-outline":986281,"numeric-6":985919,"numeric-6-box":983987,"numeric-6-box-multiple":986900,"numeric-6-box-multiple-outline":983988,"numeric-6-box-outline":983989,"numeric-6-circle":986282,"numeric-6-circle-outline":986283,"numeric-7":985920,"numeric-7-box":983990,"numeric-7-box-multiple":986901,"numeric-7-box-multiple-outline":983991,"numeric-7-box-outline":983992,"numeric-7-circle":986284,"numeric-7-circle-outline":986285,"numeric-8":985921,"numeric-8-box":983993,"numeric-8-box-multiple":986902,"numeric-8-box-multiple-outline":983994,"numeric-8-box-outline":983995,"numeric-8-circle":986286,"numeric-8-circle-outline":986287,"numeric-9":985922,"numeric-9-box":983996,"numeric-9-box-multiple":986903,"numeric-9-box-multiple-outline":983997,"numeric-9-box-outline":983998,"numeric-9-circle":986288,"numeric-9-circle-outline":986289,"numeric-9-plus":987118,"numeric-9-plus-box":983999,"numeric-9-plus-box-multiple":986904,"numeric-9-plus-box-multiple-outline":984000,"numeric-9-plus-box-outline":984001,"numeric-9-plus-circle":986290,"numeric-9-plus-circle-outline":986291,"numeric-negative-1":987218,"numeric-positive-1":988619,"nut":984824,"nutrition":984002,"nuxt":987398,"oar":984700,"ocarina":986592,"oci":987881,"ocr":987450,"octagon":984003,"octagon-outline":984004,"octagram":984825,"octagram-outline":984949,"octahedron":989520,"octahedron-off":989521,"odnoklassniki":984005,"offer":987675,"office-building":985489,"office-building-cog":989513,"office-building-cog-outline":989514,"office-building-marker":988448,"office-building-marker-outline":988449,"office-building-outline":988447,"oil":984007,"oil-lamp":986905,"oil-level":987219,"oil-temperature":987128,"om":985459,"omega":984009,"one-up":986029,"onepassword":985217,"opacity":984524,"open-in-app":984011,"open-in-new":984012,"open-source-initiative":986030,"openid":984013,"opera":984014,"orbit":983064,"orbit-variant":988635,"order-alphabetical-ascending":983565,"order-alphabetical-descending":986375,"order-bool-ascending":983742,"order-bool-ascending-variant":985487,"order-bool-descending":988036,"order-bool-descending-variant":985488,"order-numeric-ascending":984389,"order-numeric-descending":984390,"origin":985923,"ornament":984015,"ornament-variant":984016,"outdoor-lamp":987220,"overscan":987141,"owl":984018,"pac-man":986031,"package":984019,"package-down":984020,"package-up":984021,"package-variant":984022,"package-variant-closed":984023,"page-first":984576,"page-last":984577,"page-layout-body":984826,"page-layout-footer":984827,"page-layout-header":984828,"page-layout-header-footer":987007,"page-layout-sidebar-left":984829,"page-layout-sidebar-right":984830,"page-next":986032,"page-next-outline":986033,"page-previous":986034,"page-previous-outline":986035,"pail":988183,"pail-minus":988215,"pail-minus-outline":988220,"pail-off":988217,"pail-off-outline":988222,"pail-outline":988218,"pail-plus":988214,"pail-plus-outline":988219,"pail-remove":988216,"pail-remove-outline":988221,"palette":984024,"palette-advanced":984025,"palette-outline":986636,"palette-swatch":985269,"palette-swatch-outline":987996,"palette-swatch-variant":989530,"palm-tree":987221,"pan":986036,"pan-bottom-left":986037,"pan-bottom-right":986038,"pan-down":986039,"pan-horizontal":986040,"pan-left":986041,"pan-right":986042,"pan-top-left":986043,"pan-top-right":986044,"pan-up":986045,"pan-vertical":986046,"panda":984026,"pandora":984027,"panorama":984028,"panorama-fisheye":984029,"panorama-horizontal":989480,"panorama-horizontal-outline":984030,"panorama-outline":989580,"panorama-sphere":989581,"panorama-sphere-outline":989582,"panorama-variant":989583,"panorama-variant-outline":989584,"panorama-vertical":989481,"panorama-vertical-outline":984031,"panorama-wide-angle":989535,"panorama-wide-angle-outline":984032,"paper-cut-vertical":984033,"paper-roll":987479,"paper-roll-outline":987480,"paperclip":984034,"parachute":986292,"parachute-outline":986293,"paragliding":988997,"parking":984035,"party-popper":987222,"passport":985059,"passport-biometric":986593,"pasta":987488,"patio-heater":987008,"patreon":985218,"pause":984036,"pause-circle":984037,"pause-circle-outline":984038,"pause-octagon":984039,"pause-octagon-outline":984040,"paw":984041,"paw-off":984663,"paw-off-outline":988790,"paw-outline":988789,"peace":985220,"peanut":987132,"peanut-off":987133,"peanut-off-outline":987135,"peanut-outline":987134,"pen":984042,"pen-lock":986594,"pen-minus":986595,"pen-off":986596,"pen-plus":986597,"pen-remove":986598,"pencil":984043,"pencil-box":984044,"pencil-box-multiple":987460,"pencil-box-multiple-outline":987461,"pencil-box-outline":984045,"pencil-circle":984831,"pencil-circle-outline":984950,"pencil-lock":984046,"pencil-lock-outline":986599,"pencil-minus":986600,"pencil-minus-outline":986601,"pencil-off":984047,"pencil-off-outline":986602,"pencil-outline":986294,"pencil-plus":986603,"pencil-plus-outline":986604,"pencil-remove":986605,"pencil-remove-outline":986606,"pencil-ruler":987987,"penguin":986816,"pentagon":984833,"pentagon-outline":984832,"pentagram":988775,"percent":984048,"percent-outline":987768,"periodic-table":985270,"perspective-less":986403,"perspective-more":986404,"ph":989125,"phone":984050,"phone-alert":986906,"phone-alert-outline":987534,"phone-bluetooth":984051,"phone-bluetooth-outline":987535,"phone-cancel":987324,"phone-cancel-outline":987536,"phone-check":987561,"phone-check-outline":987562,"phone-classic":984578,"phone-classic-off":987769,"phone-dial":988505,"phone-dial-outline":988506,"phone-forward":984052,"phone-forward-outline":987537,"phone-hangup":984053,"phone-hangup-outline":987538,"phone-in-talk":984054,"phone-in-talk-outline":987522,"phone-incoming":984055,"phone-incoming-outline":987539,"phone-lock":984056,"phone-lock-outline":987540,"phone-log":984057,"phone-log-outline":987541,"phone-message":987542,"phone-message-outline":987543,"phone-minus":984664,"phone-minus-outline":987544,"phone-missed":984058,"phone-missed-outline":987557,"phone-off":986607,"phone-off-outline":987558,"phone-outgoing":984059,"phone-outgoing-outline":987545,"phone-outline":986608,"phone-paused":984060,"phone-paused-outline":987546,"phone-plus":984665,"phone-plus-outline":987547,"phone-refresh":989587,"phone-refresh-outline":989588,"phone-remove":988463,"phone-remove-outline":988464,"phone-return":985135,"phone-return-outline":987548,"phone-ring":987563,"phone-ring-outline":987564,"phone-rotate-landscape":985221,"phone-rotate-portrait":985222,"phone-settings":984061,"phone-settings-outline":987549,"phone-sync":989589,"phone-sync-outline":989590,"phone-voip":984062,"pi":984063,"pi-box":984064,"pi-hole":986609,"piano":984701,"piano-off":984728,"pickaxe":985271,"picture-in-picture-bottom-right":986711,"picture-in-picture-bottom-right-outline":986712,"picture-in-picture-top-right":986713,"picture-in-picture-top-right-outline":986714,"pier":985223,"pier-crane":985224,"pig":984065,"pig-variant":987142,"pig-variant-outline":988792,"piggy-bank":987143,"piggy-bank-outline":988793,"pill":984066,"pillar":984834,"pin":984067,"pin-off":984068,"pin-off-outline":985392,"pin-outline":985393,"pine-tree":984069,"pine-tree-box":984070,"pine-tree-fire":988186,"pinterest":984071,"pinwheel":985813,"pinwheel-outline":985814,"pipe":985061,"pipe-disconnected":985062,"pipe-leak":985225,"pipe-valve":989261,"pipe-wrench":987988,"pirate":985608,"pistol":984835,"piston":985226,"pitchfork":988499,"pizza":984073,"play":984074,"play-box":987770,"play-box-multiple":986393,"play-box-multiple-outline":988134,"play-box-outline":984075,"play-circle":984076,"play-circle-outline":984077,"play-network":985227,"play-network-outline":986295,"play-outline":986907,"play-pause":984078,"play-protected-content":984079,"play-speed":985343,"playlist-check":984519,"playlist-edit":985344,"playlist-minus":984080,"playlist-music":986296,"playlist-music-outline":986297,"playlist-play":984081,"playlist-plus":984082,"playlist-remove":984083,"playlist-star":986610,"plex":984762,"pliers":989604,"plus":984085,"plus-box":984086,"plus-box-multiple":983860,"plus-box-multiple-outline":987459,"plus-box-outline":984836,"plus-circle":984087,"plus-circle-multiple":983884,"plus-circle-multiple-outline":984088,"plus-circle-outline":984089,"plus-minus":985490,"plus-minus-box":985491,"plus-minus-variant":988361,"plus-network":984090,"plus-network-outline":986298,"plus-outline":984837,"plus-thick":987628,"podcast":985492,"podium":986405,"podium-bronze":986406,"podium-gold":986407,"podium-silver":986408,"point-of-sale":986514,"pokeball":984093,"pokemon-go":985609,"poker-chip":985136,"polaroid":984094,"police-badge":987495,"police-badge-outline":987496,"police-station":989241,"poll":984095,"polo":988355,"polymer":984097,"pool":984582,"popcorn":984098,"post":987144,"post-outline":987145,"postage-stamp":986299,"pot":983781,"pot-mix":984667,"pot-mix-outline":984695,"pot-outline":983807,"pot-steam":984666,"pot-steam-outline":983846,"pound":984099,"pound-box":984100,"pound-box-outline":987519,"power":984101,"power-cycle":985345,"power-off":985346,"power-on":985347,"power-plug":984741,"power-plug-off":984742,"power-plug-off-outline":988196,"power-plug-outline":988197,"power-settings":984102,"power-sleep":985348,"power-socket":984103,"power-socket-au":985349,"power-socket-ch":987059,"power-socket-de":987399,"power-socket-eu":985063,"power-socket-fr":987400,"power-socket-it":988415,"power-socket-jp":987401,"power-socket-uk":985064,"power-socket-us":985065,"power-standby":985350,"powershell":985610,"prescription":984838,"presentation":984104,"presentation-play":984105,"pretzel":988514,"printer":984106,"printer-3d":984107,"printer-3d-nozzle":986715,"printer-3d-nozzle-alert":987584,"printer-3d-nozzle-alert-outline":987585,"printer-3d-nozzle-heat":989368,"printer-3d-nozzle-heat-outline":989369,"printer-3d-nozzle-outline":986716,"printer-alert":984108,"printer-check":987462,"printer-eye":988248,"printer-off":986717,"printer-off-outline":989061,"printer-outline":989062,"printer-pos":987223,"printer-search":988247,"printer-settings":984839,"printer-wireless":985611,"priority-high":984579,"priority-low":984580,"professional-hexagon":984109,"progress-alert":986300,"progress-check":985493,"progress-clock":985494,"progress-close":987402,"progress-download":985495,"progress-pencil":989063,"progress-question":988450,"progress-star":989064,"progress-upload":985496,"progress-wrench":986301,"projector":984110,"projector-screen":984111,"projector-screen-off":989197,"projector-screen-off-outline":989198,"projector-screen-outline":988964,"projector-screen-variant":989199,"projector-screen-variant-off":989200,"projector-screen-variant-off-outline":989201,"projector-screen-variant-outline":989202,"propane-tank":987991,"propane-tank-outline":987992,"protocol":987096,"publish":984743,"publish-off":989509,"pulse":984112,"pump":988162,"pumpkin":986047,"purse":986908,"purse-outline":986909,"puzzle":984113,"puzzle-check":988198,"puzzle-check-outline":988199,"puzzle-edit":988371,"puzzle-edit-outline":988377,"puzzle-heart":988372,"puzzle-heart-outline":988378,"puzzle-minus":988369,"puzzle-minus-outline":988375,"puzzle-outline":985702,"puzzle-plus":988368,"puzzle-plus-outline":988374,"puzzle-remove":988370,"puzzle-remove-outline":988376,"puzzle-star":988373,"puzzle-star-outline":988379,"pyramid":989522,"pyramid-off":989523,"qi":985497,"qqchat":984581,"qrcode":984114,"qrcode-edit":985272,"qrcode-minus":987532,"qrcode-plus":987531,"qrcode-remove":987533,"qrcode-scan":984115,"quadcopter":984116,"quality-high":984117,"quality-low":985612,"quality-medium":985613,"quora":986409,"rabbit":985351,"racing-helmet":986515,"racquetball":986516,"radar":984119,"radiator":984120,"radiator-disabled":985815,"radiator-off":985816,"radio":984121,"radio-am":986302,"radio-fm":986303,"radio-handheld":984122,"radio-off":987676,"radio-tower":984123,"radioactive":984124,"radioactive-circle":989277,"radioactive-circle-outline":989278,"radioactive-off":986817,"radiobox-blank":984125,"radiobox-marked":984126,"radiology-box":988357,"radiology-box-outline":988358,"radius":986304,"radius-outline":986305,"railroad-light":986910,"rake":988484,"raspberry-pi":984127,"ray-end":984128,"ray-end-arrow":984129,"ray-start":984130,"ray-start-arrow":984131,"ray-start-end":984132,"ray-start-vertex-end":988632,"ray-vertex":984133,"razor-double-edge":989591,"razor-single-edge":989592,"react":984840,"read":984135,"receipt":984137,"record":984138,"record-circle":986818,"record-circle-outline":986819,"record-player":985498,"record-rec":984139,"rectangle":986718,"rectangle-outline":986719,"recycle":984140,"recycle-variant":988061,"reddit":984141,"redhat":987419,"redo":984142,"redo-variant":984143,"reflect-horizontal":985614,"reflect-vertical":985615,"refresh":984144,"refresh-auto":989426,"refresh-circle":988023,"regex":984145,"registered-trademark":985703,"reiterate":988552,"relation-many-to-many":988310,"relation-many-to-one":988311,"relation-many-to-one-or-many":988312,"relation-many-to-only-one":988313,"relation-many-to-zero-or-many":988314,"relation-many-to-zero-or-one":988315,"relation-one-or-many-to-many":988316,"relation-one-or-many-to-one":988317,"relation-one-or-many-to-one-or-many":988318,"relation-one-or-many-to-only-one":988319,"relation-one-or-many-to-zero-or-many":988320,"relation-one-or-many-to-zero-or-one":988321,"relation-one-to-many":988322,"relation-one-to-one":988323,"relation-one-to-one-or-many":988324,"relation-one-to-only-one":988325,"relation-one-to-zero-or-many":988326,"relation-one-to-zero-or-one":988327,"relation-only-one-to-many":988328,"relation-only-one-to-one":988329,"relation-only-one-to-one-or-many":988330,"relation-only-one-to-only-one":988331,"relation-only-one-to-zero-or-many":988332,"relation-only-one-to-zero-or-one":988333,"relation-zero-or-many-to-many":988334,"relation-zero-or-many-to-one":988335,"relation-zero-or-many-to-one-or-many":988336,"relation-zero-or-many-to-only-one":988337,"relation-zero-or-many-to-zero-or-many":988338,"relation-zero-or-many-to-zero-or-one":988339,"relation-zero-or-one-to-many":988340,"relation-zero-or-one-to-one":988341,"relation-zero-or-one-to-one-or-many":988342,"relation-zero-or-one-to-only-one":988343,"relation-zero-or-one-to-zero-or-many":988344,"relation-zero-or-one-to-zero-or-one":988345,"relative-scale":984146,"reload":984147,"reload-alert":987403,"reminder":985228,"remote":984148,"remote-desktop":985273,"remote-off":986820,"remote-tv":986821,"remote-tv-off":986822,"rename-box":984149,"reorder-horizontal":984712,"reorder-vertical":984713,"repeat":984150,"repeat-off":984151,"repeat-once":984152,"repeat-variant":984391,"replay":984153,"reply":984154,"reply-all":984155,"reply-all-outline":986911,"reply-circle":987566,"reply-outline":986912,"reproduction":984156,"resistor":985924,"resistor-nodes":985925,"resize":985704,"resize-bottom-right":984157,"responsive":984158,"restart":984841,"restart-alert":987404,"restart-off":986517,"restore":985499,"restore-alert":987405,"rewind":984159,"rewind-10":986410,"rewind-15":989510,"rewind-30":986518,"rewind-5":987641,"rewind-60":988684,"rewind-outline":984842,"rhombus":984843,"rhombus-medium":985616,"rhombus-medium-outline":988380,"rhombus-outline":984844,"rhombus-split":985617,"rhombus-split-outline":988381,"ribbon":984160,"rice":985066,"rickshaw":988603,"rickshaw-electric":988604,"ring":985067,"rivet":986720,"road":984161,"road-variant":984162,"robber":987224,"robot":984745,"robot-angry":988829,"robot-angry-outline":988830,"robot-confused":988831,"robot-confused-outline":988832,"robot-dead":988833,"robot-dead-outline":988834,"robot-excited":988835,"robot-excited-outline":988836,"robot-happy":988953,"robot-happy-outline":988954,"robot-industrial":985926,"robot-love":988837,"robot-love-outline":988838,"robot-mower":987639,"robot-mower-outline":987635,"robot-off":988839,"robot-off-outline":988795,"robot-outline":988794,"robot-vacuum":984845,"robot-vacuum-variant":985352,"rocket":984163,"rocket-launch":988382,"rocket-launch-outline":988383,"rocket-outline":988079,"rodent":987943,"roller-skate":986411,"roller-skate-off":983365,"rollerblade":986412,"rollerblade-off":983086,"rollupjs":986048,"roman-numeral-1":987272,"roman-numeral-10":987281,"roman-numeral-2":987273,"roman-numeral-3":987274,"roman-numeral-4":987275,"roman-numeral-5":987276,"roman-numeral-6":987277,"roman-numeral-7":987278,"roman-numeral-8":987279,"roman-numeral-9":987280,"room-service":985229,"room-service-outline":986519,"rotate-360":989593,"rotate-3d":986823,"rotate-3d-variant":984164,"rotate-left":984165,"rotate-left-variant":984166,"rotate-orbit":986520,"rotate-right":984167,"rotate-right-variant":984168,"rounded-corner":984583,"router":987618,"router-network":987271,"router-wireless":984169,"router-wireless-off":988579,"router-wireless-settings":985705,"routes":984170,"routes-clock":987225,"rowing":984584,"rss":984171,"rss-box":984172,"rss-off":986913,"rug":988277,"rugby":986521,"ruler":984173,"ruler-square":986306,"ruler-square-compass":986814,"run":984846,"run-fast":984174,"rv-truck":987604,"sack":986414,"sack-percent":986415,"safe":985706,"safe-square":987772,"safe-square-outline":987773,"safety-goggles":986416,"sail-boat":986824,"sale":984175,"salesforce":985230,"sass":985068,"satellite":984176,"satellite-uplink":985353,"satellite-variant":984177,"sausage":985274,"sausage-off":989065,"saw-blade":986721,"sawtooth-wave":988282,"saxophone":984585,"scale":984178,"scale-balance":984529,"scale-bathroom":984179,"scale-off":987226,"scale-unbalanced":989624,"scan-helper":988120,"scanner":984747,"scanner-off":985354,"scatter-plot":986825,"scatter-plot-outline":986826,"scent":989528,"scent-off":989529,"school":984180,"school-outline":987520,"scissors-cutting":985707,"scooter":988605,"scooter-electric":988606,"scoreboard":987774,"scoreboard-outline":987775,"screen-rotation":984181,"screen-rotation-lock":984184,"screw-flat-top":986611,"screw-lag":986612,"screw-machine-flat-top":986613,"screw-machine-round-top":986614,"screw-round-top":986615,"screwdriver":984182,"script":986049,"script-outline":984183,"script-text":986050,"script-text-key":988965,"script-text-key-outline":988966,"script-text-outline":986051,"script-text-play":988967,"script-text-play-outline":988968,"sd":984185,"seal":984186,"seal-variant":987097,"search-web":984847,"seat":986307,"seat-flat":984187,"seat-flat-angled":984188,"seat-individual-suite":984189,"seat-legroom-extra":984190,"seat-legroom-normal":984191,"seat-legroom-reduced":984192,"seat-outline":986308,"seat-passenger":987721,"seat-recline-extra":984193,"seat-recline-normal":984194,"seatbelt":986309,"security":984195,"security-network":984196,"seed":986722,"seed-off":988157,"seed-off-outline":988158,"seed-outline":986723,"seesaw":988580,"segment":986827,"select":984197,"select-all":984198,"select-color":986417,"select-compare":985817,"select-drag":985708,"select-group":987010,"select-inverse":984199,"select-marker":987776,"select-multiple":987777,"select-multiple-marker":987778,"select-off":984200,"select-place":987098,"select-remove":989121,"select-search":987652,"selection":984201,"selection-drag":985709,"selection-ellipse":986418,"selection-ellipse-arrow-inside":986914,"selection-ellipse-remove":989122,"selection-marker":987779,"selection-multiple":987781,"selection-multiple-marker":987780,"selection-off":984951,"selection-remove":989123,"selection-search":987653,"semantic-web":987926,"send":984202,"send-check":987489,"send-check-outline":987490,"send-circle":986616,"send-circle-outline":986617,"send-clock":987491,"send-clock-outline":987492,"send-lock":985069,"send-lock-outline":987494,"send-outline":987493,"serial-port":984668,"server":984203,"server-minus":984204,"server-network":984205,"server-network-off":984206,"server-off":984207,"server-plus":984208,"server-remove":984209,"server-security":984210,"set-all":984952,"set-center":984953,"set-center-right":984954,"set-left":984955,"set-left-center":984956,"set-left-right":984957,"set-merge":988384,"set-none":984958,"set-right":984959,"set-split":988385,"set-square":988253,"set-top-box":985503,"settings-helper":985710,"shaker":987406,"shaker-outline":987407,"shape":985137,"shape-circle-plus":984669,"shape-outline":985138,"shape-oval-plus":987642,"shape-plus":984213,"shape-polygon-plus":984670,"shape-rectangle-plus":984671,"shape-square-plus":984672,"shape-square-rounded-plus":988410,"share":984214,"share-all":987636,"share-all-outline":987637,"share-circle":987565,"share-off":986915,"share-off-outline":986916,"share-outline":985394,"share-variant":984215,"share-variant-outline":988436,"shark":989370,"shark-fin":988787,"shark-fin-outline":988788,"shark-off":989371,"sheep":986310,"shield":984216,"shield-account":985231,"shield-account-outline":985618,"shield-account-variant":988583,"shield-account-variant-outline":988584,"shield-airplane":984763,"shield-airplane-outline":986311,"shield-alert":986828,"shield-alert-outline":986829,"shield-bug":988122,"shield-bug-outline":988123,"shield-car":987011,"shield-check":984421,"shield-check-outline":986312,"shield-cross":986313,"shield-cross-outline":986314,"shield-crown":989372,"shield-crown-outline":989373,"shield-edit":987552,"shield-edit-outline":987553,"shield-half":988000,"shield-half-full":984960,"shield-home":984714,"shield-home-outline":986315,"shield-key":986052,"shield-key-outline":986053,"shield-link-variant":986419,"shield-link-variant-outline":986420,"shield-lock":985501,"shield-lock-open":989594,"shield-lock-open-outline":989595,"shield-lock-outline":986316,"shield-moon":989224,"shield-moon-outline":989225,"shield-off":985502,"shield-off-outline":985500,"shield-outline":984217,"shield-plus":985818,"shield-plus-outline":985819,"shield-refresh":983210,"shield-refresh-outline":983520,"shield-remove":985820,"shield-remove-outline":985821,"shield-search":986522,"shield-star":987451,"shield-star-outline":987452,"shield-sun":987229,"shield-sun-outline":987230,"shield-sword":989374,"shield-sword-outline":989375,"shield-sync":987554,"shield-sync-outline":987555,"shimmer":988485,"ship-wheel":985139,"shipping-pallet":989262,"shoe-ballet":988618,"shoe-cleat":988615,"shoe-formal":985927,"shoe-heel":985928,"shoe-print":986618,"shoe-sneaker":988616,"shopping":984218,"shopping-music":984219,"shopping-outline":987605,"shopping-search":987012,"shore":988409,"shovel":984848,"shovel-off":984849,"shower":985504,"shower-head":985505,"shredder":984220,"shuffle":984221,"shuffle-disabled":984222,"shuffle-variant":984223,"shuriken":988031,"sickle":989376,"sigma":984224,"sigma-lower":984619,"sign-caution":984225,"sign-direction":984961,"sign-direction-minus":987136,"sign-direction-plus":987100,"sign-direction-remove":987101,"sign-pole":988408,"sign-real-estate":987416,"sign-text":984962,"signal":984226,"signal-2g":984850,"signal-3g":984851,"signal-4g":984852,"signal-5g":985711,"signal-cellular-1":985276,"signal-cellular-2":985277,"signal-cellular-3":985278,"signal-cellular-outline":985279,"signal-distance-variant":986724,"signal-hspa":984853,"signal-hspa-plus":984854,"signal-off":984963,"signal-variant":984586,"signature":986619,"signature-freehand":986620,"signature-image":986621,"signature-text":986622,"silo":985929,"silverware":984227,"silverware-clean":987102,"silverware-fork":984228,"silverware-fork-knife":985712,"silverware-spoon":984229,"silverware-variant":984230,"sim":984231,"sim-alert":984232,"sim-alert-outline":988627,"sim-off":984233,"sim-off-outline":988628,"sim-outline":988629,"simple-icons":987933,"sina-weibo":985823,"sine-wave":985435,"sitemap":984234,"sitemap-outline":989596,"size-l":988070,"size-m":988069,"size-s":988068,"size-xl":988071,"size-xs":988067,"size-xxl":988072,"size-xxs":988066,"size-xxxl":988073,"skate":986421,"skate-off":984729,"skateboard":988354,"skateboarding":984321,"skew-less":986422,"skew-more":986423,"ski":987908,"ski-cross-country":987909,"ski-water":987910,"skip-backward":984235,"skip-backward-outline":986917,"skip-forward":984236,"skip-forward-outline":986918,"skip-next":984237,"skip-next-circle":984673,"skip-next-circle-outline":984674,"skip-next-outline":986919,"skip-previous":984238,"skip-previous-circle":984675,"skip-previous-circle-outline":984676,"skip-previous-outline":986920,"skull":984716,"skull-crossbones":986054,"skull-crossbones-outline":986055,"skull-outline":986056,"skull-scan":988359,"skull-scan-outline":988360,"skype":984239,"skype-business":984240,"slack":984241,"slash-forward":987103,"slash-forward-box":987104,"sledding":984091,"sleep":984242,"sleep-off":984243,"slide":988581,"slope-downhill":986623,"slope-uphill":986624,"slot-machine":987412,"slot-machine-outline":987413,"smart-card":987325,"smart-card-off":989431,"smart-card-off-outline":989432,"smart-card-outline":987326,"smart-card-reader":987327,"smart-card-reader-outline":987328,"smog":985713,"smoke":989081,"smoke-detector":983954,"smoke-detector-alert":989486,"smoke-detector-alert-outline":989487,"smoke-detector-off":989193,"smoke-detector-off-outline":989194,"smoke-detector-outline":989192,"smoke-detector-variant":989195,"smoke-detector-variant-alert":989488,"smoke-detector-variant-off":989196,"smoking":984244,"smoking-off":984245,"smoking-pipe":988173,"smoking-pipe-off":988200,"snail":988791,"snake":988430,"snapchat":984246,"snowboard":987911,"snowflake":984855,"snowflake-alert":986921,"snowflake-melt":987851,"snowflake-off":988387,"snowflake-variant":986922,"snowman":984247,"snowmobile":984797,"soccer":984248,"soccer-field":985140,"social-distance-2-meters":988537,"social-distance-6-feet":988538,"sofa":984249,"sofa-outline":988525,"sofa-single":988526,"sofa-single-outline":988527,"solar-panel":986523,"solar-panel-large":986524,"solar-power":985714,"soldering-iron":987282,"solid":984717,"sony-playstation":984084,"sort":984250,"sort-alphabetical-ascending":984509,"sort-alphabetical-ascending-variant":987464,"sort-alphabetical-descending":984511,"sort-alphabetical-descending-variant":987465,"sort-alphabetical-variant":984251,"sort-ascending":984252,"sort-bool-ascending":988037,"sort-bool-ascending-variant":988038,"sort-bool-descending":988039,"sort-bool-descending-variant":988040,"sort-calendar-ascending":988487,"sort-calendar-descending":988488,"sort-clock-ascending":988489,"sort-clock-ascending-outline":988490,"sort-clock-descending":988491,"sort-clock-descending-outline":988492,"sort-descending":984253,"sort-numeric-ascending":988041,"sort-numeric-ascending-variant":985357,"sort-numeric-descending":988042,"sort-numeric-descending-variant":985810,"sort-numeric-variant":984254,"sort-reverse-variant":983868,"sort-variant":984255,"sort-variant-lock":986317,"sort-variant-lock-open":986318,"sort-variant-remove":987463,"soundbar":989147,"soundcloud":984256,"source-branch":984620,"source-branch-check":988367,"source-branch-minus":988363,"source-branch-plus":988362,"source-branch-refresh":988365,"source-branch-remove":988364,"source-branch-sync":988366,"source-commit":984856,"source-commit-end":984857,"source-commit-end-local":984858,"source-commit-local":984859,"source-commit-next-local":984860,"source-commit-start":984861,"source-commit-start-next-local":984862,"source-fork":984257,"source-merge":984621,"source-pull":984258,"source-repository":986319,"source-repository-multiple":986320,"soy-sauce":985070,"soy-sauce-off":988156,"spa":986321,"spa-outline":986322,"space-invaders":986057,"space-station":988035,"spade":986725,"speaker":984259,"speaker-bluetooth":985506,"speaker-multiple":986424,"speaker-off":984260,"speaker-wireless":984863,"spear":989253,"speedometer":984261,"speedometer-medium":987013,"speedometer-slow":987014,"spellcheck":984262,"sphere":989524,"sphere-off":989525,"spider":987626,"spider-thread":987627,"spider-web":986058,"spirit-level":988401,"spoon-sugar":988201,"spotify":984263,"spotlight":984264,"spotlight-beam":984265,"spray":984677,"spray-bottle":985824,"sprinkler":987231,"sprinkler-fire":989597,"sprinkler-variant":987232,"sprout":986726,"sprout-outline":986727,"square":984932,"square-circle":988416,"square-edit-outline":985356,"square-medium":985619,"square-medium-outline":985620,"square-off":987886,"square-off-outline":987887,"square-opacity":989268,"square-outline":984931,"square-root":984964,"square-root-box":985507,"square-rounded":988411,"square-rounded-outline":988412,"square-small":985621,"square-wave":988283,"squeegee":985825,"ssh":985280,"stack-exchange":984587,"stack-overflow":984268,"stackpath":983897,"stadium":987129,"stadium-variant":984864,"stairs":984269,"stairs-box":988062,"stairs-down":987838,"stairs-up":987837,"stamper":986425,"standard-definition":985071,"star":984270,"star-box":985715,"star-box-multiple":987782,"star-box-multiple-outline":987783,"star-box-outline":985716,"star-check":988518,"star-check-outline":988522,"star-circle":984271,"star-circle-outline":985508,"star-cog":988776,"star-cog-outline":988777,"star-crescent":985465,"star-david":985466,"star-face":985509,"star-four-points":985826,"star-four-points-outline":985827,"star-half":983622,"star-half-full":984272,"star-minus":988516,"star-minus-outline":988520,"star-off":984273,"star-off-outline":988507,"star-outline":984274,"star-plus":988515,"star-plus-outline":988519,"star-remove":988517,"star-remove-outline":988521,"star-settings":988778,"star-settings-outline":988779,"star-shooting":988993,"star-shooting-outline":988994,"star-three-points":985828,"star-three-points-outline":985829,"state-machine":987631,"steam":984275,"steering":984276,"steering-off":985358,"step-backward":984277,"step-backward-2":984278,"step-forward":984279,"step-forward-2":984280,"stethoscope":984281,"sticker":988004,"sticker-alert":988005,"sticker-alert-outline":988006,"sticker-check":988007,"sticker-check-outline":988008,"sticker-circle-outline":984528,"sticker-emoji":984965,"sticker-minus":988009,"sticker-minus-outline":988010,"sticker-outline":988011,"sticker-plus":988012,"sticker-plus-outline":988013,"sticker-remove":988014,"sticker-remove-outline":988015,"sticker-text":989070,"sticker-text-outline":989071,"stocking":984282,"stomach":987283,"stool":989533,"stool-outline":989534,"stop":984283,"stop-circle":984678,"stop-circle-outline":984679,"store":984284,"store-24-hour":984285,"store-alert":989377,"store-alert-outline":989378,"store-check":989379,"store-check-outline":989380,"store-clock":989381,"store-clock-outline":989382,"store-cog":989383,"store-cog-outline":989384,"store-edit":989385,"store-edit-outline":989386,"store-marker":989387,"store-marker-outline":989388,"store-minus":988766,"store-minus-outline":989389,"store-off":989390,"store-off-outline":989391,"store-outline":988001,"store-plus":988767,"store-plus-outline":989392,"store-remove":988768,"store-remove-outline":989393,"store-search":989394,"store-search-outline":989395,"store-settings":989396,"store-settings-outline":989397,"storefront":985031,"storefront-outline":987329,"stove":984286,"strategy":987606,"stretch-to-page":986923,"stretch-to-page-outline":986924,"string-lights":987834,"string-lights-off":987835,"subdirectory-arrow-left":984588,"subdirectory-arrow-right":984589,"submarine":988524,"subtitles":985622,"subtitles-outline":985623,"subway":984748,"subway-alert-variant":986525,"subway-variant":984287,"summit":984966,"sun-compass":989605,"sun-snowflake":989078,"sun-thermometer":989398,"sun-thermometer-outline":989399,"sun-wireless":989182,"sun-wireless-outline":989183,"sunglasses":984288,"surfing":988998,"surround-sound":984517,"surround-sound-2-0":985072,"surround-sound-2-1":988969,"surround-sound-3-1":985073,"surround-sound-5-1":985074,"surround-sound-5-1-2":988970,"surround-sound-7-1":985075,"svg":984865,"swap-horizontal":984289,"swap-horizontal-bold":986061,"swap-horizontal-circle":987105,"swap-horizontal-circle-outline":987106,"swap-horizontal-variant":985281,"swap-vertical":984290,"swap-vertical-bold":986062,"swap-vertical-circle":987107,"swap-vertical-circle-outline":987108,"swap-vertical-variant":985282,"swim":984291,"switch":984292,"sword":984293,"sword-cross":984967,"syllabary-hangul":987955,"syllabary-hiragana":987956,"syllabary-katakana":987957,"syllabary-katakana-halfwidth":987958,"symbol":988417,"symfony":985830,"sync":984294,"sync-alert":984295,"sync-circle":988024,"sync-off":984296,"tab":984297,"tab-minus":985931,"tab-plus":984924,"tab-remove":985932,"tab-search":989598,"tab-unselected":984298,"table":984299,"table-account":988089,"table-alert":988090,"table-arrow-down":988091,"table-arrow-left":988092,"table-arrow-right":988093,"table-arrow-up":988094,"table-border":985624,"table-cancel":988095,"table-chair":987233,"table-check":988096,"table-clock":988097,"table-cog":988098,"table-column":985141,"table-column-plus-after":984300,"table-column-plus-before":984301,"table-column-remove":984302,"table-column-width":984303,"table-edit":984304,"table-eye":987284,"table-eye-off":988099,"table-furniture":984508,"table-headers-eye":987677,"table-headers-eye-off":987678,"table-heart":988100,"table-key":988101,"table-large":984305,"table-large-plus":987015,"table-large-remove":987016,"table-lock":988102,"table-merge-cells":985510,"table-minus":988103,"table-multiple":988104,"table-network":988105,"table-of-contents":985142,"table-off":988106,"table-picnic":988995,"table-pivot":989244,"table-plus":985717,"table-refresh":988064,"table-remove":985718,"table-row":985143,"table-row-height":984306,"table-row-plus-after":984307,"table-row-plus-before":984308,"table-row-remove":984309,"table-search":985359,"table-settings":985144,"table-split-cell":988202,"table-star":988107,"table-sync":988065,"table-tennis":986728,"tablet":984310,"tablet-android":984311,"tablet-cellphone":985511,"tablet-dashboard":986830,"taco":984930,"tag":984313,"tag-arrow-down":988971,"tag-arrow-down-outline":988972,"tag-arrow-left":988973,"tag-arrow-left-outline":988974,"tag-arrow-right":988975,"tag-arrow-right-outline":988976,"tag-arrow-up":988977,"tag-arrow-up-outline":988978,"tag-faces":984314,"tag-heart":984715,"tag-heart-outline":986063,"tag-minus":985360,"tag-minus-outline":987679,"tag-multiple":984315,"tag-multiple-outline":987895,"tag-off":987680,"tag-off-outline":987681,"tag-outline":984316,"tag-plus":984866,"tag-plus-outline":987682,"tag-remove":984867,"tag-remove-outline":987683,"tag-search":989447,"tag-search-outline":989448,"tag-text":987684,"tag-text-outline":984317,"tailwind":988159,"tangram":984312,"tank":986426,"tanker-truck":987109,"tape-drive":988895,"tape-measure":985933,"target":984318,"target-account":986064,"target-variant":985719,"taxi":984319,"tea":986526,"tea-outline":986527,"teamviewer":984320,"teddy-bear":989435,"telescope":985934,"television":984322,"television-ambient-light":987990,"television-box":985145,"television-classic":985076,"television-classic-off":985146,"television-guide":984323,"television-off":985147,"television-pause":987017,"television-play":986831,"television-shimmer":987408,"television-stop":987018,"temperature-celsius":984324,"temperature-fahrenheit":984325,"temperature-kelvin":984326,"tennis":986528,"tennis-ball":984327,"tent":984328,"terraform":987234,"terrain":984329,"test-tube":984680,"test-tube-empty":985361,"test-tube-off":985362,"text":985512,"text-account":988528,"text-box":983578,"text-box-check":986790,"text-box-check-outline":986791,"text-box-minus":986792,"text-box-minus-outline":986793,"text-box-multiple":985783,"text-box-multiple-outline":985784,"text-box-outline":985581,"text-box-plus":986794,"text-box-plus-outline":986795,"text-box-remove":986796,"text-box-remove-outline":986797,"text-box-search":986798,"text-box-search-outline":986799,"text-long":985514,"text-recognition":987453,"text-search":988088,"text-shadow":984681,"text-short":985513,"text-to-speech":984330,"text-to-speech-off":984331,"texture":984332,"texture-box":987110,"theater":984333,"theme-light-dark":984334,"thermometer":984335,"thermometer-alert":986625,"thermometer-bluetooth":989333,"thermometer-chevron-down":986626,"thermometer-chevron-up":986627,"thermometer-high":987330,"thermometer-lines":984336,"thermometer-low":987331,"thermometer-minus":986628,"thermometer-off":988465,"thermometer-plus":986629,"thermostat":983955,"thermostat-box":985233,"thought-bubble":985078,"thought-bubble-outline":985079,"thumb-down":984337,"thumb-down-outline":984338,"thumb-up":984339,"thumb-up-outline":984340,"thumbs-up-down":984341,"thumbs-up-down-outline":989460,"ticket":984342,"ticket-account":984343,"ticket-confirmation":984344,"ticket-confirmation-outline":988074,"ticket-outline":985363,"ticket-percent":984868,"ticket-percent-outline":988203,"tie":984345,"tilde":984869,"tilde-off":989427,"timelapse":984346,"timeline":986065,"timeline-alert":987029,"timeline-alert-outline":987032,"timeline-check":988466,"timeline-check-outline":988467,"timeline-clock":987643,"timeline-clock-outline":987644,"timeline-help":987033,"timeline-help-outline":987034,"timeline-minus":988468,"timeline-minus-outline":988469,"timeline-outline":986066,"timeline-plus":987030,"timeline-plus-outline":987031,"timeline-remove":988470,"timeline-remove-outline":988471,"timeline-text":986067,"timeline-text-outline":986068,"timer":988075,"timer-10":984348,"timer-3":984349,"timer-cog":989477,"timer-cog-outline":989478,"timer-off":988076,"timer-off-outline":984350,"timer-outline":984347,"timer-sand":984351,"timer-sand-complete":989599,"timer-sand-empty":984749,"timer-sand-full":984972,"timer-sand-paused":989600,"timer-settings":989475,"timer-settings-outline":989476,"timetable":984352,"tire":989334,"toaster":987235,"toaster-off":987575,"toaster-oven":986323,"toggle-switch":984353,"toggle-switch-off":984354,"toggle-switch-off-outline":985625,"toggle-switch-outline":985626,"toilet":985515,"toolbox":985516,"toolbox-outline":985517,"tools":987236,"tooltip":984355,"tooltip-account":983052,"tooltip-cellphone":989243,"tooltip-check":988508,"tooltip-check-outline":988509,"tooltip-edit":984356,"tooltip-edit-outline":987845,"tooltip-image":984357,"tooltip-image-outline":986069,"tooltip-minus":988510,"tooltip-minus-outline":988511,"tooltip-outline":984358,"tooltip-plus":986070,"tooltip-plus-outline":984359,"tooltip-remove":988512,"tooltip-remove-outline":988513,"tooltip-text":984360,"tooltip-text-outline":986071,"tooth":985283,"tooth-outline":984361,"toothbrush":987433,"toothbrush-electric":987436,"toothbrush-paste":987434,"torch":988678,"tortoise":986427,"toslink":987832,"tournament":985518,"tow-truck":985148,"tower-beach":984705,"tower-fire":984706,"town-hall":989301,"toy-brick":987784,"toy-brick-marker":987785,"toy-brick-marker-outline":987786,"toy-brick-minus":987787,"toy-brick-minus-outline":987788,"toy-brick-outline":987789,"toy-brick-plus":987790,"toy-brick-plus-outline":987791,"toy-brick-remove":987792,"toy-brick-remove-outline":987793,"toy-brick-search":987794,"toy-brick-search-outline":987795,"track-light":985364,"trackpad":985080,"trackpad-lock":985395,"tractor":985234,"tractor-variant":988356,"trademark":985720,"traffic-cone":988028,"traffic-light":984363,"traffic-light-outline":989226,"train":984364,"train-car":986072,"train-car-passenger":988979,"train-car-passenger-door":988980,"train-car-passenger-door-open":988981,"train-car-passenger-variant":988982,"train-variant":985284,"tram":984365,"tram-side":987111,"transcribe":984366,"transcribe-close":984367,"transfer":987237,"transfer-down":986529,"transfer-left":986530,"transfer-right":984368,"transfer-up":986531,"transit-connection":986428,"transit-connection-horizontal":988486,"transit-connection-variant":986429,"transit-detour":987019,"transit-skip":988437,"transit-transfer":984750,"transition":985365,"transition-masked":985366,"translate":984522,"translate-off":986630,"transmission-tower":986430,"transmission-tower-export":989484,"transmission-tower-import":989485,"trash-can":985721,"trash-can-outline":985722,"tray":987796,"tray-alert":987797,"tray-arrow-down":983328,"tray-arrow-up":983325,"tray-full":987798,"tray-minus":987799,"tray-plus":987800,"tray-remove":987801,"treasure-chest":984870,"tree":984369,"tree-outline":986729,"trello":984370,"trending-down":984371,"trending-neutral":984372,"trending-up":984373,"triangle":984374,"triangle-outline":984375,"triangle-wave":988284,"triforce":986073,"trophy":984376,"trophy-award":984377,"trophy-broken":986532,"trophy-outline":984378,"trophy-variant":984379,"trophy-variant-outline":984380,"truck":984381,"truck-cargo-container":989400,"truck-check":986324,"truck-check-outline":987802,"truck-delivery":984382,"truck-delivery-outline":987803,"truck-fast":984968,"truck-fast-outline":987804,"truck-flatbed":989329,"truck-minus":989614,"truck-minus-outline":989629,"truck-outline":987805,"truck-plus":989613,"truck-plus-outline":989628,"truck-remove":989615,"truck-remove-outline":989630,"truck-snowflake":989606,"truck-trailer":984871,"trumpet":987286,"tshirt-crew":985723,"tshirt-crew-outline":984383,"tshirt-v":985724,"tshirt-v-outline":984384,"tumble-dryer":985367,"tumble-dryer-alert":987578,"tumble-dryer-off":987579,"tune":984622,"tune-variant":988482,"tune-vertical":984682,"tune-vertical-variant":988483,"tunnel":989245,"tunnel-outline":989246,"turkey":988955,"turnstile":986325,"turnstile-outline":986326,"turtle":986327,"twitch":984387,"twitter":984388,"two-factor-authentication":985519,"typewriter":986925,"ubisoft":986074,"ubuntu":984392,"ufo":987332,"ufo-outline":987333,"ultra-high-definition":985081,"umbraco":984393,"umbrella":984394,"umbrella-beach":989322,"umbrella-beach-outline":989323,"umbrella-closed":985520,"umbrella-closed-outline":988130,"umbrella-closed-variant":988129,"umbrella-outline":984395,"undo":984396,"undo-variant":984397,"unfold-less-horizontal":984398,"unfold-less-vertical":984928,"unfold-more-horizontal":984399,"unfold-more-vertical":984929,"ungroup":984400,"unicode":986832,"unicorn":988610,"unicorn-variant":988611,"unicycle":988645,"unity":984751,"unreal":985521,"update":984752,"upload":984402,"upload-lock":988019,"upload-lock-outline":988020,"upload-multiple":985149,"upload-network":984822,"upload-network-outline":986328,"upload-off":987334,"upload-off-outline":987335,"upload-outline":986631,"usb":984403,"usb-flash-drive":987806,"usb-flash-drive-outline":987807,"usb-port":987632,"vacuum":989601,"vacuum-outline":989602,"valve":987238,"valve-closed":987239,"valve-open":987240,"van-passenger":985082,"van-utility":985083,"vanish":985084,"vanish-quarter":988500,"vanity-light":987617,"variable":985831,"variable-box":987409,"vector-arrange-above":984404,"vector-arrange-below":984405,"vector-bezier":985832,"vector-circle":984406,"vector-circle-variant":984407,"vector-combine":984408,"vector-curve":984409,"vector-difference":984410,"vector-difference-ab":984411,"vector-difference-ba":984412,"vector-ellipse":985235,"vector-intersection":984413,"vector-line":984414,"vector-link":987112,"vector-point":984415,"vector-polygon":984416,"vector-polygon-variant":989270,"vector-polyline":984417,"vector-polyline-edit":987685,"vector-polyline-minus":987686,"vector-polyline-plus":987687,"vector-polyline-remove":987688,"vector-radius":984906,"vector-rectangle":984518,"vector-selection":984418,"vector-square":983041,"vector-square-close":989271,"vector-square-edit":989401,"vector-square-minus":989402,"vector-square-open":989272,"vector-square-plus":989403,"vector-square-remove":989404,"vector-triangle":984419,"vector-union":984420,"vhs":985627,"vibrate":984422,"vibrate-off":986329,"video":984423,"video-3d":985085,"video-3d-off":988121,"video-3d-variant":986833,"video-4k-box":985150,"video-account":985369,"video-box":983293,"video-box-off":983294,"video-check":987241,"video-check-outline":987242,"video-high-definition":988462,"video-image":985370,"video-input-antenna":985151,"video-input-component":985152,"video-input-hdmi":985153,"video-input-scart":987020,"video-input-svideo":985154,"video-marker":989609,"video-marker-outline":989610,"video-minus":985522,"video-minus-outline":983738,"video-off":984424,"video-off-outline":986075,"video-outline":986076,"video-plus":985523,"video-plus-outline":983507,"video-stabilization":985371,"video-switch":984425,"video-switch-outline":984976,"video-vintage":985628,"video-wireless":986834,"video-wireless-outline":986835,"view-agenda":984426,"view-agenda-outline":987608,"view-array":984427,"view-array-outline":988293,"view-carousel":984428,"view-carousel-outline":988294,"view-column":984429,"view-column-outline":988295,"view-comfy":986730,"view-comfy-outline":988296,"view-compact":986731,"view-compact-outline":986732,"view-dashboard":984430,"view-dashboard-edit":989511,"view-dashboard-edit-outline":989512,"view-dashboard-outline":985629,"view-dashboard-variant":985155,"view-dashboard-variant-outline":988297,"view-day":984431,"view-day-outline":988298,"view-gallery":989320,"view-gallery-outline":989321,"view-grid":984432,"view-grid-outline":987609,"view-grid-plus":987021,"view-grid-plus-outline":987610,"view-headline":984433,"view-list":984434,"view-list-outline":988299,"view-module":984435,"view-module-outline":988300,"view-parallel":984872,"view-parallel-outline":988301,"view-quilt":984436,"view-quilt-outline":988302,"view-sequential":984873,"view-sequential-outline":988303,"view-split-horizontal":986059,"view-split-vertical":986060,"view-stream":984437,"view-stream-outline":988304,"view-week":984438,"view-week-outline":988305,"vimeo":984439,"violin":984591,"virtual-reality":985236,"virus":988086,"virus-off":989409,"virus-off-outline":989410,"virus-outline":988087,"vlc":984444,"voicemail":984445,"volleyball":985524,"volume-high":984446,"volume-low":984447,"volume-medium":984448,"volume-minus":984926,"volume-mute":984927,"volume-off":984449,"volume-plus":984925,"volume-source":987424,"volume-variant-off":986632,"volume-vibrate":987425,"vote":985631,"vote-outline":985632,"vpn":984450,"vuejs":985156,"vuetify":986733,"walk":984451,"wall":985086,"wall-sconce":985372,"wall-sconce-flat":985373,"wall-sconce-flat-outline":989129,"wall-sconce-flat-variant":984092,"wall-sconce-flat-variant-outline":989130,"wall-sconce-outline":989131,"wall-sconce-round":984904,"wall-sconce-round-outline":989132,"wall-sconce-round-variant":985374,"wall-sconce-round-variant-outline":989133,"wallet":984452,"wallet-giftcard":984453,"wallet-membership":984454,"wallet-outline":986077,"wallet-plus":987022,"wallet-plus-outline":987023,"wallet-travel":984455,"wallpaper":986633,"wan":984456,"wardrobe":987024,"wardrobe-outline":987025,"warehouse":987009,"washing-machine":984874,"washing-machine-alert":987580,"washing-machine-off":987581,"watch":984457,"watch-export":984458,"watch-export-variant":985237,"watch-import":984459,"watch-import-variant":985238,"watch-variant":985239,"watch-vibrate":984753,"watch-vibrate-off":986330,"water":984460,"water-alert":988418,"water-alert-outline":988419,"water-boiler":987026,"water-boiler-alert":987571,"water-boiler-off":987572,"water-check":988420,"water-check-outline":988421,"water-circle":989190,"water-minus":988422,"water-minus-outline":988423,"water-off":984461,"water-off-outline":988424,"water-opacity":989269,"water-outline":986634,"water-percent":984462,"water-percent-alert":988425,"water-plus":988426,"water-plus-outline":988427,"water-polo":987808,"water-pump":984463,"water-pump-off":987027,"water-remove":988428,"water-remove-outline":988429,"water-sync":989126,"water-well":987243,"water-well-outline":987244,"waterfall":989257,"watering-can":988289,"watering-can-outline":988290,"watermark":984594,"wave":986926,"waveform":988285,"waves":984973,"waves-arrow-left":989273,"waves-arrow-right":989274,"waves-arrow-up":989275,"waze":986078,"weather-cloudy":984464,"weather-cloudy-alert":986927,"weather-cloudy-arrow-right":986734,"weather-cloudy-clock":989430,"weather-fog":984465,"weather-hail":984466,"weather-hazy":986928,"weather-hurricane":985240,"weather-lightning":984467,"weather-lightning-rainy":984702,"weather-night":984468,"weather-night-partly-cloudy":986929,"weather-partly-cloudy":984469,"weather-partly-lightning":986930,"weather-partly-rainy":986931,"weather-partly-snowy":986932,"weather-partly-snowy-rainy":986933,"weather-pouring":984470,"weather-rainy":984471,"weather-snowy":984472,"weather-snowy-heavy":986934,"weather-snowy-rainy":984703,"weather-sunny":984473,"weather-sunny-alert":986935,"weather-sunny-off":988388,"weather-sunset":984474,"weather-sunset-down":984475,"weather-sunset-up":984476,"weather-tornado":986936,"weather-windy":984477,"weather-windy-variant":984478,"web":984479,"web-box":987028,"web-cancel":989072,"web-check":984969,"web-clock":987722,"web-minus":987296,"web-off":985742,"web-plus":983091,"web-refresh":989073,"web-remove":984401,"web-sync":989074,"webcam":984480,"webcam-off":988983,"webhook":984623,"webpack":984875,"webrtc":987720,"wechat":984593,"weight":984481,"weight-gram":986431,"weight-kilogram":984482,"weight-lifter":987485,"weight-pound":985525,"whatsapp":984483,"wheel-barrow":988402,"wheelchair-accessibility":984484,"whistle":985526,"whistle-outline":987836,"white-balance-auto":984485,"white-balance-incandescent":984486,"white-balance-iridescent":984487,"white-balance-sunny":984488,"widgets":984876,"widgets-outline":987989,"wifi":984489,"wifi-alert":988853,"wifi-arrow-down":988854,"wifi-arrow-left":988855,"wifi-arrow-left-right":988856,"wifi-arrow-right":988857,"wifi-arrow-up":988858,"wifi-arrow-up-down":988859,"wifi-cancel":988860,"wifi-check":988861,"wifi-cog":988862,"wifi-lock":988863,"wifi-lock-open":988864,"wifi-marker":988865,"wifi-minus":988866,"wifi-off":984490,"wifi-plus":988867,"wifi-refresh":988868,"wifi-remove":988869,"wifi-settings":988870,"wifi-star":986635,"wifi-strength-1":985375,"wifi-strength-1-alert":985376,"wifi-strength-1-lock":985377,"wifi-strength-1-lock-open":988875,"wifi-strength-2":985378,"wifi-strength-2-alert":985379,"wifi-strength-2-lock":985380,"wifi-strength-2-lock-open":988876,"wifi-strength-3":985381,"wifi-strength-3-alert":985382,"wifi-strength-3-lock":985383,"wifi-strength-3-lock-open":988877,"wifi-strength-4":985384,"wifi-strength-4-alert":985385,"wifi-strength-4-lock":985386,"wifi-strength-4-lock-open":988878,"wifi-strength-alert-outline":985387,"wifi-strength-lock-open-outline":988879,"wifi-strength-lock-outline":985388,"wifi-strength-off":985389,"wifi-strength-off-outline":985390,"wifi-strength-outline":985391,"wifi-sync":988871,"wikipedia":984492,"wind-turbine":986533,"wind-turbine-alert":989611,"wind-turbine-check":989612,"window-close":984493,"window-closed":984494,"window-closed-variant":987611,"window-maximize":984495,"window-minimize":984496,"window-open":984497,"window-open-variant":987612,"window-restore":984498,"window-shutter":987420,"window-shutter-alert":987421,"window-shutter-open":987422,"windsock":988666,"wiper":985833,"wiper-wash":986534,"wiper-wash-alert":989407,"wizard-hat":988279,"wordpress":984500,"wrap":984502,"wrap-disabled":986079,"wrench":984503,"wrench-clock":989603,"wrench-outline":986080,"xamarin":985157,"xml":984512,"xmpp":985087,"yahoo":985935,"yeast":984513,"yin-yang":984704,"yoga":987516,"youtube":984515,"youtube-gaming":985160,"youtube-studio":985159,"youtube-subscription":986432,"youtube-tv":984136,"yurt":988438,"z-wave":985834,"zend":985835,"zigbee":986433,"zip-box":984516,"zip-box-outline":987130,"zip-disk":985635,"zodiac-aquarius":985725,"zodiac-aries":985726,"zodiac-cancer":985727,"zodiac-capricorn":985728,"zodiac-gemini":985729,"zodiac-leo":985730,"zodiac-libra":985731,"zodiac-pisces":985732,"zodiac-sagittarius":985733,"zodiac-scorpio":985734,"zodiac-taurus":985735,"zodiac-virgo":985736,"blank":63116}'),o=(0,r.default)(i,"material-community",a)},19149:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/MaterialIcons.f20305dee9d396fea5c7.ttf",i=JSON.parse('{"123":60301,"360":58743,"10k":59729,"10mp":59730,"11mp":59731,"12mp":59732,"13mp":59733,"14mp":59734,"15mp":59735,"16mp":59736,"17mp":59737,"18-up-rating":63741,"18mp":59738,"19mp":59739,"1k":59740,"1k-plus":59741,"1x-mobiledata":61389,"20mp":59742,"21mp":59743,"22mp":59744,"23mp":59745,"24mp":59746,"2k":59747,"2k-plus":59748,"2mp":59749,"30fps":61390,"30fps-select":61391,"3d-rotation":59469,"3g-mobiledata":61392,"3k":59750,"3k-plus":59751,"3mp":59752,"3p":61393,"4g-mobiledata":61394,"4g-plus-mobiledata":61395,"4k":57458,"4k-plus":59753,"4mp":59754,"5g":61240,"5k":59755,"5k-plus":59756,"5mp":59757,"60fps":61396,"60fps-select":61397,"6-ft-apart":61982,"6k":59758,"6k-plus":59759,"6mp":59760,"7k":59761,"7k-plus":59762,"7mp":59763,"8k":59764,"8k-plus":59765,"8mp":59766,"9k":59767,"9k-plus":59768,"9mp":59769,"abc":60308,"ac-unit":60219,"access-alarm":57744,"access-alarms":57745,"access-time":57746,"access-time-filled":61398,"accessibility":59470,"accessibility-new":59692,"accessible":59668,"accessible-forward":59700,"account-balance":59471,"account-balance-wallet":59472,"account-box":59473,"account-circle":59475,"account-tree":59770,"ad-units":61241,"adb":58894,"add":57669,"add-a-photo":58425,"add-alarm":57747,"add-alert":57347,"add-box":57670,"add-business":59177,"add-call":57576,"add-card":60294,"add-chart":59771,"add-circle":57671,"add-circle-outline":57672,"add-comment":57958,"add-home":63723,"add-home-work":63725,"add-ic-call":59772,"add-link":57720,"add-location":58727,"add-location-alt":61242,"add-moderator":59773,"add-photo-alternate":58430,"add-reaction":57811,"add-road":61243,"add-shopping-cart":59476,"add-task":62010,"add-to-drive":58972,"add-to-home-screen":57854,"add-to-photos":58269,"add-to-queue":57436,"addchart":61244,"adf-scanner":60122,"adjust":58270,"admin-panel-settings":61245,"adobe":60054,"ads-click":59234,"agriculture":60025,"air":61400,"airline-seat-flat":58928,"airline-seat-flat-angled":58929,"airline-seat-individual-suite":58930,"airline-seat-legroom-extra":58931,"airline-seat-legroom-normal":58932,"airline-seat-legroom-reduced":58933,"airline-seat-recline-extra":58934,"airline-seat-recline-normal":58935,"airline-stops":59344,"airlines":59338,"airplane-ticket":61401,"airplanemode-active":57749,"airplanemode-inactive":57748,"airplanemode-off":57748,"airplanemode-on":57749,"airplay":57429,"airport-shuttle":60220,"alarm":59477,"alarm-add":59478,"alarm-off":59479,"alarm-on":59480,"album":57369,"align-horizontal-center":57359,"align-horizontal-left":57357,"align-horizontal-right":57360,"align-vertical-bottom":57365,"align-vertical-center":57361,"align-vertical-top":57356,"all-inbox":59775,"all-inclusive":60221,"all-out":59659,"alt-route":61828,"alternate-email":57574,"amp-stories":59923,"analytics":61246,"anchor":61901,"android":59481,"animation":59164,"announcement":59482,"aod":61402,"apartment":59968,"api":61879,"app-blocking":61247,"app-registration":61248,"app-settings-alt":61249,"app-shortcut":60132,"apple":60032,"approval":59778,"apps":58819,"apps-outage":59340,"architecture":59963,"archive":57673,"area-chart":59248,"arrow-back":58820,"arrow-back-ios":58848,"arrow-back-ios-new":58090,"arrow-circle-down":61825,"arrow-circle-left":60071,"arrow-circle-right":60074,"arrow-circle-up":61826,"arrow-downward":58843,"arrow-drop-down":58821,"arrow-drop-down-circle":58822,"arrow-drop-up":58823,"arrow-forward":58824,"arrow-forward-ios":58849,"arrow-left":58846,"arrow-outward":63694,"arrow-right":58847,"arrow-right-alt":59713,"arrow-upward":58840,"art-track":57440,"article":61250,"aspect-ratio":59483,"assessment":59484,"assignment":59485,"assignment-add":63560,"assignment-ind":59486,"assignment-late":59487,"assignment-return":59488,"assignment-returned":59489,"assignment-turned-in":59490,"assist-walker":63701,"assistant":58271,"assistant-direction":59784,"assistant-navigation":59785,"assistant-photo":58272,"assured-workload":60271,"atm":58739,"attach-email":59998,"attach-file":57894,"attach-money":57895,"attachment":58044,"attractions":59986,"attribution":61403,"audio-file":60290,"audiotrack":58273,"auto-awesome":58975,"auto-awesome-mosaic":58976,"auto-awesome-motion":58977,"auto-delete":59980,"auto-fix-high":58979,"auto-fix-normal":58980,"auto-fix-off":58981,"auto-graph":58619,"auto-mode":60448,"auto-stories":58982,"autofps-select":61404,"autorenew":59491,"av-timer":57371,"baby-changing-station":61851,"back-hand":59236,"backpack":61852,"backspace":57674,"backup":59492,"backup-table":61251,"badge":60007,"bakery-dining":59987,"balance":60150,"balcony":58767,"ballot":57714,"bar-chart":57963,"barcode-reader":63580,"batch-prediction":61685,"bathroom":61405,"bathtub":59969,"battery-0-bar":60380,"battery-1-bar":60377,"battery-2-bar":60384,"battery-3-bar":60381,"battery-4-bar":60386,"battery-5-bar":60372,"battery-6-bar":60370,"battery-alert":57756,"battery-charging-full":57763,"battery-full":57764,"battery-saver":61406,"battery-std":57765,"battery-unknown":57766,"beach-access":60222,"bed":61407,"bedroom-baby":61408,"bedroom-child":61409,"bedroom-parent":61410,"bedtime":61252,"bedtime-off":60278,"beenhere":58669,"bento":61940,"bike-scooter":61253,"biotech":59962,"blender":61411,"blind":63702,"blinds":57990,"blinds-closed":60447,"block":57675,"block-flipped":61254,"bloodtype":61412,"bluetooth":57767,"bluetooth-audio":58895,"bluetooth-connected":57768,"bluetooth-disabled":57769,"bluetooth-drive":61413,"bluetooth-searching":57770,"blur-circular":58274,"blur-linear":58275,"blur-off":58276,"blur-on":58277,"bolt":59915,"book":59493,"book-online":61975,"bookmark":59494,"bookmark-add":58776,"bookmark-added":58777,"bookmark-border":59495,"bookmark-outline":59495,"bookmark-remove":58778,"bookmarks":59787,"border-all":57896,"border-bottom":57897,"border-clear":57898,"border-color":57899,"border-horizontal":57900,"border-inner":57901,"border-left":57902,"border-outer":57903,"border-right":57904,"border-style":57905,"border-top":57906,"border-vertical":57907,"boy":60263,"branding-watermark":57451,"breakfast-dining":59988,"brightness-1":58278,"brightness-2":58279,"brightness-3":58280,"brightness-4":58281,"brightness-5":58282,"brightness-6":58283,"brightness-7":58284,"brightness-auto":57771,"brightness-high":57772,"brightness-low":57773,"brightness-medium":57774,"broadcast-on-home":63736,"broadcast-on-personal":63737,"broken-image":58285,"browse-gallery":60369,"browser-not-supported":61255,"browser-updated":59343,"brunch-dining":60019,"brush":58286,"bubble-chart":59101,"bug-report":59496,"build":59497,"build-circle":61256,"bungalow":58769,"burst-mode":58428,"bus-alert":59791,"business":57519,"business-center":60223,"cabin":58761,"cable":61414,"cached":59498,"cake":59369,"calculate":59999,"calendar-month":60364,"calendar-today":59701,"calendar-view-day":59702,"calendar-view-month":61415,"calendar-view-week":61416,"call":57520,"call-end":57521,"call-made":57522,"call-merge":57523,"call-missed":57524,"call-missed-outgoing":57572,"call-received":57525,"call-split":57526,"call-to-action":57452,"camera":58287,"camera-alt":58288,"camera-enhance":59644,"camera-front":58289,"camera-indoor":61417,"camera-outdoor":61418,"camera-rear":58290,"camera-roll":58291,"cameraswitch":61419,"campaign":61257,"cancel":58825,"cancel-presentation":57577,"cancel-schedule-send":59961,"candlestick-chart":60116,"car-crash":60402,"car-rental":59989,"car-repair":59990,"card-giftcard":59638,"card-membership":59639,"card-travel":59640,"carpenter":61944,"cases":59794,"casino":60224,"cast":58119,"cast-connected":58120,"cast-for-education":61420,"castle":60081,"catching-pokemon":58632,"category":58740,"celebration":60005,"cell-tower":60346,"cell-wifi":57580,"center-focus-strong":58292,"center-focus-weak":58293,"chair":61421,"chair-alt":61422,"chalet":58757,"change-circle":58087,"change-history":59499,"charging-station":61853,"chat":57527,"chat-bubble":57546,"chat-bubble-outline":57547,"check":58826,"check-box":59444,"check-box-outline-blank":59445,"check-circle":59500,"check-circle-outline":59693,"checklist":59057,"checklist-rtl":59059,"checkroom":61854,"chevron-left":58827,"chevron-right":58828,"child-care":60225,"child-friendly":60226,"chrome-reader-mode":59501,"church":60078,"circle":61258,"circle-notifications":59796,"class":59502,"clean-hands":61983,"cleaning-services":61695,"clear":57676,"clear-all":57528,"close":58829,"close-fullscreen":61903,"closed-caption":57372,"closed-caption-disabled":61916,"closed-caption-off":59798,"cloud":58045,"cloud-circle":58046,"cloud-done":58047,"cloud-download":58048,"cloud-off":58049,"cloud-queue":58050,"cloud-sync":60250,"cloud-upload":58051,"cloudy-snowing":59408,"co2":59312,"co-present":60144,"code":59503,"code-off":58611,"coffee":61423,"coffee-maker":61424,"collections":58294,"collections-bookmark":58417,"color-lens":58295,"colorize":58296,"comment":57529,"comment-bank":59982,"comments-disabled":59298,"commit":60149,"commute":59712,"compare":58297,"compare-arrows":59669,"compass-calibration":58748,"compost":59233,"compress":59725,"computer":58122,"confirmation-num":58936,"confirmation-number":58936,"connect-without-contact":61987,"connected-tv":59800,"connecting-airports":59337,"construction":59964,"contact-emergency":63697,"contact-mail":57552,"contact-page":61998,"contact-phone":57551,"contact-support":59724,"contactless":60017,"contacts":57530,"content-copy":57677,"content-cut":57678,"content-paste":57679,"content-paste-go":60046,"content-paste-off":58616,"content-paste-search":60059,"contrast":60215,"control-camera":57460,"control-point":58298,"control-point-duplicate":58299,"conveyor-belt":63591,"cookie":60076,"copy-all":58092,"copyright":59660,"coronavirus":61985,"corporate-fare":61904,"cottage":58759,"countertops":61943,"create":57680,"create-new-folder":58060,"credit-card":59504,"credit-card-off":58612,"credit-score":61425,"crib":58760,"crisis-alert":60393,"crop":58302,"crop-16-9":58300,"crop-3-2":58301,"crop-5-4":58303,"crop-7-5":58304,"crop-din":58305,"crop-free":58306,"crop-landscape":58307,"crop-original":58308,"crop-portrait":58309,"crop-rotate":58423,"crop-square":58310,"cruelty-free":59289,"css":60307,"currency-bitcoin":60357,"currency-exchange":60272,"currency-franc":60154,"currency-lira":60143,"currency-pound":60145,"currency-ruble":60140,"currency-rupee":60151,"currency-yen":60155,"currency-yuan":60153,"curtains":60446,"curtains-closed":60445,"cyclone":60373,"dangerous":59802,"dark-mode":58652,"dashboard":59505,"dashboard-customize":59803,"data-array":60113,"data-exploration":59247,"data-object":60115,"data-saver-off":61426,"data-saver-on":61427,"data-thresholding":60319,"data-usage":57775,"dataset":63726,"dataset-linked":63727,"date-range":59670,"deblur":60279,"deck":59970,"dehaze":58311,"delete":59506,"delete-forever":59691,"delete-outline":59694,"delete-sweep":57708,"delivery-dining":60018,"density-large":60329,"density-medium":60318,"density-small":60328,"departure-board":58742,"description":59507,"deselect":60342,"design-services":61706,"desk":63732,"desktop-access-disabled":59805,"desktop-mac":58123,"desktop-windows":58124,"details":58312,"developer-board":58125,"developer-board-off":58623,"developer-mode":57776,"device-hub":58165,"device-thermostat":57855,"device-unknown":58169,"devices":57777,"devices-fold":60382,"devices-other":58167,"dew-point":63609,"dialer-sip":57531,"dialpad":57532,"diamond":60117,"difference":60285,"dining":61428,"dinner-dining":59991,"directions":58670,"directions-bike":58671,"directions-boat":58674,"directions-boat-filled":61429,"directions-bus":58672,"directions-bus-filled":61430,"directions-car":58673,"directions-car-filled":61431,"directions-ferry":58674,"directions-off":61711,"directions-railway":58676,"directions-railway-filled":61432,"directions-run":58726,"directions-subway":58675,"directions-subway-filled":61433,"directions-train":58676,"directions-transit":58677,"directions-transit-filled":61434,"directions-walk":58678,"dirty-lens":61259,"disabled-by-default":62000,"disabled-visible":59246,"disc-full":58896,"discord":60012,"discount":60361,"display-settings":60311,"diversity-1":63703,"diversity-2":63704,"diversity-3":63705,"dnd-forwardslash":58897,"dns":59509,"do-disturb":61580,"do-disturb-alt":61581,"do-disturb-off":61582,"do-disturb-on":61583,"do-not-disturb":58898,"do-not-disturb-alt":58897,"do-not-disturb-off":58947,"do-not-disturb-on":58948,"do-not-disturb-on-total-silence":61435,"do-not-step":61855,"do-not-touch":61872,"dock":58126,"document-scanner":58874,"domain":59374,"domain-add":60258,"domain-disabled":57583,"domain-verification":61260,"done":59510,"done-all":59511,"done-outline":59695,"donut-large":59671,"donut-small":59672,"door-back":61436,"door-front":61437,"door-sliding":61438,"doorbell":61439,"double-arrow":59984,"downhill-skiing":58633,"download":61584,"download-done":61585,"download-for-offline":61440,"downloading":61441,"drafts":57681,"drag-handle":57949,"drag-indicator":59717,"draw":59206,"drive-eta":58899,"drive-file-move":58997,"drive-file-move-outline":59809,"drive-file-move-rtl":59245,"drive-file-rename-outline":59810,"drive-folder-upload":59811,"dry":61875,"dry-cleaning":59992,"duo":59813,"dvr":57778,"dynamic-feed":59924,"dynamic-form":61887,"e-mobiledata":61442,"earbuds":61443,"earbuds-battery":61444,"east":61919,"eco":59957,"edgesensor-high":61445,"edgesensor-low":61446,"edit":58313,"edit-attributes":58744,"edit-calendar":59202,"edit-document":63628,"edit-location":58728,"edit-location-alt":57797,"edit-note":59205,"edit-notifications":58661,"edit-off":59728,"edit-road":61261,"edit-square":63629,"egg":60108,"egg-alt":60104,"eject":59643,"elderly":61978,"elderly-woman":60265,"electric-bike":60187,"electric-bolt":60444,"electric-car":60188,"electric-meter":60443,"electric-moped":60189,"electric-rickshaw":60190,"electric-scooter":60191,"electrical-services":61698,"elevator":61856,"email":57534,"emergency":57835,"emergency-recording":60404,"emergency-share":60406,"emoji-emotions":59938,"emoji-events":59939,"emoji-flags":59930,"emoji-food-beverage":59931,"emoji-nature":59932,"emoji-objects":59940,"emoji-people":59933,"emoji-symbols":59934,"emoji-transportation":59935,"energy-savings-leaf":60442,"engineering":59965,"enhance-photo-translate":59644,"enhanced-encryption":58943,"equalizer":57373,"error":57344,"error-outline":57345,"escalator":61857,"escalator-warning":61868,"euro":59925,"euro-symbol":59686,"ev-station":58733,"event":59512,"event-available":58900,"event-busy":58901,"event-note":58902,"event-repeat":60283,"event-seat":59651,"exit-to-app":59513,"expand":59727,"expand-circle-down":59341,"expand-less":58830,"expand-more":58831,"explicit":57374,"explore":59514,"explore-off":59816,"exposure":58314,"exposure-minus-1":58315,"exposure-minus-2":58316,"exposure-neg-1":58315,"exposure-neg-2":58316,"exposure-plus-1":58317,"exposure-plus-2":58318,"exposure-zero":58319,"extension":59515,"extension-off":58613,"face":59516,"face-2":63706,"face-3":63707,"face-4":63708,"face-5":63709,"face-6":63710,"face-retouching-natural":61262,"face-retouching-off":61447,"facebook":62004,"fact-check":61637,"factory":60348,"family-restroom":61858,"fast-forward":57375,"fast-rewind":57376,"fastfood":58746,"favorite":59517,"favorite-border":59518,"favorite-outline":59518,"fax":60120,"featured-play-list":57453,"featured-video":57454,"feed":61449,"feedback":59519,"female":58768,"fence":61942,"festival":60008,"fiber-dvr":57437,"fiber-manual-record":57441,"fiber-new":57438,"fiber-pin":57450,"fiber-smart-record":57442,"file-copy":57715,"file-download":58052,"file-download-done":59818,"file-download-off":58622,"file-open":60147,"file-present":59918,"file-upload":58054,"file-upload-off":63622,"filter":58323,"filter-1":58320,"filter-2":58321,"filter-3":58322,"filter-4":58324,"filter-5":58325,"filter-6":58326,"filter-7":58327,"filter-8":58328,"filter-9":58329,"filter-9-plus":58330,"filter-alt":61263,"filter-alt-off":60210,"filter-b-and-w":58331,"filter-center-focus":58332,"filter-drama":58333,"filter-frames":58334,"filter-hdr":58335,"filter-list":57682,"filter-list-alt":59726,"filter-list-off":60247,"filter-none":58336,"filter-tilt-shift":58338,"filter-vintage":58339,"find-in-page":59520,"find-replace":59521,"fingerprint":59661,"fire-extinguisher":61912,"fire-hydrant":61859,"fire-hydrant-alt":63729,"fire-truck":63730,"fireplace":59971,"first-page":58844,"fit-screen":59920,"fitbit":59435,"fitness-center":60227,"flag":57683,"flag-circle":60152,"flaky":61264,"flare":58340,"flash-auto":58341,"flash-off":58342,"flash-on":58343,"flashlight-off":61450,"flashlight-on":61451,"flatware":61452,"flight":58681,"flight-class":59339,"flight-land":59652,"flight-takeoff":59653,"flip":58344,"flip-camera-android":59959,"flip-camera-ios":59960,"flip-to-back":59522,"flip-to-front":59523,"flood":60390,"flourescent":61453,"fluorescent":60465,"flutter-dash":57355,"fmd-bad":61454,"fmd-good":61455,"foggy":59416,"folder":58055,"folder-copy":60349,"folder-delete":60212,"folder-off":60291,"folder-open":58056,"folder-shared":58057,"folder-special":58903,"folder-zip":60204,"follow-the-signs":61986,"font-download":57703,"font-download-off":58617,"food-bank":61938,"forest":60057,"fork-left":60320,"fork-right":60332,"forklift":63592,"format-align-center":57908,"format-align-justify":57909,"format-align-left":57910,"format-align-right":57911,"format-bold":57912,"format-clear":57913,"format-color-fill":57914,"format-color-reset":57915,"format-color-text":57916,"format-indent-decrease":57917,"format-indent-increase":57918,"format-italic":57919,"format-line-spacing":57920,"format-list-bulleted":57921,"format-list-bulleted-add":63561,"format-list-numbered":57922,"format-list-numbered-rtl":57959,"format-overline":60261,"format-paint":57923,"format-quote":57924,"format-shapes":57950,"format-size":57925,"format-strikethrough":57926,"format-textdirection-l-to-r":57927,"format-textdirection-r-to-l":57928,"format-underline":57929,"format-underlined":57929,"fort":60077,"forum":57535,"forward":57684,"forward-10":57430,"forward-30":57431,"forward-5":57432,"forward-to-inbox":61831,"foundation":61952,"free-breakfast":60228,"free-cancellation":59208,"front-hand":59241,"front-loader":63593,"fullscreen":58832,"fullscreen-exit":58833,"functions":57930,"g-mobiledata":61456,"g-translate":59687,"gamepad":58127,"games":57377,"garage":61457,"gas-meter":60441,"gavel":59662,"generating-tokens":59209,"gesture":57685,"get-app":59524,"gif":59656,"gif-box":59299,"girl":60264,"gite":58763,"goat":1114109,"golf-course":60229,"gpp-bad":61458,"gpp-good":61459,"gpp-maybe":61460,"gps-fixed":57779,"gps-not-fixed":57780,"gps-off":57781,"grade":59525,"gradient":58345,"grading":59983,"grain":58346,"graphic-eq":57784,"grass":61957,"grid-3x3":61461,"grid-4x4":61462,"grid-goldenratio":61463,"grid-off":58347,"grid-on":58348,"grid-view":59824,"group":59375,"group-add":59376,"group-off":59207,"group-remove":59309,"group-work":59526,"groups":62003,"groups-2":63711,"groups-3":63712,"h-mobiledata":61464,"h-plus-mobiledata":61465,"hail":59825,"handshake":60363,"handyman":61707,"hardware":59993,"hd":57426,"hdr-auto":61466,"hdr-auto-select":61467,"hdr-enhanced-select":61265,"hdr-off":58349,"hdr-off-select":61468,"hdr-on":58350,"hdr-on-select":61469,"hdr-plus":61470,"hdr-strong":58353,"hdr-weak":58354,"headphones":61471,"headphones-battery":61472,"headset":58128,"headset-mic":58129,"headset-off":58170,"healing":58355,"health-and-safety":57813,"hearing":57379,"hearing-disabled":61700,"heart-broken":60098,"heat-pump":60440,"height":59926,"help":59527,"help-center":61888,"help-outline":59645,"hevc":61473,"hexagon":60217,"hide-image":61474,"hide-source":61475,"high-quality":57380,"highlight":57951,"highlight-alt":61266,"highlight-off":59528,"highlight-remove":59528,"hiking":58634,"history":59529,"history-edu":59966,"history-toggle-off":61821,"hive":60070,"hls":60298,"hls-off":60300,"holiday-village":58762,"home":59530,"home-filled":59826,"home-max":61476,"home-mini":61477,"home-repair-service":61696,"home-work":59913,"horizontal-distribute":57364,"horizontal-rule":61704,"horizontal-split":59719,"hot-tub":60230,"hotel":58682,"hotel-class":59203,"hourglass-bottom":59996,"hourglass-disabled":61267,"hourglass-empty":59531,"hourglass-full":59532,"hourglass-top":59995,"house":59972,"house-siding":61954,"houseboat":58756,"how-to-reg":57716,"how-to-vote":57717,"html":60286,"http":59650,"https":59533,"hub":59892,"hvac":61710,"ice-skating":58635,"icecream":60009,"image":58356,"image-aspect-ratio":58357,"image-not-supported":61718,"image-search":58431,"imagesearch-roller":59828,"import-contacts":57568,"import-export":57539,"important-devices":59666,"inbox":57686,"incomplete-circle":59291,"indeterminate-check-box":59657,"info":59534,"info-outline":59535,"input":59536,"insert-chart":57931,"insert-chart-outlined":57962,"insert-comment":57932,"insert-drive-file":57933,"insert-emoticon":57934,"insert-invitation":57935,"insert-link":57936,"insert-page-break":60106,"insert-photo":57937,"insights":61586,"install-desktop":60273,"install-mobile":60274,"integration-instructions":61268,"interests":59336,"interpreter-mode":59451,"inventory":57721,"inventory-2":57761,"invert-colors":59537,"invert-colors-off":57540,"invert-colors-on":59537,"ios-share":59064,"iron":58755,"iso":58358,"javascript":60284,"join-full":60139,"join-inner":60148,"join-left":60146,"join-right":60138,"kayaking":58636,"kebab-dining":59458,"key":59196,"key-off":60292,"keyboard":58130,"keyboard-alt":61480,"keyboard-arrow-down":58131,"keyboard-arrow-left":58132,"keyboard-arrow-right":58133,"keyboard-arrow-up":58134,"keyboard-backspace":58135,"keyboard-capslock":58136,"keyboard-command":60128,"keyboard-command-key":60135,"keyboard-control":58835,"keyboard-control-key":60134,"keyboard-double-arrow-down":60112,"keyboard-double-arrow-left":60099,"keyboard-double-arrow-right":60105,"keyboard-double-arrow-up":60111,"keyboard-hide":58138,"keyboard-option":60127,"keyboard-option-key":60136,"keyboard-return":58139,"keyboard-tab":58140,"keyboard-voice":58141,"king-bed":59973,"kitchen":60231,"kitesurfing":58637,"label":59538,"label-important":59703,"label-important-outline":59720,"label-off":59830,"label-outline":59539,"lan":60207,"landscape":58359,"landslide":60375,"language":59540,"laptop":58142,"laptop-chromebook":58143,"laptop-mac":58144,"laptop-windows":58145,"last-page":58845,"launch":59541,"layers":58683,"layers-clear":58684,"leaderboard":61964,"leak-add":58360,"leak-remove":58361,"leave-bags-at-home":61979,"legend-toggle":61723,"lens":58362,"lens-blur":61481,"library-add":57390,"library-add-check":59831,"library-books":57391,"library-music":57392,"light":61482,"light-mode":58648,"lightbulb":57584,"lightbulb-circle":60414,"lightbulb-outline":59663,"line-axis":60058,"line-style":59673,"line-weight":59674,"linear-scale":57952,"link":57687,"link-off":57711,"linked-camera":58424,"liquor":60000,"list":59542,"list-alt":57582,"live-help":57542,"live-tv":58937,"living":61483,"local-activity":58687,"local-airport":58685,"local-atm":58686,"local-attraction":58687,"local-bar":58688,"local-cafe":58689,"local-car-wash":58690,"local-convenience-store":58691,"local-dining":58710,"local-drink":58692,"local-fire-department":61269,"local-florist":58693,"local-gas-station":58694,"local-grocery-store":58695,"local-hospital":58696,"local-hotel":58697,"local-laundry-service":58698,"local-library":58699,"local-mall":58700,"local-movies":58701,"local-offer":58702,"local-parking":58703,"local-pharmacy":58704,"local-phone":58705,"local-pizza":58706,"local-play":58707,"local-police":61270,"local-post-office":58708,"local-print-shop":58709,"local-printshop":58709,"local-restaurant":58710,"local-see":58711,"local-shipping":58712,"local-taxi":58713,"location-city":59377,"location-disabled":57782,"location-history":58714,"location-off":57543,"location-on":57544,"location-pin":61915,"location-searching":57783,"lock":59543,"lock-clock":61271,"lock-open":59544,"lock-outline":59545,"lock-person":63731,"lock-reset":60126,"login":60023,"logo-dev":60118,"logout":59834,"looks":58364,"looks-3":58363,"looks-4":58365,"looks-5":58366,"looks-6":58367,"looks-one":58368,"looks-two":58369,"loop":57384,"loupe":58370,"low-priority":57709,"loyalty":59546,"lte-mobiledata":61484,"lte-plus-mobiledata":61485,"luggage":62005,"lunch-dining":60001,"lyrics":60427,"macro-off":63698,"mail":57688,"mail-lock":60426,"mail-outline":57569,"male":58766,"man":58603,"man-2":63713,"man-3":63714,"man-4":63715,"manage-accounts":61486,"manage-history":60391,"manage-search":61487,"map":58715,"maps-home-work":61488,"maps-ugc":61272,"margin":59835,"mark-as-unread":59836,"mark-chat-read":61835,"mark-chat-unread":61833,"mark-email-read":61836,"mark-email-unread":61834,"mark-unread-chat-alt":60317,"markunread":57689,"markunread-mailbox":59547,"masks":61976,"maximize":59696,"media-bluetooth-off":61489,"media-bluetooth-on":61490,"mediation":61351,"medical-information":60397,"medical-services":61705,"medication":61491,"medication-liquid":60039,"meeting-room":60239,"memory":58146,"menu":58834,"menu-book":59929,"menu-open":59837,"merge":60312,"merge-type":57938,"message":57545,"messenger":57546,"messenger-outline":57547,"mic":57385,"mic-external-off":61273,"mic-external-on":61274,"mic-none":57386,"mic-off":57387,"microwave":61956,"military-tech":59967,"minimize":59697,"minor-crash":60401,"miscellaneous-services":61708,"missed-video-call":57459,"mms":58904,"mobile-friendly":57856,"mobile-off":57857,"mobile-screen-share":57575,"mobiledata-off":61492,"mode":61591,"mode-comment":57939,"mode-edit":57940,"mode-edit-outline":61493,"mode-fan-off":60439,"mode-night":61494,"mode-of-travel":59342,"mode-standby":61495,"model-training":61647,"monetization-on":57955,"money":58749,"money-off":57948,"money-off-csred":61496,"monitor":61275,"monitor-heart":60066,"monitor-weight":61497,"monochrome-photos":58371,"mood":59378,"mood-bad":59379,"moped":60200,"more":58905,"more-horiz":58835,"more-time":59997,"more-vert":58836,"mosque":60082,"motion-photos-auto":61498,"motion-photos-off":59840,"motion-photos-on":59841,"motion-photos-pause":61991,"motion-photos-paused":59842,"motorcycle":59675,"mouse":58147,"move-down":60257,"move-to-inbox":57704,"move-up":60260,"movie":57388,"movie-creation":58372,"movie-edit":63552,"movie-filter":58426,"moving":58625,"mp":59843,"multiline-chart":59103,"multiple-stop":61881,"multitrack-audio":57784,"museum":59958,"music-note":58373,"music-off":58432,"music-video":57443,"my-library-add":57390,"my-library-books":57391,"my-library-music":57392,"my-location":58716,"nat":61276,"nature":58374,"nature-people":58375,"navigate-before":58376,"navigate-next":58377,"navigation":58717,"near-me":58729,"near-me-disabled":61935,"nearby-error":61499,"nearby-off":61500,"nest-cam-wired-stand":60438,"network-cell":57785,"network-check":58944,"network-locked":58906,"network-ping":60362,"network-wifi":57786,"network-wifi-1-bar":60388,"network-wifi-2-bar":60374,"network-wifi-3-bar":60385,"new-label":58889,"new-releases":57393,"newspaper":60289,"next-plan":61277,"next-week":57706,"nfc":57787,"night-shelter":61937,"nightlife":60002,"nightlight":61501,"nightlight-round":61278,"nights-stay":59974,"no-accounts":61502,"no-adult-content":63742,"no-backpack":62007,"no-cell":61860,"no-crash":60400,"no-drinks":61861,"no-encryption":58945,"no-encryption-gmailerrorred":61503,"no-flash":61862,"no-food":61863,"no-luggage":62011,"no-meals":61910,"no-meals-ouline":61993,"no-meeting-room":60238,"no-photography":61864,"no-sim":57548,"no-stroller":61871,"no-transfer":61909,"noise-aware":60396,"noise-control-off":60403,"nordic-walking":58638,"north":61920,"north-east":61921,"north-west":61922,"not-accessible":61694,"not-interested":57395,"not-listed-location":58741,"not-started":61649,"note":57455,"note-add":59548,"note-alt":61504,"notes":57964,"notification-add":58265,"notification-important":57348,"notifications":59380,"notifications-active":59383,"notifications-none":59381,"notifications-off":59382,"notifications-on":59383,"notifications-paused":59384,"now-wallpaper":57788,"now-widgets":57789,"numbers":60103,"offline-bolt":59698,"offline-pin":59658,"offline-share":59845,"oil-barrel":60437,"on-device-training":60413,"ondemand-video":58938,"online-prediction":61675,"opacity":59676,"open-in-browser":59549,"open-in-full":61902,"open-in-new":59550,"open-in-new-off":58614,"open-with":59551,"other-houses":58764,"outbond":61992,"outbound":57802,"outbox":61279,"outdoor-grill":59975,"outgoing-mail":61650,"outlet":61908,"outlined-flag":57710,"output":60350,"padding":59848,"pages":59385,"pageview":59552,"paid":61505,"palette":58378,"pallet":63594,"pan-tool":59685,"pan-tool-alt":60345,"panorama":58379,"panorama-fish-eye":58380,"panorama-fisheye":58380,"panorama-horizontal":58381,"panorama-horizontal-select":61280,"panorama-photosphere":59849,"panorama-photosphere-select":59850,"panorama-vertical":58382,"panorama-vertical-select":61281,"panorama-wide-angle":58383,"panorama-wide-angle-select":61282,"paragliding":58639,"park":60003,"party-mode":59386,"password":61506,"pattern":61507,"pause":57396,"pause-circle":57762,"pause-circle-filled":57397,"pause-circle-outline":57398,"pause-presentation":57578,"payment":59553,"payments":61283,"paypal":60045,"pedal-bike":60201,"pending":61284,"pending-actions":61883,"pentagon":60240,"people":59387,"people-alt":59937,"people-outline":59388,"percent":60248,"perm-camera-mic":59554,"perm-contact-cal":59555,"perm-contact-calendar":59555,"perm-data-setting":59556,"perm-device-info":59557,"perm-device-information":59557,"perm-identity":59558,"perm-media":59559,"perm-phone-msg":59560,"perm-scan-wifi":59561,"person":59389,"person-2":63716,"person-3":63717,"person-4":63718,"person-add":59390,"person-add-alt":59981,"person-add-alt-1":61285,"person-add-disabled":59851,"person-off":58640,"person-outline":59391,"person-pin":58714,"person-pin-circle":58730,"person-remove":61286,"person-remove-alt-1":61287,"person-search":61702,"personal-injury":59098,"personal-video":58939,"pest-control":61690,"pest-control-rodent":61693,"pets":59677,"phishing":60119,"phone":57549,"phone-android":58148,"phone-bluetooth-speaker":58907,"phone-callback":58953,"phone-disabled":59852,"phone-enabled":59853,"phone-forwarded":58908,"phone-in-talk":58909,"phone-iphone":58149,"phone-locked":58910,"phone-missed":58911,"phone-paused":58912,"phonelink":58150,"phonelink-erase":57563,"phonelink-lock":57564,"phonelink-off":58151,"phonelink-ring":57565,"phonelink-setup":57566,"photo":58384,"photo-album":58385,"photo-camera":58386,"photo-camera-back":61288,"photo-camera-front":61289,"photo-filter":58427,"photo-library":58387,"photo-size-select-actual":58418,"photo-size-select-large":58419,"photo-size-select-small":58420,"php":60303,"piano":58657,"piano-off":58656,"picture-as-pdf":58389,"picture-in-picture":59562,"picture-in-picture-alt":59665,"pie-chart":59076,"pie-chart-outline":61508,"pie-chart-outlined":59077,"pin":61509,"pin-drop":58718,"pin-end":59239,"pin-invoke":59235,"pinch":60216,"pivot-table-chart":59854,"pix":60067,"place":58719,"plagiarism":59994,"play-arrow":57399,"play-circle":57796,"play-circle-fill":57400,"play-circle-filled":57400,"play-circle-outline":57401,"play-disabled":61290,"play-for-work":59654,"play-lesson":61511,"playlist-add":57403,"playlist-add-check":57445,"playlist-add-check-circle":59366,"playlist-add-circle":59365,"playlist-play":57439,"playlist-remove":60288,"plumbing":61703,"plus-one":59392,"podcasts":61512,"point-of-sale":61822,"policy":59927,"poll":59393,"polyline":60347,"polymer":59563,"pool":60232,"portable-wifi-off":57550,"portrait":58390,"post-add":59936,"power":58940,"power-input":58166,"power-off":58950,"power-settings-new":59564,"precision-manufacturing":61513,"pregnant-woman":59678,"present-to-all":57567,"preview":61893,"price-change":61514,"price-check":61515,"print":59565,"print-disabled":59855,"priority-high":58949,"privacy-tip":61660,"private-connectivity":59204,"production-quantity-limits":57809,"propane":60436,"propane-tank":60435,"psychology":59978,"psychology-alt":63722,"public":59403,"public-off":61898,"publish":57941,"published-with-changes":62002,"punch-clock":60072,"push-pin":61709,"qr-code":61291,"qr-code-2":57354,"qr-code-scanner":61958,"query-builder":59566,"query-stats":58620,"question-answer":59567,"question-mark":60299,"queue":57404,"queue-music":57405,"queue-play-next":57446,"quick-contacts-dialer":57551,"quick-contacts-mail":57552,"quickreply":61292,"quiz":61516,"quora":60056,"r-mobiledata":61517,"radar":61518,"radio":57406,"radio-button-checked":59447,"radio-button-off":59446,"radio-button-on":59447,"radio-button-unchecked":59446,"railway-alert":59857,"ramen-dining":60004,"ramp-left":60316,"ramp-right":60310,"rate-review":58720,"raw-off":61519,"raw-on":61520,"read-more":61293,"real-estate-agent":59194,"rebase-edit":63558,"receipt":59568,"receipt-long":61294,"recent-actors":57407,"recommend":59858,"record-voice-over":59679,"rectangle":60244,"recycling":59232,"reddit":60064,"redeem":59569,"redo":57690,"reduce-capacity":61980,"refresh":58837,"remember-me":61521,"remove":57691,"remove-circle":57692,"remove-circle-outline":57693,"remove-done":59859,"remove-from-queue":57447,"remove-moderator":59860,"remove-red-eye":58391,"remove-road":60412,"remove-shopping-cart":59688,"reorder":59646,"repartition":63720,"repeat":57408,"repeat-on":59862,"repeat-one":57409,"repeat-one-on":59863,"replay":57410,"replay-10":57433,"replay-30":57434,"replay-5":57435,"replay-circle-filled":59864,"reply":57694,"reply-all":57695,"report":57696,"report-gmailerrorred":61522,"report-off":57712,"report-problem":59570,"request-page":61996,"request-quote":61878,"reset-tv":59865,"restart-alt":61523,"restaurant":58732,"restaurant-menu":58721,"restore":59571,"restore-from-trash":59704,"restore-page":59689,"reviews":61524,"rice-bowl":61941,"ring-volume":57553,"rocket":60325,"rocket-launch":60315,"roller-shades":60434,"roller-shades-closed":60433,"roller-skating":60365,"roofing":61953,"room":59572,"room-preferences":61880,"room-service":60233,"rotate-90-degrees-ccw":58392,"rotate-90-degrees-cw":60075,"rotate-left":58393,"rotate-right":58394,"roundabout-left":60313,"roundabout-right":60323,"rounded-corner":59680,"route":60109,"router":58152,"rowing":59681,"rss-feed":57573,"rsvp":61525,"rtt":59821,"rule":61890,"rule-folder":61897,"run-circle":61295,"running-with-errors":58653,"rv-hookup":58946,"safety-check":60399,"safety-divider":57804,"sailing":58626,"sanitizer":61981,"satellite":58722,"satellite-alt":60218,"save":57697,"save-alt":57713,"save-as":60256,"saved-search":59921,"savings":58091,"scale":60255,"scanner":58153,"scatter-plot":57960,"schedule":59573,"schedule-send":59914,"schema":58621,"school":59404,"science":59979,"score":57961,"scoreboard":60368,"screen-lock-landscape":57790,"screen-lock-portrait":57791,"screen-lock-rotation":57792,"screen-rotation":57793,"screen-rotation-alt":60398,"screen-search-desktop":61296,"screen-share":57570,"screenshot":61526,"screenshot-monitor":60424,"scuba-diving":60366,"sd":59869,"sd-card":58915,"sd-card-alert":61527,"sd-storage":57794,"search":59574,"search-off":60022,"security":58154,"security-update":61528,"security-update-good":61529,"security-update-warning":61530,"segment":59723,"select-all":57698,"self-improvement":60024,"sell":61531,"send":57699,"send-and-archive":59916,"send-time-extension":60123,"send-to-mobile":61532,"sensor-door":61877,"sensor-occupied":60432,"sensor-window":61876,"sensors":58654,"sensors-off":58655,"sentiment-dissatisfied":59409,"sentiment-neutral":59410,"sentiment-satisfied":59411,"sentiment-satisfied-alt":57581,"sentiment-very-dissatisfied":59412,"sentiment-very-satisfied":59413,"set-meal":61930,"settings":59576,"settings-accessibility":61533,"settings-applications":59577,"settings-backup-restore":59578,"settings-bluetooth":59579,"settings-brightness":59581,"settings-cell":59580,"settings-display":59581,"settings-ethernet":59582,"settings-input-antenna":59583,"settings-input-component":59584,"settings-input-composite":59585,"settings-input-hdmi":59586,"settings-input-svideo":59587,"settings-overscan":59588,"settings-phone":59589,"settings-power":59590,"settings-remote":59591,"settings-suggest":61534,"settings-system-daydream":57795,"settings-voice":59592,"severe-cold":60371,"shape-line":63699,"share":59405,"share-arrival-time":58660,"share-location":61535,"shelves":63598,"shield":59872,"shield-moon":60073,"shop":59593,"shop-2":57758,"shop-two":59594,"shopify":60061,"shopping-bag":61900,"shopping-basket":59595,"shopping-cart":59596,"shopping-cart-checkout":60296,"short-text":57953,"shortcut":61536,"show-chart":59105,"shower":61537,"shuffle":57411,"shuffle-on":59873,"shutter-speed":58429,"sick":61984,"sign-language":60389,"signal-cellular-0-bar":61608,"signal-cellular-4-bar":57800,"signal-cellular-alt":57858,"signal-cellular-alt-1-bar":60383,"signal-cellular-alt-2-bar":60387,"signal-cellular-connected-no-internet-0-bar":61612,"signal-cellular-connected-no-internet-4-bar":57805,"signal-cellular-no-sim":57806,"signal-cellular-nodata":61538,"signal-cellular-null":57807,"signal-cellular-off":57808,"signal-wifi-0-bar":61616,"signal-wifi-4-bar":57816,"signal-wifi-4-bar-lock":57817,"signal-wifi-bad":61539,"signal-wifi-connected-no-internet-4":61540,"signal-wifi-off":57818,"signal-wifi-statusbar-4-bar":61541,"signal-wifi-statusbar-connected-no-internet-4":61542,"signal-wifi-statusbar-null":61543,"signpost":60305,"sim-card":58155,"sim-card-alert":58916,"sim-card-download":61544,"single-bed":59976,"sip":61545,"skateboarding":58641,"skip-next":57412,"skip-previous":57413,"sledding":58642,"slideshow":58395,"slow-motion-video":57448,"smart-button":61889,"smart-display":61546,"smart-screen":61547,"smart-toy":61548,"smartphone":58156,"smoke-free":60234,"smoking-rooms":60235,"sms":58917,"sms-failed":58918,"snapchat":60014,"snippet-folder":61895,"snooze":57414,"snowboarding":58643,"snowing":59407,"snowmobile":58627,"snowshoeing":58644,"soap":61874,"social-distance":57803,"solar-power":60431,"sort":57700,"sort-by-alpha":57427,"sos":60407,"soup-kitchen":59347,"source":61892,"south":61923,"south-america":59364,"south-east":61924,"south-west":61925,"spa":60236,"space-bar":57942,"space-dashboard":58987,"spatial-audio":60395,"spatial-audio-off":60392,"spatial-tracking":60394,"speaker":58157,"speaker-group":58158,"speaker-notes":59597,"speaker-notes-off":59690,"speaker-phone":57554,"speed":59876,"spellcheck":59598,"splitscreen":61549,"spoke":59815,"sports":59952,"sports-bar":61939,"sports-baseball":59985,"sports-basketball":59942,"sports-cricket":59943,"sports-esports":59944,"sports-football":59945,"sports-golf":59946,"sports-gymnastics":60356,"sports-handball":59955,"sports-hockey":59947,"sports-kabaddi":59956,"sports-martial-arts":60137,"sports-mma":59948,"sports-motorsports":59949,"sports-rugby":59950,"sports-score":61550,"sports-soccer":59951,"sports-tennis":59954,"sports-volleyball":59953,"square":60214,"square-foot":59977,"ssid-chart":60262,"stacked-bar-chart":59878,"stacked-line-chart":61995,"stadium":60304,"stairs":61865,"star":59448,"star-border":59450,"star-border-purple500":61593,"star-half":59449,"star-outline":61551,"star-purple500":61594,"star-rate":61676,"stars":59600,"start":57481,"stay-current-landscape":57555,"stay-current-portrait":57556,"stay-primary-landscape":57557,"stay-primary-portrait":57558,"sticky-note-2":61948,"stop":57415,"stop-circle":61297,"stop-screen-share":57571,"storage":57819,"store":59601,"store-mall-directory":58723,"storefront":59922,"storm":61552,"straight":60309,"straighten":58396,"stream":59881,"streetview":58734,"strikethrough-s":57943,"stroller":61870,"style":58397,"subdirectory-arrow-left":58841,"subdirectory-arrow-right":58842,"subject":59602,"subscript":61713,"subscriptions":57444,"subtitles":57416,"subtitles-off":61298,"subway":58735,"summarize":61553,"sunny":59418,"sunny-snowing":59417,"superscript":61714,"supervised-user-circle":59705,"supervisor-account":59603,"support":61299,"support-agent":61666,"surfing":58645,"surround-sound":57417,"swap-calls":57559,"swap-horiz":59604,"swap-horizontal-circle":59699,"swap-vert":59605,"swap-vert-circle":59606,"swap-vertical-circle":59606,"swipe":59884,"swipe-down":60243,"swipe-down-alt":60208,"swipe-left":60249,"swipe-left-alt":60211,"swipe-right":60242,"swipe-right-alt":60246,"swipe-up":60206,"swipe-up-alt":60213,"swipe-vertical":60241,"switch-access-shortcut":59361,"switch-access-shortcut-add":59362,"switch-account":59885,"switch-camera":58398,"switch-left":61905,"switch-right":61906,"switch-video":58399,"synagogue":60080,"sync":58919,"sync-alt":59928,"sync-disabled":58920,"sync-lock":60142,"sync-problem":58921,"system-security-update":61554,"system-security-update-good":61555,"system-security-update-warning":61556,"system-update":58922,"system-update-alt":59607,"system-update-tv":59607,"tab":59608,"tab-unselected":59609,"table-bar":60114,"table-chart":57957,"table-restaurant":60102,"table-rows":61697,"table-view":61886,"tablet":58159,"tablet-android":58160,"tablet-mac":58161,"tag":59887,"tag-faces":58400,"takeout-dining":60020,"tap-and-play":58923,"tapas":61929,"task":61557,"task-alt":58086,"taxi-alert":61300,"telegram":60011,"temple-buddhist":60083,"temple-hindu":60079,"terminal":60302,"terrain":58724,"text-decrease":60125,"text-fields":57954,"text-format":57701,"text-increase":60130,"text-rotate-up":59706,"text-rotate-vertical":59707,"text-rotation-angledown":59708,"text-rotation-angleup":59709,"text-rotation-down":59710,"text-rotation-none":59711,"text-snippet":61894,"textsms":57560,"texture":58401,"theater-comedy":60006,"theaters":59610,"thermostat":61558,"thermostat-auto":61559,"thumb-down":59611,"thumb-down-alt":59414,"thumb-down-off-alt":59890,"thumb-up":59612,"thumb-up-alt":59415,"thumb-up-off-alt":59891,"thumbs-up-down":59613,"thunderstorm":60379,"tiktok":60030,"time-to-leave":58924,"timelapse":58402,"timeline":59682,"timer":58405,"timer-10":58403,"timer-10-select":61562,"timer-3":58404,"timer-3-select":61563,"timer-off":58406,"tips-and-updates":59290,"tire-repair":60360,"title":57956,"toc":59614,"today":59615,"toggle-off":59893,"toggle-on":59894,"token":59941,"toll":59616,"tonality":58407,"topic":61896,"tornado":57753,"touch-app":59667,"tour":61301,"toys":58162,"track-changes":59617,"traffic":58725,"train":58736,"tram":58737,"transcribe":63724,"transfer-within-a-station":58738,"transform":58408,"transgender":58765,"transit-enterexit":58745,"translate":59618,"travel-explore":58075,"trending-down":59619,"trending-flat":59620,"trending-neutral":59620,"trending-up":59621,"trip-origin":58747,"trolley":63595,"troubleshoot":57810,"try":61564,"tsunami":60376,"tty":61866,"tune":58409,"tungsten":61565,"turn-left":60326,"turn-right":60331,"turn-sharp-left":60327,"turn-sharp-right":60330,"turn-slight-left":60324,"turn-slight-right":60314,"turned-in":59622,"turned-in-not":59623,"tv":58163,"tv-off":58951,"two-wheeler":59897,"type-specimen":63728,"u-turn-left":60321,"u-turn-right":60322,"umbrella":61869,"unarchive":57705,"undo":57702,"unfold-less":58838,"unfold-less-double":63695,"unfold-more":58839,"unfold-more-double":63696,"unpublished":62006,"unsubscribe":57579,"upcoming":61566,"update":59683,"update-disabled":57461,"upgrade":61691,"upload":61595,"upload-file":59900,"usb":57824,"usb-off":58618,"vaccines":57656,"vape-free":60358,"vaping-rooms":60367,"verified":61302,"verified-user":59624,"vertical-align-bottom":57944,"vertical-align-center":57945,"vertical-align-top":57946,"vertical-distribute":57462,"vertical-shades":60430,"vertical-shades-closed":60429,"vertical-split":59721,"vibration":58925,"video-call":57456,"video-camera-back":61567,"video-camera-front":61568,"video-chat":63648,"video-collection":57418,"video-file":60295,"video-label":57457,"video-library":57418,"video-settings":60021,"video-stable":61569,"videocam":57419,"videocam-off":57420,"videogame-asset":58168,"videogame-asset-off":58624,"view-agenda":59625,"view-array":59626,"view-carousel":59627,"view-column":59628,"view-comfortable":58410,"view-comfy":58410,"view-comfy-alt":60275,"view-compact":58411,"view-compact-alt":60276,"view-cozy":60277,"view-day":59629,"view-headline":59630,"view-in-ar":59902,"view-kanban":60287,"view-list":59631,"view-module":59632,"view-quilt":59633,"view-sidebar":61716,"view-stream":59634,"view-timeline":60293,"view-week":59635,"vignette":58421,"villa":58758,"visibility":59636,"visibility-off":59637,"voice-chat":58926,"voice-over-off":59722,"voicemail":57561,"volcano":60378,"volume-down":57421,"volume-down-alt":59292,"volume-mute":57422,"volume-off":57423,"volume-up":57424,"volunteer-activism":60016,"vpn-key":57562,"vpn-key-off":60282,"vpn-lock":58927,"vrpano":61570,"wallet":63743,"wallet-giftcard":59638,"wallet-membership":59639,"wallet-travel":59640,"wallpaper":57788,"warehouse":60344,"warning":57346,"warning-amber":61571,"wash":61873,"watch":58164,"watch-later":59684,"watch-off":60131,"water":61572,"water-damage":61955,"water-drop":59288,"waterfall-chart":59904,"waves":57718,"waving-hand":59238,"wb-auto":58412,"wb-cloudy":58413,"wb-incandescent":58414,"wb-iridescent":58422,"wb-shade":59905,"wb-sunny":58416,"wb-twighlight":59906,"wb-twilight":57798,"wc":58941,"web":57425,"web-asset":57449,"web-asset-off":58615,"web-stories":58773,"webhook":60306,"wechat":60033,"weekend":57707,"west":61926,"whatshot":59406,"wheelchair-pickup":61867,"where-to-vote":57719,"widgets":57789,"width-full":63733,"width-normal":63734,"width-wide":63735,"wifi":58942,"wifi-1-bar":58570,"wifi-2-bar":58585,"wifi-calling":61303,"wifi-calling-3":61573,"wifi-channel":60266,"wifi-find":60209,"wifi-lock":57825,"wifi-off":58952,"wifi-password":60267,"wifi-protected-setup":61692,"wifi-tethering":57826,"wifi-tethering-error":60121,"wifi-tethering-error-rounded":61574,"wifi-tethering-off":61575,"wind-power":60428,"window":61576,"wine-bar":61928,"woman":57662,"woman-2":63719,"woo-commerce":60013,"wordpress":60063,"work":59641,"work-history":60425,"work-off":59714,"work-outline":59715,"workspace-premium":59311,"workspaces":57760,"workspaces-filled":59917,"workspaces-outline":59919,"wrap-text":57947,"wrong-location":61304,"wysiwyg":61891,"yard":61577,"youtube-searched-for":59642,"zoom-in":59647,"zoom-in-map":60205,"zoom-out":59648,"zoom-out-map":58731}'),o=(0,r.default)(i,"material",a)},92330:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(45492);const a=n.p+"static/media/SimpleLineIcons.3ec13a24af3fdda11107.ttf",i=JSON.parse('{"user":57349,"people":57345,"user-female":57344,"user-follow":57346,"user-following":57347,"user-unfollow":57348,"login":57446,"logout":57445,"emotsmile":57377,"phone":58880,"call-end":57416,"call-in":57415,"call-out":57414,"map":57395,"location-pin":57494,"direction":57410,"directions":57409,"compass":57413,"layers":57396,"menu":58881,"list":57447,"options-vertical":58882,"options":58883,"arrow-down":58884,"arrow-left":58885,"arrow-right":58886,"arrow-up":58887,"arrow-up-circle":57464,"arrow-left-circle":57466,"arrow-right-circle":57465,"arrow-down-circle":57467,"check":57472,"clock":57473,"plus":57493,"minus":58901,"close":57474,"event":58905,"exclamation":58903,"organization":58902,"trophy":57350,"screen-smartphone":57360,"screen-desktop":57361,"plane":57362,"notebook":57363,"mustache":57364,"mouse":57365,"magnet":57366,"energy":57376,"disc":57378,"cursor":57454,"cursor-move":57379,"crop":57380,"chemistry":57382,"speedometer":57351,"shield":57358,"screen-tablet":57359,"magic-wand":57367,"hourglass":57368,"graduation":57369,"ghost":57370,"game-controller":57371,"fire":57372,"eyeglass":57373,"envelope-open":57374,"envelope-letter":57375,"bell":57383,"badge":57384,"anchor":57385,"wallet":57386,"vector":57387,"speech":57388,"puzzle":57389,"printer":57390,"present":57391,"playlist":57392,"pin":57393,"picture":57394,"handbag":57397,"globe-alt":57398,"globe":57399,"folder-alt":57401,"folder":57481,"film":57402,"feed":57403,"drop":57406,"drawer":57407,"docs":57408,"doc":57477,"diamond":57411,"cup":57412,"calculator":57417,"bubbles":57418,"briefcase":57419,"book-open":57420,"basket-loaded":57421,"basket":57422,"bag":57423,"action-undo":57424,"action-redo":57425,"wrench":57426,"umbrella":57427,"trash":57428,"tag":57429,"support":57430,"frame":57400,"size-fullscreen":57431,"size-actual":57432,"shuffle":57433,"share-alt":57434,"share":57435,"rocket":57436,"question":57437,"pie-chart":57438,"pencil":57439,"note":57440,"loop":57444,"home":57449,"grid":57450,"graph":57451,"microphone":57443,"music-tone-alt":57441,"music-tone":57442,"earphones-alt":57404,"earphones":57405,"equalizer":57452,"like":57448,"dislike":57453,"control-start":57455,"control-rewind":57456,"control-play":57457,"control-pause":57458,"control-forward":57459,"control-end":57460,"volume-1":57503,"volume-2":57504,"volume-off":57505,"calendar":57461,"bulb":57462,"chart":57463,"ban":57468,"bubble":57469,"camrecorder":57470,"camera":57471,"cloud-download":57475,"cloud-upload":57476,"envelope":57478,"eye":57479,"flag":57480,"heart":57482,"info":57483,"key":57484,"link":57485,"lock":57486,"lock-open":57487,"magnifier":57488,"magnifier-add":57489,"magnifier-remove":57490,"paper-clip":57491,"paper-plane":57492,"power":57495,"refresh":57496,"reload":57497,"settings":57498,"star":57499,"symbol-female":57500,"symbol-male":57501,"target":57502,"credit-card":57381,"paypal":58888,"social-tumblr":57354,"social-twitter":57353,"social-facebook":57355,"social-instagram":58889,"social-linkedin":58890,"social-pinterest":58891,"social-github":58892,"social-google":58893,"social-reddit":58894,"social-skype":58895,"social-dribbble":57357,"social-behance":58896,"social-foursqare":58897,"social-soundcloud":58898,"social-spotify":58899,"social-stumbleupon":58900,"social-youtube":57352,"social-dropbox":57356,"social-vkontakte":58904,"social-steam":58912}'),o=(0,r.default)(i,"simple-line-icons",a)},45492:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DEFAULT_ICON_COLOR:()=>Z,DEFAULT_ICON_SIZE:()=>J,default:()=>ee});var r,a=n(91808),i=(n(28945),n(40495)),o=n(57719),s=n.n(o);function l(){if(!i.default.isDOMAvailable)return null;const e=p();return e.sheet?e.sheet:null}function u(){const e=l();if(e){const t=[...e.cssRules],n=[];for(let e=0;en.style.fontFamily===e&&(!t||!t.display||t.display===n.style.fontDisplay)))}!function(e){e.AUTO="auto",e.SWAP="swap",e.BLOCK="block",e.FALLBACK="fallback",e.OPTIONAL="optional"}(r||(r={}));const d=new Set;const h={async unloadAllAsync(){if(!i.default.isDOMAvailable)return;const e=document.getElementById(f);e&&e instanceof HTMLStyleElement&&document.removeChild(e)},async unloadAsync(e,t){const n=l();if(!n)return;const r=c(e,t);for(const a of r)n.deleteRule(a.index)},getServerResources:()=>function(){const e=[...d.entries()];if(!e.length)return[];const t=e.map((([{css:e}])=>e)).join("\n"),n=e.map((([{resourceId:e}])=>e));return[{$$type:"style",children:t,id:f,type:"text/css"},...n.map((e=>({$$type:"link",rel:"preload",href:e,as:"font",crossorigin:""})))]}().map((e=>{switch(e.$$type){case"style":return``;case"link":return``;default:return""}})).filter(Boolean),resetServerContext(){d.clear()},getLoadedFonts(){return u().map((({rule:e})=>e.style.fontFamily))},isLoaded:(e,t={})=>c(e,t)?.length>0,loadAsync(e,t){if(!(document.head&&"function"===typeof document.head.appendChild))throw new a.CodedError("ERR_WEB_ENVIRONMENT","The browser's `document.head` element doesn't support injecting fonts.");const n=p();document.head.appendChild(n);return c(e,t).length||function(e,t){const n=function(e,t){return`@font-face{font-family:${e};src:url(${t.uri});font-display:${t.display||r.AUTO}}`}(e,t),a=p();if(a.styleSheet){const e=a;e.styleSheet.cssText=e.styleSheet.cssText?e.styleSheet.cssText+n:n}else{const e=document.createTextNode(n);a.appendChild(e)}}(e,t),function(){const{userAgent:e}=window.navigator,t=!!e.match(/iPad|iPhone/i),n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=e.includes("Edge"),a=e.includes("Trident"),i=e.includes("Firefox");return!n&&!t&&!r&&!a&&!i}()?new(s())(e,{display:t.display}).load(null,6e3):Promise.resolve()}},f="expo-generated-fonts";function p(){const e=document.getElementById(f);if(e&&e instanceof HTMLStyleElement)return e;const t=document.createElement("style");return t.id=f,t.type="text/css",t}var m=n(52386);function g(e){return"string"===typeof e?e||null:"number"===typeof e?g(m.Asset.fromModule(e)):"object"===typeof e&&"number"===typeof e.uri?g(e.uri):"object"===typeof e&&(e.uri||e.localUri||e.default)||null}function y(e){const t=g(e),n="object"===typeof(a=e)&&"display"in a&&a.display||r.AUTO;var a;return t&&"string"===typeof t||_(t),{uri:t,display:n}}function _(e){let t=typeof e;throw"object"===t&&(t=JSON.stringify(e,null,2)),new a.CodedError("ERR_FONT_SOURCE",`Expected font asset of type \`string | FontResource | Asset\` instead got: ${t}`)}function b(e,t){("object"!==typeof t||"string"!==typeof t.uri||t.downloadAsync)&&_(t);try{return h.loadAsync(e,t)}catch{}return Promise.resolve()}const v={};let w={};function F(e){return e in w}function k(e){return F(e)||!!h.isLoaded(e)}function x(e,t){if("object"===typeof e){if(t)return Promise.reject(new a.CodedError("ERR_FONT_API",`No fontFamily can be used for the provided source: ${t}. The second argument of \`loadAsync()\` can only be used with a \`string\` value as the first argument.`));const n=e,r=Object.keys(n);return Promise.all(r.map((e=>A(e,n[e])))).then((()=>{}))}return A(e,t)}async function A(e,t){if(!t)throw new a.CodedError("ERR_FONT_SOURCE",`Cannot load null or undefined font source: { "${e}": ${t} }. Expected asset of type \`FontSource\` for fontFamily of name: "${e}"`);if(k(e))return;if(v.hasOwnProperty(e))return v[e];const n=y(t);v[e]=(async()=>{try{await b(e,n),function(e){w[e]=!0}(e)}finally{delete v[e]}})(),await v[e]}var S=n(36665),E=n(6283),C=n(98587),T=n(98943),D=n(69e3),I=n(45548);const O=I.default.RNVectorIconsManager||I.default.RNVectorIconsModule;function P(){if(!O)throw new Error("The native RNVectorIcons API is not available, did you properly integrate the module? Please verify your autolinking setup and recompile.")}const M="value",R="error";var L=n(94075),N=n.n(L),B=n(75675),j=n(96673),V=n(73929),z=n(54443),H=n(60397);const U=["style","iconStyle","children"],W=B.default.create({container:{flexDirection:"row",justifyContent:"flex-start",alignItems:"center",padding:8},touchable:{overflow:"hidden"},icon:{marginRight:10},text:{fontWeight:"600",backgroundColor:"transparent"}}),q="#007AFF",$=["ellipsizeMode","numberOfLines","textBreakStrategy","selectable","suppressHighlighting","allowFontScaling","adjustsFontSizeToFit","minimumFontScale"],Y=["accessible","accessibilityLabel","accessibilityHint","accessibilityComponentType","accessibilityRole","accessibilityStates","accessibilityTraits","onFocus","onBlur","disabled","onPress","onPressIn","onPressOut","onLayout","onLongPress","nativeID","testID","delayPressIn","delayPressOut","delayLongPress","activeOpacity","underlayColor","selectionColor","onShowUnderlay","onHideUnderlay","hasTVPreferredFocus","tvParallaxProperties"];function G(e){return class extends S.PureComponent{static propTypes={backgroundColor:N().oneOfType([N().string,N().number]),borderRadius:N().number,color:N().any,size:N().number,iconStyle:N().any,style:N().any,children:N().node};static defaultProps={backgroundColor:q,borderRadius:5,color:"white",size:20};render(){const t=this.props,{style:n,iconStyle:r,children:a}=t,i=(0,C.default)(t,U),o=(0,z.pick)(i,$,"style","name","size","color"),s=(0,z.pick)(i,Y),l=(0,z.omit)(i,Object.keys(o),Object.keys(s),"iconStyle","borderRadius","backgroundColor");o.style=r?[W.icon,r]:W.icon;const u=(0,z.pick)(this.props,"color"),c=(0,z.pick)(this.props,"backgroundColor","borderRadius");return(0,H.jsx)(j.default,Object.assign({style:[W.touchable,c]},s,{children:(0,H.jsxs)(V.default,Object.assign({style:[W.container,c,n]},l,{children:[(0,H.jsx)(e,Object.assign({},o)),"string"===typeof a?(0,H.jsx)(E.default,{style:[W.text,u],selectable:!1,children:a}):a]}))}))}}}const X=["name","size","color","style","children"],K=I.default.RNVectorIconsManager||I.default.RNVectorIconsModule,J=12,Z="black";function Q(e,t,n,r){const a=n?n.replace(/\.(otf|ttf)$/,""):t;class i extends S.PureComponent{root=null;static defaultProps={size:J,allowFontScaling:!1};render(){const t=this.props,{name:n,size:i,color:o,style:s,children:l}=t,u=(0,C.default)(t,X);let c=n?e[n]||"?":"";"number"===typeof c&&(c=String.fromCodePoint(c));const d={fontSize:i,color:o},h={fontFamily:a,fontWeight:"normal",fontStyle:"normal"};return u.style=[d,s,h,r||{}],(0,H.jsxs)(E.default,Object.assign({selectable:!1},u,{children:[c,l]}))}}const o=function(){const e=new Map;return{setValue:(t,n)=>e.set(t,{type:M,data:n}),setError:(t,n)=>e.set(t,{type:R,data:n}),has:t=>e.has(t),get:t=>{if(!e.has(t))return;const{type:n,data:r}=e.get(t);if(n===R)throw r;return r}}}();function s(t){const n=e[t]||"?";return"number"===typeof n?String.fromCodePoint(n):n}return i.Button=G(i),i.getImageSource=async function(e,t=J,n=Z){P();const r=s(e),i=(0,D.default)(n),l=`${r}:${t}:${i}`;if(o.has(l))return o.get(l);try{const e={uri:await K.getImageForFont(a,r,t,i),scale:T.default.get()};return o.setValue(l,e),e}catch(u){throw o.setError(l,u),u}},i.getImageSourceSync=function(e,t=J,n=Z){P();const r=s(e),i=(0,D.default)(n),l=`${r}:${t}:${i}`;if(o.has(l))return o.get(l);try{const e={uri:K.getImageForFontSync(a,r,t,i),scale:T.default.get()};return o.setValue(l,e),e}catch(u){throw o.setError(l,u),u}},i.loadFont=async function(e=n){0},i.hasIcon=function(t){return Object.prototype.hasOwnProperty.call(e,t)},i.getRawGlyphMap=function(){return e},i.getFontFamily=function(){return a},i}function ee(e,t,n,r){const a={[t]:n},i=Q(e,t,null,r);return class n extends S.Component{static defaultProps=i.defaultProps;static Button=G(n);static glyphMap=e;static getRawGlyphMap=()=>e;static getFontFamily=()=>t;static loadFont=()=>x(a);static font=a;_mounted=!1;state={fontIsLoaded:k(t)};async componentDidMount(){this._mounted=!0,this.state.fontIsLoaded||(await x(a),this._mounted&&this.setState({fontIsLoaded:!0}))}componentWillUnmount(){this._mounted=!1}setNativeProps(e){this._icon&&this._icon.setNativeProps(e)}render(){return this.state.fontIsLoaded?(0,H.jsx)(i,Object.assign({ref:e=>{this._icon=e}},this.props)):(0,H.jsx)(E.default,{})}}}},59815:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(36665),a=n(45492);function i(e,t={}){const n=Object.keys(e);if(0===n.length)throw new Error("You need to add at least one style");const i=Object.assign({defaultStyle:n[0],fallbackFamily:e=>n[0],glyphValidator:(e,t)=>!0},t),o=n.reduce(((t,n)=>{const r=e[n];return t[n]=(0,a.default)(r.glyphMap||{},r.fontFamily||"",r.fontFile||"",r.fontStyle||{}),t}),{});function s(e){return Object.keys(e).reduce(((t,r)=>-1!==n.indexOf(r)&&!0===e[r]?r:t),i.defaultStyle)}function l(e){const{name:t}=e,r=s(e);if(i.glyphValidator(t,r))return o[r];const a=i.fallbackFamily(t);return-1===n.indexOf(a)?i.defaultStyle:o[a]}function u(e,t=""){return-1===n.indexOf(e)?o[i.defaultStyle]:t?l({name:t,[e]:!0}):o[s({[e]:!0})]}function c(e=i.defaultStyle){return u(e).getFontFamily()}function d(e=i.defaultStyle){return u(e).getRawGlyphMap()}function h(e,t=i.defaultStyle){return i.glyphValidator(e,t)}function f(t=""){class a extends r.PureComponent{static defaultProps=n.reduce(((e,t)=>(e[t]=!1,e)),{});static font=Object.values(e).reduce(((e,t)=>(e[t.fontFamily]=t.fontFile,e)),{});static StyledIconSet=u;static getFontFamily=c;static getRawGlyphMap=d;static hasIcon=h;render(){const e=l(this.props),a=(i=e,(o=t).length>0?i[o]:i);var i,o;const s=function(e){return Object.keys(e).reduce(((t,r)=>(-1===n.indexOf(r)&&(t[r]=e[r]),t)),{})}(this.props);return r.createElement(a,s)}}return a}const p=f();return p.Button=f("Button"),p}},54443:e=>{e.exports={pick:(e,...t)=>t.flat().filter((t=>Object.prototype.hasOwnProperty.call(e,t))).reduce(((t,n)=>(t[n]=e[n],t)),{}),omit:(e,...t)=>{const n=new Set(t.flat());return Object.getOwnPropertyNames(e).filter((e=>!n.has(e))).reduce(((t,n)=>(t[n]=e[n],t)),{})}}},22860:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ANIMATION_CONFIGS:()=>B,ANIMATION_DURATION:()=>N,ANIMATION_EASING:()=>L,ANIMATION_METHOD:()=>M,ANIMATION_SOURCE:()=>P,ANIMATION_STATE:()=>O,BottomSheetBackdrop:()=>Lr,BottomSheetDraggableView:()=>Pt,BottomSheetFlatList:()=>nr,BottomSheetFooter:()=>Vr,BottomSheetFooterContainer:()=>Ct,BottomSheetHandle:()=>yt,BottomSheetModal:()=>Nn,BottomSheetModalProvider:()=>Bn,BottomSheetScrollView:()=>sr,BottomSheetSectionList:()=>Jn,BottomSheetTextInput:()=>Fr,BottomSheetView:()=>yr,BottomSheetVirtualizedList:()=>hr,GESTURE_SOURCE:()=>C,KEYBOARD_BEHAVIOR:()=>z,KEYBOARD_BLUR_BEHAVIOR:()=>H,KEYBOARD_DISMISS_THRESHOLD:()=>W,KEYBOARD_INPUT_MODE:()=>U,KEYBOARD_STATE:()=>R,MODAL_STACK_BEHAVIOR:()=>V,SCREEN_HEIGHT:()=>S,SCREEN_WIDTH:()=>E,SCROLLABLE_DECELERATION_RATE_MAPPER:()=>j,SCROLLABLE_STATE:()=>D,SCROLLABLE_TYPE:()=>I,SHEET_STATE:()=>T,TouchableHighlight:()=>Hr,TouchableOpacity:()=>Ur,TouchableWithoutFeedback:()=>Wr,WINDOW_HEIGHT:()=>x,WINDOW_WIDTH:()=>A,createBottomSheetScrollableComponent:()=>$n,default:()=>fn,enableLogging:()=>re,useBottomSheet:()=>d,useBottomSheetDynamicSnapPoints:()=>rt,useBottomSheetGestureHandlers:()=>at,useBottomSheetInternal:()=>p,useBottomSheetModal:()=>v,useBottomSheetModalInternal:()=>w,useBottomSheetSpringConfigs:()=>jn,useBottomSheetTimingConfigs:()=>Vn,useGestureEventsHandlersDefault:()=>Ce,useScrollEventsHandlersDefault:()=>K,useScrollHandler:()=>ce,useScrollableSetter:()=>q});var r=n(36665),a=n(95991),i=n(60430),o=n.n(i),s=n(94763),l=n(959);const u=(0,r.createContext)(null),c=u.Provider,d=()=>{const e=(0,r.useContext)(u);if(null===e)throw"'useBottomSheet' cannot be used out of the BottomSheet!";return e},h=(0,r.createContext)(null),f=h.Provider;function p(e){const t=(0,r.useContext)(h);if(!0!==e&&null===t)throw"'useBottomSheetInternal' cannot be used out of the BottomSheet!";return t}const m=(0,r.createContext)(null),g=(0,r.createContext)(null),y=g.Provider,_=(0,r.createContext)(null),b=_.Provider,v=()=>{const e=(0,r.useContext)(g);if(null===e)throw"'BottomSheetModalContext' cannot be null!";return e};function w(e){const t=(0,r.useContext)(_);if(!0!==e&&null===t)throw"'BottomSheetModalInternalContext' cannot be null!";return t}var F=n(97901),k=n(26725);const{height:x,width:A}=k.default.get("window"),{height:S,width:E}=k.default.get("screen");var C,T,D,I,O,P,M,R;!function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.SCROLLABLE=1]="SCROLLABLE",e[e.HANDLE=2]="HANDLE",e[e.CONTENT=3]="CONTENT"}(C||(C={})),function(e){e[e.CLOSED=0]="CLOSED",e[e.OPENED=1]="OPENED",e[e.EXTENDED=2]="EXTENDED",e[e.OVER_EXTENDED=3]="OVER_EXTENDED",e[e.FILL_PARENT=4]="FILL_PARENT"}(T||(T={})),function(e){e[e.LOCKED=0]="LOCKED",e[e.UNLOCKED=1]="UNLOCKED",e[e.UNDETERMINED=2]="UNDETERMINED"}(D||(D={})),function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.VIEW=1]="VIEW",e[e.FLATLIST=2]="FLATLIST",e[e.SCROLLVIEW=3]="SCROLLVIEW",e[e.SECTIONLIST=4]="SECTIONLIST",e[e.VIRTUALIZEDLIST=5]="VIRTUALIZEDLIST"}(I||(I={})),function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.RUNNING=1]="RUNNING",e[e.STOPPED=2]="STOPPED",e[e.INTERRUPTED=3]="INTERRUPTED"}(O||(O={})),function(e){e[e.NONE=0]="NONE",e[e.MOUNT=1]="MOUNT",e[e.GESTURE=2]="GESTURE",e[e.USER=3]="USER",e[e.CONTAINER_RESIZE=4]="CONTAINER_RESIZE",e[e.SNAP_POINT_CHANGE=5]="SNAP_POINT_CHANGE",e[e.KEYBOARD=6]="KEYBOARD"}(P||(P={})),function(e){e[e.TIMING=0]="TIMING",e[e.SPRING=1]="SPRING"}(M||(M={})),function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.SHOWN=1]="SHOWN",e[e.HIDDEN=2]="HIDDEN"}(R||(R={}));const L=s.Easing.out(s.Easing.exp),N=250,B=(Object.assign({damping:500,stiffness:1e3,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10},s.ReduceMotion?{reduceMotion:s.ReduceMotion.Never}:{}),Object.assign({duration:N,easing:L},s.ReduceMotion?{reduceMotion:s.ReduceMotion.Never}:{})),j={[D.UNDETERMINED]:0,[D.LOCKED]:0,[D.UNLOCKED]:1},V={replace:"replace",push:"push"},z={interactive:"interactive",extend:"extend",fillParent:"fillParent"},H={none:"none",restore:"restore"},U={adjustPan:"adjustPan",adjustResize:"adjustResize"},W=12.5,q=(e,t,n,a,i=r.useEffect)=>{const{animatedScrollableType:o,animatedScrollableContentOffsetY:s,isContentHeightFixed:l,isScrollableRefreshable:u,setScrollableRef:c,removeScrollableRef:d}=p(),h=(0,r.useCallback)((()=>{s.value=n.value,o.value=t,u.value=a,l.value=!1;const r=(0,F.default)(e.current);return r?c({id:r,node:e}):console.warn("Couldn't find the scrollable node handle id!"),()=>{d(e)}}),[e,t,a,o,s,n,u,l,c,d]);i(h)},$={code:"function gorhom_useScrollEventsHandlersDefaultJs1(_,context){const{animatedSheetState,SHEET_STATE,animatedScrollableState,SCROLLABLE_STATE,scrollTo,scrollableRef,scrollableContentOffsetY}=this.__closure;if(animatedSheetState.value===SHEET_STATE.EXTENDED||animatedSheetState.value===SHEET_STATE.FILL_PARENT){context.shouldLockInitialPosition=false;}if(animatedScrollableState.value===SCROLLABLE_STATE.LOCKED){var _context$initialConte;const lockPosition=context.shouldLockInitialPosition?(_context$initialConte=context.initialContentOffsetY)!==null&&_context$initialConte!==void 0?_context$initialConte:0:0;scrollTo(scrollableRef,0,lockPosition,false);scrollableContentOffsetY.value=lockPosition;return;}}"},Y={code:"function gorhom_useScrollEventsHandlersDefaultJs2({contentOffset:{y:y}},context){const{scrollableContentOffsetY,rootScrollableContentOffsetY,animatedSheetState,SHEET_STATE}=this.__closure;scrollableContentOffsetY.value=y;rootScrollableContentOffsetY.value=y;context.initialContentOffsetY=y;if(animatedSheetState.value!==SHEET_STATE.EXTENDED&&animatedSheetState.value!==SHEET_STATE.FILL_PARENT&&y>0){context.shouldLockInitialPosition=true;}else{context.shouldLockInitialPosition=false;}}"},G={code:"function gorhom_useScrollEventsHandlersDefaultJs3({contentOffset:{y:y}},context){const{animatedScrollableState,SCROLLABLE_STATE,scrollTo,scrollableRef,scrollableContentOffsetY,animatedAnimationState,ANIMATION_STATE,rootScrollableContentOffsetY}=this.__closure;if(animatedScrollableState.value===SCROLLABLE_STATE.LOCKED){var _context$initialConte2;const lockPosition=context.shouldLockInitialPosition?(_context$initialConte2=context.initialContentOffsetY)!==null&&_context$initialConte2!==void 0?_context$initialConte2:0:0;scrollTo(scrollableRef,0,lockPosition,false);scrollableContentOffsetY.value=lockPosition;return;}if(animatedAnimationState.value!==ANIMATION_STATE.RUNNING){scrollableContentOffsetY.value=y;rootScrollableContentOffsetY.value=y;}}"},X={code:"function gorhom_useScrollEventsHandlersDefaultJs4({contentOffset:{y:y}},context){const{animatedScrollableState,SCROLLABLE_STATE,scrollTo,scrollableRef,scrollableContentOffsetY,animatedAnimationState,ANIMATION_STATE,rootScrollableContentOffsetY}=this.__closure;if(animatedScrollableState.value===SCROLLABLE_STATE.LOCKED){var _context$initialConte3;const lockPosition=context.shouldLockInitialPosition?(_context$initialConte3=context.initialContentOffsetY)!==null&&_context$initialConte3!==void 0?_context$initialConte3:0:0;scrollTo(scrollableRef,0,lockPosition,false);scrollableContentOffsetY.value=0;return;}if(animatedAnimationState.value!==ANIMATION_STATE.RUNNING){scrollableContentOffsetY.value=y;rootScrollableContentOffsetY.value=y;}}"},K=(e,t)=>{const{animatedSheetState:n,animatedScrollableState:r,animatedAnimationState:a,animatedScrollableContentOffsetY:i}=p();return{handleOnScroll:(0,s.useWorkletCallback)(function(){const a=function(a,i){if(n.value!==T.EXTENDED&&n.value!==T.FILL_PARENT||(i.shouldLockInitialPosition=!1),r.value===D.LOCKED){var o;const n=i.shouldLockInitialPosition&&null!==(o=i.initialContentOffsetY)&&void 0!==o?o:0;return(0,s.scrollTo)(e,0,n,!1),void(t.value=n)}};return a.__closure={animatedSheetState:n,SHEET_STATE:T,animatedScrollableState:r,SCROLLABLE_STATE:D,scrollTo:s.scrollTo,scrollableRef:e,scrollableContentOffsetY:t},a.__workletHash=0xd57f2e2905f,a.__initData=$,a}(),[e,t,r,n]),handleOnBeginDrag:(0,s.useWorkletCallback)(function(){const e=function({contentOffset:{y:e}},r){t.value=e,i.value=e,r.initialContentOffsetY=e,n.value!==T.EXTENDED&&n.value!==T.FILL_PARENT&&e>0?r.shouldLockInitialPosition=!0:r.shouldLockInitialPosition=!1};return e.__closure={scrollableContentOffsetY:t,rootScrollableContentOffsetY:i,animatedSheetState:n,SHEET_STATE:T},e.__workletHash=8381272241563,e.__initData=Y,e}(),[t,n,i]),handleOnEndDrag:(0,s.useWorkletCallback)(function(){const n=function({contentOffset:{y:n}},o){if(r.value===D.LOCKED){var l;const n=o.shouldLockInitialPosition&&null!==(l=o.initialContentOffsetY)&&void 0!==l?l:0;return(0,s.scrollTo)(e,0,n,!1),void(t.value=n)}a.value!==O.RUNNING&&(t.value=n,i.value=n)};return n.__closure={animatedScrollableState:r,SCROLLABLE_STATE:D,scrollTo:s.scrollTo,scrollableRef:e,scrollableContentOffsetY:t,animatedAnimationState:a,ANIMATION_STATE:O,rootScrollableContentOffsetY:i},n.__workletHash=5994685111929,n.__initData=G,n}(),[e,t,a,r,i]),handleOnMomentumEnd:(0,s.useWorkletCallback)(function(){const n=function({contentOffset:{y:n}},o){if(r.value===D.LOCKED){var l;const n=o.shouldLockInitialPosition&&null!==(l=o.initialContentOffsetY)&&void 0!==l?l:0;return(0,s.scrollTo)(e,0,n,!1),void(t.value=0)}a.value!==O.RUNNING&&(t.value=n,i.value=n)};return n.__closure={animatedScrollableState:r,SCROLLABLE_STATE:D,scrollTo:s.scrollTo,scrollableRef:e,scrollableContentOffsetY:t,animatedAnimationState:a,ANIMATION_STATE:O,rootScrollableContentOffsetY:i},n.__workletHash=3833739690940,n.__initData=X,n}(),[t,e,a,r,i])}},J={code:"function gorhom_normalizeSnapPointJs1(snapPoint,containerHeight){let normalizedSnapPoint=snapPoint;if(typeof normalizedSnapPoint==='string'){normalizedSnapPoint=Number(normalizedSnapPoint.split('%')[0])*containerHeight/100;}return Math.max(0,containerHeight-normalizedSnapPoint);}"},Z=function(){const e=function(e,t){let n=e;return"string"===typeof n&&(n=Number(n.split("%")[0])*t/100),Math.max(0,t-n)};return e.__closure={},e.__workletHash=0xfbb63d007ca,e.__initData=J,e}(),Q={code:"function gorhom_animateJs1({point:point,configs=undefined,velocity=0,onComplete:onComplete}){const{ANIMATION_CONFIGS,ANIMATION_METHOD,withTiming,withSpring}=this.__closure;if(!configs){configs=ANIMATION_CONFIGS;}const type='duration'in configs||'easing'in configs?ANIMATION_METHOD.TIMING:ANIMATION_METHOD.SPRING;if(type===ANIMATION_METHOD.TIMING){return withTiming(point,configs,onComplete);}else{return withSpring(point,Object.assign({velocity:velocity},configs),onComplete);}}"},ee=function(){const e=function({point:e,configs:t,velocity:n=0,onComplete:r}){t||(t=B);return("duration"in t||"easing"in t?M.TIMING:M.SPRING)===M.TIMING?(0,s.withTiming)(e,t,r):(0,s.withSpring)(e,Object.assign({velocity:n},t),r)};return e.__closure={ANIMATION_CONFIGS:B,ANIMATION_METHOD:M,withTiming:s.withTiming,withSpring:s.withSpring},e.__workletHash=5132631099320,e.__initData=Q,e}(),te={code:"function gorhom_getKeyboardAnimationConfigsJs1(easing,duration){const{Easing}=this.__closure;switch(easing){case'easeIn':return{easing:Easing.in(Easing.ease),duration:duration};case'easeOut':return{easing:Easing.out(Easing.ease),duration:duration};case'easeInEaseOut':return{easing:Easing.inOut(Easing.ease),duration:duration};case'linear':return{easing:Easing.linear,duration:duration};case'keyboard':return{damping:500,stiffness:1000,mass:3,overshootClamping:true,restDisplacementThreshold:10,restSpeedThreshold:10};}}"},ne=function(){const e=function(e,t){switch(e){case"easeIn":return{easing:s.Easing.in(s.Easing.ease),duration:t};case"easeOut":return{easing:s.Easing.out(s.Easing.ease),duration:t};case"easeInEaseOut":return{easing:s.Easing.inOut(s.Easing.ease),duration:t};case"linear":return{easing:s.Easing.linear,duration:t};case"keyboard":return{damping:500,stiffness:1e3,mass:3,overshootClamping:!0,restDisplacementThreshold:10,restSpeedThreshold:10}}};return e.__closure={Easing:s.Easing},e.__workletHash=1514685003181,e.__initData=te,e}();const re=()=>{console.warn("[BottomSheet] could not enable logging on production!")};let ae=()=>{};Object.freeze(ae);const ie={code:"function gorhom_noopJs1(){}"},oe=function(){const e=function(){};return e.__closure={},e.__workletHash=0xab6d90b975b,e.__initData=ie,e}(),se={code:"function gorhom_useScrollHandlerJs1(event,context){const{handleOnScroll,onScroll,runOnJS}=this.__closure;handleOnScroll(event,context);if(onScroll){runOnJS(onScroll)({nativeEvent:event});}}"},le={code:"function gorhom_useScrollHandlerJs2(event,context){const{handleOnBeginDrag,onScrollBeginDrag,runOnJS}=this.__closure;handleOnBeginDrag(event,context);if(onScrollBeginDrag){runOnJS(onScrollBeginDrag)({nativeEvent:event});}}"},ue={code:"function gorhom_useScrollHandlerJs3(event,context){const{handleOnEndDrag,onScrollEndDrag,runOnJS}=this.__closure;handleOnEndDrag(event,context);if(onScrollEndDrag){runOnJS(onScrollEndDrag)({nativeEvent:event});}}"},ce=(e=K,t,n,r)=>{const a=(0,s.useAnimatedRef)(),i=(0,s.useSharedValue)(0),{handleOnScroll:o=oe,handleOnBeginDrag:l=oe,handleOnEndDrag:u=oe,handleOnMomentumEnd:c=oe,handleOnMomentumBegin:d=oe}=e(a,i);return{scrollHandler:(0,s.useAnimatedScrollHandler)({onScroll:function(){const e=function(e,n){o(e,n),t&&(0,s.runOnJS)(t)({nativeEvent:e})};return e.__closure={handleOnScroll:o,onScroll:t,runOnJS:s.runOnJS},e.__workletHash=2648940997751,e.__initData=se,e}(),onBeginDrag:function(){const e=function(e,t){l(e,t),n&&(0,s.runOnJS)(n)({nativeEvent:e})};return e.__closure={handleOnBeginDrag:l,onScrollBeginDrag:n,runOnJS:s.runOnJS},e.__workletHash=0xde473563dc3,e.__initData=le,e}(),onEndDrag:function(){const e=function(e,t){u(e,t),r&&(0,s.runOnJS)(r)({nativeEvent:e})};return e.__closure={handleOnEndDrag:u,onScrollEndDrag:r,runOnJS:s.runOnJS},e.__workletHash=0xfad5f9eafca,e.__initData=ue,e}(),onMomentumBegin:d,onMomentumEnd:c},[o,l,u,d,c,t,n,r]),scrollableRef:a,scrollableContentOffsetY:i}},de={code:"function gorhom_useGestureHandlerJs1(context){Object.keys(context).map(function(key){context[key]=undefined;});}"},he=function(){const e=function(e){Object.keys(e).map((t=>{e[t]=void 0}))};return e.__closure={},e.__workletHash=7141746446959,e.__initData=de,e}(),fe={code:"function gorhom_useGestureHandlerJs2(payload,context){const{state,State,gestureSource,type,handleOnStart,handleOnActive}=this.__closure;if(!context.didStart){context.didStart=true;state.value=State.BEGAN;gestureSource.value=type;handleOnStart(type,payload,context);return;}if(gestureSource.value!==type){return;}state.value=payload.state;handleOnActive(type,payload,context);}"},pe={code:"function gorhom_useGestureHandlerJs3(payload,context){const{gestureSource,type,state,GESTURE_SOURCE,handleOnEnd,resetContext}=this.__closure;if(gestureSource.value!==type){return;}state.value=payload.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;handleOnEnd(type,payload,context);resetContext(context);}"},me={code:"function gorhom_useGestureHandlerJs4(payload,context){const{gestureSource,type,state,GESTURE_SOURCE,resetContext}=this.__closure;if(gestureSource.value!==type){return;}state.value=payload.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;resetContext(context);}"},ge={code:"function gorhom_useGestureHandlerJs5(payload,context){const{gestureSource,type,state,GESTURE_SOURCE,resetContext}=this.__closure;if(gestureSource.value!==type){return;}state.value=payload.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;resetContext(context);}"},ye={code:"function gorhom_useGestureHandlerJs6(payload,context){const{gestureSource,type,state,GESTURE_SOURCE,resetContext}=this.__closure;if(gestureSource.value!==type){return;}state.value=payload.state;gestureSource.value=GESTURE_SOURCE.UNDETERMINED;resetContext(context);}"},_e=(e,t,n,r,a,i)=>(0,s.useAnimatedGestureHandler)({onActive:function(){const i=function(i,o){if(!o.didStart)return o.didStart=!0,t.value=l.State.BEGAN,n.value=e,void r(e,i,o);n.value===e&&(t.value=i.state,a(e,i,o))};return i.__closure={state:t,State:l.State,gestureSource:n,type:e,handleOnStart:r,handleOnActive:a},i.__workletHash=8765161239618,i.__initData=fe,i}(),onEnd:function(){const r=function(r,a){n.value===e&&(t.value=r.state,n.value=C.UNDETERMINED,i(e,r,a),he(a))};return r.__closure={gestureSource:n,type:e,state:t,GESTURE_SOURCE:C,handleOnEnd:i,resetContext:he},r.__workletHash=5547350480044,r.__initData=pe,r}(),onCancel:function(){const r=function(r,a){n.value===e&&(t.value=r.state,n.value=C.UNDETERMINED,he(a))};return r.__closure={gestureSource:n,type:e,state:t,GESTURE_SOURCE:C,resetContext:he},r.__workletHash=4618739767412,r.__initData=me,r}(),onFail:function(){const r=function(r,a){n.value===e&&(t.value=r.state,n.value=C.UNDETERMINED,he(a))};return r.__closure={gestureSource:n,type:e,state:t,GESTURE_SOURCE:C,resetContext:he},r.__workletHash=9123771079893,r.__initData=ge,r}(),onFinish:function(){const r=function(r,a){n.value===e&&(t.value=r.state,n.value=C.UNDETERMINED,he(a))};return r.__closure={gestureSource:n,type:e,state:t,GESTURE_SOURCE:C,resetContext:he},r.__workletHash=9711023447990,r.__initData=ye,r}()},[e,t,r,a,i]);var be=n(92365);const ve={code:"function gorhom_clampJs1(value,lowerBound,upperBound){return Math.min(Math.max(lowerBound,value),upperBound);}"},we=function(){const e=function(e,t,n){return Math.min(Math.max(t,e),n)};return e.__closure={},e.__workletHash=0xd0dad694159,e.__initData=ve,e}(),Fe={code:"function gorhom_snapPointJs1(value,velocity,points){const point=value+0.2*velocity;const deltas=points.map(function(p){return Math.abs(point-p);});const minDelta=Math.min.apply(null,deltas);return points.filter(function(p){return Math.abs(point-p)===minDelta;})[0];}"},ke=function(){const e=function(e,t,n){const r=e+.2*t,a=n.map((e=>Math.abs(r-e))),i=Math.min.apply(null,a);return n.filter((e=>Math.abs(r-e)===i))[0]};return e.__closure={},e.__workletHash=0xcc0b83f1a86,e.__initData=Fe,e}(),xe=be.default.dismiss,Ae={code:"function handleOnStart_Gorhom_useGestureEventsHandlersDefaultJs1(__,_,context){const{stopAnimation,animatedPosition,animatedKeyboardState,animatedScrollableContentOffsetY}=this.__closure;stopAnimation();context.initialPosition=animatedPosition.value;context.initialKeyboardState=animatedKeyboardState.value;if(animatedScrollableContentOffsetY.value>0){context.isScrollablePositionLocked=true;}}"},Se={code:"function handleOnActive_Gorhom_useGestureEventsHandlersDefaultJs2(source,{translationY:translationY},context){const{animatedHighestSnapPoint,isInTemporaryPosition,KEYBOARD_STATE,enablePanDownToClose,animatedContainerHeight,animatedSnapPoints,GESTURE_SOURCE,isScrollableRefreshable,animatedPosition,animatedScrollableContentOffsetY,clamp,enableOverDrag,animatedScrollableType,SCROLLABLE_TYPE,overDragResistanceFactor}=this.__closure;let highestSnapPoint=animatedHighestSnapPoint.value;if(isInTemporaryPosition.value&&context.initialKeyboardState===KEYBOARD_STATE.SHOWN){highestSnapPoint=context.initialPosition;}if(isInTemporaryPosition.value&&context.initialPositionlowestSnapPoint){const resistedPosition=lowestSnapPoint+Math.sqrt(1+(draggedPosition-lowestSnapPoint))*overDragResistanceFactor;animatedPosition.value=resistedPosition;return;}if(source===GESTURE_SOURCE.SCROLLABLE&&draggedPosition+negativeScrollableContentOffset>lowestSnapPoint){const resistedPosition=lowestSnapPoint+Math.sqrt(1+(draggedPosition+negativeScrollableContentOffset-lowestSnapPoint))*overDragResistanceFactor;animatedPosition.value=resistedPosition;return;}}animatedPosition.value=clampedPosition;}"},Ee={code:"function handleOnEnd_Gorhom_useGestureEventsHandlersDefaultJs3(source,{translationY:translationY,absoluteY:absoluteY,velocityY:velocityY},context){const{animatedHighestSnapPoint,animatedPosition,GESTURE_SOURCE,isScrollableRefreshable,isInTemporaryPosition,animateToPosition,ANIMATION_SOURCE,animatedScrollableType,SCROLLABLE_TYPE,KEYBOARD_STATE,Platform,WINDOW_HEIGHT,animatedKeyboardHeight,runOnJS,dismissKeyboard,animatedSnapPoints,enablePanDownToClose,animatedClosedPosition,snapPoint,animatedScrollableContentOffsetY}=this.__closure;const highestSnapPoint=animatedHighestSnapPoint.value;const isSheetAtHighestSnapPoint=animatedPosition.value===highestSnapPoint;if(source===GESTURE_SOURCE.SCROLLABLE&&isScrollableRefreshable.value&&isSheetAtHighestSnapPoint){return;}if(isInTemporaryPosition.value&&context.initialPosition>=animatedPosition.value){if(context.initialPosition>animatedPosition.value){animateToPosition(context.initialPosition,ANIMATION_SOURCE.GESTURE,velocityY/2);}return;}const isScrollable=animatedScrollableType.value!==SCROLLABLE_TYPE.UNDETERMINED&&animatedScrollableType.value!==SCROLLABLE_TYPE.VIEW;if(context.initialKeyboardState===KEYBOARD_STATE.SHOWN&&animatedPosition.value>context.initialPosition){if(!(Platform.OS==='ios'&&isScrollable&&absoluteY>WINDOW_HEIGHT-animatedKeyboardHeight.value)){runOnJS(dismissKeyboard)();}}if(isInTemporaryPosition.value){isInTemporaryPosition.value=false;}const snapPoints=animatedSnapPoints.value.slice();if(enablePanDownToClose){snapPoints.unshift(animatedClosedPosition.value);}const destinationPoint=snapPoint(translationY+context.initialPosition,velocityY,snapPoints);if(destinationPoint===animatedPosition.value){return;}const wasGestureHandledByScrollView=source===GESTURE_SOURCE.SCROLLABLE&&animatedScrollableContentOffsetY.value>0;if(wasGestureHandledByScrollView&&isSheetAtHighestSnapPoint){return;}animateToPosition(destinationPoint,ANIMATION_SOURCE.GESTURE,velocityY/2);}"},Ce=()=>{const{animatedPosition:e,animatedSnapPoints:t,animatedKeyboardState:n,animatedKeyboardHeight:r,animatedContainerHeight:i,animatedScrollableType:o,animatedHighestSnapPoint:l,animatedClosedPosition:u,animatedScrollableContentOffsetY:c,enableOverDrag:d,enablePanDownToClose:h,overDragResistanceFactor:f,isInTemporaryPosition:m,isScrollableRefreshable:g,animateToPosition:y,stopAnimation:_}=p();return{handleOnStart:(0,s.useWorkletCallback)(function(){const t=function(t,r,a){_(),a.initialPosition=e.value,a.initialKeyboardState=n.value,c.value>0&&(a.isScrollablePositionLocked=!0)};return t.__closure={stopAnimation:_,animatedPosition:e,animatedKeyboardState:n,animatedScrollableContentOffsetY:c},t.__workletHash=0xff1fd7e358f,t.__initData=Ae,t}(),[_,e,n,c]),handleOnActive:(0,s.useWorkletCallback)(function(){const n=function(n,{translationY:r},a){let s=l.value;m.value&&a.initialKeyboardState===R.SHOWN&&(s=a.initialPosition),m.value&&a.initialPositionu){const t=u+Math.sqrt(y-u+1)*f;return void(e.value=t)}if(n===C.SCROLLABLE&&y+p>u){const t=u+Math.sqrt(y+p-u+1)*f;return void(e.value=t)}}e.value=_};return n.__closure={animatedHighestSnapPoint:l,isInTemporaryPosition:m,KEYBOARD_STATE:R,enablePanDownToClose:h,animatedContainerHeight:i,animatedSnapPoints:t,GESTURE_SOURCE:C,isScrollableRefreshable:g,animatedPosition:e,animatedScrollableContentOffsetY:c,clamp:we,enableOverDrag:d,animatedScrollableType:o,SCROLLABLE_TYPE:I,overDragResistanceFactor:f},n.__workletHash=0xedb73d5e3f,n.__initData=Se,n}(),[d,h,f,m,g,l,i,t,e,o,c]),handleOnEnd:(0,s.useWorkletCallback)(function(){const n=function(n,{translationY:r,absoluteY:a,velocityY:i},d){const f=l.value,p=e.value===f;if(n===C.SCROLLABLE&&g.value&&p)return;if(m.value&&d.initialPosition>=e.value)return void(d.initialPosition>e.value&&y(d.initialPosition,P.GESTURE,i/2));o.value!==I.UNDETERMINED&&(o.value,I.VIEW);d.initialKeyboardState===R.SHOWN&&e.value>d.initialPosition&&(0,s.runOnJS)(xe)(),m.value&&(m.value=!1);const _=t.value.slice();h&&_.unshift(u.value);const b=ke(r+d.initialPosition,i,_);if(b===e.value)return;n===C.SCROLLABLE&&c.value>0&&p||y(b,P.GESTURE,i/2)};return n.__closure={animatedHighestSnapPoint:l,animatedPosition:e,GESTURE_SOURCE:C,isScrollableRefreshable:g,isInTemporaryPosition:m,animateToPosition:y,ANIMATION_SOURCE:P,animatedScrollableType:o,SCROLLABLE_TYPE:I,KEYBOARD_STATE:R,Platform:a.default,WINDOW_HEIGHT:x,animatedKeyboardHeight:r,runOnJS:s.runOnJS,dismissKeyboard:xe,animatedSnapPoints:t,enablePanDownToClose:h,animatedClosedPosition:u,snapPoint:ke,animatedScrollableContentOffsetY:c},n.__workletHash=5893951454408,n.__initData=Ee,n}(),[h,m,g,u,l,r,e,o,t,c,y])}},Te="",De="",Ie={code:"function gorhom_useKeyboardJs1(state,height,duration,easing){const{KEYBOARD_STATE,shouldHandleKeyboardEvents,temporaryCachedKeyboardEvent,keyboardHeight,keyboardAnimationDuration,keyboardAnimationEasing,keyboardState}=this.__closure;if(state===KEYBOARD_STATE.SHOWN&&!shouldHandleKeyboardEvents.value){temporaryCachedKeyboardEvent.value=[state,height,duration,easing];return;}keyboardHeight.value=state===KEYBOARD_STATE.SHOWN?height:height===0?keyboardHeight.value:height;keyboardAnimationDuration.value=duration;keyboardAnimationEasing.value=easing;keyboardState.value=state;temporaryCachedKeyboardEvent.value=[];}"},Oe={code:"function gorhom_useKeyboardJs2(){const{shouldHandleKeyboardEvents}=this.__closure;return shouldHandleKeyboardEvents.value;}"},Pe={code:"function gorhom_useKeyboardJs3(result){const{temporaryCachedKeyboardEvent,handleKeyboardEvent}=this.__closure;const params=temporaryCachedKeyboardEvent.value;if(result&¶ms.length>0){handleKeyboardEvent(params[0],params[1],params[2],params[3]);}}"},Me=e=>{const t=(0,r.useRef)(),n=(0,r.useCallback)(((...e)=>t.current&&t.current(...e)),[]);return(0,r.useEffect)((()=>(t.current=e,()=>t.current=void 0))),n},Re=2.5,Le=!0,Ne=!0,Be=!0,je=!1,Ve=!0,ze=!1,He=z.interactive,Ue=H.none,We=U.adjustPan,qe=Number.NEGATIVE_INFINITY,$e=-999,Ye=-999,Ge={top:0,bottom:0,left:0,right:0},Xe=-999,Ke=S,Je=!0,Ze="Bottom Sheet",Qe="adjustable",et={code:"function gorhom_useNormalizedSnapPointsJs1(){const{containerHeight,INITIAL_CONTAINER_HEIGHT,INITIAL_SNAP_POINT,snapPoints,normalizeSnapPoint,enableDynamicSizing,handleHeight,INITIAL_HANDLE_HEIGHT,contentHeight,maxDynamicContentSize}=this.__closure;const isContainerLayoutReady=containerHeight.value!==INITIAL_CONTAINER_HEIGHT;if(!isContainerLayoutReady){return[INITIAL_SNAP_POINT];}const _snapPoints=snapPoints?'value'in snapPoints?snapPoints.value:snapPoints:[];let _normalizedSnapPoints=_snapPoints.map(function(snapPoint){return normalizeSnapPoint(snapPoint,containerHeight.value);});if(enableDynamicSizing){if(handleHeight.value===INITIAL_HANDLE_HEIGHT){return[INITIAL_SNAP_POINT];}if(contentHeight.value===INITIAL_CONTAINER_HEIGHT){return[INITIAL_SNAP_POINT];}_normalizedSnapPoints.push(containerHeight.value-Math.min(contentHeight.value+handleHeight.value,maxDynamicContentSize!==undefined?maxDynamicContentSize:containerHeight.value));_normalizedSnapPoints=_normalizedSnapPoints.sort(function(a,b){return b-a;});}return _normalizedSnapPoints;}"},tt=e=>{var t;const n=(0,r.useRef)(null),a=(0,r.useRef)(null);return e&&"object"===typeof e&&"value"in e||(null===a.current?(n.current=e,a.current="object"===typeof e?(0,s.makeMutable)(Object.assign({},e)):(0,s.makeMutable)(e)):n.current!==e&&(a.current.value=e)),(0,r.useEffect)((()=>()=>{a.current&&(0,s.cancelAnimation)(a.current)}),[]),null!==(t=a.current)&&void 0!==t?t:e},nt={code:"function gorhom_useBottomSheetDynamicSnapPointsJs1(){const{animatedHandleHeight,INITIAL_HANDLE_HEIGHT,animatedContentHeight,initialSnapPoints,INITIAL_SNAP_POINT}=this.__closure;if(animatedHandleHeight.value===INITIAL_HANDLE_HEIGHT||animatedContentHeight.value===0){return initialSnapPoints.map(function(){return INITIAL_SNAP_POINT;});}const contentWithHandleHeight=animatedContentHeight.value+animatedHandleHeight.value;return initialSnapPoints.map(function(snapPoint){return snapPoint==='CONTENT_HEIGHT'?contentWithHandleHeight:snapPoint;});}"},rt=e=>{const t=(0,s.useSharedValue)(0),n=(0,s.useSharedValue)(Xe),a=(0,s.useDerivedValue)(function(){const r=function(){if(n.value===Xe||0===t.value)return e.map((()=>$e));const r=t.value+n.value;return e.map((e=>"CONTENT_HEIGHT"===e?r:e))};return r.__closure={animatedHandleHeight:n,INITIAL_HANDLE_HEIGHT:Xe,animatedContentHeight:t,initialSnapPoints:e,INITIAL_SNAP_POINT:$e},r.__workletHash=4697035250707,r.__initData=nt,r}(),[]),i=(0,r.useCallback)((({nativeEvent:{layout:{height:e}}})=>{t.value=e}),[t]);return(0,r.useEffect)((()=>{console.warn("`useBottomSheetDynamicSnapPoints` will be deprecated in the next major release! please use the new introduce prop `enableDynamicSizing`.")}),[]),{animatedSnapPoints:a,animatedHandleHeight:n,animatedContentHeight:t,handleContentLayout:i}},at=()=>{const e=(0,r.useContext)(m);if(null===e)throw"'useBottomSheetGestureHandlers' cannot be used out of the BottomSheet!";return e};var it=n(21815),ot=n(73929),st=n(75675);const lt=st.default.create({container:{position:"fixed",left:0,right:0,bottom:0,top:0}});const ut=(0,r.memo)((function({containerHeight:e,containerOffset:t,topInset:n=0,bottomInset:a=0,shouldCalculateHeight:i=!0,detached:o,style:s,children:l}){const u=(0,r.useRef)(null),c=(0,r.useMemo)((()=>[s,lt.container,{top:n,bottom:a,overflow:o?"visible":"hidden"}]),[s,o,n,a]),d=(0,r.useCallback)((function({nativeEvent:{layout:{height:n}}}){var r;e.value=n,null===(r=u.current)||void 0===r||r.measure(((e,r,a,i,o,s)=>{var l;t.value&&(t.value={top:null!==s&&void 0!==s?s:0,left:0,right:0,bottom:Math.max(0,x-((null!==s&&void 0!==s?s:0)+n+(null!==(l=it.default.currentHeight)&&void 0!==l?l:0)))})})),ut.displayName}),[e,t,u]);return r.createElement(ot.default,{ref:u,pointerEvents:"box-none",onLayout:i?d:void 0,style:c,children:l})}));ut.displayName="BottomSheetContainer";const ct=ut,dt=({gestureEventsHandlersHook:e=Ce,children:t})=>{const n=(0,s.useSharedValue)(C.UNDETERMINED),{animatedContentGestureState:a,animatedHandleGestureState:i}=p(),{handleOnStart:o,handleOnActive:l,handleOnEnd:u}=e(),c=_e(C.CONTENT,a,n,o,l,u),d=_e(C.SCROLLABLE,a,n,o,l,u),h=_e(C.HANDLE,i,n,o,l,u),f=(0,r.useMemo)((()=>({contentPanGestureHandler:c,handlePanGestureHandler:h,scrollablePanGestureHandler:d,animatedGestureSource:n})),[c,h,d,n]);return r.createElement(m.Provider,{value:f},t)},ht=st.default.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0}}),ft=(0,r.memo)((({animatedIndex:e,animatedPosition:t,backdropComponent:n})=>n?r.createElement(n,{animatedIndex:e,animatedPosition:t,style:ht.container}):null));ft.displayName="BottomSheetBackdropContainer";const pt=ft,mt=st.default.create({container:{padding:10},indicator:{alignSelf:"center",width:7.5*A/100,height:4,borderRadius:4,backgroundColor:"rgba(0, 0, 0, 0.75)"}}),gt=(0,r.memo)((({style:e,indicatorStyle:t,children:n,accessible:a=true,accessibilityRole:i="adjustable",accessibilityLabel:o="Bottom sheet handle",accessibilityHint:l="Drag up or down to extend or minimize the bottom sheet"})=>{const u=(0,r.useMemo)((()=>[mt.container,Array.isArray(e)?e:[e]]),[e]),c=(0,r.useMemo)((()=>[mt.indicator,Array.isArray(t)?t:[t]]),[t]);return r.createElement(s.default.View,{style:u,accessible:null!==a&&void 0!==a?a:void 0,accessibilityRole:null!==i&&void 0!==i?i:void 0,accessibilityLabel:null!==o&&void 0!==o?o:void 0,accessibilityHint:null!==l&&void 0!==l?l:void 0},r.createElement(s.default.View,{style:c}),n)}));gt.displayName="BottomSheetHandle";const yt=gt;const _t=(0,r.memo)((function({animatedIndex:e,animatedPosition:t,simultaneousHandlers:n,enableHandlePanningGesture:a,handleHeight:i,handleComponent:o,handleStyle:u,handleIndicatorStyle:c}){const{activeOffsetX:d,activeOffsetY:h,failOffsetX:f,failOffsetY:m,waitFor:g,simultaneousHandlers:y}=p(),{handlePanGestureHandler:_}=at(),b=(0,r.useMemo)((()=>{const e=[];return n&&e.push(n),y&&(Array.isArray(y)?e.push(...y):e.push(y)),e}),[y,n]),v=(0,r.useCallback)((function({nativeEvent:{layout:{height:e}}}){i.value=e,_t.displayName}),[i]),w=void 0===o?yt:o;return null!==w?r.createElement(l.PanGestureHandler,{enabled:a,waitFor:g,simultaneousHandlers:b,shouldCancelWhenOutside:!1,activeOffsetX:d,activeOffsetY:h,failOffsetX:f,failOffsetY:m,onGestureEvent:_},r.createElement(s.default.View,{key:"BottomSheetHandleContainer",onLayout:v},r.createElement(w,{animatedIndex:e,animatedPosition:t,style:u,indicatorStyle:c}))):null}));_t.displayName="BottomSheetHandleContainer";const bt=_t,vt=st.default.create({container:{backgroundColor:"white",borderRadius:15}}),wt=(0,r.memo)((({pointerEvents:e,style:t})=>r.createElement(ot.default,{pointerEvents:e,accessible:!0,accessibilityRole:"adjustable",accessibilityLabel:"Bottom Sheet",style:[vt.container,t]})));wt.displayName="BottomSheetBackground";const Ft=wt,kt=st.default.create({container:{position:"absolute",top:0,left:0,right:0,bottom:0}}),xt=(0,r.memo)((({animatedIndex:e,animatedPosition:t,backgroundComponent:n,backgroundStyle:a})=>{const i=n||Ft,o=(0,r.useMemo)((()=>st.default.flatten([kt.container,a])),[a]);return null===n?null:r.createElement(i,{pointerEvents:"none",animatedIndex:e,animatedPosition:t,style:o})}));xt.displayName="BottomSheetBackgroundContainer";const At=xt,St={code:"function gorhom_BottomSheetFooterContainerJs1(){const{animatedKeyboardHeightInContainer,animatedContainerHeight,animatedPosition,animatedKeyboardState,KEYBOARD_STATE,animatedFooterHeight,animatedHandleHeight}=this.__closure;const keyboardHeight=animatedKeyboardHeightInContainer.value;let footerTranslateY=Math.max(0,animatedContainerHeight.value-animatedPosition.value);if(animatedKeyboardState.value===KEYBOARD_STATE.SHOWN){footerTranslateY=footerTranslateY-keyboardHeight;}footerTranslateY=footerTranslateY-animatedFooterHeight.value-animatedHandleHeight.value;return footerTranslateY;}"},Et=(0,r.memo)((({footerComponent:e})=>{const{animatedContainerHeight:t,animatedHandleHeight:n,animatedFooterHeight:a,animatedPosition:i,animatedKeyboardState:o,animatedKeyboardHeightInContainer:l}=p(),u=(0,s.useDerivedValue)(function(){const e=function(){const e=l.value;let r=Math.max(0,t.value-i.value);return o.value===R.SHOWN&&(r-=e),r=r-a.value-n.value,r};return e.__closure={animatedKeyboardHeightInContainer:l,animatedContainerHeight:t,animatedPosition:i,animatedKeyboardState:o,KEYBOARD_STATE:R,animatedFooterHeight:a,animatedHandleHeight:n},e.__workletHash=0xae9573f2153,e.__initData=St,e}(),[l,t,i,o,a,n]);return r.createElement(e,{animatedFooterPosition:u})}));Et.displayName="BottomSheetFooterContainer";const Ct=Et;var Tt=n(98587);const Dt=["gestureType","nativeGestureRef","refreshControlGestureRef","style","children"];function It(){return It=Object.assign||function(e){for(var t=1;t{let{gestureType:t=C.CONTENT,nativeGestureRef:n,refreshControlGestureRef:a,style:i,children:o}=e,u=(0,Tt.default)(e,Dt);const{enableContentPanningGesture:c,simultaneousHandlers:d,waitFor:h,activeOffsetX:f,activeOffsetY:m,failOffsetX:g,failOffsetY:y}=p(),{contentPanGestureHandler:_,scrollablePanGestureHandler:b}=at(),v=(0,r.useRef)(null),w=(0,r.useMemo)((()=>t===C.CONTENT?_:b),[t,_,b]),F=(0,r.useMemo)((()=>{const e=[];return n&&e.push(n),a&&e.push(a),d&&(Array.isArray(d)?e.push(...d):e.push(d)),e}),[d,n,a]);return r.createElement(l.PanGestureHandler,{ref:v,enabled:c,simultaneousHandlers:F,shouldCancelWhenOutside:!1,waitFor:h,onGestureEvent:w,activeOffsetX:f,activeOffsetY:m,failOffsetX:g,failOffsetY:y},r.createElement(s.default.View,It({style:i},u),o))}));Ot.displayName="BottomSheetDraggableView";const Pt=Ot,Mt=st.default.create({container:{flexDirection:"column-reverse",position:"absolute",top:0,left:0,right:0},contentContainer:{},contentMaskContainer:{overflow:"hidden"}});s.default.addWhitelistedUIProps({decelerationRate:!0});const Rt={code:"function gorhom_BottomSheetJs1(){const{topInset,bottomInset,$modal,_animatedContainerHeight}=this.__closure;const verticalInset=topInset+bottomInset;return $modal?_animatedContainerHeight.value-verticalInset:_animatedContainerHeight.value;}"},Lt={code:"function gorhom_BottomSheetJs2(){const{animatedSnapPoints}=this.__closure;return animatedSnapPoints.value[animatedSnapPoints.value.length-1];}"},Nt={code:"function gorhom_BottomSheetJs3(){const{animatedContainerHeight,$modal,detached,bottomInset}=this.__closure;let closedPosition=animatedContainerHeight.value;if($modal||detached){closedPosition=animatedContainerHeight.value+bottomInset;}return closedPosition;}"},Bt={code:"function gorhom_BottomSheetJs4(){const{animatedContainerHeight,animatedHighestSnapPoint}=this.__closure;return animatedContainerHeight.value-animatedHighestSnapPoint.value;}"},jt={code:"function gorhom_BottomSheetJs5(){const{_providedContainerHeight,animatedContainerHeight,INITIAL_CONTAINER_HEIGHT,_providedHandleHeight,handleComponent,animatedHandleHeight,INITIAL_HANDLE_HEIGHT,animatedSnapPoints,INITIAL_SNAP_POINT}=this.__closure;let isContainerHeightCalculated=false;if(_providedContainerHeight!==null||_providedContainerHeight!==undefined){isContainerHeightCalculated=true;}if(animatedContainerHeight.value!==INITIAL_CONTAINER_HEIGHT){isContainerHeightCalculated=true;}let isHandleHeightCalculated=false;if(_providedHandleHeight!==null&&_providedHandleHeight!==undefined&&typeof _providedHandleHeight==='number'){isHandleHeightCalculated=true;}if(handleComponent===null){animatedHandleHeight.value=0;isHandleHeightCalculated=true;}if(animatedHandleHeight.value!==INITIAL_HANDLE_HEIGHT){isHandleHeightCalculated=true;}let isSnapPointsNormalized=false;if(animatedSnapPoints.value[0]!==INITIAL_SNAP_POINT){isSnapPointsNormalized=true;}return isContainerHeightCalculated&&isHandleHeightCalculated&&isSnapPointsNormalized;}"},Vt={code:"function gorhom_BottomSheetJs6(){const{animatedPosition,animatedClosedPosition,SHEET_STATE,animatedContainerHeight,animatedSheetHeight,animatedKeyboardHeightInContainer,keyboardBehavior,KEYBOARD_BEHAVIOR,isInTemporaryPosition}=this.__closure;if(animatedPosition.value>=animatedClosedPosition.value)return SHEET_STATE.CLOSED;const extendedPosition=animatedContainerHeight.value-animatedSheetHeight.value;if(animatedPosition.value===extendedPosition)return SHEET_STATE.EXTENDED;const keyboardHeightInContainer=animatedKeyboardHeightInContainer.value;const extendedPositionWithKeyboard=Math.max(0,animatedContainerHeight.value-(animatedSheetHeight.value+keyboardHeightInContainer));if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&isInTemporaryPosition.value&&animatedPosition.value===extendedPositionWithKeyboard){return SHEET_STATE.EXTENDED;}if(animatedPosition.value===0){return SHEET_STATE.FILL_PARENT;}if(animatedPosition.valueanimatedContainerHeight.value){contentHeight=animatedContainerHeight.value-keyboardHeightInContainer-handleHeight;}}else if(contentWithKeyboardHeight+handleHeight>animatedContainerHeight.value){contentHeight=animatedContainerHeight.value-handleHeight;}else{contentHeight=contentWithKeyboardHeight;}}return Math.max(contentHeight,0);}"},Ut={code:"function gorhom_BottomSheetJs9(){const{animatedSnapPoints,animatedContainerHeight,isLayoutCalculated,interpolate,animatedPosition,Extrapolate,android_keyboardInputMode,KEYBOARD_INPUT_MODE,animatedAnimationSource,ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE,isInTemporaryPosition,animatedCurrentIndex,animatedNextPositionIndex}=this.__closure;const adjustedSnapPoints=animatedSnapPoints.value.slice().reverse();const adjustedSnapPointsIndexes=animatedSnapPoints.value.slice().map(function(_,index){return index;}).reverse();adjustedSnapPoints.push(animatedContainerHeight.value);adjustedSnapPointsIndexes.push(-1);const currentIndex=isLayoutCalculated.value?interpolate(animatedPosition.value,adjustedSnapPoints,adjustedSnapPointsIndexes,Extrapolate.CLAMP):-1;if(android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize&&animatedAnimationSource.value===ANIMATION_SOURCE.KEYBOARD&&animatedAnimationState.value===ANIMATION_STATE.RUNNING&&isInTemporaryPosition.value){return Math.max(animatedCurrentIndex.value,currentIndex);}if(animatedAnimationSource.value===ANIMATION_SOURCE.SNAP_POINT_CHANGE&&animatedAnimationState.value===ANIMATION_STATE.RUNNING){return animatedNextPositionIndex.value;}return currentIndex;}"},Wt={code:"function getNextPosition_Gorhom_BottomSheetJs10(){const{animatedCurrentIndex,animatedSnapPoints,animatedKeyboardState,animatedHighestSnapPoint,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,KEYBOARD_STATE,animatedContentGestureState,State,animatedHandleGestureState,isInTemporaryPosition,keyboardBehavior,KEYBOARD_BEHAVIOR,animatedKeyboardHeightInContainer,animatedPosition}=this.__closure;const currentIndex=animatedCurrentIndex.value;const snapPoints=animatedSnapPoints.value;const keyboardState=animatedKeyboardState.value;const highestSnapPoint=animatedHighestSnapPoint.value;if(keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.restore&&keyboardState===KEYBOARD_STATE.HIDDEN&&animatedContentGestureState.value!==State.ACTIVE&&animatedHandleGestureState.value!==State.ACTIVE){isInTemporaryPosition.value=false;const nextPosition=snapPoints[currentIndex];return nextPosition;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.extend&&keyboardState===KEYBOARD_STATE.SHOWN){return highestSnapPoint;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.fillParent&&keyboardState===KEYBOARD_STATE.SHOWN){isInTemporaryPosition.value=true;return 0;}if(keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&keyboardState===KEYBOARD_STATE.SHOWN){isInTemporaryPosition.value=true;const keyboardHeightInContainer=animatedKeyboardHeightInContainer.value;return Math.max(0,highestSnapPoint-keyboardHeightInContainer);}if(isInTemporaryPosition.value){return animatedPosition.value;}return snapPoints[currentIndex];}"},qt={code:"function gorhom_BottomSheetJs11(){const{cancelAnimation,animatedPosition,isForcedClosing,animatedAnimationSource,ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE}=this.__closure;cancelAnimation(animatedPosition);isForcedClosing.value=false;animatedAnimationSource.value=ANIMATION_SOURCE.NONE;animatedAnimationState.value=ANIMATION_STATE.STOPPED;}"},$t={code:"function animateToPositionCompleted_Gorhom_BottomSheetJs12(isFinished){const animateToPositionCompleted_Gorhom_BottomSheetJs12=this._recur;const{isForcedClosing,runOnJS,print,BottomSheet,animatedCurrentIndex,animatedNextPosition,animatedNextPositionIndex,animatedAnimationSource,ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE,INITIAL_VALUE}=this.__closure;isForcedClosing.value=false;if(!isFinished){return;}runOnJS(print)({component:BottomSheet.name,method:animateToPositionCompleted_Gorhom_BottomSheetJs12.name,params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedNextPosition:animatedNextPosition.value,animatedNextPositionIndex:animatedNextPositionIndex.value}});animatedAnimationSource.value=ANIMATION_SOURCE.NONE;animatedAnimationState.value=ANIMATION_STATE.STOPPED;animatedNextPosition.value=INITIAL_VALUE;animatedNextPositionIndex.value=INITIAL_VALUE;}"},Yt={code:"function animateToPosition_Gorhom_BottomSheetJs13(position,source,velocity=0,configs){const animateToPosition_Gorhom_BottomSheetJs13=this._recur;const{animatedPosition,animatedAnimationState,ANIMATION_STATE,animatedNextPosition,runOnJS,print,BottomSheet,animatedContainerHeight,stopAnimation,animatedAnimationSource,animatedNextPositionIndex,animatedSnapPoints,handleOnAnimate,ReduceMotion,animate,animateToPositionCompleted,_providedAnimationConfigs}=this.__closure;if(position===animatedPosition.value||position===undefined||animatedAnimationState.value===ANIMATION_STATE.RUNNING&&position===animatedNextPosition.value){return;}runOnJS(print)({component:BottomSheet.name,method:animateToPosition_Gorhom_BottomSheetJs13.name,params:{currentPosition:animatedPosition.value,position:position,velocity:velocity,animatedContainerHeight:animatedContainerHeight.value}});stopAnimation();animatedAnimationState.value=ANIMATION_STATE.RUNNING;animatedAnimationSource.value=source;animatedNextPosition.value=position;animatedNextPositionIndex.value=animatedSnapPoints.value.indexOf(position);runOnJS(handleOnAnimate)(position);if(configs!==undefined){if(ReduceMotion){configs.reduceMotion=ReduceMotion.Never;}animatedPosition.value=animate({point:position,configs:configs,velocity:velocity,onComplete:animateToPositionCompleted});}else{animatedPosition.value=animate({point:position,velocity:velocity,configs:_providedAnimationConfigs,onComplete:animateToPositionCompleted});}}"},Gt={code:"function handleSnapToPosition_Gorhom_BottomSheetJs14(position,animationConfigs){const handleSnapToPosition_Gorhom_BottomSheetJs14=this._recur;const{print,BottomSheet,normalizeSnapPoint,animatedContainerHeight,isLayoutCalculated,animatedNextPosition,isForcedClosing,isInTemporaryPosition,runOnUI,animateToPosition,ANIMATION_SOURCE}=this.__closure;print({component:BottomSheet.name,method:handleSnapToPosition_Gorhom_BottomSheetJs14.name,params:{position:position}});const nextPosition=normalizeSnapPoint(position,animatedContainerHeight.value);if(!isLayoutCalculated||nextPosition===animatedNextPosition.value||isForcedClosing.value){return;}isInTemporaryPosition.value=true;runOnUI(animateToPosition)(nextPosition,ANIMATION_SOURCE.USER,0,animationConfigs);}"},Xt={code:"function gorhom_BottomSheetJs15(){const{Platform,animatedIndex,animatedPosition}=this.__closure;return{opacity:Platform.OS==='android'&&animatedIndex.value===-1?0:1,transform:[{translateY:animatedPosition.value}]};}"},Kt={code:"function gorhom_BottomSheetJs16(){const{_providedContentHeight,animate,animatedContentHeightMax,_providedAnimationConfigs}=this.__closure;if(_providedContentHeight){return{};}return{height:animate({point:animatedContentHeightMax.value,configs:_providedAnimationConfigs})};}"},Jt={code:"function gorhom_BottomSheetJs17(){const{detached,animatedContainerHeight}=this.__closure;if(detached){return{overflow:'visible'};}return{paddingBottom:animatedContainerHeight.value};}"},Zt={code:"function gorhom_BottomSheetJs18(){const{isLayoutCalculated}=this.__closure;return isLayoutCalculated.value;}"},Qt={code:"function gorhom_BottomSheetJs19(_isLayoutCalculated){const{isAnimatedOnMount,_providedIndex,animatedClosedPosition,animatedNextPositionIndex,animatedSnapPoints,runOnJS,print,BottomSheet,INITIAL_POSITION,animatedCurrentIndex,animateOnMount,animateToPosition,ANIMATION_SOURCE,animatedPosition}=this.__closure;if(!_isLayoutCalculated||isAnimatedOnMount.value){return;}let nextPosition;if(_providedIndex===-1){nextPosition=animatedClosedPosition.value;animatedNextPositionIndex.value=-1;}else{nextPosition=animatedSnapPoints.value[_providedIndex];}runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnMount',params:{isLayoutCalculated:_isLayoutCalculated,animatedSnapPoints:animatedSnapPoints.value,nextPosition:nextPosition}});if(nextPosition===INITIAL_POSITION||nextPosition===animatedClosedPosition.value){isAnimatedOnMount.value=true;animatedCurrentIndex.value=_providedIndex;return;}if(animateOnMount){animateToPosition(nextPosition,ANIMATION_SOURCE.MOUNT);}else{animatedPosition.value=nextPosition;}isAnimatedOnMount.value=true;}"},en={code:"function gorhom_BottomSheetJs20(){const{animatedSnapPoints,animatedContainerHeight}=this.__closure;return{snapPoints:animatedSnapPoints.value,containerHeight:animatedContainerHeight.value};}"},tn={code:"function gorhom_BottomSheetJs21(result,_previousResult){const{ANIMATION_SOURCE,animatedAnimationState,ANIMATION_STATE,animatedNextPositionIndex,animateToPosition,isLayoutCalculated,isAnimatedOnMount,runOnJS,print,BottomSheet,animatedCurrentIndex,animatedNextPosition,animatedClosedPosition,isInTemporaryPosition,getNextPosition}=this.__closure;const{snapPoints:snapPoints,containerHeight:containerHeight}=result;const _previousSnapPoints=_previousResult===null||_previousResult===void 0?void 0:_previousResult.snapPoints;const _previousContainerHeight=_previousResult===null||_previousResult===void 0?void 0:_previousResult.containerHeight;let nextPosition;let animationConfig;let animationSource=ANIMATION_SOURCE.SNAP_POINT_CHANGE;if(animatedAnimationState.value===ANIMATION_STATE.RUNNING&&animatedNextPositionIndex.value===-1&&_previousContainerHeight!==containerHeight){animationSource=ANIMATION_SOURCE.CONTAINER_RESIZE;animationConfig={duration:0};animateToPosition(containerHeight,animationSource,0,animationConfig);}if(JSON.stringify(snapPoints)===JSON.stringify(_previousSnapPoints)||!isLayoutCalculated.value||!isAnimatedOnMount.value||containerHeight<=0){return;}runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnSnapPointChange',params:{snapPoints:snapPoints}});if(animatedAnimationState.value===ANIMATION_STATE.RUNNING&&animatedNextPositionIndex.value!==animatedCurrentIndex.value){nextPosition=animatedNextPositionIndex.value!==-1?snapPoints[animatedNextPositionIndex.value]:animatedNextPosition.value;}else if(animatedCurrentIndex.value===-1){nextPosition=animatedClosedPosition.value;}else if(isInTemporaryPosition.value){nextPosition=getNextPosition();}else{nextPosition=snapPoints[animatedCurrentIndex.value];if(containerHeight!==_previousContainerHeight){animationSource=ANIMATION_SOURCE.CONTAINER_RESIZE;animationConfig={duration:0};}}animateToPosition(nextPosition,animationSource,0,animationConfig);}"},nn={code:"function gorhom_BottomSheetJs22(){const{animatedKeyboardState,animatedKeyboardHeight}=this.__closure;return{_keyboardState:animatedKeyboardState.value,_keyboardHeight:animatedKeyboardHeight.value};}"},rn={code:"function gorhom_BottomSheetJs23(result,_previousResult){const{animatedKeyboardHeightInContainer,$modal,bottomInset,animatedContainerOffset,animatedContentGestureState,State,animatedHandleGestureState,isAnimatedOnMount,KEYBOARD_STATE,keyboardBlurBehavior,KEYBOARD_BLUR_BEHAVIOR,Platform,keyboardBehavior,KEYBOARD_BEHAVIOR,android_keyboardInputMode,KEYBOARD_INPUT_MODE,runOnJS,print,BottomSheet,getKeyboardAnimationConfigs,keyboardAnimationEasing,keyboardAnimationDuration,getNextPosition,animateToPosition,ANIMATION_SOURCE}=this.__closure;const{_keyboardState:_keyboardState,_keyboardHeight:_keyboardHeight}=result;const _previousKeyboardState=_previousResult===null||_previousResult===void 0?void 0:_previousResult._keyboardState;const _previousKeyboardHeight=_previousResult===null||_previousResult===void 0?void 0:_previousResult._keyboardHeight;animatedKeyboardHeightInContainer.value=$modal?Math.abs(_keyboardHeight-Math.abs(bottomInset-animatedContainerOffset.value.bottom)):Math.abs(_keyboardHeight-animatedContainerOffset.value.bottom);const hasActiveGesture=animatedContentGestureState.value===State.ACTIVE||animatedContentGestureState.value===State.BEGAN||animatedHandleGestureState.value===State.ACTIVE||animatedHandleGestureState.value===State.BEGAN;if(_keyboardState===_previousKeyboardState&&_keyboardHeight===_previousKeyboardHeight||hasActiveGesture||!isAnimatedOnMount.value||_keyboardState===KEYBOARD_STATE.HIDDEN&&keyboardBlurBehavior===KEYBOARD_BLUR_BEHAVIOR.none||Platform.OS==='android'&&keyboardBehavior===KEYBOARD_BEHAVIOR.interactive&&android_keyboardInputMode===KEYBOARD_INPUT_MODE.adjustResize){animatedKeyboardHeightInContainer.value=0;return;}runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnKeyboardStateChange',params:{keyboardState:_keyboardState,keyboardHeight:_keyboardHeight}});let animationConfigs=getKeyboardAnimationConfigs(keyboardAnimationEasing.value,keyboardAnimationDuration.value);const nextPosition=getNextPosition();animateToPosition(nextPosition,ANIMATION_SOURCE.KEYBOARD,0,animationConfigs);}"},an={code:"function gorhom_BottomSheetJs24(){const{animatedPosition}=this.__closure;return animatedPosition.value;}"},on={code:"function gorhom_BottomSheetJs25(_animatedPosition){const{_providedAnimatedPosition,topInset}=this.__closure;if(_providedAnimatedPosition){_providedAnimatedPosition.value=_animatedPosition+topInset;}}"},sn={code:"function gorhom_BottomSheetJs26(){const{animatedIndex}=this.__closure;return animatedIndex.value;}"},ln={code:"function gorhom_BottomSheetJs27(_animatedIndex){const{_providedAnimatedIndex}=this.__closure;if(_providedAnimatedIndex){_providedAnimatedIndex.value=_animatedIndex;}}"},un={code:"function gorhom_BottomSheetJs28(){const{animatedIndex,animatedPosition,animatedAnimationState,animatedContentGestureState,animatedHandleGestureState}=this.__closure;return{_animatedIndex:animatedIndex.value,_animatedPosition:animatedPosition.value,_animationState:animatedAnimationState.value,_contentGestureState:animatedContentGestureState.value,_handleGestureState:animatedHandleGestureState.value};}"},cn={code:"function gorhom_BottomSheetJs29({_animatedIndex:_animatedIndex,_animationState:_animationState,_contentGestureState:_contentGestureState,_handleGestureState:_handleGestureState}){const{ANIMATION_STATE,State,animatedCurrentIndex,runOnJS,print,BottomSheet,handleOnChange,_providedOnClose}=this.__closure;if(_animationState!==ANIMATION_STATE.STOPPED){return;}if(_animatedIndex%1!==0){return;}const hasNoActiveGesture=(_contentGestureState===State.END||_contentGestureState===State.UNDETERMINED||_contentGestureState===State.CANCELLED)&&(_handleGestureState===State.END||_handleGestureState===State.UNDETERMINED||_handleGestureState===State.CANCELLED);if(!hasNoActiveGesture){return;}if(_animatedIndex!==animatedCurrentIndex.value){runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::OnChange',params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedIndex:_animatedIndex}});animatedCurrentIndex.value=_animatedIndex;runOnJS(handleOnChange)(_animatedIndex);}if(_animatedIndex===-1&&_providedOnClose){runOnJS(print)({component:BottomSheet.name,method:'useAnimatedReaction::onClose',params:{animatedCurrentIndex:animatedCurrentIndex.value,animatedIndex:_animatedIndex}});runOnJS(_providedOnClose)();}}"},dn=(0,r.forwardRef)((function e(t,n){(({index:e,snapPoints:t,enableDynamicSizing:n,topInset:a,bottomInset:i})=>{(0,r.useMemo)((()=>{const r=t?"value"in t?t.value:t:[];o()(r||n,"'snapPoints' was not provided! please provide at least one snap point."),r.map((e=>{const t="number"===typeof e?e:parseInt(e.replace("%",""),10);o()(t>0||t===$e,`Snap point '${e}' is invalid. if you want to allow user to close the sheet, Please use 'enablePanDownToClose' prop.`)})),o()("value"in r||r.length>0||n,"'snapPoints' was provided with no points! please provide at least one snap point."),o()("number"===typeof e||"undefined"===typeof e,"'index' was provided but with wrong type ! expected type is a number."),o()(n||"number"!==typeof e||e>=-1&&e<=r.length-1,"'index' was provided but out of the provided snap points range! expected value to be between -1, "+(r.length-1)),o()("number"===typeof a||"undefined"===typeof a,"'topInset' was provided but with wrong type ! expected type is a number."),o()("number"===typeof i||"undefined"===typeof i,"'bottomInset' was provided but with wrong type ! expected type is a number.")}),[e,t,a,i,n])})(t);const{animationConfigs:i,index:u=0,snapPoints:d,animateOnMount:h=Ve,enableContentPanningGesture:p=Le,enableHandlePanningGesture:m=Ne,enableOverDrag:g=Be,enablePanDownToClose:y=je,enableDynamicSizing:_=ze,overDragResistanceFactor:b=Re,style:v,containerStyle:w,backgroundStyle:k,handleStyle:x,handleIndicatorStyle:A,gestureEventsHandlersHook:S,keyboardBehavior:E=He,keyboardBlurBehavior:C=Ue,android_keyboardInputMode:M=We,handleHeight:L,containerHeight:N,contentHeight:B,containerOffset:j,topInset:V=0,bottomInset:W=0,maxDynamicContentSize:q,animatedPosition:$,animatedIndex:Y,simultaneousHandlers:G,waitFor:X,activeOffsetX:K,activeOffsetY:J,failOffsetX:Q,failOffsetY:te,onChange:re,onClose:ie,onAnimate:oe,$modal:se=!1,detached:le=!1,handleComponent:ue,backdropComponent:ce,backgroundComponent:de,footerComponent:he,children:fe,accessible:pe=Je,accessibilityLabel:me=Ze,accessibilityRole:ge=Qe}=t,ye=(0,r.useMemo)((()=>{if(i)return s.ReduceMotion&&(i.reduceMotion=s.ReduceMotion.Never),i}),[i]),_e=tt(null!==N&&void 0!==N?N:Ye),ve=(0,s.useDerivedValue)(function(){const e=function(){const e=V+W;return se?_e.value-e:_e.value};return e.__closure={topInset:V,bottomInset:W,$modal:se,_animatedContainerHeight:_e},e.__workletHash=2988404258748,e.__initData=Rt,e}(),[se,V,W]),we=tt(null!==j&&void 0!==j?j:Ge),Fe=tt(null!==L&&void 0!==L?L:Xe),ke=(0,s.useSharedValue)(0),xe=(0,s.useSharedValue)(Ye),Ae=((e,t,n,r,a,i)=>{const o=(0,s.useDerivedValue)(function(){const o=function(){if(t.value===Ye)return[$e];let o=(e?"value"in e?e.value:e:[]).map((e=>Z(e,t.value)));if(a){if(r.value===Xe)return[$e];if(n.value===Ye)return[$e];o.push(t.value-Math.min(n.value+r.value,void 0!==i?i:t.value)),o=o.sort(((e,t)=>t-e))}return o};return o.__closure={containerHeight:t,INITIAL_CONTAINER_HEIGHT:Ye,INITIAL_SNAP_POINT:$e,snapPoints:e,normalizeSnapPoint:Z,enableDynamicSizing:a,handleHeight:r,INITIAL_HANDLE_HEIGHT:Xe,contentHeight:n,maxDynamicContentSize:i},o.__workletHash=0xc4c7c67545f,o.__initData=et,o}(),[e,a,i]);return o})(d,ve,xe,Fe,_,q),Se=(0,s.useDerivedValue)(function(){const e=()=>Ae.value[Ae.value.length-1];return e.__closure={animatedSnapPoints:Ae},e.__workletHash=738809220271,e.__initData=Lt,e}()),Ee=(0,s.useDerivedValue)(function(){const e=function(){let e=ve.value;return(se||le)&&(e=ve.value+W),e};return e.__closure={animatedContainerHeight:ve,$modal:se,detached:le,bottomInset:W},e.__workletHash=0xe18adadac14,e.__initData=Nt,e}(),[se,le,W]),Ce=(0,s.useDerivedValue)(function(){const e=()=>ve.value-Se.value;return e.__closure={animatedContainerHeight:ve,animatedHighestSnapPoint:Se},e.__workletHash=0xb7e2bae95ac,e.__initData=Bt,e}()),Me=tt(h?-1:u),nt=(0,s.useSharedValue)(Ke),rt=(0,s.useSharedValue)(qe),at=(0,s.useSharedValue)(0),it=(0,s.useSharedValue)(!1),ot=(0,s.useSharedValue)(!1),st=(0,s.useDerivedValue)(function(){const e=function(){let e=!1;null===N&&void 0===N||(e=!0),ve.value!==Ye&&(e=!0);let t=!1;null!==L&&void 0!==L&&"number"===typeof L&&(t=!0),null===ue&&(Fe.value=0,t=!0),Fe.value!==Xe&&(t=!0);let n=!1;return Ae.value[0]!==$e&&(n=!0),e&&t&&n};return e.__closure={_providedContainerHeight:N,animatedContainerHeight:ve,INITIAL_CONTAINER_HEIGHT:Ye,_providedHandleHeight:L,handleComponent:ue,animatedHandleHeight:Fe,INITIAL_HANDLE_HEIGHT:Xe,animatedSnapPoints:Ae,INITIAL_SNAP_POINT:$e},e.__workletHash=0xba835fb631f,e.__initData=jt,e}()),lt=(0,s.useSharedValue)(!1),ut=(0,s.useSharedValue)(!1),ht=(0,s.useSharedValue)(l.State.UNDETERMINED),ft=(0,s.useSharedValue)(l.State.UNDETERMINED),{animatedScrollableType:mt,animatedScrollableContentOffsetY:gt,animatedScrollableOverrideState:yt,isScrollableRefreshable:_t,setScrollableRef:vt,removeScrollableRef:wt}=(()=>{const e=(0,r.useRef)(null),t=(0,r.useRef)(null),n=(0,s.useSharedValue)(I.UNDETERMINED),a=(0,s.useSharedValue)(0),i=(0,s.useSharedValue)(D.UNDETERMINED),o=(0,s.useSharedValue)(!1),l=(0,r.useCallback)((n=>{var r,a;(null!==(r=null===(a=e.current)||void 0===a?void 0:a.id)&&void 0!==r?r:null)!==n.id&&(e.current&&(t.current=e.current),e.current=n)}),[]),u=(0,r.useCallback)((n=>{var r,a;let i;try{i=(0,F.default)(n.current)}catch{return}i===(null!==(r=null===(a=e.current)||void 0===a?void 0:a.id)&&void 0!==r?r:null)&&(e.current=t.current)}),[]);return{scrollableRef:e,animatedScrollableType:n,animatedScrollableContentOffsetY:a,animatedScrollableOverrideState:i,isScrollableRefreshable:o,setScrollableRef:l,removeScrollableRef:u}})(),{state:Ft,height:kt,animationDuration:xt,animationEasing:St,shouldHandleKeyboardEvents:Et}=(()=>{const e=(0,s.useSharedValue)(!1),t=(0,s.useSharedValue)(R.UNDETERMINED),n=(0,s.useSharedValue)(0),a=(0,s.useSharedValue)("keyboard"),i=(0,s.useSharedValue)(500),o=(0,s.useSharedValue)([]),l=(0,s.useWorkletCallback)(function(){const r=function(r,s,l,u){r!==R.SHOWN||e.value?(n.value=r===R.SHOWN?s:0===s?n.value:s,i.value=l,a.value=u,t.value=r,o.value=[]):o.value=[r,s,l,u]};return r.__closure={KEYBOARD_STATE:R,shouldHandleKeyboardEvents:e,temporaryCachedKeyboardEvent:o,keyboardHeight:n,keyboardAnimationDuration:i,keyboardAnimationEasing:a,keyboardState:t},r.__workletHash=5520565908230,r.__initData=Ie,r}(),[]);return(0,r.useEffect)((()=>{const e=be.default.addListener(Te,(e=>{(0,s.runOnUI)(l)(R.SHOWN,e.endCoordinates.height,e.duration,e.easing)})),t=be.default.addListener(De,(e=>{(0,s.runOnUI)(l)(R.HIDDEN,e.endCoordinates.height,e.duration,e.easing)}));return()=>{e.remove(),t.remove()}}),[l]),(0,s.useAnimatedReaction)(function(){const t=()=>e.value;return t.__closure={shouldHandleKeyboardEvents:e},t.__workletHash=2952635767360,t.__initData=Oe,t}(),function(){const e=function(e){const t=o.value;e&&t.length>0&&l(t[0],t[1],t[2],t[3])};return e.__closure={temporaryCachedKeyboardEvent:o,handleKeyboardEvent:l},e.__workletHash=0xed7805319d,e.__initData=Pe,e}()),{state:t,height:n,animationEasing:a,animationDuration:i,shouldHandleKeyboardEvents:e}})(),Tt=(0,s.useSharedValue)(0),Dt=(0,s.useSharedValue)(O.UNDETERMINED),It=(0,s.useSharedValue)(P.MOUNT),Ot=(0,s.useDerivedValue)(function(){const e=function(){if(nt.value>=Ee.value)return T.CLOSED;const e=ve.value-Ce.value;if(nt.value===e)return T.EXTENDED;const t=Tt.value,n=Math.max(0,ve.value-(Ce.value+t));return E===z.interactive&<.value&&nt.value===n?T.EXTENDED:0===nt.value?T.FILL_PARENT:nt.valueve.value&&(n=ve.value-e-t):n=r+t>ve.value?ve.value-t:r}return Math.max(n,0)};return e.__closure={animatedKeyboardHeightInContainer:Tt,animatedHandleHeight:Fe,animatedSheetHeight:Ce,keyboardBehavior:E,KEYBOARD_BEHAVIOR:z,animatedKeyboardState:Ft,KEYBOARD_STATE:R,isInTemporaryPosition:lt,animatedContainerHeight:ve},e.__workletHash=0xf63e448e2ab,e.__initData=Ht,e}(),[ve,Fe,Tt,Ft,Ce,lt,E]),fn=(0,s.useDerivedValue)(function(){const e=function(){const e=Ae.value.slice().reverse(),t=Ae.value.slice().map(((e,t)=>t)).reverse();e.push(ve.value),t.push(-1);const n=st.value?(0,s.interpolate)(nt.value,e,t,s.Extrapolate.CLAMP):-1;return M===U.adjustResize&&It.value===P.KEYBOARD&&Dt.value===O.RUNNING&<.value?Math.max(Me.value,n):It.value===P.SNAP_POINT_CHANGE&&Dt.value===O.RUNNING?at.value:n};return e.__closure={animatedSnapPoints:Ae,animatedContainerHeight:ve,isLayoutCalculated:st,interpolate:s.interpolate,animatedPosition:nt,Extrapolate:s.Extrapolate,android_keyboardInputMode:M,KEYBOARD_INPUT_MODE:U,animatedAnimationSource:It,ANIMATION_SOURCE:P,animatedAnimationState:Dt,ANIMATION_STATE:O,isInTemporaryPosition:lt,animatedCurrentIndex:Me,animatedNextPositionIndex:at},e.__workletHash=6803444235937,e.__initData=Ut,e}(),[M]),pn=(0,s.useWorkletCallback)(function(){const e=function(){const e=Me.value,t=Ae.value,n=Ft.value,r=Se.value;if(C===H.restore&&n===R.HIDDEN&&ht.value!==l.State.ACTIVE&&ft.value!==l.State.ACTIVE){lt.value=!1;return t[e]}if(E===z.extend&&n===R.SHOWN)return r;if(E===z.fillParent&&n===R.SHOWN)return lt.value=!0,0;if(E===z.interactive&&n===R.SHOWN){lt.value=!0;const e=Tt.value;return Math.max(0,r-e)}return lt.value?nt.value:t[e]};return e.__closure={animatedCurrentIndex:Me,animatedSnapPoints:Ae,animatedKeyboardState:Ft,animatedHighestSnapPoint:Se,keyboardBlurBehavior:C,KEYBOARD_BLUR_BEHAVIOR:H,KEYBOARD_STATE:R,animatedContentGestureState:ht,State:l.State,animatedHandleGestureState:ft,isInTemporaryPosition:lt,keyboardBehavior:E,KEYBOARD_BEHAVIOR:z,animatedKeyboardHeightInContainer:Tt,animatedPosition:nt},e.__workletHash=706160996298,e.__initData=Wt,e}(),[ht,Me,ft,Se,Tt,Ft,nt,Ae,lt,E,C]),mn=(0,r.useCallback)((function(e){Me.value,re&&re(e)}),[re,Me]),gn=(0,r.useCallback)((function(e){const t=Ae.value.indexOf(e);Me.value,oe&&t!==Me.value&&oe(Me.value,t)}),[oe,Ae,Me]),yn=(0,s.useWorkletCallback)(function(){const e=function(){(0,s.cancelAnimation)(nt),ut.value=!1,It.value=P.NONE,Dt.value=O.STOPPED};return e.__closure={cancelAnimation:s.cancelAnimation,animatedPosition:nt,isForcedClosing:ut,animatedAnimationSource:It,ANIMATION_SOURCE:P,animatedAnimationState:Dt,ANIMATION_STATE:O},e.__workletHash=6644788232271,e.__initData=qt,e}(),[nt,Dt,It]),_n=(0,s.useWorkletCallback)(function(){const t=function(n){ut.value=!1,n&&((0,s.runOnJS)(ae)({component:e.name,method:t.name,params:{animatedCurrentIndex:Me.value,animatedNextPosition:rt.value,animatedNextPositionIndex:at.value}}),It.value=P.NONE,Dt.value=O.STOPPED,rt.value=qe,at.value=qe)};return t.__closure={isForcedClosing:ut,runOnJS:s.runOnJS,print:ae,BottomSheet:e,animatedCurrentIndex:Me,animatedNextPosition:rt,animatedNextPositionIndex:at,animatedAnimationSource:It,ANIMATION_SOURCE:P,animatedAnimationState:Dt,ANIMATION_STATE:O,INITIAL_VALUE:qe},t.__workletHash=0xcd06600497e,t.__initData=$t,t}()),bn=(0,s.useWorkletCallback)(function(){const t=function(n,r,a=0,i){n===nt.value||void 0===n||Dt.value===O.RUNNING&&n===rt.value||((0,s.runOnJS)(ae)({component:e.name,method:t.name,params:{currentPosition:nt.value,position:n,velocity:a,animatedContainerHeight:ve.value}}),yn(),Dt.value=O.RUNNING,It.value=r,rt.value=n,at.value=Ae.value.indexOf(n),(0,s.runOnJS)(gn)(n),void 0!==i?(s.ReduceMotion&&(i.reduceMotion=s.ReduceMotion.Never),nt.value=ee({point:n,configs:i,velocity:a,onComplete:_n})):nt.value=ee({point:n,velocity:a,configs:ye,onComplete:_n}))};return t.__closure={animatedPosition:nt,animatedAnimationState:Dt,ANIMATION_STATE:O,animatedNextPosition:rt,runOnJS:s.runOnJS,print:ae,BottomSheet:e,animatedContainerHeight:ve,stopAnimation:yn,animatedAnimationSource:It,animatedNextPositionIndex:at,animatedSnapPoints:Ae,handleOnAnimate:gn,ReduceMotion:s.ReduceMotion,animate:ee,animateToPositionCompleted:_n,_providedAnimationConfigs:ye},t.__workletHash=0xf09017ef8ff,t.__initData=Yt,t}(),[gn,ye]),vn=(0,r.useCallback)((function(e,t){const n=Ae.value;o()(e>=-1&&e<=n.length-1,"'index' was provided but out of the provided snap points range! expected value to be between -1, "+(n.length-1));const r=n[e];st.value&&e!==at.value&&r!==rt.value&&!ut.value&&(lt.value=!1,(0,s.runOnUI)(bn)(r,P.USER,0,t))}),[bn,st,lt,ut,Ae,rt,at]),wn=(0,s.useWorkletCallback)(function(){const t=function(e,n){t.name;const r=Z(e,ve.value);st&&r!==rt.value&&!ut.value&&(lt.value=!0,(0,s.runOnUI)(bn)(r,P.USER,0,n))};return t.__closure={print:ae,BottomSheet:e,normalizeSnapPoint:Z,animatedContainerHeight:ve,isLayoutCalculated:st,animatedNextPosition:rt,isForcedClosing:ut,isInTemporaryPosition:lt,runOnUI:s.runOnUI,animateToPosition:bn,ANIMATION_SOURCE:P},t.__workletHash=467332967670,t.__initData=Gt,t}(),[bn,W,V,st,ut,ve,nt]),Fn=(0,r.useCallback)((function(e){const t=Ee.value;st.value&&t!==rt.value&&!ut.value&&(lt.value=!1,(0,s.runOnUI)(bn)(t,P.USER,0,e))}),[bn,ut,st,lt,rt,Ee]),kn=(0,r.useCallback)((function(e){const t=Ee.value;t===rt.value||ut.value||(lt.value=!1,ut.value=!0,(0,s.runOnUI)(bn)(t,P.USER,0,e))}),[bn,ut,lt,rt,Ee]),xn=(0,r.useCallback)((function(e){const t=Ae.value,n=t[t.length-1];st.value&&t.length-1!==at.value&&n!==rt.value&&!ut.value&&(lt.value=!1,(0,s.runOnUI)(bn)(n,P.USER,0,e))}),[bn,lt,st,ut,Ae,rt,at]),An=(0,r.useCallback)((function(e){const t=Ae.value[0];st&&0!==at.value&&t!==rt.value&&!ut.value&&(lt.value=!1,(0,s.runOnUI)(bn)(t,P.USER,0,e))}),[bn,ut,st,lt,Ae,rt,at]);(0,r.useImperativeHandle)(n,(()=>({snapToIndex:vn,snapToPosition:wn,expand:xn,collapse:An,close:Fn,forceClose:kn})));const Sn=(0,r.useMemo)((()=>({enableContentPanningGesture:p,enableDynamicSizing:_,overDragResistanceFactor:b,enableOverDrag:g,enablePanDownToClose:y,animatedAnimationState:Dt,animatedSheetState:Ot,animatedScrollableState:dn,animatedScrollableOverrideState:yt,animatedContentGestureState:ht,animatedHandleGestureState:ft,animatedKeyboardState:Ft,animatedScrollableType:mt,animatedIndex:fn,animatedPosition:nt,animatedContentHeight:xe,animatedClosedPosition:Ee,animatedHandleHeight:Fe,animatedFooterHeight:ke,animatedKeyboardHeight:kt,animatedKeyboardHeightInContainer:Tt,animatedContainerHeight:ve,animatedSnapPoints:Ae,animatedHighestSnapPoint:Se,animatedScrollableContentOffsetY:gt,isInTemporaryPosition:lt,isContentHeightFixed:ot,isScrollableRefreshable:_t,shouldHandleKeyboardEvents:Et,simultaneousHandlers:G,waitFor:X,activeOffsetX:K,activeOffsetY:J,failOffsetX:Q,failOffsetY:te,animateToPosition:bn,stopAnimation:yn,setScrollableRef:vt,removeScrollableRef:wt})),[fn,nt,xe,mt,ht,ft,Ee,ke,ve,Fe,Dt,Ft,kt,Tt,Ot,Se,dn,yt,Ae,Et,gt,_t,ot,lt,p,b,g,y,_,G,X,K,J,Q,te,vt,wt,bn,yn]),En=(0,r.useMemo)((()=>({animatedIndex:fn,animatedPosition:nt,snapToIndex:vn,snapToPosition:wn,expand:xn,collapse:An,close:Fn,forceClose:kn})),[fn,nt,vn,wn,xn,An,Fn,kn]),Cn=(0,s.useAnimatedStyle)(function(){const e=()=>({opacity:1,transform:[{translateY:nt.value}]});return e.__closure={Platform:a.default,animatedIndex:fn,animatedPosition:nt},e.__workletHash=2850625936214,e.__initData=Xt,e}(),[nt,fn]),Tn=(0,r.useMemo)((()=>[v,Mt.container,Cn]),[v,Cn]),Dn=(0,s.useAnimatedStyle)(function(){const e=function(){return B?{}:{height:ee({point:hn.value,configs:ye})}};return e.__closure={_providedContentHeight:B,animate:ee,animatedContentHeightMax:hn,_providedAnimationConfigs:ye},e.__workletHash=3769420996885,e.__initData=Kt,e}(),[hn,_,xe]),In=(0,r.useMemo)((()=>[Mt.contentContainer,Dn]),[Dn]),On=(0,s.useAnimatedStyle)(function(){const e=function(){return le?{overflow:"visible"}:{paddingBottom:ve.value}};return e.__closure={detached:le,animatedContainerHeight:ve},e.__workletHash=0x93282753c43,e.__initData=Jt,e}(),[le]),Pn=(0,r.useMemo)((()=>[Mt.contentMaskContainer,On]),[On]);return(0,s.useAnimatedReaction)(function(){const e=()=>st.value;return e.__closure={isLayoutCalculated:st},e.__workletHash=0xa496b694d95,e.__initData=Zt,e}(),function(){const t=function(t){if(!t||it.value)return;let n;if(-1===u?(n=Ee.value,at.value=-1):n=Ae.value[u],(0,s.runOnJS)(ae)({component:e.name,method:"useAnimatedReaction::OnMount",params:{isLayoutCalculated:t,animatedSnapPoints:Ae.value,nextPosition:n}}),n===Ke||n===Ee.value)return it.value=!0,void(Me.value=u);h?bn(n,P.MOUNT):nt.value=n,it.value=!0};return t.__closure={isAnimatedOnMount:it,_providedIndex:u,animatedClosedPosition:Ee,animatedNextPositionIndex:at,animatedSnapPoints:Ae,runOnJS:s.runOnJS,print:ae,BottomSheet:e,INITIAL_POSITION:Ke,animatedCurrentIndex:Me,animateOnMount:h,animateToPosition:bn,ANIMATION_SOURCE:P,animatedPosition:nt},t.__workletHash=0xdfcc133e0d1,t.__initData=Qt,t}(),[u,h]),(0,s.useAnimatedReaction)(function(){const e=()=>({snapPoints:Ae.value,containerHeight:ve.value});return e.__closure={animatedSnapPoints:Ae,animatedContainerHeight:ve},e.__workletHash=2850195705462,e.__initData=en,e}(),function(){const t=function(t,n){const{snapPoints:r,containerHeight:a}=t,i=null===n||void 0===n?void 0:n.snapPoints,o=null===n||void 0===n?void 0:n.containerHeight;let l,u,c=P.SNAP_POINT_CHANGE;Dt.value===O.RUNNING&&-1===at.value&&o!==a&&(c=P.CONTAINER_RESIZE,u={duration:0},bn(a,c,0,u)),JSON.stringify(r)===JSON.stringify(i)||!st.value||!it.value||a<=0||((0,s.runOnJS)(ae)({component:e.name,method:"useAnimatedReaction::OnSnapPointChange",params:{snapPoints:r}}),Dt.value===O.RUNNING&&at.value!==Me.value?l=-1!==at.value?r[at.value]:rt.value:-1===Me.value?l=Ee.value:lt.value?l=pn():(l=r[Me.value],a!==o&&(c=P.CONTAINER_RESIZE,u={duration:0})),bn(l,c,0,u))};return t.__closure={ANIMATION_SOURCE:P,animatedAnimationState:Dt,ANIMATION_STATE:O,animatedNextPositionIndex:at,animateToPosition:bn,isLayoutCalculated:st,isAnimatedOnMount:it,runOnJS:s.runOnJS,print:ae,BottomSheet:e,animatedCurrentIndex:Me,animatedNextPosition:rt,animatedClosedPosition:Ee,isInTemporaryPosition:lt,getNextPosition:pn},t.__workletHash=0xab06555b9d5,t.__initData=tn,t}()),(0,s.useAnimatedReaction)(function(){const e=()=>({_keyboardState:Ft.value,_keyboardHeight:kt.value});return e.__closure={animatedKeyboardState:Ft,animatedKeyboardHeight:kt},e.__workletHash=1589260117463,e.__initData=nn,e}(),function(){const t=function(t,n){const{_keyboardState:r,_keyboardHeight:a}=t,i=null===n||void 0===n?void 0:n._keyboardState,o=null===n||void 0===n?void 0:n._keyboardHeight;Tt.value=se?Math.abs(a-Math.abs(W-we.value.bottom)):Math.abs(a-we.value.bottom);const u=ht.value===l.State.ACTIVE||ht.value===l.State.BEGAN||ft.value===l.State.ACTIVE||ft.value===l.State.BEGAN;if(r===i&&a===o||u||!it.value||r===R.HIDDEN&&C===H.none)return void(Tt.value=0);(0,s.runOnJS)(ae)({component:e.name,method:"useAnimatedReaction::OnKeyboardStateChange",params:{keyboardState:r,keyboardHeight:a}});let c=ne(St.value,xt.value);const d=pn();bn(d,P.KEYBOARD,0,c)};return t.__closure={animatedKeyboardHeightInContainer:Tt,$modal:se,bottomInset:W,animatedContainerOffset:we,animatedContentGestureState:ht,State:l.State,animatedHandleGestureState:ft,isAnimatedOnMount:it,KEYBOARD_STATE:R,keyboardBlurBehavior:C,KEYBOARD_BLUR_BEHAVIOR:H,Platform:a.default,keyboardBehavior:E,KEYBOARD_BEHAVIOR:z,android_keyboardInputMode:M,KEYBOARD_INPUT_MODE:U,runOnJS:s.runOnJS,print:ae,BottomSheet:e,getKeyboardAnimationConfigs:ne,keyboardAnimationEasing:St,keyboardAnimationDuration:xt,getNextPosition:pn,animateToPosition:bn,ANIMATION_SOURCE:P},t.__workletHash=6397309229225,t.__initData=rn,t}(),[se,W,E,C,M,we,pn]),(0,s.useAnimatedReaction)(function(){const e=()=>nt.value;return e.__closure={animatedPosition:nt},e.__workletHash=0xecae9c203ba,e.__initData=an,e}(),function(){const e=function(e){$&&($.value=e+V)};return e.__closure={_providedAnimatedPosition:$,topInset:V},e.__workletHash=7739181344429,e.__initData=on,e}()),(0,s.useAnimatedReaction)(function(){const e=()=>fn.value;return e.__closure={animatedIndex:fn},e.__workletHash=9484862494360,e.__initData=sn,e}(),function(){const e=function(e){Y&&(Y.value=e)};return e.__closure={_providedAnimatedIndex:Y},e.__workletHash=0xc10c31a7eaf,e.__initData=ln,e}()),(0,s.useAnimatedReaction)(function(){const e=()=>({_animatedIndex:fn.value,_animatedPosition:nt.value,_animationState:Dt.value,_contentGestureState:ht.value,_handleGestureState:ft.value});return e.__closure={animatedIndex:fn,animatedPosition:nt,animatedAnimationState:Dt,animatedContentGestureState:ht,animatedHandleGestureState:ft},e.__workletHash=1508334927280,e.__initData=un,e}(),function(){const t=function({_animatedIndex:t,_animationState:n,_contentGestureState:r,_handleGestureState:a}){if(n!==O.STOPPED)return;if(t%1!==0)return;(r===l.State.END||r===l.State.UNDETERMINED||r===l.State.CANCELLED)&&(a===l.State.END||a===l.State.UNDETERMINED||a===l.State.CANCELLED)&&(t!==Me.value&&((0,s.runOnJS)(ae)({component:e.name,method:"useAnimatedReaction::OnChange",params:{animatedCurrentIndex:Me.value,animatedIndex:t}}),Me.value=t,(0,s.runOnJS)(mn)(t)),-1===t&&ie&&((0,s.runOnJS)(ae)({component:e.name,method:"useAnimatedReaction::onClose",params:{animatedCurrentIndex:Me.value,animatedIndex:t}}),(0,s.runOnJS)(ie)()))};return t.__closure={ANIMATION_STATE:O,State:l.State,animatedCurrentIndex:Me,runOnJS:s.runOnJS,print:ae,BottomSheet:e,handleOnChange:mn,_providedOnClose:ie},t.__workletHash=8263599603272,t.__initData=cn,t}(),[mn,ie]),(0,r.useEffect)((()=>{it.value&&vn(u)}),[u,Me,it,vn]),Ae.value,Me.value,r.createElement(c,{value:En},r.createElement(f,{value:Sn},r.createElement(dt,{gestureEventsHandlersHook:S},r.createElement(pt,{key:"BottomSheetBackdropContainer",animatedIndex:fn,animatedPosition:nt,backdropComponent:ce}),r.createElement(ct,{key:"BottomSheetContainer",shouldCalculateHeight:!se,containerHeight:_e,containerOffset:we,topInset:V,bottomInset:W,detached:le,style:w},r.createElement(s.default.View,{style:Tn},r.createElement(At,{key:"BottomSheetBackgroundContainer",animatedIndex:fn,animatedPosition:nt,backgroundComponent:de,backgroundStyle:k}),r.createElement(s.default.View,{pointerEvents:"box-none",style:Pn,accessible:null!==pe&&void 0!==pe?pe:void 0,accessibilityRole:null!==ge&&void 0!==ge?ge:void 0,accessibilityLabel:null!==me&&void 0!==me?me:void 0},r.createElement(Pt,{key:"BottomSheetRootDraggableView",style:In},"function"===typeof fe?r.createElement(fe,null):fe,he&&r.createElement(Ct,{footerComponent:he}))),r.createElement(bt,{key:"BottomSheetHandleContainer",animatedIndex:fn,animatedPosition:nt,handleHeight:Fe,enableHandlePanningGesture:m,enableOverDrag:g,enablePanDownToClose:y,overDragResistanceFactor:b,keyboardBehavior:E,handleComponent:ue,handleStyle:x,handleIndicatorStyle:A}))))))})),hn=(0,r.memo)(dn);hn.displayName="BottomSheet";const fn=hn;var pn,mn=n(21788);!function(e){e[e.REGISTER_HOST=0]="REGISTER_HOST",e[e.DEREGISTER_HOST=1]="DEREGISTER_HOST",e[e.ADD_UPDATE_PORTAL=2]="ADD_UPDATE_PORTAL",e[e.REMOVE_PORTAL=3]="REMOVE_PORTAL"}(pn||(pn={}));const gn={},yn=(0,r.createContext)(null),_n=(0,r.createContext)(null),bn=(e="root")=>{const t=(0,r.useContext)(_n);if(null===t)throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");const n=(0,r.useCallback)((()=>{t({type:pn.REGISTER_HOST,hostName:e})}),[]),a=(0,r.useCallback)((()=>{t({type:pn.DEREGISTER_HOST,hostName:e})}),[]),i=(0,r.useCallback)(((n,r)=>{t({type:pn.ADD_UPDATE_PORTAL,hostName:e,portalName:n,node:r})}),[]);return{registerHost:n,deregisterHost:a,addPortal:i,updatePortal:i,removePortal:(0,r.useCallback)((n=>{t({type:pn.REMOVE_PORTAL,hostName:e,portalName:n})}),[])}},vn=(0,r.memo)((({name:e,hostName:t,handleOnMount:n,handleOnUnmount:a,handleOnUpdate:i,children:o})=>{const{addPortal:s,removePortal:l}=bn(t),u=(0,r.useMemo)((()=>e||(0,mn.nanoid)()),[e]),c=(0,r.useRef)(),d=(0,r.useRef)(),h=(0,r.useRef)(),f=(0,r.useCallback)((()=>{n?n((()=>s(u,o))):s(u,o)}),[n,s]);c.current=f;const p=(0,r.useCallback)((()=>{a?a((()=>l(u))):l(u)}),[a,l]);d.current=p;const m=(0,r.useCallback)((()=>{i?i((()=>s(u,o))):s(u,o)}),[i,s,o]);return h.current=m,(0,r.useEffect)((()=>{var e;return null===(e=c.current)||void 0===e||e.call(c),()=>{var e;null===(e=d.current)||void 0===e||e.call(d),c.current=void 0,d.current=void 0,h.current=void 0}}),[]),(0,r.useEffect)((()=>{var e;null===(e=h.current)||void 0===e||e.call(h)}),[o]),null}));vn.displayName="Portal";const wn=(0,r.memo)((({name:e})=>{const t=(e=>{const t=(0,r.useContext)(yn);if(null===t)throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");return t[e]||[]})(e),{registerHost:n,deregisterHost:a}=bn(e);return(0,r.useEffect)((()=>(n(),()=>{a()})),[]),r.createElement(r.Fragment,null,t.map((e=>e.node)))}));wn.displayName="PortalHost";let Fn=!1;const kn=Boolean(!1);let xn=()=>{};kn&&(xn=({component:e,method:t,params:n})=>{if(!Fn)return;let r="";r="object"===typeof n?Object.keys(n).map((e=>"".concat(e,":").concat(n[e]))).join(" "):"".concat(null!==n&&void 0!==n?n:""),console.log("[Portal::".concat([e,t].filter(Boolean).join("::"),"]"),r)}),Object.freeze(xn);const An=(e,t)=>(t in e||(e[t]=[]),e),Sn=(e,t,n)=>{if(!(t in e))return xn({component:En.name,method:Sn.name,params:"Failed to remove portal '".concat(n,"', '").concat(t,"' was not registered!")}),e;const r=e[t].findIndex((e=>e.name===n));return-1!==r&&e[t].splice(r,1),e},En=(e,t)=>{const{type:n}=t;let r=Object.assign({},e);switch(n){case pn.REGISTER_HOST:return An(r,t.hostName);case pn.DEREGISTER_HOST:return((e,t)=>(delete e[t],e))(r,t.hostName);case pn.ADD_UPDATE_PORTAL:return((e,t,n,r)=>{t in e||(e=An(e,t));const a=e[t].findIndex((e=>e.name===n));return-1!==a?e[t][a].node=r:e[t].push({name:n,node:r}),e})(r,t.hostName,t.portalName,t.node);case pn.REMOVE_PORTAL:return Sn(r,t.hostName,t.portalName);default:return e}},Cn=(0,r.memo)((({rootHostName:e="root",shouldAddRootHost:t=!0,children:n})=>{const[a,i]=(0,r.useReducer)(En,gn);return r.createElement(_n.Provider,{value:i},r.createElement(yn.Provider,{value:a},n,t&&r.createElement(wn,{name:e})))}));Cn.displayName="PortalProvider";const Tn="replace",Dn=!0;let In=0;const On=["name","stackBehavior","enableDismissOnClose","onDismiss","index","snapPoints","enablePanDownToClose","animateOnMount","containerComponent","onChange","children"];function Pn(){return Pn=Object.assign||function(e){for(var t=1;tn||`bottom-sheet-modal-${In=(In+1)%Number.MAX_SAFE_INTEGER,In}`),[n]),O=(0,r.useCallback)((function(){S.current=-1,E.current=-1,C.current=!1,D.current=!1,T.current=!1}),[]),P=(0,r.useCallback)((function(){const e=D.current;O(),F(I),x(I),e&&y(Mn),o&&o()}),[I,O,F,x,o]),M=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.snapToIndex(...e)}),[]),R=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.snapToPosition(...e)}),[]),L=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.expand(...e)}),[]),N=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.collapse(...e)}),[]),B=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.close(...e)}),[]),j=(0,r.useCallback)(((...e)=>{var t;C.current||null===(t=A.current)||void 0===t||t.forceClose(...e)}),[]),V=(0,r.useCallback)((function(e){requestAnimationFrame((()=>{y({mount:!0,data:e}),v(I,t,a)}))}),[I,a,v]),z=(0,r.useCallback)((function(e){var t;S.current,C.current,-1===S.current&&!1===C.current||(C.current||-1===S.current&&u?P():(k(I),T.current=!0,null===(t=A.current)||void 0===t||t.forceClose(e)))}),[k,P,I,u]),H=(0,r.useCallback)((function(){var e;C.current,C.current||(C.current=!0,-1===S.current?E.current=s:E.current=S.current,null===(e=A.current)||void 0===e||e.close())}),[s]),U=(0,r.useCallback)((function(){var e;C.current,T.current,C.current&&!T.current&&(C.current=!1,null===(e=A.current)||void 0===e||e.snapToIndex(E.current))}),[]),W=(0,r.useCallback)((function(){var e;C.current,T.current,-1===S.current&&!1===C.current||(D.current=!1,T.current=!0,C.current?P():(k(I),null===(e=A.current)||void 0===e||e.close()))}),[I,P,k]),q=(0,r.useCallback)((function(e){D.current&&e()}),[]),$=(0,r.useCallback)((function(e){C.current,T.current,S.current=e,h&&h(e)}),[h]),Y=(0,r.useCallback)((function(){C.current,T.current,C.current||i&&P()}),[i,P]);return(0,r.useImperativeHandle)(t,(()=>({snapToIndex:M,snapToPosition:R,expand:L,collapse:N,close:B,forceClose:j,dismiss:z,present:V,minimize:H,restore:U}))),m?r.createElement(vn,{key:I,name:I,handleOnMount:q,handleOnUpdate:q,handleOnUnmount:W},r.createElement(d,{key:I},r.createElement(fn,Pn({},p,{ref:A,key:I,index:s,snapPoints:l,enablePanDownToClose:u,animateOnMount:c,containerHeight:_,containerOffset:b,onChange:$,onClose:Y,children:"function"===typeof f?f({data:g}):f,$modal:!0})))):null})),Ln=(0,r.memo)(Rn);Ln.displayName="BottomSheetModal";const Nn=Ln,Bn=({children:e})=>{const t=(0,s.useSharedValue)(Ye),n=(0,s.useSharedValue)(Ge),a=(0,r.useRef)([]),i=(0,r.useCallback)(((e,t,n)=>{const r=a.current.slice(),i=r.findIndex((t=>t.key===e)),o=i===r.length-1;if(-1!==i&&o)return;const s=r[r.length-1];var l,u,c;s&&!s.willUnmount&&n===V.replace&&(null===(l=s.ref)||void 0===l||null===(u=l.current)||void 0===u||u.minimize());-1!==i&&(r.splice(i,1),null===t||void 0===t||null===(c=t.current)||void 0===c||c.restore());r.push({key:e,ref:t,willUnmount:!1}),a.current=r}),[]),o=(0,r.useCallback)((e=>{const t=a.current.slice(),n=t.findIndex((t=>t.key===e)),r=n===t.length-1;t.splice(n,1),a.current=t;const i=a.current.length>0,o=a.current[a.current.length-1];var s,l;r&&i&&o&&!o.willUnmount&&(null===(s=a.current[a.current.length-1].ref)||void 0===s||null===(l=s.current)||void 0===l||l.restore())}),[]),l=(0,r.useCallback)((e=>{const t=a.current.slice(),n=t.findIndex((t=>t.key===e)),r=n===t.length-1;-1!==n&&(t[n].willUnmount=!0);const i=t.length>1;var o,s;r&&i&&(null===(o=t[t.length-2].ref)||void 0===o||null===(s=o.current)||void 0===s||s.restore());a.current=t}),[]),u=(0,r.useCallback)((e=>{const t=e?a.current.find((t=>t.key===e)):a.current[a.current.length-1];var n,r;return!!t&&(null===(n=t.ref)||void 0===n||null===(r=n.current)||void 0===r||r.dismiss(),!0)}),[]),c=(0,r.useCallback)((()=>{a.current.map((e=>{var t,n;null===(t=e.ref)||void 0===t||null===(n=t.current)||void 0===n||n.dismiss()}))}),[]),d=(0,r.useMemo)((()=>({dismiss:u,dismissAll:c})),[u,c]),h=(0,r.useMemo)((()=>({containerHeight:t,containerOffset:n,mountSheet:i,unmountSheet:o,willUnmountSheet:l})),[t,n,i,o,l]);return r.createElement(y,{value:d},r.createElement(b,{value:h},r.createElement(ct,{containerOffset:n,containerHeight:t,children:null}),r.createElement(Cn,null,e)))},jn=e=>(0,r.useMemo)((()=>e),[e]),Vn=e=>(0,r.useMemo)((()=>({easing:e.easing||L,duration:e.duration||N})),[e.duration,e.easing]),zn=st.default.create({container:{flex:1,overflow:"visible"}}),Hn=["focusHook","scrollEventsHandlersHook","enableFooterMarginAdjustment","overScrollMode","keyboardDismissMode","showsVerticalScrollIndicator","style","refreshing","onRefresh","progressViewOffset","refreshControl","onScroll","onScrollBeginDrag","onScrollEndDrag","onContentSizeChange"];function Un(){return Un=Object.assign||function(e){for(var t=1;t{const{focusHook:i,scrollEventsHandlersHook:o,enableFooterMarginAdjustment:u=!1,overScrollMode:c="never",keyboardDismissMode:d="interactive",showsVerticalScrollIndicator:h=!0,style:f,refreshing:m,onRefresh:g,progressViewOffset:y,refreshControl:_,onScroll:b,onScrollBeginDrag:v,onScrollEndDrag:w,onContentSizeChange:F}=n,k=(0,Tt.default)(n,Hn),x=(0,r.useRef)(null),{scrollableRef:A,scrollableContentOffsetY:S,scrollHandler:E}=((0,r.useRef)(null),ce(o,b,v,w)),{enableContentPanningGesture:T,animatedFooterHeight:I,animatedScrollableState:O,animatedContentHeight:P,enableDynamicSizing:M}=p(),R=(0,s.useAnimatedProps)(function(){const e=()=>({decelerationRate:j[O.value],showsVerticalScrollIndicator:h?O.value===D.UNLOCKED:h});return e.__closure={SCROLLABLE_DECELERATION_RATE_MAPPER:j,animatedScrollableState:O,showsVerticalScrollIndicator:h,SCROLLABLE_STATE:D},e.__workletHash=0xdb9c63c0b4f,e.__initData=Wn,e}(),[h]),L=Me(((e,t)=>{M&&(P.value=t+(u?I.value:0)),F&&F(e,t)})),N=(0,s.useAnimatedStyle)(function(){const e=()=>({marginBottom:u?I.value:0});return e.__closure={enableFooterMarginAdjustment:u,animatedFooterHeight:I},e.__workletHash=0x9e969a11556,e.__initData=qn,e}(),[u]),B=(0,r.useMemo)((()=>u?[...f?"length"in f?f:[f]:[],N]:f),[u,f,N]);return(0,r.useImperativeHandle)(a,(()=>A.current)),q(A,e,S,void 0!==g,i),r.createElement(Pt,{nativeGestureRef:x,gestureType:C.SCROLLABLE,style:zn.container},r.createElement(l.NativeViewGestureHandler,{ref:x,enabled:T,shouldCancelWhenOutside:!1},r.createElement(t,Un({animatedProps:R},k,{scrollEventThrottle:16,ref:A,overScrollMode:c,keyboardDismissMode:d,refreshing:m,onRefresh:g,progressViewOffset:y,refreshControl:_,onScroll:E,onContentSizeChange:L,style:B}))))}))}var Yn=n(90494);const Gn=s.default.createAnimatedComponent(Yn.default),Xn=$n(I.SECTIONLIST,Gn),Kn=(0,r.memo)(Xn);Kn.displayName="BottomSheetSectionList";const Jn=Kn;var Zn=n(90932);const Qn=s.default.createAnimatedComponent(Zn.default),er=$n(I.FLATLIST,Qn),tr=(0,r.memo)(er);tr.displayName="BottomSheetFlatList";const nr=tr;var rr=n(2772);const ar=s.default.createAnimatedComponent(rr.default),ir=$n(I.SCROLLVIEW,ar),or=(0,r.memo)(ir);or.displayName="BottomSheetScrollView";const sr=or;var lr=n(1577);const ur=s.default.createAnimatedComponent(lr.default),cr=$n(I.VIRTUALIZEDLIST,ur),dr=(0,r.memo)(cr);dr.displayName="BottomSheetVirtualizedList";const hr=dr,fr=["focusHook","enableFooterMarginAdjustment","onLayout","style","children"];function pr(){return pr=Object.assign||function(e){for(var t=1;t{const e=st.default.flatten(i),t=e&&"paddingBottom"in e?e.paddingBottom:0;return"number"===typeof t?t:0}),[i]),g=(0,s.useAnimatedStyle)(function(){const e=()=>({paddingBottom:n?d.value+m:m});return e.__closure={enableFooterMarginAdjustment:n,animatedFooterHeight:d,containerStylePaddingBottom:m},e.__workletHash=0xd1220444bc2,e.__initData=mr,e}(),[m,n]),y=(0,r.useMemo)((()=>[i,g]),[i,g]),_=(0,r.useCallback)((()=>{u.value=0,c.value=I.VIEW}),[u,c]),b=(0,r.useCallback)((e=>{h&&(f.value=e.nativeEvent.layout.height),a&&a(e),gr.displayName,e.nativeEvent.layout.height}),[a,f,h]);return t(_),r.createElement(s.default.View,pr({onLayout:b,style:y},l),o)}));gr.displayName="BottomSheetView";const yr=gr,_r=["onFocus","onBlur"];function br(){return br=Object.assign||function(e){for(var t=1;t{let{onFocus:n,onBlur:a}=e,i=(0,Tt.default)(e,_r);const{shouldHandleKeyboardEvents:o}=p();(0,r.useEffect)((()=>()=>{o.value=!1}),[o]);const s=(0,r.useCallback)((e=>{o.value=!0,n&&n(e)}),[n,o]),u=(0,r.useCallback)((e=>{o.value=!1,a&&a(e)}),[a,o]);return r.createElement(l.TextInput,br({ref:t,onFocus:s,onBlur:u},i))})),wr=(0,r.memo)(vr);wr.displayName="BottomSheetTextInput";const Fr=wr,kr="close",xr=!0,Ar="button",Sr="Bottom sheet backdrop",Er="Tap to close the bottom sheet",Cr=st.default.create({container:{backgroundColor:"black"}}),Tr=["animatedIndex","opacity","appearsOnIndex","disappearsOnIndex","enableTouchThrough","pressBehavior","onPress","style","children","accessible","accessibilityRole","accessibilityLabel","accessibilityHint"];function Dr(){return Dr=Object.assign||function(e){for(var t=1;t{let{animatedIndex:t,opacity:n,appearsOnIndex:a,disappearsOnIndex:i,enableTouchThrough:o,pressBehavior:u=kr,onPress:c,style:h,children:f,accessible:p=xr,accessibilityRole:m=Ar,accessibilityLabel:g=Sr,accessibilityHint:y=Er}=e,_=(0,Tt.default)(e,Tr);const{snapToIndex:b,close:v}=d(),w=(0,r.useRef)(!1),F=null!==n&&void 0!==n?n:.5,k=null!==a&&void 0!==a?a:1,x=null!==i&&void 0!==i?i:0,A=null!==o&&void 0!==o&&o,[S,E]=(0,r.useState)(A?"none":"auto"),C=(0,r.useCallback)((()=>{null===c||void 0===c||c(),"close"===u?v():"collapse"===u?b(x):"number"===typeof u&&b(u)}),[b,v,x,u,c]),T=(0,r.useCallback)((e=>{w.current&&E(e?"none":"auto")}),[]),D=(0,s.useAnimatedGestureHandler)({onFinish:function(){const e=function(){(0,s.runOnJS)(C)()};return e.__closure={runOnJS:s.runOnJS,handleOnPress:C},e.__workletHash=0xf33f721580c,e.__initData=Ir,e}()},[C]),I=(0,s.useAnimatedStyle)(function(){const e=()=>({opacity:(0,s.interpolate)(t.value,[-1,x,k],[0,0,F],s.Extrapolate.CLAMP),flex:1});return e.__closure={interpolate:s.interpolate,animatedIndex:t,disappearsOnIndex:x,appearsOnIndex:k,opacity:F,Extrapolate:s.Extrapolate},e.__workletHash=8900416520153,e.__initData=Or,e}()),O=(0,r.useMemo)((()=>[Cr.container,h,I]),[h,I]);(0,s.useAnimatedReaction)(function(){const e=()=>t.value<=x;return e.__closure={animatedIndex:t,disappearsOnIndex:x},e.__workletHash=8387671218592,e.__initData=Pr,e}(),function(){const e=function(e,t){e!==t&&(0,s.runOnJS)(T)(e)};return e.__closure={runOnJS:s.runOnJS,handleContainerTouchability:T},e.__workletHash=0x9c959d3f2fb,e.__initData=Mr,e}(),[x]),(0,r.useEffect)((()=>(w.current=!0,()=>{w.current=!1})),[]);const P=r.createElement(s.default.View,Dr({style:O,pointerEvents:S,accessible:null!==p&&void 0!==p?p:void 0,accessibilityRole:null!==m&&void 0!==m?m:void 0,accessibilityLabel:null!==g&&void 0!==g?g:void 0,accessibilityHint:y||`Tap to ${"string"===typeof u?u:"move"} the Bottom Sheet`},_),f);return"none"!==u?r.createElement(l.TapGestureHandler,{onGestureEvent:D},P):P}));Rr.displayName="BottomSheetBackdrop";const Lr=Rr,Nr=st.default.create({container:{position:"absolute",top:0,left:0,right:0,zIndex:9999}}),Br={code:"function gorhom_BottomSheetFooterJs1(){const{animatedFooterPosition,animatedKeyboardState,KEYBOARD_STATE,bottomInset}=this.__closure;let footerTranslateY=animatedFooterPosition.value;if(animatedKeyboardState.value!==KEYBOARD_STATE.SHOWN){footerTranslateY=footerTranslateY-bottomInset;}return{transform:[{translateY:Math.max(0,footerTranslateY)}]};}"};const jr=(0,r.memo)((function({animatedFooterPosition:e,bottomInset:t=0,style:n,children:a}){const{animatedFooterHeight:i,animatedKeyboardState:o}=p(),l=(0,s.useAnimatedStyle)(function(){const n=function(){let n=e.value;return o.value!==R.SHOWN&&(n-=t),{transform:[{translateY:Math.max(0,n)}]}};return n.__closure={animatedFooterPosition:e,animatedKeyboardState:o,KEYBOARD_STATE:R,bottomInset:t},n.__workletHash=4126112676409,n.__initData=Br,n}(),[t,o,e]),u=(0,r.useMemo)((()=>[Nr.container,n,l]),[n,l]),c=(0,r.useCallback)((({nativeEvent:{layout:{height:e}}})=>{i.value=e}),[i]);return null!==a?r.createElement(s.default.View,{pointerEvents:"box-none",onLayout:c,style:u},"function"===typeof a?a():a):null}));jr.displayName="BottomSheetFooter";const Vr=jr,zr={TouchableOpacity:l.TouchableOpacity,TouchableHighlight:l.TouchableHighlight,TouchableWithoutFeedback:l.TouchableWithoutFeedback},{TouchableHighlight:Hr,TouchableOpacity:Ur,TouchableWithoutFeedback:Wr}=zr},10974:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Autocomplete:()=>or,BicyclingLayer:()=>te,BicyclingLayerF:()=>ee,Circle:()=>on,CircleF:()=>an,Data:()=>hn,DataF:()=>dn,DirectionsRenderer:()=>Qn,DirectionsService:()=>Kn,DistanceMatrixService:()=>er,DrawingManager:()=>ue,DrawingManagerF:()=>le,FLOAT_PANE:()=>En,GoogleMap:()=>F,GoogleMapsMarkerClusterer:()=>St,GoogleMarkerClusterer:()=>Tt,GroundOverlay:()=>jn,GroundOverlayF:()=>Bn,HeatmapLayer:()=>qn,HeatmapLayerF:()=>Wn,InfoBox:()=>Ve,InfoBoxF:()=>je,InfoWindow:()=>Pt,InfoWindowF:()=>Ot,KmlLayer:()=>yn,LoadScript:()=>M,LoadScriptNext:()=>j,MAP_PANE:()=>Cn,MARKER_LAYER:()=>Tn,MapContext:()=>f,Marker:()=>ge,MarkerClusterer:()=>Ee,MarkerClustererF:()=>Se,MarkerF:()=>me,OVERLAY_LAYER:()=>Dn,OVERLAY_MOUSE_TARGET:()=>In,OverlayView:()=>Pn,OverlayViewF:()=>On,Polygon:()=>$t,PolygonF:()=>qt,Polyline:()=>Vt,PolylineF:()=>jt,Rectangle:()=>Zt,RectangleF:()=>Jt,StandaloneSearchBox:()=>rr,StreetViewPanorama:()=>Gn,StreetViewService:()=>Xn,TrafficLayer:()=>Q,TrafficLayerF:()=>Z,TransitLayer:()=>re,TransitLayerF:()=>ne,useGoogleMap:()=>p,useJsApiLoader:()=>Y,useLoadScript:()=>L});var r,a,i=n(60397),o=n(36665),s=n(33672);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}function c(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h=d(a?r:(a=1,r=function(e,t,n,r,a,i,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,r,a,i,o,s],c=0;(l=new Error(t.replace(/%s/g,(function(){return u[c++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}})),f=(0,o.createContext)(null);function p(){h(!!o.useContext,"useGoogleMap is React hook and requires React version 16.8+");var e=(0,o.useContext)(f);return h(!!e,"useGoogleMap needs a GoogleMap available up in the tree"),e}function m(e,t,n,r){var a,i,o={};return a=e,i=(e,a)=>{var i=n[a];i!==t[a]&&(o[a]=i,e(r,i))},Object.keys(a).forEach((e=>i(a[e],e))),o}function g(e,t,n){var r,a,i,o=(r=n,a=function(n,r,a){return"function"===typeof e[a]&&n.push(google.maps.event.addListener(t,r,e[a])),n},i=[],Object.keys(r).reduce((function(e,t){return a(e,r[t],t)}),i));return o}function y(e){google.maps.event.removeListener(e)}function _(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach(y)}function b(e){var{updaterMap:t,eventMap:n,prevProps:r,nextProps:a,instance:i}=e,o=g(a,i,n);return m(t,r,a,i),o}var v={onDblClick:"dblclick",onDragEnd:"dragend",onDragStart:"dragstart",onMapTypeIdChanged:"maptypeid_changed",onMouseMove:"mousemove",onMouseOut:"mouseout",onMouseOver:"mouseover",onMouseDown:"mousedown",onMouseUp:"mouseup",onRightClick:"rightclick",onTilesLoaded:"tilesloaded",onBoundsChanged:"bounds_changed",onCenterChanged:"center_changed",onClick:"click",onDrag:"drag",onHeadingChanged:"heading_changed",onIdle:"idle",onProjectionChanged:"projection_changed",onResize:"resize",onTiltChanged:"tilt_changed",onZoomChanged:"zoom_changed"},w={extraMapTypes(e,t){t.forEach((function(t,n){e.mapTypes.set(String(n),t)}))},center(e,t){e.setCenter(t)},clickableIcons(e,t){e.setClickableIcons(t)},heading(e,t){e.setHeading(t)},mapTypeId(e,t){e.setMapTypeId(t)},options(e,t){e.setOptions(t)},streetView(e,t){e.setStreetView(t)},tilt(e,t){e.setTilt(t)},zoom(e,t){e.setZoom(t)}};(0,o.memo)((function(e){var{children:t,options:n,id:r,mapContainerStyle:a,mapContainerClassName:s,center:l,onClick:u,onDblClick:c,onDrag:d,onDragEnd:h,onDragStart:p,onMouseMove:m,onMouseOut:g,onMouseOver:y,onMouseDown:_,onMouseUp:b,onRightClick:v,onCenterChanged:w,onLoad:F,onUnmount:k}=e,[x,A]=(0,o.useState)(null),S=(0,o.useRef)(null),[E,C]=(0,o.useState)(null),[T,D]=(0,o.useState)(null),[I,O]=(0,o.useState)(null),[P,M]=(0,o.useState)(null),[R,L]=(0,o.useState)(null),[N,B]=(0,o.useState)(null),[j,V]=(0,o.useState)(null),[z,H]=(0,o.useState)(null),[U,W]=(0,o.useState)(null),[q,$]=(0,o.useState)(null),[Y,G]=(0,o.useState)(null),[X,K]=(0,o.useState)(null);return(0,o.useEffect)((()=>{n&&null!==x&&x.setOptions(n)}),[x,n]),(0,o.useEffect)((()=>{null!==x&&"undefined"!==typeof l&&x.setCenter(l)}),[x,l]),(0,o.useEffect)((()=>{x&&c&&(null!==T&&google.maps.event.removeListener(T),D(google.maps.event.addListener(x,"dblclick",c)))}),[c]),(0,o.useEffect)((()=>{x&&h&&(null!==I&&google.maps.event.removeListener(I),O(google.maps.event.addListener(x,"dragend",h)))}),[h]),(0,o.useEffect)((()=>{x&&p&&(null!==P&&google.maps.event.removeListener(P),M(google.maps.event.addListener(x,"dragstart",p)))}),[p]),(0,o.useEffect)((()=>{x&&_&&(null!==R&&google.maps.event.removeListener(R),L(google.maps.event.addListener(x,"mousedown",_)))}),[_]),(0,o.useEffect)((()=>{x&&m&&(null!==N&&google.maps.event.removeListener(N),B(google.maps.event.addListener(x,"mousemove",m)))}),[m]),(0,o.useEffect)((()=>{x&&g&&(null!==j&&google.maps.event.removeListener(j),V(google.maps.event.addListener(x,"mouseout",g)))}),[g]),(0,o.useEffect)((()=>{x&&y&&(null!==z&&google.maps.event.removeListener(z),H(google.maps.event.addListener(x,"mouseover",y)))}),[y]),(0,o.useEffect)((()=>{x&&b&&(null!==U&&google.maps.event.removeListener(U),W(google.maps.event.addListener(x,"mouseup",b)))}),[b]),(0,o.useEffect)((()=>{x&&v&&(null!==q&&google.maps.event.removeListener(q),$(google.maps.event.addListener(x,"rightclick",v)))}),[v]),(0,o.useEffect)((()=>{x&&u&&(null!==Y&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(x,"click",u)))}),[u]),(0,o.useEffect)((()=>{x&&d&&(null!==X&&google.maps.event.removeListener(X),K(google.maps.event.addListener(x,"drag",d)))}),[d]),(0,o.useEffect)((()=>{x&&w&&(null!==E&&google.maps.event.removeListener(E),C(google.maps.event.addListener(x,"center_changed",w)))}),[u]),(0,o.useEffect)((()=>{var e=null===S.current?null:new google.maps.Map(S.current,n);return A(e),null!==e&&F&&F(e),()=>{null!==e&&k&&k(e)}}),[]),(0,i.jsx)("div",{id:r,ref:S,style:a,className:s,children:(0,i.jsx)(f.Provider,{value:x,children:null!==x?t:null})})}));class F extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{map:null}),c(this,"registeredEvents",[]),c(this,"mapRef",null),c(this,"getInstance",(()=>null===this.mapRef?null:new google.maps.Map(this.mapRef,this.props.options))),c(this,"panTo",(e=>{var t=this.getInstance();t&&t.panTo(e)})),c(this,"setMapCallback",(()=>{null!==this.state.map&&this.props.onLoad&&this.props.onLoad(this.state.map)})),c(this,"getRef",(e=>{this.mapRef=e}))}componentDidMount(){var e=this.getInstance();this.registeredEvents=b({updaterMap:w,eventMap:v,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{map:e}}),this.setMapCallback)}componentDidUpdate(e){null!==this.state.map&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:w,eventMap:v,prevProps:e,nextProps:this.props,instance:this.state.map}))}componentWillUnmount(){null!==this.state.map&&(this.props.onUnmount&&this.props.onUnmount(this.state.map),_(this.registeredEvents))}render(){return(0,i.jsx)("div",{id:this.props.id,ref:this.getRef,style:this.props.mapContainerStyle,className:this.props.mapContainerClassName,children:(0,i.jsx)(f.Provider,{value:this.state.map,children:null!==this.state.map?this.props.children:null})})}}function k(e,t,n,r,a,i,o){try{var s=e[i](o),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,a)}function x(e){return function(){var t=this,n=arguments;return new Promise((function(r,a){var i=e.apply(t,n);function o(e){k(i,r,a,o,s,"next",e)}function s(e){k(i,r,a,o,s,"throw",e)}o(void 0)}))}}function A(e){var{googleMapsApiKey:t,googleMapsClientId:n,version:r="weekly",language:a,region:i,libraries:o,channel:s,mapIds:l,authReferrerPolicy:u}=e,c=[];return h(t&&n||!(t&&n),"You need to specify either googleMapsApiKey or googleMapsClientId for @react-google-maps/api load script to work. You cannot use both at the same time."),t?c.push("key=".concat(t)):n&&c.push("client=".concat(n)),r&&c.push("v=".concat(r)),a&&c.push("language=".concat(a)),i&&c.push("region=".concat(i)),o&&o.length&&c.push("libraries=".concat(o.sort().join(","))),s&&c.push("channel=".concat(s)),l&&l.length&&c.push("map_ids=".concat(l.join(","))),u&&c.push("auth_referrer_policy=".concat(u)),c.push("loading=async"),c.push("callback=initMap"),"https://maps.googleapis.com/maps/api/js?".concat(c.join("&"))}var S="undefined"!==typeof document;function E(e){var{url:t,id:n,nonce:r}=e;return S?new Promise((function(e,a){var i=document.getElementById(n),o=window;if(i){var s=i.getAttribute("data-state");if(i.src===t&&"error"!==s){if("ready"===s)return e(n);var l=o.initMap,u=i.onerror;return o.initMap=function(){l&&l(),e(n)},void(i.onerror=function(e){u&&u(e),a(e)})}i.remove()}var c=document.createElement("script");c.type="text/javascript",c.src=t,c.id=n,c.async=!0,c.nonce=r||"",c.onerror=function(e){c.setAttribute("data-state","error"),a(e)},o.initMap=function(){c.setAttribute("data-state","ready"),e(n)},document.head.appendChild(c)})).catch((e=>{throw console.error("injectScript error: ",e),e})):Promise.reject(new Error("document is undefined"))}function C(e){var t=e.href;return!(!t||0!==t.indexOf("https://fonts.googleapis.com/css?family=Roboto")&&0!==t.indexOf("https://fonts.googleapis.com/css?family=Google+Sans+Text"))||("style"===e.tagName.toLowerCase()&&e.styleSheet&&e.styleSheet.cssText&&0===e.styleSheet.cssText.replace("\r\n","").indexOf(".gm-style")?(e.styleSheet.cssText="",!0):"style"===e.tagName.toLowerCase()&&e.innerHTML&&0===e.innerHTML.replace("\r\n","").indexOf(".gm-style")?(e.innerHTML="",!0):"style"===e.tagName.toLowerCase()&&!e.styleSheet&&!e.innerHTML)}function T(){var e=document.getElementsByTagName("head")[0];if(e){var t=e.insertBefore.bind(e);e.insertBefore=function(n,r){return C(n)||Reflect.apply(t,e,[n,r]),n};var n=e.appendChild.bind(e);e.appendChild=function(t){return C(t)||Reflect.apply(n,e,[t]),t}}}var D=!1;function I(){return(0,i.jsx)("div",{children:"Loading..."})}var O,P={id:"script-loader",version:"weekly"};class M extends o.PureComponent{constructor(){super(...arguments),c(this,"check",(0,o.createRef)()),c(this,"state",{loaded:!1}),c(this,"cleanupCallback",(()=>{delete window.google.maps,this.injectScript()})),c(this,"isCleaningUp",x((function*(){return new Promise((function(e){if(D){if(S)var t=window.setInterval((function(){D||(window.clearInterval(t),e())}),1)}else e()}))}))),c(this,"cleanup",(()=>{D=!0;var e=document.getElementById(this.props.id);e&&e.parentNode&&e.parentNode.removeChild(e),Array.prototype.slice.call(document.getElementsByTagName("script")).filter((function(e){return"string"===typeof e.src&&e.src.includes("maps.googleapis")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("link")).filter((function(e){return"https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Google+Sans"===e.href})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)})),Array.prototype.slice.call(document.getElementsByTagName("style")).filter((function(e){return void 0!==e.innerText&&e.innerText.length>0&&e.innerText.includes(".gm-")})).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))})),c(this,"injectScript",(()=>{this.props.preventGoogleFontsLoading&&T(),h(!!this.props.id,'LoadScript requires "id" prop to be a string: %s',this.props.id),E({id:this.props.id,nonce:this.props.nonce,url:A(this.props)}).then((()=>{this.props.onLoad&&this.props.onLoad(),this.setState((function(){return{loaded:!0}}))})).catch((e=>{this.props.onError&&this.props.onError(e),console.error("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(this.props.googleMapsApiKey||"-",") or Client ID (").concat(this.props.googleMapsClientId||"-",") to \n Otherwise it is a Network issue.\n "))}))}))}componentDidMount(){if(S){if(window.google&&window.google.maps&&!D)return void console.error("google api is already presented");this.isCleaningUp().then(this.injectScript).catch((function(e){console.error("Error at injecting script after cleaning up: ",e)}))}}componentDidUpdate(e){this.props.libraries!==e.libraries&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),S&&e.language!==this.props.language&&(this.cleanup(),this.setState((function(){return{loaded:!1}}),this.cleanupCallback))}componentWillUnmount(){if(S){this.cleanup();window.setTimeout((()=>{this.check.current||(delete window.google,D=!1)}),1),this.props.onUnmount&&this.props.onUnmount()}}render(){return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{ref:this.check}),this.state.loaded?this.props.children:this.props.loadingElement||(0,i.jsx)(I,{})]})}}function R(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r{m.current=!1}}),[]),(0,o.useEffect)((function(){S&&c&&T()}),[c]),(0,o.useEffect)((function(){g&&h(!!window.google,"useLoadScript was marked as loaded, but window.google is not present. Something went wrong.")}),[g]);var v=A({version:n,googleMapsApiKey:a,googleMapsClientId:i,language:s,region:l,libraries:u,channel:d,mapIds:f,authReferrerPolicy:p});(0,o.useEffect)((function(){function e(){m.current&&(y(!0),O=v)}S&&(window.google&&window.google.maps&&O===v?e():E({id:t,url:v,nonce:r}).then(e).catch((function(e){m.current&&b(e),console.warn("\n There has been an Error with loading Google Maps API script, please check that you provided correct google API key (".concat(a||"-",") or Client ID (").concat(i||"-",")\n Otherwise it is a Network issue.\n ")),console.error(e)})))}),[t,v,r]);var w=(0,o.useRef)();return(0,o.useEffect)((function(){w.current&&u!==w.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),w.current=u}),[u]),{isLoaded:g,loadError:_,url:v}}c(M,"defaultProps",P);var N=["loadingElement","onLoad","onError","onUnmount","children"],B=(0,i.jsx)(I,{});var j=(0,o.memo)((function(e){var{loadingElement:t,onLoad:n,onError:r,onUnmount:a,children:i}=e,s=R(e,N),{isLoaded:l,loadError:u}=L(s);return(0,o.useEffect)((function(){l&&"function"===typeof n&&n()}),[l,n]),(0,o.useEffect)((function(){u&&"function"===typeof r&&r(u)}),[u,r]),(0,o.useEffect)((function(){return()=>{a&&a()}}),[a]),l?i:t||B}));function V(e,t,n,r){return new(n||(n=Promise))((function(t,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function o(e){try{s(r.throw(e))}catch(t){a(t)}}function s(e){e.done?t(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(i,o)}s((r=r.apply(e,[])).next())}))}"function"===typeof SuppressedError&&SuppressedError;var z,H,U=(z=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!==a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!==a--;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;0!==a--;){var o=i[a];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n},z&&z.__esModule&&Object.prototype.hasOwnProperty.call(z,"default")?z.default:z),W="__googleMapsScriptId";!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.LOADING=1]="LOADING",e[e.SUCCESS=2]="SUCCESS",e[e.FAILURE=3]="FAILURE"}(H||(H={}));class q{constructor(e){var{apiKey:t,authReferrerPolicy:n,channel:r,client:a,id:i=W,language:o,libraries:s=[],mapIds:l,nonce:u,region:c,retries:d=3,url:h="https://maps.googleapis.com/maps/api/js",version:f}=e;if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=t,this.authReferrerPolicy=n,this.channel=r,this.client=a,this.id=i||W,this.language=o,this.libraries=s,this.mapIds=l,this.nonce=u,this.region=c,this.retries=d,this.url=h,this.version=f,q.instance){if(!U(this.options,q.instance.options))throw new Error("Loader must not be called again with different options. ".concat(JSON.stringify(this.options)," !== ").concat(JSON.stringify(q.instance.options)));return q.instance}q.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?H.FAILURE:this.done?H.SUCCESS:this.loading?H.LOADING:H.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){var e=this.url;return e+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(e+="&key=".concat(this.apiKey)),this.channel&&(e+="&channel=".concat(this.channel)),this.client&&(e+="&client=".concat(this.client)),this.libraries.length>0&&(e+="&libraries=".concat(this.libraries.join(","))),this.language&&(e+="&language=".concat(this.language)),this.region&&(e+="®ion=".concat(this.region)),this.version&&(e+="&v=".concat(this.version)),this.mapIds&&(e+="&map_ids=".concat(this.mapIds.join(","))),this.authReferrerPolicy&&(e+="&auth_referrer_policy=".concat(this.authReferrerPolicy)),e}deleteScript(){var e=document.getElementById(this.id);e&&e.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise(((e,t)=>{this.loadCallback((n=>{n?t(n.error):e(window.google)}))}))}importLibrary(e){return this.execute(),google.maps.importLibrary(e)}loadCallback(e){this.callbacks.push(e),this.execute()}setScript(){var e,t;if(document.getElementById(this.id))this.callback();else{var n={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(n).forEach((e=>!n[e]&&delete n[e])),(null===(t=null===(e=null===window||void 0===window?void 0:window.google)||void 0===e?void 0:e.maps)||void 0===t?void 0:t.importLibrary)||(e=>{var t,n,r,a="The Google Maps JavaScript API",i="google",o="importLibrary",s="__ib__",l=document,u=window,c=(u=u[i]||(u[i]={})).maps||(u.maps={}),d=new Set,h=new URLSearchParams,f=()=>t||(t=new Promise(((o,u)=>V(this,0,void 0,(function*(){var f;for(r in yield n=l.createElement("script"),n.id=this.id,h.set("libraries",[...d]+""),e)h.set(r.replace(/[A-Z]/g,(e=>"_"+e[0].toLowerCase())),e[r]);h.set("callback",i+".maps."+s),n.src=this.url+"?"+h,c[s]=o,n.onerror=()=>t=u(Error(a+" could not load.")),n.nonce=this.nonce||(null===(f=l.querySelector("script[nonce]"))||void 0===f?void 0:f.nonce)||"",l.head.append(n)})))));c[o]?console.warn(a+" only loads once. Ignoring:",e):c[o]=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;rc[o](e,...n)))}})(n);var r=this.libraries.map((e=>this.importLibrary(e)));r.length||r.push(this.importLibrary("core")),Promise.all(r).then((()=>this.callback()),(e=>{var t=new ErrorEvent("error",{error:e});this.loadErrorCallback(t)}))}}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(e){if(this.errors.push(e),this.errors.length<=this.retries){var t=this.errors.length*Math.pow(2,this.errors.length);console.error("Failed to load Google Maps script, retrying in ".concat(t," ms.")),setTimeout((()=>{this.deleteScript(),this.setScript()}),t)}else this.onerrorEvent=e,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach((e=>{e(this.onerrorEvent)})),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version)return console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),void this.callback();this.loading=!0,this.setScript()}}}var $=["maps"];function Y(e){var{id:t=P.id,version:n=P.version,nonce:r,googleMapsApiKey:a,language:i,region:s,libraries:l=$,preventGoogleFontsLoading:u,mapIds:c,authReferrerPolicy:d}=e,h=(0,o.useRef)(!1),[f,p]=(0,o.useState)(!1),[m,g]=(0,o.useState)(void 0);(0,o.useEffect)((function(){return h.current=!0,()=>{h.current=!1}}),[]);var y=(0,o.useMemo)((()=>new q({id:t,apiKey:a,version:n,libraries:l,language:i||"en",region:s||"US",mapIds:c||[],nonce:r||"",authReferrerPolicy:d||"origin"})),[t,a,n,l,i,s,c,r,d]);(0,o.useEffect)((function(){f||y.load().then((()=>{h.current&&p(!0)})).catch((e=>{g(e)}))}),[]),(0,o.useEffect)((()=>{S&&u&&T()}),[u]);var _=(0,o.useRef)();return(0,o.useEffect)((()=>{_.current&&l!==_.current&&console.warn("Performance warning! LoadScript has been reloaded unintentionally! You should not pass `libraries` prop as new array. Please keep an array of libraries as static class property for Components and PureComponents, or just a const variable outside of component, or somewhere in config files or ENV variables"),_.current=l}),[l]),{isLoaded:f,loadError:m}}function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t{null!==i&&i.setMap(a)}),[a]),(0,o.useEffect)((()=>{t&&null!==i&&i.setOptions(t)}),[i,t]),(0,o.useEffect)((()=>{var e=new google.maps.TrafficLayer(X(X({},t),{},{map:a}));return s(e),n&&n(e),()=>{null!==i&&(r&&r(i),i.setMap(null))}}),[]),null}));class Q extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{trafficLayer:null}),c(this,"setTrafficLayerCallback",(()=>{null!==this.state.trafficLayer&&this.props.onLoad&&this.props.onLoad(this.state.trafficLayer)})),c(this,"registeredEvents",[])}componentDidMount(){var e=new google.maps.TrafficLayer(X(X({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:J,eventMap:K,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{trafficLayer:e}}),this.setTrafficLayerCallback)}componentDidUpdate(e){null!==this.state.trafficLayer&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:J,eventMap:K,prevProps:e,nextProps:this.props,instance:this.state.trafficLayer}))}componentWillUnmount(){null!==this.state.trafficLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.trafficLayer),_(this.registeredEvents),this.state.trafficLayer.setMap(null))}render(){return null}}c(Q,"contextType",f);var ee=(0,o.memo)((function(e){var{onLoad:t,onUnmount:n}=e,r=(0,o.useContext)(f),[a,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==a&&a.setMap(r)}),[r]),(0,o.useEffect)((()=>{var e=new google.maps.BicyclingLayer;return i(e),e.setMap(r),t&&t(e),()=>{null!==e&&(n&&n(e),e.setMap(null))}}),[]),null}));class te extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{bicyclingLayer:null}),c(this,"setBicyclingLayerCallback",(()=>{null!==this.state.bicyclingLayer&&(this.state.bicyclingLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.bicyclingLayer))}))}componentDidMount(){var e=new google.maps.BicyclingLayer;this.setState((()=>({bicyclingLayer:e})),this.setBicyclingLayerCallback)}componentWillUnmount(){null!==this.state.bicyclingLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.bicyclingLayer),this.state.bicyclingLayer.setMap(null))}render(){return null}}c(te,"contextType",f);var ne=(0,o.memo)((function(e){var{onLoad:t,onUnmount:n}=e,r=(0,o.useContext)(f),[a,i]=(0,o.useState)(null);return(0,o.useEffect)((()=>{null!==a&&a.setMap(r)}),[r]),(0,o.useEffect)((()=>{var e=new google.maps.TransitLayer;return i(e),e.setMap(r),t&&t(e),()=>{null!==a&&(n&&n(a),a.setMap(null))}}),[]),null}));class re extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{transitLayer:null}),c(this,"setTransitLayerCallback",(()=>{null!==this.state.transitLayer&&(this.state.transitLayer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.transitLayer))}))}componentDidMount(){var e=new google.maps.TransitLayer;this.setState((function(){return{transitLayer:e}}),this.setTransitLayerCallback)}componentWillUnmount(){null!==this.state.transitLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.transitLayer),this.state.transitLayer.setMap(null))}render(){return null}}function ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ie(e){for(var t=1;t{null!==m&&m.setMap(p)}),[p]),(0,o.useEffect)((()=>{t&&null!==m&&m.setOptions(t)}),[m,t]),(0,o.useEffect)((()=>{null!==m&&m.setDrawingMode(null!==n&&void 0!==n?n:null)}),[m,n]),(0,o.useEffect)((()=>{m&&r&&(null!==y&&google.maps.event.removeListener(y),_(google.maps.event.addListener(m,"circlecomplete",r)))}),[m,r]),(0,o.useEffect)((()=>{m&&a&&(null!==b&&google.maps.event.removeListener(b),v(google.maps.event.addListener(m,"markercomplete",a)))}),[m,a]),(0,o.useEffect)((()=>{m&&i&&(null!==w&&google.maps.event.removeListener(w),F(google.maps.event.addListener(m,"overlaycomplete",i)))}),[m,i]),(0,o.useEffect)((()=>{m&&s&&(null!==k&&google.maps.event.removeListener(k),x(google.maps.event.addListener(m,"polygoncomplete",s)))}),[m,s]),(0,o.useEffect)((()=>{m&&l&&(null!==A&&google.maps.event.removeListener(A),S(google.maps.event.addListener(m,"polylinecomplete",l)))}),[m,l]),(0,o.useEffect)((()=>{m&&u&&(null!==E&&google.maps.event.removeListener(E),C(google.maps.event.addListener(m,"rectanglecomplete",u)))}),[m,u]),(0,o.useEffect)((()=>{h(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing);var e=new google.maps.drawing.DrawingManager(ie(ie({},t),{},{map:p}));return n&&e.setDrawingMode(n),r&&_(google.maps.event.addListener(e,"circlecomplete",r)),a&&v(google.maps.event.addListener(e,"markercomplete",a)),i&&F(google.maps.event.addListener(e,"overlaycomplete",i)),s&&x(google.maps.event.addListener(e,"polygoncomplete",s)),l&&S(google.maps.event.addListener(e,"polylinecomplete",l)),u&&C(google.maps.event.addListener(e,"rectanglecomplete",u)),g(e),c&&c(e),()=>{null!==m&&(y&&google.maps.event.removeListener(y),b&&google.maps.event.removeListener(b),w&&google.maps.event.removeListener(w),k&&google.maps.event.removeListener(k),A&&google.maps.event.removeListener(A),E&&google.maps.event.removeListener(E),d&&d(m),m.setMap(null))}}),[]),null}));class ue extends o.PureComponent{constructor(e){super(e),c(this,"registeredEvents",[]),c(this,"state",{drawingManager:null}),c(this,"setDrawingManagerCallback",(()=>{null!==this.state.drawingManager&&this.props.onLoad&&this.props.onLoad(this.state.drawingManager)})),h(!!google.maps.drawing,"Did you include prop libraries={['drawing']} in the URL? %s",google.maps.drawing)}componentDidMount(){var e=new google.maps.drawing.DrawingManager(ie(ie({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:se,eventMap:oe,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{drawingManager:e}}),this.setDrawingManagerCallback)}componentDidUpdate(e){null!==this.state.drawingManager&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:se,eventMap:oe,prevProps:e,nextProps:this.props,instance:this.state.drawingManager}))}componentWillUnmount(){null!==this.state.drawingManager&&(this.props.onUnmount&&this.props.onUnmount(this.state.drawingManager),_(this.registeredEvents),this.state.drawingManager.setMap(null))}render(){return null}}function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function de(e){for(var t=1;t{null!==W&&W.setMap(U)}),[U]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==W&&W.setOptions(n)}),[W,n]),(0,o.useEffect)((()=>{"undefined"!==typeof l&&null!==W&&W.setDraggable(l)}),[W,l]),(0,o.useEffect)((()=>{t&&null!==W&&W.setPosition(t)}),[W,t]),(0,o.useEffect)((()=>{"undefined"!==typeof u&&null!==W&&W.setVisible(u)}),[W,u]),(0,o.useEffect)((()=>{null===W||void 0===W||W.setAnimation(c)}),[W,c]),(0,o.useEffect)((()=>{W&&void 0!==d&&W.setClickable(d)}),[W,d]),(0,o.useEffect)((()=>{W&&void 0!==h&&W.setCursor(h)}),[W,h]),(0,o.useEffect)((()=>{W&&void 0!==p&&W.setIcon(p)}),[W,p]),(0,o.useEffect)((()=>{W&&void 0!==m&&W.setLabel(m)}),[W,m]),(0,o.useEffect)((()=>{W&&void 0!==g&&W.setOpacity(g)}),[W,g]),(0,o.useEffect)((()=>{W&&void 0!==y&&W.setShape(y)}),[W,y]),(0,o.useEffect)((()=>{W&&void 0!==_&&W.setTitle(_)}),[W,_]),(0,o.useEffect)((()=>{W&&void 0!==b&&W.setZIndex(b)}),[W,b]),(0,o.useEffect)((()=>{W&&w&&(null!==$&&google.maps.event.removeListener($),Y(google.maps.event.addListener(W,"dblclick",w)))}),[w]),(0,o.useEffect)((()=>{W&&k&&(null!==G&&google.maps.event.removeListener(G),X(google.maps.event.addListener(W,"dragend",k)))}),[k]),(0,o.useEffect)((()=>{W&&x&&(null!==K&&google.maps.event.removeListener(K),J(google.maps.event.addListener(W,"dragstart",x)))}),[x]),(0,o.useEffect)((()=>{W&&C&&(null!==Z&&google.maps.event.removeListener(Z),Q(google.maps.event.addListener(W,"mousedown",C)))}),[C]),(0,o.useEffect)((()=>{W&&A&&(null!==ee&&google.maps.event.removeListener(ee),te(google.maps.event.addListener(W,"mouseout",A)))}),[A]),(0,o.useEffect)((()=>{W&&S&&(null!==ne&&google.maps.event.removeListener(ne),re(google.maps.event.addListener(W,"mouseover",S)))}),[S]),(0,o.useEffect)((()=>{W&&E&&(null!==ae&&google.maps.event.removeListener(ae),ie(google.maps.event.addListener(W,"mouseup",E)))}),[E]),(0,o.useEffect)((()=>{W&&T&&(null!==oe&&google.maps.event.removeListener(oe),se(google.maps.event.addListener(W,"rightclick",T)))}),[T]),(0,o.useEffect)((()=>{W&&v&&(null!==le&&google.maps.event.removeListener(le),ue(google.maps.event.addListener(W,"click",v)))}),[v]),(0,o.useEffect)((()=>{W&&F&&(null!==ce&&google.maps.event.removeListener(ce),he(google.maps.event.addListener(W,"drag",F)))}),[F]),(0,o.useEffect)((()=>{W&&D&&(null!==fe&&google.maps.event.removeListener(fe),me(google.maps.event.addListener(W,"clickable_changed",D)))}),[D]),(0,o.useEffect)((()=>{W&&I&&(null!==ge&&google.maps.event.removeListener(ge),ye(google.maps.event.addListener(W,"cursor_changed",I)))}),[I]),(0,o.useEffect)((()=>{W&&O&&(null!==_e&&google.maps.event.removeListener(_e),be(google.maps.event.addListener(W,"animation_changed",O)))}),[O]),(0,o.useEffect)((()=>{W&&P&&(null!==ve&&google.maps.event.removeListener(ve),we(google.maps.event.addListener(W,"draggable_changed",P)))}),[P]),(0,o.useEffect)((()=>{W&&M&&(null!==Fe&&google.maps.event.removeListener(Fe),ke(google.maps.event.addListener(W,"flat_changed",M)))}),[M]),(0,o.useEffect)((()=>{W&&R&&(null!==xe&&google.maps.event.removeListener(xe),Ae(google.maps.event.addListener(W,"icon_changed",R)))}),[R]),(0,o.useEffect)((()=>{W&&L&&(null!==Se&&google.maps.event.removeListener(Se),Ee(google.maps.event.addListener(W,"position_changed",L)))}),[L]),(0,o.useEffect)((()=>{W&&N&&(null!==Ce&&google.maps.event.removeListener(Ce),Te(google.maps.event.addListener(W,"shape_changed",N)))}),[N]),(0,o.useEffect)((()=>{W&&B&&(null!==De&&google.maps.event.removeListener(De),Ie(google.maps.event.addListener(W,"title_changed",B)))}),[B]),(0,o.useEffect)((()=>{W&&j&&(null!==Oe&&google.maps.event.removeListener(Oe),Pe(google.maps.event.addListener(W,"visible_changed",j)))}),[j]),(0,o.useEffect)((()=>{W&&V&&(null!==Me&&google.maps.event.removeListener(Me),Re(google.maps.event.addListener(W,"zindex_changed",V)))}),[V]),(0,o.useEffect)((()=>{var e=de(de(de({},n||pe),r?pe:{map:U}),{},{position:t}),i=new google.maps.Marker(e);return r?r.addMarker(i,!!a):i.setMap(U),t&&i.setPosition(t),"undefined"!==typeof u&&i.setVisible(u),"undefined"!==typeof l&&i.setDraggable(l),"undefined"!==typeof d&&i.setClickable(d),"string"===typeof h&&i.setCursor(h),p&&i.setIcon(p),"undefined"!==typeof m&&i.setLabel(m),"undefined"!==typeof g&&i.setOpacity(g),y&&i.setShape(y),"string"===typeof _&&i.setTitle(_),"number"===typeof b&&i.setZIndex(b),w&&Y(google.maps.event.addListener(i,"dblclick",w)),k&&X(google.maps.event.addListener(i,"dragend",k)),x&&J(google.maps.event.addListener(i,"dragstart",x)),C&&Q(google.maps.event.addListener(i,"mousedown",C)),A&&te(google.maps.event.addListener(i,"mouseout",A)),S&&re(google.maps.event.addListener(i,"mouseover",S)),E&&ie(google.maps.event.addListener(i,"mouseup",E)),T&&se(google.maps.event.addListener(i,"rightclick",T)),v&&ue(google.maps.event.addListener(i,"click",v)),F&&he(google.maps.event.addListener(i,"drag",F)),D&&me(google.maps.event.addListener(i,"clickable_changed",D)),I&&ye(google.maps.event.addListener(i,"cursor_changed",I)),O&&be(google.maps.event.addListener(i,"animation_changed",O)),P&&we(google.maps.event.addListener(i,"draggable_changed",P)),M&&ke(google.maps.event.addListener(i,"flat_changed",M)),R&&Ae(google.maps.event.addListener(i,"icon_changed",R)),L&&Ee(google.maps.event.addListener(i,"position_changed",L)),N&&Te(google.maps.event.addListener(i,"shape_changed",N)),B&&Ie(google.maps.event.addListener(i,"title_changed",B)),j&&Pe(google.maps.event.addListener(i,"visible_changed",j)),V&&Re(google.maps.event.addListener(i,"zindex_changed",V)),q(i),z&&z(i),()=>{null!==$&&google.maps.event.removeListener($),null!==G&&google.maps.event.removeListener(G),null!==K&&google.maps.event.removeListener(K),null!==Z&&google.maps.event.removeListener(Z),null!==ee&&google.maps.event.removeListener(ee),null!==ne&&google.maps.event.removeListener(ne),null!==ae&&google.maps.event.removeListener(ae),null!==oe&&google.maps.event.removeListener(oe),null!==le&&google.maps.event.removeListener(le),null!==fe&&google.maps.event.removeListener(fe),null!==ge&&google.maps.event.removeListener(ge),null!==_e&&google.maps.event.removeListener(_e),null!==ve&&google.maps.event.removeListener(ve),null!==Fe&&google.maps.event.removeListener(Fe),null!==xe&&google.maps.event.removeListener(xe),null!==Se&&google.maps.event.removeListener(Se),null!==De&&google.maps.event.removeListener(De),null!==Oe&&google.maps.event.removeListener(Oe),null!==Me&&google.maps.event.removeListener(Me),H&&H(i),r?r.removeMarker(i,!!a):i&&i.setMap(null)}}),[]);var Le=(0,o.useMemo)((()=>s?o.Children.map(s,(e=>{if(!(0,o.isValidElement)(e))return e;var t=e;return(0,o.cloneElement)(t,{anchor:W})})):null),[s,W]);return(0,i.jsx)(i.Fragment,{children:Le})||null}));class ge extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[])}componentDidMount(){var e=this;return x((function*(){var t=de(de(de({},e.props.options||pe),e.props.clusterer?pe:{map:e.context}),{},{position:e.props.position});e.marker=new google.maps.Marker(t),e.props.clusterer?e.props.clusterer.addMarker(e.marker,!!e.props.noClustererRedraw):e.marker.setMap(e.context),e.registeredEvents=b({updaterMap:fe,eventMap:he,prevProps:{},nextProps:e.props,instance:e.marker}),e.props.onLoad&&e.props.onLoad(e.marker)}))()}componentDidUpdate(e){this.marker&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:fe,eventMap:he,prevProps:e,nextProps:this.props,instance:this.marker}))}componentWillUnmount(){this.marker&&(this.props.onUnmount&&this.props.onUnmount(this.marker),_(this.registeredEvents),this.props.clusterer?this.props.clusterer.removeMarker(this.marker,!!this.props.noClustererRedraw):this.marker&&this.marker.setMap(null))}render(){return(this.props.children?o.Children.map(this.props.children,(e=>{if(!(0,o.isValidElement)(e))return e;var t=e;return(0,o.cloneElement)(t,{anchor:this.marker})})):null)||null}}c(ge,"contextType",f);var ye=function(){function e(t,n){t.getClusterer().extend(e,google.maps.OverlayView),this.cluster=t,this.clusterClassName=this.cluster.getClusterer().getClusterClass(),this.className=this.clusterClassName,this.styles=n,this.center=void 0,this.div=null,this.sums=null,this.visible=!1,this.boundsChangedListener=null,this.url="",this.height=0,this.width=0,this.anchorText=[0,0],this.anchorIcon=[0,0],this.textColor="black",this.textSize=11,this.textDecoration="none",this.fontWeight="bold",this.fontStyle="normal",this.fontFamily="Arial,sans-serif",this.backgroundPosition="0 0",this.cMouseDownInCluster=null,this.cDraggingMapByCluster=null,this.timeOut=null,this.setMap(t.getMap()),this.onBoundsChanged=this.onBoundsChanged.bind(this),this.onMouseDown=this.onMouseDown.bind(this),this.onClick=this.onClick.bind(this),this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this),this.onAdd=this.onAdd.bind(this),this.onRemove=this.onRemove.bind(this),this.draw=this.draw.bind(this),this.hide=this.hide.bind(this),this.show=this.show.bind(this),this.useStyle=this.useStyle.bind(this),this.setCenter=this.setCenter.bind(this),this.getPosFromLatLng=this.getPosFromLatLng.bind(this)}return e.prototype.onBoundsChanged=function(){this.cDraggingMapByCluster=this.cMouseDownInCluster},e.prototype.onMouseDown=function(){this.cMouseDownInCluster=!0,this.cDraggingMapByCluster=!1},e.prototype.onClick=function(e){if(this.cMouseDownInCluster=!1,!this.cDraggingMapByCluster){var t=this.cluster.getClusterer();if(google.maps.event.trigger(t,"click",this.cluster),google.maps.event.trigger(t,"clusterclick",this.cluster),t.getZoomOnClick()){var n=t.getMaxZoom(),r=this.cluster.getBounds(),a=t.getMap();null!==a&&"fitBounds"in a&&a.fitBounds(r),this.timeOut=window.setTimeout((function(){var e=t.getMap();if(null!==e){"fitBounds"in e&&e.fitBounds(r);var a=e.getZoom()||0;null!==n&&a>n&&e.setZoom(n+1)}}),100)}e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}},e.prototype.onMouseOver=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseover",this.cluster)},e.prototype.onMouseOut=function(){google.maps.event.trigger(this.cluster.getClusterer(),"mouseout",this.cluster)},e.prototype.onAdd=function(){var e;this.div=document.createElement("div"),this.div.className=this.className,this.visible&&this.show(),null===(e=this.getPanes())||void 0===e||e.overlayMouseTarget.appendChild(this.div);var t=this.getMap();null!==t&&(this.boundsChangedListener=google.maps.event.addListener(t,"bounds_changed",this.onBoundsChanged),this.div.addEventListener("mousedown",this.onMouseDown),this.div.addEventListener("click",this.onClick),this.div.addEventListener("mouseover",this.onMouseOver),this.div.addEventListener("mouseout",this.onMouseOut))},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.hide(),null!==this.boundsChangedListener&&google.maps.event.removeListener(this.boundsChangedListener),this.div.removeEventListener("mousedown",this.onMouseDown),this.div.removeEventListener("click",this.onClick),this.div.removeEventListener("mouseover",this.onMouseOver),this.div.removeEventListener("mouseout",this.onMouseOut),this.div.parentNode.removeChild(this.div),null!==this.timeOut&&(window.clearTimeout(this.timeOut),this.timeOut=null),this.div=null)},e.prototype.draw=function(){if(this.visible&&null!==this.div&&this.center){var e=this.getPosFromLatLng(this.center);this.div.style.top=null!==e?"".concat(e.y,"px"):"0",this.div.style.left=null!==e?"".concat(e.x,"px"):"0"}},e.prototype.hide=function(){this.div&&(this.div.style.display="none"),this.visible=!1},e.prototype.show=function(){var e,t,n,r,a,i;if(this.div&&this.center){var o=null===this.sums||"undefined"===typeof this.sums.title||""===this.sums.title?this.cluster.getClusterer().getTitle():this.sums.title,s=this.backgroundPosition.split(" "),l=parseInt((null===(e=s[0])||void 0===e?void 0:e.replace(/^\s+|\s+$/g,""))||"0",10),u=parseInt((null===(t=s[1])||void 0===t?void 0:t.replace(/^\s+|\s+$/g,""))||"0",10),c=this.getPosFromLatLng(this.center);this.div.className=this.className,this.div.setAttribute("style","cursor: pointer; position: absolute; top: ".concat(null!==c?"".concat(c.y,"px"):"0","; left: ").concat(null!==c?"".concat(c.x,"px"):"0","; width: ").concat(this.width,"px; height: ").concat(this.height,"px; "));var d=document.createElement("img");d.alt=o,d.src=this.url,d.width=this.width,d.height=this.height,d.setAttribute("style","position: absolute; top: ".concat(u,"px; left: ").concat(l,"px")),this.cluster.getClusterer().enableRetinaIcons||(d.style.clip="rect(-".concat(u,"px, -").concat(l+this.width,"px, -").concat(u+this.height,", -").concat(l,")"));var h=document.createElement("div");h.setAttribute("style","position: absolute; top: ".concat(this.anchorText[0],"px; left: ").concat(this.anchorText[1],"px; color: ").concat(this.textColor,"; font-size: ").concat(this.textSize,"px; font-family: ").concat(this.fontFamily,"; font-weight: ").concat(this.fontWeight,"; fontStyle: ").concat(this.fontStyle,"; text-decoration: ").concat(this.textDecoration,"; text-align: center; width: ").concat(this.width,"px; line-height: ").concat(this.height,"px")),(null===(n=this.sums)||void 0===n?void 0:n.text)&&(h.innerText="".concat(null===(r=this.sums)||void 0===r?void 0:r.text)),(null===(a=this.sums)||void 0===a?void 0:a.html)&&(h.innerHTML="".concat(null===(i=this.sums)||void 0===i?void 0:i.html)),this.div.innerHTML="",this.div.appendChild(d),this.div.appendChild(h),this.div.title=o,this.div.style.display=""}this.visible=!0},e.prototype.useStyle=function(e){this.sums=e;var t=this.cluster.getClusterer().getStyles(),n=t[Math.min(t.length-1,Math.max(0,e.index-1))];n&&(this.url=n.url,this.height=n.height,this.width=n.width,n.className&&(this.className="".concat(this.clusterClassName," ").concat(n.className)),this.anchorText=n.anchorText||[0,0],this.anchorIcon=n.anchorIcon||[this.height/2,this.width/2],this.textColor=n.textColor||"black",this.textSize=n.textSize||11,this.textDecoration=n.textDecoration||"none",this.fontWeight=n.fontWeight||"bold",this.fontStyle=n.fontStyle||"normal",this.fontFamily=n.fontFamily||"Arial,sans-serif",this.backgroundPosition=n.backgroundPosition||"0 0")},e.prototype.setCenter=function(e){this.center=e},e.prototype.getPosFromLatLng=function(e){var t=this.getProjection().fromLatLngToDivPixel(e);return null!==t&&(t.x-=this.anchorIcon[1],t.y-=this.anchorIcon[0]),t},e}(),_e=function(){function e(e){this.markerClusterer=e,this.map=this.markerClusterer.getMap(),this.gridSize=this.markerClusterer.getGridSize(),this.minClusterSize=this.markerClusterer.getMinimumClusterSize(),this.averageCenter=this.markerClusterer.getAverageCenter(),this.markers=[],this.center=void 0,this.bounds=null,this.clusterIcon=new ye(this,this.markerClusterer.getStyles()),this.getSize=this.getSize.bind(this),this.getMarkers=this.getMarkers.bind(this),this.getCenter=this.getCenter.bind(this),this.getMap=this.getMap.bind(this),this.getClusterer=this.getClusterer.bind(this),this.getBounds=this.getBounds.bind(this),this.remove=this.remove.bind(this),this.addMarker=this.addMarker.bind(this),this.isMarkerInClusterBounds=this.isMarkerInClusterBounds.bind(this),this.calculateBounds=this.calculateBounds.bind(this),this.updateIcon=this.updateIcon.bind(this),this.isMarkerAlreadyAdded=this.isMarkerAlreadyAdded.bind(this)}return e.prototype.getSize=function(){return this.markers.length},e.prototype.getMarkers=function(){return this.markers},e.prototype.getCenter=function(){return this.center},e.prototype.getMap=function(){return this.map},e.prototype.getClusterer=function(){return this.markerClusterer},e.prototype.getBounds=function(){for(var e=new google.maps.LatLngBounds(this.center,this.center),t=0,n=this.getMarkers();ti)e.getMap()!==this.map&&e.setMap(this.map);else if(an||t0))for(var e=0;e3?new google.maps.LatLngBounds(null===r||void 0===r?void 0:r.getSouthWest(),null===r||void 0===r?void 0:r.getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625)),i=this.getExtendedBounds(a),o=Math.min(e+this.batchSize,this.markers.length),s=e;s{C&&A&&(null!==N&&google.maps.event.removeListener(N),B(google.maps.event.addListener(C,ke.onMouseOut,A)))}),[A]),(0,o.useEffect)((()=>{C&&x&&(null!==j&&google.maps.event.removeListener(j),V(google.maps.event.addListener(C,ke.onMouseOver,x)))}),[x]),(0,o.useEffect)((()=>{C&&w&&(null!==I&&google.maps.event.removeListener(I),O(google.maps.event.addListener(C,ke.onClick,w)))}),[w]),(0,o.useEffect)((()=>{C&&F&&(null!==P&&google.maps.event.removeListener(P),M(google.maps.event.addListener(C,ke.onClusteringBegin,F)))}),[F]),(0,o.useEffect)((()=>{C&&k&&(null!==R&&google.maps.event.removeListener(R),M(google.maps.event.addListener(C,ke.onClusteringEnd,k)))}),[k]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==C&&xe.averageCenter(C,r)}),[C,r]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==C&&xe.batchSizeIE(C,a)}),[C,a]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==C&&xe.calculator(C,i)}),[C,i]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==C&&xe.clusterClass(C,s)}),[C,s]),(0,o.useEffect)((()=>{"undefined"!==typeof l&&null!==C&&xe.enableRetinaIcons(C,l)}),[C,l]),(0,o.useEffect)((()=>{"undefined"!==typeof u&&null!==C&&xe.gridSize(C,u)}),[C,u]),(0,o.useEffect)((()=>{"undefined"!==typeof d&&null!==C&&xe.ignoreHidden(C,d)}),[C,d]),(0,o.useEffect)((()=>{"undefined"!==typeof h&&null!==C&&xe.imageExtension(C,h)}),[C,h]),(0,o.useEffect)((()=>{"undefined"!==typeof p&&null!==C&&xe.imagePath(C,p)}),[C,p]),(0,o.useEffect)((()=>{"undefined"!==typeof m&&null!==C&&xe.imageSizes(C,m)}),[C,m]),(0,o.useEffect)((()=>{"undefined"!==typeof g&&null!==C&&xe.maxZoom(C,g)}),[C,g]),(0,o.useEffect)((()=>{"undefined"!==typeof y&&null!==C&&xe.minimumClusterSize(C,y)}),[C,y]),(0,o.useEffect)((()=>{"undefined"!==typeof _&&null!==C&&xe.styles(C,_)}),[C,_]),(0,o.useEffect)((()=>{"undefined"!==typeof b&&null!==C&&xe.title(C,b)}),[C,b]),(0,o.useEffect)((()=>{"undefined"!==typeof v&&null!==C&&xe.zoomOnClick(C,v)}),[C,v]),(0,o.useEffect)((()=>{if(D){var e=function(e){for(var t=1;t{null!==N&&google.maps.event.removeListener(N),null!==j&&google.maps.event.removeListener(j),null!==I&&google.maps.event.removeListener(I),null!==P&&google.maps.event.removeListener(P),null!==R&&google.maps.event.removeListener(R),E&&E(t)}}}),[]),null!==C&&t(C)||null}));class Ee extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{markerClusterer:null}),c(this,"setClustererCallback",(()=>{null!==this.state.markerClusterer&&this.props.onLoad&&this.props.onLoad(this.state.markerClusterer)}))}componentDidMount(){if(this.context){var e=new we(this.context,[],this.props.options);this.registeredEvents=b({updaterMap:xe,eventMap:ke,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({markerClusterer:e})),this.setClustererCallback)}}componentDidUpdate(e){this.state.markerClusterer&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:xe,eventMap:ke,prevProps:e,nextProps:this.props,instance:this.state.markerClusterer}))}componentWillUnmount(){null!==this.state.markerClusterer&&(this.props.onUnmount&&this.props.onUnmount(this.state.markerClusterer),_(this.registeredEvents),this.state.markerClusterer.setMap(null))}render(){return null!==this.state.markerClusterer?this.props.children(this.state.markerClusterer):null}}function Ce(e){e.cancelBubble=!0,e.stopPropagation&&e.stopPropagation()}c(Ee,"contextType",f);var Te=function(){function e(t){void 0===t&&(t={}),this.getCloseClickHandler=this.getCloseClickHandler.bind(this),this.closeClickHandler=this.closeClickHandler.bind(this),this.createInfoBoxDiv=this.createInfoBoxDiv.bind(this),this.addClickHandler=this.addClickHandler.bind(this),this.getCloseBoxImg=this.getCloseBoxImg.bind(this),this.getBoxWidths=this.getBoxWidths.bind(this),this.setBoxStyle=this.setBoxStyle.bind(this),this.setPosition=this.setPosition.bind(this),this.getPosition=this.getPosition.bind(this),this.setOptions=this.setOptions.bind(this),this.setContent=this.setContent.bind(this),this.setVisible=this.setVisible.bind(this),this.getContent=this.getContent.bind(this),this.getVisible=this.getVisible.bind(this),this.setZIndex=this.setZIndex.bind(this),this.getZIndex=this.getZIndex.bind(this),this.onRemove=this.onRemove.bind(this),this.panBox=this.panBox.bind(this),this.extend=this.extend.bind(this),this.close=this.close.bind(this),this.draw=this.draw.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.open=this.open.bind(this),this.extend(e,google.maps.OverlayView),this.content=t.content||"",this.disableAutoPan=t.disableAutoPan||!1,this.maxWidth=t.maxWidth||0,this.pixelOffset=t.pixelOffset||new google.maps.Size(0,0),this.position=t.position||new google.maps.LatLng(0,0),this.zIndex=t.zIndex||null,this.boxClass=t.boxClass||"infoBox",this.boxStyle=t.boxStyle||{},this.closeBoxMargin=t.closeBoxMargin||"2px",this.closeBoxURL=t.closeBoxURL||"http://www.google.com/intl/en_us/mapfiles/close.gif",""===t.closeBoxURL&&(this.closeBoxURL=""),this.infoBoxClearance=t.infoBoxClearance||new google.maps.Size(1,1),"undefined"===typeof t.visible&&("undefined"===typeof t.isHidden?t.visible=!0:t.visible=!t.isHidden),this.isHidden=!t.visible,this.alignBottom=t.alignBottom||!1,this.pane=t.pane||"floatPane",this.enableEventPropagation=t.enableEventPropagation||!1,this.div=null,this.closeListener=null,this.moveListener=null,this.mapListener=null,this.contextListener=null,this.eventListeners=null,this.fixedWidthSet=null}return e.prototype.createInfoBoxDiv=function(){var e=this;if(!this.div){this.div=document.createElement("div"),this.setBoxStyle(),"string"===typeof this.content?this.div.innerHTML=this.getCloseBoxImg()+this.content:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(this.content));var t=this.getPanes();if(null!==t&&t[this.pane].appendChild(this.div),this.addClickHandler(),this.div.style.width)this.fixedWidthSet=!0;else if(0!==this.maxWidth&&this.div.offsetWidth>this.maxWidth)this.div.style.width=this.maxWidth+"px",this.fixedWidthSet=!0;else{var n=this.getBoxWidths();this.div.style.width=this.div.offsetWidth-n.left-n.right+"px",this.fixedWidthSet=!1}if(this.panBox(this.disableAutoPan),!this.enableEventPropagation){this.eventListeners=[];for(var r=0,a=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"];ro&&(n=p.x+c+l+h-o),this.alignBottom?p.y<-u+f+d?r=p.y+u-f-d:p.y+u+f>s&&(r=p.y+u+f-s):p.y<-u+f?r=p.y+u-f:p.y+d+u+f>s&&(r=p.y+d+u+f-s)),0===n&&0===r||t.panBy(n,r)}}},e.prototype.setBoxStyle=function(){if(this.div){this.div.className=this.boxClass,this.div.style.cssText="";var e=this.boxStyle;for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(this.div.style[t]=e[t]);if(this.div.style.webkitTransform="translateZ(0)","undefined"!==typeof this.div.style.opacity&&""!==this.div.style.opacity){var n=parseFloat(this.div.style.opacity||"");this.div.style.msFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+100*n+')"',this.div.style.filter="alpha(opacity="+100*n+")"}this.div.style.position="absolute",this.div.style.visibility="hidden",null!==this.zIndex&&(this.div.style.zIndex=this.zIndex+""),this.div.style.overflow||(this.div.style.overflow="auto")}},e.prototype.getBoxWidths=function(){var e={top:0,bottom:0,left:0,right:0};if(!this.div)return e;if(document.defaultView){var t=this.div.ownerDocument,n=t&&t.defaultView?t.defaultView.getComputedStyle(this.div,""):null;n&&(e.top=parseInt(n.borderTopWidth||"",10)||0,e.bottom=parseInt(n.borderBottomWidth||"",10)||0,e.left=parseInt(n.borderLeftWidth||"",10)||0,e.right=parseInt(n.borderRightWidth||"",10)||0)}else if(document.documentElement.currentStyle){var r=this.div.currentStyle;r&&(e.top=parseInt(r.borderTopWidth||"",10)||0,e.bottom=parseInt(r.borderBottomWidth||"",10)||0,e.left=parseInt(r.borderLeftWidth||"",10)||0,e.right=parseInt(r.borderRightWidth||"",10)||0)}return e},e.prototype.onRemove=function(){this.div&&this.div.parentNode&&(this.div.parentNode.removeChild(this.div),this.div=null)},e.prototype.draw=function(){if(this.createInfoBoxDiv(),this.div){var e=this.getProjection().fromLatLngToDivPixel(this.position);null!==e&&(this.div.style.left=e.x+this.pixelOffset.width+"px",this.alignBottom?this.div.style.bottom=-(e.y+this.pixelOffset.height)+"px":this.div.style.top=e.y+this.pixelOffset.height+"px"),this.isHidden?this.div.style.visibility="hidden":this.div.style.visibility="visible"}},e.prototype.setOptions=function(e){void 0===e&&(e={}),"undefined"!==typeof e.boxClass&&(this.boxClass=e.boxClass,this.setBoxStyle()),"undefined"!==typeof e.boxStyle&&(this.boxStyle=e.boxStyle,this.setBoxStyle()),"undefined"!==typeof e.content&&this.setContent(e.content),"undefined"!==typeof e.disableAutoPan&&(this.disableAutoPan=e.disableAutoPan),"undefined"!==typeof e.maxWidth&&(this.maxWidth=e.maxWidth),"undefined"!==typeof e.pixelOffset&&(this.pixelOffset=e.pixelOffset),"undefined"!==typeof e.alignBottom&&(this.alignBottom=e.alignBottom),"undefined"!==typeof e.position&&this.setPosition(e.position),"undefined"!==typeof e.zIndex&&this.setZIndex(e.zIndex),"undefined"!==typeof e.closeBoxMargin&&(this.closeBoxMargin=e.closeBoxMargin),"undefined"!==typeof e.closeBoxURL&&(this.closeBoxURL=e.closeBoxURL),"undefined"!==typeof e.infoBoxClearance&&(this.infoBoxClearance=e.infoBoxClearance),"undefined"!==typeof e.isHidden&&(this.isHidden=e.isHidden),"undefined"!==typeof e.visible&&(this.isHidden=!e.visible),"undefined"!==typeof e.enableEventPropagation&&(this.enableEventPropagation=e.enableEventPropagation),this.div&&this.draw()},e.prototype.setContent=function(e){this.content=e,this.div&&(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.fixedWidthSet||(this.div.style.width=""),"string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e)),this.fixedWidthSet||(this.div.style.width=this.div.offsetWidth+"px","string"===typeof e?this.div.innerHTML=this.getCloseBoxImg()+e:(this.div.innerHTML=this.getCloseBoxImg(),this.div.appendChild(e))),this.addClickHandler()),google.maps.event.trigger(this,"content_changed")},e.prototype.setPosition=function(e){this.position=e,this.div&&this.draw(),google.maps.event.trigger(this,"position_changed")},e.prototype.setVisible=function(e){this.isHidden=!e,this.div&&(this.div.style.visibility=this.isHidden?"hidden":"visible")},e.prototype.setZIndex=function(e){this.zIndex=e,this.div&&(this.div.style.zIndex=e+""),google.maps.event.trigger(this,"zindex_changed")},e.prototype.getContent=function(){return this.content},e.prototype.getPosition=function(){return this.position},e.prototype.getZIndex=function(){return this.zIndex},e.prototype.getVisible=function(){var e=this.getMap();return"undefined"!==typeof e&&null!==e&&!this.isHidden},e.prototype.show=function(){this.isHidden=!1,this.div&&(this.div.style.visibility="visible")},e.prototype.hide=function(){this.isHidden=!0,this.div&&(this.div.style.visibility="hidden")},e.prototype.open=function(e,t){var n=this;t&&(this.position=t.getPosition(),this.moveListener=google.maps.event.addListener(t,"position_changed",(function(){var e=t.getPosition();n.setPosition(e)})),this.mapListener=google.maps.event.addListener(t,"map_changed",(function(){n.setMap(t.map)}))),this.setMap(e),this.div&&this.panBox()},e.prototype.close=function(){if(this.closeListener&&(google.maps.event.removeListener(this.closeListener),this.closeListener=null),this.eventListeners){for(var e=0,t=this.eventListeners;e{y&&null!==_&&(_.close(),n?_.open(y,n):_.getPosition()&&_.open(y))}),[y,_,n]),(0,o.useEffect)((()=>{r&&null!==_&&_.setOptions(r)}),[_,r]),(0,o.useEffect)((()=>{if(a&&null!==_){var e=a instanceof google.maps.LatLng?a:new google.maps.LatLng(a.lat,a.lng);_.setPosition(e)}}),[a]),(0,o.useEffect)((()=>{"number"===typeof i&&null!==_&&_.setZIndex(i)}),[i]),(0,o.useEffect)((()=>{_&&l&&(null!==v&&google.maps.event.removeListener(v),w(google.maps.event.addListener(_,"closeclick",l)))}),[l]),(0,o.useEffect)((()=>{_&&u&&(null!==F&&google.maps.event.removeListener(F),k(google.maps.event.addListener(_,"domready",u)))}),[u]),(0,o.useEffect)((()=>{_&&c&&(null!==x&&google.maps.event.removeListener(x),A(google.maps.event.addListener(_,"content_changed",c)))}),[c]),(0,o.useEffect)((()=>{_&&d&&(null!==S&&google.maps.event.removeListener(S),E(google.maps.event.addListener(_,"position_changed",d)))}),[d]),(0,o.useEffect)((()=>{_&&p&&(null!==C&&google.maps.event.removeListener(C),T(google.maps.event.addListener(_,"zindex_changed",p)))}),[p]),(0,o.useEffect)((()=>{if(y){var e,t=r||Le,{position:a}=t,i=R(t,De);!a||a instanceof google.maps.LatLng||(e=new google.maps.LatLng(a.lat,a.lng));var o=new Te(Pe(Pe({},i),e?{position:e}:{}));D.current=document.createElement("div"),b(o),l&&w(google.maps.event.addListener(o,"closeclick",l)),u&&k(google.maps.event.addListener(o,"domready",u)),c&&A(google.maps.event.addListener(o,"content_changed",c)),d&&E(google.maps.event.addListener(o,"position_changed",d)),p&&T(google.maps.event.addListener(o,"zindex_changed",p)),o.setContent(D.current),n?o.open(y,n):o.getPosition()?o.open(y):h(!1,"You must provide either an anchor or a position prop for ."),m&&m(o)}return()=>{null!==_&&(v&&google.maps.event.removeListener(v),x&&google.maps.event.removeListener(x),F&&google.maps.event.removeListener(F),S&&google.maps.event.removeListener(S),C&&google.maps.event.removeListener(C),g&&g(_),_.close())}}),[]),D.current?(0,s.createPortal)(o.Children.only(t),D.current):null}));class Ve extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"containerElement",null),c(this,"state",{infoBox:null}),c(this,"open",((e,t)=>{t?null!==this.context&&e.open(this.context,t):e.getPosition()?null!==this.context&&e.open(this.context):h(!1,"You must provide either an anchor or a position prop for .")})),c(this,"setInfoBoxCallback",(()=>{null!==this.state.infoBox&&null!==this.containerElement&&(this.state.infoBox.setContent(this.containerElement),this.open(this.state.infoBox,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoBox))}))}componentDidMount(){var e,t=this.props.options||{},{position:n}=t,r=R(t,Ie);!n||n instanceof google.maps.LatLng||(e=new google.maps.LatLng(n.lat,n.lng));var a=new Te(Pe(Pe({},r),e?{position:e}:{}));this.containerElement=document.createElement("div"),this.registeredEvents=b({updaterMap:Re,eventMap:Me,prevProps:{},nextProps:this.props,instance:a}),this.setState({infoBox:a},this.setInfoBoxCallback)}componentDidUpdate(e){var{infoBox:t}=this.state;null!==t&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Re,eventMap:Me,prevProps:e,nextProps:this.props,instance:t}))}componentWillUnmount(){var{onUnmount:e}=this.props,{infoBox:t}=this.state;null!==t&&(e&&e(t),_(this.registeredEvents),t.close())}render(){return this.containerElement?(0,s.createPortal)(o.Children.only(this.props.children),this.containerElement):null}}c(Ve,"contextType",f);var ze=(Be||(Be=1,Ne=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,a,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(a=r;0!==a--;)if(!e(t[a],n[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(a=r;0!==a--;)if(!Object.prototype.hasOwnProperty.call(n,i[a]))return!1;for(a=r;0!==a--;){var o=i[a];if(!e(t[o],n[o]))return!1}return!0}return t!==t&&n!==n}),Ne),He=d(ze),Ue=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class We{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var[t,n]=new Uint8Array(e,0,2);if(219!==t)throw new Error("Data does not appear to be in a KDBush format.");var r=n>>4;if(1!==r)throw new Error("Got v".concat(r," data when expected v").concat(1,"."));var a=Ue[15&n];if(!a)throw new Error("Unrecognized array type.");var[i]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new We(o,i,a,e)}constructor(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float64Array,r=arguments.length>3?arguments[3]:void 0;if(isNaN(e)||e<0)throw new Error("Unpexpected numItems value: ".concat(e,"."));this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=n,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;var a=Ue.indexOf(this.ArrayType),i=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(a<0)throw new Error("Unexpected typed array class: ".concat(n,"."));r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+i+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+a]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){var n=this._pos>>1;return this.ids[n]=n,this.coords[this._pos++]=e,this.coords[this._pos++]=t,n}finish(){var e=this._pos>>1;if(e!==this.numItems)throw new Error("Added ".concat(e," items when expected ").concat(this.numItems,"."));return qe(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,n,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:a,coords:i,nodeSize:o}=this,s=[0,a.length-1,0],l=[];s.length;){var u=s.pop()||0,c=s.pop()||0,d=s.pop()||0;if(c-d<=o)for(var h=d;h<=c;h++){var f=i[2*h],p=i[2*h+1];f>=e&&f<=n&&p>=t&&p<=r&&l.push(a[h])}else{var m=d+c>>1,g=i[2*m],y=i[2*m+1];g>=e&&g<=n&&y>=t&&y<=r&&l.push(a[m]),(0===u?e<=g:t<=y)&&(s.push(d),s.push(m-1),s.push(1-u)),(0===u?n>=g:r>=y)&&(s.push(m+1),s.push(c),s.push(1-u))}}return l}within(e,t,n){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var{ids:r,coords:a,nodeSize:i}=this,o=[0,r.length-1,0],s=[],l=n*n;o.length;){var u=o.pop()||0,c=o.pop()||0,d=o.pop()||0;if(c-d<=i)for(var h=d;h<=c;h++)Xe(a[2*h],a[2*h+1],e,t)<=l&&s.push(r[h]);else{var f=d+c>>1,p=a[2*f],m=a[2*f+1];Xe(p,m,e,t)<=l&&s.push(r[f]),(0===u?e-n<=p:t-n<=m)&&(o.push(d),o.push(f-1),o.push(1-u)),(0===u?e+n>=p:t+n>=m)&&(o.push(f+1),o.push(c),o.push(1-u))}}return s}}function qe(e,t,n,r,a,i){if(!(a-r<=n)){var o=r+a>>1;$e(e,t,o,r,a,i),qe(e,t,n,r,o-1,1-i),qe(e,t,n,o+1,a,1-i)}}function $e(e,t,n,r,a,i){for(;a>r;){if(a-r>600){var o=a-r+1,s=n-r+1,l=Math.log(o),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(o-u)/o)*(s-o/2<0?-1:1);$e(e,t,n,Math.max(r,Math.floor(n-s*u/o+c)),Math.min(a,Math.floor(n+(o-s)*u/o+c)),i)}var d=t[2*n+i],h=r,f=a;for(Ye(e,t,r,n),t[2*a+i]>d&&Ye(e,t,r,a);hd;)f--}t[2*r+i]===d?Ye(e,t,r,f):Ye(e,t,++f,a),f<=n&&(r=f+1),n<=f&&(a=f-1)}}function Ye(e,t,n,r){Ge(e,n,r),Ge(t,2*n,2*r),Ge(t,2*n+1,2*r+1)}function Ge(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function Xe(e,t,n,r){var a=e-n,i=t-r;return a*a+i*i}var Ke,Je={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Ze=Math.fround||(Ke=new Float32Array(1),e=>(Ke[0]=+e,Ke[0]));class Qe{constructor(e){this.options=Object.assign(Object.create(Je),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){var{log:t,minZoom:n,maxZoom:r}=this.options;t&&console.time("total time");var a="prepare ".concat(e.length," points");t&&console.time(a),this.points=e;for(var i=[],o=0;o=n;f--){var p=+Date.now();h=this.trees[f]=this._createTree(this._cluster(h,f)),t&&console.log("z%d: %d clusters in %dms",f,h.numItems,+Date.now()-p)}return t&&console.timeEnd("total time"),this}getClusters(e,t){var n=((e[0]+180)%360+360)%360-180,r=Math.max(-90,Math.min(90,e[1])),a=180===e[2]?180:((e[2]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)n=-180,a=180;else if(n>a){var o=this.getClusters([n,r,180,i],t),s=this.getClusters([-180,r,a,i],t);return o.concat(s)}var l=this.trees[this._limitZoom(t)],u=l.range(nt(n),rt(i),nt(a),rt(r)),c=l.data,d=[];for(var h of u){var f=this.stride*h;d.push(c[f+5]>1?et(c,f,this.clusterProps):this.points[c[f+3]])}return d}getChildren(e){var t=this._getOriginId(e),n=this._getOriginZoom(e),r="No cluster with the specified id.",a=this.trees[n];if(!a)throw new Error(r);var i=a.data;if(t*this.stride>=i.length)throw new Error(r);var o=this.options.radius/(this.options.extent*Math.pow(2,n-1)),s=i[t*this.stride],l=i[t*this.stride+1],u=a.within(s,l,o),c=[];for(var d of u){var h=d*this.stride;i[h+4]===e&&c.push(i[h+5]>1?et(i,h,this.clusterProps):this.points[i[h+3]])}if(0===c.length)throw new Error(r);return c}getLeaves(e,t,n){t=t||10,n=n||0;var r=[];return this._appendLeaves(r,e,t,n,0),r}getTile(e,t,n){var r=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:i,radius:o}=this.options,s=o/i,l=(n-s)/a,u=(n+1+s)/a,c={features:[]};return this._addTileFeatures(r.range((t-s)/a,l,(t+1+s)/a,u),r.data,t,n,a,c),0===t&&this._addTileFeatures(r.range(1-s/a,l,1,u),r.data,a,n,a,c),t===a-1&&this._addTileFeatures(r.range(0,l,s/a,u),r.data,-1,n,a,c),c.features.length?c:null}getClusterExpansionZoom(e){for(var t=this._getOriginZoom(e)-1;t<=this.options.maxZoom;){var n=this.getChildren(e);if(t++,1!==n.length)break;e=n[0].properties.cluster_id}return t}_appendLeaves(e,t,n,r,a){var i=this.getChildren(t);for(var o of i){var s=o.properties;if(s&&s.cluster?a+s.point_count<=r?a+=s.point_count:a=this._appendLeaves(e,s.cluster_id,n,r,a):a1,u=void 0,c=void 0,d=void 0;if(l)u=tt(t,s,this.clusterProps),c=t[s],d=t[s+1];else{var h=this.points[t[s+3]];u=h.properties;var[f,p]=h.geometry.coordinates;c=nt(f),d=rt(p)}var m={type:1,geometry:[[Math.round(this.options.extent*(c*a-n)),Math.round(this.options.extent*(d*a-r))]],tags:u},g=void 0;void 0!==(g=l||this.options.generateId?t[s+3]:this.points[t[s+3]].id)&&(m.id=g),i.features.push(m)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){for(var{radius:n,extent:r,reduce:a,minPoints:i}=this.options,o=n/(r*Math.pow(2,t)),s=e.data,l=[],u=this.stride,c=0;ct&&(m+=s[y+5])}if(m>p&&m>=i){var _=d*p,b=h*p,v=void 0,w=-1,F=(c/u<<5)+(t+1)+this.points.length;for(var k of f){var x=k*u;if(!(s[x+2]<=t)){s[x+2]=t;var A=s[x+5];_+=s[x]*A,b+=s[x+1]*A,s[x+4]=F,a&&(v||(v=this._map(s,c,!0),w=this.clusterProps.length,this.clusterProps.push(v)),a(v,this._map(s,x)))}}s[c+4]=F,l.push(_/m,b/m,1/0,F,-1,m),a&&l.push(w)}else{for(var S=0;S1)for(var E of f){var C=E*u;if(!(s[C+2]<=t)){s[C+2]=t;for(var T=0;T>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,n){if(e[t+5]>1){var r=this.clusterProps[e[t+6]];return n?Object.assign({},r):r}var a=this.points[e[t+3]].properties,i=this.options.map(a);return n&&i===a?Object.assign({},i):i}}function et(e,t,n){return{type:"Feature",id:e[t+3],properties:tt(e,t,n),geometry:{type:"Point",coordinates:[at(e[t]),it(e[t+1])]}}}function tt(e,t,n){var r=e[t+5],a=r>=1e4?"".concat(Math.round(r/1e3),"k"):r>=1e3?"".concat(Math.round(r/100)/10,"k"):r,i=e[t+6],o=-1===i?{}:Object.assign({},n[i]);return Object.assign(o,{cluster:!0,cluster_id:e[t+3],point_count:r,point_count_abbreviated:a})}function nt(e){return e/360+.5}function rt(e){var t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function at(e){return 360*(e-.5)}function it(e){var t=(180-360*e)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}function ot(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);ast.getVisible(e))).length}push(e){this.markers.push(e)}delete(){this.marker&&(st.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}var ut=(e,t,n,r)=>{var a=ct(e.getBounds(),t,r);return n.filter((e=>a.contains(st.getPosition(e))))},ct=(e,t,n)=>{var{northEast:r,southWest:a}=ft(e,t),i=pt({northEast:r,southWest:a},n);return mt(i,t)},dt=(e,t,n)=>{var r=ct(e,t,n),a=r.getNorthEast(),i=r.getSouthWest();return[i.lng(),i.lat(),a.lng(),a.lat()]},ht=(e,t)=>{var n=(t.lat-e.lat)*Math.PI/180,r=(t.lng-e.lng)*Math.PI/180,a=Math.sin(n/2),i=Math.sin(r/2),o=a*a+Math.cos(e.lat*Math.PI/180)*Math.cos(t.lat*Math.PI/180)*i*i;return 6371*(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)))},ft=(e,t)=>({northEast:t.fromLatLngToDivPixel(e.getNorthEast()),southWest:t.fromLatLngToDivPixel(e.getSouthWest())}),pt=(e,t)=>{var{northEast:n,southWest:r}=e;return n.x+=t,n.y-=t,r.x-=t,r.y+=t,{northEast:n,southWest:r}},mt=(e,t)=>{var{northEast:n,southWest:r}=e,a=t.fromDivPixelToLatLng(r),i=t.fromDivPixelToLatLng(n);return new google.maps.LatLngBounds(a,i)};class gt{constructor(e){var{maxZoom:t=16}=e;this.maxZoom=t}noop(e){var{markers:t}=e;return bt(t)}}class yt extends gt{constructor(e){var{viewportPadding:t=60}=e;super(ot(e,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=t}calculate(e){var{markers:t,map:n,mapCanvasProjection:r}=e;return n.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:!1}:{clusters:this.cluster({markers:ut(n,r,t,this.viewportPadding),map:n,mapCanvasProjection:r})}}}var _t,bt=e=>e.map((e=>new lt({position:st.getPosition(e),markers:[e]})));class vt extends gt{constructor(e){var{maxZoom:t,radius:n=60}=e,r=ot(e,["maxZoom","radius"]);super({maxZoom:t}),this.state={zoom:-1},this.superCluster=new Qe(Object.assign({maxZoom:this.maxZoom,radius:n},r))}calculate(e){var t=!1,n={zoom:e.map.getZoom()};if(!He(e.markers,this.markers)){t=!0,this.markers=[...e.markers];var r=this.markers.map((e=>{var t=st.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(r)}return t||(this.state.zoom<=this.maxZoom||n.zoom<=this.maxZoom)&&(t=!He(this.state,n)),this.state=n,t&&(this.clusters=this.cluster(e)),{clusters:this.clusters,changed:t}}cluster(e){var{map:t}=e;return this.superCluster.getClusters([-180,-90,180,90],Math.round(t.getZoom())).map((e=>this.transformCluster(e)))}transformCluster(e){var{geometry:{coordinates:[t,n]},properties:r}=e;if(r.cluster)return new lt({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:n,lng:t}});var a=r.marker;return new lt({markers:[a],position:st.getPosition(a)})}}class wt{constructor(e,t){this.markers={sum:e.length};var n=t.map((e=>e.count)),r=n.reduce(((e,t)=>e+t),0);this.clusters={count:t.length,markers:{mean:r/t.length,sum:r,min:Math.min(...n),max:Math.max(...n)}}}}class Ft{render(e,t,n){var{count:r,position:a}=e,i=r>Math.max(10,t.clusters.markers.mean)?"#ff0000":"#0000ff",o='\n\n\n\n').concat(r,"\n"),s="Cluster of ".concat(r," markers"),l=Number(google.maps.Marker.MAX_ZINDEX)+r;if(st.isAdvancedMarkerAvailable(n)){var u=(new DOMParser).parseFromString(o,"image/svg+xml").documentElement;u.setAttribute("transform","translate(0 25)");var c={map:n,position:a,zIndex:l,title:s,content:u};return new google.maps.marker.AdvancedMarkerElement(c)}var d={position:a,zIndex:l,title:s,icon:{url:"data:image/svg+xml;base64,".concat(btoa(o)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(d)}}class kt{constructor(){!function(e,t){for(var n in t.prototype)e.prototype[n]=t.prototype[n]}(kt,google.maps.OverlayView)}}!function(e){e.CLUSTERING_BEGIN="clusteringbegin",e.CLUSTERING_END="clusteringend",e.CLUSTER_CLICK="click"}(_t||(_t={}));var xt=(e,t,n)=>{n.fitBounds(t.bounds)};class At extends kt{constructor(e){var{map:t,markers:n=[],algorithmOptions:r={},algorithm:a=new vt(r),renderer:i=new Ft,onClusterClick:o=xt}=e;super(),this.markers=[...n],this.clusters=[],this.algorithm=a,this.renderer=i,this.onClusterClick=o,t&&this.setMap(t)}addMarker(e,t){this.markers.includes(e)||(this.markers.push(e),t||this.render())}addMarkers(e,t){e.forEach((e=>{this.addMarker(e,!0)})),t||this.render()}removeMarker(e,t){var n=this.markers.indexOf(e);return-1!==n&&(st.setMap(e,null),this.markers.splice(n,1),t||this.render(),!0)}removeMarkers(e,t){var n=!1;return e.forEach((e=>{n=this.removeMarker(e,!0)||n})),n&&!t&&this.render(),n}clearMarkers(e){this.markers.length=0,e||this.render()}render(){var e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,_t.CLUSTERING_BEGIN,this);var{clusters:t,changed:n}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(n||void 0==n){var r=new Set;for(var a of t)1==a.markers.length&&r.add(a.markers[0]);var i=[];for(var o of this.clusters)null!=o.marker&&(1==o.markers.length?r.has(o.marker)||st.setMap(o.marker,null):i.push(o.marker));this.clusters=t,this.renderClusters(),requestAnimationFrame((()=>i.forEach((e=>st.setMap(e,null)))))}google.maps.event.trigger(this,_t.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((e=>st.setMap(e,null))),this.clusters.forEach((e=>e.delete())),this.clusters=[]}renderClusters(){var e=new wt(this.markers,this.clusters),t=this.getMap();this.clusters.forEach((n=>{1===n.markers.length?n.marker=n.markers[0]:(n.marker=this.renderer.render(n,e,t),n.markers.forEach((e=>st.setMap(e,null))),this.onClusterClick&&n.marker.addListener("click",(e=>{google.maps.event.trigger(this,_t.CLUSTER_CLICK,n),this.onClusterClick(e,n,t)}))),st.setMap(n.marker,t)}))}}var St=Object.freeze({__proto__:null,AbstractAlgorithm:gt,AbstractViewportAlgorithm:yt,Cluster:lt,ClusterStats:wt,DefaultRenderer:Ft,GridAlgorithm:class extends yt{constructor(e){var{maxDistance:t=4e4,gridSize:n=40}=e;super(ot(e,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=t,this.gridSize=n}calculate(e){var{markers:t,map:n,mapCanvasProjection:r}=e,a={zoom:n.getZoom()},i=!1;return this.state.zoom>=this.maxZoom&&a.zoom>=this.maxZoom||(i=!He(this.state,a)),this.state=a,n.getZoom()>=this.maxZoom?{clusters:this.noop({markers:t}),changed:i}:{clusters:this.cluster({markers:ut(n,r,t,this.viewportPadding),map:n,mapCanvasProjection:r})}}cluster(e){var{markers:t,map:n,mapCanvasProjection:r}=e;return this.clusters=[],t.forEach((e=>{this.addToClosestCluster(e,n,r)})),this.clusters}addToClosestCluster(e,t,n){for(var r=this.maxDistance,a=null,i=0;i{var t=st.getPosition(e);return{type:"Feature",geometry:{type:"Point",coordinates:[t.lng(),t.lat()]},properties:{marker:e}}}));this.superCluster.load(r)}return n&&(this.clusters=this.cluster(e),this.state=t),{clusters:this.clusters,changed:n}}cluster(e){var{map:t,mapCanvasProjection:n}=e,r={zoom:Math.round(t.getZoom()),view:dt(t.getBounds(),n,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map((e=>this.transformCluster(e)))}transformCluster(e){var{geometry:{coordinates:[t,n]},properties:r}=e;if(r.cluster)return new lt({markers:this.superCluster.getLeaves(r.cluster_id,1/0).map((e=>e.properties.marker)),position:{lat:n,lng:t}});var a=r.marker;return new lt({markers:[a],position:st.getPosition(a)})}},defaultOnClusterClickHandler:xt,distanceBetweenPoints:ht,extendBoundsToPaddedViewport:ct,extendPixelBounds:pt,filterMarkersToPaddedViewport:ut,getPaddedViewport:dt,noop:bt,pixelBoundsToLatLngBounds:mt});function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ct(e){for(var t=1;t{if(t&&null===n){var a=new At(Ct(Ct({},e),{},{map:t}));r(a)}}),[t]),n}(n);return null!==r?t(r):null})),Dt={onCloseClick:"closeclick",onContentChanged:"content_changed",onDomReady:"domready",onPositionChanged:"position_changed",onZindexChanged:"zindex_changed"},It={options(e,t){e.setOptions(t)},position(e,t){e.setPosition(t)},zIndex(e,t){e.setZIndex(t)}};var Ot=(0,o.memo)((function(e){var{children:t,anchor:n,options:r,position:a,zIndex:i,onCloseClick:l,onDomReady:u,onContentChanged:c,onPositionChanged:d,onZindexChanged:p,onLoad:m,onUnmount:g}=e,y=(0,o.useContext)(f),[_,b]=(0,o.useState)(null),[v,w]=(0,o.useState)(null),[F,k]=(0,o.useState)(null),[x,A]=(0,o.useState)(null),[S,E]=(0,o.useState)(null),[C,T]=(0,o.useState)(null),D=(0,o.useRef)(null);return(0,o.useEffect)((()=>{null!==_&&(_.close(),n?_.open(y,n):_.getPosition()&&_.open(y))}),[y,_,n]),(0,o.useEffect)((()=>{r&&null!==_&&_.setOptions(r)}),[_,r]),(0,o.useEffect)((()=>{a&&null!==_&&_.setPosition(a)}),[a]),(0,o.useEffect)((()=>{"number"===typeof i&&null!==_&&_.setZIndex(i)}),[i]),(0,o.useEffect)((()=>{_&&l&&(null!==v&&google.maps.event.removeListener(v),w(google.maps.event.addListener(_,"closeclick",l)))}),[l]),(0,o.useEffect)((()=>{_&&u&&(null!==F&&google.maps.event.removeListener(F),k(google.maps.event.addListener(_,"domready",u)))}),[u]),(0,o.useEffect)((()=>{_&&c&&(null!==x&&google.maps.event.removeListener(x),A(google.maps.event.addListener(_,"content_changed",c)))}),[c]),(0,o.useEffect)((()=>{_&&d&&(null!==S&&google.maps.event.removeListener(S),E(google.maps.event.addListener(_,"position_changed",d)))}),[d]),(0,o.useEffect)((()=>{_&&p&&(null!==C&&google.maps.event.removeListener(C),T(google.maps.event.addListener(_,"zindex_changed",p)))}),[p]),(0,o.useEffect)((()=>{var e=new google.maps.InfoWindow(r);return b(e),D.current=document.createElement("div"),l&&w(google.maps.event.addListener(e,"closeclick",l)),u&&k(google.maps.event.addListener(e,"domready",u)),c&&A(google.maps.event.addListener(e,"content_changed",c)),d&&E(google.maps.event.addListener(e,"position_changed",d)),p&&T(google.maps.event.addListener(e,"zindex_changed",p)),e.setContent(D.current),a&&e.setPosition(a),i&&e.setZIndex(i),n?e.open(y,n):e.getPosition()?e.open(y):h(!1,"You must provide either an anchor (typically render it inside a ) or a position props for ."),m&&m(e),()=>{v&&google.maps.event.removeListener(v),x&&google.maps.event.removeListener(x),F&&google.maps.event.removeListener(F),S&&google.maps.event.removeListener(S),C&&google.maps.event.removeListener(C),g&&g(e),e.close()}}),[]),D.current?(0,s.createPortal)(o.Children.only(t),D.current):null}));class Pt extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"containerElement",null),c(this,"state",{infoWindow:null}),c(this,"open",((e,t)=>{t?e.open(this.context,t):e.getPosition()?e.open(this.context):h(!1,"You must provide either an anchor (typically render it inside a ) or a position props for .")})),c(this,"setInfoWindowCallback",(()=>{null!==this.state.infoWindow&&null!==this.containerElement&&(this.state.infoWindow.setContent(this.containerElement),this.open(this.state.infoWindow,this.props.anchor),this.props.onLoad&&this.props.onLoad(this.state.infoWindow))}))}componentDidMount(){var e=new google.maps.InfoWindow(this.props.options);this.containerElement=document.createElement("div"),this.registeredEvents=b({updaterMap:It,eventMap:Dt,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({infoWindow:e})),this.setInfoWindowCallback)}componentDidUpdate(e){null!==this.state.infoWindow&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:It,eventMap:Dt,prevProps:e,nextProps:this.props,instance:this.state.infoWindow}))}componentWillUnmount(){null!==this.state.infoWindow&&(_(this.registeredEvents),this.props.onUnmount&&this.props.onUnmount(this.state.infoWindow),this.state.infoWindow.close())}render(){return this.containerElement?(0,s.createPortal)(o.Children.only(this.props.children),this.containerElement):null}}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rt(e){for(var t=1;t{null!==F&&F.setMap(w)}),[w]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==F&&F.setOptions(t)}),[F,t]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==F&&F.setDraggable(n)}),[F,n]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==F&&F.setEditable(r)}),[F,r]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==F&&F.setVisible(a)}),[F,a]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==F&&F.setPath(i)}),[F,i]),(0,o.useEffect)((()=>{F&&s&&(null!==x&&google.maps.event.removeListener(x),A(google.maps.event.addListener(F,"dblclick",s)))}),[s]),(0,o.useEffect)((()=>{F&&l&&(null!==S&&google.maps.event.removeListener(S),E(google.maps.event.addListener(F,"dragend",l)))}),[l]),(0,o.useEffect)((()=>{F&&u&&(null!==C&&google.maps.event.removeListener(C),T(google.maps.event.addListener(F,"dragstart",u)))}),[u]),(0,o.useEffect)((()=>{F&&c&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(F,"mousedown",c)))}),[c]),(0,o.useEffect)((()=>{F&&d&&(null!==O&&google.maps.event.removeListener(O),P(google.maps.event.addListener(F,"mousemove",d)))}),[d]),(0,o.useEffect)((()=>{F&&h&&(null!==M&&google.maps.event.removeListener(M),R(google.maps.event.addListener(F,"mouseout",h)))}),[h]),(0,o.useEffect)((()=>{F&&p&&(null!==L&&google.maps.event.removeListener(L),N(google.maps.event.addListener(F,"mouseover",p)))}),[p]),(0,o.useEffect)((()=>{F&&m&&(null!==B&&google.maps.event.removeListener(B),j(google.maps.event.addListener(F,"mouseup",m)))}),[m]),(0,o.useEffect)((()=>{F&&g&&(null!==V&&google.maps.event.removeListener(V),z(google.maps.event.addListener(F,"rightclick",g)))}),[g]),(0,o.useEffect)((()=>{F&&y&&(null!==H&&google.maps.event.removeListener(H),U(google.maps.event.addListener(F,"click",y)))}),[y]),(0,o.useEffect)((()=>{F&&_&&(null!==W&&google.maps.event.removeListener(W),q(google.maps.event.addListener(F,"drag",_)))}),[_]),(0,o.useEffect)((()=>{var e=new google.maps.Polyline(Rt(Rt({},t||Bt),{},{map:w}));return i&&e.setPath(i),"undefined"!==typeof a&&e.setVisible(a),"undefined"!==typeof r&&e.setEditable(r),"undefined"!==typeof n&&e.setDraggable(n),s&&A(google.maps.event.addListener(e,"dblclick",s)),l&&E(google.maps.event.addListener(e,"dragend",l)),u&&T(google.maps.event.addListener(e,"dragstart",u)),c&&I(google.maps.event.addListener(e,"mousedown",c)),d&&P(google.maps.event.addListener(e,"mousemove",d)),h&&R(google.maps.event.addListener(e,"mouseout",h)),p&&N(google.maps.event.addListener(e,"mouseover",p)),m&&j(google.maps.event.addListener(e,"mouseup",m)),g&&z(google.maps.event.addListener(e,"rightclick",g)),y&&U(google.maps.event.addListener(e,"click",y)),_&&q(google.maps.event.addListener(e,"drag",_)),k(e),b&&b(e),()=>{null!==x&&google.maps.event.removeListener(x),null!==S&&google.maps.event.removeListener(S),null!==C&&google.maps.event.removeListener(C),null!==D&&google.maps.event.removeListener(D),null!==O&&google.maps.event.removeListener(O),null!==M&&google.maps.event.removeListener(M),null!==L&&google.maps.event.removeListener(L),null!==B&&google.maps.event.removeListener(B),null!==V&&google.maps.event.removeListener(V),null!==H&&google.maps.event.removeListener(H),v&&v(e),e.setMap(null)}}),[]),null}));class Vt extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{polyline:null}),c(this,"setPolylineCallback",(()=>{null!==this.state.polyline&&this.props.onLoad&&this.props.onLoad(this.state.polyline)}))}componentDidMount(){var e=new google.maps.Polyline(Rt(Rt({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:Nt,eventMap:Lt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{polyline:e}}),this.setPolylineCallback)}componentDidUpdate(e){null!==this.state.polyline&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Nt,eventMap:Lt,prevProps:e,nextProps:this.props,instance:this.state.polyline}))}componentWillUnmount(){null!==this.state.polyline&&(this.props.onUnmount&&this.props.onUnmount(this.state.polyline),_(this.registeredEvents),this.state.polyline.setMap(null))}render(){return null}}function zt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ht(e){for(var t=1;t{null!==x&&x.setMap(k)}),[k]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==x&&x.setOptions(t)}),[x,t]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==x&&x.setDraggable(n)}),[x,n]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==x&&x.setEditable(r)}),[x,r]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==x&&x.setVisible(a)}),[x,a]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==x&&x.setPath(i)}),[x,i]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==x&&x.setPaths(s)}),[x,s]),(0,o.useEffect)((()=>{x&&"function"===typeof l&&(null!==S&&google.maps.event.removeListener(S),E(google.maps.event.addListener(x,"dblclick",l)))}),[l]),(0,o.useEffect)((()=>{x&&(google.maps.event.addListener(x.getPath(),"insert_at",(()=>{null===F||void 0===F||F(x)})),google.maps.event.addListener(x.getPath(),"set_at",(()=>{null===F||void 0===F||F(x)})),google.maps.event.addListener(x.getPath(),"remove_at",(()=>{null===F||void 0===F||F(x)})))}),[x,F]),(0,o.useEffect)((()=>{x&&"function"===typeof u&&(null!==C&&google.maps.event.removeListener(C),T(google.maps.event.addListener(x,"dragend",u)))}),[u]),(0,o.useEffect)((()=>{x&&"function"===typeof c&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(x,"dragstart",c)))}),[c]),(0,o.useEffect)((()=>{x&&"function"===typeof d&&(null!==O&&google.maps.event.removeListener(O),P(google.maps.event.addListener(x,"mousedown",d)))}),[d]),(0,o.useEffect)((()=>{x&&"function"===typeof h&&(null!==M&&google.maps.event.removeListener(M),R(google.maps.event.addListener(x,"mousemove",h)))}),[h]),(0,o.useEffect)((()=>{x&&"function"===typeof p&&(null!==L&&google.maps.event.removeListener(L),N(google.maps.event.addListener(x,"mouseout",p)))}),[p]),(0,o.useEffect)((()=>{x&&"function"===typeof m&&(null!==B&&google.maps.event.removeListener(B),j(google.maps.event.addListener(x,"mouseover",m)))}),[m]),(0,o.useEffect)((()=>{x&&"function"===typeof g&&(null!==V&&google.maps.event.removeListener(V),z(google.maps.event.addListener(x,"mouseup",g)))}),[g]),(0,o.useEffect)((()=>{x&&"function"===typeof y&&(null!==H&&google.maps.event.removeListener(H),U(google.maps.event.addListener(x,"rightclick",y)))}),[y]),(0,o.useEffect)((()=>{x&&"function"===typeof _&&(null!==W&&google.maps.event.removeListener(W),q(google.maps.event.addListener(x,"click",_)))}),[_]),(0,o.useEffect)((()=>{x&&"function"===typeof b&&(null!==$&&google.maps.event.removeListener($),Y(google.maps.event.addListener(x,"drag",b)))}),[b]),(0,o.useEffect)((()=>{var e=new google.maps.Polygon(Ht(Ht({},t),{},{map:k}));return i&&e.setPath(i),s&&e.setPaths(s),"undefined"!==typeof a&&e.setVisible(a),"undefined"!==typeof r&&e.setEditable(r),"undefined"!==typeof n&&e.setDraggable(n),l&&E(google.maps.event.addListener(e,"dblclick",l)),u&&T(google.maps.event.addListener(e,"dragend",u)),c&&I(google.maps.event.addListener(e,"dragstart",c)),d&&P(google.maps.event.addListener(e,"mousedown",d)),h&&R(google.maps.event.addListener(e,"mousemove",h)),p&&N(google.maps.event.addListener(e,"mouseout",p)),m&&j(google.maps.event.addListener(e,"mouseover",m)),g&&z(google.maps.event.addListener(e,"mouseup",g)),y&&U(google.maps.event.addListener(e,"rightclick",y)),_&&q(google.maps.event.addListener(e,"click",_)),b&&Y(google.maps.event.addListener(e,"drag",b)),A(e),v&&v(e),()=>{null!==S&&google.maps.event.removeListener(S),null!==C&&google.maps.event.removeListener(C),null!==D&&google.maps.event.removeListener(D),null!==O&&google.maps.event.removeListener(O),null!==M&&google.maps.event.removeListener(M),null!==L&&google.maps.event.removeListener(L),null!==B&&google.maps.event.removeListener(B),null!==V&&google.maps.event.removeListener(V),null!==H&&google.maps.event.removeListener(H),null!==W&&google.maps.event.removeListener(W),w&&w(e),e.setMap(null)}}),[]),null}));class $t extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[])}componentDidMount(){var e=this.props.options||{};this.polygon=new google.maps.Polygon(e),this.polygon.setMap(this.context),this.registeredEvents=b({updaterMap:Wt,eventMap:Ut,prevProps:{},nextProps:this.props,instance:this.polygon}),this.props.onLoad&&this.props.onLoad(this.polygon)}componentDidUpdate(e){this.polygon&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Wt,eventMap:Ut,prevProps:e,nextProps:this.props,instance:this.polygon}))}componentWillUnmount(){this.polygon&&(this.props.onUnmount&&this.props.onUnmount(this.polygon),_(this.registeredEvents),this.polygon&&this.polygon.setMap(null))}render(){return null}}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Gt(e){for(var t=1;t{null!==k&&k.setMap(F)}),[F]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==k&&k.setOptions(t)}),[k,t]),(0,o.useEffect)((()=>{"undefined"!==typeof r&&null!==k&&k.setDraggable(r)}),[k,r]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==k&&k.setEditable(a)}),[k,a]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==k&&k.setVisible(i)}),[k,i]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==k&&k.setBounds(n)}),[k,n]),(0,o.useEffect)((()=>{k&&s&&(null!==A&&google.maps.event.removeListener(A),S(google.maps.event.addListener(k,"dblclick",s)))}),[s]),(0,o.useEffect)((()=>{k&&l&&(null!==E&&google.maps.event.removeListener(E),C(google.maps.event.addListener(k,"dragend",l)))}),[l]),(0,o.useEffect)((()=>{k&&u&&(null!==T&&google.maps.event.removeListener(T),D(google.maps.event.addListener(k,"dragstart",u)))}),[u]),(0,o.useEffect)((()=>{k&&c&&(null!==I&&google.maps.event.removeListener(I),O(google.maps.event.addListener(k,"mousedown",c)))}),[c]),(0,o.useEffect)((()=>{k&&d&&(null!==P&&google.maps.event.removeListener(P),M(google.maps.event.addListener(k,"mousemove",d)))}),[d]),(0,o.useEffect)((()=>{k&&h&&(null!==R&&google.maps.event.removeListener(R),L(google.maps.event.addListener(k,"mouseout",h)))}),[h]),(0,o.useEffect)((()=>{k&&p&&(null!==N&&google.maps.event.removeListener(N),B(google.maps.event.addListener(k,"mouseover",p)))}),[p]),(0,o.useEffect)((()=>{k&&m&&(null!==j&&google.maps.event.removeListener(j),V(google.maps.event.addListener(k,"mouseup",m)))}),[m]),(0,o.useEffect)((()=>{k&&g&&(null!==z&&google.maps.event.removeListener(z),H(google.maps.event.addListener(k,"rightclick",g)))}),[g]),(0,o.useEffect)((()=>{k&&y&&(null!==U&&google.maps.event.removeListener(U),W(google.maps.event.addListener(k,"click",y)))}),[y]),(0,o.useEffect)((()=>{k&&_&&(null!==q&&google.maps.event.removeListener(q),$(google.maps.event.addListener(k,"drag",_)))}),[_]),(0,o.useEffect)((()=>{k&&b&&(null!==Y&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(k,"bounds_changed",b)))}),[b]),(0,o.useEffect)((()=>{var e=new google.maps.Rectangle(Gt(Gt({},t),{},{map:F}));return"undefined"!==typeof i&&e.setVisible(i),"undefined"!==typeof a&&e.setEditable(a),"undefined"!==typeof r&&e.setDraggable(r),"undefined"!==typeof n&&e.setBounds(n),s&&S(google.maps.event.addListener(e,"dblclick",s)),l&&C(google.maps.event.addListener(e,"dragend",l)),u&&D(google.maps.event.addListener(e,"dragstart",u)),c&&O(google.maps.event.addListener(e,"mousedown",c)),d&&M(google.maps.event.addListener(e,"mousemove",d)),h&&L(google.maps.event.addListener(e,"mouseout",h)),p&&B(google.maps.event.addListener(e,"mouseover",p)),m&&V(google.maps.event.addListener(e,"mouseup",m)),g&&H(google.maps.event.addListener(e,"rightclick",g)),y&&W(google.maps.event.addListener(e,"click",y)),_&&$(google.maps.event.addListener(e,"drag",_)),b&&G(google.maps.event.addListener(e,"bounds_changed",b)),x(e),v&&v(e),()=>{null!==A&&google.maps.event.removeListener(A),null!==E&&google.maps.event.removeListener(E),null!==T&&google.maps.event.removeListener(T),null!==I&&google.maps.event.removeListener(I),null!==P&&google.maps.event.removeListener(P),null!==R&&google.maps.event.removeListener(R),null!==N&&google.maps.event.removeListener(N),null!==j&&google.maps.event.removeListener(j),null!==z&&google.maps.event.removeListener(z),null!==U&&google.maps.event.removeListener(U),null!==q&&google.maps.event.removeListener(q),null!==Y&&google.maps.event.removeListener(Y),w&&w(e),e.setMap(null)}}),[]),null}));class Zt extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{rectangle:null}),c(this,"setRectangleCallback",(()=>{null!==this.state.rectangle&&this.props.onLoad&&this.props.onLoad(this.state.rectangle)}))}componentDidMount(){var e=new google.maps.Rectangle(Gt(Gt({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:Kt,eventMap:Xt,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{rectangle:e}}),this.setRectangleCallback)}componentDidUpdate(e){null!==this.state.rectangle&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Kt,eventMap:Xt,prevProps:e,nextProps:this.props,instance:this.state.rectangle}))}componentWillUnmount(){null!==this.state.rectangle&&(this.props.onUnmount&&this.props.onUnmount(this.state.rectangle),_(this.registeredEvents),this.state.rectangle.setMap(null))}render(){return null}}function Qt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function en(e){for(var t=1;t{null!==A&&A.setMap(x)}),[x]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==A&&A.setOptions(t)}),[A,t]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==A&&A.setDraggable(a)}),[A,a]),(0,o.useEffect)((()=>{"undefined"!==typeof i&&null!==A&&A.setEditable(i)}),[A,i]),(0,o.useEffect)((()=>{"undefined"!==typeof s&&null!==A&&A.setVisible(s)}),[A,s]),(0,o.useEffect)((()=>{"number"===typeof r&&null!==A&&A.setRadius(r)}),[A,r]),(0,o.useEffect)((()=>{"undefined"!==typeof n&&null!==A&&A.setCenter(n)}),[A,n]),(0,o.useEffect)((()=>{A&&l&&(null!==E&&google.maps.event.removeListener(E),C(google.maps.event.addListener(A,"dblclick",l)))}),[l]),(0,o.useEffect)((()=>{A&&u&&(null!==T&&google.maps.event.removeListener(T),D(google.maps.event.addListener(A,"dragend",u)))}),[u]),(0,o.useEffect)((()=>{A&&c&&(null!==I&&google.maps.event.removeListener(I),O(google.maps.event.addListener(A,"dragstart",c)))}),[c]),(0,o.useEffect)((()=>{A&&d&&(null!==P&&google.maps.event.removeListener(P),M(google.maps.event.addListener(A,"mousedown",d)))}),[d]),(0,o.useEffect)((()=>{A&&h&&(null!==R&&google.maps.event.removeListener(R),L(google.maps.event.addListener(A,"mousemove",h)))}),[h]),(0,o.useEffect)((()=>{A&&p&&(null!==N&&google.maps.event.removeListener(N),B(google.maps.event.addListener(A,"mouseout",p)))}),[p]),(0,o.useEffect)((()=>{A&&m&&(null!==j&&google.maps.event.removeListener(j),V(google.maps.event.addListener(A,"mouseover",m)))}),[m]),(0,o.useEffect)((()=>{A&&g&&(null!==z&&google.maps.event.removeListener(z),H(google.maps.event.addListener(A,"mouseup",g)))}),[g]),(0,o.useEffect)((()=>{A&&y&&(null!==U&&google.maps.event.removeListener(U),W(google.maps.event.addListener(A,"rightclick",y)))}),[y]),(0,o.useEffect)((()=>{A&&_&&(null!==q&&google.maps.event.removeListener(q),$(google.maps.event.addListener(A,"click",_)))}),[_]),(0,o.useEffect)((()=>{A&&b&&(null!==Y&&google.maps.event.removeListener(Y),G(google.maps.event.addListener(A,"drag",b)))}),[b]),(0,o.useEffect)((()=>{A&&v&&(null!==X&&google.maps.event.removeListener(X),K(google.maps.event.addListener(A,"center_changed",v)))}),[_]),(0,o.useEffect)((()=>{A&&w&&(null!==J&&google.maps.event.removeListener(J),Z(google.maps.event.addListener(A,"radius_changed",w)))}),[w]),(0,o.useEffect)((()=>{var e=new google.maps.Circle(en(en({},t||rn),{},{map:x}));return"number"===typeof r&&e.setRadius(r),"undefined"!==typeof n&&e.setCenter(n),"number"===typeof r&&e.setRadius(r),"undefined"!==typeof s&&e.setVisible(s),"undefined"!==typeof i&&e.setEditable(i),"undefined"!==typeof a&&e.setDraggable(a),l&&C(google.maps.event.addListener(e,"dblclick",l)),u&&D(google.maps.event.addListener(e,"dragend",u)),c&&O(google.maps.event.addListener(e,"dragstart",c)),d&&M(google.maps.event.addListener(e,"mousedown",d)),h&&L(google.maps.event.addListener(e,"mousemove",h)),p&&B(google.maps.event.addListener(e,"mouseout",p)),m&&V(google.maps.event.addListener(e,"mouseover",m)),g&&H(google.maps.event.addListener(e,"mouseup",g)),y&&W(google.maps.event.addListener(e,"rightclick",y)),_&&$(google.maps.event.addListener(e,"click",_)),b&&G(google.maps.event.addListener(e,"drag",b)),v&&K(google.maps.event.addListener(e,"center_changed",v)),w&&Z(google.maps.event.addListener(e,"radius_changed",w)),S(e),F&&F(e),()=>{null!==E&&google.maps.event.removeListener(E),null!==T&&google.maps.event.removeListener(T),null!==I&&google.maps.event.removeListener(I),null!==P&&google.maps.event.removeListener(P),null!==R&&google.maps.event.removeListener(R),null!==N&&google.maps.event.removeListener(N),null!==j&&google.maps.event.removeListener(j),null!==z&&google.maps.event.removeListener(z),null!==U&&google.maps.event.removeListener(U),null!==q&&google.maps.event.removeListener(q),null!==X&&google.maps.event.removeListener(X),null!==J&&google.maps.event.removeListener(J),k&&k(e),e.setMap(null)}}),[]),null}));class on extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{circle:null}),c(this,"setCircleCallback",(()=>{null!==this.state.circle&&this.props.onLoad&&this.props.onLoad(this.state.circle)}))}componentDidMount(){var e=new google.maps.Circle(en(en({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:nn,eventMap:tn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{circle:e}}),this.setCircleCallback)}componentDidUpdate(e){null!==this.state.circle&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:nn,eventMap:tn,prevProps:e,nextProps:this.props,instance:this.state.circle}))}componentWillUnmount(){var e;null!==this.state.circle&&(this.props.onUnmount&&this.props.onUnmount(this.state.circle),_(this.registeredEvents),null===(e=this.state.circle)||void 0===e||e.setMap(null))}render(){return null}}function sn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t{null!==v&&v.setMap(b)}),[b]),(0,o.useEffect)((()=>{v&&r&&(null!==F&&google.maps.event.removeListener(F),k(google.maps.event.addListener(v,"dblclick",r)))}),[r]),(0,o.useEffect)((()=>{v&&a&&(null!==x&&google.maps.event.removeListener(x),A(google.maps.event.addListener(v,"mousedown",a)))}),[a]),(0,o.useEffect)((()=>{v&&i&&(null!==S&&google.maps.event.removeListener(S),E(google.maps.event.addListener(v,"mousemove",i)))}),[i]),(0,o.useEffect)((()=>{v&&s&&(null!==C&&google.maps.event.removeListener(C),T(google.maps.event.addListener(v,"mouseout",s)))}),[s]),(0,o.useEffect)((()=>{v&&l&&(null!==D&&google.maps.event.removeListener(D),I(google.maps.event.addListener(v,"mouseover",l)))}),[l]),(0,o.useEffect)((()=>{v&&u&&(null!==O&&google.maps.event.removeListener(O),P(google.maps.event.addListener(v,"mouseup",u)))}),[u]),(0,o.useEffect)((()=>{v&&c&&(null!==M&&google.maps.event.removeListener(M),R(google.maps.event.addListener(v,"rightclick",c)))}),[c]),(0,o.useEffect)((()=>{v&&n&&(null!==L&&google.maps.event.removeListener(L),N(google.maps.event.addListener(v,"click",n)))}),[n]),(0,o.useEffect)((()=>{v&&d&&(null!==B&&google.maps.event.removeListener(B),j(google.maps.event.addListener(v,"addfeature",d)))}),[d]),(0,o.useEffect)((()=>{v&&h&&(null!==V&&google.maps.event.removeListener(V),z(google.maps.event.addListener(v,"removefeature",h)))}),[h]),(0,o.useEffect)((()=>{v&&p&&(null!==H&&google.maps.event.removeListener(H),U(google.maps.event.addListener(v,"removeproperty",p)))}),[p]),(0,o.useEffect)((()=>{v&&m&&(null!==W&&google.maps.event.removeListener(W),q(google.maps.event.addListener(v,"setgeometry",m)))}),[m]),(0,o.useEffect)((()=>{v&&g&&(null!==$&&google.maps.event.removeListener($),Y(google.maps.event.addListener(v,"setproperty",g)))}),[g]),(0,o.useEffect)((()=>{if(null!==b){var e=new google.maps.Data(ln(ln({},t),{},{map:b}));r&&k(google.maps.event.addListener(e,"dblclick",r)),a&&A(google.maps.event.addListener(e,"mousedown",a)),i&&E(google.maps.event.addListener(e,"mousemove",i)),s&&T(google.maps.event.addListener(e,"mouseout",s)),l&&I(google.maps.event.addListener(e,"mouseover",l)),u&&P(google.maps.event.addListener(e,"mouseup",u)),c&&R(google.maps.event.addListener(e,"rightclick",c)),n&&N(google.maps.event.addListener(e,"click",n)),d&&j(google.maps.event.addListener(e,"addfeature",d)),h&&z(google.maps.event.addListener(e,"removefeature",h)),p&&U(google.maps.event.addListener(e,"removeproperty",p)),m&&q(google.maps.event.addListener(e,"setgeometry",m)),g&&Y(google.maps.event.addListener(e,"setproperty",g)),w(e),y&&y(e)}return()=>{v&&(null!==F&&google.maps.event.removeListener(F),null!==x&&google.maps.event.removeListener(x),null!==S&&google.maps.event.removeListener(S),null!==C&&google.maps.event.removeListener(C),null!==D&&google.maps.event.removeListener(D),null!==O&&google.maps.event.removeListener(O),null!==M&&google.maps.event.removeListener(M),null!==L&&google.maps.event.removeListener(L),null!==B&&google.maps.event.removeListener(B),null!==V&&google.maps.event.removeListener(V),null!==H&&google.maps.event.removeListener(H),null!==W&&google.maps.event.removeListener(W),null!==$&&google.maps.event.removeListener($),_&&_(v),v.setMap(null))}}),[]),null}));class hn extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{data:null}),c(this,"setDataCallback",(()=>{null!==this.state.data&&this.props.onLoad&&this.props.onLoad(this.state.data)}))}componentDidMount(){if(null!==this.context){var e=new google.maps.Data(ln(ln({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:cn,eventMap:un,prevProps:{},nextProps:this.props,instance:e}),this.setState((()=>({data:e})),this.setDataCallback)}}componentDidUpdate(e){null!==this.state.data&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:cn,eventMap:un,prevProps:e,nextProps:this.props,instance:this.state.data}))}componentWillUnmount(){null!==this.state.data&&(this.props.onUnmount&&this.props.onUnmount(this.state.data),_(this.registeredEvents),this.state.data&&this.state.data.setMap(null))}render(){return null}}function fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pn(e){for(var t=1;t{null!==this.state.kmlLayer&&this.props.onLoad&&this.props.onLoad(this.state.kmlLayer)}))}componentDidMount(){var e=new google.maps.KmlLayer(pn(pn({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:gn,eventMap:mn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{kmlLayer:e}}),this.setKmlLayerCallback)}componentDidUpdate(e){null!==this.state.kmlLayer&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:gn,eventMap:mn,prevProps:e,nextProps:this.props,instance:this.state.kmlLayer}))}componentWillUnmount(){null!==this.state.kmlLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.kmlLayer),_(this.registeredEvents),this.state.kmlLayer.setMap(null))}render(){return null}}function _n(e,t){return"function"===typeof t?t(e.offsetWidth,e.offsetHeight):{x:0,y:0}}function bn(e,t){return new t(e.lat,e.lng)}function vn(e,t){return new t(new google.maps.LatLng(e.ne.lat,e.ne.lng),new google.maps.LatLng(e.sw.lat,e.sw.lng))}function wn(e,t,n,r){return void 0!==n?function(e,t,n){var r=e&&e.fromLatLngToDivPixel(n.getNorthEast()),a=e&&e.fromLatLngToDivPixel(n.getSouthWest());return r&&a?{left:"".concat(a.x+t.x,"px"),top:"".concat(r.y+t.y,"px"),width:"".concat(r.x-a.x-t.x,"px"),height:"".concat(a.y-r.y-t.y,"px")}:{left:"-9999px",top:"-9999px"}}(e,t,(a=n,i=google.maps.LatLngBounds,o=vn,a instanceof i?a:o(a,i))):function(e,t,n){var r=e&&e.fromLatLngToDivPixel(n);if(r){var{x:a,y:i}=r;return{left:"".concat(a+t.x,"px"),top:"".concat(i+t.y,"px")}}return{left:"-9999px",top:"-9999px"}}(e,t,function(e,t,n){return e instanceof t?e:n(e,t)}(r,google.maps.LatLng,bn));var a,i,o}function Fn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kn(e,t,n,r,a){class i extends google.maps.OverlayView{constructor(e,t,n,r){super(),this.container=e,this.pane=t,this.position=n,this.bounds=r}onAdd(){var e,t=null===(e=this.getPanes())||void 0===e?void 0:e[this.pane];null===t||void 0===t||t.appendChild(this.container)}draw(){var e=this.getProjection(),t=function(e){for(var t=1;t{var e=document.createElement("div");return e.style.position="absolute",e}),[]),p=(0,o.useMemo)((()=>kn(h,r,t,n,u)),[h,r,t,n]);return(0,o.useEffect)((()=>(null===i||void 0===i||i(p),null===p||void 0===p||p.setMap(d),()=>{null===l||void 0===l||l(p),null===p||void 0===p||p.setMap(null)})),[d,p]),(0,o.useEffect)((()=>{h.style.zIndex="".concat(a)}),[a,h]),s.createPortal(c,h)}));class Pn extends o.PureComponent{constructor(e){super(e),c(this,"state",{paneEl:null,containerStyle:{position:"absolute"}}),c(this,"updatePane",(()=>{var e=this.props.mapPaneName,t=this.overlayView.getPanes();h(!!e,"OverlayView requires props.mapPaneName but got %s",e),t?this.setState({paneEl:t[e]}):this.setState({paneEl:null})})),c(this,"onAdd",(()=>{var e,t;this.updatePane(),null===(e=(t=this.props).onLoad)||void 0===e||e.call(t,this.overlayView)})),c(this,"onPositionElement",(()=>{var e,t,n,r,a,i,o=this.overlayView.getProjection(),s=function(e){for(var t=1;t{this.onPositionElement()})),c(this,"onRemove",(()=>{var e,t;this.setState((()=>({paneEl:null}))),null===(e=(t=this.props).onUnmount)||void 0===e||e.call(t,this.overlayView)})),this.containerRef=(0,o.createRef)();var t=new google.maps.OverlayView;t.onAdd=this.onAdd,t.draw=this.draw,t.onRemove=this.onRemove,this.overlayView=t}componentDidMount(){this.overlayView.setMap(this.context)}componentDidUpdate(e){var t=An(e.position),n=An(this.props.position),r=Sn(e.bounds),a=Sn(this.props.bounds);t===n&&r===a||this.overlayView.draw(),e.mapPaneName!==this.props.mapPaneName&&this.updatePane()}componentWillUnmount(){this.overlayView.setMap(null)}render(){var e=this.state.paneEl;return e?s.createPortal((0,i.jsx)("div",{ref:this.containerRef,style:this.state.containerStyle,children:o.Children.only(this.props.children)}),e):null}}function Mn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Rn(e){for(var t=1;tnew google.maps.GroundOverlay(t,s,r)),[]);return(0,o.useEffect)((()=>{null!==l&&l.setMap(i)}),[i]),(0,o.useEffect)((()=>{"undefined"!==typeof t&&null!==l&&(l.set("url",t),l.setMap(i))}),[l,t]),(0,o.useEffect)((()=>{"undefined"!==typeof a&&null!==l&&l.setOpacity(a?1:0)}),[l,a]),(0,o.useEffect)((()=>{var e=new google.maps.LatLngBounds(new google.maps.LatLng(n.south,n.west),new google.maps.LatLng(n.north,n.east));"undefined"!==typeof n&&null!==l&&(l.set("bounds",e),l.setMap(i))}),[l,n]),null}));class jn extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{groundOverlay:null}),c(this,"setGroundOverlayCallback",(()=>{null!==this.state.groundOverlay&&this.props.onLoad&&this.props.onLoad(this.state.groundOverlay)}))}componentDidMount(){h(!!this.props.url||!!this.props.bounds,"For GroundOverlay, url and bounds are passed in to constructor and are immutable after instantiated. This is the behavior of Google Maps JavaScript API v3 ( See https://developers.google.com/maps/documentation/javascript/reference#GroundOverlay) Hence, use the corresponding two props provided by `react-google-maps-api`, url and bounds. In some cases, you'll need the GroundOverlay component to reflect the changes of url and bounds. You can leverage the React's key property to remount the component. Typically, just `key={url}` would serve your need. See https://github.com/tomchentw/react-google-maps/issues/655");var e=new google.maps.GroundOverlay(this.props.url,this.props.bounds,Rn(Rn({},this.props.options),{},{map:this.context}));this.registeredEvents=b({updaterMap:Nn,eventMap:Ln,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{groundOverlay:e}}),this.setGroundOverlayCallback)}componentDidUpdate(e){null!==this.state.groundOverlay&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Nn,eventMap:Ln,prevProps:e,nextProps:this.props,instance:this.state.groundOverlay}))}componentWillUnmount(){this.state.groundOverlay&&(this.props.onUnmount&&this.props.onUnmount(this.state.groundOverlay),this.state.groundOverlay.setMap(null))}render(){return null}}function Vn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function zn(e){for(var t=1;t{google.maps.visualization||h(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} in useJsApiScript? %s',google.maps.visualization)}),[]),(0,o.useEffect)((()=>{h(!!t,"data property is required in HeatmapLayer %s",t)}),[t]),(0,o.useEffect)((()=>{null!==s&&s.setMap(i)}),[i]),(0,o.useEffect)((()=>{a&&null!==s&&s.setOptions(a)}),[s,a]),(0,o.useEffect)((()=>{var e=new google.maps.visualization.HeatmapLayer(zn(zn({},a),{},{data:t,map:i}));return l(e),n&&n(e),()=>{null!==s&&(r&&r(s),s.setMap(null))}}),[]),null}));class qn extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{heatmapLayer:null}),c(this,"setHeatmapLayerCallback",(()=>{null!==this.state.heatmapLayer&&this.props.onLoad&&this.props.onLoad(this.state.heatmapLayer)}))}componentDidMount(){h(!!google.maps.visualization,'Did you include prop libraries={["visualization"]} to ? %s',google.maps.visualization),h(!!this.props.data,"data property is required in HeatmapLayer %s",this.props.data);var e=new google.maps.visualization.HeatmapLayer(zn(zn({},this.props.options),{},{data:this.props.data,map:this.context}));this.registeredEvents=b({updaterMap:Un,eventMap:Hn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{heatmapLayer:e}}),this.setHeatmapLayerCallback)}componentDidUpdate(e){_(this.registeredEvents),this.registeredEvents=b({updaterMap:Un,eventMap:Hn,prevProps:e,nextProps:this.props,instance:this.state.heatmapLayer})}componentWillUnmount(){null!==this.state.heatmapLayer&&(this.props.onUnmount&&this.props.onUnmount(this.state.heatmapLayer),_(this.registeredEvents),this.state.heatmapLayer.setMap(null))}render(){return null}}c(qn,"contextType",f);var $n={onCloseClick:"closeclick",onPanoChanged:"pano_changed",onPositionChanged:"position_changed",onPovChanged:"pov_changed",onResize:"resize",onStatusChanged:"status_changed",onVisibleChanged:"visible_changed",onZoomChanged:"zoom_changed"},Yn={register(e,t,n){e.registerPanoProvider(t,n)},links(e,t){e.setLinks(t)},motionTracking(e,t){e.setMotionTracking(t)},options(e,t){e.setOptions(t)},pano(e,t){e.setPano(t)},position(e,t){e.setPosition(t)},pov(e,t){e.setPov(t)},visible(e,t){e.setVisible(t)},zoom(e,t){e.setZoom(t)}};class Gn extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{streetViewPanorama:null}),c(this,"setStreetViewPanoramaCallback",(()=>{null!==this.state.streetViewPanorama&&this.props.onLoad&&this.props.onLoad(this.state.streetViewPanorama)}))}componentDidMount(){var e,t,n=null!==(e=null===(t=this.context)||void 0===t?void 0:t.getStreetView())&&void 0!==e?e:null;this.registeredEvents=b({updaterMap:Yn,eventMap:$n,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({streetViewPanorama:n})),this.setStreetViewPanoramaCallback)}componentDidUpdate(e){null!==this.state.streetViewPanorama&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Yn,eventMap:$n,prevProps:e,nextProps:this.props,instance:this.state.streetViewPanorama}))}componentWillUnmount(){null!==this.state.streetViewPanorama&&(this.props.onUnmount&&this.props.onUnmount(this.state.streetViewPanorama),_(this.registeredEvents),this.state.streetViewPanorama.setVisible(!1))}render(){return null}}c(Gn,"contextType",f);class Xn extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{streetViewService:null}),c(this,"setStreetViewServiceCallback",(()=>{null!==this.state.streetViewService&&this.props.onLoad&&this.props.onLoad(this.state.streetViewService)}))}componentDidMount(){var e=new google.maps.StreetViewService;this.setState((function(){return{streetViewService:e}}),this.setStreetViewServiceCallback)}componentWillUnmount(){null!==this.state.streetViewService&&this.props.onUnmount&&this.props.onUnmount(this.state.streetViewService)}render(){return null}}c(Xn,"contextType",f);class Kn extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{directionsService:null}),c(this,"setDirectionsServiceCallback",(()=>{null!==this.state.directionsService&&this.props.onLoad&&this.props.onLoad(this.state.directionsService)}))}componentDidMount(){h(!!this.props.options,"DirectionsService expected options object as parameter, but got %s",this.props.options);var e=new google.maps.DirectionsService;this.setState((function(){return{directionsService:e}}),this.setDirectionsServiceCallback)}componentDidUpdate(){null!==this.state.directionsService&&this.state.directionsService.route(this.props.options,this.props.callback)}componentWillUnmount(){null!==this.state.directionsService&&this.props.onUnmount&&this.props.onUnmount(this.state.directionsService)}render(){return null}}var Jn={onDirectionsChanged:"directions_changed"},Zn={directions(e,t){e.setDirections(t)},map(e,t){e.setMap(t)},options(e,t){e.setOptions(t)},panel(e,t){e.setPanel(t)},routeIndex(e,t){e.setRouteIndex(t)}};class Qn extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"state",{directionsRenderer:null}),c(this,"setDirectionsRendererCallback",(()=>{null!==this.state.directionsRenderer&&(this.state.directionsRenderer.setMap(this.context),this.props.onLoad&&this.props.onLoad(this.state.directionsRenderer))}))}componentDidMount(){var e=new google.maps.DirectionsRenderer(this.props.options);this.registeredEvents=b({updaterMap:Zn,eventMap:Jn,prevProps:{},nextProps:this.props,instance:e}),this.setState((function(){return{directionsRenderer:e}}),this.setDirectionsRendererCallback)}componentDidUpdate(e){null!==this.state.directionsRenderer&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:Zn,eventMap:Jn,prevProps:e,nextProps:this.props,instance:this.state.directionsRenderer}))}componentWillUnmount(){null!==this.state.directionsRenderer&&(this.props.onUnmount&&this.props.onUnmount(this.state.directionsRenderer),_(this.registeredEvents),this.state.directionsRenderer&&this.state.directionsRenderer.setMap(null))}render(){return null}}c(Qn,"contextType",f);class er extends o.PureComponent{constructor(){super(...arguments),c(this,"state",{distanceMatrixService:null}),c(this,"setDistanceMatrixServiceCallback",(()=>{null!==this.state.distanceMatrixService&&this.props.onLoad&&this.props.onLoad(this.state.distanceMatrixService)}))}componentDidMount(){h(!!this.props.options,"DistanceMatrixService expected options object as parameter, but go %s",this.props.options);var e=new google.maps.DistanceMatrixService;this.setState((function(){return{distanceMatrixService:e}}),this.setDistanceMatrixServiceCallback)}componentDidUpdate(){null!==this.state.distanceMatrixService&&this.state.distanceMatrixService.getDistanceMatrix(this.props.options,this.props.callback)}componentWillUnmount(){null!==this.state.distanceMatrixService&&this.props.onUnmount&&this.props.onUnmount(this.state.distanceMatrixService)}render(){return null}}var tr={onPlacesChanged:"places_changed"},nr={bounds(e,t){e.setBounds(t)}};class rr extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"containerElement",(0,o.createRef)()),c(this,"state",{searchBox:null}),c(this,"setSearchBoxCallback",(()=>{null!==this.state.searchBox&&this.props.onLoad&&this.props.onLoad(this.state.searchBox)}))}componentDidMount(){if(h(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places),null!==this.containerElement&&null!==this.containerElement.current){var e=this.containerElement.current.querySelector("input");if(null!==e){var t=new google.maps.places.SearchBox(e,this.props.options);this.registeredEvents=b({updaterMap:nr,eventMap:tr,prevProps:{},nextProps:this.props,instance:t}),this.setState((function(){return{searchBox:t}}),this.setSearchBoxCallback)}}}componentDidUpdate(e){null!==this.state.searchBox&&(_(this.registeredEvents),this.registeredEvents=b({updaterMap:nr,eventMap:tr,prevProps:e,nextProps:this.props,instance:this.state.searchBox}))}componentWillUnmount(){null!==this.state.searchBox&&(this.props.onUnmount&&this.props.onUnmount(this.state.searchBox),_(this.registeredEvents))}render(){return(0,i.jsx)("div",{ref:this.containerElement,children:o.Children.only(this.props.children)})}}c(rr,"contextType",f);var ar={onPlaceChanged:"place_changed"},ir={bounds(e,t){e.setBounds(t)},restrictions(e,t){e.setComponentRestrictions(t)},fields(e,t){e.setFields(t)},options(e,t){e.setOptions(t)},types(e,t){e.setTypes(t)}};class or extends o.PureComponent{constructor(){super(...arguments),c(this,"registeredEvents",[]),c(this,"containerElement",(0,o.createRef)()),c(this,"state",{autocomplete:null}),c(this,"setAutocompleteCallback",(()=>{null!==this.state.autocomplete&&this.props.onLoad&&this.props.onLoad(this.state.autocomplete)}))}componentDidMount(){var e;h(!!google.maps.places,'You need to provide libraries={["places"]} prop to component %s',google.maps.places);var t=null===(e=this.containerElement.current)||void 0===e?void 0:e.querySelector("input");if(t){var n=new google.maps.places.Autocomplete(t,this.props.options);this.registeredEvents=b({updaterMap:ir,eventMap:ar,prevProps:{},nextProps:this.props,instance:n}),this.setState((()=>({autocomplete:n})),this.setAutocompleteCallback)}}componentDidUpdate(e){_(this.registeredEvents),this.registeredEvents=b({updaterMap:ir,eventMap:ar,prevProps:e,nextProps:this.props,instance:this.state.autocomplete})}componentWillUnmount(){null!==this.state.autocomplete&&_(this.registeredEvents)}render(){return(0,i.jsx)("div",{ref:this.containerElement,className:this.props.className,children:o.Children.only(this.props.children)})}}c(or,"defaultProps",{className:""}),c(or,"contextType",f)},91087:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>u,useAsyncStorage:()=>l});const r=n(32465).bind({concatArrays:!0,ignoreUndefined:!0});function a(e,t){return new Promise(((n,r)=>{try{const r=e();null===t||void 0===t||t(null,r),n(r)}catch(a){null===t||void 0===t||t(a),r(a)}}))}function i(e,t,n){return Promise.all(e).then((e=>{const r=(null===n||void 0===n?void 0:n(e))??null;return null===t||void 0===t||t(null,r),Promise.resolve(r)}),(e=>(null===t||void 0===t||t(e),Promise.reject(e))))}const o={getItem:(e,t)=>a((()=>window.localStorage.getItem(e)),t),setItem:(e,t,n)=>a((()=>window.localStorage.setItem(e,t)),n),removeItem:(e,t)=>a((()=>window.localStorage.removeItem(e)),t),mergeItem:(e,t,n)=>a((()=>function(e,t){const n=window.localStorage.getItem(e);if(n){const a=JSON.parse(n),i=JSON.parse(t),o=JSON.stringify(r(a,i));window.localStorage.setItem(e,o)}else window.localStorage.setItem(e,t)}(e,t)),n),clear:e=>a((()=>window.localStorage.clear()),e),getAllKeys:e=>a((()=>{const e=window.localStorage.length,t=[];for(let n=0;n{},multiGet:(e,t)=>i(e.map((e=>o.getItem(e))),t,(t=>t.map(((t,n)=>[e[n],t])))),multiSet:(e,t)=>i(e.map((e=>o.setItem(e[0],e[1]))),t),multiRemove:(e,t)=>i(e.map((e=>o.removeItem(e))),t),multiMerge:(e,t)=>i(e.map((e=>o.mergeItem(e[0],e[1]))),t)},s=o;function l(e){return{getItem:(...t)=>s.getItem(e,...t),setItem:(...t)=>s.setItem(e,...t),mergeItem:(...t)=>s.mergeItem(e,...t),removeItem:(...t)=>s.removeItem(e,...t)}}const u=o},79975:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NetInfoCellularGeneration:()=>l,NetInfoStateType:()=>s,addEventListener:()=>D,configure:()=>E,default:()=>P,fetch:()=>C,refresh:()=>T,useNetInfo:()=>I,useNetInfoInstance:()=>O});var r=n(36665);const a={reachabilityUrl:"/",reachabilityMethod:"HEAD",reachabilityHeaders:{},reachabilityTest:e=>Promise.resolve(200===e.status),reachabilityShortTimeout:5e3,reachabilityLongTimeout:6e4,reachabilityRequestTimeout:15e3,reachabilityShouldRun:()=>!0,shouldFetchWiFiSSID:!0,useNativeReachability:!0};var i=n(14177);const o="netInfo.networkStatusDidChange";let s,l;!function(e){e.unknown="unknown",e.none="none",e.cellular="cellular",e.wifi="wifi",e.bluetooth="bluetooth",e.ethernet="ethernet",e.wimax="wimax",e.vpn="vpn",e.other="other"}(s||(s={})),function(e){e["2g"]="2g",e["3g"]="3g",e["4g"]="4g",e["5g"]="5g"}(l||(l={}));const u=window.hasOwnProperty("tizen")||window.hasOwnProperty("webOS")?void 0:window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,c={bluetooth:s.bluetooth,cellular:s.cellular,ethernet:s.ethernet,none:s.none,other:s.other,unknown:s.unknown,wifi:s.wifi,wimax:s.wimax,mixed:s.other},d={"2g":l["2g"],"3g":l["3g"],"4g":l["4g"],"slow-2g":l["2g"]},h=e=>{const t=navigator.onLine,n={isInternetReachable:null};if(!u){if(t){return Object.assign({},n,{isConnected:!0,type:s.other,details:{isConnectionExpensive:!1}})}return Object.assign({},n,{isConnected:!1,isInternetReachable:!1,type:s.none,details:null})}const r=u.saveData,a=u.type?c[u.type]:t?s.other:s.unknown;if(a===s.bluetooth){return Object.assign({},n,{isConnected:!0,type:a,details:{isConnectionExpensive:r}})}if(a===s.cellular){return Object.assign({},n,{isConnected:!0,type:a,details:{isConnectionExpensive:r,cellularGeneration:d[u.effectiveType]||null,carrier:null}})}if(a===s.ethernet){return Object.assign({},n,{isConnected:!0,type:a,details:{isConnectionExpensive:r,ipAddress:null,subnet:null}})}if(a===s.wifi){return Object.assign({},n,{isConnected:!0,type:a,details:{isConnectionExpensive:r,ssid:null,bssid:null,strength:null,ipAddress:null,subnet:null,frequency:null,linkSpeed:null,rxLinkSpeed:null,txLinkSpeed:null}})}if(a===s.wimax){return Object.assign({},n,{isConnected:!0,type:a,details:{isConnectionExpensive:r}})}if(a===s.none){return Object.assign({},n,{isConnected:!1,isInternetReachable:!1,type:a,details:null})}if(a===s.unknown){return Object.assign({},n,{isConnected:t,isInternetReachable:null,type:a,details:null})}return Object.assign({},n,{isConnected:!0,type:s.other,details:{isConnectionExpensive:r}})},f=[],p=[],m={addListener(e,t){switch(e){case o:{const e=()=>{t(h())};u?u.addEventListener("change",e):(window.addEventListener("online",e,!1),window.addEventListener("offline",e,!1)),f.push(t),p.push(e);break}}},removeListeners(e,t){switch(e){case o:{const e=f.indexOf(t),n=p[e];u?u.removeEventListener("change",n):(window.removeEventListener("online",n),window.removeEventListener("offline",n)),f.splice(e,1),p.splice(e,1);break}}},getCurrentState:async e=>h(),configure(){}},g=new i.default;m.addListener(o,(e=>{g.emit(o,e)}));const y=Object.assign({},m,{eventEmitter:g});function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class b{constructor(e,t){_(this,"_configuration",void 0),_(this,"_listener",void 0),_(this,"_isInternetReachable",void 0),_(this,"_currentInternetReachabilityCheckHandler",null),_(this,"_currentTimeoutHandle",null),_(this,"_setIsInternetReachable",(e=>{this._isInternetReachable!==e&&(this._isInternetReachable=e,this._listener(this._isInternetReachable))})),_(this,"_setExpectsConnection",(e=>{null!==this._currentInternetReachabilityCheckHandler&&(this._currentInternetReachabilityCheckHandler.cancel(),this._currentInternetReachabilityCheckHandler=null),null!==this._currentTimeoutHandle&&(clearTimeout(this._currentTimeoutHandle),this._currentTimeoutHandle=null),e&&this._configuration.reachabilityShouldRun()?(this._isInternetReachable||this._setIsInternetReachable(null),this._currentInternetReachabilityCheckHandler=this._checkInternetReachability()):this._setIsInternetReachable(!1)})),_(this,"_checkInternetReachability",(()=>{const e=new AbortController,t=fetch(this._configuration.reachabilityUrl,{headers:this._configuration.reachabilityHeaders,method:this._configuration.reachabilityMethod,cache:"no-cache",signal:e.signal});let n;const r=new Promise(((e,t)=>{n=setTimeout((()=>t("timedout")),this._configuration.reachabilityRequestTimeout)}));let a=()=>{};const i=new Promise(((e,t)=>{a=()=>t("canceled")}));return{promise:Promise.race([t,r,i]).then((e=>this._configuration.reachabilityTest(e))).then((e=>{this._setIsInternetReachable(e);const t=this._isInternetReachable?this._configuration.reachabilityLongTimeout:this._configuration.reachabilityShortTimeout;this._currentTimeoutHandle=setTimeout(this._checkInternetReachability,t)})).catch((t=>{"canceled"===t?e.abort():("timedout"===t&&e.abort(),this._setIsInternetReachable(!1),this._currentTimeoutHandle=setTimeout(this._checkInternetReachability,this._configuration.reachabilityShortTimeout))})).then((()=>{clearTimeout(n)}),(e=>{throw clearTimeout(n),e})),cancel:a}})),_(this,"update",(e=>{"boolean"===typeof e.isInternetReachable&&this._configuration.useNativeReachability?this._setIsInternetReachable(e.isInternetReachable):this._setExpectsConnection(e.isConnected)})),_(this,"currentState",(()=>this._isInternetReachable)),_(this,"tearDown",(()=>{null!==this._currentInternetReachabilityCheckHandler&&(this._currentInternetReachabilityCheckHandler.cancel(),this._currentInternetReachabilityCheckHandler=null),null!==this._currentTimeoutHandle&&(clearTimeout(this._currentTimeoutHandle),this._currentTimeoutHandle=null)})),this._configuration=e,this._listener=t}}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class w{constructor(e){v(this,"_nativeEventSubscription",null),v(this,"_subscriptions",new Set),v(this,"_latestState",null),v(this,"_internetReachability",void 0),v(this,"_handleNativeStateUpdate",(e=>{this._internetReachability.update(e);const t=this._convertState(e);this._latestState=t,this._subscriptions.forEach((e=>e(t)))})),v(this,"_handleInternetReachabilityUpdate",(e=>{if(!this._latestState)return;const t=Object.assign({},this._latestState,{isInternetReachable:e});this._latestState=t,this._subscriptions.forEach((e=>e(t)))})),v(this,"_fetchCurrentState",(async e=>{const t=await y.getCurrentState(e);this._internetReachability.update(t);const n=this._convertState(t);return e||(this._latestState=n,this._subscriptions.forEach((e=>e(n)))),n})),v(this,"_convertState",(e=>"boolean"===typeof e.isInternetReachable?e:Object.assign({},e,{isInternetReachable:this._internetReachability.currentState()}))),v(this,"latest",(e=>e?this._fetchCurrentState(e):this._latestState?Promise.resolve(this._latestState):this._fetchCurrentState())),v(this,"add",(e=>{this._subscriptions.add(e),this._latestState?e(this._latestState):this.latest().then(e)})),v(this,"remove",(e=>{this._subscriptions.delete(e)})),v(this,"tearDown",(()=>{this._internetReachability&&this._internetReachability.tearDown(),this._nativeEventSubscription&&this._nativeEventSubscription.remove(),this._subscriptions.clear()})),this._internetReachability=new b(e,this._handleInternetReachabilityUpdate),this._nativeEventSubscription=y.eventEmitter.addListener(o,this._handleNativeStateUpdate),this._fetchCurrentState()}}let F=a,k=null;const x=()=>new w(F);let A=!1,S=[];function E(e){F=Object.assign({},a,e),k&&(k.tearDown(),k=x())}function C(e){return k||(k=x()),k.latest(e)}function T(){return k||(k=x()),A?new Promise((e=>{S.push(e)})):(A=!0,k._fetchCurrentState().then((e=>(S.forEach((t=>t(e))),S=[],e))).finally((()=>{A=!1})))}function D(e){return k||(k=x()),k.add(e),()=>{k&&k.remove(e)}}function I(e){e&&E(e);const[t,n]=(0,r.useState)({type:s.unknown,isConnected:null,isInternetReachable:null,details:null});return(0,r.useEffect)((()=>{const e=D(n);return()=>e()}),[]),t}function O(e=!1,t){const[n,i]=(0,r.useState)(),[o,l]=(0,r.useState)({type:s.unknown,isConnected:null,isInternetReachable:null,details:null});(0,r.useEffect)((()=>{if(e)return;const n=Object.assign({},a,t),r=new w(n);return i(r),r.add(l),r.tearDown}),[e,t]);return{netInfo:o,refresh:(0,r.useCallback)((()=>{n&&!A&&(A=!0,n._fetchCurrentState().finally((()=>{A=!1})))}),[n])}}const P={configure:E,fetch:C,refresh:T,addEventListener:D,useNetInfo:I,useNetInfoInstance:O}},13620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(98587),a=n(36665),i=n(73929);const o=["maskElement"];const s=function(e){let{maskElement:t}=e,n=(0,r.default)(e,o);return a.createElement(i.default,n,t)}},35190:e=>{"use strict";const t=[];e.exports={registerAsset:function(e){return t.push(e)},getAssetByID:function(e){return t[e-1]}}},23879:e=>{"use strict";function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function n(e,n,r){const a=r<.5?r*(1+n):r+n-r*n,i=2*r-a,o=t(i,a,e+1/3),s=t(i,a,e),l=t(i,a,e-1/3);return Math.round(255*o)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}const r="[-+]?\\d*\\.?\\d+",a=r+"%";function i(...e){return"\\(\\s*("+e.join(")\\s*,?\\s*(")+")\\s*\\)"}function o(...e){return"\\(\\s*("+e.slice(0,e.length-1).join(")\\s*,?\\s*(")+")\\s*/\\s*("+e[e.length-1]+")\\s*\\)"}function s(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}let l;function u(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function c(e){return(parseFloat(e)%360+360)%360/360}function d(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function h(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}e.exports=function(e){if("number"===typeof e)return e>>>0===e&&e>=0&&e<=4294967295?e:null;if("string"!==typeof e)return null;const f=function(){void 0===l&&(l={rgb:new RegExp("rgb"+i(r,r,r)),rgba:new RegExp("rgba("+s(r,r,r,r)+"|"+o(r,r,r,r)+")"),hsl:new RegExp("hsl"+i(r,a,a)),hsla:new RegExp("hsla("+s(r,a,a,r)+"|"+o(r,a,a,r)+")"),hwb:new RegExp("hwb"+i(r,a,a)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/});return l}();let p;if(p=f.hex6.exec(e))return parseInt(p[1]+"ff",16)>>>0;const m=function(e){switch(e){case"transparent":return 0;case"aliceblue":return 4042850303;case"antiquewhite":return 4209760255;case"aqua":case"cyan":return 16777215;case"aquamarine":return 2147472639;case"azure":return 4043309055;case"beige":return 4126530815;case"bisque":return 4293182719;case"black":return 255;case"blanchedalmond":return 4293643775;case"blue":return 65535;case"blueviolet":return 2318131967;case"brown":return 2771004159;case"burlywood":return 3736635391;case"burntsienna":return 3934150143;case"cadetblue":return 1604231423;case"chartreuse":return 2147418367;case"chocolate":return 3530104575;case"coral":return 4286533887;case"cornflowerblue":return 1687547391;case"cornsilk":return 4294499583;case"crimson":return 3692313855;case"darkblue":return 35839;case"darkcyan":return 9145343;case"darkgoldenrod":return 3095792639;case"darkgray":case"darkgrey":return 2846468607;case"darkgreen":return 6553855;case"darkkhaki":return 3182914559;case"darkmagenta":return 2332068863;case"darkolivegreen":return 1433087999;case"darkorange":return 4287365375;case"darkorchid":return 2570243327;case"darkred":return 2332033279;case"darksalmon":return 3918953215;case"darkseagreen":return 2411499519;case"darkslateblue":return 1211993087;case"darkslategray":case"darkslategrey":return 793726975;case"darkturquoise":return 13554175;case"darkviolet":return 2483082239;case"deeppink":return 4279538687;case"deepskyblue":return 12582911;case"dimgray":case"dimgrey":return 1768516095;case"dodgerblue":return 512819199;case"firebrick":return 2988581631;case"floralwhite":return 4294635775;case"forestgreen":return 579543807;case"fuchsia":case"magenta":return 4278255615;case"gainsboro":return 3705462015;case"ghostwhite":return 4177068031;case"gold":return 4292280575;case"goldenrod":return 3668254975;case"gray":case"grey":return 2155905279;case"green":return 8388863;case"greenyellow":return 2919182335;case"honeydew":return 4043305215;case"hotpink":return 4285117695;case"indianred":return 3445382399;case"indigo":return 1258324735;case"ivory":return 4294963455;case"khaki":return 4041641215;case"lavender":return 3873897215;case"lavenderblush":return 4293981695;case"lawngreen":return 2096890111;case"lemonchiffon":return 4294626815;case"lightblue":return 2916673279;case"lightcoral":return 4034953471;case"lightcyan":return 3774873599;case"lightgoldenrodyellow":return 4210742015;case"lightgray":case"lightgrey":return 3553874943;case"lightgreen":return 2431553791;case"lightpink":return 4290167295;case"lightsalmon":return 4288707327;case"lightseagreen":return 548580095;case"lightskyblue":return 2278488831;case"lightslategray":case"lightslategrey":return 2005441023;case"lightsteelblue":return 2965692159;case"lightyellow":return 4294959359;case"lime":return 16711935;case"limegreen":return 852308735;case"linen":return 4210091775;case"maroon":return 2147483903;case"mediumaquamarine":return 1724754687;case"mediumblue":return 52735;case"mediumorchid":return 3126187007;case"mediumpurple":return 2473647103;case"mediumseagreen":return 1018393087;case"mediumslateblue":return 2070474495;case"mediumspringgreen":return 16423679;case"mediumturquoise":return 1221709055;case"mediumvioletred":return 3340076543;case"midnightblue":return 421097727;case"mintcream":return 4127193855;case"mistyrose":return 4293190143;case"moccasin":return 4293178879;case"navajowhite":return 4292783615;case"navy":return 33023;case"oldlace":return 4260751103;case"olive":return 2155872511;case"olivedrab":return 1804477439;case"orange":return 4289003775;case"orangered":return 4282712319;case"orchid":return 3664828159;case"palegoldenrod":return 4008225535;case"palegreen":return 2566625535;case"paleturquoise":return 2951671551;case"palevioletred":return 3681588223;case"papayawhip":return 4293907967;case"peachpuff":return 4292524543;case"peru":return 3448061951;case"pink":return 4290825215;case"plum":return 3718307327;case"powderblue":return 2967529215;case"purple":return 2147516671;case"rebeccapurple":return 1714657791;case"red":return 4278190335;case"rosybrown":return 3163525119;case"royalblue":return 1097458175;case"saddlebrown":return 2336560127;case"salmon":return 4202722047;case"sandybrown":return 4104413439;case"seagreen":return 780883967;case"seashell":return 4294307583;case"sienna":return 2689740287;case"silver":return 3233857791;case"skyblue":return 2278484991;case"slateblue":return 1784335871;case"slategray":case"slategrey":return 1887473919;case"snow":return 4294638335;case"springgreen":return 16744447;case"steelblue":return 1182971135;case"tan":return 3535047935;case"teal":return 8421631;case"thistle":return 3636451583;case"tomato":return 4284696575;case"turquoise":return 1088475391;case"violet":return 4001558271;case"wheat":return 4125012991;case"white":return 4294967295;case"whitesmoke":return 4126537215;case"yellow":return 4294902015;case"yellowgreen":return 2597139199}return null}(e);return null!=m?m:(p=f.rgb.exec(e))?(u(p[1])<<24|u(p[2])<<16|u(p[3])<<8|255)>>>0:(p=f.rgba.exec(e))?void 0!==p[6]?(u(p[6])<<24|u(p[7])<<16|u(p[8])<<8|d(p[9]))>>>0:(u(p[2])<<24|u(p[3])<<16|u(p[4])<<8|d(p[5]))>>>0:(p=f.hex3.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+"ff",16)>>>0:(p=f.hex8.exec(e))?parseInt(p[1],16)>>>0:(p=f.hex4.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+p[4]+p[4],16)>>>0:(p=f.hsl.exec(e))?(255|n(c(p[1]),h(p[2]),h(p[3])))>>>0:(p=f.hsla.exec(e))?void 0!==p[6]?(n(c(p[6]),h(p[7]),h(p[8]))|d(p[9]))>>>0:(n(c(p[2]),h(p[3]),h(p[4]))|d(p[5]))>>>0:(p=f.hwb.exec(e))?(255|function(e,n,r){if(n+r>=1){const e=Math.round(255*n/(n+r));return e<<24|e<<16|e<<8}const a=t(0,1,e+1/3)*(1-n-r)+n,i=t(0,1,e)*(1-n-r)+n,o=t(0,1,e-1/3)*(1-n-r)+n;return Math.round(255*a)<<24|Math.round(255*i)<<16|Math.round(255*o)<<8}(c(p[1]),h(p[2]),h(p[3])))>>>0:null}},68168:e=>{"use strict";function t(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function n(e,n,r){const a=r<.5?r*(1+n):r+n-r*n,i=2*r-a,o=t(i,a,e+1/3),s=t(i,a,e),l=t(i,a,e-1/3);return Math.round(255*o)<<24|Math.round(255*s)<<16|Math.round(255*l)<<8}const r="[-+]?\\d*\\.?\\d+",a=r+"%";function i(...e){return"\\(\\s*("+e.join(")\\s*,?\\s*(")+")\\s*\\)"}function o(...e){return"\\(\\s*("+e.slice(0,e.length-1).join(")\\s*,?\\s*(")+")\\s*/\\s*("+e[e.length-1]+")\\s*\\)"}function s(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}let l;function u(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function c(e){return(parseFloat(e)%360+360)%360/360}function d(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function h(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}e.exports=function(e){if("number"===typeof e)return e>>>0===e&&e>=0&&e<=4294967295?e:null;if("string"!==typeof e)return null;const f=function(){void 0===l&&(l={rgb:new RegExp("rgb"+i(r,r,r)),rgba:new RegExp("rgba("+s(r,r,r,r)+"|"+o(r,r,r,r)+")"),hsl:new RegExp("hsl"+i(r,a,a)),hsla:new RegExp("hsla("+s(r,a,a,r)+"|"+o(r,a,a,r)+")"),hwb:new RegExp("hwb"+i(r,a,a)),hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#([0-9a-fA-F]{6})$/,hex8:/^#([0-9a-fA-F]{8})$/});return l}();let p;if(p=f.hex6.exec(e))return parseInt(p[1]+"ff",16)>>>0;const m=function(e){switch(e){case"transparent":return 0;case"aliceblue":return 4042850303;case"antiquewhite":return 4209760255;case"aqua":case"cyan":return 16777215;case"aquamarine":return 2147472639;case"azure":return 4043309055;case"beige":return 4126530815;case"bisque":return 4293182719;case"black":return 255;case"blanchedalmond":return 4293643775;case"blue":return 65535;case"blueviolet":return 2318131967;case"brown":return 2771004159;case"burlywood":return 3736635391;case"burntsienna":return 3934150143;case"cadetblue":return 1604231423;case"chartreuse":return 2147418367;case"chocolate":return 3530104575;case"coral":return 4286533887;case"cornflowerblue":return 1687547391;case"cornsilk":return 4294499583;case"crimson":return 3692313855;case"darkblue":return 35839;case"darkcyan":return 9145343;case"darkgoldenrod":return 3095792639;case"darkgray":case"darkgrey":return 2846468607;case"darkgreen":return 6553855;case"darkkhaki":return 3182914559;case"darkmagenta":return 2332068863;case"darkolivegreen":return 1433087999;case"darkorange":return 4287365375;case"darkorchid":return 2570243327;case"darkred":return 2332033279;case"darksalmon":return 3918953215;case"darkseagreen":return 2411499519;case"darkslateblue":return 1211993087;case"darkslategray":case"darkslategrey":return 793726975;case"darkturquoise":return 13554175;case"darkviolet":return 2483082239;case"deeppink":return 4279538687;case"deepskyblue":return 12582911;case"dimgray":case"dimgrey":return 1768516095;case"dodgerblue":return 512819199;case"firebrick":return 2988581631;case"floralwhite":return 4294635775;case"forestgreen":return 579543807;case"fuchsia":case"magenta":return 4278255615;case"gainsboro":return 3705462015;case"ghostwhite":return 4177068031;case"gold":return 4292280575;case"goldenrod":return 3668254975;case"gray":case"grey":return 2155905279;case"green":return 8388863;case"greenyellow":return 2919182335;case"honeydew":return 4043305215;case"hotpink":return 4285117695;case"indianred":return 3445382399;case"indigo":return 1258324735;case"ivory":return 4294963455;case"khaki":return 4041641215;case"lavender":return 3873897215;case"lavenderblush":return 4293981695;case"lawngreen":return 2096890111;case"lemonchiffon":return 4294626815;case"lightblue":return 2916673279;case"lightcoral":return 4034953471;case"lightcyan":return 3774873599;case"lightgoldenrodyellow":return 4210742015;case"lightgray":case"lightgrey":return 3553874943;case"lightgreen":return 2431553791;case"lightpink":return 4290167295;case"lightsalmon":return 4288707327;case"lightseagreen":return 548580095;case"lightskyblue":return 2278488831;case"lightslategray":case"lightslategrey":return 2005441023;case"lightsteelblue":return 2965692159;case"lightyellow":return 4294959359;case"lime":return 16711935;case"limegreen":return 852308735;case"linen":return 4210091775;case"maroon":return 2147483903;case"mediumaquamarine":return 1724754687;case"mediumblue":return 52735;case"mediumorchid":return 3126187007;case"mediumpurple":return 2473647103;case"mediumseagreen":return 1018393087;case"mediumslateblue":return 2070474495;case"mediumspringgreen":return 16423679;case"mediumturquoise":return 1221709055;case"mediumvioletred":return 3340076543;case"midnightblue":return 421097727;case"mintcream":return 4127193855;case"mistyrose":return 4293190143;case"moccasin":return 4293178879;case"navajowhite":return 4292783615;case"navy":return 33023;case"oldlace":return 4260751103;case"olive":return 2155872511;case"olivedrab":return 1804477439;case"orange":return 4289003775;case"orangered":return 4282712319;case"orchid":return 3664828159;case"palegoldenrod":return 4008225535;case"palegreen":return 2566625535;case"paleturquoise":return 2951671551;case"palevioletred":return 3681588223;case"papayawhip":return 4293907967;case"peachpuff":return 4292524543;case"peru":return 3448061951;case"pink":return 4290825215;case"plum":return 3718307327;case"powderblue":return 2967529215;case"purple":return 2147516671;case"rebeccapurple":return 1714657791;case"red":return 4278190335;case"rosybrown":return 3163525119;case"royalblue":return 1097458175;case"saddlebrown":return 2336560127;case"salmon":return 4202722047;case"sandybrown":return 4104413439;case"seagreen":return 780883967;case"seashell":return 4294307583;case"sienna":return 2689740287;case"silver":return 3233857791;case"skyblue":return 2278484991;case"slateblue":return 1784335871;case"slategray":case"slategrey":return 1887473919;case"snow":return 4294638335;case"springgreen":return 16744447;case"steelblue":return 1182971135;case"tan":return 3535047935;case"teal":return 8421631;case"thistle":return 3636451583;case"tomato":return 4284696575;case"turquoise":return 1088475391;case"violet":return 4001558271;case"wheat":return 4125012991;case"white":return 4294967295;case"whitesmoke":return 4126537215;case"yellow":return 4294902015;case"yellowgreen":return 2597139199}return null}(e);return null!=m?m:(p=f.rgb.exec(e))?(u(p[1])<<24|u(p[2])<<16|u(p[3])<<8|255)>>>0:(p=f.rgba.exec(e))?void 0!==p[6]?(u(p[6])<<24|u(p[7])<<16|u(p[8])<<8|d(p[9]))>>>0:(u(p[2])<<24|u(p[3])<<16|u(p[4])<<8|d(p[5]))>>>0:(p=f.hex3.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+"ff",16)>>>0:(p=f.hex8.exec(e))?parseInt(p[1],16)>>>0:(p=f.hex4.exec(e))?parseInt(p[1]+p[1]+p[2]+p[2]+p[3]+p[3]+p[4]+p[4],16)>>>0:(p=f.hsl.exec(e))?(255|n(c(p[1]),h(p[2]),h(p[3])))>>>0:(p=f.hsla.exec(e))?void 0!==p[6]?(n(c(p[6]),h(p[7]),h(p[8]))|d(p[9]))>>>0:(n(c(p[2]),h(p[3]),h(p[4]))|d(p[5]))>>>0:(p=f.hwb.exec(e))?(255|function(e,n,r){if(n+r>=1){const e=Math.round(255*n/(n+r));return e<<24|e<<16|e<<8}const a=t(0,1,e+1/3)*(1-n-r)+n,i=t(0,1,e)*(1-n-r)+n,o=t(0,1,e-1/3)*(1-n-r)+n;return Math.round(255*a)<<24|Math.round(255*i)<<16|Math.round(255*o)<<8}(c(p[1]),h(p[2]),h(p[3])))>>>0:null}},8179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseNavigationContainer:()=>O,BaseRouter:()=>Be,CommonActions:()=>r,CurrentRenderContext:()=>L,DrawerActions:()=>qe,DrawerRouter:()=>$e,NavigationContainerRefContext:()=>y,NavigationContext:()=>_,NavigationHelpersContext:()=>le,NavigationRouteContext:()=>b,PreventRemoveContext:()=>ue,PreventRemoveProvider:()=>fe,PrivateValueStore:()=>pe,StackActions:()=>Ye,StackRouter:()=>Ge,TabActions:()=>Ve,TabRouter:()=>Ue,UNSTABLE_usePreventRemove:()=>Ne,createNavigationContainerRef:()=>d,createNavigatorFactory:()=>R,findFocusedRoute:()=>m,getActionFromState:()=>N,getFocusedRouteNameFromRoute:()=>z,getPathFromState:()=>Y,getStateFromPath:()=>Q,useFocusEffect:()=>ge,useIsFocused:()=>ye,useNavigation:()=>me,useNavigationBuilder:()=>Oe,useNavigationContainerRef:()=>Pe,useNavigationState:()=>Me,usePreventRemoveContext:()=>Re,useRoute:()=>Le,validatePathConfig:()=>q});var r={};n.r(r),n.d(r,{goBack:()=>i,navigate:()=>o,reset:()=>s,setParams:()=>l});var a=n(98587);function i(){return{type:"GO_BACK"}}function o(){if("string"===typeof(arguments.length<=0?void 0:arguments[0]))return{type:"NAVIGATE",payload:{name:arguments.length<=0?void 0:arguments[0],params:arguments.length<=1?void 0:arguments[1]}};{const e=(arguments.length<=0?void 0:arguments[0])||{};if(!e.hasOwnProperty("key")&&!e.hasOwnProperty("name"))throw new Error("You need to specify name or key when calling navigate with an object as the argument. See https://reactnavigation.org/docs/navigation-actions#navigate for usage.");return{type:"NAVIGATE",payload:e}}}function s(e){return{type:"RESET",payload:e}}function l(e){return{type:"SET_PARAMS",payload:{params:e}}}var u=n(36665);const c="The 'navigation' object hasn't been initialized yet. This might happen if you don't have a navigator mounted, or if the navigator hasn't finished mounting. See https://reactnavigation.org/docs/navigating-without-navigation-prop#handling-initialization for more details.";function d(){const e=[...Object.keys(r),"addListener","removeListener","resetRoot","dispatch","isFocused","canGoBack","getRootState","getState","getParent","getCurrentRoute","getCurrentOptions"],t={},n=(e,n)=>{t[e]&&(t[e]=t[e].filter((e=>e!==n)))};let a=null;const i=Object.assign({get current(){return a},set current(e){a=e,null!=e&&Object.entries(t).forEach((t=>{let[n,r]=t;r.forEach((t=>{e.addListener(n,t)}))}))},isReady:()=>null!=a&&a.isReady()},e.reduce(((e,r)=>(e[r]=function(){for(var e=arguments.length,i=new Array(e),o=0;on(e,r)}case"removeListener":{const[e,t]=i;n(e,t);break}default:console.error(c)}},e)),{}));return i}const h='Another navigator is already registered for this container. You likely have multiple navigators under a single "NavigationContainer" or "Screen". Make sure each navigator is under a separate "Screen" container. See https://reactnavigation.org/docs/nesting-navigators for a guide on nesting.',f=u.createContext(void 0);function p(e){let{children:t}=e;const n=u.useRef(),r=u.useMemo((()=>({register(e){const t=n.current;if(void 0!==t&&e!==t)throw new Error(h);n.current=e},unregister(e){e===n.current&&(n.current=void 0)}})),[]);return u.createElement(f.Provider,{value:r},t)}function m(e){var t,n;let r=e;for(;null!=(null===(a=r)||void 0===a?void 0:a.routes[r.index??0].state);){var a;r=r.routes[r.index??0].state}return null===(t=r)||void 0===t?void 0:t.routes[(null===(n=r)||void 0===n?void 0:n.index)??0]}const g=u.createContext({onDispatchAction:()=>{},onOptionsChange:()=>{}}),y=u.createContext(void 0),_=u.createContext(void 0),b=u.createContext(void 0),v="Couldn't find a navigation context. Have you wrapped your app with 'NavigationContainer'? See https://reactnavigation.org/docs/getting-started for setup instructions.",w=u.createContext({isDefault:!0,get getKey(){throw new Error(v)},get setKey(){throw new Error(v)},get getState(){throw new Error(v)},get setState(){throw new Error(v)},get getIsInitial(){throw new Error(v)}}),F=u.createContext(void 0);function k(){const{current:e}=u.useRef({action:[],focus:[]}),t=u.useCallback(((t,n)=>{e[t].push(n);let r=!1;return()=>{const a=e[t].indexOf(n);!r&&a>-1&&(r=!0,e[t].splice(a,1))}}),[e]);return{listeners:e,addListener:t}}function x(e){const t=u.useRef(e);u.useEffect((()=>{t.current=e}));const n=u.useRef(Object.create(null)),r=u.useCallback((e=>{const t=(t,r)=>{const a=n.current[t]?n.current[t][e]:void 0;if(!a)return;const i=a.indexOf(r);i>-1&&a.splice(i,1)};return{addListener:(r,a)=>{n.current[r]=n.current[r]||{},n.current[r][e]=n.current[r][e]||[],n.current[r][e].push(a);let i=!1;return()=>{i||(i=!0,t(r,a))}},removeListener:t}}),[]),a=u.useCallback((e=>{var r,a;let{type:i,data:o,target:s,canPreventDefault:l}=e;const u=n.current[i]||{},c=void 0!==s?null===(r=u[s])||void 0===r?void 0:r.slice():[].concat(...Object.keys(u).map((e=>u[e]))).filter(((e,t,n)=>n.lastIndexOf(e)===t)),d={get type(){return i}};if(void 0!==s&&Object.defineProperty(d,"target",{enumerable:!0,get:()=>s}),void 0!==o&&Object.defineProperty(d,"data",{enumerable:!0,get:()=>o}),l){let e=!1;Object.defineProperties(d,{defaultPrevented:{enumerable:!0,get:()=>e},preventDefault:{enumerable:!0,value(){e=!0}}})}return null===(a=t.current)||void 0===a||a.call(t,d),null===c||void 0===c||c.forEach((e=>e(d))),d}),[]);return u.useMemo((()=>({create:r,emit:a})),[r,a])}function A(){const{current:e}=u.useRef(Object.assign(Object.create(null),{getState:{},beforeRemove:{}})),t=u.useCallback(((t,n,r)=>(e[t][n]=r,()=>{e[t][n]=void 0})),[e]);return{keyedListeners:e,addKeyedListener:t}}function S(e){let{key:t,options:n,navigation:r}=e;const a=u.useRef(n),i=u.useRef({}),{onOptionsChange:o}=u.useContext(g),{addOptionsGetter:s}=u.useContext(w),l=u.useCallback((()=>{const e=(null===r||void 0===r?void 0:r.isFocused())??!0,t=Object.keys(i.current).length;e&&!t&&o(a.current??{})}),[r,o]);u.useEffect((()=>(a.current=n,l(),null===r||void 0===r?void 0:r.addListener("focus",l))),[r,n,l]);const c=u.useCallback((()=>{for(let n in i.current)if(i.current.hasOwnProperty(n)){var e,t;const r=null===(e=(t=i.current)[n])||void 0===e?void 0:e.call(t);if(null!==r)return r}return null}),[]),d=u.useCallback((()=>{if(!((null===r||void 0===r?void 0:r.isFocused())??!0))return null;const e=c();return null!==e?e:a.current}),[r,c]);u.useEffect((()=>null===s||void 0===s?void 0:s(t,d)),[d,s,t]);const h=u.useCallback(((e,t)=>(i.current[e]=t,l(),()=>{delete i.current[e],l()})),[l]);return{addOptionsGetter:h,getCurrentOptions:d}}const E="Couldn't find a schedule context.",C=u.createContext({scheduleUpdate(){throw new Error(E)},flushUpdates(){throw new Error(E)}});const T={};const D=["key","routeNames"],I=e=>{if(void 0===e)return;const t=(0,a.default)(e,D);return Object.assign({},t,{stale:!0,routes:e.routes.map((e=>void 0===e.state?e:Object.assign({},e,{state:I(e.state)})))})},O=u.forwardRef((function(e,t){let{initialState:n,onStateChange:a,onUnhandledAction:i,independent:o,children:l}=e;if(!u.useContext(w).isDefault&&!o)throw new Error("Looks like you have nested a 'NavigationContainer' inside another. Normally you need only one container at the root of the app, so this was probably an error. If this was intentional, pass 'independent={true}' explicitly. Note that this will make the child navigators disconnected from the parent and you won't be able to navigate between them.");const[d,h,f,v,E]=function(e){const t=u.useRef(T),n=u.useRef(!1),r=u.useRef(!0);u.useEffect((()=>(r.current=!0,()=>{r.current=!1})),[]),t.current===T&&(t.current="function"===typeof e?e():e);const[a,i]=u.useState(t.current),o=u.useCallback((()=>t.current),[]),s=u.useCallback((e=>{e!==t.current&&r.current&&(t.current=e,n.current||i(e))}),[]),l=u.useCallback((e=>{n.current=!0;try{e()}finally{n.current=!1}}),[]),c=u.useCallback((()=>{r.current&&i(t.current)}),[]);a!==t.current&&i(t.current);const d=t.current;return u.useDebugValue(d),[d,o,s,l,c]}((()=>I(null==n?void 0:n))),D=u.useRef(!0),O=u.useRef(),P=u.useCallback((()=>O.current),[]),M=u.useCallback((e=>{O.current=e}),[]),{listeners:R,addListener:L}=k(),{keyedListeners:N,addKeyedListener:B}=A(),j=u.useCallback((e=>{null==R.focus[0]?console.error(c):R.focus[0]((t=>t.dispatch(e)))}),[R.focus]),V=u.useCallback((()=>{if(null==R.focus[0])return!1;const{result:e,handled:t}=R.focus[0]((e=>e.canGoBack()));return!!t&&e}),[R.focus]),z=u.useCallback((e=>{var t,n;const r=(null===e||void 0===e?void 0:e.key)??(null===(t=(n=N.getState).root)||void 0===t?void 0:t.call(n).key);null==r?console.error(c):R.focus[0]((t=>t.dispatch(Object.assign({},s(e),{target:r}))))}),[N.getState,R.focus]),H=u.useCallback((()=>{var e,t;return null===(e=(t=N.getState).root)||void 0===e?void 0:e.call(t)}),[N.getState]),U=u.useCallback((()=>{const e=H();if(null==e)return;return m(e)}),[H]),W=x(),{addOptionsGetter:q,getCurrentOptions:$}=S({}),Y=u.useMemo((()=>Object.assign({},Object.keys(r).reduce(((e,t)=>(e[t]=function(){return j(r[t](...arguments))},e)),{}),W.create("root"),{dispatch:j,resetRoot:z,isFocused:()=>!0,canGoBack:V,getParent:()=>{},getState:()=>ae.current,getRootState:H,getCurrentRoute:U,getCurrentOptions:$,isReady:()=>null!=R.focus[0],setOptions:()=>{throw new Error("Cannot call setOptions outside a screen")}})),[V,j,W,$,U,H,R.focus,z]);u.useImperativeHandle(t,(()=>Y),[Y]);const G=u.useCallback(((e,t)=>{W.emit({type:"__unsafe_action__",data:{action:e,noop:t,stack:J.current}})}),[W]),X=u.useRef(),K=u.useCallback((e=>{X.current!==e&&(X.current=e,W.emit({type:"options",data:{options:e}}))}),[W]),J=u.useRef(),Z=u.useMemo((()=>({addListener:L,addKeyedListener:B,onDispatchAction:G,onOptionsChange:K,stackRef:J})),[L,B,G,K]),Q=u.useMemo((()=>({scheduleUpdate:v,flushUpdates:E})),[v,E]),ee=u.useRef(!0),te=u.useCallback((()=>ee.current),[]),ne=u.useMemo((()=>({state:d,getState:h,setState:f,getKey:P,setKey:M,getIsInitial:te,addOptionsGetter:q})),[d,h,f,P,M,te,q]),re=u.useRef(a),ae=u.useRef(d);u.useEffect((()=>{ee.current=!1,re.current=a,ae.current=d})),u.useEffect((()=>{const e=H();W.emit({type:"state",data:{state:d}}),!D.current&&re.current&&re.current(e),D.current=!1}),[H,W,d]);const ie=u.useCallback((e=>{}),[]);let oe=u.createElement(y.Provider,{value:Y},u.createElement(C.Provider,{value:Q},u.createElement(g.Provider,{value:Z},u.createElement(w.Provider,{value:ne},u.createElement(F.Provider,{value:i??ie},u.createElement(p,null,l))))));return o&&(oe=u.createElement(b.Provider,{value:void 0},u.createElement(_.Provider,{value:void 0},oe))),oe}));function P(e){return null}function M(e){return null}function R(e){return function(){if(void 0!==arguments[0])throw new Error("Creating a navigator doesn't take an argument. Maybe you are trying to use React Navigation 4 API? See https://reactnavigation.org/docs/hello-react-navigation for the latest API and guides.");return{Navigator:e,Group:P,Screen:M}}}const L=u.createContext(void 0);function N(e,t){var n;const r=t?B(t):{},a=null!=e.index?e.routes.slice(0,e.index+1):e.routes;if(0===a.length)return;if(!(1===a.length&&void 0===a[0].key||2===a.length&&void 0===a[0].key&&a[0].name===(null===r||void 0===r?void 0:r.initialRouteName)&&void 0===a[1].key))return{type:"RESET",payload:e};const i=e.routes[e.index??e.routes.length-1];let o=null===i||void 0===i?void 0:i.state,s=null===r||void 0===r||null===(n=r.screens)||void 0===n?void 0:n[null===i||void 0===i?void 0:i.name],l=Object.assign({},i.params),u=i?{name:i.name,path:i.path,params:l}:void 0;for(;o;){var c,d,h;if(0===o.routes.length)return;const e=null!=o.index?o.routes.slice(0,o.index+1):o.routes,t=e[e.length-1];if(Object.assign(l,{initial:void 0,screen:void 0,params:void 0,state:void 0}),1===e.length&&void 0===e[0].key)l.initial=!0,l.screen=t.name;else{if(2!==e.length||void 0!==e[0].key||e[0].name!==(null===(c=s)||void 0===c?void 0:c.initialRouteName)||void 0!==e[1].key){l.state=o;break}l.initial=!1,l.screen=t.name}t.state?(l.params=Object.assign({},t.params),l=l.params):(l.path=t.path,l.params=t.params),o=t.state,s=null===(d=s)||void 0===d||null===(h=d.screens)||void 0===h?void 0:h[t.name]}return u?{type:"NAVIGATE",payload:u}:void 0}const B=e=>"object"===typeof e&&null!=e?{initialRouteName:e.initialRouteName,screens:null!=e.screens?j(e.screens):void 0}:{},j=e=>Object.entries(e).reduce(((e,t)=>{let[n,r]=t;return e[n]=B(r),e}),{}),V=Symbol("CHILD_STATE");function z(e){const t=e[V]??e.state,n=e.params;return t?t.routes[t.index??("string"===typeof t.type&&"stack"!==t.type?0:t.routes.length-1)].name:"string"===typeof(null===n||void 0===n?void 0:n.screen)?n.screen:void 0}var H=n(79456);function U(e){return e.reduce(((e,t)=>{let[n,r]=t;if(e.hasOwnProperty(n))throw new Error(`A value for key '${n}' already exists in the object.`);return e[n]=r,e}),{})}const W=e=>e.map((e=>`- ${e}`)).join("\n");function q(e){const t=["initialRouteName","screens"];!(arguments.length>1&&void 0!==arguments[1])||arguments[1]||t.push("path","exact","stringify","parse");const n=Object.keys(e).filter((e=>!t.includes(e)));if(n.length)throw new Error(`Found invalid properties in the configuration:\n${W(n)}\n\nDid you forget to specify them under a 'screens' property?\n\nYou can only specify the following properties:\n${W(t)}\n\nSee https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.`);e.screens&&Object.entries(e.screens).forEach((e=>{let[t,n]=e;"string"!==typeof n&&q(n,!1)}))}const $=e=>{const t="number"===typeof e.index?e.routes[e.index]:e.routes[e.routes.length-1];return t.state?$(t.state):t};function Y(e,t){if(null==e)throw Error("Got 'undefined' for the navigation state. You must pass a valid state object.");t&&q(t);const n=null!==t&&void 0!==t&&t.screens?K(null===t||void 0===t?void 0:t.screens):{};let r="/",a=e;const i={};for(;a;){let t,l,u="number"===typeof a.index?a.index:0,c=a.routes[u],d=$(e),h=n,f=[],p=!0;for(;c.name in h&&p;){if(t=h[c.name].pattern,f.push(c.name),c.params){var o;const e=null===(o=h[c.name])||void 0===o?void 0:o.stringify,n=U(Object.entries(c.params).map((t=>{let[n,r]=t;return[n,null!==e&&void 0!==e&&e[n]?e[n](r):String(r)]})));var s;if(t&&Object.assign(i,n),d===c)l=Object.assign({},n),null===(s=t)||void 0===s||s.split("/").filter((e=>e.startsWith(":"))).forEach((e=>{const t=G(e);l&&delete l[t]}))}if(h[c.name].screens&&void 0!==c.state){u="number"===typeof c.state.index?c.state.index:c.state.routes.length-1;const e=c.state.routes[u],t=h[c.name].screens;t&&e.name in t?(c=e,h=t):p=!1}else p=!1}if(void 0===t&&(t=f.join("/")),void 0!==h[c.name]?r+=t.split("/").map((e=>{const t=G(e);if("*"===e)return c.name;if(e.startsWith(":")){const n=i[t];return void 0===n&&e.endsWith("?")?"":encodeURIComponent(n)}return encodeURIComponent(e)})).join("/"):r+=encodeURIComponent(c.name),l||(l=d.params),c.state)r+="/";else if(l){for(let t in l)"undefined"===l[t]&&delete l[t];const e=H.stringify(l,{sort:!1});e&&(r+=`?${e}`)}a=c.state}return r=r.replace(/\/+/g,"/"),r=r.length>1?r.replace(/\/$/,""):r,r}const G=e=>e.replace(/^:/,"").replace(/\?$/,""),X=function(){for(var e=arguments.length,t=new Array(e),n=0;ne.split("/")))).filter(Boolean).join("/")},K=(e,t)=>U(Object.entries(e).map((e=>{let[n,r]=e;const a=((e,t)=>{var n;if("string"===typeof e)return{pattern:t?X(t,e):e};let r;if(e.exact&&void 0===e.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");r=!0!==e.exact?X(t||"",e.path||""):e.path||"";const a=e.screens?K(e.screens,r):void 0;return{pattern:null===(n=r)||void 0===n?void 0:n.split("/").filter(Boolean).join("/"),stringify:e.stringify,screens:a}})(r,t);return[n,a]})));var J=n(81245),Z=n.n(J);function Q(e,t){t&&q(t);let n=[];null!==t&&void 0!==t&&t.initialRouteName&&n.push({initialRouteName:t.initialRouteName,parentScreens:[]});const r=null===t||void 0===t?void 0:t.screens;let a=e.replace(/\/+/g,"/").replace(/^\//,"").replace(/\?.*$/,"");if(a=a.endsWith("/")?a:`${a}/`,void 0===r){const t=a.split("/").filter(Boolean).map((e=>({name:decodeURIComponent(e)})));return t.length?oe(e,t,n):void 0}const i=[].concat(...Object.keys(r).map((e=>ne(e,r,[],n,[])))).sort(((e,t)=>{if(e.pattern===t.pattern)return t.routeNames.join(">").localeCompare(e.routeNames.join(">"));if(e.pattern.startsWith(t.pattern))return-1;if(t.pattern.startsWith(e.pattern))return 1;const n=e.pattern.split("/"),r=t.pattern.split("/");for(let a=0;a{if(e[t.pattern]){const n=e[t.pattern].routeNames,r=t.routeNames;if(!(n.length>r.length?r.every(((e,t)=>n[t]===e)):n.every(((e,t)=>r[t]===e))))throw new Error(`Found conflicting screens with the same pattern. The pattern '${t.pattern}' resolves to both '${n.join(" > ")}' and '${r.join(" > ")}'. Patterns must be unique and cannot resolve to more than one screen.`)}return Object.assign(e,{[t.pattern]:t})}),{}),"/"===a){const t=i.find((e=>""===e.path&&e.routeNames.every((e=>{var t;return!(null!==(t=i.find((t=>t.screen===e)))&&void 0!==t&&t.path)}))));return t?oe(e,t.routeNames.map((e=>({name:e}))),n,i):void 0}let o,s;const{routes:l,remainingPath:u}=te(a,i.map((e=>Object.assign({},e,{regex:e.regex?new RegExp(e.regex.source+"$"):void 0}))));if(void 0!==l&&(s=oe(e,l,n,i),a=u,o=s),null!=s&&null!=o)return o}const ee=function(){for(var e=arguments.length,t=new Array(e),n=0;ne.split("/")))).filter(Boolean).join("/")},te=(e,t)=>{let n,r=e;for(const i of t){if(!i.regex)continue;const e=r.match(i.regex);if(e){var a;const o=(null===(a=i.pattern)||void 0===a?void 0:a.split("/").reduce(((t,n,r)=>{if(!n.startsWith(":"))return t;t.pos+=1;const a=decodeURIComponent(e[2*(t.pos+1)].replace(/\/$/,""));return Object.assign(t.matchedParams,{[n]:Object.assign(t.matchedParams[n]||{},{[r]:a})}),t}),{pos:-1,matchedParams:{}})).matchedParams||{};n=i.routeNames.map((e=>{var n;const r=t.find((t=>t.screen===e&&i.pattern.startsWith(t.pattern))),a=null===r||void 0===r?void 0:r.path.split("/").filter(Boolean).join("/"),s=null===r||void 0===r||null===(n=r.pattern.replace(new RegExp(`${Z()(a)}$`),""))||void 0===n?void 0:n.split("/").length,l=null===a||void 0===a?void 0:a.split("/").reduce(((e,t,n)=>{var a;if(!t.startsWith(":"))return e;const i=s?s-1:0,l=null===(a=o[t])||void 0===a?void 0:a[n+i];if(l){var u;const n=t.replace(/^:/,"").replace(/\?$/,"");e[n]=null!==r&&void 0!==r&&null!==(u=r.parse)&&void 0!==u&&u[n]?r.parse[n](l):l}return e}),{});return l&&Object.keys(l).length?{name:e,params:l}:{name:e}})),r=r.replace(e[1],"");break}}return{routes:n,remainingPath:r}},ne=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;const o=[];n.push(e),a.push(e);const s=t[e];if("string"===typeof s){const t=i?ee(i,s):s;o.push(re(e,n,t,s))}else if("object"===typeof s){let t;if("string"===typeof s.path){if(s.exact&&void 0===s.path)throw new Error("A 'path' needs to be specified when specifying 'exact: true'. If you don't want this screen in the URL, specify it as empty string, e.g. `path: ''`.");t=!0!==s.exact?ee(i||"",s.path||""):s.path||"",o.push(re(e,n,t,s.path,s.parse))}s.screens&&(s.initialRouteName&&r.push({initialRouteName:s.initialRouteName,parentScreens:a}),Object.keys(s.screens).forEach((e=>{const l=ne(e,s.screens,n,r,[...a],t??i);o.push(...l)})))}return n.pop(),o},re=(e,t,n,r,a)=>({screen:e,regex:(n=n.split("/").filter(Boolean).join("/"))?new RegExp(`^(${n.split("/").map((e=>e.startsWith(":")?`(([^/]+\\/)${e.endsWith("?")?"?":""})`:`${"*"===e?".*":Z()(e)}\\/`)).join("")})`):void 0,pattern:n,path:r,routeNames:[...t],parse:a}),ae=(e,t,n)=>{for(const r of n)if(t.length===r.parentScreens.length){let n=!0;for(let e=0;en?e?{index:1,routes:[{name:e},t]}:{routes:[t]}:e?{index:1,routes:[{name:e},Object.assign({},t,{state:{routes:[]}})]}:{routes:[Object.assign({},t,{state:{routes:[]}})]},oe=(e,t,n,r)=>{let a,i=t.shift();const o=[];let s=ae(i.name,o,n);if(o.push(i.name),a=ie(s,i,0===t.length),t.length>0){let e=a;for(;i=t.shift();){s=ae(i.name,o,n);const r=e.index||e.routes.length-1;e.routes[r].state=ie(s,i,0===t.length),t.length>0&&(e=e.routes[r].state),o.push(i.name)}}i=m(a),i.path=e;const l=se(e,r?((e,t)=>{for(const n of t)if(e===n.routeNames[n.routeNames.length-1])return n.parse})(i.name,r):void 0);return l&&(i.params=Object.assign({},i.params,l)),a},se=(e,t)=>{const n=e.split("?")[1],r=H.parse(n);return t&&Object.keys(r).forEach((e=>{Object.hasOwnProperty.call(t,e)&&"string"===typeof r[e]&&(r[e]=t[e](r[e]))})),Object.keys(r).length?r:void 0},le=u.createContext(void 0),ue=u.createContext(void 0);var ce=n(21788);const de=n(93427),he=e=>[...e.values()].reduce(((e,t)=>{var n;let{routeKey:r,preventRemove:a}=t;return e[r]={preventRemove:(null===(n=e[r])||void 0===n?void 0:n.preventRemove)||a},e}),{});function fe(e){let{children:t}=e;const[n]=u.useState((()=>(0,ce.nanoid)())),[r,a]=u.useState(new Map),i=u.useContext(le),o=u.useContext(b),s=u.useContext(ue),l=null===s||void 0===s?void 0:s.setPreventRemove,c=de(((e,t,n)=>{if(n&&(null==i||null!==i&&void 0!==i&&i.getState().routes.every((e=>e.key!==t))))throw new Error(`Couldn't find a route with the key ${t}. Is your component inside NavigationContent?`);a((r=>{var a,i;if(t===(null===(a=r.get(e))||void 0===a?void 0:a.routeKey)&&n===(null===(i=r.get(e))||void 0===i?void 0:i.preventRemove))return r;const o=new Map(r);return n?o.set(e,{routeKey:t,preventRemove:n}):o.delete(e),o}))})),d=[...r.values()].some((e=>{let{preventRemove:t}=e;return t}));u.useEffect((()=>{if(void 0!==(null===o||void 0===o?void 0:o.key)&&void 0!==l)return l(n,o.key,d),()=>{l(n,o.key,!1)}}),[n,d,null===o||void 0===o?void 0:o.key,l]);const h=u.useMemo((()=>({setPreventRemove:c,preventedRoutes:he(r)})),[c,r]);return u.createElement(ue.Provider,{value:h},t)}class pe{}function me(){const e=u.useContext(y),t=u.useContext(_);if(void 0===t&&void 0===e)throw new Error("Couldn't find a navigation object. Is your component inside NavigationContainer?");return t??e}function ge(e){const t=me();if(void 0!==arguments[1]){const e="You passed a second argument to 'useFocusEffect', but it only accepts one argument. If you want to pass a dependency array, you can use 'React.useCallback':\n\nuseFocusEffect(\n React.useCallback(() => {\n // Your code here\n }, [depA, depB])\n);\n\nSee usage guide: https://reactnavigation.org/docs/use-focus-effect";console.error(e)}u.useEffect((()=>{let n,r=!1;const a=()=>{const t=e();if(void 0===t||"function"===typeof t)return t};t.isFocused()&&(n=a(),r=!0);const i=t.addListener("focus",(()=>{r||(void 0!==n&&n(),n=a(),r=!0)})),o=t.addListener("blur",(()=>{void 0!==n&&n(),n=void 0,r=!1}));return()=>{void 0!==n&&n(),i(),o()}}),[e,t])}function ye(){const e=me(),[t,n]=(0,u.useState)(e.isFocused),r=e.isFocused();return t!==r&&n(r),u.useEffect((()=>{const t=e.addListener("focus",(()=>n(!0))),r=e.addListener("blur",(()=>n(!1)));return()=>{t(),r()}}),[e]),u.useDebugValue(r),r}n(41536);function _e(e,t){return e===t||e.length===t.length&&e.every(((e,n)=>e===t[n]))}const be=e=>{let{render:t,children:n}=e;return t(n)};function ve(e){const t=u.useRef(e);return t.current=e,u.useEffect((()=>{t.current=null})),u.useRef((e=>{let{children:n}=e;const r=t.current;if(null===r)throw new Error("The returned component must be rendered in the same render phase as the hook.");return u.createElement(be,{render:r},n)})).current}const we=u.memo((function(e){return e.children}),((e,t)=>{const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if("children"!==a&&e[a]!==t[a])return!1;return!0}));function Fe(e){let{screen:t,route:n,navigation:r,routeState:a,getState:i,setState:o,options:s,clearOptions:l}=e;const c=u.useRef(),d=u.useCallback((()=>c.current),[]),{addOptionsGetter:h}=S({key:n.key,options:s,navigation:r}),f=u.useCallback((e=>{c.current=e}),[]),m=u.useCallback((()=>{const e=i().routes.find((e=>e.key===n.key));return e?e.state:void 0}),[i,n.key]),g=u.useCallback((e=>{const t=i();o(Object.assign({},t,{routes:t.routes.map((t=>t.key===n.key?Object.assign({},t,{state:e}):t))}))}),[i,n.key,o]),y=u.useRef(!0);u.useEffect((()=>{y.current=!1})),u.useEffect((()=>l),[]);const _=u.useCallback((()=>y.current),[]),b=u.useMemo((()=>({state:a,getState:m,setState:g,getKey:d,setKey:f,getIsInitial:_,addOptionsGetter:h})),[a,m,g,d,f,_,h]),v=t.getComponent?t.getComponent():t.component;return u.createElement(w.Provider,{value:b},u.createElement(p,null,u.createElement(we,{name:t.name,render:v||t.children,navigation:r,route:n},void 0!==v?u.createElement(v,{navigation:r,route:n}):void 0!==t.children?t.children({navigation:r,route:n}):null)))}const ke=["emit"];function xe(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Ae(e){let{state:t,screens:n,navigation:i,screenOptions:o,defaultScreenOptions:s,onAction:l,getState:c,setState:d,addListener:h,addKeyedListener:f,onRouteFocus:p,router:m,emitter:y}=e;const[v,w]=u.useState({}),{onDispatchAction:F,onOptionsChange:k,stackRef:x}=u.useContext(g),A=u.useMemo((()=>({navigation:i,onAction:l,addListener:h,addKeyedListener:f,onRouteFocus:p,onDispatchAction:F,onOptionsChange:k,stackRef:x})),[i,l,h,f,p,F,k,x]),S=function(e){let{state:t,getState:n,navigation:i,setOptions:o,router:s,emitter:l}=e;const{stackRef:c}=u.useContext(g),d=u.useMemo((()=>({current:{}})),[n,i,o,s,l]),h=Object.assign({},s.actionCreators,r);return d.current=t.routes.reduce(((e,t)=>{const r=d.current[t.key];if(r)e[t.key]=r;else{const r=(0,a.default)(i,ke),s=e=>{const r="function"===typeof e?e(n()):e;null!=r&&i.dispatch(Object.assign({source:t.key},r))},u=e=>{try{e()}finally{}},c=Object.keys(h).reduce(((e,t)=>(e[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;rs(h[t](...n))))},e)),{});e[t.key]=Object.assign({},r,c,l.create(t.key),{dispatch:e=>u((()=>s(e))),getParent:n=>void 0!==n&&n===r.getId()?e[t.key]:r.getParent(n),setOptions:e=>o((n=>Object.assign({},n,{[t.key]:Object.assign({},n[t.key],e)}))),isFocused:()=>{const e=n();return e.routes[e.index].key===t.key&&(!i||i.isFocused())}})}return e}),{}),d.current}({state:t,getState:c,navigation:i,setOptions:w,router:m,emitter:y});return function(e){return u.useMemo((()=>({current:new Map})),[]),e}(t.routes).reduce(((e,r,i)=>{const l=n[r.name],h=l.props,f=S[r.key],p=[o,...l.options?l.options.filter(Boolean):[],h.options,v[r.key]].reduce(((e,t)=>Object.assign(e,"function"!==typeof t?t:t({route:r,navigation:f}))),{}),m=Object.assign({},"function"===typeof s?s({route:r,navigation:f,options:p}):s,p),y=()=>w((e=>{if(r.key in e){const t=r.key;return(0,a.default)(e,[t].map(xe))}return e}));return e[r.key]={route:r,navigation:f,render:()=>u.createElement(g.Provider,{key:r.key,value:A},u.createElement(_.Provider,{value:f},u.createElement(b.Provider,{value:r},u.createElement(Fe,{navigation:f,route:r,screen:h,routeState:t.routes[i].state,getState:c,setState:d,options:m,clearOptions:y})))),options:m},e}),{})}const Se=Symbol("VISITED_ROUTE_KEYS"),Ee=(e,t,n,r,a)=>{const i=r.map((e=>e.key)),o=n.filter((e=>!i.includes(e.key))).reverse(),s=a[Se]??new Set,l=Object.assign({},a,{[Se]:s});for(const c of o){var u;if(s.has(c.key))continue;if(null===(u=t[c.key])||void 0===u?void 0:u.call(t,l))return!0;s.add(c.key);if(e.emit({type:"beforeRemove",target:c.key,data:{action:l},canPreventDefault:!0}).defaultPrevented)return!0}return!1};function Ce(e){let{router:t,getState:n,setState:r,key:a,actionListeners:i,beforeRemoveListeners:o,routerConfigOptions:s,emitter:l}=e;const{onAction:c,onRouteFocus:d,addListener:h,onDispatchAction:f}=u.useContext(g),p=u.useRef(s);u.useEffect((()=>{p.current=s}));const m=u.useCallback((function(e){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Set;const u=n();if(s.has(u.key))return!1;if(s.add(u.key),"string"!==typeof e.target||e.target===u.key){let n=t.getStateForAction(u,e,p.current);if(n=null===n&&e.target===u.key?u:n,null!==n){if(f(e,u===n),u!==n){if(Ee(l,o,u.routes,n.routes,e))return!0;r(n)}if(void 0!==d){t.shouldActionChangeFocus(e)&&void 0!==a&&d(a)}return!0}}if(void 0!==c&&c(e,s))return!0;for(let t=i.length-1;t>=0;t--){if((0,i[t])(e,s))return!0}return!1}),[i,o,l,n,a,c,f,d,t,r]);return function(e){let{getState:t,emitter:n,beforeRemoveListeners:r}=e;const{addKeyedListener:a}=u.useContext(g),i=u.useContext(b),o=null===i||void 0===i?void 0:i.key;u.useEffect((()=>{if(o)return null===a||void 0===a?void 0:a("beforeRemove",o,(e=>{const a=t();return Ee(n,r,a.routes,[],e)}))}),[a,r,n,t,o])}({getState:n,emitter:l,beforeRemoveListeners:o}),u.useEffect((()=>null===h||void 0===h?void 0:h("action",m)),[h,m]),m}const Te=["children","screenListeners"],De=e=>void 0===e||"string"===typeof e&&""!==e,Ie=(e,t,n)=>u.Children.toArray(e).reduce(((e,r)=>{var a,i;if(u.isValidElement(r)){if(r.type===M){if(!De(r.props.navigationKey))throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(r.props.navigationKey)}) for the screen '${r.props.name}'. It must be a non-empty string or 'undefined'.`);return e.push({keys:[t,r.props.navigationKey],options:n,props:r.props}),e}if(r.type===u.Fragment||r.type===P){if(!De(r.props.navigationKey))throw new Error(`Got an invalid 'navigationKey' prop (${JSON.stringify(r.props.navigationKey)}) for the group. It must be a non-empty string or 'undefined'.`);return e.push(...Ie(r.props.children,r.props.navigationKey,r.type!==P?n:null!=n?[...n,r.props.screenOptions]:[r.props.screenOptions])),e}}throw new Error(`A navigator can only contain 'Screen', 'Group' or 'React.Fragment' as its direct children (found ${u.isValidElement(r)?`'${"string"===typeof r.type?r.type:null===(a=r.type)||void 0===a?void 0:a.name}'${null!=r.props&&"object"===typeof r.props&&"name"in r.props&&null!==(i=r.props)&&void 0!==i&&i.name?` for the screen '${r.props.name}'`:""}`:"object"===typeof r?JSON.stringify(r):`'${String(r)}'`}). To render this component in the navigator, pass it in the 'component' prop to 'Screen'.`)}),[]);function Oe(e,t){const n=function(){const[e]=u.useState((()=>(0,ce.nanoid)())),t=u.useContext(f);if(void 0===t)throw new Error("Couldn't register the navigator. Have you wrapped your app with 'NavigationContainer'?\n\nThis can also happen if there are multiple copies of '@react-navigation' packages installed.");return u.useEffect((()=>{const{register:n,unregister:r}=t;return n(e),()=>r(e)}),[t,e]),e}(),i=u.useContext(b),{children:l,screenListeners:c}=t,d=(0,a.default)(t,Te),{current:h}=u.useRef(e(Object.assign({},d,null!==i&&void 0!==i&&i.params&&null==i.params.state&&!1!==i.params.initial&&"string"===typeof i.params.screen?{initialRouteName:i.params.screen}:null))),p=Ie(l),m=p.reduce(((e,t)=>{if(t.props.name in e)throw new Error(`A navigator cannot contain multiple 'Screen' components with the same name (found duplicate screen named '${t.props.name}')`);return e[t.props.name]=t,e}),{}),y=p.map((e=>e.props.name)),v=y.reduce(((e,t)=>(e[t]=m[t].keys.map((e=>e??"")).join(":"),e)),{}),S=y.reduce(((e,t)=>{const{initialParams:n}=m[t].props;return e[t]=n,e}),{}),E=y.reduce(((e,t)=>Object.assign(e,{[t]:m[t].props.getId})),{});if(!y.length)throw new Error("Couldn't find any screens for the navigator. Have you defined any screens as its children?");const T=u.useCallback((e=>void 0===e.type||e.type===h.type),[h.type]),D=u.useCallback((e=>void 0!==e&&!1===e.stale&&T(e)),[T]),{state:I,getState:O,setState:P,setKey:M,getKey:R,getIsInitial:N}=u.useContext(w),B=u.useRef(!1),j=u.useCallback((()=>{P(void 0),B.current=!0}),[P]),V=u.useCallback((e=>{B.current||P(e)}),[P]),[z,H]=u.useMemo((()=>{var e;const t=y.reduce(((e,t)=>{var n,r,a;const{initialParams:o}=m[t].props,s=null==(null===i||void 0===i||null===(n=i.params)||void 0===n?void 0:n.state)&&!1!==(null===i||void 0===i||null===(r=i.params)||void 0===r?void 0:r.initial)&&(null===i||void 0===i||null===(a=i.params)||void 0===a?void 0:a.screen)===t?i.params.params:void 0;return e[t]=void 0!==o||void 0!==s?Object.assign({},o,s):void 0,e}),{});var n;return void 0!==I&&T(I)||null!=(null===i||void 0===i||null===(e=i.params)||void 0===e?void 0:e.state)?[h.getRehydratedState((null===i||void 0===i||null===(n=i.params)||void 0===n?void 0:n.state)??I,{routeNames:y,routeParamList:t,routeGetIdList:E}),!1]:[h.getInitialState({routeNames:y,routeParamList:t,routeGetIdList:E}),!0]}),[I,h,T]),U=u.useRef(v);u.useEffect((()=>{U.current=v}));const W=U.current;let q=D(I)?I:z,$=q;_e(q.routeNames,y)&&function(e,t){if(e===t)return!0;const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every((n=>e[n]===t[n]))}(v,W)||($=h.getStateForRouteNamesChange(q,{routeNames:y,routeParamList:S,routeGetIdList:E,routeKeyChanges:Object.keys(v).filter((e=>W.hasOwnProperty(e)&&v[e]!==W[e]))}));const Y=u.useRef(null===i||void 0===i?void 0:i.params);if(u.useEffect((()=>{Y.current=null===i||void 0===i?void 0:i.params}),[null===i||void 0===i?void 0:i.params]),null!==i&&void 0!==i&&i.params){const e=Y.current;let t;"object"===typeof i.params.state&&null!=i.params.state&&i.params!==e?t=s(i.params.state):"string"===typeof i.params.screen&&(!1===i.params.initial&&H||i.params!==e)&&(t=o({name:i.params.screen,params:i.params.params,path:i.params.path}));const n=t?h.getStateForAction($,t,{routeNames:y,routeParamList:S,routeGetIdList:E}):null;$=null!==n?h.getRehydratedState(n,{routeNames:y,routeParamList:S,routeGetIdList:E}):$}const G=q!==$;!function(e){const{scheduleUpdate:t,flushUpdates:n}=u.useContext(C);t(e),u.useEffect(n)}((()=>{G&&V($)})),q=$,u.useEffect((()=>(M(n),N()||V($),()=>{setTimeout((()=>{void 0!==O()&&R()===n&&j()}),0)})),[]);const X=u.useRef();X.current=z;const K=u.useCallback((()=>{const e=O();return D(e)?e:X.current}),[O,D]),J=x((e=>{let t,n=[];var r;e.target?(t=q.routes.find((t=>t.key===e.target)),null!==(r=t)&&void 0!==r&&r.name&&n.push(t.name)):(t=q.routes[q.index],n.push(...Object.keys(m).filter((e=>{var n;return(null===(n=t)||void 0===n?void 0:n.name)===e}))));if(null==t)return;const a=ie[t.key].navigation;[].concat(...[c,...n.map((e=>{const{listeners:t}=m[e].props;return t}))].map((n=>{const r="function"===typeof n?n({route:t,navigation:a}):n;return r?Object.keys(r).filter((t=>t===e.type)).map((e=>null===r||void 0===r?void 0:r[e])):void 0}))).filter(((e,t,n)=>e&&n.lastIndexOf(e)===t)).forEach((t=>null===t||void 0===t?void 0:t(e)))}));!function(e){let{state:t,emitter:n}=e;const r=u.useContext(_),a=u.useRef(),i=t.routes[t.index].key;u.useEffect((()=>null===r||void 0===r?void 0:r.addListener("focus",(()=>{a.current=i,n.emit({type:"focus",target:i})}))),[i,n,r]),u.useEffect((()=>null===r||void 0===r?void 0:r.addListener("blur",(()=>{a.current=void 0,n.emit({type:"blur",target:i})}))),[i,n,r]),u.useEffect((()=>{const e=a.current;a.current=i,void 0!==e||r||n.emit({type:"focus",target:i}),e===i||r&&!r.isFocused()||void 0!==e&&(n.emit({type:"blur",target:e}),n.emit({type:"focus",target:i}))}),[i,n,r])}({state:q,emitter:J}),u.useEffect((()=>{J.emit({type:"state",data:{state:q}})}),[J,q]);const{listeners:Z,addListener:Q}=k(),{keyedListeners:ee,addKeyedListener:te}=A(),ne=Ce({router:h,getState:K,setState:V,key:null===i||void 0===i?void 0:i.key,actionListeners:Z.action,beforeRemoveListeners:ee.beforeRemove,routerConfigOptions:{routeNames:y,routeParamList:S,routeGetIdList:E},emitter:J}),re=function(e){let{router:t,getState:n,key:r,setState:a}=e;const{onRouteFocus:i}=u.useContext(g);return u.useCallback((e=>{const o=n(),s=t.getStateForRouteFocus(o,e);s!==o&&a(s),void 0!==i&&void 0!==r&&i(r)}),[n,i,t,a,r])}({router:h,key:null===i||void 0===i?void 0:i.key,getState:K,setState:V}),ae=function(e){let{id:t,onAction:n,getState:a,emitter:i,router:o}=e;const s=u.useContext(F),l=u.useContext(_);return u.useMemo((()=>{const e=e=>{const t="function"===typeof e?e(a()):e;n(t)||null===s||void 0===s||s(t)},u=Object.assign({},o.actionCreators,r),c=Object.keys(u).reduce(((t,n)=>(t[n]=function(){return e(u[n](...arguments))},t)),{}),d=Object.assign({},l,c,{dispatch:e,emit:i.emit,isFocused:l?l.isFocused:()=>!0,canGoBack:()=>{const e=a();return null!==o.getStateForAction(e,{type:"GO_BACK"},{routeNames:e.routeNames,routeParamList:{},routeGetIdList:{}})||(null===l||void 0===l?void 0:l.canGoBack())||!1},getId:()=>t,getParent:e=>{if(void 0!==e){let t=d;for(;t&&e!==t.getId();)t=t.getParent();return t}return l},getState:a});return d}),[t,i.emit,a,n,s,l,o])}({id:t.id,onAction:ne,getState:K,emitter:J,router:h});!function(e){let{navigation:t,focusedListeners:n}=e;const{addListener:r}=u.useContext(g),a=u.useCallback((e=>{if(t.isFocused()){for(const t of n){const{handled:n,result:r}=t(e);if(n)return{handled:n,result:r}}return{handled:!0,result:e(t)}}return{handled:!1,result:null}}),[n,t]);u.useEffect((()=>null===r||void 0===r?void 0:r("focus",a)),[r,a])}({navigation:ae,focusedListeners:Z.focus}),function(e){let{getState:t,getStateListeners:n}=e;const{addKeyedListener:r}=u.useContext(g),a=u.useContext(b),i=a?a.key:"root",o=u.useCallback((()=>{const e=t(),r=e.routes.map((e=>{var t;const r=null===(t=n[e.key])||void 0===t?void 0:t.call(n);return e.state===r?e:Object.assign({},e,{state:r})}));return _e(e.routes,r)?e:Object.assign({},e,{routes:r})}),[t,n]);u.useEffect((()=>null===r||void 0===r?void 0:r("getState",i,o)),[r,o,i])}({getState:K,getStateListeners:ee.getState});const ie=Ae({state:q,screens:m,navigation:ae,screenOptions:t.screenOptions,defaultScreenOptions:t.defaultScreenOptions,onAction:ne,getState:K,setState:V,onRouteFocus:re,addListener:Q,addKeyedListener:te,router:h,emitter:J});!function(e){let{state:t,navigation:n,descriptors:r}=e;const a=u.useContext(L);a&&n.isFocused()&&(a.options=r[t.routes[t.index].key].options)}({state:q,navigation:ae,descriptors:ie});const oe=ve((e=>u.createElement(le.Provider,{value:ae},u.createElement(fe,null,e))));return{state:q,navigation:ae,descriptors:ie,NavigationContent:oe}}function Pe(){const e=u.useRef(null);return null==e.current&&(e.current=d()),e.current}function Me(e){const t=me(),[,n]=u.useState((()=>e(t.getState()))),r=u.useRef(e);return u.useEffect((()=>{r.current=e})),u.useEffect((()=>t.addListener("state",(e=>{n(r.current(e.data.state))}))),[t]),e(t.getState())}function Re(){const e=u.useContext(ue);if(null==e)throw new Error("Couldn't find the prevent remove context. Is your component inside NavigationContent?");return e}function Le(){const e=u.useContext(b);if(void 0===e)throw new Error("Couldn't find a route object. Is your component inside a screen in a navigator?");return e}function Ne(e,t){const[n]=u.useState((()=>(0,ce.nanoid)())),r=me(),{key:a}=Le(),{setPreventRemove:i}=Re();u.useEffect((()=>(i(n,a,e),()=>{i(n,a,!1)})),[i,n,a,e]);const o=de((n=>{e&&(n.preventDefault(),t({data:n.data}))}));u.useEffect((()=>null===r||void 0===r?void 0:r.addListener("beforeRemove",o)),[r,o])}const Be={getStateForAction(e,t){switch(t.type){case"SET_PARAMS":{const n=t.source?e.routes.findIndex((e=>e.key===t.source)):e.index;return-1===n?null:Object.assign({},e,{routes:e.routes.map(((e,r)=>r===n?Object.assign({},e,{params:Object.assign({},e.params,t.payload.params)}):e))})}case"RESET":{const n=t.payload;return 0===n.routes.length||n.routes.some((t=>!e.routeNames.includes(t.name)))?null:!1===n.stale?e.routeNames.length!==n.routeNames.length||n.routeNames.some((t=>!e.routeNames.includes(t)))?null:Object.assign({},n,{routes:n.routes.map((e=>e.key?e:Object.assign({},e,{key:`${e.name}-${(0,ce.nanoid)()}`})))}):n}default:return null}},shouldActionChangeFocus:e=>"NAVIGATE"===e.type},je="route",Ve={jumpTo:(e,t)=>({type:"JUMP_TO",payload:{name:e,params:t}})},ze=(e,t,n,r)=>{const a=[{type:je,key:e[t].key}];let i;switch(n){case"order":for(let n=t;n>0;n--)a.unshift({type:je,key:e[n-1].key});break;case"firstRoute":0!==t&&a.unshift({type:je,key:e[0].key});break;case"initialRoute":i=e.findIndex((e=>e.name===r)),i=-1===i?0:i,t!==i&&a.unshift({type:je,key:e[i].key})}return a},He=(e,t,n,r)=>{let a;if("history"===n){const n=e.routes[t].key;a=e.history.filter((e=>"route"===e.type&&e.key!==n)).concat({type:je,key:n})}else a=ze(e.routes,t,n,r);return Object.assign({},e,{index:t,history:a})};function Ue(e){let{initialRouteName:t,backBehavior:n="firstRoute"}=e;return Object.assign({},Be,{type:"tab",getInitialState(e){let{routeNames:r,routeParamList:a}=e;const i=void 0!==t&&r.includes(t)?r.indexOf(t):0,o=r.map((e=>({name:e,key:`${e}-${(0,ce.nanoid)()}`,params:a[e]}))),s=ze(o,i,n,t);return{stale:!1,type:"tab",key:`tab-${(0,ce.nanoid)()}`,index:i,routeNames:r,history:s,routes:o}},getRehydratedState(e,r){var a,i;let{routeNames:o,routeParamList:s}=r,l=e;if(!1===l.stale)return l;const u=o.map((e=>{const t=l.routes.find((t=>t.name===e));return Object.assign({},t,{name:e,key:t&&t.name===e&&t.key?t.key:`${e}-${(0,ce.nanoid)()}`,params:void 0!==s[e]?Object.assign({},s[e],t?t.params:void 0):t?t.params:void 0})})),c=Math.min(Math.max(o.indexOf(null===(a=l.routes[(null===l||void 0===l?void 0:l.index)??0])||void 0===a?void 0:a.name),0),u.length-1),d=(null===(i=l.history)||void 0===i?void 0:i.filter((e=>u.find((t=>t.key===e.key)))))??[];return He({stale:!1,type:"tab",key:`tab-${(0,ce.nanoid)()}`,index:c,routeNames:o,history:d,routes:u},c,n,t)},getStateForRouteNamesChange(e,r){let{routeNames:a,routeParamList:i,routeKeyChanges:o}=r;const s=a.map((t=>e.routes.find((e=>e.name===t&&!o.includes(e.name)))||{name:t,key:`${t}-${(0,ce.nanoid)()}`,params:i[t]})),l=Math.max(0,a.indexOf(e.routes[e.index].name));let u=e.history.filter((e=>"route"!==e.type||s.find((t=>t.key===e.key))));return u.length||(u=ze(s,l,n,t)),Object.assign({},e,{history:u,routeNames:a,routes:s,index:l})},getStateForRouteFocus(e,r){const a=e.routes.findIndex((e=>e.key===r));return-1===a||a===e.index?e:He(e,a,n,t)},getStateForAction(e,r,a){let{routeParamList:i,routeGetIdList:o}=a;switch(r.type){case"JUMP_TO":case"NAVIGATE":{let a=-1;return a="NAVIGATE"===r.type&&r.payload.key?e.routes.findIndex((e=>e.key===r.payload.key)):e.routes.findIndex((e=>e.name===r.payload.name)),-1===a?null:He(Object.assign({},e,{routes:e.routes.map(((e,t)=>{if(t!==a)return e;const n=o[e.name],s=null===n||void 0===n?void 0:n({params:e.params}),l=null===n||void 0===n?void 0:n({params:r.payload.params}),u=s===l?e.key:`${e.name}-${(0,ce.nanoid)()}`;let c;c="NAVIGATE"===r.type&&r.payload.merge&&s===l?void 0!==r.payload.params||void 0!==i[e.name]?Object.assign({},i[e.name],e.params,r.payload.params):e.params:void 0!==i[e.name]?Object.assign({},i[e.name],r.payload.params):r.payload.params;const d="NAVIGATE"===r.type&&null!=r.payload.path?r.payload.path:e.path;return c!==e.params||d!==e.path?Object.assign({},e,{key:u,path:d,params:c}):e}))}),a,n,t)}case"GO_BACK":{if(1===e.history.length)return null;const t=e.history[e.history.length-2].key,n=e.routes.findIndex((e=>e.key===t));return-1===n?null:Object.assign({},e,{history:e.history.slice(0,-1),index:n})}default:return Be.getStateForAction(e,r)}},shouldActionChangeFocus:e=>"NAVIGATE"===e.type,actionCreators:Ve})}const We=["defaultStatus"],qe=Object.assign({},Ve,{openDrawer:()=>({type:"OPEN_DRAWER"}),closeDrawer:()=>({type:"CLOSE_DRAWER"}),toggleDrawer:()=>({type:"TOGGLE_DRAWER"})});function $e(e){let{defaultStatus:t="closed"}=e;const n=Ue((0,a.default)(e,We)),r=e=>{var t;return Boolean(null===(t=e.history)||void 0===t?void 0:t.some((e=>"drawer"===e.type)))},i=e=>r(e)?e:Object.assign({},e,{history:[...e.history,{type:"drawer",status:"open"===t?"closed":"open"}]}),o=e=>r(e)?Object.assign({},e,{history:e.history.filter((e=>"drawer"!==e.type))}):e,s=e=>"open"===t?i(e):o(e);return Object.assign({},n,{type:"drawer",getInitialState(e){let{routeNames:r,routeParamList:a,routeGetIdList:i}=e;const o=n.getInitialState({routeNames:r,routeParamList:a,routeGetIdList:i});return Object.assign({},o,{default:t,stale:!1,type:"drawer",key:`drawer-${(0,ce.nanoid)()}`})},getRehydratedState(e,a){let{routeNames:s,routeParamList:l,routeGetIdList:u}=a;if(!1===e.stale)return e;let c=n.getRehydratedState(e,{routeNames:s,routeParamList:l,routeGetIdList:u});return r(e)&&(c=o(c),c=i(c)),Object.assign({},c,{default:t,type:"drawer",key:`drawer-${(0,ce.nanoid)()}`})},getStateForRouteFocus(e,t){const r=n.getStateForRouteFocus(e,t);return s(r)},getStateForAction(e,a,l){switch(a.type){case"OPEN_DRAWER":return(e=>"open"===t?o(e):i(e))(e);case"CLOSE_DRAWER":return s(e);case"TOGGLE_DRAWER":return r(e)?o(e):i(e);case"JUMP_TO":case"NAVIGATE":{const t=n.getStateForAction(e,a,l);return null!=t&&t.index!==e.index?s(t):t}case"GO_BACK":return r(e)?o(e):n.getStateForAction(e,a,l);default:return n.getStateForAction(e,a,l)}},actionCreators:qe})}const Ye={replace:(e,t)=>({type:"REPLACE",payload:{name:e,params:t}}),push:(e,t)=>({type:"PUSH",payload:{name:e,params:t}}),pop(){return{type:"POP",payload:{count:arguments.length>0&&void 0!==arguments[0]?arguments[0]:1}}},popToTop:()=>({type:"POP_TO_TOP"})};function Ge(e){const t=Object.assign({},Be,{type:"stack",getInitialState(t){let{routeNames:n,routeParamList:r}=t;const a=void 0!==e.initialRouteName&&n.includes(e.initialRouteName)?e.initialRouteName:n[0];return{stale:!1,type:"stack",key:`stack-${(0,ce.nanoid)()}`,index:0,routeNames:n,routes:[{key:`${a}-${(0,ce.nanoid)()}`,name:a,params:r[a]}]}},getRehydratedState(t,n){let{routeNames:r,routeParamList:a}=n,i=t;if(!1===i.stale)return i;const o=i.routes.filter((e=>r.includes(e.name))).map((e=>Object.assign({},e,{key:e.key||`${e.name}-${(0,ce.nanoid)()}`,params:void 0!==a[e.name]?Object.assign({},a[e.name],e.params):e.params})));if(0===o.length){const t=void 0!==e.initialRouteName?e.initialRouteName:r[0];o.push({key:`${t}-${(0,ce.nanoid)()}`,name:t,params:a[t]})}return{stale:!1,type:"stack",key:`stack-${(0,ce.nanoid)()}`,index:o.length-1,routeNames:r,routes:o}},getStateForRouteNamesChange(t,n){let{routeNames:r,routeParamList:a,routeKeyChanges:i}=n;const o=t.routes.filter((e=>r.includes(e.name)&&!i.includes(e.name)));if(0===o.length){const t=void 0!==e.initialRouteName&&r.includes(e.initialRouteName)?e.initialRouteName:r[0];o.push({key:`${t}-${(0,ce.nanoid)()}`,name:t,params:a[t]})}return Object.assign({},t,{routeNames:r,routes:o,index:Math.min(t.index,o.length-1)})},getStateForRouteFocus(e,t){const n=e.routes.findIndex((e=>e.key===t));return-1===n||n===e.index?e:Object.assign({},e,{index:n,routes:e.routes.slice(0,n+1)})},getStateForAction(e,n,r){const{routeParamList:a}=r;switch(n.type){case"REPLACE":{const t=n.target===e.key&&n.source?e.routes.findIndex((e=>e.key===n.source)):e.index;if(-1===t)return null;const{name:r,key:i,params:o}=n.payload;return e.routeNames.includes(r)?Object.assign({},e,{routes:e.routes.map(((e,n)=>n===t?{key:void 0!==i?i:`${r}-${(0,ce.nanoid)()}`,name:r,params:void 0!==a[r]?Object.assign({},a[r],o):o}:e))}):null}case"PUSH":if(e.routeNames.includes(n.payload.name)){const t=r.routeGetIdList[n.payload.name],i=null===t||void 0===t?void 0:t({params:n.payload.params}),o=i?e.routes.find((e=>e.name===n.payload.name&&i===(null===t||void 0===t?void 0:t({params:e.params})))):void 0;let s;return o?(s=e.routes.filter((e=>e.key!==o.key)),s.push(Object.assign({},o,{params:void 0!==a[n.payload.name]?Object.assign({},a[n.payload.name],n.payload.params):n.payload.params}))):s=[...e.routes,{key:`${n.payload.name}-${(0,ce.nanoid)()}`,name:n.payload.name,params:void 0!==a[n.payload.name]?Object.assign({},a[n.payload.name],n.payload.params):n.payload.params}],Object.assign({},e,{index:s.length-1,routes:s})}return null;case"POP":{const t=n.target===e.key&&n.source?e.routes.findIndex((e=>e.key===n.source)):e.index;if(t>0){const r=Math.max(t-n.payload.count+1,1),a=e.routes.slice(0,r).concat(e.routes.slice(t+1));return Object.assign({},e,{index:a.length-1,routes:a})}return null}case"POP_TO_TOP":return t.getStateForAction(e,{type:"POP",payload:{count:e.routes.length-1}},r);case"NAVIGATE":if(void 0!==n.payload.name&&!e.routeNames.includes(n.payload.name))return null;if(n.payload.key||n.payload.name){let t=-1;const i=void 0===n.payload.key&&void 0!==n.payload.name?r.routeGetIdList[n.payload.name]:void 0,o=null===i||void 0===i?void 0:i({params:n.payload.params});if(o)t=e.routes.findIndex((e=>e.name===n.payload.name&&o===(null===i||void 0===i?void 0:i({params:e.params}))));else if(e.routes[e.index].name===n.payload.name&&void 0===n.payload.key||e.routes[e.index].key===n.payload.key)t=e.index;else for(let r=e.routes.length-1;r>=0;r--)if(e.routes[r].name===n.payload.name&&void 0===n.payload.key||e.routes[r].key===n.payload.key){t=r;break}if(-1===t&&n.payload.key&&void 0===n.payload.name)return null;if(-1===t&&void 0!==n.payload.name){const t=[...e.routes,{key:n.payload.key??`${n.payload.name}-${(0,ce.nanoid)()}`,name:n.payload.name,path:n.payload.path,params:void 0!==a[n.payload.name]?Object.assign({},a[n.payload.name],n.payload.params):n.payload.params}];return Object.assign({},e,{routes:t,index:t.length-1})}const s=e.routes[t];let l;return l=n.payload.merge?void 0!==n.payload.params||void 0!==a[s.name]?Object.assign({},a[s.name],s.params,n.payload.params):s.params:void 0!==a[s.name]?Object.assign({},a[s.name],n.payload.params):n.payload.params,Object.assign({},e,{index:t,routes:[...e.routes.slice(0,t),l!==s.params||n.payload.path&&n.payload.path!==s.path?Object.assign({},s,{path:n.payload.path??s.path,params:l}):e.routes[t]]})}return null;case"GO_BACK":return e.index>0?t.getStateForAction(e,{type:"POP",payload:{count:1},target:n.target,source:n.source},r):null;default:return Be.getStateForAction(e,n)}},actionCreators:Ye});return t}},70300:(e,t)=>{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,a=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,o=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,f=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,_=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,v=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case o:case f:return e;default:switch(e=e&&e.$$typeof){case u:case h:case g:case m:case l:return e;default:return t}}case a:return t}}}function F(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=a,t.Profiler=s,t.StrictMode=o,t.Suspense=f,t.isAsyncMode=function(e){return F(e)||w(e)===c},t.isConcurrentMode=F,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===h},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===g},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===a},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===o},t.isSuspense=function(e){return w(e)===f},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===o||e===f||e===p||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===h||e.$$typeof===_||e.$$typeof===b||e.$$typeof===v||e.$$typeof===y)},t.typeOf=w},41536:(e,t,n)=>{"use strict";e.exports=n(70300)},56520:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>w});var r=n(98587),a=n(8179),i=n(36665);const o=i.createContext({options:void 0});o.displayName="LinkingContext";const s=o;var l=n(40382),u=n(46099);function c(e){let{value:t,children:n}=e;return i.createElement(u.default.Provider,{value:t},n)}var d=n(7976),h=n.n(d),f=n(21788);function p(){let e=0,t=[];const n=[],r=()=>{n.forEach((e=>{const t=e.cb;e.cb=()=>t(!0)}))};return{get index(){var e;const n=null===(e=window.history.state)||void 0===e?void 0:e.id;if(n){const e=t.findIndex((e=>e.id===n));return e>-1?e:0}return 0},get:e=>t[e],backIndex(n){let{path:r}=n;for(let a=e-1;a>=0;a--){if(t[a].path===r)return a}return-1},push(n){let{path:a,state:i}=n;r();const o=(0,f.nanoid)();t=t.slice(0,e+1),t.push({path:a,state:i,id:o}),e=t.length-1,window.history.pushState({id:o},"",a)},replace(n){var a;let{path:i,state:o}=n;r();const s=(null===(a=window.history.state)||void 0===a?void 0:a.id)??(0,f.nanoid)();let l=i;!t.length||t.findIndex((e=>e.id===s))<0?(l+=location.hash,t=[{path:l,state:o,id:s}],e=0):(t[e].path===i&&(l+=location.hash),t[e]={path:i,state:o,id:s}),window.history.replaceState({id:s},"",l)},go(a){r();const i=e+a,o=t.length-1;if(a<0&&!t[i]?(a=-e,e=0):a>0&&i>o?(a=o-e,e=o):e=i,0!==a)return new Promise(((r,i)=>{const o=e=>{if(clearTimeout(s),e)return void i(new Error("History was changed during navigation."));const{title:t}=window.document;window.document.title="",window.document.title=t,r()};n.push({ref:o,cb:o});const s=setTimeout((()=>{const e=n.findIndex((e=>e.ref===o));e>-1&&(n[e].cb(),n.splice(e,1))}),100),l=()=>{var r;const a=null===(r=window.history.state)||void 0===r?void 0:r.id,i=t.findIndex((e=>e.id===a));e=Math.max(i,0);const o=n.pop();window.removeEventListener("popstate",l),null===o||void 0===o||o.cb()};window.addEventListener("popstate",l),window.history.go(a)}))},listen(e){const t=()=>{n.length||e()};return window.addEventListener("popstate",t),()=>window.removeEventListener("popstate",t)}}}const m=i.createContext(void 0),g=(e,t)=>{if(void 0===e||void 0===t||e.key!==t.key)return[void 0,void 0];const n=e.history?e.history.length:e.routes.length,r=t.history?t.history.length:t.routes.length,a=e.routes[e.index],i=t.routes[t.index],o=a.state,s=i.state;return n!==r||a.key!==i.key||void 0===o||void 0===s||o.key!==s.key?[e,t]:g(o,s)};function y(e,t){let{independent:n,enabled:r=!0,config:o,getStateFromPath:s=a.getStateFromPath,getPathFromState:l=a.getPathFromState,getActionFromState:u=a.getActionFromState}=t;i.useEffect((()=>{}),[r,n]);const[c]=i.useState(p),d=i.useRef(r),f=i.useRef(o),y=i.useRef(s),_=i.useRef(l),b=i.useRef(u);i.useEffect((()=>{d.current=r,f.current=o,y.current=s,_.current=l,b.current=u}));const v=i.useContext(m),w=i.useCallback((()=>{let e;if(d.current){const t=(null===v||void 0===v?void 0:v.location)??window.location,n=t?t.pathname+t.search:void 0;n&&(e=y.current(n,f.current))}const t={then:t=>Promise.resolve(t?t(e):e),catch:()=>t};return t}),[]),F=i.useRef(void 0),k=i.useRef(void 0),x=i.useRef(void 0);return i.useEffect((()=>(F.current=c.index,c.listen((()=>{const t=e.current;if(!t||!r)return;const{location:n}=window,a=n.pathname+n.search,i=c.index,o=F.current??0;F.current=i,x.current=a;const s=c.get(i);if((null===s||void 0===s?void 0:s.path)===a&&null!==s&&void 0!==s&&s.state)return void t.resetRoot(s.state);const l=y.current(a,f.current);if(l){const e=t.getRootState();if(l.routes.some((t=>!(null!==e&&void 0!==e&&e.routeNames.includes(t.name)))))return void console.warn("The navigation state parsed from the URL contains routes not present in the root navigator. This usually means that the linking configuration doesn't match the navigation structure. See https://reactnavigation.org/docs/configuring-links for more details on how to specify a linking configuration.");if(i>o){const e=b.current(l,f.current);if(void 0!==e)try{t.dispatch(e)}catch(u){console.warn(`An error occurred when trying to handle the link '${a}': ${"object"===typeof u&&null!=u&&"message"in u?u.message:u}`)}else t.resetRoot(l)}else t.resetRoot(l)}else t.resetRoot(l)})))),[r,c,e]),i.useEffect((()=>{var t;if(!r)return;const n=(e,t)=>{if(null!==e&&void 0!==e&&e.path){const t=y.current(e.path,f.current);if(t){const n=(0,a.findFocusedRoute)(t);if(n&&n.name===e.name&&h()(n.params,e.params))return e.path}}return _.current(t,f.current)};if(e.current){const t=e.current.getRootState();if(t){const e=(0,a.findFocusedRoute)(t),r=n(e,t);void 0===k.current&&(k.current=t),c.replace({path:r,state:t})}}return null===(t=e.current)||void 0===t?void 0:t.addListener("state",(e=>{let t=Promise.resolve();return()=>{t=t.then(e)}})((async()=>{const t=e.current;if(!t||!r)return;const i=k.current,o=t.getRootState();if(!o)return;const s=x.current,l=(0,a.findFocusedRoute)(o),u=n(l,o);k.current=o,x.current=void 0;const[d,h]=g(i,o);if(d&&h&&u!==s){const e=(h.history?h.history.length:h.routes.length)-(d.history?d.history.length:d.routes.length);if(e>0)c.push({path:u,state:o});else if(e<0){const t=c.backIndex({path:u}),n=c.index;try{-1!==t&&t{n=[!0,e]}));const[r,a]=i.useState(n),[o]=r;return i.useEffect((()=>{let e=!1;return o||(async()=>{let n;try{n=await t}finally{e||a([!0,n])}})(),()=>{e=!0}}),[t,o]),r}const b=["theme","linking","fallback","documentTitle","onReady"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t(null===e||void 0===e?void 0:e.title)??(null===t||void 0===t?void 0:t.name)}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i.useEffect((()=>{if(!t)return;const r=e.current;if(r){const e=n(r.getCurrentOptions(),r.getCurrentRoute());document.title=e}return null===r||void 0===r?void 0:r.addListener("options",(e=>{const t=n(e.data.options,null===r||void 0===r?void 0:r.getCurrentRoute());document.title=t}))}))}(m,d);const{getInitialState:g}=y(m,Object.assign({independent:f.independent,enabled:p,prefixes:[]},o));i.useEffect((()=>{m.current&&REACT_NAVIGATION_DEVTOOLS.set(m.current,{get linking(){return Object.assign({},o,{enabled:p,prefixes:(null===o||void 0===o?void 0:o.prefixes)??[],getStateFromPath:(null===o||void 0===o?void 0:o.getStateFromPath)??a.getStateFromPath,getPathFromState:(null===o||void 0===o?void 0:o.getPathFromState)??a.getPathFromState,getActionFromState:(null===o||void 0===o?void 0:o.getActionFromState)??a.getActionFromState})}})}));const[w,F]=_(g);i.useImperativeHandle(t,(()=>m.current));const k=i.useMemo((()=>({options:o})),[o]),x=null!=f.initialState||!p||w,A=i.useRef(h);return i.useEffect((()=>{A.current=h})),i.useEffect((()=>{var e;x&&(null===(e=A.current)||void 0===e||e.call(A))}),[x]),x?i.createElement(s.Provider,{value:k},i.createElement(c,{value:n},i.createElement(a.BaseNavigationContainer,v({},f,{initialState:null==f.initialState?F:f.initialState,ref:m})))):u}))},79831:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={dark:!0,colors:{primary:"rgb(10, 132, 255)",background:"rgb(1, 1, 1)",card:"rgb(18, 18, 18)",text:"rgb(229, 229, 231)",border:"rgb(39, 39, 41)",notification:"rgb(255, 69, 58)"}}},40382:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={dark:!1,colors:{primary:"rgb(0, 122, 255)",background:"rgb(242, 242, 242)",card:"rgb(255, 255, 255)",text:"rgb(28, 28, 30)",border:"rgb(216, 216, 216)",notification:"rgb(255, 59, 48)"}}},46099:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});var r=n(36665),a=n(40382);const i=r.createContext(a.default);i.displayName="ThemeContext";const o=i},78300:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>wt});var r=n(98587),a=n(8179),i=n(36665),o=n(57112),s=n.n(o),l=n(26725),u=n(75675),c=n(73929),d=n(78833);const{width:h=0,height:f=0}=l.default.get("window"),p={frame:{x:0,y:0,width:h,height:f},insets:{top:0,left:0,right:0,bottom:0}};function m(e){let{children:t,style:n}=e;return i.useContext(d.SafeAreaInsetsContext)?i.createElement(c.default,{style:[y.container,n]},t):(t=i.createElement(g,{initialMetrics:p},t),i.createElement(d.SafeAreaProvider,{initialMetrics:p,style:n},t))}const g=e=>{let{initialMetrics:t,children:n}=e;const r=i.useRef(null),[a,o]=i.useState(t.frame);return i.useEffect((()=>{if(null==r.current)return;const e=r.current.getBoundingClientRect();let t;o({x:e.x,y:e.y,width:e.width,height:e.height});const n=new ResizeObserver((e=>{const n=e[0];if(n){const{x:e,y:r,width:a,height:i}=n.contentRect;clearTimeout(t),t=setTimeout((()=>{o({x:e,y:r,width:a,height:i})}),100)}}));return n.observe(r.current),()=>{n.disconnect(),clearTimeout(t)}}),[]),i.createElement(d.SafeAreaFrameContext.Provider,{value:a},i.createElement("div",{ref:r,style:Object.assign({},u.default.absoluteFillObject,{pointerEvents:"none",visibility:"hidden"})}),n)};m.initialMetrics=p;const y=u.default.create({container:{flex:1}}),_="__react_navigation__elements_contexts";function b(e,t){let r=n.g[_].get(e);return r||(r=i.createContext(t),r.displayName=e,n.g[_].set(e,r),r)}n.g[_]=n.g[_]??new Map;const v=b("HeaderShownContext",!1),w=i.createContext(!1),F=e=>{let{children:t}=e;return i.createElement(i.Fragment,null,t)},k=c.default,x=3,A=4,S=5,E=b("HeaderBackContext",void 0);function C(e,t){return"string"===typeof e.headerTitle?e.headerTitle:void 0!==e.title?e.title:t}var T=n(15009),D=n(48623);const{add:I}=T.default;function O(e){let{current:t,next:n}=e;const r=I(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),a=r.interpolate({inputRange:[0,1,2],outputRange:[0,1,0]});return{leftButtonStyle:{opacity:a},rightButtonStyle:{opacity:a},titleStyle:{opacity:a},backgroundStyle:{opacity:r.interpolate({inputRange:[0,1,1.9,2],outputRange:[0,1,1,0]})}}}function P(e){let{current:t,next:n,layouts:{screen:r}}=e;const a=[{translateX:I(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:D.default.getConstants().isRTL?[-r.width,0,r.width]:[r.width,0,-r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function M(e){let{current:t,next:n,layouts:{screen:r}}=e;const a=[{translateX:I(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:D.default.getConstants().isRTL?[r.width,0,-r.width]:[-r.width,0,r.width]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function R(e){let{current:t,next:n,layouts:{header:r}}=e;const a=[{translateY:I(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0).interpolate({inputRange:[0,1,2],outputRange:[-r.height,0,-r.height]})}];return{leftButtonStyle:{transform:a},rightButtonStyle:{transform:a},titleStyle:{transform:a},backgroundStyle:{transform:a}}}function L(){return{}}var N=n(46099);function B(){return i.useContext(N.default)}var j=n(60193);var V=n(95620),z=n(35708);const H=["onPressIn","onPressOut","android_ripple","pressColor","pressOpacity","style"];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;tnew T.default.Value(1))),h=(e,t)=>{T.default.timing(d,{toValue:e,duration:t,easing:V.default.inOut(V.default.quad),useNativeDriver:!0}).start()};return i.createElement(W,U({onPressIn:e=>{h(s,0),null===t||void 0===t||t(e)},onPressOut:e=>{h(1,200),null===n||void 0===n||n(e)},android_ripple:void 0,style:[{opacity:d},l]},u))}function $(e){let{disabled:t,allowFontScaling:r,backImage:a,label:o,labelStyle:s,labelVisible:l=!1,onLabelLayout:u,onPress:d,pressColor:h,pressOpacity:f,screenLayout:p,tintColor:m,titleLayout:g,truncatedLabel:y="Back",accessibilityLabel:_=(o&&"Back"!==o?`${o}, back`:"Go back"),testID:b,style:v}=e;const{colors:w}=B(),[F,k]=i.useState(void 0),x=void 0!==m?m:w.text,A=e=>{null===u||void 0===u||u(e),k(e.nativeEvent.layout.x+e.nativeEvent.layout.width)};return i.createElement(q,{disabled:t,accessible:!0,accessibilityRole:"button",accessibilityLabel:_,testID:b,onPress:t?void 0:()=>d&&requestAnimationFrame(d),pressColor:h,pressOpacity:f,android_ripple:Y,style:[G.container,t&&G.disabled,v],hitSlop:{top:16,right:16,bottom:16,left:16}},i.createElement(i.Fragment,null,a?a({tintColor:x}):i.createElement(j.default,{style:[G.icon,Boolean(l)&&G.iconWithLabel,Boolean(x)&&{tintColor:x}],source:n(27085),fadeDuration:0}),(()=>{const e=!o||F&&g&&p&&(p.width-g.width)/2i.createElement(Z,e):f;return i.createElement(i.Fragment,null,i.createElement(T.default.View,{pointerEvents:"box-none",style:[u.default.absoluteFill,{zIndex:0},E]},b?b({style:xe}):y?null:i.createElement(ne,{style:xe})),i.createElement(T.default.View,{pointerEvents:"box-none",style:[{height:L,minHeight:N,maxHeight:B,opacity:we,transform:Fe}]},i.createElement(c.default,{pointerEvents:"none",style:{height:P}}),i.createElement(c.default,{pointerEvents:"box-none",style:oe.content},i.createElement(T.default.View,{pointerEvents:"box-none",style:[oe.left,"center"===p&&oe.expand,{marginStart:t.left},x]},Ae),i.createElement(T.default.View,{pointerEvents:"box-none",style:[oe.title,{maxWidth:"center"===p?s.width-2*((Ae?!1!==g?80:32:16)+Math.max(t.left,t.right)):s.width-((Ae?72:16)+(Se?72:16)+t.left-t.right)},S]},Ee({children:h,allowFontScaling:F,tintColor:_,style:k})),i.createElement(T.default.View,{pointerEvents:"box-none",style:[oe.right,oe.expand,{marginEnd:t.right},A]},Se))))}const oe=u.default.create({content:{flex:1,flexDirection:"row",alignItems:"stretch"},title:{marginHorizontal:16,justifyContent:"center"},left:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"center",alignItems:"flex-end"},expand:{flexGrow:1,flexBasis:0}});function se(e){let t,n;return function(){let r=!1;for(var a=arguments.length,i=new Array(a),o=0;o{const{height:t,width:n}=e.nativeEvent.layout;o((e=>e&&t===e.height&&n===e.width?e:{height:t,width:n}))},l=e=>{const{height:r,width:a}=e.nativeEvent.layout;t&&r===t.height&&a===t.width||n({height:r,width:a})},c=se(((e,t,n,r,a,i,o)=>e({current:{progress:n},next:r&&{progress:r},layouts:{header:{height:o,width:t.width},screen:t,title:a,leftLabel:i}}))),{progress:d,layout:h,modal:f,onGoBack:p,headerTitle:m,headerLeft:g=(p?e=>i.createElement($,e):void 0),headerRight:y,headerBackImage:_,headerBackTitle:b,headerBackTitleVisible:v=!1,headerTruncatedBackTitle:w,headerBackAccessibilityLabel:F,headerBackTestID:k,headerBackAllowFontScaling:x,headerBackTitleStyle:A,headerTitleContainerStyle:S,headerLeftContainerStyle:E,headerRightContainerStyle:C,headerBackgroundContainerStyle:T,headerStyle:D,headerStatusBarHeight:I,styleInterpolator:O}=e,P=(0,r.default)(e,le),M=X(h,0,I),{height:R=M}=u.default.flatten(D||{}),{titleStyle:L,leftButtonStyle:N,leftLabelStyle:B,rightButtonStyle:j,backgroundStyle:V}=c(O,h,d.current,d.next,a,b?t:void 0,"number"===typeof R?R:M),z=g?e=>g(Object.assign({},e,{backImage:_,accessibilityLabel:F,testID:k,allowFontScaling:x,onPress:p,label:b,truncatedLabel:w,labelStyle:[B,A],onLabelLayout:l,screenLayout:h,titleLayout:a,canGoBack:Boolean(p)})):void 0,H=y?e=>y(Object.assign({},e,{canGoBack:Boolean(p)})):void 0,U="function"!==typeof m?e=>i.createElement(Z,ue({},e,{onLayout:s})):e=>m(Object.assign({},e,{onLayout:s}));return i.createElement(ie,ue({modal:f,layout:h,headerTitle:U,headerLeft:z,headerLeftLabelVisible:v,headerRight:H,headerTitleContainerStyle:[L,S],headerLeftContainerStyle:[N,E],headerRightContainerStyle:[j,C],headerBackgroundContainerStyle:[V,T],headerStyle:D,headerStatusBarHeight:I},P))}function de(){return de=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n=void 0}),t)}}}((()=>{l.isFocused()&&l.canGoBack()&&l.dispatch(Object.assign({},a.StackActions.pop(),{source:s.key}))}),50),[l,s.key]),p=i.useContext(w),m=i.useContext(v),g=void 0!==o.headerStatusBarHeight?o.headerStatusBarHeight:p||m?0:c.top;return i.createElement(ce,de({},o,{title:C(o,s.name),progress:r,layout:n,modal:p,headerBackTitle:void 0!==o.headerBackTitle?o.headerBackTitle:h,headerStatusBarHeight:g,onGoBack:t?f:void 0,styleInterpolator:u}))}));function fe(e){let{mode:t,scenes:n,layout:r,getPreviousScene:o,getFocusedRoute:s,onContentHeightChange:l,style:u}=e;const d=s(),h=i.useContext(E);return i.createElement(T.default.View,{pointerEvents:"box-none",style:u},n.slice(-3).map(((e,n,s)=>{var u,f;if("screen"===t&&n!==s.length-1||!e)return null;const{header:p,headerMode:m,headerShown:g=!0,headerTransparent:y,headerStyleInterpolator:_}=e.descriptor.options;if(m!==t||!g)return null;const b=d.key===e.descriptor.route.key,v=o({route:e.descriptor.route});let w=h;if(v){const{options:e,route:t}=v.descriptor;w=v?{title:C(e,t.name)}:h}const F=null===(u=s[n-1])||void 0===u?void 0:u.descriptor,k=null===(f=s[n+1])||void 0===f?void 0:f.descriptor,{headerShown:x=!0,headerMode:A}=(null===F||void 0===F?void 0:F.options)||{},S=s.slice(n+1).find((e=>{const{headerShown:t=!0,headerMode:n}=(null===e||void 0===e?void 0:e.descriptor.options)||{};return!1===t||"screen"===n})),{gestureDirection:E}=(null===S||void 0===S?void 0:S.descriptor.options)||{},T=(!1===x||"screen"===A)&&!k||S,D={layout:r,back:w,progress:e.progress,options:e.descriptor.options,route:e.descriptor.route,navigation:e.descriptor.navigation,styleInterpolator:"float"===t?T?"vertical"===E||"vertical-inverted"===E?R:"horizontal-inverted"===E?M:P:_:L};return i.createElement(a.NavigationContext.Provider,{key:e.descriptor.route.key,value:e.descriptor.navigation},i.createElement(a.NavigationRouteContext.Provider,{value:e.descriptor.route},i.createElement(c.default,{onLayout:l?t=>{const{height:n}=t.nativeEvent.layout;l({route:e.descriptor.route,height:n})}:void 0,pointerEvents:b?"box-none":"none",accessibilityElementsHidden:!b,importantForAccessibility:b?"auto":"no-hide-descendants",style:"float"===t&&!b||y?pe.header:null},void 0!==p?p(D):i.createElement(he,D))))})))}const pe=u.default.create({header:{position:"absolute",top:0,left:0,right:0}}),me=["style"];function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;ti.height,l=s?0:10,u=o.top,c=i.height/i.width,d=ke(n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),r?r.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0),h=0===t,f=xe(d.interpolate({inputRange:[0,1,2],outputRange:[i.height,h?0:l,(h?u:0)-l*c]}),a),p=d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,.3,1,1]}),m=s?1:d.interpolate({inputRange:[0,1,2],outputRange:[1,1,i.width?1-2*l/i.width:1]}),g=s?0:h?d.interpolate({inputRange:[0,1,1.0001,2],outputRange:[0,0,0,10]}):10;return{cardStyle:{overflow:"hidden",borderTopLeftRadius:g,borderTopRightRadius:g,borderBottomLeftRadius:0,borderBottomRightRadius:0,marginTop:h?0:u,marginBottom:h?0:l,transform:[{translateY:f},{scale:m}]},overlayStyle:{opacity:p}}}function Se(){return{}}V.default.out(V.default.poly(5)),V.default.in(V.default.linear),V.default.bezier(.35,.45,0,1);const Ee={animation:"timing",config:{duration:400,easing:V.default.bezier(.35,.45,0,1)}},Ce={animation:"timing",config:{duration:250,easing:e=>Math.cos((e+1)*Math.PI)/2+.5}},Te={animation:"timing",config:{duration:200,easing:e=>1===e?1:Math.pow(e,2)}},De={gestureDirection:"vertical",transitionSpec:{open:Ce,close:Te},cardStyleInterpolator:function(e){let{current:{progress:t}}=e;return{cardStyle:{opacity:t.interpolate({inputRange:[0,.5,.9,1],outputRange:[0,.25,.7,1]})},overlayStyle:{opacity:t.interpolate({inputRange:[0,1],outputRange:[0,.5],extrapolate:"clamp"})}}},headerStyleInterpolator:O},Ie={gestureDirection:"horizontal",transitionSpec:{open:Ee,close:Ee},cardStyleInterpolator:function(e){let{current:t,next:n,closing:r}=e;const a=ke(t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}),n?n.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"}):0);return{cardStyle:{opacity:a.interpolate({inputRange:[0,.75,.875,1,1.0825,1.2075,2],outputRange:[0,0,1,1,1,1,0]}),transform:[{scale:Fe(r,t.progress.interpolate({inputRange:[0,1],outputRange:[.925,1],extrapolate:"clamp"}),a.interpolate({inputRange:[0,1,2],outputRange:[.85,1,1.075]}))}]}}},headerStyleInterpolator:O},Oe={gestureDirection:"vertical",transitionSpec:{open:Ce,close:Te},cardStyleInterpolator:function(e){let{current:t,inverted:n,layouts:{screen:r},closing:a}=e;const i=xe(t.progress.interpolate({inputRange:[0,1],outputRange:[.8*r.height,0],extrapolate:"clamp"}),n);return{cardStyle:{opacity:Fe(a,t.progress,t.progress.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolate:"clamp"})),transform:[{translateY:i}]},overlayStyle:{opacity:t.progress.interpolate({inputRange:[0,1],outputRange:[0,.3],extrapolate:"clamp"})}}},headerStyleInterpolator:O};function Pe(e,t){for(var n=e.length-1;n>=0;n--)if(t(e[n]))return n;return-1}function Me(e){switch(e){case"vertical":return 1;case"vertical-inverted":return-1;case"horizontal":return D.default.getConstants().isRTL?-1:1;case"horizontal-inverted":return D.default.getConstants().isRTL?1:-1}}function Re(e,t){const n=Me(t);switch(t){case"vertical":case"vertical-inverted":return e.height*n;case"horizontal":case"horizontal-inverted":return e.width*n}}const Le=["enabled"],Ne=["enabled","active"];function Be(){return Be=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{enabled:t}=e,n=(0,r.default)(e,Le);return null!=je?i.createElement(je.ScreenContainer,Be({enabled:t},n)):i.createElement(c.default,n)},ze=e=>{let{enabled:t,active:n}=e,a=(0,r.default)(e,Ne);return null!=je?i.createElement(je.Screen,Be({enabled:t,activityState:n},a)):i.createElement(c.default,a)};var He=n(93816);const Ue=i.createContext(void 0),We=["enabled","layout","style"];function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t({setPointerEvents:h}))),i.useEffect((()=>{if("undefined"===typeof document||!document.body)return;const e=document.body.clientWidth,t=document.body.clientHeight;u(e===a.width&&t===a.height)}),[a.height,a.width]),i.createElement(c.default,qe({},s,{pointerEvents:d,style:[n&&l?Ye.page:Ye.card,o]}))})),Ye=u.default.create({page:{minHeight:"100%"},card:{flex:1,overflow:"hidden"}}),Ge=["styleInterpolator","interpolationIndex","current","gesture","next","layout","insets","overlay","overlayEnabled","shadowEnabled","gestureEnabled","gestureDirection","pageOverflowEnabled","headerDarkContent","children","containerStyle","contentStyle"];function Xe(){return Xe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e){return null!=u.default.flatten(e).opacity}return!1};class Ze extends i.Component{static defaultProps={shadowEnabled:!1,gestureEnabled:!0,gestureVelocityImpact:.3,overlay:e=>{let{style:t}=e;return t?i.createElement(T.default.View,{pointerEvents:"none",style:[et.overlay,t]}):null}};componentDidMount(){this.animate({closing:this.props.closing}),this.isCurrentlyMounted=!0}componentDidUpdate(e){const{layout:t,gestureDirection:n,closing:r}=this.props,{width:a,height:i}=t;a!==e.layout.width&&this.layout.width.setValue(a),i!==e.layout.height&&this.layout.height.setValue(i),n!==e.gestureDirection&&this.inverted.setValue(Me(n));const o=this.getAnimateToValue(this.props);this.getAnimateToValue(e)===o&&this.lastToValue===o||this.animate({closing:r})}componentWillUnmount(){this.props.gesture.stopAnimation(),this.isCurrentlyMounted=!1,this.handleEndInteraction()}isCurrentlyMounted=!1;isClosing=new T.default.Value(0);inverted=new T.default.Value(Me(this.props.gestureDirection));layout={width:new T.default.Value(this.props.layout.width),height:new T.default.Value(this.props.layout.height)};isSwiping=new T.default.Value(0);animate=e=>{let{closing:t,velocity:n}=e;const{gesture:r,transitionSpec:a,onOpen:i,onClose:o,onTransition:s}=this.props,l=this.getAnimateToValue(Object.assign({},this.props,{closing:t}));this.lastToValue=l,this.isClosing.setValue(t?1:0);const u=t?a.close:a.open,c="spring"===u.animation?T.default.spring:T.default.timing;this.setPointerEventsEnabled(!t),this.handleStartInteraction(),clearTimeout(this.pendingGestureCallback),null===s||void 0===s||s({closing:t,gesture:void 0!==n}),c(r,Object.assign({},u.config,{velocity:n,toValue:l,useNativeDriver:Ke,isInteraction:!1})).start((e=>{let{finished:n}=e;this.handleEndInteraction(),clearTimeout(this.pendingGestureCallback),n&&(t?o():i(),this.isCurrentlyMounted&&this.forceUpdate())}))};getAnimateToValue=e=>{let{closing:t,layout:n,gestureDirection:r}=e;return t?Re(n,r):0};setPointerEventsEnabled=e=>{var t;const n=e?"box-none":"none";null===(t=this.ref.current)||void 0===t||t.setPointerEvents(n)};handleStartInteraction=()=>{void 0===this.interactionHandle&&(this.interactionHandle=He.default.createInteractionHandle())};handleEndInteraction=()=>{void 0!==this.interactionHandle&&(He.default.clearInteractionHandle(this.interactionHandle),this.interactionHandle=void 0)};handleGestureStateChange=e=>{let{nativeEvent:t}=e;const{layout:n,onClose:r,onGestureBegin:a,onGestureCanceled:i,onGestureEnd:o,gestureDirection:s,gestureVelocityImpact:l}=this.props;switch(t.state){case A:this.isSwiping.setValue(1),this.handleStartInteraction(),null===a||void 0===a||a();break;case x:{this.isSwiping.setValue(0),this.handleEndInteraction();const e="vertical"===s||"vertical-inverted"===s?t.velocityY:t.velocityX;this.animate({closing:this.props.closing,velocity:e}),null===i||void 0===i||i();break}case S:{let e,a,i;this.isSwiping.setValue(0),"vertical"===s||"vertical-inverted"===s?(e=n.height,a=t.translationY,i=t.velocityY):(e=n.width,a=t.translationX,i=t.velocityX);const u=(a+i*l)*Me(s)>e/2?0!==i||0!==a:this.props.closing;this.animate({closing:u,velocity:i}),u&&(this.pendingGestureCallback=setTimeout((()=>{r(),this.forceUpdate()}),32)),null===o||void 0===o||o();break}}};getInterpolatedStyle=se(((e,t)=>e(t)));getCardAnimation=se(((e,t,n,r,a,i,o,s)=>({index:e,current:{progress:t},next:n&&{progress:n},closing:this.isClosing,swiping:this.isSwiping,inverted:this.inverted,layouts:{screen:r},insets:{top:a,right:i,bottom:o,left:s}})));gestureActivationCriteria(){const{layout:e,gestureDirection:t,gestureResponseDistance:n}=this.props,r=!0,a=void 0!==n?n:"vertical"===t||"vertical-inverted"===t?135:50;if("vertical"===t)return{maxDeltaX:15,minOffsetY:5,hitSlop:{bottom:-e.height+a},enableTrackpadTwoFingerGesture:r};if("vertical-inverted"===t)return{maxDeltaX:15,minOffsetY:-5,hitSlop:{top:-e.height+a},enableTrackpadTwoFingerGesture:r};{const n=-e.width+a;return 1===Me(t)?{minOffsetX:5,maxDeltaY:20,hitSlop:{right:n},enableTrackpadTwoFingerGesture:r}:{minOffsetX:-5,maxDeltaY:20,hitSlop:{left:n},enableTrackpadTwoFingerGesture:r}}}ref=i.createRef();render(){const e=this.props,{styleInterpolator:t,interpolationIndex:n,current:a,gesture:o,next:s,layout:l,insets:d,overlay:h,overlayEnabled:f,shadowEnabled:p,gestureEnabled:m,gestureDirection:g,pageOverflowEnabled:y,headerDarkContent:_,children:b,containerStyle:v,contentStyle:w}=e,k=(0,r.default)(e,Ge),x=this.getCardAnimation(n,a,s,l,d.top,d.right,d.bottom,d.left),A=this.getInterpolatedStyle(t,x),{containerStyle:S,cardStyle:E,overlayStyle:C,shadowStyle:D}=A,I=m?T.default.event([{nativeEvent:"vertical"===g||"vertical-inverted"===g?{translationY:o}:{translationX:o}}],{useNativeDriver:Ke}):void 0,{backgroundColor:O}=u.default.flatten(w||{}),P="string"===typeof O&&0===be()(O).alpha();return i.createElement(Ue.Provider,{value:x},null,i.createElement(T.default.View,{style:{opacity:a},collapsable:!1}),i.createElement(c.default,Xe({pointerEvents:"box-none",collapsable:!1},k),f?i.createElement(c.default,{pointerEvents:"box-none",style:u.default.absoluteFill},h({style:C})):null,i.createElement(T.default.View,{style:[et.container,S,v],pointerEvents:"box-none"},i.createElement(F,Xe({enabled:0!==l.width&&m,onGestureEvent:I,onHandlerStateChange:this.handleGestureStateChange},this.gestureActivationCriteria()),i.createElement(T.default.View,{needsOffscreenAlphaCompositing:Je(E),style:[et.container,E]},p&&D&&!P?i.createElement(T.default.View,{style:[et.shadow,"horizontal"===g?[et.shadowHorizontal,et.shadowLeft]:"horizontal-inverted"===g?[et.shadowHorizontal,et.shadowRight]:"vertical"===g?[et.shadowVertical,et.shadowTop]:[et.shadowVertical,et.shadowBottom],{backgroundColor:O},D],pointerEvents:"none"}):null,i.createElement($e,{ref:this.ref,enabled:y,layout:l,style:w},b))))))}}const Qe=e=>e===Ae||"forModalPresentationIOS"===e.name,et=u.default.create({container:{flex:1},overlay:{flex:1,backgroundColor:"#000"},shadow:{position:"absolute",shadowRadius:5,shadowColor:"#000",shadowOpacity:.3},shadowHorizontal:{top:0,bottom:0,width:3,shadowOffset:{width:-1,height:1}},shadowLeft:{left:0},shadowRight:{right:0},shadowVertical:{left:0,right:0,height:3,shadowOffset:{width:1,height:-1}},shadowTop:{top:0},shadowBottom:{bottom:0}}),tt=b("HeaderHeightContext",void 0);var nt=n(92365),rt=n(16773);const at=i.memo((function(e){let{interpolationIndex:t,index:n,active:r,closing:a,gesture:o,focused:s,modal:l,getPreviousScene:d,getFocusedRoute:h,headerDarkContent:f,hasAbsoluteFloatHeader:p,headerHeight:m,onHeaderHeightChange:g,isParentHeaderShown:y,isNextScreenTransparent:_,detachCurrentScreen:b,layout:F,onCloseRoute:k,onOpenRoute:x,onGestureCancel:A,onGestureEnd:S,onGestureStart:T,onTransitionEnd:D,onTransitionStart:I,renderHeader:O,renderScene:P,safeAreaInsetBottom:M,safeAreaInsetLeft:R,safeAreaInsetRight:L,safeAreaInsetTop:N,scene:j}=e;const V=i.useContext(tt),{onPageChangeStart:z,onPageChangeCancel:H,onPageChangeConfirm:U}=function(e){const t=i.useRef(void 0),n=i.useRef(0),r=i.useRef(),a=i.useCallback((()=>{void 0!==r.current&&(clearTimeout(r.current),r.current=void 0)}),[]),o=i.useCallback((()=>{if(!e())return;a();const r=rt.default.State.currentlyFocusedInput();null===r||void 0===r||r.blur(),t.current=r,n.current=Date.now()}),[a,e]),s=i.useCallback((n=>{if(e()){if(a(),n)nt.default.dismiss();else{const e=t.current;null===e||void 0===e||e.blur()}t.current=void 0}}),[a,e]),l=i.useCallback((()=>{if(!e())return;a();const i=t.current;i&&(Date.now()-n.current<100?r.current=setTimeout((()=>{null===i||void 0===i||i.focus(),t.current=void 0}),100):(null===i||void 0===i||i.focus(),t.current=void 0))}),[a,e]);return i.useEffect((()=>()=>a()),[a]),{onPageChangeStart:o,onPageChangeConfirm:s,onPageChangeCancel:l}}(i.useCallback((()=>{const{options:e,navigation:t}=j.descriptor;return t.isFocused()&&!1!==e.keyboardHandlingEnabled}),[j.descriptor])),W={top:N,right:L,bottom:M,left:R},{colors:q}=B(),[$,Y]=i.useState("box-none");i.useEffect((()=>{var e,t;const n=null===(e=j.progress.next)||void 0===e||null===(t=e.addListener)||void 0===t?void 0:t.call(e,(e=>{let{value:t}=e;Y(t<=.1?"box-none":"none")}));return()=>{var e,t;n&&(null===(e=j.progress.next)||void 0===e||null===(t=e.removeListener)||void 0===t||t.call(e,n))}}),[$,j.progress.next]);const{presentation:G,animationEnabled:X,cardOverlay:K,cardOverlayEnabled:J,cardShadowEnabled:Z,cardStyle:Q,cardStyleInterpolator:ee,gestureDirection:te,gestureEnabled:ne,gestureResponseDistance:re,gestureVelocityImpact:ae,headerMode:ie,headerShown:oe,transitionSpec:se}=j.descriptor.options,le=d({route:j.descriptor.route});let ue;if(le){const{options:e,route:t}=le.descriptor;ue=C(e,t.name)}const ce=i.useMemo((()=>void 0!==ue?{title:ue}:void 0),[ue]);return i.createElement(Ze,{interpolationIndex:t,gestureDirection:te,layout:F,insets:W,gesture:o,current:j.progress.current,next:j.progress.next,closing:a,onOpen:()=>{const{route:e}=j.descriptor;D({route:e},!1),x({route:e})},onClose:()=>{const{route:e}=j.descriptor;D({route:e},!0),k({route:e})},overlay:K,overlayEnabled:J,shadowEnabled:Z,onTransition:e=>{let{closing:t,gesture:n}=e;const{route:a}=j.descriptor;n?r&&t?null===U||void 0===U||U(!1):null===H||void 0===H||H():null===U||void 0===U||U(!0),null===I||void 0===I||I({route:a},t)},onGestureBegin:()=>{const{route:e}=j.descriptor;z(),T({route:e})},onGestureCanceled:()=>{const{route:e}=j.descriptor;H(),A({route:e})},onGestureEnd:()=>{const{route:e}=j.descriptor;S({route:e})},gestureEnabled:0!==n&&ne,gestureResponseDistance:re,gestureVelocityImpact:ae,transitionSpec:se,styleInterpolator:ee,accessibilityElementsHidden:!s,importantForAccessibility:s?"auto":"no-hide-descendants",pointerEvents:r?"box-none":$,pageOverflowEnabled:"float"!==ie&&"modal"!==G,headerDarkContent:f,containerStyle:p&&"screen"!==ie?{marginTop:m}:null,contentStyle:[{backgroundColor:"transparentModal"===G?"transparent":q.background},Q],style:[{overflow:r?void 0:"hidden",display:!1!==X||!1!==_||!1===b||s?"flex":"none"},u.default.absoluteFill]},i.createElement(c.default,{style:it.container},i.createElement(w.Provider,{value:l},i.createElement(c.default,{style:it.scene},i.createElement(E.Provider,{value:ce},i.createElement(v.Provider,{value:y||!1!==oe},i.createElement(tt.Provider,{value:oe?m:V??0},P({route:j.descriptor.route}))))),"float"!==ie?O({mode:"screen",layout:F,scenes:[le,j],getPreviousScene:d,getFocusedRoute:h,onContentHeightChange:g}):null)))})),it=u.default.create({container:{flex:1,flexDirection:"column-reverse"},scene:{flex:1}}),ot=Object.freeze({options:{}}),st=(e,t)=>{const{cardStyleInterpolator:n}=e[t].descriptor.options;let r=0;for(let i=t-1;i>=0;i--){var a;if((null===(a=e[i])||void 0===a?void 0:a.descriptor.options.cardStyleInterpolator)!==n)break;r++}return r},lt=(e,t,n)=>{if(n)return!0;const{cardStyleInterpolator:r}=e.descriptor.options;return Qe(r)&&0!==t},ut=(e,t,n,r,a,i)=>e.reduce(((o,s,l)=>{const{headerStatusBarHeight:c=(n?0:t.top),headerStyle:d}=s.descriptor.options,h=u.default.flatten(d||{}),f="height"in h&&"number"===typeof h.height?h.height:i[s.route.key],p=st(e,l);lt(s,p,r);return o[s.route.key]="number"===typeof f?f:X(a,0,c),o}),{}),ct=(e,t)=>{const{presentation:n,gestureDirection:r=("modal"===n?Oe.gestureDirection:Ie.gestureDirection)}=(null===t||void 0===t?void 0:t.options)||{};return Re(e,r)},dt=(e,t,n)=>{const r=ct({width:Math.max(1,t.width),height:Math.max(1,t.height)},n);return r>0?e.interpolate({inputRange:[0,r],outputRange:[1,0]}):e.interpolate({inputRange:[r,0],outputRange:[0,1]})};class ht extends i.Component{static getDerivedStateFromProps(e,t){if(e.routes===t.routes&&e.descriptors===t.descriptors)return null;const n=e.routes.reduce(((n,r)=>{const a=e.descriptors[r.key],{animationEnabled:i}=(null===a||void 0===a?void 0:a.options)||{};return n[r.key]=t.gestures[r.key]||new T.default.Value(e.openingRouteKeys.includes(r.key)&&!1!==i?ct(t.layout,a):0),n}),{}),r=e.routes.map(((r,a,i)=>{const o=i[a-1],s=i[a+1],l=t.scenes[a],u=n[r.key],c=o?n[o.key]:void 0,d=s?n[s.key]:void 0,h=e.descriptors[r.key]||t.descriptors[r.key]||(l?l.descriptor:ot),f=e.descriptors[null===s||void 0===s?void 0:s.key]||t.descriptors[null===s||void 0===s?void 0:s.key],p=e.descriptors[null===o||void 0===o?void 0:o.key]||t.descriptors[null===o||void 0===o?void 0:o.key],m=a!==i.length-1&&f&&"transparentModal"!==f.options.presentation?f.options:h.options;let g="modal"===m.presentation?Oe:"transparentModal"===m.presentation?De:Ie;const{animationEnabled:y=!1,gestureEnabled:_=!1,gestureDirection:b=g.gestureDirection,transitionSpec:v=g.transitionSpec,cardStyleInterpolator:w=(!1===y?Se:g.cardStyleInterpolator),headerStyleInterpolator:F=g.headerStyleInterpolator,cardOverlayEnabled:k="transparentModal"!==m.presentation||Qe(w)}=m,x=h.options.headerMode??("modal"!==m.presentation&&"transparentModal"!==m.presentation&&"modal"!==(null===f||void 0===f?void 0:f.options.presentation)&&"transparentModal"!==(null===f||void 0===f?void 0:f.options.presentation)&&Qe(w),"screen"),A={route:r,descriptor:Object.assign({},h,{options:Object.assign({},h.options,{animationEnabled:y,cardOverlayEnabled:k,cardStyleInterpolator:w,gestureDirection:b,gestureEnabled:_,headerStyleInterpolator:F,transitionSpec:v,headerMode:x})}),progress:{current:dt(u,t.layout,h),next:d&&"transparentModal"!==(null===f||void 0===f?void 0:f.options.presentation)?dt(d,t.layout,f):void 0,previous:c?dt(c,t.layout,p):void 0},__memo:[t.layout,h,f,p,u,d,c]};return l&&A.__memo.every(((e,t)=>l.__memo[t]===e))?l:A}));return{routes:e.routes,scenes:r,gestures:n,descriptors:e.descriptors,headerHeights:ut(r,e.insets,e.isParentHeaderShown,e.isParentModal,t.layout,t.headerHeights)}}constructor(e){super(e),this.state={routes:[],scenes:[],gestures:{},layout:m.initialMetrics.frame,descriptors:this.props.descriptors,headerHeights:{}}}handleLayout=e=>{const{height:t,width:n}=e.nativeEvent.layout,r={width:n,height:t};this.setState(((e,a)=>t===e.layout.height&&n===e.layout.width?null:{layout:r,headerHeights:ut(e.scenes,a.insets,a.isParentHeaderShown,a.isParentModal,r,e.headerHeights)}))};handleHeaderLayout=e=>{let{route:t,height:n}=e;this.setState((e=>{let{headerHeights:r}=e;return r[t.key]===n?null:{headerHeights:Object.assign({},r,{[t.key]:n})}}))};getFocusedRoute=()=>{const{state:e}=this.props;return e.routes[e.index]};getPreviousScene=e=>{let{route:t}=e;const{getPreviousRoute:n}=this.props,{scenes:r}=this.state,a=n({route:t});if(a){return r.find((e=>e.descriptor.route.key===a.key))}};render(){const{insets:e,state:t,routes:n,closingRouteKeys:r,onOpenRoute:a,onCloseRoute:o,renderHeader:s,renderScene:l,isParentHeaderShown:c,isParentModal:d,onTransitionStart:h,onTransitionEnd:f,onGestureStart:p,onGestureEnd:m,onGestureCancel:g,detachInactiveScreens:y=!0}=this.props,{scenes:_,layout:b,gestures:v,headerHeights:w}=this.state,F=t.routes[t.index],k=w[F.key],x=this.state.scenes.slice(-2).some((e=>{const t=e.descriptor.options??{},{headerMode:n,headerTransparent:r,headerShown:a=!0}=t;return!(!r&&!1!==a&&"screen"!==n)}));let A=1;for(let i=_.length-1;i>=0;i--){const{options:e}=_[i].descriptor,{detachPreviousScreen:t="transparentModal"!==e.presentation&&(!Qe(e.cardStyleInterpolator)||i!==Pe(_,(e=>{const{cardStyleInterpolator:t}=e.descriptor.options;return t===Ae||"forModalPresentationIOS"===(null===t||void 0===t?void 0:t.name)})))}=e;if(!1===t)A++;else if(i<=_.length-2)break}const S=i.createElement(i.Fragment,{key:"header"},s({mode:"float",layout:b,scenes:_,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,onContentHeightChange:this.handleHeaderLayout,style:[ft.floating,x&&[{height:k},ft.absolute]]}));return i.createElement(ye,null,x?null:S,i.createElement(Ve,{enabled:y,style:ft.container,onLayout:this.handleLayout},n.map(((t,n,k)=>{var S,E;const C=F.key===t.key,T=v[t.key],D=_[n];let I=1;if(n=k.length-A?1:0;I=e?e.progress.current.interpolate({inputRange:[0,.99999,1],outputRange:[1,1,t],extrapolate:"clamp"}):1}const{headerShown:O=!0,headerTransparent:P,headerStyle:M,headerTintColor:R,freezeOnBlur:L}=D.descriptor.options,N=e.top,B=e.right,j=e.bottom,V=e.left,z=!1!==O?w[t.key]:0;let H;if(O)if("string"===typeof R)H=be()(R).isDark();else{const e=u.default.flatten(M);e&&"backgroundColor"in e&&"string"===typeof e.backgroundColor&&(H=!be()(e.backgroundColor).isDark())}const U=st(_,n),W=lt(D,U,d),q="transparentModal"===(null===(S=_[n+1])||void 0===S?void 0:S.descriptor.options.presentation),$=!1!==(null===(E=_[n+1])||void 0===E?void 0:E.descriptor.options.detachPreviousScreen);return i.createElement(ze,{key:t.key,style:u.default.absoluteFill,enabled:y,active:I,freezeOnBlur:L,pointerEvents:"box-none"},i.createElement(at,{index:n,interpolationIndex:U,modal:W,active:n===k.length-1,focused:C,closing:r.includes(t.key),layout:b,gesture:T,scene:D,safeAreaInsetTop:N,safeAreaInsetRight:B,safeAreaInsetBottom:j,safeAreaInsetLeft:V,onGestureStart:p,onGestureCancel:g,onGestureEnd:m,headerHeight:z,isParentHeaderShown:c,onHeaderHeightChange:this.handleHeaderLayout,getPreviousScene:this.getPreviousScene,getFocusedRoute:this.getFocusedRoute,headerDarkContent:H,hasAbsoluteFloatHeader:x&&!P,renderHeader:s,renderScene:l,onOpenRoute:a,onCloseRoute:o,onTransitionStart:h,onTransitionEnd:f,isNextScreenTransparent:q,detachCurrentScreen:$}))}))),x?S:null)}}const ft=u.default.create({container:{flex:1},absolute:{position:"absolute",top:0,left:0,right:0},floating:{zIndex:1}}),pt=["state","descriptors"];function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;te.key)),r=t.previousRoutes.map((e=>e.key)),n.length===r.length&&n.every(((e,t)=>e===r[t]))))&&t.routes.length){let n=t.routes,r=t.previousRoutes,a=e.descriptors,i=t.previousDescriptors;if(e.descriptors!==t.previousDescriptors&&(a=t.routes.reduce(((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n)),{}),i=e.descriptors),e.state.routes!==t.previousRoutes){const a=e.state.routes.reduce(((e,t)=>(e[t.key]=t,e)),{});n=t.routes.map((e=>a[e.key]||e)),r=e.state.routes}return{routes:n,previousRoutes:r,descriptors:a,previousDescriptors:i}}var n,r;let a=e.state.index{const r=e.descriptors[n]||t.descriptors[n];return!r||!1!==r.options.animationEnabled};var h;if(u&&u.key!==c.key?l.some((e=>e.key===c.key))?a.some((e=>e.key===u.key))||d(u.key)&&!o.includes(u.key)&&(o=[...o,u.key],i=i.filter((e=>e!==u.key)),s=s.filter((e=>e!==u.key)),a=[...a,u]):d(c.key)&&!i.includes(c.key)&&(i=[...i,c.key],o=o.filter((e=>e!==c.key)),s=s.filter((e=>e!==c.key)),a.some((e=>e.key===u.key))||(i=i.filter((e=>e!==u.key)),"pop"===(h=c.key,(e.descriptors[h]||t.descriptors[h]).options.animationTypeForReplace??"push")?(o=[...o,u.key],i=i.filter((e=>e!==c.key)),a=[...a,u]):(s=[...s,u.key],o=o.filter((e=>e!==u.key)),a=a.slice(),a.splice(a.length-1,0,u)))):(s.length||o.length)&&(a=a.slice(),a.splice(a.length-1,0,...t.routes.filter((e=>{let{key:t}=e;return!!d(t)&&(s.includes(t)||o.includes(t))})))),!a.length)throw new Error("There should always be at least one route in the navigation state.");const f=a.reduce(((n,r)=>(n[r.key]=e.descriptors[r.key]||t.descriptors[r.key],n)),{});return{routes:a,previousRoutes:e.state.routes,previousDescriptors:e.descriptors,openingRouteKeys:i,closingRouteKeys:o,replacingRouteKeys:s,descriptors:f}}state={routes:[],previousRoutes:[],previousDescriptors:{},openingRouteKeys:[],closingRouteKeys:[],replacingRouteKeys:[],descriptors:{}};getPreviousRoute=e=>{let{route:t}=e;const{closingRouteKeys:n,replacingRouteKeys:r}=this.state,a=this.state.routes.filter((e=>e.key===t.key||!n.includes(e.key)&&!r.includes(e.key))),i=a.findIndex((e=>e.key===t.key));return a[i-1]};renderScene=e=>{let{route:t}=e;const n=this.state.descriptors[t.key]||this.props.descriptors[t.key];return n?n.render():null};renderHeader=e=>i.createElement(fe,e);handleOpenRoute=e=>{let{route:t}=e;const{state:n,navigation:r}=this.props,{closingRouteKeys:a,replacingRouteKeys:i}=this.state;a.some((e=>e===t.key))&&i.every((e=>e!==t.key))&&n.routeNames.includes(t.name)&&!n.routes.some((e=>e.key===t.key))?r.navigate(t):this.setState((e=>({routes:e.replacingRouteKeys.length?e.routes.filter((t=>!e.replacingRouteKeys.includes(t.key))):e.routes,openingRouteKeys:e.openingRouteKeys.filter((e=>e!==t.key)),closingRouteKeys:e.closingRouteKeys.filter((e=>e!==t.key)),replacingRouteKeys:[]})))};handleCloseRoute=e=>{let{route:t}=e;const{state:n,navigation:r}=this.props;n.routes.some((e=>e.key===t.key))?r.dispatch(Object.assign({},a.StackActions.pop(),{source:t.key,target:n.key})):this.setState((e=>({routes:e.routes.filter((e=>e.key!==t.key)),openingRouteKeys:e.openingRouteKeys.filter((e=>e!==t.key)),closingRouteKeys:e.closingRouteKeys.filter((e=>e!==t.key))})))};handleTransitionStart=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionStart",data:{closing:t},target:n.key})};handleTransitionEnd=(e,t)=>{let{route:n}=e;return this.props.navigation.emit({type:"transitionEnd",data:{closing:t},target:n.key})};handleGestureStart=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureStart",target:t.key})};handleGestureEnd=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureEnd",target:t.key})};handleGestureCancel=e=>{let{route:t}=e;this.props.navigation.emit({type:"gestureCancel",target:t.key})};render(){const e=this.props,{state:t}=e,n=(0,r.default)(e,pt),{routes:a,descriptors:o,openingRouteKeys:s,closingRouteKeys:l}=this.state;return i.createElement(gt,{style:_t.container},i.createElement(m,null,i.createElement(d.SafeAreaInsetsContext.Consumer,null,(e=>i.createElement(w.Consumer,null,(r=>i.createElement(v.Consumer,null,(u=>i.createElement(ht,mt({insets:e,isParentHeaderShown:u,isParentModal:r,getPreviousRoute:this.getPreviousRoute,routes:a,openingRouteKeys:s,closingRouteKeys:l,onOpenRoute:this.handleOpenRoute,onCloseRoute:this.handleCloseRoute,onTransitionStart:this.handleTransitionStart,onTransitionEnd:this.handleTransitionEnd,renderHeader:this.renderHeader,renderScene:this.renderScene,state:t,descriptors:o,onGestureStart:this.handleGestureStart,onGestureEnd:this.handleGestureEnd,onGestureCancel:this.handleGestureCancel},n))))))))))}}const _t=u.default.create({container:{flex:1}}),bt=["id","initialRouteName","children","screenListeners","screenOptions"];function vt(){return vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var e;return null===(e=y.addListener)||void 0===e?void 0:e.call(y,"tabPress",(e=>{const t=y.isFocused();requestAnimationFrame((()=>{m.index>0&&t&&!e.defaultPrevented&&y.dispatch(Object.assign({},a.StackActions.popToTop(),{target:m.key}))}))}))}),[y,m.index,m.key]),i.createElement(_,null,i.createElement(yt,vt({},c,{state:m,descriptors:g,navigation:y})))}))},77551:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assertNotComplex:()=>a});var r=n(66723);function a(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{null!=e&&r.util.assert("complex64"!==e.dtype,(()=>`${t} does not support complex64 tensors in the CPU backend.`))}))}},32438:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MathBackendCPU:()=>o,shared:()=>s,version_cpu:()=>l});var r=n(66723),a=n(77551);const i=r.kernel_impls.whereImpl;class o extends r.KernelBackend{nextDataId(){return o.nextDataId++}constructor(){super(),this.blockSize=48,this.firstUse=!0,this.data=new r.DataStorage(this,(0,r.engine)())}write(e,t,n){this.firstUse&&(this.firstUse=!1,(0,r.env)().get("IS_NODE")&&r.backend_util.warn("\n============================\nHi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. \n============================"));const a={id:this.nextDataId()};return this.data.set(a,{values:e,dtype:n,refCount:1}),a}makeTensorInfo(e,t,n){let a;if("string"===t&&null!=n&&n.length>0&&r.util.isString(n[0])){const i=n.map((e=>r.util.encodeString(e)));a=this.write(i,e,t)}else a=this.write(n,e,t);return{dataId:a,shape:e,dtype:t}}refCount(e){if(this.data.has(e)){return this.data.get(e).refCount}return 0}incRef(e){this.data.get(e).refCount++}decRef(e){if(this.data.has(e)){this.data.get(e).refCount--}}move(e,t,n,r,a){this.data.set(e,{values:t,dtype:r,refCount:a})}numDataIds(){return this.data.numDataIds()}async read(e){return this.readSync(e)}readSync(e){const{dtype:t,complexTensorInfos:n}=this.data.get(e);if("complex64"===t){const e=this.readSync(n.real.dataId),t=this.readSync(n.imag.dataId);return r.backend_util.mergeRealAndImagArrays(e,t)}return r.util.convertBackendValuesAndArrayBuffer(this.data.get(e).values,t)}bufferSync(e){const t=this.readSync(e.dataId);if("string"===e.dtype)try{const n=t.map((e=>r.util.decodeString(e)));return(0,r.buffer)(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return(0,r.buffer)(e.shape,e.dtype,t)}makeOutput(e,t,n){return(0,r.engine)().makeTensorFromTensorInfo(this.makeTensorInfo(t,n,e),this)}disposeData(e,t=!1){if(this.data.has(e)){if(this.data.get(e).refCount--,!t&&this.data.get(e).refCount>0)return!1;const{complexTensorInfos:n}=this.data.get(e);null!=n&&(this.disposeData(n.real.dataId,!0),this.disposeData(n.imag.dataId,!0)),this.data.delete(e)}return!0}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}async time(e){const t=r.util.now();e();return{kernelMs:r.util.now()-t}}memory(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}}where(e){(0,a.assertNotComplex)([e],"where");const t=this.readSync(e.dataId);return i(e.shape,t)}dispose(){}floatPrecision(){return 32}epsilon(){return super.epsilon()}}o.nextDataId=0;var s=n(73577);const l="4.22.0";(0,r.registerBackend)("cpu",(()=>new o),1);var u=n(14385);const c=(0,u.unaryKernelFunc)(r.Elu,(e=>e>=0?e:Math.exp(e)-1)),d={kernelName:r.Elu,backendName:"cpu",kernelFunc:c};var h=n(80205);function f(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{alpha:s}=i;(0,a.assertNotComplex)([o],"leakyRelu");const l=r.util.sizeFromShape(o.shape),u=n.data.get(o.dataId).values,c=r.util.getTypedArrayFromDType("float32",l);for(let r=0;re<0?t*e:e));function y(e){const{inputs:t,backend:n}=e,{x:r,alpha:i}=t;(0,a.assertNotComplex)([r,i],"prelu");const o=n.data.get(r.dataId).values,s=n.data.get(i.dataId).values,[l,u]=g(r.shape,i.shape,o,s,"float32");return n.makeTensorInfo(u,"float32",l)}const _={kernelName:r.Prelu,backendName:"cpu",kernelFunc:y},b=(0,u.unaryKernelFunc)(r.Relu,(e=>Math.max(0,e))),v={kernelName:r.Relu,backendName:"cpu",kernelFunc:b},w=(0,u.unaryKernelFunc)(r.Relu6,(e=>Math.min(Math.max(0,e),6))),F={kernelName:r.Relu6,backendName:"cpu",kernelFunc:w};var k=n(7351);function x(e,t,n,r,a){if("linear"===n)return(0,h.identity)({inputs:{x:t},backend:e});if("relu"===n)return b({inputs:{x:t},backend:e});if("elu"===n)return c({inputs:{x:t},backend:e});if("relu6"===n)return w({inputs:{x:t},backend:e});if("prelu"===n)return y({inputs:{x:t,alpha:r},backend:e});if("leakyrelu"===n)return f({inputs:{x:t},backend:e,attrs:{alpha:a}});if("sigmoid"===n)return(0,k.sigmoid)({inputs:{x:t},backend:e});throw new Error(`Activation ${n} has not been implemented for the CPU backend.`)}var A=n(10128);function S(e){const{inputs:t,backend:n,attrs:a}=e,{x:i}=t,{shape:o}=a,s=r.util.sizeFromShape(i.shape),l=r.util.inferFromImplicitShape(o,s),u=r.util.sizeFromShape(l);r.util.assert(s===u,(()=>`The new shape (${l}) has ${u} elements and the old shape (${i.shape}) has ${s} elements. The new shape and old shape must have the same number of elements.`)),n.incRef(i.dataId);const c=n.data.get(i.dataId);if(null!=c.complexTensorInfos){const e=c.complexTensorInfos.real,t=c.complexTensorInfos.imag;e.shape=l,t.shape=l}return{dataId:i.dataId,shape:l,dtype:i.dtype}}const E={kernelName:r.Reshape,backendName:"cpu",kernelFunc:S};function C(e){const{inputs:t,backend:n,attrs:i}=e,{a:o,b:s}=t,{transposeA:l,transposeB:u}=i;(0,a.assertNotComplex)([o,s],"matMul");const c=o.shape.length,d=s.shape.length,h=l?o.shape[c-2]:o.shape[c-1],f=u?s.shape[d-1]:s.shape[d-2],p=l?o.shape[c-1]:o.shape[c-2],m=u?s.shape[d-2]:s.shape[d-1],g=o.shape.slice(0,-2),y=s.shape.slice(0,-2),_=r.util.sizeFromShape(g),b=r.util.sizeFromShape(y),v=r.broadcast_util.assertAndGetBroadcastShape(o.shape.slice(0,-2),s.shape.slice(0,-2)).concat([p,m]);r.util.assert(h===f,(()=>`Error in matMul: inner shapes (${h}) and (${f}) of Tensors with shapes ${o.shape} and ${s.shape} and transposeA=${l} and transposeB=${u} must match.`));const w=u?[b,m,f]:[b,f,m],F=S({inputs:{x:o},backend:n,attrs:{shape:l?[_,h,p]:[_,p,h]}}),k=S({inputs:{x:s},backend:n,attrs:{shape:w}}),x=l?F.shape[1]:F.shape[2],A=l?F.shape[2]:F.shape[1],E=u?k.shape[1]:k.shape[2],C=Math.max(_,b),T=n.data.get(F.dataId).values,D=n.data.get(k.dataId).values,I=r.util.computeStrides(F.shape),O=r.util.computeStrides(k.shape),[P,M,R]=l?[I[0],1,I[1]]:[I[0],I[1],1],[L,N,B]=u?[1,O[1],O[0]]:[O[1],1,O[0]],j=A*E,V=(0,r.buffer)([C,A,E],F.dtype),z=V.values,H=n.blockSize;for(let r=0;rMath.acos(e))),P={kernelName:r.Acos,backendName:"cpu",kernelFunc:O},M=(0,u.unaryKernelFunc)(r.Acosh,(e=>Math.acosh(e))),R={kernelName:r.Acosh,backendName:"cpu",kernelFunc:M};const L={kernelName:r.AddN,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,i=t;(0,a.assertNotComplex)(t,"addN");const o=i.map((e=>n.data.get(e.dataId).values)),s=(0,r.buffer)(i[0].shape,i[0].dtype),l=s.values;for(let r=0;rt&&(t=a,n=r)}m[r]=n}return d.forEach((e=>n.disposeIntermediateTensorInfo(e))),n.makeTensorInfo(h,"int32",m)}};const z={kernelName:r.ArgMin,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{axis:s}=i;(0,a.assertNotComplex)(o,"argMin");let l=r.util.parseAxisParam(s,o.shape);const u=r.backend_util.getAxesPermutation(l,o.shape.length);let c=o;const d=[];null!=u&&(c=(0,N.transpose)({inputs:{x:o},backend:n,attrs:{perm:u}}),d.push(c),l=r.backend_util.getInnerMostAxes(l.length,c.shape.length)),l=[l[0]],r.backend_util.assertAxesAreInnerMostDims("argMin",l,c.shape.length);const[h,f]=r.backend_util.computeOutAndReduceShapes(c.shape,l),p=r.util.sizeFromShape(h),m=r.util.makeZerosTypedArray(p,"int32"),g=r.util.sizeFromShape(f),y=n.data.get(c.dataId).values;for(let r=0;rn.disposeIntermediateTensorInfo(e))),n.makeTensorInfo(h,"int32",m)}},H=(0,u.unaryKernelFunc)(r.Asin,(e=>Math.asin(e))),U={kernelName:r.Asin,backendName:"cpu",kernelFunc:H},W=(0,u.unaryKernelFunc)(r.Asinh,(e=>Math.asinh(e))),q={kernelName:r.Asinh,backendName:"cpu",kernelFunc:W},$=(0,u.unaryKernelFunc)(r.Atan,(e=>Math.atan(e))),Y={kernelName:r.Atan,backendName:"cpu",kernelFunc:$};var G=n(12725);const X=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>Math.atan2(e,t))),K=(0,G.binaryKernelFunc)(r.Atan2,X),J={kernelName:r.Atan2,backendName:"cpu",kernelFunc:K},Z=(0,u.unaryKernelFunc)(r.Atanh,(e=>Math.atanh(e))),Q={kernelName:r.Atanh,backendName:"cpu",kernelFunc:Z};function ee(e,t,n,a,i,o){const s=i.strideHeight,l=i.strideWidth,u=i.dilationHeight,c=i.dilationWidth,d=i.effectiveFilterHeight,h=i.effectiveFilterWidth,f=i.padInfo.top,p=i.padInfo.left,m="max"===o?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,g=(0,r.buffer)(i.outShape,n),y=g.values,_=i.outShape[1]*i.outShape[2]*i.outShape[3],b=i.outShape[2]*i.outShape[3],v=i.outShape[3];for(let r=0;rg?g=n:"avg"===o&&(_+=n,b++)}if(isNaN(g))break}y[k+t*v+r]="avg"===o?_/b:g}}}return g}function te(e,t,n,a,i=!1,o=!1){const s=(0,r.buffer)(a.outShape,"int32"),l=a.strideHeight,u=a.strideWidth,c=a.dilationHeight,d=a.dilationWidth,h=a.effectiveFilterHeight,f=a.effectiveFilterWidth,p=a.padInfo.top,m=a.padInfo.left,g=(0,r.buffer)(t,n,e);for(let r=0;rv&&(v=u,w=i?o?((r*a.inHeight+t)*a.inWidth+n)*a.inChannels+e:(t*a.inWidth+n)*a.inChannels+e:s*f+l)}}s.set(w,r,t,l,e)}}return s}function ne(e,t,n,a,i,o){const s=i.strideDepth,l=i.strideHeight,u=i.strideWidth,c=i.dilationDepth,d=i.dilationHeight,h=i.dilationWidth,f=i.effectiveFilterDepth,p=i.effectiveFilterHeight,m=i.effectiveFilterWidth,g=i.padInfo.front,y=i.padInfo.top,_=i.padInfo.left,b="max"===o?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,v=(0,r.buffer)(i.outShape,n),w=v.values,F=i.outShape[1]*i.outShape[2]*i.outShape[3]*i.outShape[4],k=i.outShape[2]*i.outShape[3]*i.outShape[4],x=i.outShape[3]*i.outShape[4],A=i.outShape[4];for(let r=0;rF?F=i:"avg"===o&&(k+=i,x++),isNaN(F))break}if(isNaN(F))break}if(isNaN(F))break}w[y+r]="avg"===o?k/Math.max(x,1):F}}}}return v}const re={kernelName:r.AvgPool,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t;(0,a.assertNotComplex)(o,"avgPool");const{filterSize:s,strides:l,pad:u,dimRoundingMode:c}=i;r.util.assert(r.backend_util.eitherStridesOrDilationsAreOne(l,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${l} and dilations '1'`));const d=r.backend_util.computePool2DInfo(o.shape,s,l,1,u,c);let f;if(1===d.filterWidth&&1===d.filterHeight&&r.util.arraysEqual(d.inShape,d.outShape))f=(0,h.identity)({inputs:{x:o},backend:n});else{const e=n.data.get(o.dataId).values,t=r.util.computeStrides(o.shape),a=ee(e,o.shape,o.dtype,t,d,"avg");f=n.makeTensorInfo(d.outShape,o.dtype,a.values)}return f}};const ae={kernelName:r.AvgPool3D,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{filterSize:s,strides:l,pad:u,dimRoundingMode:c,dataFormat:d}=i;(0,a.assertNotComplex)(o,"avgPool3d");const h=r.backend_util.computePool3DInfo(o.shape,s,l,1,u,c,d),f=ne(n.data.get(o.dataId).values,o.shape,o.dtype,r.util.computeStrides(o.shape),h,"avg");return n.makeTensorInfo(f.shape,"float32",f.values)}};const ie={kernelName:r.AvgPool3DGrad,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{dy:o,input:s}=t,{filterSize:l,strides:u,pad:c,dimRoundingMode:d}=i;(0,a.assertNotComplex)([o,s],"avgPool3DGrad");const h=r.backend_util.computePool3DInfo(s.shape,l,u,1,c,d),f=h.strideDepth,p=h.strideHeight,m=h.strideWidth,g=h.filterDepth,y=h.filterHeight,_=h.filterWidth,b=h.dilationDepth,v=h.dilationHeight,w=h.dilationWidth,F=h.effectiveFilterDepth,k=h.effectiveFilterHeight,x=h.effectiveFilterWidth,A=F-1-h.padInfo.front,S=x-1-h.padInfo.left,E=k-1-h.padInfo.top,C=(0,r.buffer)(s.shape,"float32"),T=1/(g*y*_),D=n.bufferSync(o);for(let r=0;r=h.outDepth||Math.floor(n)!==n))for(let t=0;t=h.outHeight||Math.floor(a)!==a))for(let t=0;t=h.outWidth||Math.floor(i)!==i)continue;l+=D.get(r,n,a,i,e)}}}C.set(l*T,r,t,n,a,e)}return n.makeTensorInfo(C.shape,C.dtype,C.values)}};const oe={kernelName:r.AvgPoolGrad,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{dy:o,input:s}=t,l=s;(0,a.assertNotComplex)([o,s],"avgPoolGrad");const{filterSize:u,strides:c,pad:d}=i,h=r.backend_util.computePool2DInfo(l.shape,u,c,1,d),f=h.strideHeight,p=h.strideWidth,m=h.filterHeight,g=h.filterWidth,y=h.dilationHeight,_=h.dilationWidth,b=h.effectiveFilterHeight,v=h.effectiveFilterWidth,w=v-1-h.padInfo.left,F=b-1-h.padInfo.top,k=(0,r.buffer)(l.shape,"float32"),x=1/(m*g),A=n.data.get(o.dataId).values,S=(0,r.buffer)(o.shape,"float32",A);for(let r=0;r=h.outHeight||Math.floor(n)!==n))for(let t=0;t=h.outWidth||Math.floor(a)!==a)continue;o+=S.get(r,n,a,e)}}k.set(o*x,r,t,n,e)}return n.makeTensorInfo(k.shape,k.dtype,k.values)}};const se={kernelName:r.FusedBatchNorm,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o,scale:s,offset:l,mean:u,variance:c}=t;r.util.assert(u.shape.length===c.shape.length,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),r.util.assert(null==l||u.shape.length===l.shape.length,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),r.util.assert(null==s||u.shape.length===s.shape.length,(()=>"Batch normalization gradient requires mean and scale to have equal ranks.")),(0,a.assertNotComplex)([o,u,c,s,l],"batchNorm");let{varianceEpsilon:d}=i;null==d&&(d=.001);const h=n.data.get(o.dataId).values,f=n.data.get(u.dataId).values,p=n.data.get(c.dataId).values,m=s?n.data.get(s.dataId).values:new Float32Array([1]),g=l?n.data.get(l.dataId).values:new Float32Array([0]),y=new Float32Array(h.length),_=g.length,b=m.length,v=p.length,w=f.length;let F=0,k=0,x=0,A=0;for(let r=0;r=_&&(F=0),k>=w&&(k=0),x>=b&&(x=0),A>=v&&(A=0);return n.makeTensorInfo(o.shape,o.dtype,y)}};var le=n(65021);const ue={kernelName:r.BatchToSpaceND,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{blockShape:s,crops:l}=i;(0,a.assertNotComplex)([o],"batchToSpaceND");const u=s.reduce(((e,t)=>e*t)),c=r.backend_util.getReshaped(o.shape,s,u),d=r.backend_util.getPermuted(c.length,s.length),h=r.backend_util.getReshapedPermuted(o.shape,s,u),f=r.backend_util.getSliceBeginCoords(l,s.length),p=r.backend_util.getSliceSize(h,l,s.length),m=S({inputs:{x:o},backend:n,attrs:{shape:c}}),g=(0,N.transpose)({inputs:{x:m},backend:n,attrs:{perm:d}}),y=S({inputs:{x:g},backend:n,attrs:{shape:h}}),_=(0,le.slice)({inputs:{x:y},backend:n,attrs:{begin:f,size:p}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),n.disposeIntermediateTensorInfo(y),_}};var ce=n(34660);const de={kernelName:r.Bincount,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,weights:i}=t,{size:o}=r,s=n.data.get(a.dataId).values,l=n.data.get(i.dataId).values,u=(0,ce.bincountImpl)(s,l,i.dtype,i.shape,o);return n.makeTensorInfo([o],i.dtype,u)}};var he=n(84523);const fe={kernelName:r.BroadcastArgs,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{s0:a,s1:i}=t,o=n.data.get(a.dataId).values,s=n.data.get(i.dataId).values,l=r.backend_util.assertAndGetBroadcastShape(Array.from(o),Array.from(s));return n.makeTensorInfo([l.length],"int32",Int32Array.from(l))}};var pe=n(40084),me=n(49642);const ge=(0,u.unaryKernelFunc)(r.ClipByValue,((e,t)=>{const n=t;return e>n.clipValueMax?n.clipValueMax:e{const{x:t}=e.inputs,n=e.backend,a=new Float32Array(r.util.sizeFromShape(t.shape)),i=n.data.get(t.dataId),o=i.complexTensorInfos.real,s=i.complexTensorInfos.imag,l=n.data.get(o.dataId).values,u=n.data.get(s.dataId).values;for(let r=0;re.shape));r.backend_util.assertParamsConsistent(s,o);let l=r.backend_util.computeOutShape(t.map((e=>e.shape)),o);if(0===r.util.sizeFromShape(l))return n.makeTensorInfo(l,t[0].dtype,[]);const u=t.filter((e=>r.util.sizeFromShape(e.shape)>0));if(1===u.length)return(0,h.identity)({inputs:{x:u[0]},backend:n});if("complex64"===u[0].dtype){const e=u.map((e=>(0,ke.real)({inputs:{input:e},backend:n}))),t=u.map((e=>we({inputs:{input:e},backend:n}))),r=xe({inputs:e,backend:n,attrs:{axis:o}}),a=xe({inputs:t,backend:n,attrs:{axis:o}}),i=(0,_e.complex)({inputs:{real:r,imag:a},backend:n});return e.forEach((e=>n.disposeIntermediateTensorInfo(e))),t.forEach((e=>n.disposeIntermediateTensorInfo(e))),n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(a),i}const c=u.map((e=>{const t=r.util.sizeFromShape(e.shape.slice(o));return S({inputs:{x:e},backend:n,attrs:{shape:[-1,t]}})})),d=c.map((e=>({vals:n.data.get(e.dataId).values,shape:e.shape})));l=r.backend_util.computeOutShape(c.map((e=>e.shape)),1);const f=1===c[0].shape[0],p=(0,ve.concatImpl)(d,l,t[0].dtype,f),m=r.backend_util.computeOutShape(u.map((e=>e.shape)),o),g=n.makeTensorInfo(m,t[0].dtype,p);return c.forEach((e=>n.disposeIntermediateTensorInfo(e))),g}const Ae={kernelName:r.Concat,backendName:"cpu",kernelFunc:xe};function Se(e){const{inputs:t,backend:n,attrs:i}=e,{x:o,filter:s}=t,{strides:l,pad:u,dataFormat:c,dilations:d,dimRoundingMode:h}=i;(0,a.assertNotComplex)([o,s],"conv2d");const f=r.backend_util.convertConv2DDataFormat(c),p=r.backend_util.computeConv2DInfo(o.shape,s.shape,l,d,u,h,!1,f),m=p.filterHeight,g=p.filterWidth,y=p.dilationHeight,_=p.dilationWidth,b=p.padInfo.left,v=p.padInfo.top,w="channelsLast"===p.dataFormat,F=new r.TensorBuffer(p.outShape,o.dtype),k=r.util.computeStrides(o.shape),x=r.util.computeStrides(s.shape),A=k[0],S=w?k[1]:k[2],E=w?k[2]:1,C=w?1:k[1],T=F.strides[0],D=w?F.strides[1]:F.strides[2],I=w?F.strides[2]:1,O=w?1:F.strides[1],P=n.data.get(o.dataId).values,M=n.data.get(s.dataId).values,R=F.values;for(let r=0;r=p.inHeight)continue;const i=t*x[0],o=e+n*S;for(let e=0;e=p.inWidth)continue;const a=o+r*E;let s=i+e*x[1];for(let e=0;e=d.inDepth)continue;const i=t*E[0],o=e+n*S[1];for(let e=0;e=d.inHeight)continue;const a=i+e*E[1],s=o+r*S[2];for(let e=0;e=d.inWidth)continue;const i=a+e*E[2],o=s+t*d.inChannels;let l=i;for(let e=0;eMath.cos(e))),Me={kernelName:r.Cos,backendName:"cpu",kernelFunc:Pe},Re=(0,u.unaryKernelFunc)(r.Cosh,(e=>Math.cosh(e))),Le={kernelName:r.Cosh,backendName:"cpu",kernelFunc:Re};const Ne={kernelName:r.CropAndResize,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:a}=e,{image:i,boxes:o,boxInd:s}=t,{cropSize:l,method:u,extrapolationValue:c}=a,[d,h,f,p]=i.shape,m=o.shape[0],[g,y]=l,_=(0,r.buffer)([m,g,y,p],"float32"),b=n.data.get(o.dataId).values,v=n.data.get(s.dataId).values,w=n.data.get(i.dataId).values,F=r.util.computeStrides(i.shape),k=r.util.computeStrides(_.shape);for(let r=0;r=d)continue;const s=g>1?(a-t)*(h-1)/(g-1):0,l=y>1?(i-n)*(f-1)/(y-1):0;for(let d=0;d1?t*(h-1)+d*s:.5*(t+a)*(h-1);if(e<0||e>h-1)for(let t=0;t1?n*(f-1)+e*l:.5*(n+i)*(f-1);if(u<0||u>f-1){for(let t=0;t1?n*(f-1)+t*l:.5*(n+i)*(f-1);if(a<0||a>f-1){for(let e=0;ee+g-t-1:(e,t)=>e+t;for(let r=0;re+g-t-1:(e,t)=>e+t;for(let r=0;r`Only NHWC dataFormat supported on CPU for depthToSpace. Got ${s}`));const l=i.shape[0],u=i.shape[1],c=i.shape[2],d=i.shape[3],h=u*o,f=c*o,p=d/(o*o),m=n.data.get(i.dataId).values,g=new Float32Array(l*h*f*p);let y=0;for(let r=0;r`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${l} and dilations '${p}'`));const m=r.backend_util.computeConv2DInfo(o.shape,s.shape,l,p,u,d,!0),{filterHeight:g,filterWidth:y,dilationHeight:_,dilationWidth:b,padInfo:v}=m,w=v.left,F=v.top,k=m.outChannels/m.inChannels,x=new r.TensorBuffer(m.outShape,o.dtype),A=n.data.get(o.dataId).values,S=n.data.get(s.dataId).values,E=x.values;for(let r=0;r=m.inHeight)continue;const i=t*f[0],o=e+n*h[1];for(let e=0;e=m.inWidth)continue;const a=i+e*f[1],s=o+r*m.inChannels;let l=t,u=a;for(let e=0;e{const{x:a,filter:i}=e,{strides:o,pad:s,dilations:l}=n,u=t,c=u.data.get(a.dataId).values,d=a.shape.length,h=u.data.get(i.dataId).values,f=i.shape.length,{batchSize:p,inHeight:m,inWidth:g,inChannels:y,outHeight:_,outWidth:b,padInfo:v,strideHeight:w,strideWidth:F,filterHeight:k,filterWidth:x,dilationHeight:A,dilationWidth:S,outShape:E}=r.backend_util.computeDilation2DInfo(a.shape,i.shape,o,s,"NHWC",l),C=r.util.sizeFromShape(E),T=E.length,D=r.util.getArrayFromDType(a.dtype,C);for(let I=0;I=0&&n=0&&ul&&(l=m)}}}D[r.util.locToIndex([I,e,n,s],T,r.util.computeStrides(E))]=l}}}return{dataId:u.write(r.util.toTypedArray(D,a.dtype),E,a.dtype),shape:E,dtype:a.dtype}}},Ge={kernelName:r.Dilation2DBackpropFilter,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:a,filter:i,dy:o}=e,{strides:s,pad:l,dilations:u}=n,c=t,d=r.util.toNestedArray(a.shape,c.data.get(a.dataId).values),h=r.util.toNestedArray(i.shape,c.data.get(i.dataId).values),{batchSize:f,inHeight:p,inWidth:m,inChannels:g,outHeight:y,outWidth:_,padInfo:b,strideHeight:v,strideWidth:w,filterHeight:F,filterWidth:k,dilationHeight:x,dilationWidth:A,outShape:S}=r.backend_util.computeDilation2DInfo(a.shape,i.shape,s,l,"NHWC",u);r.util.assert(o.rank===S.length,(()=>`Error in ${r.Dilation2DBackpropFilter}, dy must have the same rank as output ${S.length}, but got ${o.rank}`));const E=r.util.toNestedArray(S,c.data.get(o.dataId).values),C=r.util.makeZerosNestedTypedArray(i.shape,i.dtype);for(let r=0;r=0&&n=0&&uo&&(o=a,s=e,l=t)}}}C[s][l][i]+=E[r][e][n][i]}}}return{dataId:c.write(r.util.toTypedArray(C,a.dtype),i.shape,i.dtype),shape:i.shape,dtype:i.dtype}}},Xe={kernelName:r.Dilation2DBackpropInput,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:a,filter:i,dy:o}=e,{strides:s,pad:l,dilations:u}=n,c=t,d=r.util.toNestedArray(a.shape,c.data.get(a.dataId).values),h=r.util.toNestedArray(i.shape,c.data.get(i.dataId).values),{batchSize:f,inHeight:p,inWidth:m,inChannels:g,outHeight:y,outWidth:_,padInfo:b,strideHeight:v,strideWidth:w,filterHeight:F,filterWidth:k,dilationHeight:x,dilationWidth:A,outShape:S}=r.backend_util.computeDilation2DInfo(a.shape,i.shape,s,l,"NHWC",u);r.util.assert(o.rank===S.length,(()=>`Error in ${r.Dilation2DBackpropInput}, dy must have the same rank as output ${S.length}, but got ${o.rank}`));const E=r.util.toNestedArray(S,c.data.get(o.dataId).values),C=r.util.makeZerosNestedTypedArray(a.shape,a.dtype);for(let r=0;r=0&&n=0&&uo&&(o=a,s=n,l=u)}}}C[r][s][l][i]+=E[r][e][n][i]}}}return{dataId:c.write(r.util.toTypedArray(C,a.dtype),a.shape,a.dtype),shape:a.shape,dtype:a.dtype}}};const Ke={kernelName:r.Draw,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{image:a}=t,{canvas:i,options:o}=r,{contextOptions:s,imageOptions:l}=o||{},u=(null===l||void 0===l?void 0:l.alpha)||1,c=(null===s||void 0===s?void 0:s.contextType)||"2d";if("2d"!==c)throw new Error(`Context type ${s.contextType} is not supported by the CPU backend.`);const d=i.getContext(c,(null===s||void 0===s?void 0:s.contextAttributes)||{});if(null==d)throw new Error(`Could not get the context with ${c} type.`);const[h,f]=a.shape.slice(0,2),p=2===a.shape.length?1:a.shape[2],m=n.data.get(a.dataId).values,g="float32"===a.dtype?255:1,y=new Uint8ClampedArray(f*h*4);for(let b=0;b1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${t}.`)}else if("int32"===a.dtype&&(t<0||t>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${t}.`);1===p?(e[0]=t*g,e[1]=t*g,e[2]=t*g):e[n]=t*g}const t=4*b;y[t+0]=Math.round(e[0]),y[t+1]=Math.round(e[1]),y[t+2]=Math.round(e[2]),y[t+3]=Math.round(e[3])}i.width=f,i.height=h;const _=new ImageData(y,f,h);return d.putImageData(_,0,0),a}};var Je=n(51063),Ze=n(59436);function Qe(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{axis:s,keepDims:l}=i;let u;(0,a.assertNotComplex)(o,"sum"),u="bool"===o.dtype?(0,pe.cast)({inputs:{x:o},backend:n,attrs:{dtype:"int32"}}):(0,h.identity)({inputs:{x:o},backend:n});const c=u.shape.length,d=r.util.parseAxisParam(s,u.shape),f=r.backend_util.getAxesPermutation(d,c);let p=d,m=u;null!=f&&(m=(0,N.transpose)({inputs:{x:u},backend:n,attrs:{perm:f}}),p=r.backend_util.getInnerMostAxes(p.length,c)),r.backend_util.assertAxesAreInnerMostDims("sum",p,m.shape.length);const[g,y]=r.backend_util.computeOutAndReduceShapes(m.shape,p),_=r.backend_util.upcastType(m.dtype,"int32");let b=(0,Ze.zeros)(n,g,_);const v=r.util.sizeFromShape(y),w=n.data.get(b.dataId).values,F=n.data.get(m.dataId).values;for(let r=0;r=0&&(f=Qe({inputs:{x:f},backend:n,attrs:{axis:c[g]-(s.length-p),keepDims:!1}}),m.push(f)),p--)}for(const r of m)r!==f&&n.disposeIntermediateTensorInfo(r);return f}};const nt={kernelName:r.EluGrad,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{dy:i,y:o}=t;(0,a.assertNotComplex)([i,o],"eluGrad");const s=new Float32Array(r.util.sizeFromShape(o.shape)),l=n.data.get(o.dataId).values,u=n.data.get(i.dataId).values;for(let r=0;r=0?u[r]:u[r]*(e+1)}return n.makeTensorInfo(o.shape,"float32",s)}};var rt=n(69351);const at=r.backend_util.ERF_P,it=r.backend_util.ERF_A1,ot=r.backend_util.ERF_A2,st=r.backend_util.ERF_A3,lt=r.backend_util.ERF_A4,ut=r.backend_util.ERF_A5,ct=(0,u.unaryKernelFunc)(r.Erf,(e=>{const t=Math.sign(e),n=Math.abs(e),r=1/(1+at*n);return t*(1-((((ut*r+lt)*r+st)*r+ot)*r+it)*r*Math.exp(-n*n))})),dt={kernelName:r.Erf,backendName:"cpu",kernelFunc:ct};var ht=n(26668);function ft(e){const{inputs:t,backend:n,attrs:a}=e,{input:i}=t,{dim:o}=a,s=i.shape.length,l=i.shape.slice();let u=o;return o<0&&(r.util.assert(-(s+1)<=o,(()=>`Axis must be in the interval [${-(s+1)}, ${s}]`)),u=s+o+1),l.splice(u,0,1),S({inputs:{x:i},backend:n,attrs:{shape:l}})}const pt={kernelName:r.ExpandDims,backendName:"cpu",kernelFunc:ft};var mt=n(89470);const gt=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>e/t)),yt=(0,G.binaryKernelFunc)(r.RealDiv,gt),_t={kernelName:r.RealDiv,backendName:"cpu",kernelFunc:yt};var bt=n(95461);function vt(e,t,n){const a=e.shape,i=a[0],o=a[1],s=n.data.get(e.dataId),l=s.complexTensorInfos.real,u=s.complexTensorInfos.imag,c=[i,o],d=r.util.sizeFromShape(c),h=r.util.getTypedArrayFromDType("float32",d),f=r.util.getTypedArrayFromDType("float32",d);for(let y=0;y{const{image:a}=e,i=n,o=r.util.getTypedArrayFromDType(a.dtype,r.util.sizeFromShape(a.shape)),[s,l,u,c]=a.shape,d=i.data.get(a.dataId).values;for(let r=0;r=0&&i=0,(()=>`GatherV2: the index value ${e} is not in [0, ${h-1}]`))}let f=u;null==u&&(f=0);const p=r.util.sizeFromShape(s.shape),m=r.backend_util.segment_util.collectGatherOpShapeInfo(o,s,c,f),g=S({inputs:{x:o},backend:n,attrs:{shape:[m.batchSize,m.outerSize,m.dimSize,m.sliceSize]}}),y=S({inputs:{x:s},backend:n,attrs:{shape:[m.batchSize,p/m.batchSize]}}),_=[m.batchSize,m.outerSize,p/m.batchSize,m.sliceSize],b=n.bufferSync(y),v=n.bufferSync(g),w=(0,Pt.gatherV2Impl)(v,b,_);return n.disposeIntermediateTensorInfo(g),n.disposeIntermediateTensorInfo(y),n.makeTensorInfo(m.outputShape,w.dtype,w.values)}};var Rt=n(50553),Lt=n(94101);const Nt={kernelName:r.IFFT,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{input:a}=t,i=r.util.sizeFromShape(a.shape),o=a.shape[a.shape.length-1],s=S({inputs:{x:a},backend:n,attrs:{shape:[i/o,o]}}),l=vt(s,!0,n),u=S({inputs:{x:l},backend:n,attrs:{shape:a.shape}});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(l),u}},Bt=(0,u.unaryKernelFunc)(r.IsFinite,(e=>Number.isFinite(e)?1:0),"bool"),jt={kernelName:r.IsFinite,backendName:"cpu",kernelFunc:Bt},Vt=(0,u.unaryKernelFunc)(r.IsInf,(e=>Math.abs(e)===1/0?1:0),"bool"),zt={kernelName:r.IsInf,backendName:"cpu",kernelFunc:Vt},Ht=(0,u.unaryKernelFunc)(r.IsNan,(e=>Number.isNaN(e)?1:0),"bool"),Ut={kernelName:r.IsNan,backendName:"cpu",kernelFunc:Ht};var Wt=n(67762),qt=n(22872),$t=n(49545);const Yt={kernelName:r.LinSpace,backendName:"cpu",kernelFunc:function(e){const{backend:t,attrs:n}=e,{start:r,stop:a,num:i}=n,o=(0,$t.linSpaceImpl)(r,a,i);return t.makeTensorInfo([o.length],"float32",o)}};var Gt=n(53397);const Xt=(0,u.unaryKernelFunc)(r.Log1p,(e=>Math.log1p(e))),Kt={kernelName:r.Log1p,backendName:"cpu",kernelFunc:Xt},Jt=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>e&&t)),Zt=(0,G.binaryKernelFunc)(r.LogicalAnd,Jt,null,"bool"),Qt={kernelName:r.LogicalAnd,backendName:"cpu",kernelFunc:Zt},en=(0,u.unaryKernelFunc)(r.LogicalNot,(e=>e?0:1),"bool"),tn={kernelName:r.LogicalNot,backendName:"cpu",kernelFunc:en},nn=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>e||t)),rn=(0,G.binaryKernelFunc)(r.LogicalOr,nn,null,"bool"),an={kernelName:r.LogicalOr,backendName:"cpu",kernelFunc:rn};const on={kernelName:r.LRN,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{depthRadius:s,bias:l,alpha:u,beta:c}=i;(0,a.assertNotComplex)(o,"LRN");const d=o.shape[3],h=d-1,f=n.data.get(o.dataId).values,p=r.util.sizeFromShape(o.shape),m=new Float32Array(p);function g(e){const t=e%d;let n=e-t+Math.max(0,t-s);const r=e-t+Math.min(t+s,h);let a=0;for(;n<=r;n++){const e=f[n];a+=e*e}return a}for(let r=0;r`Error in maxPool: Either strides or dilations must be 1. Got strides ${l} and dilations '1'`));const d=r.backend_util.computePool2DInfo(o.shape,s,l,1,u,c);let f;if(1===d.filterWidth&&1===d.filterHeight&&r.util.arraysEqual(d.inShape,d.outShape))f=(0,h.identity)({inputs:{x:o},backend:n});else{const e=n.data.get(o.dataId).values,t=r.util.computeStrides(o.shape),a=ee(e,o.shape,o.dtype,t,d,"max");f=n.makeTensorInfo(d.outShape,o.dtype,a.values)}return f}};const pn={kernelName:r.MaxPool3D,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{filterSize:s,strides:l,pad:u,dimRoundingMode:c,dataFormat:d}=i;(0,a.assertNotComplex)(o,"maxPool3d");const h=r.backend_util.computePool3DInfo(o.shape,s,l,1,u,c,d),f=ne(n.data.get(o.dataId).values,o.shape,o.dtype,r.util.computeStrides(o.shape),h,"max");return n.makeTensorInfo(f.shape,"float32",f.values)}};const mn={kernelName:r.MaxPool3DGrad,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{dy:o,input:s}=t,{filterSize:l,strides:u,pad:c,dimRoundingMode:d}=i;(0,a.assertNotComplex)([o,s],"maxPool3DGrad");const h=r.backend_util.computePool3DInfo(s.shape,l,u,1,c,d),f=function(e,t){const n=(0,r.buffer)(t.outShape,"int32"),a=t.strideDepth,i=t.strideHeight,o=t.strideWidth,s=t.dilationDepth,l=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,d=t.effectiveFilterHeight,h=t.effectiveFilterWidth,f=t.padInfo.front,p=t.padInfo.top,m=t.padInfo.left;for(let r=0;r=x&&(x=l,A=n*d*h+i*d+s)}}}n.set(A,r,y,a,i,g)}}}return n}(n.bufferSync(s),h),p=h.strideDepth,m=h.strideHeight,g=h.strideWidth,y=h.dilationDepth,_=h.dilationHeight,b=h.dilationWidth,v=h.effectiveFilterDepth,w=h.effectiveFilterHeight,F=h.effectiveFilterWidth,k=v-1-h.padInfo.front,x=F-1-h.padInfo.left,A=w-1-h.padInfo.top,S=(0,r.buffer)(s.shape,"float32"),E=n.bufferSync(o);for(let r=0;r=h.outDepth||Math.floor(n)!==n))for(let a=0;a=h.outHeight||Math.floor(i)!==i))for(let o=0;o=h.outWidth||Math.floor(u)!==u)continue;const c=v*w*F-1-f.get(r,n,i,u,e)===t*w*F+a*F+o?1:0;if(0===c)continue;l+=E.get(r,n,i,u,e)*c}}}S.set(l,r,t,n,a,e)}return n.makeTensorInfo(S.shape,S.dtype,S.values)}};const gn={kernelName:r.MaxPoolGrad,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{dy:o,input:s,output:l}=t,u=s;(0,a.assertNotComplex)([s,l],"maxPoolGrad");const{filterSize:c,strides:d,pad:h,dimRoundingMode:f}=i,p=r.backend_util.computePool2DInfo(u.shape,c,d,1,h,f),m=n.data.get(u.dataId).values,g=(0,r.buffer)(p.outShape,u.dtype,te(m,u.shape,u.dtype,p).values),y=p.strideHeight,_=p.strideWidth,b=p.dilationHeight,v=p.dilationWidth,w=p.effectiveFilterHeight,F=p.effectiveFilterWidth,k=F-1-p.padInfo.left,x=w-1-p.padInfo.top,A=(0,r.buffer)(u.shape,"float32"),S=n.data.get(o.dataId).values,E=(0,r.buffer)(o.shape,"float32",S);for(let r=0;r=p.outHeight||Math.floor(n)!==n))for(let a=0;a=p.outWidth||Math.floor(s)!==s)continue;const l=w*F-1-g.get(r,n,s,e)===t*F+a?1:0;if(0===l)continue;o+=E.get(r,n,s,e)*l}}A.set(o,r,t,n,e)}return n.makeTensorInfo(A.shape,A.dtype,A.values)}};const yn={kernelName:r.MaxPoolWithArgmax,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{x:i}=e,{filterSize:o,strides:s,pad:l,includeBatchInIndex:u}=t,c=n;(0,a.assertNotComplex)(i,"MaxPoolWithArgmax");const d=c.data.get(i.dataId).values,h=r.backend_util.computePool2DInfo(i.shape,o,s,[1,1],l),[f,p]=function(e,t,n,a,i){const o=ee(e,0,n,r.util.computeStrides(t),i,"max"),s=te(e,t,n,i,!0,a);return[o.values,s.values]}(d,i.shape,i.dtype,u,h),m=c.write(f,h.outShape,i.dtype),g=c.write(p,h.outShape,i.dtype);return[{dataId:m,shape:h.outShape,dtype:i.dtype},{dataId:g,shape:h.outShape,dtype:"int32"}]}};const _n={kernelName:r.Mean,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:a}=e,{x:i}=t,{axis:o,keepDims:s}=a,l=r.util.parseAxisParam(o,i.shape),u=r.backend_util.computeOutAndReduceShapes(i.shape,l)[1],c=r.util.sizeFromShape(u),d=[],h=n.makeTensorInfo([],"float32",new Float32Array([c]));d.push(h);const f=(0,pe.cast)({inputs:{x:i},backend:n,attrs:{dtype:"float32"}});d.push(f);const p=yt({inputs:{a:f,b:h},backend:n});d.push(p);const m=Qe({inputs:{x:p},backend:n,attrs:{axis:o,keepDims:s}});return d.forEach((e=>n.disposeIntermediateTensorInfo(e))),m}};const bn={kernelName:r.Min,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{axis:s,keepDims:l}=i;(0,a.assertNotComplex)(o,"min");const u=r.util.parseAxisParam(s,o.shape);let c=u;const d=r.backend_util.getAxesPermutation(c,o.shape.length);let h=o;null!=d&&(h=(0,N.transpose)({inputs:{x:o},backend:n,attrs:{perm:d}}),c=r.backend_util.getInnerMostAxes(c.length,o.shape.length)),r.backend_util.assertAxesAreInnerMostDims("min",c,h.shape.length);const[f,p]=r.backend_util.computeOutAndReduceShapes(h.shape,c),m=r.util.sizeFromShape(p),g=r.util.makeZerosTypedArray(r.util.sizeFromShape(f),h.dtype),y=n.data.get(h.dataId).values;for(let r=0;re[0]+o.shape[t]+e[1])),c=s.map((e=>e[0])),d=s.map(((e,t)=>e[0]+o.shape[t])),h="reflect"===l?0:1,f=n.data.get(o.dataId).values,p=o.shape.length,m=r.util.computeStrides(o.shape),g=r.util.sizeFromShape(u),y=u.length,_=r.util.computeStrides(u),b=r.util.getTypedArrayFromDType(o.dtype,g);for(let a=0;a=d[n]&&(e[n]=2*(d[n]-1)-e[n]+h);e=e.map(((e,t)=>e-c[t]));const t=r.util.locToIndex(e,p,m);b[a]=f[t]}return{dataId:n.write(b,u,o.dtype),shape:u,dtype:o.dtype}}},Fn=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>{const n=e%t;return e<0&&t<0||e>=0&&t>=0?n:(n+t)%t})),kn=(0,G.binaryKernelFunc)(r.Mod,Fn),xn={kernelName:r.Mod,backendName:"cpu",kernelFunc:kn};var An=n(31472);function Sn(e){const{inputs:t,backend:n,attrs:a}=e,{logits:i}=t,{dim:o}=a,s=i.shape.length;let l=o;if(-1===l&&(l=s-1),l!==s-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${s} and dim was ${l}`);const u=r.util.parseAxisParam([l],i.shape),c=cn({inputs:{x:i},backend:n,attrs:{reductionIndices:u,keepDims:!1}}),d=r.backend_util.expandShapeToKeepDim(c.shape,u),h=S({inputs:{x:c},backend:n,attrs:{shape:d}}),f=(0,bt.sub)({inputs:{a:i,b:h},backend:n}),p=(0,ht.exp)({inputs:{x:f},backend:n}),m=Qe({inputs:{x:p},backend:n,attrs:{axis:u,keepDims:!1}}),g=S({inputs:{x:m},backend:n,attrs:{shape:d}}),y=yt({inputs:{a:p,b:g},backend:n});return n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),y}const En={kernelName:r.Softmax,backendName:"cpu",kernelFunc:Sn};const Cn={kernelName:r.Multinomial,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{logits:o}=t,{numSamples:s,seed:l,normalized:u}=i;(0,a.assertNotComplex)(o,"multinomial");const c=u?o:Sn({inputs:{logits:o},backend:n,attrs:{dim:-1}}),d=c.shape[0],h=c.shape[1],f=n.data.get(c.dataId).values,p=[d,s],m=r.util.makeZerosTypedArray(r.util.sizeFromShape(p),"int32");for(let r=0;r=0&&f[r]{r.util.assertShapesMatch(o,e.shape,"All tensors passed to stack must have matching shapes"),r.util.assert(s===e.dtype,(()=>"All tensors passed to stack must have matching dtypes"))}));const l=[],u=xe({inputs:t.map((e=>{const t=ft({inputs:{input:e},backend:n,attrs:{dim:i}});return l.push(t),t})),backend:n,attrs:{axis:i}});return l.forEach((e=>n.disposeIntermediateTensorInfo(e))),u}const Hn={kernelName:r.Pack,backendName:"cpu",kernelFunc:zn};const Un={kernelName:r.PadV2,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{paddings:s,constantValue:l}=i;(0,a.assertNotComplex)(o,"pad");const u=s.map(((e,t)=>e[0]+o.shape[t]+e[1])),c=s.map((e=>e[0])),d=n.data.get(o.dataId).values,h=r.util.sizeFromShape(o.shape),f=o.shape.length,p=r.util.computeStrides(o.shape),m=r.util.sizeFromShape(u),g=u.length,y=r.util.computeStrides(u),_=r.util.getTypedArrayFromDType(o.dtype,m);0!==l&&_.fill(l);for(let a=0;ae+c[t]));_[r.util.locToIndex(e,g,y)]=d[a]}return{dataId:n.write(_,u,o.dtype),shape:u,dtype:o.dtype}}},Wn=(0,m.createSimpleBinaryKernelImpl)(((e,t)=>Math.pow(e,t))),qn=(0,G.binaryKernelFunc)(r.Pow,Wn),$n={kernelName:r.Pow,backendName:"cpu",kernelFunc:qn};var Yn=n(10702),Gn=n(61871);const Xn={kernelName:r.RaggedGather,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{paramsNestedSplits:a,paramsDenseValues:i,indices:o}=t,{outputRaggedRank:s}=r,l=a.map((e=>n.data.get(e.dataId).values)),u=a.map((e=>e.shape)),c=n.data.get(i.dataId).values,d=n.data.get(o.dataId).values,[h,f,p]=(0,Gn.raggedGatherImpl)(l,u,c,i.shape,i.dtype,d,o.shape,s),m=h.map((e=>n.makeTensorInfo([e.length],"int32",e))),g=n.makeTensorInfo(p,i.dtype,f);return m.concat([g])}};var Kn=n(16953);const Jn={kernelName:r.RaggedRange,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{starts:r,limits:a,deltas:i}=t,o=n.data.get(r.dataId).values,s=n.data.get(a.dataId).values,l=n.data.get(i.dataId).values,[u,c]=(0,Kn.raggedRangeImpl)(o,r.shape,r.dtype,s,a.shape,l,i.shape);return[n.makeTensorInfo([u.length],"int32",u),n.makeTensorInfo([c.length],r.dtype,c)]}};var Zn=n(969);const Qn={kernelName:r.RaggedTensorToTensor,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{shape:a,values:i,defaultValue:o,rowPartitionTensors:s}=t,{rowPartitionTypes:l}=r,u=n.data.get(a.dataId).values,c=n.data.get(i.dataId).values,d=n.data.get(o.dataId).values,h=s.map((e=>n.data.get(e.dataId).values)),f=s.map((e=>e.shape)),[p,m]=(0,Zn.raggedTensorToTensorImpl)(u,a.shape,c,i.shape,i.dtype,d,o.shape,h,f,l);return n.makeTensorInfo(p,i.dtype,m)}};var er=n(3427);const tr={kernelName:r.Range,backendName:"cpu",kernelFunc:function(e){const{backend:t,attrs:n}=e,{start:r,stop:a,dtype:i,step:o}=n,s=(0,er.rangeImpl)(r,a,o,i);return t.makeTensorInfo([s.length],i,s)}},nr=(0,u.unaryKernelFunc)(r.Reciprocal,(e=>1/e)),rr={kernelName:r.Reciprocal,backendName:"cpu",kernelFunc:nr};const ar={kernelName:r.ResizeBilinear,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{images:o}=t,{alignCorners:s,halfPixelCenters:l,size:u}=i;(0,a.assertNotComplex)(o,"resizeBilinear");const c=r.util.computeStrides(o.shape),[d,h]=u,[f,p,m,g]=o.shape,y=n.data.get(o.dataId).values,_=new Float32Array(r.util.sizeFromShape([f,d,h,g])),b=[s&&d>1?p-1:p,s&&h>1?m-1:m],v=[s&&d>1?d-1:d,s&&h>1?h-1:h];let w=0;const F=b[0]/v[0],k=b[1]/v[1];for(let r=0;r1?d-1:d,l&&m>1?h-1:h],_=[l&&p>1?p-1:p,l&&m>1?m-1:m],b=y[0]/_[0],v=y[1]/_[1],w=n.data.get(s.dataId).values;let F=0;for(let r=0;r1?p-1:p,s&&h>1?m-1:m],v=[s&&d>1?d-1:d,s&&h>1?h-1:h],w=b[0]/v[0],F=b[1]/v[1];let k=0;for(let r=0;r1?h-1:h,l&&g>1?f-1:f],v=[l&&m>1?m-1:m,l&&g>1?g-1:g],w=b[0]/v[0],F=b[1]/v[1],k=1/w,x=1/F,A=2*Math.ceil(k)+2,S=2*Math.ceil(x)+2;for(let r=0;r=m)continue;const d=e+u*c[1],p=u*w;if(t===Math.min(h-1,l?Math.round(p):Math.floor(p)))for(let e=0;e=g)continue;const r=d+t*c[2],a=t*F;i===Math.min(f-1,l?Math.round(a):Math.floor(a))&&(o+=_[r+n])}}y[r+n]=o}}}}return n.makeTensorInfo(o.shape,o.dtype,y)}};const lr={kernelName:r.Reverse,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{dims:s}=i;(0,a.assertNotComplex)(o,"reverse");const l=o.shape.length,u=r.util.parseAxisParam(s,o.shape);if(0===l)return(0,h.identity)({inputs:{x:o},backend:n});const c=new r.TensorBuffer(o.shape,o.dtype),d=n.bufferSync(o);for(let r=0;rt[e]=o.shape[e]-1-t[e])),c.set(d.get(...t),...e)}return n.makeTensorInfo(c.shape,c.dtype,c.values)}},ur={kernelName:r.RotateWithOffset,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{image:a}=e,{radians:i,fillValue:o,center:s}=t,l=n,u=r.util.getTypedArrayFromDType(a.dtype,r.util.sizeFromShape(a.shape)),[c,d,h,f]=a.shape,[p,m]=r.backend_util.getImageCenter(s,d,h),g=Math.sin(i),y=Math.cos(i),_=l.data.get(a.dataId).values;for(let r=0;r=0&&v=0&&w{const t=Math.floor(e);return e-t<.5?Math.floor(e):e-t>.5?Math.ceil(e):t%2===0?t:t+1})),dr={kernelName:r.Round,backendName:"cpu",kernelFunc:cr};var hr=n(99499),fr=n(94054);const pr={kernelName:r.ScatterNd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:a}=e,{indices:i,updates:o}=t,{shape:s}=a,{sliceRank:l,numUpdates:u,sliceSize:c,strides:d,outputSize:h}=r.backend_util.calculateShapes(o,i,s),f=n.bufferSync(i),p=n.bufferSync(o),m=(0,fr.scatterImpl)(f,p,s,h,c,u,l,d,0,!0);return n.makeTensorInfo(s,m.dtype,m.values)}};function mr(e,t){let n=0,r=e.length,a=0;for(;n1||1===o.shape.length?1:r.util.sizeFromShape(o.shape.slice(1));for(let r=0;re>=0?vr*e:br*(Math.exp(e)-1))),Fr={kernelName:r.Selu,backendName:"cpu",kernelFunc:wr},kr=(0,u.unaryKernelFunc)(r.Sign,(e=>e<0?-1:e>0?1:0)),xr={kernelName:r.Sign,backendName:"cpu",kernelFunc:kr},Ar=(0,u.unaryKernelFunc)(r.Sin,(e=>Math.sin(e))),Sr={kernelName:r.Sin,backendName:"cpu",kernelFunc:Ar},Er=(0,u.unaryKernelFunc)(r.Sinh,(e=>Math.sinh(e))),Cr={kernelName:r.Sinh,backendName:"cpu",kernelFunc:Er},Tr=Math.log(1.1920928955078125e-7)+2,Dr=(0,u.unaryKernelFunc)(r.Softplus,(e=>{const t=e>-Tr,n=eNumber(e))))),n.makeTensorInfo([m.length],r.dtype,new Int32Array(m))]}};var Rr=n(2042);const Lr={kernelName:r.SparseReshape,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{inputIndices:r,inputShape:a,newShape:i}=t;if(2!==r.shape.length)throw new Error(`Input indices should be a matrix but received shape\n ${r.shape}`);if(1!==a.shape.length)throw new Error(`Input shape should be a vector but received shape\n ${a.shape}`);if(1!==i.shape.length)throw new Error(`Target shape should be a vector but received shape ${i.shape}`);const o=Array.from(n.data.get(a.dataId).values),s=n.data.get(r.dataId).values,l=Array.from(n.data.get(i.dataId).values),[u,c,d]=(0,Rr.sparseReshapeImpl)(s,r.shape,r.dtype,o,l);return[n.makeTensorInfo(c,r.dtype,u),n.makeTensorInfo([d.length],i.dtype,new Int32Array(d))]}};var Nr=n(61990);const Br={kernelName:r.SparseSegmentMean,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:a,segmentIds:i}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.shape.length)throw new Error(`Indices should be a vector but received shape\n ${a.shape}`);if(1!==i.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${i.shape}`);if(a.shape[0]!==i.shape[0])throw new Error("segmentIds and indices should have same size.");const o=n.data.get(r.dataId).values,s=n.data.get(a.dataId).values,l=n.data.get(i.dataId).values,[u,c]=(0,Nr.sparseSegmentReductionImpl)(o,r.shape,r.dtype,s,l,!0);return n.makeTensorInfo(c,r.dtype,u)}};const jr={kernelName:r.SparseSegmentSum,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:a,segmentIds:i}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.shape.length)throw new Error(`Indices should be a vector but received shape\n ${a.shape}`);if(1!==i.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${i.shape}`);if(a.shape[0]!==i.shape[0])throw new Error("segmentIds and indices should have same size.");const o=n.data.get(r.dataId).values,s=n.data.get(a.dataId).values,l=n.data.get(i.dataId).values,[u,c]=(0,Nr.sparseSegmentReductionImpl)(o,r.shape,r.dtype,s,l);return n.makeTensorInfo(c,r.dtype,u)}};const Vr={kernelName:r.SparseToDense,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:a}=e,{sparseIndices:i,sparseValues:o,defaultValue:s}=t,{outputShape:l}=a,{sliceRank:u,numUpdates:c,sliceSize:d,strides:h,outputSize:f}=r.backend_util.calculateShapes(o,i,l),p=!1,m=n.bufferSync(i);let g;switch(o.dtype){case"bool":{const e=n.bufferSync(o),t=Boolean(n.data.get(s.dataId).values[0]);g=(0,fr.scatterImpl)(m,e,l,f,d,c,u,h,t,p);break}case"float32":{const e=n.bufferSync(o),t=n.data.get(s.dataId).values[0];g=(0,fr.scatterImpl)(m,e,l,f,d,c,u,h,t,p);break}case"int32":{const e=n.bufferSync(o),t=n.data.get(s.dataId).values[0];g=(0,fr.scatterImpl)(m,e,l,f,d,c,u,h,t,p);break}case"string":{const e=n.bufferSync(o),t=r.util.decodeString(n.data.get(s.dataId).values[0]);g=(0,fr.scatterImpl)(m,e,l,f,d,c,u,h,t,p);break}default:throw new Error(`Unsupported type ${o.dtype}`)}return n.makeTensorInfo(l,g.dtype,g.values)}};const zr={kernelName:r.SplitV,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:a}=e,{x:i}=t,{numOrSizeSplits:o,axis:s}=a,l=r.util.parseAxisParam(s,i.shape)[0],u=r.backend_util.prepareSplitSize(i,o,l),c=new Array(i.shape.length).fill(0),d=i.shape.slice();return u.map((e=>{const t=[...d];t[l]=e;const r=(0,le.slice)({inputs:{x:i},backend:n,attrs:{begin:c,size:t}});return c[l]+=e,r}))}};var Hr=n(36593);const Ur={kernelName:r.Square,backendName:"cpu",kernelFunc:({inputs:e,backend:t})=>{const{x:n}=e,r=t;(0,a.assertNotComplex)(n,"square");const i=r.data.get(n.dataId).values,o=new Float32Array(i.length);for(let a=0;a{const n=t;return isNaN(e)?NaN:e>0?1:n.alpha})),Yr={kernelName:r.Step,backendName:"cpu",kernelFunc:$r};var Gr=n(93261);const Xr={kernelName:r.StridedSlice,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:i}=e,{x:o}=t,{begin:s,end:l,strides:u,beginMask:c,endMask:d,ellipsisMask:h,newAxisMask:f,shrinkAxisMask:p}=i;(0,a.assertNotComplex)(o,"stridedSlice");const{finalShapeSparse:m,finalShape:g,isIdentity:y,sliceDim0:_,isSimpleSlice:b,begin:v,end:w,strides:F}=r.slice_util.sliceInfo(o.shape,s,l,u,c,d,h,f,p);let k;if(y)k=S({inputs:{x:o},backend:n,attrs:{shape:g}});else if(_||b){r.util.assert(o.shape.length>=1,(()=>`Input must have rank at least 1, got: ${o.shape.length}`));const e=r.slice_util.computeOutShape(v,w,F),t=(0,le.slice)({inputs:{x:o},backend:n,attrs:{begin:v,size:e}});k=S({inputs:{x:t},backend:n,attrs:{shape:g}}),n.disposeIntermediateTensorInfo(t)}else{const e=n.bufferSync(o),t=(0,Gr.stridedSliceImpl)(m,e,F,v);k=n.makeTensorInfo(g,t.dtype,t.values)}return k}};var Kr=n(58033);const Jr={kernelName:r.StringNGrams,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{separator:a,nGramWidths:i,leftPad:o,rightPad:s,padWidth:l,preserveShortSequences:u}=r,{data:c,dataSplits:d}=t,h=n.data.get(c.dataId).values,f=n.data.get(d.dataId).values,[p,m]=(0,Kr.stringNGramsImpl)(h,f,a,i,o,s,l,u);return[n.makeTensorInfo([p.length],"string",p),n.makeTensorInfo(d.shape,"int32",m)]}};var Zr=n(23257);const Qr={kernelName:r.StringSplit,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{skipEmpty:a}=r,{input:i,delimiter:o}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(1!==i.shape.length)throw new Error(`Input must be a vector, got shape: ${i.shape}`);if(0!==o.shape.length)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);const s=n.data.get(i.dataId).values,l=n.data.get(o.dataId).values[0],[u,c,d]=(0,Zr.stringSplitImpl)(s,l,a),h=c.length;return[n.makeTensorInfo([h,2],"int32",u),n.makeTensorInfo([h],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(d))]}};var ea=n(9552);const ta={kernelName:r.StringToHashBucketFast,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{numBuckets:a}=r,{input:i}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(a<=0)throw new Error("Number of buckets must be at least 1");const o=n.data.get(i.dataId).values,s=(0,ea.stringToHashBucketFastImpl)(o,a);return n.makeTensorInfo(i.shape,"int32",s)}},na=(0,u.unaryKernelFunc)(r.Tan,(e=>Math.tan(e))),ra={kernelName:r.Tan,backendName:"cpu",kernelFunc:na},aa=(0,u.unaryKernelFunc)(r.Tanh,(e=>Math.tanh(e))),ia={kernelName:r.Tanh,backendName:"cpu",kernelFunc:aa};const oa={kernelName:r.TensorScatterUpdate,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{tensor:a,indices:i,updates:o}=t,{sliceRank:s,numUpdates:l,sliceSize:u,strides:c,outputSize:d}=r.backend_util.calculateShapes(o,i,a.shape),h=n.bufferSync(i),f=n.bufferSync(o),p=n.bufferSync(a),m=(0,fr.scatterImpl)(h,f,a.shape,d,u,l,s,c,p,!1);return n.makeTensorInfo(a.shape,m.dtype,m.values)}};var sa=n(78640);const la={kernelName:r.Tile,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:i}=t,{reps:o}=r;(0,a.assertNotComplex)(i,"tile");const s=(0,sa.tileImpl)(n.bufferSync(i),o);return n.makeTensorInfo(s.shape,s.dtype,s.values)}};var ua=n(73852);const ca={kernelName:r.TopK,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:i}=t,{k:o,sorted:s}=r;(0,a.assertNotComplex)(i,"topk");const l=n.data.get(i.dataId).values,[u,c]=(0,ua.topKImpl)(l,i.shape,i.dtype,o,s);return[n.makeTensorInfo(u.shape,u.dtype,u.values),n.makeTensorInfo(c.shape,c.dtype,c.values)]}};const da={kernelName:r.Transform,backendName:"cpu",kernelFunc:function(e){const{inputs:t,attrs:n,backend:a}=e,{image:i,transforms:o}=t,{interpolation:s,fillMode:l,fillValue:u,outputShape:c}=n,[d,h,f,p]=i.shape,[m,g]=null!=c?c:[h,f],y=[d,m,g,p],_=r.util.computeStrides(i.shape),b=_[0],v=_[1],w=_[2],F=r.util.computeStrides(y),k=F[0],x=F[1],A=F[2],S=r.util.getTypedArrayFromDType(i.dtype,r.util.sizeFromShape(y));S.fill(u);const E=a.data.get(i.dataId).values,C=a.data.get(o.dataId).values;for(let r=0;rt-1)if(t<=1)n=0;else{const e=2*t;n-=e*Math.trunc(n/e),n>=t&&(n=e-n-1)}return r.util.clamp(0,n,t-1)}(e,t);case"wrap":return function(e,t){let n=e;if(n<0)if(t<=1)n=0;else{const e=t-1;n+=t*(Math.trunc(-n/e)+1)}else if(n>t-1)if(t<=1)n=0;else{const e=t-1;n-=t*Math.trunc(n/e)}return r.util.clamp(0,n,t-1)}(e,t);case"nearest":return function(e,t){return r.util.clamp(0,e,t-1)}(e,t);default:return function(e){return e}(e)}}function fa(e,t,n,r,a,i,o,s,l,u,c){return 0<=s&&sn.disposeIntermediateTensorInfo(e))),f}},va=[D,I.absConfig,P,R,A.addConfig,L,B,j,V,z,U,q,Y,J,Q,re,ae,ie,oe,T,se,ue,de,he.bitwiseAndConfig,fe,pe.castConfig,me.ceilConfig,ye,_e.complexConfig,be,Ae,Ee,Ce,Te,De,Ie,Oe,Me,Le,Ne,Be,je,Ve,ze,Ue,We,qe,$e,Ye,Ge,Xe,Ke,tt,d,nt,rt.equalConfig,dt,ht.expConfig,pt,mt.expm1Config,kt,At,St,Et.floorConfig,Ct.floorDivConfig,Tt,Dt,Ot,Mt,Rt.greaterConfig,Lt.greaterEqualConfig,h.identityConfig,Nt,Fe,jt,zt,Ut,p,Wt.lessConfig,qt.lessEqualConfig,Yt,Gt.logConfig,Kt,Qt,tn,an,on,sn,dn,hn.maximumConfig,fn,pn,mn,gn,yn,_n,bn,vn.minimumConfig,wn,xn,Cn,Je.multiplyConfig,Tn.negConfig,In,Pn,Rn,Ln.notEqualConfig,Nn,Vn,Hn,Un,$n,_,Yn.prodConfig,Xn,Jn,Qn,tr,ke.realConfig,_t,rr,v,F,E,ar,ir,or,sr,lr,ur,dr,hr.rsqrtConfig,pr,yr,_r,Fr,k.sigmoidConfig,xr,Sr,Cr,le.sliceConfig,En,Ir,Or,Mr,Lr,Br,jr,Vr,zr,Hr.sqrtConfig,Ur,Wr.squaredDifferenceConfig,qr.staticRegexReplaceConfig,Yr,Xr,Jr,Qr,ta,bt.subConfig,et,ra,ia,oa,la,ca,da,N.transposeConfig,ya,_a,ba,jn];for(const wa of va)(0,r.registerKernel)(wa)},61815:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>o,absConfig:()=>s,simpleAbsImpl:()=>i});var r=n(66723),a=n(77551);function i(e){const t=new Float32Array(e.length);for(let n=0;n{const{x:t}=e.inputs,n=e.backend;(0,a.assertNotComplex)(t,"abs");let o=new Float32Array(r.util.sizeFromShape(t.shape));return o=i(n.data.get(t.dataId).values),n.makeOutput(o,t.shape,t.dtype)},s={kernelName:r.Abs,backendName:"cpu",kernelFunc:o}},10128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{add:()=>l,addComplexImpl:()=>s,addConfig:()=>u,addImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e+t)),s=(0,i.createComplexBinaryKernelImpl)(((e,t,n,r)=>({real:e+n,imag:t+r}))),l=(0,i.binaryKernelFunc)(r.Add,o,s),u={kernelName:r.Add,backendName:"cpu",kernelFunc:l}},34660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bincountImpl:()=>a,bincountReduceImpl:()=>i});var r=n(66723);function a(e,t,n,a,i){const o=r.util.sizeFromShape(a),s=r.util.makeZerosTypedArray(i,n);for(let r=0;r=i||(s[n]+=o>0?t[r]:1)}return s}function i(e,t,n,a=!1){const i=e.shape[0],o=e.shape[1],s=(0,r.buffer)([i,n],t.dtype);for(let r=0;r=n||(a?s.set(1,r,o):t.size>0?s.set(s.get(r,o)+t.get(r,i),r,o):s.set(s.get(r,o)+1,r,o))}return s}},84523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{bitwiseAnd:()=>s,bitwiseAndConfig:()=>l,bitwiseAndImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e&t)),s=(0,i.binaryKernelFunc)(r.BitwiseAnd,o),l={kernelName:r.BitwiseAnd,backendName:"cpu",kernelFunc:s}},40084:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cast:()=>c,castConfig:()=>d,castImpl:()=>u});var r=n(66723),a=n(58128),i=n(59436),o=n(95227),s=n(80205),l=n(95747);function u(e,t,n,i){if("int32"===i){return[t,"int32",Int32Array.from(e)]}if("bool"===i){const i=r.util.toTypedArray([0],n),[o,s]=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e!==t?1:0))(t,[],e,i,"bool");return[s,"bool",o]}throw new Error(`Error in Cast: failed to cast ${n} to ${i}`)}function c(e){const{inputs:t,backend:n,attrs:a}=e,{x:d}=t,{dtype:h}=a;if("complex64"===h){if("complex64"===d.dtype)return(0,s.identity)({inputs:{x:d},backend:n});const e=(0,i.zeros)(n,d.shape,d.dtype),t=c({inputs:{x:d},backend:n,attrs:{dtype:"float32"}}),r=(0,o.complex)({inputs:{real:t,imag:e},backend:n});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(t),r}if("complex64"===d.dtype){const e=(0,l.real)({inputs:{input:d},backend:n}),t=c({inputs:{x:e},backend:n,attrs:{dtype:h}});return n.disposeIntermediateTensorInfo(e),t}if(!r.util.hasEncodingLoss(d.dtype,h)){const e=(0,s.identity)({inputs:{x:d},backend:n});return{dataId:e.dataId,shape:e.shape,dtype:h}}const f=n.data.get(d.dataId).values,[p,m,g]=u(f,d.shape,d.dtype,h);return n.makeTensorInfo(p,m,g)}const d={kernelName:r.Cast,backendName:"cpu",kernelFunc:c}},49642:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ceil:()=>s,ceilConfig:()=>l,ceilImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.ceil(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Ceil,o),l={kernelName:r.Ceil,backendName:"cpu",kernelFunc:s}},95227:(e,t,n)=>{"use strict";function r(e){const{inputs:t,backend:n}=e,{real:r,imag:a}=t,i=n.data.get(r.dataId).values,o=n.data.get(a.dataId).values,s=n.makeTensorInfo(r.shape,"complex64");return n.data.get(s.dataId).complexTensorInfos={real:n.makeTensorInfo(r.shape,"float32",i),imag:n.makeTensorInfo(a.shape,"float32",o)},s}n.r(t),n.d(t,{complex:()=>r,complexConfig:()=>a});const a={kernelName:n(66723).Complex,backendName:"cpu",kernelFunc:r}},71996:(e,t,n)=>{"use strict";n.r(t),n.d(t,{concatImpl:()=>a});var r=n(66723);function a(e,t,n,a){const i=r.util.getArrayFromDType(n,r.util.sizeFromShape(t));if(a&&"string"!==n){let t=0;e.forEach((e=>{const n=r.util.sizeFromShape(e.shape);i.set(e.vals,t),t+=n}))}else{let a=0;e.forEach((e=>{const o="string"===n?r.backend_util.fromUint8ToStringArray(e.vals):e.vals;let s=0;for(let n=0;n{"use strict";n.r(t),n.d(t,{equal:()=>s,equalConfig:()=>l,equalImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e===t?1:0)),s=(0,i.binaryKernelFunc)(r.Equal,o,null,"bool"),l={kernelName:r.Equal,backendName:"cpu",kernelFunc:s}},26668:(e,t,n)=>{"use strict";n.r(t),n.d(t,{exp:()=>s,expConfig:()=>l,expImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.exp(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Exp,o,"float32"),l={kernelName:r.Exp,backendName:"cpu",kernelFunc:s}},89470:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expm1:()=>s,expm1Config:()=>l,expm1Impl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.expm1(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Expm1,o),l={kernelName:r.Expm1,backendName:"cpu",kernelFunc:s}},59753:(e,t,n)=>{"use strict";n.r(t),n.d(t,{floor:()=>s,floorConfig:()=>l,floorImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.floor(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Floor,o),l={kernelName:r.Floor,backendName:"cpu",kernelFunc:s}},19930:(e,t,n)=>{"use strict";n.r(t),n.d(t,{floorDiv:()=>s,floorDivConfig:()=>l,floorDivImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>Math.floor(e/t))),s=(0,i.binaryKernelFunc)(r.FloorDiv,o,null,"int32"),l={kernelName:r.FloorDiv,backendName:"cpu",kernelFunc:s}},30179:(e,t,n)=>{"use strict";n.r(t),n.d(t,{gatherNdImpl:()=>a});var r=n(66723);function a(e,t,n,a,i,o,s,l,u){const c=(0,r.buffer)([a,o],n);for(let r=0;r=u/o)throw new Error(`Invalid indices: ${n} does not index into ${l}`);for(let e=0;e{"use strict";n.r(t),n.d(t,{gatherV2Impl:()=>a});var r=n(66723);function a(e,t,n){const a=(0,r.buffer)(n,e.dtype);for(let r=0;r{"use strict";n.r(t),n.d(t,{greater:()=>s,greaterConfig:()=>l,greaterImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e>t?1:0)),s=(0,i.binaryKernelFunc)(r.Greater,o,null,"bool"),l={kernelName:r.Greater,backendName:"cpu",kernelFunc:s}},94101:(e,t,n)=>{"use strict";n.r(t),n.d(t,{greaterEqual:()=>s,greaterEqualConfig:()=>l,greaterEqualImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e>=t?1:0)),s=(0,i.binaryKernelFunc)(r.GreaterEqual,o,null,"bool"),l={kernelName:r.GreaterEqual,backendName:"cpu",kernelFunc:s}},80205:(e,t,n)=>{"use strict";function r(e){const{inputs:t,backend:n}=e,{x:r}=t;return n.incRef(r.dataId),{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}n.r(t),n.d(t,{identity:()=>r,identityConfig:()=>a});const a={kernelName:n(66723).Identity,backendName:"cpu",kernelFunc:r}},67762:(e,t,n)=>{"use strict";n.r(t),n.d(t,{less:()=>s,lessConfig:()=>l,lessImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e{"use strict";n.r(t),n.d(t,{lessEqual:()=>s,lessEqualConfig:()=>l,lessEqualImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e<=t?1:0)),s=(0,i.binaryKernelFunc)(r.LessEqual,o,null,"bool"),l={kernelName:r.LessEqual,backendName:"cpu",kernelFunc:s}},49545:(e,t,n)=>{"use strict";n.r(t),n.d(t,{linSpaceImpl:()=>a});var r=n(66723);function a(e,t,n){const a=(t-e)/(n-1),i=r.util.makeZerosTypedArray(n,"float32");i[0]=e;for(let r=1;r{"use strict";n.r(t),n.d(t,{log:()=>s,logConfig:()=>l,logImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.log(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Log,o),l={kernelName:r.Log,backendName:"cpu",kernelFunc:s}},67526:(e,t,n)=>{"use strict";n.r(t),n.d(t,{maxImpl:()=>a});var r=n(66723);function a(e,t,n,a){const i=r.util.getTypedArrayFromDType(a,r.util.sizeFromShape(n));for(let r=0;ra)&&(a=t)}i[r]=a}return i}},65233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{maximum:()=>s,maximumConfig:()=>l,maximumImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>Math.max(e,t))),s=(0,i.binaryKernelFunc)(r.Maximum,o),l={kernelName:r.Maximum,backendName:"cpu",kernelFunc:s}},12387:(e,t,n)=>{"use strict";n.r(t),n.d(t,{minimum:()=>s,minimumConfig:()=>l,minimumImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>Math.min(e,t))),s=(0,i.binaryKernelFunc)(r.Minimum,o),l={kernelName:r.Minimum,backendName:"cpu",kernelFunc:s}},51063:(e,t,n)=>{"use strict";n.r(t),n.d(t,{multiply:()=>l,multiplyComplexImpl:()=>s,multiplyConfig:()=>u,multiplyImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e*t)),s=(0,i.createComplexBinaryKernelImpl)(((e,t,n,r)=>({real:e*n-t*r,imag:e*r+t*n}))),l=(0,i.binaryKernelFunc)(r.Multiply,o,s),u={kernelName:r.Multiply,backendName:"cpu",kernelFunc:l}},50233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{neg:()=>s,negConfig:()=>l,negImpl:()=>o});var r=n(66723),a=n(77551),i=n(51063);function o(e,t,n){const a=r.util.createScalarValue(-1,n);return(0,i.multiplyImpl)([],t,a,e,n)}function s(e){const{inputs:t,backend:n}=e,{x:r}=t;(0,a.assertNotComplex)(r,"neg");const i=n.data.get(r.dataId).values,[s,l]=o(i,r.shape,r.dtype);return n.makeTensorInfo(l,r.dtype,s)}const l={kernelName:r.Neg,backendName:"cpu",kernelFunc:s}},96784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{notEqual:()=>s,notEqualConfig:()=>l,notEqualImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e!==t?1:0)),s=(0,i.binaryKernelFunc)(r.NotEqual,o,null,"bool"),l={kernelName:r.NotEqual,backendName:"cpu",kernelFunc:s}},10702:(e,t,n)=>{"use strict";n.r(t),n.d(t,{prod:()=>s,prodConfig:()=>l,prodImpl:()=>o});var r=n(66723),a=n(77551),i=n(24852);function o(e,t,n,a){const[i,o]=r.backend_util.computeOutAndReduceShapes(e,a),s=(0,r.upcastType)(t,"int32"),l=r.util.makeZerosTypedArray(r.util.sizeFromShape(i),s),u=r.util.sizeFromShape(o);for(let r=0;rn.disposeIntermediateTensorInfo(e))),n.makeTensorInfo(w,v,_)}const l={kernelName:r.Prod,backendName:"cpu",kernelFunc:s}},61871:(e,t,n)=>{"use strict";n.r(t),n.d(t,{raggedGatherImpl:()=>s});var r=n(66723);function a(e,t,n,r){const a=[];let i=0;const o=t.length-1+n.length,s=new Array(o).fill(null).map((()=>[0]));!function(e,t){for(let n=0;na)throw new Error("Ragged splits must not point past values");for(let e=1;er[e])throw new Error("Ragged splits must be sorted in ascending order")}}(n,r);let l=1;for(let u=0;u=0){const e=s[i],t=e[e.length-1]-a[r];for(let n=r;n{if(e<0||e>=n){const i=r.util.indexToLoc(a,t.length,r.util.computeStrides(t)).join(",");throw new Error(`indices[${i}] = ${e} is not in [0, ${n})`)}}))}(l,u,t[0][0]-1),0===i.length)throw new Error("params.rank must be nonzero");const d=i[0],{outSplits:h,valueSlices:f,numValues:p}=a(l,u,e,d),m=function(e){const t=[];for(let n=0;ni[t]=e))}return t}(h),g=o(n,i,s,f,p);return[m,g[0],g[1]]}},16953:(e,t,n)=>{"use strict";n.r(t),n.d(t,{raggedRangeImpl:()=>i});var r=n(66723);const a=2147483647;function i(e,t,n,i,o,s,l){if(t.length>1)throw new Error("starts must be a scalar or vector");if(o.length>1)throw new Error("limits must be a scalar or vector");if(l.length>1)throw new Error("deltas must be a scalar or vector");const u=0===t.length,c=0===o.length,d=0===l.length,h=[];u||h.push(t[0]),c||h.push(o[0]),d||h.push(l[0]);for(let r=1;r0&&nt)l=0;else if(l=Math.ceil(Math.abs((n-t)/o)),l>a)throw new Error(`Requires ((limit - start) / delta) <= ${a}`);p[r+1]=p[r]+l}const m=p[f],g=r.util.getArrayFromDType(n,m);let y=0;for(let r=0;r{"use strict";n.r(t),n.d(t,{raggedTensorToTensorImpl:()=>l});var r=n(66723),a=r.backend_util.RowPartitionType;class i{constructor(e,t,n,a,i,o,s,l,u,c){this.shape=e,this.shapeShape=t,this.values=n,this.valuesShape=a,this.valuesDType=i,this.defaultValue=o,this.defaultValueShape=s,this.rowPartitionValues=l,this.rowPartitionValuesShapes=u,this.rowPartitionTypes=r.backend_util.getRowPartitionTypesHelper(c),this.raggedRank=r.backend_util.getRaggedRank(this.rowPartitionTypes)}getRowPartitionTypeByDimension(e){return this.rowPartitionTypes[0]===a.FIRST_DIM_SIZE?this.rowPartitionTypes[e+1]:this.rowPartitionTypes[e]}getRowPartitionTensor(e){return this.rowPartitionTypes[0]===a.FIRST_DIM_SIZE?this.rowPartitionValues[e+1]:this.rowPartitionValues[e]}getMaxWidth(e){const t=this.getRowPartitionTensor(e-1);switch(this.getRowPartitionTypeByDimension(e-1)){case a.VALUE_ROWIDS:return i.getMaxWidthValueRowID(t);case a.ROW_SPLITS:return i.getMaxWidthRowSplit(t);default:throw new Error(`Cannot handle partition type ${a[this.getRowPartitionTypeByDimension(e-1)]}`)}}static getMaxWidthRowSplit(e){const t=e.length;if(0===t||1===t)return 0;let n=0;for(let r=0;rn&&(n=t)}return n}static getMaxWidthValueRowID(e){const t=e.length;if(0===t)return 0;let n=0,r=e[0],a=0;for(let i=1;i"Final length of result must be equal to firstDimension.")),i}calculateOutputIndexRowSplit(e,t,n,r){const a=e.length,i=[];for(let o=0;o0&&i.length!==e[a-1])throw new Error("Invalid row split size.");return i}calculateOutputIndexValueRowID(e,t,n,r){const a=e.length,i=[];if(0===a)return[];let o=0,s=e[0];if(s>=t.length)throw new Error(`Got currentValueRowId=${s}, which is not less than ${t.length}`);let l=t[s];i.push(l);for(let u=1;u=0&&(++o,o=t.length)throw new Error(`Got nextValueRowId=${a} which is not less than ${t.length}`);l=t[a]}i.push(l)}if(i.length!==e.length)throw new Error("Invalid row ids.");return i}calculateOutputIndex(e,t,n,r){const i=this.getRowPartitionTensor(e),o=this.getRowPartitionTypeByDimension(e);switch(o){case a.VALUE_ROWIDS:return this.calculateOutputIndexValueRowID(i,t,n,r);case a.ROW_SPLITS:if(i.length-1>t.length)throw new Error(`Row partition size is greater than output size: ${i.length-1} > ${t.length}`);return this.calculateOutputIndexRowSplit(i,t,n,r);default:throw new Error(`Unsupported partition type: ${a[o]}`)}}getFirstDimensionSize(){const e=this.rowPartitionValues[0];if(0===this.rowPartitionTypes.length)throw new Error("No row_partition_types given.");const t=this.rowPartitionTypes[0];switch(t){case a.FIRST_DIM_SIZE:return e[0];case a.VALUE_ROWIDS:throw new Error("Cannot handle VALUE_ROWIDS in first dimension.");case a.ROW_SPLITS:return this.rowPartitionValuesShapes[0][0]-1;default:throw new Error(`Cannot handle type ${a[t]}`)}}compute(){if(this.rowPartitionValues[0].length<=0)throw new Error("Invalid first partition input. Tensor requires at least one element.");const e=this.getFirstDimensionSize(),t=this.calculateOutputSize(e),n=new Array(this.raggedRank+1);n[n.length-1]=1;for(let r=n.length-2;r>=0;--r)n[r]=n[r+1]*t[r+1];const a=s(t,!1),i=r.util.getArrayFromDType(this.valuesDType,r.util.sizeFromShape(a));if(n[0]*t[0]>0){let r=this.calculateFirstParentOutputIndex(e,n[0],t[0]);for(let e=1;e<=this.raggedRank;++e){r=this.calculateOutputIndex(e-1,r,n[e],t[e])}this.setOutput(this.raggedRank,r,i,a)}return[a,i]}setOutput(e,t,n,a){if(0===n.length)return;const i=this.values,s=n;let l=a.slice();l=l.slice(e+1);const u=r.util.sizeFromShape(l),c=t.length;let d=this.defaultValue;if(d.length!==u&&1!==d.length){const e=this.defaultValueShape;(0,r.tidy)((()=>{const t=(0,r.reshape)(d,e),n=(0,r.broadcastTo)(t,l);d=n.dataSync()}))}let h=0,f=0,p=0;for(let r=0;r<=c;++r){let e=r=c){const t=n.length;e=Math.floor(t/u)}if(e>p)if(1===this.defaultValue.length)s.subarray(p*u,e*u).fill(this.defaultValue[0]),p=e;else for(;e>p;){o(s.slice(p*u),d,u),++p}e<0?(h=r+1,f=p):(h=r,f=p,p=f+1)}else++p}}}function o(e,t,n){for(let r=0;r= 0`);if(r<-1)throw new Error(`Dimension ${r} must be >= -1`);r=-1}n.push(r)}return n}function l(e,t,n,r,a,o,s,l,u,c){return new i(e,t,n,r,a,o,s,l,u,c).compute()}},3427:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rangeImpl:()=>a});var r=n(66723);function a(e,t,n,a){if(e===t||e1)return r.util.makeZerosTypedArray(0,a);const i=Math.abs(Math.ceil((t-e)/n)),o=r.util.makeZerosTypedArray(i,a);t{"use strict";function r(e){const{inputs:t,backend:n}=e,{input:r}=t,a=n.data.get(r.dataId).complexTensorInfos.real,i=n.data.get(a.dataId).values;return n.makeTensorInfo(a.shape,a.dtype,i)}n.r(t),n.d(t,{real:()=>r,realConfig:()=>a});const a={kernelName:n(66723).Real,backendName:"cpu",kernelFunc:r}},99499:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rsqrt:()=>s,rsqrtConfig:()=>l,rsqrtImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>1/Math.sqrt(e))),s=(0,i.unaryKernelFuncFromImpl)(r.Rsqrt,o),l={kernelName:r.Rsqrt,backendName:"cpu",kernelFunc:s}},94054:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scatterImpl:()=>a});var r=n(66723);function a(e,t,n,a,i,o,s,l,u,c){const d=[a/i,i],h=e.values,f=t.values;if(0===a)return(0,r.buffer)(n,t.dtype);const p=u instanceof r.TensorBuffer?u:(0,r.buffer)(d,t.dtype);"string"===typeof u||"number"===typeof u?p.values.fill(u):"boolean"===typeof u&&p.values.fill(+u);for(let r=0;r=a/i)throw new Error(`Invalid indices: ${e} does not index into ${n}`);for(let n=0;n{"use strict";n.r(t),n.d(t,{sigmoid:()=>s,sigmoidConfig:()=>l,sigmoidImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>1/(1+Math.exp(-e)))),s=(0,i.unaryKernelFunc)(r.Sigmoid,(e=>1/(1+Math.exp(-e)))),l={kernelName:r.Sigmoid,backendName:"cpu",kernelFunc:s}},65021:(e,t,n)=>{"use strict";n.r(t),n.d(t,{slice:()=>o,sliceConfig:()=>s,sliceImpl:()=>i});var r=n(66723),a=n(77551);function i(e,t,n,a,i){const o=r.slice_util.isSliceContinous(a,t,n),s=r.util.sizeFromShape(n),l=r.util.computeStrides(a);if(o){const n=r.slice_util.computeFlatOffset(t,l);return"string"===i?e.slice(n,n+s):e.subarray(n,n+s)}const u="string"===i?r.backend_util.fromUint8ToStringArray(e):e,c=(0,r.buffer)(a,i,u),d=(0,r.buffer)(n,i);for(let r=0;re+t[n]));d.set(c.get(...n),...e)}return"string"===i?r.backend_util.fromStringArrayToUint8(d.values):d.values}function o(e){const{inputs:t,backend:n,attrs:o}=e,{x:s}=t,{begin:l,size:u}=o;(0,a.assertNotComplex)(s,"slice");const[c,d]=r.slice_util.parseSliceParams(s,l,u);r.slice_util.assertParamsValid(s,c,d);const h=i(n.data.get(s.dataId).values,c,d,s.shape,s.dtype);return n.makeTensorInfo(d,s.dtype,h)}const s={kernelName:r.Slice,backendName:"cpu",kernelFunc:o}},58169:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sparseFillEmptyRowsImpl:()=>a});var r=n(66723);function a(e,t,n,a,i,o,s){const l=t[0],u=o[0],c=new Array(u),d=new Array(l),h=t[1];if(0===u){if(0!==l)throw new Error(r.backend_util.getSparseFillEmptyRowsIndicesDenseShapeMismatch(l));return[r.util.getArrayFromDType(n,0),[0,h],r.util.getArrayFromDType(i,0),c,d]}let f=!0,p=0;const m=new Array(u).fill(0);for(let y=0;y=u)throw new Error(r.backend_util.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(y,t,u));++m[t],f=f&&t>=p,p=t}let g=!0;for(let r=0;r0&&(m[r]+=m[r-1])}if(g&&f){const t=e,n=a;for(let e=0;e{"use strict";n.r(t),n.d(t,{sparseReshapeImpl:()=>a});var r=n(66723);function a(e,t,n,a,i){const o=r.util.sizeFromShape(a),s=t[0],l=i.length,u=[];let c=1,d=-1;for(let g=0;g0){f[h-1]=1;for(let e=h-2;e>=0;--e)f[e]=f[e+1]*a[e+1]}const p=[];if(l>0){p[l-1]=1;for(let e=l-2;e>=0;--e)p[e]=p[e+1]*u[e+1]}const m=r.util.getArrayFromDType(n,s*l);for(let r=0;r{"use strict";n.r(t),n.d(t,{sparseSegmentReductionImpl:()=>a});var r=n(66723);function a(e,t,n,a,i,o=!1,s=0){const l=a.length,u=[t[0],e.length/t[0]],c=u[1],d=l>0?i[l-1]+1:0;if(d<0)throw new Error(r.backend_util.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());const h=t.slice();h[0]=d;const f=h.reduce(((e,t)=>e*t),1),p=r.util.getArrayFromDType(n,f);if(0===l)return d>0&&p.fill(s),[p,h];if(d<=0)throw new Error(r.backend_util.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let m=0,g=1,y=0,_=i[m];for(;;){let t=0;if(g=t)throw new Error(r.backend_util.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage())}if(_<0||_>=d)throw new Error(r.backend_util.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(_,d));_>y&&p.fill(s,y*c,_*c);for(let n=m;n=u[0])throw new Error(r.backend_util.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(n,a[n],u[0]));for(let n=0;nl)break}return y{"use strict";n.r(t),n.d(t,{sqrt:()=>s,sqrtConfig:()=>l,sqrtImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)((e=>Math.sqrt(e))),s=(0,i.unaryKernelFunc)(r.Sqrt,(e=>Math.sqrt(e))),l={kernelName:r.Sqrt,backendName:"cpu",kernelFunc:s}},99321:(e,t,n)=>{"use strict";n.r(t),n.d(t,{squaredDifference:()=>s,squaredDifferenceConfig:()=>l,squaredDifferenceImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>{const n=e-t;return n*n})),s=(0,i.binaryKernelFunc)(r.SquaredDifference,o),l={kernelName:r.SquaredDifference,backendName:"cpu",kernelFunc:s}},8396:(e,t,n)=>{"use strict";n.r(t),n.d(t,{staticRegexReplaceConfig:()=>l,staticRegexReplaceImpl:()=>o});var r=n(66723),a=n(55404),i=n(14385);const o=(0,a.createSimpleUnaryImpl)(((e,t)=>{const{pattern:n,replaceGlobal:r,rewrite:a}=t;return e.replace(new RegExp(n,r?"g":""),a)})),s=(0,i.unaryKernelFuncFromImpl)(r.StaticRegexReplace,o),l={kernelName:r.StaticRegexReplace,backendName:"cpu",kernelFunc:s}},93261:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stridedSliceImpl:()=>a});var r=n(66723);function a(e,t,n,a){const i=(0,r.buffer)(e,t.dtype);for(let r=0;r{"use strict";n.r(t),n.d(t,{stringNGramsImpl:()=>i});var r=n(66723);class a{constructor(e,t,n,a,i,o){this.separator=r.util.encodeString(e),this.nGramWidths=t,this.leftPad=r.util.encodeString(n),this.rightPad=r.util.encodeString(a),this.padWidth=i,this.preserveShort=o}getPadWidth(e){return Math.min(this.padWidth<0?e-1:this.padWidth,e-1)}getNumNGrams(e,t){const n=this.getPadWidth(t);return Math.max(0,e+2*n-t+1)}createNGrams(e,t,n,r,a,i){for(let o=0;o0?0:o-s);let h=0;h+=l*this.leftPad.length;for(let t=0;te.forEach((e=>f[p++]=e));for(let e=0;e0){m(e[d+c-1]);for(let e=0;e0){let e=t[0];if(0!==e)throw new Error(`First split value must be 0, got ${e}`);for(let r=1;r=e;if(a=a&&t[r]<=n,!a)throw new Error(`Invalid split value ${t[r]}, must be in [${e}, ${n}]`);e=t[r]}if(e!==n)throw new Error(`Last split value must be data size. Expected ${n}, got ${e}`)}const i=a-1,o=r.util.getArrayFromDType("int32",a);if(0===n||0===a){const e=new Array(n);for(let t=0;t<=i;++t)o[t]=0;return[e,o]}o[0]=0;for(let r=1;r<=i;++r){const e=t[r]-t[r-1];let n=0;this.nGramWidths.forEach((t=>{n+=this.getNumNGrams(e,t)})),this.preserveShort&&e>0&&0===n&&(n=1),o[r]=o[r-1]+n}const s=new Array(o[i]);for(let r=0;r{const o=t[r+1]-t[r],l=this.getNumNGrams(o,i);this.createNGrams(e,n,s,a,l,i),a+=l})),this.preserveShort&&a===o[r]){const i=t[r+1]-t[r];if(0===i)continue;const o=i+2*this.padWidth,l=1;this.createNGrams(e,n,s,a,l,o)}}return[s,o]}}function i(e,t,n,r,i,o,s,l){return new a(n,r,i,o,s,l).compute(e,t)}},23257:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stringSplitImpl:()=>i});var r=n(66723);function a(e,t,n,r){if(!e.length)return;if(0===t.length){for(let t=0;t{"use strict";n.r(t),n.d(t,{stringToHashBucketFastImpl:()=>a});var r=n(66723);function a(e,t){const n=r.util.getArrayFromDType("int32",e.length);for(let a=0;a{"use strict";n.r(t),n.d(t,{sub:()=>l,subComplexImpl:()=>s,subConfig:()=>u,subImpl:()=>o});var r=n(66723),a=n(58128),i=n(12725);const o=(0,a.createSimpleBinaryKernelImpl)(((e,t)=>e-t)),s=(0,i.createComplexBinaryKernelImpl)(((e,t,n,r)=>({real:e-n,imag:t-r}))),l=(0,i.binaryKernelFunc)(r.Sub,o,s),u={kernelName:r.Sub,backendName:"cpu",kernelFunc:l}},78640:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tileImpl:()=>a});var r=n(66723);function a(e,t){const n=new Array(e.rank);for(let r=0;r{"use strict";n.r(t),n.d(t,{topKImpl:()=>o});var r=n(66723);const a=(e,t)=>{const n=t.value-e.value;return 0===n?e.index-t.index:n};function i(e,t,n=0,o=e.length-1){for(;o>n;){if(o-n>600){const r=o-n+1,a=t-n+1,s=Math.log(r),l=.5*Math.exp(2*s/3),u=.5*Math.sqrt(s*l*(r-l)/r)*Math.sign(a-r/2);i(e,t,Math.max(n,Math.floor(t-a*l/r+u)),Math.min(o,Math.floor(t+(r-a)*l/r+u)))}const s=e[t];let l=n,u=o;for(r.util.swap(e,n,t),a(e[o],s)>0&&r.util.swap(e,n,o);l0;)u-=1}0===a(e[n],s)?r.util.swap(e,n,u):(u+=1,r.util.swap(e,u,o)),u<=t&&(n=u+1),t<=u&&(o=u-1)}}function o(e,t,n,o,s){const l=t[t.length-1],[u,c]=[e.length/l,l],d=r.util.getTypedArrayFromDType(n,u*o),h=r.util.getTypedArrayFromDType("int32",u*o);for(let r=0;rl[t]={value:e,index:t})),o{"use strict";n.r(t),n.d(t,{transpose:()=>o,transposeConfig:()=>s});var r=n(66723),a=n(77551),i=n(78033);function o(e){const{inputs:t,attrs:n,backend:r}=e,{x:o}=t,{perm:s}=n;(0,a.assertNotComplex)(o,"transpose");const l=o.shape.length,u=new Array(l);for(let a=0;a{"use strict";n.r(t),n.d(t,{transposeImpl:()=>a});var r=n(66723);function a(e,t,n,a,i){const o=t.length,s=r.util.sizeFromShape(t),l=r.util.computeStrides(t),u=r.util.computeStrides(i),c=r.util.getTypedArrayFromDType(n,r.util.sizeFromShape(i));for(let d=0;d{"use strict";n.r(t),n.d(t,{uniqueImpl:()=>a});var r=n(66723);function a(e,t,n,a){const i=r.util.parseAxisParam(t,n)[0],o=[1,n[0],1];for(let r=0;r{for(let n=0;n{"use strict";n.r(t),n.d(t,{addImpl:()=>a.addImpl,bincountImpl:()=>i.bincountImpl,bincountReduceImpl:()=>i.bincountReduceImpl,bitwiseAndImpl:()=>o.bitwiseAndImpl,castImpl:()=>s.castImpl,ceilImpl:()=>l.ceilImpl,concatImpl:()=>u.concatImpl,equalImpl:()=>c.equalImpl,expImpl:()=>d.expImpl,expm1Impl:()=>h.expm1Impl,floorDivImpl:()=>p.floorDivImpl,floorImpl:()=>f.floorImpl,gatherNdImpl:()=>m.gatherNdImpl,gatherV2Impl:()=>g.gatherV2Impl,greaterEqualImpl:()=>_.greaterEqualImpl,greaterImpl:()=>y.greaterImpl,lessEqualImpl:()=>v.lessEqualImpl,lessImpl:()=>b.lessImpl,linSpaceImpl:()=>w.linSpaceImpl,logImpl:()=>F.logImpl,maxImpl:()=>k.maxImpl,maximumImpl:()=>x.maximumImpl,minimumImpl:()=>A.minimumImpl,multiplyImpl:()=>S.multiplyImpl,negImpl:()=>E.negImpl,notEqualImpl:()=>C.notEqualImpl,prodImpl:()=>T.prodImpl,raggedGatherImpl:()=>D.raggedGatherImpl,raggedRangeImpl:()=>I.raggedRangeImpl,raggedTensorToTensorImpl:()=>O.raggedTensorToTensorImpl,rangeImpl:()=>P.rangeImpl,rsqrtImpl:()=>M.rsqrtImpl,scatterImpl:()=>R.scatterImpl,sigmoidImpl:()=>L.sigmoidImpl,simpleAbsImpl:()=>r.simpleAbsImpl,sliceImpl:()=>N.sliceImpl,sparseFillEmptyRowsImpl:()=>B.sparseFillEmptyRowsImpl,sparseReshapeImpl:()=>j.sparseReshapeImpl,sparseSegmentReductionImpl:()=>V.sparseSegmentReductionImpl,sqrtImpl:()=>z.sqrtImpl,squaredDifferenceImpl:()=>H.squaredDifferenceImpl,staticRegexReplaceImpl:()=>U.staticRegexReplaceImpl,stridedSliceImpl:()=>W.stridedSliceImpl,stringNGramsImpl:()=>q.stringNGramsImpl,stringSplitImpl:()=>$.stringSplitImpl,stringToHashBucketFastImpl:()=>Y.stringToHashBucketFastImpl,subImpl:()=>G.subImpl,tileImpl:()=>X.tileImpl,topKImpl:()=>K.topKImpl,transposeImpl:()=>J.transposeImpl,uniqueImpl:()=>Z.uniqueImpl});var r=n(61815),a=n(10128),i=n(34660),o=n(84523),s=n(40084),l=n(49642),u=n(71996),c=n(69351),d=n(26668),h=n(89470),f=n(59753),p=n(19930),m=n(30179),g=n(50053),y=n(50553),_=n(94101),b=n(67762),v=n(22872),w=n(49545),F=n(53397),k=n(67526),x=n(65233),A=n(12387),S=n(51063),E=n(50233),C=n(96784),T=n(10702),D=n(61871),I=n(16953),O=n(969),P=n(3427),M=n(99499),R=n(94054),L=n(7351),N=n(65021),B=n(58169),j=n(2042),V=n(61990),z=n(36593),H=n(99321),U=n(8396),W=n(93261),q=n(58033),$=n(23257),Y=n(9552),G=n(95461),X=n(78640),K=n(73852),J=n(78033),Z=n(59201)},58128:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createSimpleBinaryKernelImpl:()=>a});var r=n(66723);function a(e){return(t,n,a,i,o)=>{const s=r.backend_util.assertAndGetBroadcastShape(t,n),l=s.length,u=r.util.computeStrides(s),c=r.util.sizeFromShape(s),d=r.util.getTypedArrayFromDType(o,c),h=t.length,f=n.length,p=r.util.computeStrides(t),m=r.util.computeStrides(n),g=r.backend_util.getBroadcastDims(t,s),y=r.backend_util.getBroadcastDims(n,s);if(g.length+y.length===0)for(let r=0;rn[e]=0));const o=r.util.locToIndex(n,h,p),s=t.slice(-f);y.forEach((e=>s[e]=0));const c=r.util.locToIndex(s,f,m);d[_]=e(a[o],i[c])}return[d,s]}}},12725:(e,t,n)=>{"use strict";n.r(t),n.d(t,{binaryKernelFunc:()=>s,createComplexBinaryKernelImpl:()=>l});var r=n(66723),a=n(77551),i=n(40084),o=n(95227);function s(e,t,n,s){return null==n?({inputs:n,backend:i})=>{const{a:o,b:l}=n,u=i;(0,a.assertNotComplex)([o,l],e);const c=u.data.get(o.dataId).values,d=u.data.get(l.dataId).values,h="string"===o.dtype?r.backend_util.fromUint8ToStringArray(c):c,f="string"===o.dtype?r.backend_util.fromUint8ToStringArray(d):d,p=s||o.dtype,[m,g]=t(o.shape,l.shape,h,f,p);return u.makeTensorInfo(g,p,m)}:({inputs:e,backend:r})=>{const{a:a,b:l}=e,u=r;if("complex64"===a.dtype||"complex64"===l.dtype){const e=(0,i.cast)({inputs:{x:a},backend:u,attrs:{dtype:"complex64"}}),t=u.data.get(e.dataId),r=t.complexTensorInfos.real,s=t.complexTensorInfos.imag,c=u.data.get(r.dataId).values,d=u.data.get(s.dataId).values,h=(0,i.cast)({inputs:{x:l},backend:u,attrs:{dtype:"complex64"}}),f=u.data.get(h.dataId),p=f.complexTensorInfos.real,m=f.complexTensorInfos.imag,g=u.data.get(p.dataId).values,y=u.data.get(m.dataId).values,[_,b,v]=n(a.shape,l.shape,c,d,g,y),w=u.makeTensorInfo(v,"float32",_),F=u.makeTensorInfo(v,"float32",b),k=(0,o.complex)({inputs:{real:w,imag:F},backend:u});return u.disposeIntermediateTensorInfo(e),u.disposeIntermediateTensorInfo(h),u.disposeIntermediateTensorInfo(w),u.disposeIntermediateTensorInfo(F),k}{const e=u.data.get(a.dataId).values,n=u.data.get(l.dataId).values,r=s||a.dtype,[i,o]=t(a.shape,l.shape,e,n,r);return u.makeTensorInfo(o,r,i)}}}function l(e){return(t,n,a,i,o,s)=>{const l=r.backend_util.assertAndGetBroadcastShape(t,n),u=r.util.sizeFromShape(l),c=l.length,d=r.util.computeStrides(l),h=r.util.getTypedArrayFromDType("float32",u),f=r.util.getTypedArrayFromDType("float32",u),p=r.backend_util.getBroadcastDims(t,l),m=r.backend_util.getBroadcastDims(n,l),g=r.backend_util.mergeRealAndImagArrays(a,i),y=r.backend_util.mergeRealAndImagArrays(o,s),_=t.length,b=r.util.computeStrides(t),v=n.length,w=r.util.computeStrides(n);if(p.length+m.length===0)for(let r=0;rn[e]=0));const a=r.util.locToIndex(n,_,b),i=t.slice(-v);m.forEach((e=>i[e]=0));const o=r.util.locToIndex(i,v,w),s=e(g[2*a],g[2*a+1],y[2*o],y[2*o+1]);h[F]=s.real,f[F]=s.imag}return[h,f,l]}}},55404:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createSimpleUnaryImpl:()=>a});var r=n(66723);function a(e){return(t,n,a)=>{const i=r.util.getArrayFromDType(n,t.length);for(let r=0;r{"use strict";n.r(t),n.d(t,{unaryKernelFunc:()=>o,unaryKernelFuncFromImpl:()=>s});var r=n(66723),a=n(77551),i=n(55404);function o(e,t,n){return s(e,(0,i.createSimpleUnaryImpl)(t),n)}function s(e,t,n){return({inputs:i,attrs:o,backend:s})=>{const{x:l}=i;(0,a.assertNotComplex)(l,e);const u=s,c=u.data.get(l.dataId).values;let d;if("string"===l.dtype){if(!Array.isArray(c))throw new Error("String tensor's value was not an instance of Array");d=r.backend_util.fromUint8ToStringArray(c)}else d=c;const h=n||l.dtype,f=t(d,h,o);return u.makeTensorInfo(l.shape,h,f)}}},59436:(e,t,n)=>{"use strict";n.r(t),n.d(t,{zeros:()=>i});var r=n(66723),a=n(95227);function i(e,t,n="float32"){if("complex64"===n){const n=i(e,t,"float32"),r=i(e,t,"float32");return(0,a.complex)({inputs:{real:n,imag:r},backend:e})}const o=r.util.makeZerosTypedArray(r.util.sizeFromShape(t),n);return e.makeTensorInfo(t,n,o)}},15819:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GPGPUContext:()=>mt,MathBackendWebGL:()=>On,forceHalfFloat:()=>Mn,gpgpu_util:()=>a,setWebGLContext:()=>l,version_webgl:()=>Pn,webgl:()=>Rn,webgl_util:()=>r});var r={};n.r(r),n.d(r,{assertNotComplex:()=>pe,bindCanvasToFramebuffer:()=>H,bindColorTextureToFramebuffer:()=>U,bindTextureToProgramUniformSampler:()=>z,bindTextureUnit:()=>N,bindVertexBufferToProgramAttribute:()=>L,callAndCheck:()=>y,canBeRepresented:()=>v,createFragmentShader:()=>x,createFramebuffer:()=>R,createProgram:()=>E,createStaticIndexBuffer:()=>I,createStaticVertexBuffer:()=>D,createTexture:()=>P,createVertexShader:()=>k,getBatchDim:()=>X,getExtensionOrThrow:()=>F,getFramebufferErrorMessage:()=>$,getMaxTexturesInShader:()=>oe,getNumChannels:()=>O,getProgramUniformLocation:()=>V,getProgramUniformLocationOrThrow:()=>j,getRowsCols:()=>K,getShapeAs3D:()=>J,getTextureShapeFromLogicalShape:()=>Z,getWebGLDisjointQueryTimerVersion:()=>se,getWebGLErrorMessage:()=>w,getWebGLMaxTextureSize:()=>re,hasExtension:()=>le,isCapableOfRenderingToFloatTexture:()=>ce,isDownloadFloatTextureEnabled:()=>de,isReshapeFree:()=>ee,isWebGLFenceEnabled:()=>fe,isWebGLVersionEnabled:()=>ue,linkProgram:()=>C,logShaderSourceAndInfoLog:()=>S,resetMaxTextureSize:()=>ae,resetMaxTexturesInShader:()=>ie,unbindColorTextureFromFramebuffer:()=>W,unbindTextureUnit:()=>B,validateFramebuffer:()=>q,validateProgram:()=>T,validateTextureSize:()=>M});var a={};n.r(a),n.d(a,{bindVertexProgramAttributeStreams:()=>st,createBufferFromOutputTexture:()=>ct,createFloat16MatrixTexture:()=>et,createFloat16PackedMatrixTexture:()=>ot,createFloat32MatrixTexture:()=>Ze,createIndexBuffer:()=>Xe,createPackedMatrixTexture:()=>at,createUnsignedBytesMatrixTexture:()=>nt,createVertexBuffer:()=>Ge,createVertexShader:()=>Ye,downloadByteEncodedFloatMatrixFromOutputTexture:()=>ht,downloadFloat32MatrixFromBuffer:()=>dt,downloadMatrixFromPackedOutputTexture:()=>pt,downloadPackedMatrixFromBuffer:()=>ft,getInternalFormatForFloat16MatrixTexture:()=>Qe,getInternalFormatForFloat16PackedMatrixTexture:()=>it,getInternalFormatForFloat32MatrixTexture:()=>Je,getInternalFormatForPackedMatrixTexture:()=>rt,getInternalFormatForUnsignedBytesMatrixTexture:()=>tt,uploadDenseMatrixToTexture:()=>lt,uploadPixelDataToTexture:()=>ut});var i=n(66723);const o={},s={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function l(e,t){o[e]=t}function u(e,t){if(!(e in o)||null!=t){const n=function(e,t){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");const n=null==t?function(e){if((0,i.env)().getBool("IS_SAFARI")||"undefined"===typeof OffscreenCanvas||2!==e){if("undefined"!==typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}return new OffscreenCanvas(300,150)}(e):t;n.addEventListener("webglcontextlost",(t=>{t.preventDefault(),delete o[e]}),!1),(0,i.env)().getBool("SOFTWARE_WEBGL_ENABLED")&&(s.failIfMajorPerformanceCaveat=!1);if(1===e)return n.getContext("webgl",s)||n.getContext("experimental-webgl",s);return n.getContext("webgl2",s)}(e,t);if(null===n)return console.log("Could not get context for WebGL version",e),null;o[e]=n}const n=o[e];return null==n||n.isContextLost()?(delete o[e],u(e)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),o[e])}var c,d,h;function f(e,t){return[t,e]}function p(e){const t=i.util.sizeFromShape(e),n=Math.ceil(t/4);return i.util.sizeToSquarishShape(n)}function m(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function g(e,t){const n=e;let r,a,o,s,l,u,c,d,h,f;return 2===(0,i.env)().getNumber("WEBGL_VERSION")?(r=n.R32F,a=n.R16F,o=n.RGBA16F,s=n.RGBA32F,l=n.RED,c=4,d=1,h=n.HALF_FLOAT,f=n.FLOAT,u=n.RGBA8):(r=e.RGBA,a=e.RGBA,o=e.RGBA,s=n.RGBA,l=e.RGBA,c=4,d=4,h=null!=t?t.HALF_FLOAT_OES:null,f=e.FLOAT,u=e.RGBA),{internalFormatFloat:r,internalFormatHalfFloat:a,internalFormatPackedHalfFloat:o,internalFormatPackedFloat:s,textureFormatFloat:l,downloadTextureFormat:u,downloadUnpackNumChannels:c,defaultNumChannels:d,textureTypeHalfFloat:h,textureTypeFloat:f}}function y(e,t){const n=t();return(0,i.env)().getBool("DEBUG")&&function(e){const t=e.getError();if(t!==e.NO_ERROR)throw new Error("WebGL Error: "+w(e,t))}(e),n}!function(e){e[e.DENSE=0]="DENSE",e[e.SHARED_BATCH=1]="SHARED_BATCH"}(c||(c={})),function(e){e[e.RENDER=0]="RENDER",e[e.UPLOAD=1]="UPLOAD",e[e.PIXELS=2]="PIXELS",e[e.DOWNLOAD=3]="DOWNLOAD"}(d||(d={})),function(e){e[e.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",e[e.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",e[e.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",e[e.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",e[e.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16"}(h||(h={}));const _=5.96e-8,b=65504;function v(e){return!!((0,i.env)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===e||_e.getExtension(t)),'Extension "'+t+'" not supported on this browser.')}function k(e,t){const n=Y(e,(()=>e.createShader(e.VERTEX_SHADER)),"Unable to create vertex WebGLShader.");if(y(e,(()=>e.shaderSource(n,t))),y(e,(()=>e.compileShader(n))),!1===e.getShaderParameter(n,e.COMPILE_STATUS))throw console.log(e.getShaderInfoLog(n)),new Error("Failed to compile vertex shader.");return n}function x(e,t){const n=Y(e,(()=>e.createShader(e.FRAGMENT_SHADER)),"Unable to create fragment WebGLShader.");if(y(e,(()=>e.shaderSource(n,t))),y(e,(()=>e.compileShader(n))),(0,i.env)().get("ENGINE_COMPILE_ONLY"))return n;if(!1===e.getShaderParameter(n,e.COMPILE_STATUS))throw S(t,e.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.");return n}const A=/ERROR: [0-9]+:([0-9]+):/g;function S(e,t){const n=A.exec(t);if(null==n)return console.log(`Couldn't parse line number in error: ${t}`),void console.log(e);const r=+n[1],a=e.split("\n"),o=a.length.toString().length+2,s=a.map(((e,t)=>i.util.rightPad((t+1).toString(),o)+e));let l=0;for(let i=0;ie.createProgram()),"Unable to create WebGLProgram.")}function C(e,t){if(y(e,(()=>e.linkProgram(t))),!(0,i.env)().get("ENGINE_COMPILE_ONLY")&&!1===e.getProgramParameter(t,e.LINK_STATUS))throw console.log(e.getProgramInfoLog(t)),new Error("Failed to link vertex and fragment shaders.")}function T(e,t){if(y(e,(()=>e.validateProgram(t))),!1===e.getProgramParameter(t,e.VALIDATE_STATUS))throw console.log(e.getProgramInfoLog(t)),new Error("Shader program validation failed.")}function D(e,t){const n=Y(e,(()=>e.createBuffer()),"Unable to create WebGLBuffer");return y(e,(()=>e.bindBuffer(e.ARRAY_BUFFER,n))),y(e,(()=>e.bufferData(e.ARRAY_BUFFER,t,e.STATIC_DRAW))),n}function I(e,t){const n=Y(e,(()=>e.createBuffer()),"Unable to create WebGLBuffer");return y(e,(()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n))),y(e,(()=>e.bufferData(e.ELEMENT_ARRAY_BUFFER,t,e.STATIC_DRAW))),n}function O(){return 2===(0,i.env)().getNumber("WEBGL_VERSION")?1:4}function P(e){return Y(e,(()=>e.createTexture()),"Unable to create WebGLTexture.")}function M(e,t){const n=(0,i.env)().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(e<=0||t<=0){throw new Error("Requested texture size "+`[${e}x${t}]`+" is invalid.")}if(e>n||t>n){throw new Error("Requested texture size "+`[${e}x${t}]`+" greater than WebGL maximum on this browser / GPU "+`[${n}x${n}]`+".")}}function R(e){return Y(e,(()=>e.createFramebuffer()),"Unable to create WebGLFramebuffer.")}function L(e,t,n,r,a,i,o){const s=e.getAttribLocation(t,n);return-1!==s&&(y(e,(()=>e.bindBuffer(e.ARRAY_BUFFER,r))),y(e,(()=>e.vertexAttribPointer(s,a,e.FLOAT,!1,i,o))),y(e,(()=>e.enableVertexAttribArray(s))),!0)}function N(e,t,n){G(e,n),y(e,(()=>e.activeTexture(e.TEXTURE0+n))),y(e,(()=>e.bindTexture(e.TEXTURE_2D,t)))}function B(e,t){G(e,t),y(e,(()=>e.activeTexture(e.TEXTURE0+t))),y(e,(()=>e.bindTexture(e.TEXTURE_2D,null)))}function j(e,t,n){return Y(e,(()=>e.getUniformLocation(t,n)),'uniform "'+n+'" not present in program.')}function V(e,t,n){return e.getUniformLocation(t,n)}function z(e,t,n,r){y(e,(()=>N(e,t,r))),y(e,(()=>e.uniform1i(n,r)))}function H(e){y(e,(()=>e.bindFramebuffer(e.FRAMEBUFFER,null))),y(e,(()=>e.viewport(0,0,e.canvas.width,e.canvas.height))),y(e,(()=>e.scissor(0,0,e.canvas.width,e.canvas.height)))}function U(e,t,n){y(e,(()=>e.bindFramebuffer(e.FRAMEBUFFER,n))),y(e,(()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)))}function W(e,t){y(e,(()=>e.bindFramebuffer(e.FRAMEBUFFER,t))),y(e,(()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0)))}function q(e){const t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+$(e,t))}function $(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return`unknown error ${t}`}}function Y(e,t,n){const r=y(e,(()=>t()));if(null==r)throw new Error(n);return r}function G(e,t){const n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1,r=t+e.TEXTURE0;if(rn){throw new Error(`textureUnit must be in ${`[gl.TEXTURE0, gl.TEXTURE${n}]`}.`)}}function X(e,t=2){return i.util.sizeFromShape(e.slice(0,e.length-t))}function K(e){if(0===e.length)throw Error("Cannot get rows and columns of an empty shape array.");return[e.length>1?e[e.length-2]:1,e[e.length-1]]}function J(e){let t=[1,1,1];return 0===e.length||1===e.length&&1===e[0]||(t=[X(e),...K(e)]),t}function Z(e,t=!1){let n=(0,i.env)().getNumber("WEBGL_MAX_TEXTURE_SIZE"),r=(0,i.env)().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE");if(r===1/0&&(0,i.env)().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")&&(r=n/2),t&&(n*=2,r*=2,1===(e=e.map(((t,n)=>n>=e.length-2?i.util.nearestLargerEven(e[n]):e[n]))).length&&(e=[2,e[0]])),2!==e.length){const t=i.util.squeezeShape(e);e=t.newShape}let a=i.util.sizeFromShape(e),o=null;e.length<=1&&a<=n?o=[1,a]:2===e.length&&e[0]<=n&&e[1]<=n?o=e:3===e.length&&e[0]*e[1]<=n&&e[2]<=n?o=[e[0]*e[1],e[2]]:3===e.length&&e[0]<=n&&e[1]*e[2]<=n?o=[e[0],e[1]*e[2]]:4===e.length&&e[0]*e[1]*e[2]<=n&&e[3]<=n?o=[e[0]*e[1]*e[2],e[3]]:4===e.length&&e[0]<=n&&e[1]*e[2]*e[3]<=n&&(o=[e[0],e[1]*e[2]*e[3]]);const s=null!=o&&Math.max(...o)>r&&Math.min(...o)<=(t?2:1)&&Math.min(...o)>0;if(null==o||s)if(t){const t=X(e);let n=2,r=2;e.length&&([n,r]=K(e)),a=t*(n/2)*(r/2),o=i.util.sizeToSquarishShape(a).map((e=>2*e))}else o=i.util.sizeToSquarishShape(a);return o}function Q(e){return e%2===0}function ee(e,t){if(e=e.slice(-2),t=t.slice(-2),i.util.arraysEqual(e,t))return!0;if(!e.length||!t.length)return!0;if(0===e[0]||0===e[1]||0===t[0]||0===t[1])return!0;if(e.length!==t.length){const n=e[e.length-1],r=t[t.length-1];if(n===r)return!0;if(Q(n)&&Q(r)&&(1===e[0]||1===t[0]))return!0}return e[1]===t[1]&&Q(e[0])&&Q(t[0])}let te,ne;function re(e){if(null==te){const t=u(e);te=t.getParameter(t.MAX_TEXTURE_SIZE)}return te}function ae(){te=null}function ie(){ne=null}function oe(e){if(null==ne){const t=u(e);ne=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,ne)}function se(e){if(0===e)return 0;let t;const n=u(e);return t=le(n,"EXT_disjoint_timer_query_webgl2")&&2===e?2:le(n,"EXT_disjoint_timer_query")?1:0,t}function le(e,t){return null!=e.getExtension(t)}function ue(e){try{if(null!=u(e))return!0}catch(t){return console.log("Error when getting WebGL context: ",t),!1}return!1}function ce(e){if(0===e)return!1;const t=u(e);if(1===e){if(!le(t,"OES_texture_float"))return!1}else if(!le(t,"EXT_color_buffer_float"))return!1;return he(t)}function de(e){if(0===e)return!1;const t=u(e);if(1!==e){if(le(t,"EXT_color_buffer_float"))return he(t);const e="EXT_color_buffer_half_float";if(le(t,e)){const n=t.getExtension(e);return function(e,t){const n=g(e,t),r=e.createTexture();e.bindTexture(e.TEXTURE_2D,r);const a=1,i=1;e.texImage2D(e.TEXTURE_2D,0,n.internalFormatHalfFloat,a,i,0,n.textureFormatFloat,n.textureTypeHalfFloat,null);const o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,r,0);const s=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(r),e.deleteFramebuffer(o),s}(t,n)}return!1}if(!le(t,"OES_texture_float"))return!1;if(!le(t,"WEBGL_color_buffer_float"))return!1;return he(t)}function he(e){const t=g(e),n=e.createTexture();e.bindTexture(e.TEXTURE_2D,n);e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null);const r=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,r),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0);const a=e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE;return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(r),a}function fe(e){if(2!==e)return!1;return null!=u(e).fenceSync}function pe(e,t){Array.isArray(e)||(e=[e]),e.forEach((e=>{null!=e&&i.util.assert("complex64"!==e.dtype,(()=>`${t} does not support complex64 tensors in the WebGL backend.`))}))}const me=(0,i.env)();function ge(){let e,t,n,r,a,o,s,l,u,c;return 2===(0,i.env)().getNumber("WEBGL_VERSION")?(e="#version 300 es",t="in",n="out",r="in",a="texture",o="outputColor",s="out vec4 outputColor;",l=(0,i.env)().getBool("WEBGL2_ISNAN_CUSTOM")?"\n bool isnan_custom(float val) {\n uint floatToUint = floatBitsToUint(val);\n return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n }\n\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan_custom(val.x),\n isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n }\n\n #define isnan(value) isnan_custom(value)\n ":"",u="",c="\n #define round(value) newRound(value)\n int newRound(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 newRound(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "):(e="",t="attribute",n="varying",r="varying",a="texture2D",o="gl_FragColor",s="",l="\n #define isnan(value) isnan_custom(value)\n bool isnan_custom(float val) {\n return (val > 0. || val < 1. || val == 0.) ? false : true;\n }\n bvec4 isnan_custom(vec4 val) {\n return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n }\n ",u="\n uniform float INFINITY;\n\n bool isinf(float val) {\n return abs(val) == INFINITY;\n }\n bvec4 isinf(vec4 val) {\n return equal(abs(val), vec4(INFINITY));\n }\n ",c="\n int round(float value) {\n return int(floor(value + 0.5));\n }\n\n ivec4 round(vec4 value) {\n return ivec4(floor(value + vec4(0.5)));\n }\n "),{version:e,attribute:t,varyingVs:n,varyingFs:r,texture2D:a,output:o,defineOutput:s,defineSpecialNaN:l,defineSpecialInf:u,defineRound:c}}function ye(e,t,n="index"){const r=i.util.computeStrides(t);return r.map(((t,a)=>`${`int ${e[a]} = ${n} / ${t}`}; ${a===r.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * ${t}`:`index -= ${e[a]} * ${t}`};`)).join("")}function _e(e,t,n="index"){const r=i.util.computeStrides(t);return r.map(((t,a)=>`${`int ${e[a]} = ${n} / outShapeStrides[${a}]`}; ${a===r.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * outShapeStrides[${a}]`:`index -= ${e[a]} * outShapeStrides[${a}]`};`)).join("")}function be(e,t,n="index"){const r=function(e,t){const n=e.length,r=e.map((e=>`${t}[${e}]`)),a=new Array(n-1);a[n-2]=r[n-1];for(let i=n-3;i>=0;--i)a[i]=`(${a[i+1]} * ${r[i+1]})`;return a}(e.map(((e,t)=>t)),t);return r.map(((t,a)=>`${`int ${e[a]} = ${n} / ${r[a]}`}; ${a===r.length-1?`int ${e[a+1]} = ${n} - ${e[a]} * ${r[a]}`:`index -= ${e[a]} * ${r[a]}`};`)).join("")}function ve(e){const t=i.util.computeStrides(e).map((e=>e.toString()));return`\n int getFlatIndex(ivec3 coords) {\n return coords.x * ${t[0]} + coords.y * ${t[1]} + coords.z;\n }\n`}me.registerFlag("HAS_WEBGL",(()=>me.getNumber("WEBGL_VERSION")>0)),me.registerFlag("WEBGL_VERSION",(()=>ue(2)?2:ue(1)?1:0)),me.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",(()=>!1)),me.registerFlag("WEBGL_BUFFER_SUPPORTED",(()=>2===me.get("WEBGL_VERSION"))),me.registerFlag("WEBGL_CPU_FORWARD",(()=>!0)),me.registerFlag("WEBGL_FORCE_F16_TEXTURES",(()=>!1)),me.registerFlag("WEBGL_PACK",(()=>me.getBool("HAS_WEBGL"))),me.registerFlag("WEBGL_PACK_NORMALIZATION",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_CLIP",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_DEPTHWISECONV",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_REDUCE",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_LAZILY_UNPACK",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_CONV_IM2COL",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_PACK_CONV2DTRANSPOSE",(()=>me.getBool("WEBGL_PACK"))),me.registerFlag("WEBGL_MAX_TEXTURE_SIZE",(()=>re(me.getNumber("WEBGL_VERSION")))),me.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",(()=>oe(me.getNumber("WEBGL_VERSION")))),me.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",(()=>{const e=me.getNumber("WEBGL_VERSION");return 0===e?0:se(e)})),me.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",(()=>me.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0&&!i.device_util.isMobile())),me.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",(()=>ce(me.getNumber("WEBGL_VERSION")))),me.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",(()=>!me.getBool("WEBGL_FORCE_F16_TEXTURES")&&me.getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))),me.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",(()=>de(me.getNumber("WEBGL_VERSION")))),me.registerFlag("WEBGL_FENCE_API_ENABLED",(()=>fe(me.getNumber("WEBGL_VERSION")))),me.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",(()=>me.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0)),me.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",(()=>-1),(e=>{if("number"!==typeof e)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be a number but got ${e}.`);if(e<0&&-1!==e)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${e}.`)})),me.registerFlag("WEBGL_FLUSH_THRESHOLD",(()=>i.device_util.isMobile()?1:-1),(e=>{if("number"!==typeof e)throw new Error(`WEBGL_FLUSH_THRESHOLD must be a number but got ${e}.`);if(e<0&&-1!==e)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${e}.`)})),me.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",(()=>128)),me.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",(()=>!1)),me.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",(()=>1e5)),me.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",(()=>128)),me.registerFlag("WEBGL_EXP_CONV",(()=>!1)),me.registerFlag("SOFTWARE_WEBGL_ENABLED",(()=>me.getBool("IS_TEST"))),me.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE",(()=>1/0)),me.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE",(()=>!1)),me.registerFlag("WEBGL2_ISNAN_CUSTOM",(()=>!1)),me.registerFlag("ENGINE_COMPILE_ONLY",(()=>!1));const we="\n const float FLOAT_MAX = 1.70141184e38;\n const float FLOAT_MIN = 1.17549435e-38;\n\n lowp vec4 encode_float(highp float v) {\n if (isnan(v)) {\n return vec4(255, 255, 255, 255);\n }\n\n highp float av = abs(v);\n\n if(av < FLOAT_MIN) {\n return vec4(0.0, 0.0, 0.0, 0.0);\n } else if(v > FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n } else if(v < -FLOAT_MAX) {\n return vec4(0.0, 0.0, 128.0, 255.0) / 255.0;\n }\n\n highp vec4 c = vec4(0,0,0,0);\n\n highp float e = floor(log2(av));\n highp float m = exp2(fract(log2(av))) - 1.0;\n\n c[2] = floor(128.0 * m);\n m -= c[2] / 128.0;\n c[1] = floor(32768.0 * m);\n m -= c[1] / 32768.0;\n c[0] = floor(8388608.0 * m);\n\n highp float ebias = e + 127.0;\n c[3] = floor(ebias / 2.0);\n ebias -= c[3] * 2.0;\n c[2] += floor(ebias) * 128.0;\n\n c[3] += 128.0 * step(0.0, -v);\n\n return c / 255.0;\n }\n",{getBroadcastDims:Fe}=i.backend_util;function ke(e,t,n){const r=[];if(e.forEach((e=>{const t=i.util.sizeFromShape(e.shapeInfo.logicalShape);if(e.shapeInfo.isUniform?r.push(`uniform float ${e.name}${t>1?`[${t}]`:""};`):(r.push(`uniform sampler2D ${e.name};`),r.push(`uniform int offset${e.name};`)),n.enableShapeUniforms){const{uniformShape:t}=Me(n.packedInputs,e.shapeInfo.logicalShape,e.shapeInfo.texShape);switch(t.length){case 1:r.push(`uniform int ${e.name}Shape;`);break;case 2:r.push(`uniform ivec2 ${e.name}Shape;`);break;case 3:r.push(`uniform ivec3 ${e.name}Shape;`);break;case 4:r.push(`uniform ivec4 ${e.name}Shape;`)}r.push(`uniform ivec2 ${e.name}TexShape;`)}})),n.enableShapeUniforms){switch(t.logicalShape.length){case 1:r.push("uniform int outShape;");break;case 2:r.push("uniform ivec2 outShape;"),r.push("uniform int outShapeStrides;");break;case 3:r.push("uniform ivec3 outShape;"),r.push("uniform ivec2 outShapeStrides;");break;case 4:r.push("uniform ivec4 outShape;"),r.push("uniform ivec3 outShapeStrides;")}r.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach((e=>{r.push(`uniform ${e.type} ${e.name}${e.arrayIndex?`[${e.arrayIndex}]`:""};`)}));const a=r.join("\n"),o=e.map((e=>function(e,t,n=!1,r){let a="";a+=n?Ae(e,r):xe(e,r);const o=e.shapeInfo.logicalShape,s=t.logicalShape;o.length<=s.length&&(a+=n?function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),a="get"+r+"AtOutCoords",o=e.shapeInfo.logicalShape.length,s=t.logicalShape.length,l=Fe(e.shapeInfo.logicalShape,t.logicalShape),u=Pe(s),c=s-o;let d;const h=["x","y","z","w","u","v"];d=0===o?"":s<2&&l.length>=1?"coords = 0;":l.map((e=>`coords.${h[e+c]} = 0;`)).join("\n");let f="";f=s<2&&o>0?"coords":e.shapeInfo.logicalShape.map(((e,t)=>`coords.${h[t+c]}`)).join(", ");let p="return outputValue;";const m=1===i.util.sizeFromShape(e.shapeInfo.logicalShape),g=i.util.sizeFromShape(t.logicalShape),y=1===g;if(1!==o||m||y){if(m&&!y)p=1===s?"\n return vec4(outputValue.x, outputValue.x, 0., 0.);\n ":"\n return vec4(outputValue.x);\n ";else if(l.length){const e=o-2,t=o-1;l.indexOf(e)>-1&&l.indexOf(t)>-1?p="return vec4(outputValue.x);":l.indexOf(e)>-1?p="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":l.indexOf(t)>-1&&(p="return vec4(outputValue.xx, outputValue.zz);")}}else p="\n return vec4(outputValue.xy, outputValue.xy);\n ";return`\n vec4 ${a}() {\n ${u} coords = getOutputCoords();\n ${d}\n vec4 outputValue = get${r}(${f});\n ${p}\n }\n `}(e,t):function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),a="get"+r+"AtOutCoords",o=t.texShape,s=e.shapeInfo.texShape,l=e.shapeInfo.logicalShape.length,u=t.logicalShape.length;if(!e.shapeInfo.isUniform&&l===u&&null==e.shapeInfo.flatOffset&&i.util.arraysEqual(s,o))return`\n float ${a}() {\n return sampleTexture(${n}, resultUV);\n }\n `;const c=Pe(u),d=Fe(e.shapeInfo.logicalShape,t.logicalShape),h=u-l;let f;const p=["x","y","z","w","u","v"];f=0===l?"":u<2&&d.length>=1?"coords = 0;":d.map((e=>`coords.${p[e+h]} = 0;`)).join("\n");let m="";m=u<2&&l>0?"coords":e.shapeInfo.logicalShape.map(((e,t)=>`coords.${p[t+h]}`)).join(", ");return`\n float ${a}() {\n ${c} coords = getOutputCoords();\n ${f}\n return get${r}(${m});\n }\n `}(e,t));return a}(e,t,n.packedInputs,n.enableShapeUniforms))).join("\n"),s=t.texShape,l=ge(),u=function(e){return`\n float sampleTexture(sampler2D textureSampler, vec2 uv) {\n return ${e.texture2D}(textureSampler, uv).r;\n }\n `}(l);let c,d,h=function(e){const t=`${e.version}\n precision highp float;\n precision highp int;\n precision highp sampler2D;\n ${e.varyingFs} vec2 resultUV;\n ${e.defineOutput}\n const vec2 halfCR = vec2(0.5, 0.5);\n\n struct ivec5\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n };\n\n struct ivec6\n {\n int x;\n int y;\n int z;\n int w;\n int u;\n int v;\n };\n\n uniform float NAN;\n ${e.defineSpecialNaN}\n ${e.defineSpecialInf}\n ${e.defineRound}\n\n int imod(int x, int y) {\n return x - y * (x / y);\n }\n\n int idiv(int a, int b, float sign) {\n int res = a / b;\n int mod = imod(a, b);\n if (sign < 0. && mod != 0) {\n res -= 1;\n }\n return res;\n }\n\n //Based on the work of Dave Hoskins\n //https://www.shadertoy.com/view/4djSRW\n #define HASHSCALE1 443.8975\n float random(float seed){\n vec2 p = resultUV * seed;\n vec3 p3 = fract(vec3(p.xyx) * HASHSCALE1);\n p3 += dot(p3, p3.yzx + 19.19);\n return fract((p3.x + p3.y) * p3.z);\n }\n\n ${Se}\n ${Ee}\n ${Ce}\n `;return t}(l);t.isPacked?(c=function(e,t,n){switch(e.length){case 0:return De();case 1:return function(e,t,n){const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(1===r[0])return n?"\n int getOutputCoords() {\n return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n }\n ":`\n int getOutputCoords() {\n return 2 * int(resultUV.x * ${r[1]}.0);\n }\n `;if(1===r[1])return n?"\n int getOutputCoords() {\n return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n }\n ":`\n int getOutputCoords() {\n return 2 * int(resultUV.y * ${r[0]}.0);\n }\n `;if(n)return"\n int getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n }\n ";return`\n int getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${r[0]}, ${r[1]}));\n return 2 * (resTexRC.x * ${r[1]} + resTexRC.y);\n }\n `}(0,t,n);case 2:return function(e,t,n){const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];if(i.util.arraysEqual(e,t))return n?"\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n }\n ":`\n ivec2 getOutputCoords() {\n return 2 * ivec2(resultUV.yx * vec2(${r[0]}, ${r[1]}));\n }\n `;const a=Math.ceil(e[1]/2);if(n)return"\n ivec2 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec2(r, c);\n }\n ";return`\n ivec2 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${r[0]}, ${r[1]}));\n\n int index = resTexRC.x * ${r[1]} + resTexRC.y;\n int r = 2 * (index / ${a});\n int c = imod(index, ${a}) * 2;\n\n return ivec2(r, c);\n }\n `}(e,t,n);case 3:return function(e,t,n){if(n)return"\n ivec3 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec3(b, r, c);\n }\n ";const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],a=Math.ceil(e[2]/2),i=a*Math.ceil(e[1]/2);return`\n ivec3 getOutputCoords() {\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(${r[0]}, ${r[1]}));\n int index = resTexRC.x * ${r[1]} + resTexRC.y;\n\n int b = index / ${i};\n index -= b * ${i};\n\n int r = 2 * (index / ${a});\n int c = imod(index, ${a}) * 2;\n\n return ivec3(b, r, c);\n }\n `}(e,t,n);default:return function(e,t,n){if(n)return"\n ivec4 getOutputCoords() {\n ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n ivec2 resTexRC = ivec2(resultUV.yx *\n vec2(packedTexShape[0], packedTexShape[1]));\n int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n int texelsInBatchN = texelsInBatch * outShape[1];\n\n int b2 = index / texelsInBatchN;\n index -= b2 * texelsInBatchN;\n\n int b = index / texelsInBatch;\n index -= b * texelsInBatch;\n\n int r = 2 * (index / texelsInLogicalRow);\n int c = imod(index, texelsInLogicalRow) * 2;\n\n return ivec4(b2, b, r, c);\n }\n ";const r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],a=Math.ceil(e[e.length-1]/2),i=a*Math.ceil(e[e.length-2]/2);let o=i,s="",l="b, r, c";for(let u=2;u1&&!i.util.arraysEqual(t,n)&&r.lengthe[t])).join(", ")}function Ne(e,t,n){const r=[],a=[];let o,s,l,u=null,c=null;c=e.getUniformLocation(n,"NAN",!1),1===(0,i.env)().getNumber("WEBGL_VERSION")&&(u=e.getUniformLocation(n,"INFINITY",!1));const d=!1;for(const i of t.variableNames){const a={name:i,uniform:e.getUniformLocation(n,i,d),offset:e.getUniformLocation(n,`offset${i}`,d)};t.enableShapeUniforms&&(a.shape=e.getUniformLocation(n,`${i}Shape`,d),a.texShape=e.getUniformLocation(n,`${i}TexShape`,d)),r.push(a)}if(t.enableShapeUniforms&&(o=e.getUniformLocation(n,"outShape",d),l=e.getUniformLocation(n,"outShapeStrides",d),s=e.getUniformLocation(n,"outTexShape",d)),t.customUniforms)for(const i of t.customUniforms)a.push(e.getUniformLocation(n,i.name,d));return{variablesLocations:r,customUniformLocations:a,infLoc:u,nanLoc:c,outShapeLocation:o,outShapeStridesLocation:l,outTexShapeLocation:s}}function Be(e,t){if(e.length!==t.length)throw Error(`Binary was compiled with ${e.length} inputs, but was executed with ${t.length} inputs`);e.forEach(((e,n)=>{const r=e.logicalShape,a=t[n],o=a.shape;if(!i.util.arraysEqual(r,o))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${r} and ${o} must match`);if(e.isUniform&&a.isUniform)return;const s=e.texShape,l=a.isUniform?null:a.texData.texShape;if(!i.util.arraysEqual(s,l))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${s} and ${l} must match`)}))}function je(e){return(0,i.env)().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&e<=4}class Ve{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=c.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const t=ge();this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length),this.userCode=`\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms?_e(["r","c","d"],e):ye(["r","c","d"],e)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getA(rc.x, rc.y, rc.z);\n }\n\n ${t.output} = result;\n }\n `}}class ze{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=c.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];const t=ge();this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length),this.userCode=`\n ivec3 outCoordsFromFlatIndex(int index) {\n ${this.enableShapeUniforms?_e(["r","c","d"],e):ye(["r","c","d"],e)}\n return ivec3(r, c, d);\n }\n\n void main() {\n ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n vec4 result = vec4(0.);\n\n for (int i=0; i<4; i++) {\n int flatIndex = index + i;\n ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n }\n\n ${t.output} = result;\n }\n `}}class He{constructor(e){this.variableNames=["A"],this.outTexUsage=d.DOWNLOAD;const t=ge();this.outputShape=e,this.userCode=`\n ${we}\n\n void main() {\n float x = getAAtOutCoords();\n ${t.output} = encode_float(x);\n }\n `}}class Ue{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=d.DOWNLOAD;const t=ge();this.outputShape=e,this.userCode=`\n ${we}\n\n void main() {\n ivec3 coords = getOutputCoords();\n float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n ${t.output} = encode_float(x);\n }\n `}}const We={R:0,G:1,B:2,A:3};class qe{constructor(e,t=!1,n="RGBA"){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];const r=ge();this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length);let a="result";t&&(a="floor(result * 255. + 0.5)");let i="";for(let o=0;oe.bindTexture(l,s))),y(e,(()=>e.texParameteri(l,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE))),y(e,(()=>e.texParameteri(l,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE))),y(e,(()=>e.texParameteri(l,e.TEXTURE_MIN_FILTER,e.NEAREST))),y(e,(()=>e.texParameteri(l,e.TEXTURE_MAG_FILTER,e.NEAREST))),1===(0,i.env)().getNumber("WEBGL_VERSION")?y(e,(()=>e.texImage2D(l,0,r,t,n,0,a,o,null))):y(e,(()=>e.texStorage2D(l,1,r,t,n))),y(e,(()=>e.bindTexture(e.TEXTURE_2D,null))),{texture:s,texShape:[n,t]}}function Je(e){return e.internalFormatFloat}function Ze(e,t,n,r){const[a,i]=f(t,n);return Ke(e,a,i,Je(r),r.textureFormatFloat,e.FLOAT)}function Qe(e){return e.internalFormatHalfFloat}function et(e,t,n,r){const[a,i]=f(t,n);return Ke(e,a,i,Qe(r),r.textureFormatFloat,r.textureTypeHalfFloat)}function tt(e){return e.downloadTextureFormat}function nt(e,t,n,r){const[a,i]=f(t,n);return Ke(e,a,i,tt(r),e.RGBA,e.UNSIGNED_BYTE)}function rt(e){return e.internalFormatPackedFloat}function at(e,t,n,r){const[a,i]=m(t,n);return Ke(e,a,i,rt(r),e.RGBA,e.FLOAT)}function it(e){return e.internalFormatPackedHalfFloat}function ot(e,t,n,r){const[a,i]=m(t,n);return Ke(e,a,i,it(r),e.RGBA,r.textureTypeHalfFloat)}function st(e,t,n){y(e,(()=>e.bindBuffer(e.ARRAY_BUFFER,n)));return L(e,t,"clipSpacePos",n,3,20,0)&&L(e,t,"uv",n,2,20,12)}function lt(e,t,n,r,a,o){let s,l,u;y(e,(()=>e.bindTexture(e.TEXTURE_2D,t))),a instanceof Uint8Array?(s=new Uint8Array(n*r*4),l=e.UNSIGNED_BYTE,u=e.RGBA):(s=new Float32Array(n*r*4),l=e.FLOAT,u=o.internalFormatPackedFloat),s.set(a),2===(0,i.env)().getNumber("WEBGL_VERSION")?y(e,(()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n,r,e.RGBA,l,s))):y(e,(()=>e.texImage2D(e.TEXTURE_2D,0,u,n,r,0,e.RGBA,l,s))),y(e,(()=>e.bindTexture(e.TEXTURE_2D,null)))}function ut(e,t,n){y(e,(()=>e.bindTexture(e.TEXTURE_2D,t))),n.data instanceof Uint8Array?2===(0,i.env)().getNumber("WEBGL_VERSION")?y(e,(()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,n.width,n.height,e.RGBA,e.UNSIGNED_BYTE,n.data))):y(e,(()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,n.width,n.height,0,e.RGBA,e.UNSIGNED_BYTE,n.data))):2===(0,i.env)().getNumber("WEBGL_VERSION")?y(e,(()=>e.texSubImage2D(e.TEXTURE_2D,0,0,0,e.RGBA,e.UNSIGNED_BYTE,n))):y(e,(()=>e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,n))),y(e,(()=>e.bindTexture(e.TEXTURE_2D,null)))}function ct(e,t,n,r){const a=e.createBuffer();y(e,(()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,a)));const i=16*t*n;return y(e,(()=>e.bufferData(e.PIXEL_PACK_BUFFER,i,e.STREAM_READ))),y(e,(()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,0))),y(e,(()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,null))),a}function dt(e,t,n){const r=e,a=new Float32Array(n);return r.bindBuffer(r.PIXEL_PACK_BUFFER,t),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,a),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),a}function ht(e,t,n,r){const[a,i]=f(t,n),o=new Uint8Array(t*n*4);return y(e,(()=>e.readPixels(0,0,a,i,r.downloadTextureFormat,e.UNSIGNED_BYTE,o))),new Float32Array(o.buffer)}function ft(e,t,n,r,a,i,o,s){const l=e,u=new Float32Array(function(e,t){const[n,r]=m(e,t);return n*r*4}(i,o));return l.bindBuffer(l.PIXEL_PACK_BUFFER,t),l.getBufferSubData(l.PIXEL_PACK_BUFFER,0,u),l.bindBuffer(l.PIXEL_PACK_BUFFER,null),u}function pt(e,t,n){const r=new Float32Array(t*n*4);return y(e,(()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,r))),r}class mt{constructor(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.itemsToPoll=[];const t=(0,i.env)().getNumber("WEBGL_VERSION");if(null!=e?(this.gl=e,l(t,e)):this.gl=u(t),e=this.gl,2===(0,i.env)().getNumber("WEBGL_VERSION")){const t=e;this.createVertexArray=()=>y(t,(()=>t.createVertexArray())),this.bindVertexArray=e=>y(t,(()=>t.bindVertexArray(e))),this.deleteVertexArray=e=>y(t,(()=>t.deleteVertexArray(e))),this.getVertexArray=()=>y(t,(()=>t.getParameter(t.VERTEX_ARRAY_BINDING)))}else if(null!=e){const t=e.getExtension("OES_vertex_array_object");if(null==t)throw new Error("All WebGL1 implementations are expected to offer OES_vertex_array_object.");this.createVertexArray=()=>y(e,(()=>t.createVertexArrayOES())),this.bindVertexArray=n=>y(e,(()=>t.bindVertexArrayOES(n))),this.deleteVertexArray=n=>y(e,(()=>t.deleteVertexArrayOES(n))),this.getVertexArray=()=>y(e,(()=>e.getParameter(t.VERTEX_ARRAY_BINDING_OES)))}let n="WEBGL_color_buffer_float";const r="EXT_color_buffer_half_float";if(this.parallelCompilationExtension=this.gl.getExtension("KHR_parallel_shader_compile"),1===(0,i.env)().getNumber("WEBGL_VERSION")){const e="OES_texture_float",t="OES_texture_half_float";if(this.textureFloatExtension=F(this.gl,e),le(this.gl,t))this.textureHalfFloatExtension=F(this.gl,t);else if((0,i.env)().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support half float textures, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.");if(this.colorBufferFloatExtension=this.gl.getExtension(n),le(this.gl,r))this.colorBufferHalfFloatExtension=F(this.gl,r);else if((0,i.env)().get("WEBGL_FORCE_F16_TEXTURES"))throw new Error("GL context does not support color renderable half floats, yet the environment flag WEBGL_FORCE_F16_TEXTURES is set to true.")}else if(n="EXT_color_buffer_float",le(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!le(this.gl,r))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension(r)}this.vertexBuffer=Ge(this.gl),this.indexBuffer=Xe(this.gl),this.framebuffer=R(this.gl),this.textureConfig=g(this.gl,this.textureHalfFloatExtension)}get debug(){return(0,i.env)().getBool("DEBUG")}dispose(){if(this.disposed)return;null!=this.program&&console.warn("Disposing a GPGPUContext that still has a bound WebGLProgram. This is probably a resource leak, delete the program with GPGPUContext.deleteProgram before disposing."),null!=this.outputTexture&&console.warn("Disposing a GPGPUContext that still has a bound output matrix texture. This is probably a resource leak, delete the output matrix texture with GPGPUContext.deleteMatrixTexture before disposing.");const e=this.gl;y(e,(()=>e.finish())),y(e,(()=>e.bindFramebuffer(e.FRAMEBUFFER,null))),y(e,(()=>e.deleteFramebuffer(this.framebuffer))),y(e,(()=>e.bindBuffer(e.ARRAY_BUFFER,null))),y(e,(()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null))),y(e,(()=>e.deleteBuffer(this.indexBuffer))),this.disposed=!0}createFloat32MatrixTexture(e,t){return this.throwIfDisposed(),Ze(this.gl,e,t,this.textureConfig)}createFloat16MatrixTexture(e,t){return this.throwIfDisposed(),et(this.gl,e,t,this.textureConfig)}createUnsignedBytesMatrixTexture(e,t){return this.throwIfDisposed(),nt(this.gl,e,t,this.textureConfig)}uploadPixelDataToTexture(e,t){this.throwIfDisposed(),ut(this.gl,e,t)}uploadDenseMatrixToTexture(e,t,n,r){this.throwIfDisposed(),lt(this.gl,e,t,n,r,this.textureConfig)}createFloat16PackedMatrixTexture(e,t){return this.throwIfDisposed(),ot(this.gl,e,t,this.textureConfig)}createPackedMatrixTexture(e,t){return this.throwIfDisposed(),at(this.gl,e,t,this.textureConfig)}deleteMatrixTexture(e){this.throwIfDisposed(),this.outputTexture===e&&(W(this.gl,this.framebuffer),this.outputTexture=null),y(this.gl,(()=>this.gl.deleteTexture(e)))}downloadByteEncodedFloatMatrixFromOutputTexture(e,t,n){return this.downloadMatrixDriver(e,(()=>ht(this.gl,t,n,this.textureConfig)))}downloadPackedMatrixFromBuffer(e,t,n,r,a,i){return ft(this.gl,e,0,0,0,a,i,this.textureConfig)}downloadFloat32MatrixFromBuffer(e,t){return dt(this.gl,e,t)}createBufferFromTexture(e,t,n){this.bindTextureToFrameBuffer(e);const r=ct(this.gl,t,n,this.textureConfig);return this.unbindTextureToFrameBuffer(),r}createAndWaitForFence(){const e=this.createFence(this.gl);return this.pollFence(e)}createFence(e){let t,n;if((0,i.env)().getBool("WEBGL_FENCE_API_ENABLED")){const r=e,a=r.fenceSync(r.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=()=>{const e=r.clientWaitSync(a,0,0);return e===r.ALREADY_SIGNALED||e===r.CONDITION_SATISFIED},t=a}else(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")>0?(t=this.beginQuery(),this.endQuery(),n=()=>this.isQueryAvailable(t,(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):n=()=>!0;return{query:t,isFencePassed:n}}downloadMatrixFromPackedTexture(e,t,n){return this.downloadMatrixDriver(e,(()=>pt(this.gl,t,n)))}createProgram(e){this.throwIfDisposed();const t=this.gl;null==this.vertexShader&&(this.vertexShader=Ye(t));const n=E(t);y(t,(()=>t.attachShader(n,this.vertexShader))),y(t,(()=>t.attachShader(n,e))),C(t,n);const r=Object.assign(n,{vao:this.createVertexArray()});return this.debug&&T(t,r),r}buildVao(e){this.setProgram(e),this.bindVertexArray(e.vao);const t=this.gl;y(t,(()=>t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer))),st(t,e,this.vertexBuffer)}deleteProgram(e){this.throwIfDisposed(),e===this.program&&(this.program=null),null!=e&&(y(this.gl,(()=>this.gl.deleteProgram(e))),this.deleteVertexArray(e.vao))}setProgram(e){this.throwIfDisposed(),this.program=e,null!=this.program&&this.debug&&T(this.gl,this.program),y(this.gl,(()=>this.gl.useProgram(e)))}getUniformLocation(e,t,n=!0){return this.throwIfDisposed(),n?j(this.gl,e,t):V(this.gl,e,t)}getAttributeLocation(e,t){return this.throwIfDisposed(),y(this.gl,(()=>this.gl.getAttribLocation(e,t)))}getUniformLocationNoThrow(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)}setInputMatrixTexture(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),z(this.gl,e,t,n)}setOutputMatrixTexture(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)}setOutputPackedMatrixTexture(e,t,n){this.throwIfDisposed();const[r,a]=m(t,n);this.setOutputMatrixTextureDriver(e,r,a)}setOutputMatrixWriteRegion(e,t,n,r){this.setOutputMatrixWriteRegionDriver(n,e,r,t)}setOutputPackedMatrixWriteRegion(e,t,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){null!=this.program&&T(this.gl,this.program),q(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();const e=this.gl;if(this.debug){const e=this.getVertexArray();console.assert(e===this.program.vao,"VAO changed between setProgram and executeProgram!"),this.debugValidate()}y(e,(()=>e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),y(this.gl,(()=>this.gl.finish()))}getQueryTimerExtension(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=F(this.gl,2===(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(2===(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2(),n=e.createQuery();return e.beginQuery(t.TIME_ELAPSED_EXT,n),n}const e=this.getQueryTimerExtensionWebGL1(),t=e.createQueryEXT();return e.beginQueryEXT(e.TIME_ELAPSED_EXT,t),t}endQuery(){if(2===(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2();return void e.endQuery(t.TIME_ELAPSED_EXT)}const e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}async waitForQueryAndGetTime(e){return await i.util.repeatedTry((()=>this.disposed||this.isQueryAvailable(e,(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")))),this.getQueryTime(e,(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(e,t){if(0===t)return null;if(2===t){const t=this.gl;return t.getQueryParameter(e,t.QUERY_RESULT)/1e6}{const t=this.getQueryTimerExtensionWebGL1();return t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(e,t){if(0===t)return!0;if(2===t){const t=this.gl,n=this.getQueryTimerExtensionWebGL2(),r=t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),r&&!this.disjoint}{const t=this.getQueryTimerExtensionWebGL1(),n=t.getQueryObjectEXT(e,t.QUERY_RESULT_AVAILABLE_EXT);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(t.GPU_DISJOINT_EXT)),n&&!this.disjoint}}pollFence(e){return new Promise((t=>{this.addItemToPoll((()=>e.isFencePassed()),(()=>t()))}))}pollItems(){const e=function(e){let t=0;for(;te.isDoneFn)));for(let t=0;t<=e;++t){const{resolveFn:e}=this.itemsToPoll[t];e()}this.itemsToPoll=this.itemsToPoll.slice(e+1)}addItemToPoll(e,t){if(this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),this.itemsToPoll.length>1)return;let n;"setTimeoutCustom"in(0,i.env)().platform&&(n=(0,i.env)().platform.setTimeoutCustom.bind((0,i.env)().platform)),i.util.repeatedTry((()=>(this.pollItems(),0===this.itemsToPoll.length)),(()=>0),null,n)}bindTextureToFrameBuffer(e){this.throwIfDisposed(),U(this.gl,e,this.framebuffer),this.debug&&q(this.gl)}unbindTextureToFrameBuffer(){null!=this.outputTexture?(U(this.gl,this.outputTexture,this.framebuffer),this.debug&&q(this.gl)):W(this.gl,this.framebuffer)}downloadMatrixDriver(e,t){this.bindTextureToFrameBuffer(e);const n=t();return this.unbindTextureToFrameBuffer(),n}setOutputMatrixTextureDriver(e,t,n){this.throwIfDisposed();const r=this.gl;U(r,e,this.framebuffer),this.debug&&q(r),this.outputTexture=e,y(r,(()=>r.viewport(0,0,t,n))),y(r,(()=>r.scissor(0,0,t,n)))}setOutputMatrixWriteRegionDriver(e,t,n,r){this.throwIfDisposed(),y(this.gl,(()=>this.gl.scissor(e,t,n,r)))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(null==this.program)throw new Error("No GPU program is currently set.")}}var gt=n(73577);const{addImpl:yt,bincountImpl:_t,bincountReduceImpl:bt,bitwiseAndImpl:vt,castImpl:wt,ceilImpl:Ft,concatImpl:kt,equalImpl:xt,expImpl:At,expm1Impl:St,floorImpl:Et,gatherNdImpl:Ct,gatherV2Impl:Tt,greaterImpl:Dt,greaterEqualImpl:It,lessImpl:Ot,lessEqualImpl:Pt,linSpaceImpl:Mt,logImpl:Rt,maxImpl:Lt,maximumImpl:Nt,minimumImpl:Bt,multiplyImpl:jt,negImpl:Vt,notEqualImpl:zt,prodImpl:Ht,raggedGatherImpl:Ut,raggedRangeImpl:Wt,raggedTensorToTensorImpl:qt,rangeImpl:$t,rsqrtImpl:Yt,scatterImpl:Gt,sigmoidImpl:Xt,simpleAbsImpl:Kt,sliceImpl:Jt,sparseFillEmptyRowsImpl:Zt,sparseReshapeImpl:Qt,sparseSegmentReductionImpl:en,sqrtImpl:tn,staticRegexReplaceImpl:nn,stridedSliceImpl:rn,stringNGramsImpl:an,stringSplitImpl:on,stringToHashBucketFastImpl:sn,subImpl:ln,tileImpl:un,topKImpl:cn,transposeImpl:dn,uniqueImpl:hn}=gt;function fn(e,t){return["x","y","z","w","u","v"].slice(0,t).map((t=>`${e}.${t}`))}function pn(e,t){return 1===t?[e]:fn(e,t)}class mn{constructor(e){if(this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.enableShapeUniforms=je(this.outputShape.length),0===this.rank)this.userCode="\n void main() {\n setOutput(vec4(getA(), 0., 0., 0.));\n }\n ";else{const e=pn("rc",this.rank),t=Pe(this.rank),n=this.getOutOfBoundsCondition(e),r=this.getSetup(e),a=this.getOutput(e);this.userCode=`\n void main() {\n ${t} rc = getOutputCoords();\n\n if(${n}) {\n setOutput(vec4(0));\n } else {\n ${r}\n\n setOutput(vec4(${a}));\n }\n }\n `}}getSourceCoordsArr(e){const t=[];for(let n=0;n<=1;n++)for(let r=0;r<=1;r++){let a=`${0===n?"r":"rp1"}, ${0===r?"c":"cp1"}`;for(let t=2;t ${this.enableShapeUniforms?"outShape":this.outputShape[0]}`;let t="";for(let n=this.rank-2;n= ${this.enableShapeUniforms?`outShape[${n}]`:this.outputShape[n]}`,n= ${n};\n bool rEdge = rp1 >= ${r};\n `}getOutput(e){const t=this.getSourceCoordsArr(e);if(1===this.rank){return`getA(rc), (rc + 1 >= ${this.enableShapeUniforms?"outShape":this.outputShape[0]} ? 0. : getA(rc + 1)), 0, 0`}return`getA(${t[0]}),\n cEdge ? 0. : getA(${t[1]}),\n rEdge ? 0. : getA(${t[2]}),\n rEdge || cEdge ? 0. : getA(${t[3]})`}}class gn{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length);let n="";for(let i=0;i<4;i++){let e="thisRC = rc;";i%2===1&&(e+="thisRC.z += 1;"),i>1&&(e+="thisRC.y += 1;"),n+=`\n ${e}\n ${i>0?"if(thisRC.y < rows && thisRC.z < cols){":""}\n int flatIndex = getFlatIndex(thisRC);\n\n ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n result[${i}] =\n getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n ${i>0?"}":""}\n `}var r,a;this.userCode=`\n ${r=t,a=this.enableShapeUniforms,`\n ivec3 inputCoordsFromReshapedOutCoords(int index) {\n ${a?be(["r","c","d"],"inputShape"):ye(["r","c","d"],r)}\n return ivec3(r, c, d);\n }\n `}\n ${this.enableShapeUniforms?"\n int getFlatIndex(ivec3 coords) {\n return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n }\n":ve(e)}\n\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0.);\n\n ivec3 thisRC;\n int rows = ${this.enableShapeUniforms?"outShape[1]":e[1]};\n int cols = ${this.enableShapeUniforms?"outShape[2]":e[2]};\n\n ${n}\n\n setOutput(result);\n }\n `}}class yn{constructor(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.usedTextures={},this.logEnabled=!1}acquireTexture(e,t,n){const r=bn(t,n),a=vn(e,r,n);a in this.freeTextures||(this.freeTextures[a]=[]),a in this.usedTextures||(this.usedTextures[a]=[]);const i=_n(e,r,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(this.freeTextures[a].length>0){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=i,this.log();const e=this.freeTextures[a].pop();return this.usedTextures[a].push(e),e}let o;return r===h.PACKED_2X2_FLOAT32?o=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):r===h.PACKED_2X2_FLOAT16?o=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):r===h.UNPACKED_FLOAT32?o=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):r===h.UNPACKED_FLOAT16?o=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):r===h.PACKED_4X1_UNSIGNED_BYTE&&(o=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[a].push(o),this.numUsedTextures++,this._numBytesAllocated+=i,this.log(),o}releaseTexture(e,t,n,r){if(null==this.freeTextures)return;const a=bn(n,r),o=vn(t,a,r);o in this.freeTextures||(this.freeTextures[o]=[]);const s=_n(t,a,this.gpgpu.gl,this.gpgpu.textureConfig,r),l=(0,i.env)().getNumber("WEBGL_DELETE_TEXTURE_THRESHOLD");-1!==l&&this._numBytesAllocated>l?(this.gpgpu.deleteMatrixTexture(e.texture),this._numBytesAllocated-=s):(this.freeTextures[o].push(e),this.numFreeTextures++,this._numBytesFree+=s),this.numUsedTextures--;const u=this.usedTextures[o],c=u&&u.indexOf(e);if(null==c||c<0)throw new Error("Cannot release a texture that was never provided by this texture manager");u[c]=u[u.length-1],u.pop(),this.log()}log(){if(!this.logEnabled)return;const e=this.numFreeTextures+this.numUsedTextures;console.log("Free/Used",`${this.numFreeTextures} / ${this.numUsedTextures}`,`(${e})`);const t=this._numBytesFree/this._numBytesAllocated;console.log(`Bytes allocated: ${this._numBytesAllocated}`),console.log(`Bytes unused: ${this._numBytesFree} (${Math.round(100*t)}%)`)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(null!=this.freeTextures){for(const e in this.freeTextures)this.freeTextures[e].forEach((e=>{this.gpgpu.deleteMatrixTexture(e.texture)}));for(const e in this.usedTextures)this.usedTextures[e].forEach((e=>{this.gpgpu.deleteMatrixTexture(e.texture)}));this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}}function _n(e,t,n,r,a){const i=function(e,t){switch(e){case h.PACKED_2X2_FLOAT32:return rt(t);case h.PACKED_2X2_FLOAT16:return it(t);case h.UNPACKED_FLOAT32:return Je(t);case h.UNPACKED_FLOAT16:return Qe(t);case h.PACKED_4X1_UNSIGNED_BYTE:return tt(t);default:throw new Error(`Unknown physical texture type ${e}`)}}(t,r);let o;if(a){const[t,n]=m(e[0],e[1]);o=t*n}else{const[t,n]=f(e[0],e[1]);o=t*n}const s=function(e,t){const n=e;if(t===n.R32F)return 4;if(t===n.R16F)return 2;if(t===n.RGBA32F)return 16;if(t===e.RGBA)return 16;if(t===n.RGBA16F)return 8;if(t===n.RGBA8)return 4;throw new Error(`Unknown internal format ${t}`)}(n,i);return o*s}function bn(e,t){if(e===d.UPLOAD)return h.PACKED_2X2_FLOAT32;if(e===d.RENDER||null==e)return function(e){return(0,i.env)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?e?h.PACKED_2X2_FLOAT32:h.UNPACKED_FLOAT32:e?h.PACKED_2X2_FLOAT16:h.UNPACKED_FLOAT16}(t);if(e===d.DOWNLOAD||e===d.PIXELS)return h.PACKED_4X1_UNSIGNED_BYTE;throw new Error(`Unknown logical texture type ${e}`)}function vn(e,t,n){return`${e[0]}_${e[1]}_${t}_${n}`}class wn{constructor(e,t){this.variableNames=["A"],this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length),this.userCode=`\n float unaryOperation(float x) {\n ${t}\n }\n\n void main() {\n float x = getAAtOutCoords();\n float y = unaryOperation(x);\n\n setOutput(y);\n }\n `}}const Fn="if (isnan(x)) return x;",kn="return abs(x);";const xn=Fn+"\n return (x < 0.0) ? 0.0 : x;\n",An=Fn+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",Sn="return x;";class En{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length),this.userCode=`\n vec4 unaryOperation(vec4 x) {\n ${t}\n }\n\n void main() {\n vec4 x = getAAtOutCoords();\n vec4 y = unaryOperation(x);\n\n setOutput(y);\n }\n `}}class Cn{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e,this.enableShapeUniforms=je(this.outputShape.length);const t=e.length,n=pn("rc",t),r=Pe(t),a=function(e,t){if(1===e)return"rc";let n="";for(let r=0;rt.push(e)))}const t=this.texData.get(e),{values:n,shape:r,slice:a,dtype:o,complexTensorInfos:s,isPacked:l}=t;if(null!=a){let t;t=l?new En(r,Sn):new wn(r,Sn);const n=this.runWebGLProgram(t,[{dataId:e,shape:r,dtype:o}],o),a=this.read(n.dataId);return this.disposeIntermediateTensorInfo(n),a}if(null!=n)return this.convertAndCacheOnCPU(e);if((0,i.env)().getBool("DEBUG")&&!(0,i.env)().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===(0,i.env)().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let u,c,d=null;if("complex64"!==o&&(0,i.env)().get("WEBGL_BUFFER_SUPPORTED")){u=this.decode(e);const t=this.texData.get(u.dataId);d=this.gpgpu.createBufferFromTexture(t.texture.texture,...p(r))}if(this.pendingRead.set(e,[]),"complex64"!==o&&await this.gpgpu.createAndWaitForFence(),"complex64"===o){const e=await Promise.all([this.read(s.real.dataId),this.read(s.imag.dataId)]),t=e[0],n=e[1];c=i.backend_util.mergeRealAndImagArrays(t,n)}else if(null==d)c=this.getValuesFromTexture(e);else{const e=i.util.sizeFromShape(r);c=this.gpgpu.downloadFloat32MatrixFromBuffer(d,e)}if(null!=u&&this.disposeIntermediateTensorInfo(u),null!=d){const e=this.gpgpu.gl;y(e,(()=>e.deleteBuffer(d)))}const h=this.convertAndCacheOnCPU(e,c),f=this.pendingRead.get(e);return this.pendingRead.delete(e),f.forEach((e=>e(h))),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e)&&(0,i.engine)().removeDataId(e,this),this.pendingDeletes--),h}readToGPU(e,t={}){const n=this.texData.get(e),{values:r,shape:a,slice:o,dtype:s,isPacked:l,texture:u}=n;if("complex64"===s)throw new Error("Does not support reading texture for complex64 dtype.");if(null!=o){let n;n=l?new En(a,Sn):new wn(a,Sn);const r=this.runWebGLProgram(n,[{dataId:e,shape:a,dtype:s}],s),i=this.readToGPU(r,t);return this.disposeIntermediateTensorInfo(r),i}if(null==u)throw null!=r?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");const c=this.decode(e,t.customTexShape),d=(0,i.engine)().makeTensorFromTensorInfo(c),h=this.texData.get(c.dataId);return Object.assign({tensorRef:d},h.texture)}bufferSync(e){const t=this.readSync(e.dataId);if("string"===e.dtype)try{const n=t.map((e=>i.util.decodeString(e)));return(0,i.buffer)(e.shape,e.dtype,n)}catch(n){throw new Error("Failed to decode encoded string bytes into utf-8")}return(0,i.buffer)(e.shape,e.dtype,t)}checkNumericalProblems(e){if(null!=e)for(let t=0;t0}time(e){const t=this.activeTimers,n=[];let r=!1;null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,e();const a=i.util.flatten(this.activeTimers.map((e=>e.query))).filter((e=>null!=e)),o=i.util.flatten(this.activeTimers.map((e=>e.name))).filter((e=>null!=e));this.activeTimers=t,r&&(this.programTimersStack=null);const s={uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null};return(async()=>{if((0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0){const e=await Promise.all(a);s.kernelMs=i.util.sum(e),s.getExtraProfileInfo=()=>e.map(((e,t)=>({name:o[t],ms:e}))).map((e=>`${e.name}: ${e.ms}`)).join(", ")}else s.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,s})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?this.gpgpu.beginQuery():{startMs:i.util.now(),endMs:null}}endTimer(e){return(0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0?(this.gpgpu.endQuery(),e):(e.endMs=i.util.now(),e)}async getQueryTime(e){if((0,i.env)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")>0)return this.gpgpu.waitForQueryAndGetTime(e);const t=e;return t.endMs-t.startMs}disposeData(e,t=!1){if(this.pendingDisposal.has(e))return!1;if(!this.texData.has(e))return!0;if(t?this.texData.get(e).refCount=0:this.texData.get(e).refCount--,!t&&this.texData.get(e).refCount>0)return!1;if(this.pendingRead.has(e))return this.pendingDisposal.add(e),this.pendingDeletes++,!1;this.releaseGPUData(e);const{complexTensorInfos:n}=this.texData.get(e);return null!=n&&(this.disposeData(n.real.dataId,t),this.disposeData(n.imag.dataId,t)),this.texData.delete(e),!0}releaseGPUData(e){const{texture:t,dtype:n,texShape:r,usage:a,isPacked:i,slice:o}=this.texData.get(e),s=o&&o.origDataId||e,l=this.dataRefCount.get(s);l>1?this.dataRefCount.set(s,l-1):(this.dataRefCount.delete(s),null!=t&&(this.numBytesInGPU-=this.computeBytes(r,n),this.textureManager.releaseTexture(t,r,a,i)));const u=this.texData.get(e);u.texture=null,u.texShape=null,u.isPacked=!1,u.slice=null}getTexture(e){return this.uploadToGPU(e),this.texData.get(e).texture.texture}getDataInfo(e){return this.texData.get(e)}shouldExecuteOnCPU(e,t=In){return(0,i.env)().getBool("WEBGL_CPU_FORWARD")&&e.every((e=>null==this.texData.get(e.dataId).texture&&i.util.sizeFromShape(e.shape)0&&i.util.isString(n[0])){const a=n.map((e=>i.util.encodeString(e)));r=this.write(a,e,t)}else r=this.write(n,e,t);return this.texData.get(r).usage=null,{dataId:r,shape:e,dtype:t}}makeOutput(e,t,n){return(0,i.engine)().makeTensorFromTensorInfo(this.makeTensorInfo(e,t,n),this)}unpackTensor(e){const t=new Cn(e.shape);return this.runWebGLProgram(t,[e],e.dtype)}packTensor(e){const t=new mn(e.shape);return this.runWebGLProgram(t,[e],e.dtype,null,!0)}packedReshape(e,t){const n=[X(e.shape),...K(e.shape)],r={dtype:e.dtype,shape:n,dataId:e.dataId},a=[X(t),...K(t)],i=new gn(a,n),o=[n],s=this.runWebGLProgram(i,[r],e.dtype,o,!0);return{dataId:s.dataId,shape:t,dtype:s.dtype}}decode(e,t){const n=this.texData.get(e),{isPacked:r,shape:a,dtype:o}=n;if(null!=t){const e=i.util.sizeFromShape(a),n=t[0]*t[1]*4;i.util.assert(e<=n,(()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data."))}const s=J(a);let l;l=r?new ze(s):new Ve(s);const u=[null!=t?t:p(s)];return{dtype:o,shape:a,dataId:this.runWebGLProgram(l,[{shape:s,dtype:o,dataId:e}],o,u,!0,t).dataId}}runWebGLProgram(e,t,n,r,a=!1,o){const s=this.makeTensorInfo(e.outputShape,n),l=this.texData.get(s.dataId);if(e.packedOutput&&(l.isPacked=!0),e.outPackingScheme===c.DENSE){const t=null!=o?o:p(e.outputShape);l.texShape=t.map((e=>2*e))}if(null!=e.outTexUsage&&(l.usage=e.outTexUsage),0===i.util.sizeFromShape(s.shape))return l.values=i.util.getTypedArrayFromDType(s.dtype,0),s;const u=[],d=t.map((t=>{if("complex64"===t.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let n=this.texData.get(t.dataId);if(null==n.texture){if(!e.packedInputs&&i.util.sizeFromShape(t.shape)<=(0,i.env)().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:t.shape,texData:null,isUniform:!0,uniformValues:n.values};e.packedInputs&&(n.isPacked=!0,n.shape=t.shape)}if(this.uploadToGPU(t.dataId),!!n.isPacked!==!!e.packedInputs)t=n.isPacked?this.unpackTensor(t):this.packTensor(t),u.push(t),n=this.texData.get(t.dataId);else if(n.isPacked&&!ee(n.shape,t.shape)){const e=t,r=t.shape;t.shape=n.shape,t=this.packedReshape(t,r),u.push(t),n=this.texData.get(t.dataId),e.shape=r}return{shape:t.shape,texData:n,isUniform:!1}}));this.uploadToGPU(s.dataId);const h={shape:s.shape,texData:l,isUniform:!1},f=function(e,t,n){let r="";t.concat(n).forEach((t=>{const a=null!=t.texData&&null!=t.texData.slice&&t.texData.slice.flatOffset>0;if(e.enableShapeUniforms&&!t.isUniform){const o=t.texData.texShape,{useSqueezeShape:s,uniformShape:l,keptDims:u}=Me(e.packedInputs,t.shape,o);let c="",d="",h="";if(1===l.length&&e.packedInputs){const e=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)];c=`${e[0]>1}_${e[1]>1}`}else if(2!==l.length||e.packedInputs){if(l.length>2&&!e.packedInputs){const e=i.util.computeStrides(l);h=`${e[0]===o[1]}_${e[e.length-1]===o[1]}`}}else d=`${l[0]>1}_${l[1]>1}`;const f=t.shape.length,p=2===l.length&&i.util.arraysEqual(t.shape,o),m=1===i.util.sizeFromShape(t.shape),g=i.backend_util.getBroadcastDims(t.shape,n.shape),y=!e.packedInputs&&f===n.shape.length&&i.util.arraysEqual(o,n.texData.texShape),_=e.packedInputs||l.length>2?"":`${o[0]>1}_${o[1]>1}`;r+=`${f}_${y}_${s?u:""}_${l.length}_${m}_${g}_${p}_${c}_${d}_${h}_${_}_${a}`}else{const e=t.isUniform?"uniform":t.texData.texShape;r+=`${t.shape}_${e}_${a}`}}));const a=e.userCode;let o=e.constructor.name;return o+="_"+r+"_"+a+`${(0,i.env)().getNumber("WEBGL_VERSION")}`,o}(e,d,h),m=this.getAndSaveBinary(f,(()=>function(e,t,n,r){const a=n.map(((e,n)=>{const r={logicalShape:e.shape,texShape:e.isUniform?null:e.texData.texShape,isUniform:e.isUniform,isPacked:!e.isUniform&&e.texData.isPacked,flatOffset:null};return null!=e.texData&&null!=e.texData.slice&&e.texData.slice.flatOffset>0&&(r.flatOffset=e.texData.slice.flatOffset),{name:t.variableNames[n],shapeInfo:r}})),o=a.map((e=>e.shapeInfo)),s={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},l=ke(a,s,t),u=x(e.gl,l),c=e.createProgram(u);return(0,i.env)().get("ENGINE_COMPILE_ONLY")?{program:t,fragmentShader:u,source:l,webGLProgram:c,inShapeInfos:o,outShapeInfo:s,variablesLocations:null,customUniformLocations:null,infLoc:null,nanLoc:null,outShapeLocation:null,outShapeStridesLocation:null,outTexShapeLocation:null}:(e.buildVao(c),Object.assign({program:t,fragmentShader:u,source:l,webGLProgram:c,inShapeInfos:o,outShapeInfo:s},Ne(e,t,c)))}(this.gpgpu,e,d,h))),g=null!=this.activeTimers;let y;g&&(y=this.startTimer()),(0,i.env)().get("ENGINE_COMPILE_ONLY")||function(e,t,n,r,a){t.program.enableShapeUniforms||(Be(t.inShapeInfos,n),Be([t.outShapeInfo],[r]));const o=r.texData.texture,s=r.texData.texShape;r.texData.isPacked?e.setOutputPackedMatrixTexture(o.texture,s[0],s[1]):e.setOutputMatrixTexture(o.texture,s[0],s[1]),e.setProgram(t.webGLProgram),e.bindVertexArray(t.webGLProgram.vao),1===(0,i.env)().getNumber("WEBGL_VERSION")&&null!==t.infLoc&&e.gl.uniform1f(t.infLoc,1/0),null!==t.nanLoc&&e.gl.uniform1f(t.nanLoc,NaN);for(let u=0;uthis.disposeIntermediateTensorInfo(e))),g&&(y=this.endTimer(y),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(y)}));const _=(0,i.env)().getNumber("WEBGL_FLUSH_THRESHOLD");if(_>0){const e=i.util.now();e-this.lastGlFlushTime>_&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=e)}if(!(0,i.env)().getBool("WEBGL_LAZILY_UNPACK")&&l.isPacked&&!1===a){const e=this.unpackTensor(s);return this.disposeIntermediateTensorInfo(s),e}return s}compileAndRun(e,t,n,r,a=!1){n=n||t[0].dtype;return this.runWebGLProgram(e,t,n,r,a)}getAndSaveBinary(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]}getTextureManager(){return this.textureManager}dispose(){if(!this.disposed){if(!(0,i.env)().getBool("IS_TEST")){Object.keys(this.binaryCache).forEach((e=>{this.gpgpu.deleteProgram(this.binaryCache[e].webGLProgram),delete this.binaryCache[e]}))}this.textureManager.dispose(),null!=this.canvas&&"undefined"!==typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0}}floatPrecision(){return null==this.floatPrecisionValue&&(this.floatPrecisionValue=(0,i.tidy)((()=>{if(!(0,i.env)().get("WEBGL_RENDER_FLOAT32_ENABLED")){const e=(0,i.env)().getBool("DEBUG");(0,i.env)().set("DEBUG",!1);const t=this.abs((0,i.scalar)(1e-8)).dataSync()[0];if((0,i.env)().set("DEBUG",e),t>0)return 32}return 16}))),this.floatPrecisionValue}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}uploadToGPU(e){const t=this.texData.get(e),{shape:n,dtype:r,values:a,texture:o,usage:s,isPacked:l}=t;if(null!=o)return;const u=null!=this.activeTimers;let c;u&&(c=i.util.now());let h=t.texShape;if(null==h&&(h=Z(n,l),t.texShape=h),null!=a){const e=J(n);let o,s=h[1],f=h[0];const p=a instanceof Uint8Array||a instanceof Uint8ClampedArray;!l&&p||([s,f]=m(h[0],h[1])),o=l?new $e(e,p):new qe(e,p);const g=p?[f,s]:h,y=this.makeTensorInfo(g,r),_=this.texData.get(y.dataId);_.usage=p?d.PIXELS:d.UPLOAD,_.texShape=g,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(y.dataId),s,f,a);const b=[[f,s]],v=!0,w=this.runWebGLProgram(o,[y],r,b,v),F=this.texData.get(w.dataId);t.texShape=F.texShape,t.isPacked=F.isPacked,t.usage=F.usage,(0,i.env)().get("ENGINE_COMPILE_ONLY")?this.disposeData(w.dataId):(t.texture=F.texture,t.values=null,this.texData.delete(w.dataId)),this.disposeIntermediateTensorInfo(y),u&&(this.uploadWaitMs+=i.util.now()-c)}else{const e=this.acquireTexture(h,s,r,l);t.texture=e}}convertAndCacheOnCPU(e,t){const n=this.texData.get(e),{dtype:r}=n;return null!=t&&(n.values=function(e,t){if("float32"===t||"complex64"===t)return e;if("int32"===t||"bool"===t){const n="int32"===t?new Int32Array(e.length):new Uint8Array(e.length);for(let t=0;t1024*this.numMBBeforeWarning*1024){const e=(this.numBytesInGPU/1024/1024).toFixed(2);this.warnedAboutMemory=!0,console.warn(`High memory usage in GPU: ${e} MB, most likely due to a memory leak`)}return this.textureManager.acquireTexture(e,t,r)}computeBytes(e,t){return e[0]*e[1]*i.util.bytesPerElement(t)}checkCompileCompletion(){for(const[,e]of Object.entries(this.binaryCache))this.checkCompletion_(e)}async checkCompileCompletionAsync(){const e=[];if(this.gpgpu.parallelCompilationExtension){for(const[,t]of Object.entries(this.binaryCache))e.push(this.checkCompletionAsync_(t));return Promise.all(e)}for(const[,t]of Object.entries(this.binaryCache)){const n=new Promise((e=>{try{this.checkCompletion_(t),e(!0)}catch(n){throw n}}));e.push(n)}return Promise.all(e)}async checkCompletionAsync_(e){return this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)?this.checkCompletion_(e):(await(0,i.nextFrame)(),this.checkCompletionAsync_(e))}checkCompletion_(e){if(!1===this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.gl.LINK_STATUS)){if(console.log(this.gpgpu.gl.getProgramInfoLog(e.webGLProgram)),!1===this.gpgpu.gl.getShaderParameter(e.fragmentShader,this.gpgpu.gl.COMPILE_STATUS))throw S(e.source,this.gpgpu.gl.getShaderInfoLog(e.fragmentShader)),new Error("Failed to compile fragment shader.");throw new Error("Failed to link vertex and fragment shaders.")}return!0}getUniformLocations(){for(const e of Object.values(this.binaryCache)){this.gpgpu.buildVao(e.webGLProgram);const{variablesLocations:t,customUniformLocations:n,infLoc:r,nanLoc:a,outShapeLocation:i,outShapeStridesLocation:o,outTexShapeLocation:s}=Ne(this.gpgpu,e.program,e.webGLProgram);e.variablesLocations=t,e.customUniformLocations=n,e.infLoc=r,e.nanLoc=a,e.outShapeLocation=i,e.outShapeStridesLocation=o,e.outTexShapeLocation=s}}createTensorFromGPUData(e,t,n){e.channels=e.channels||"RGBA";const{texture:r,height:a,width:o,channels:s}=e,l=(0,i.engine)().backend;if(!l.gpgpu.gl.isTexture(r))throw new Error("The texture is invalid. Also, please make sure the texture and the TFJS WebGL backend are using the same canvas. If you want to use your own custom canvas, you have to create and use the custom TFJS WebGL backend created from the canvas through 'new tf.MathBackendWebGL(customCanvas)'.");const u=l.writeTexture(r,t,n,a,o,s);return(0,i.engine)().makeTensorFromDataId(u,t,n,l)}}On.nextDataId=0;const Pn="4.22.0";function Mn(){(0,i.env)().set("WEBGL_FORCE_F16_TEXTURES",!0)}i.device_util.isBrowser()&&(0,i.registerBackend)("webgl",(()=>new On),2);const Rn={forceHalfFloat:Mn},Ln="\n if (isnan(a)) return a;\n if (isnan(b)) return b;\n";class Nn{constructor(e,t,n){this.variableNames=["A","B"],this.outputShape=i.backend_util.assertAndGetBroadcastShape(t,n),this.enableShapeUniforms=je(this.outputShape.length),this.userCode=`\n float binaryOperation(float a, float b) {\n ${e}\n }\n\n void main() {\n float a = getAAtOutCoords();\n float b = getBAtOutCoords();\n setOutput(binaryOperation(a, b));\n }\n `}}const Bn="\n result.r = isNaN.r ? NAN : result.r;\n result.g = isNaN.g ? NAN : result.g;\n result.b = isNaN.b ? NAN : result.b;\n result.a = isNaN.a ? NAN : result.a;\n";class jn{constructor(e,t,n,r=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=i.backend_util.assertAndGetBroadcastShape(t,n);const a=this.outputShape.length;this.enableShapeUniforms=je(a);let o="";if(r)if(0===a||1===i.util.sizeFromShape(this.outputShape))o="\n result.y = 0.;\n result.z = 0.;\n result.w = 0.;\n ";else{if(o=`\n ${Pe(a)} coords = getOutputCoords();\n `,1===a)this.enableShapeUniforms?o+="\n result.y = (coords + 1) >= outShape ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n ":o+=`\n result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n result.z = 0.;\n result.w = 0.;\n `;else{const e=pn("coords",a);this.enableShapeUniforms?o+=`\n bool nextRowOutOfBounds =\n (${e[a-2]} + 1) >= outShape[${a} - 2];\n bool nextColOutOfBounds =\n (${e[a-1]} + 1) >= outShape[${a} - 1];\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `:o+=`\n bool nextRowOutOfBounds =\n (${e[a-2]} + 1) >= ${this.outputShape[a-2]};\n bool nextColOutOfBounds =\n (${e[a-1]} + 1) >= ${this.outputShape[a-1]};\n result.y = nextColOutOfBounds ? 0. : result.y;\n result.z = nextRowOutOfBounds ? 0. : result.z;\n result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n `}}this.userCode=`\n vec4 binaryOperation(vec4 a, vec4 b) {\n ${e}\n }\n\n void main() {\n vec4 a = getAAtOutCoords();\n vec4 b = getBAtOutCoords();\n\n vec4 result = binaryOperation(a, b);\n ${o}\n\n setOutput(result);\n }\n `}}function Vn(e){const{inputs:t,backend:n}=e,{x:r}=t;return n.incRef(r.dataId),{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}const zn={kernelName:i.Identity,backendName:"webgl",kernelFunc:Vn};function Hn(e){const{inputs:t,backend:n}=e,{real:r,imag:a}=t,i=n.makeTensorInfo(r.shape,"complex64"),o=n.texData.get(i.dataId),s=Vn({inputs:{x:r},backend:n}),l=Vn({inputs:{x:a},backend:n});return o.complexTensorInfos={real:s,imag:l},i}const Un={kernelName:i.Complex,backendName:"webgl",kernelFunc:Hn},Wn="return (a < 0.) ? b * a : a;",qn="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";const $n={kernelName:i.LeakyRelu,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{alpha:o}=r,s=n.makeTensorInfo([],"float32",i.util.createScalarValue(o,"float32")),l=(0,i.env)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jn(qn,a.shape,s.shape):new Nn(Wn,a.shape,s.shape),u=n.runWebGLProgram(l,[a,s],"float32");return n.disposeIntermediateTensorInfo(s),u}},Yn="return (a < 0.) ? b * a : a;",Gn="\n vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";const Xn={kernelName:i.Prelu,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r,alpha:a}=t,o=(0,i.env)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jn(Gn,r.shape,a.shape):new Nn(Yn,r.shape,a.shape);return n.runWebGLProgram(o,[r,a],"float32")}},Kn="if (isnan(x)) return x;";function Jn({opSnippet:e,packedOpSnippet:t,cpuKernelImpl:n,dtype:r}){return({inputs:a,backend:o})=>{const{x:s}=a,l=o,u=r||s.dtype;if(l.shouldExecuteOnCPU([s])&&null!=n){const e=l.texData.get(s.dataId),t=n(e.values,u);return l.makeTensorInfo(s.shape,u,t)}let c;return c=(0,i.env)().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&null!=t?new En(s.shape,t):new wn(s.shape,e),l.runWebGLProgram(c,[s],u)}}function Zn({opSnippet:e,packedOpSnippet:t,checkOutOfBounds:n=!1,supportsComplex:r=!1,cpuKernelImpl:a,dtype:o}){return({inputs:s,backend:l})=>{const{a:u,b:c}=s,d=l;if(r&&"complex64"===u.dtype){const t=d.texData.get(u.dataId),n=d.texData.get(c.dataId),[r,a]=[[t.complexTensorInfos.real,n.complexTensorInfos.real],[t.complexTensorInfos.imag,n.complexTensorInfos.imag]].map((t=>{const[n,r]=t,a={dataId:n.dataId,dtype:n.dtype,shape:u.shape},o={dataId:r.dataId,dtype:r.dtype,shape:c.shape},s=new Nn(e,u.shape,c.shape);return d.runWebGLProgram(s,[a,o],(0,i.upcastType)(n.dtype,r.dtype))})),o=Hn({inputs:{real:r,imag:a},backend:d});return d.disposeIntermediateTensorInfo(r),d.disposeIntermediateTensorInfo(a),o}const h=o||(0,i.upcastType)(u.dtype,c.dtype);if(("string"===u.dtype||"string"===c.dtype||d.shouldExecuteOnCPU([u,c]))&&null!=a){const e=d.texData.get(u.dataId).values,t=d.texData.get(c.dataId).values,n="string"===u.dtype?i.backend_util.fromUint8ToStringArray(e):e,r="string"===u.dtype?i.backend_util.fromUint8ToStringArray(t):t,[o,s]=a(u.shape,c.shape,n,r,h),l=d.makeTensorInfo(s,h);return d.texData.get(l.dataId).values=o,l}let f;return f=(0,i.env)().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&null!=t?new jn(t,u.shape,c.shape,n):new Nn(e,u.shape,c.shape),d.runWebGLProgram(f,[u,c],h)}}function Qn(e,t=!1){if("linear"===e)return"return x;";if("relu"===e)return t?"\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n":xn;if("elu"===e)return t?"\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n":"return (x >= 0.0) ? x : (exp(x) - 1.0);";if("relu6"===e)return t?"\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n":An;if("prelu"===e)return t?Gn:Yn;if("leakyrelu"===e)return t?qn:Wn;if("sigmoid"===e)return"return 1.0 / (1.0 + exp(-1.0 * x));";throw new Error(`Activation ${e} has not been implemented for the WebGL backend.`)}class er{constructor(e,t,n,r=!1,a=!1,i=!1,o=null,s=!1,l=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=je(this.outputShape.length);const u=r?e[1]:e[2],c=Math.ceil(u/2),d=r?"i * 2, rc.y":"rc.y, i * 2",h=a?"rc.z, i * 2":"i * 2, rc.z",f=r?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],p=a?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"];let m="",g="";o&&(m=s?`vec4 activation(vec4 a) {\n vec4 b = getPreluActivationWeightsAtOutCoords();\n ${o}\n }`:l?`vec4 activation(vec4 a) {\n vec4 b = getLeakyreluAlphaAtOutCoords();\n ${o}\n }`:`vec4 activation(vec4 x) {\n ${o}\n }`,g="result = activation(result);");const y=i?"result += getBiasAtOutCoords();":"";i&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),l&&this.variableNames.push("leakyreluAlpha");let _="rc.x",b="rc.x";e[0]`The new shape (${u}) has ${c} elements and the old shape (${a.shape}) has ${l} elements. The new shape and old shape must have the same number of elements.`));const d=s.texData.get(a.dataId);return!d.isPacked||ee(a.shape,u)||null!==d.texture&&ee(d.shape,u)?(s.incRef(a.dataId),{dataId:a.dataId,shape:u,dtype:a.dtype}):function(e,t,n){const r=[X(e.shape),...K(e.shape)],a={dtype:e.dtype,shape:r,dataId:e.dataId},i=[X(t),...K(t)],o=new gn(i,r),s=[r],l=n.runWebGLProgram(o,[a],e.dtype,s,!0);return{dataId:l.dataId,shape:t,dtype:l.dtype}}(a,u,s)}const lr={kernelName:i.Reshape,backendName:"webgl",kernelFunc:sr};class ur{constructor(e,t){this.variableNames=["x"];const{windowSize:n,batchSize:r,inSize:a,outSize:o}=e;this.outputShape=[r,o];const s=4*Math.floor(n/4),l=n%4;let u="sumValue += dot(values, ones);";if(null!=t){const e=1/t;u=`sumValue += dot(values * ${i.util.isInt(e)?e.toPrecision(2):e}, ones);`}let c="";a%n>0&&(c=`\n if (inIdx < 0 || inIdx >= ${a}) {\n return 0.0;\n }\n `),this.userCode=`\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${c}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${n};\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${s}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${u}\n }\n\n int inIdx = inOffset + ${s};\n if (${1===l}) {\n vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n ${u}\n } else if (${2===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1), 0.0, 0.0);\n\n ${u}\n } else if (${3===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2), 0.0);\n\n ${u}\n }\n setOutput(sumValue);\n }\n `}}class cr{constructor(e,t){this.variableNames=["x"];const{windowSize:n,batchSize:r,inSize:a,outSize:i}=e;this.outputShape=[r,i];let o="0.0",s="";"prod"===t?o="1.0":"min"===t?(o="1.0 / 1e-20",s="min"):"max"===t&&(o="-1.0 / 1e-20",s="max");let l=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"sum"===t?l="sumValue":"prod"===t?l="prodValue":"all"===t?l="allValue":"any"===t&&(l="anyValue");const u=4*Math.floor(n/4),c=n%4;let d=`\n if (${"sum"===t}) {\n sumValue += dot(values, ones);\n } else if (${"prod"===t}) {\n vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n prodValue *= tmp[0] * tmp[1];\n } else {\n minMaxValue = ${s}(values, minMaxValue);\n if (${"min"===t} || ${"max"===t}) {\n minMaxValue = ${s}(values, minMaxValue);\n bvec4 isNaN = isnan(values);\n if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n minMaxValue = vec4(NAN);\n }\n }\n }\n `,h="vec4";"all"===t?(o="1.0",d="\n bool reducedAllValue = all(values);\n float floatedReducedAllValue = float(reducedAllValue);\n allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n ",h="bvec4"):"any"===t&&(o="0.0",d="\n bool reducedAnyValue = any(values);\n float floatedReducedAnyValue = float(reducedAnyValue);\n anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n ",h="bvec4");let f="";a%n>0&&(f=`\n if (inIdx < 0 || inIdx >= ${a}) {\n return initializationValue;\n }\n `),this.userCode=`\n const float initializationValue = ${o};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float getValue(int batch, int inIdx) {\n ${f}\n return getX(batch, inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${n};\n\n vec4 minMaxValue = vec4(${o});\n float prodValue = 1.0;\n float sumValue = 0.0;\n float allValue = 1.0;\n float anyValue = 0.0;\n\n for (int i = 0; i < ${u}; i += 4) {\n int inIdx = inOffset + i;\n ${h} values = ${h}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n ${d}\n }\n\n int inIdx = inOffset + ${u};\n if (${1===c}) {\n ${h} values = ${h}(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${d}\n } else if (${2===c}) {\n ${h} values = ${h}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n ${d}\n } else if (${3===c}) {\n ${h} values = ${h}(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n ${d}\n }\n setOutput(${l});\n }\n `}}function dr(e,t,n,r){const a=function(e){const t=[];for(;0===t.length||1!==t[t.length-1].outSize;){const n=t.length?t[t.length-1].outSize:e[1],r=i.backend_util.computeOptimalWindowSize(n);t.push({inSize:n,windowSize:r,outSize:Math.ceil(n/r)})}return t}(e.shape);let o=e;for(let i=0;i6)throw Error(`Transpose for rank ${t} is not yet supported`);const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(t);for(let a=0;a6)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);const r=Pe(this.rank),a=fn("rc",this.rank),i=new Array(this.rank);for(let u=0;u`Error in matMul: inner shapes (${h}) and (${f}) of Tensors with shapes ${e.shape} and ${t.shape} and transposeA=${n} and transposeB=${r} must match.`));const w=n?[_,h,p]:[_,p,h],F=r?[b,m,f]:[b,f,m],k=sr({inputs:{x:e},backend:a,attrs:{shape:w}}),x=sr({inputs:{x:t},backend:a,attrs:{shape:F}}),A=[k,x],S=Math.max(_,b),E=n?k.shape[1]:k.shape[2],C=null!=o,T=null!=s,D="leakyrelu"===u,I=null!=u?Qn(u,!0):null;let O;if((1===p||1===m)&&E>1e3&&!1===(C||T||D||null!=I)){let e=k,t=x;n&&(e=yr({inputs:{x:k},backend:a,attrs:{perm:[0,2,1]}}),A.push(e)),r&&(t=yr({inputs:{x:x},backend:a,attrs:{perm:[0,2,1]}}),A.push(t));const i=1===m;let o=e;1!==m&&(o=sr({inputs:{x:e},backend:a,attrs:{shape:[S,E,1]}}),A.push(o));const s=1===m?2:1;let l=t;i&&(l=sr({inputs:{x:t},backend:a,attrs:{shape:[S,1,E]}}),A.push(l));const u=ir({inputs:{a:o,b:l},backend:a});O=mr({inputs:{x:u},backend:a,attrs:{axis:s,keepDims:!0}}),A.push(u)}else{const u=(0,i.upcastType)(e.dtype,t.dtype),c=new er(w,F,[S,p,m],n,r,C,I,T,D),d=[k,x];if(null!=o&&d.push(o),T&&d.push(s),D){const e=a.makeTensorInfo([],"float32",i.util.createScalarValue(l,"float32"));d.push(e),A.push(e)}O=a.runWebGLProgram(c,d,u)}const P=sr({inputs:{x:O},backend:a,attrs:{shape:v}});A.push(O);for(const i of A)a.disposeIntermediateTensorInfo(i);return P}const vr={kernelName:i._FusedMatMul,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{a:a,b:i,bias:o,preluActivationWeights:s}=t,{transposeA:l,transposeB:u,activation:c,leakyreluAlpha:d}=r;return br({a:a,b:i,transposeA:l,transposeB:u,backend:n,bias:o,preluActivationWeights:s,leakyreluAlpha:d,activation:c})}},wr="return abs(x);";const Fr={kernelName:i.Abs,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t;if(n.shouldExecuteOnCPU([r])&&"complex64"!==r.dtype){const e=n.texData.get(r.dataId),t=Kt(e.values);return n.makeTensorInfo(r.shape,r.dtype,t)}let a;return a=(0,i.env)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new En(r.shape,wr):new wn(r.shape,wr),n.runWebGLProgram(a,[r],r.dtype)}},kr=Jn({opSnippet:Fn+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return acos(x);\n"}),xr={kernelName:i.Acos,backendName:"webgl",kernelFunc:kr},Ar=Jn({opSnippet:Fn+"\n if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));"}),Sr={kernelName:i.Acosh,backendName:"webgl",kernelFunc:Ar},Er="return a + b;",Cr=Zn({opSnippet:Er,packedOpSnippet:Er,supportsComplex:!0,cpuKernelImpl:yt}),Tr={kernelName:i.Add,backendName:"webgl",kernelFunc:Cr};class Dr{constructor(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map(((e,t)=>`T${t}`));const n=[];this.variableNames.forEach((e=>{n.push(`float v${e} = get${e}AtOutCoords();`)}));const r=this.variableNames.map((e=>`v${e}`)).join(" + ");this.userCode=`\n void main() {\n ${n.join("\n ")}\n\n float result = ${r};\n setOutput(result);\n }\n `}}class Ir{constructor(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map(((e,t)=>`T${t}`));const n=[];this.variableNames.forEach((e=>{n.push(`vec4 v${e} = get${e}AtOutCoords();`)}));const r=this.variableNames.map((e=>`v${e}`)).join(" + ");this.userCode=`\n void main() {\n ${n.join("\n ")}\n\n vec4 result = ${r};\n setOutput(result);\n }\n `}}const Or={kernelName:i.AddN,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t,a=n;if(1===a.length)return Vn({inputs:{x:a[0]},backend:r});if(a.length>(0,i.env)().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER")){const t=Math.floor(a.length/2),n=e({inputs:a.slice(0,t),backend:r}),i=e({inputs:a.slice(t),backend:r});return e({inputs:[n,i],backend:r})}const o=a.map((e=>e.dtype)).reduce(((e,t)=>(0,i.upcastType)(e,t))),s=a.map((e=>e.shape)),l=(0,i.env)().getBool("WEBGL_PACK")?new Ir(a[0].shape,s):new Dr(a[0].shape,s);return r.runWebGLProgram(l,a,o)}};const Pr={kernelName:i.All,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:o,keepDims:s}=r,l=a.shape.length,u=i.util.parseAxisParam(o,a.shape);let c=u;const d=i.backend_util.getAxesPermutation(c,l);let h=a;null!=d&&(h=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),c=i.backend_util.getInnerMostAxes(c.length,l)),i.backend_util.assertAxesAreInnerMostDims("all",c,l);const[f,p]=i.backend_util.computeOutAndReduceShapes(h.shape,c),m=sr({inputs:{x:h},backend:n,attrs:{shape:[-1,i.util.sizeFromShape(p)]}}),g=dr(m,m.dtype,"all",n);let y;if(s){y=sr({inputs:{x:g},backend:n,attrs:{shape:i.backend_util.expandShapeToKeepDim(f,u)}})}else y=sr({inputs:{x:g},backend:n,attrs:{shape:f}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),null!=d&&n.disposeIntermediateTensorInfo(h),y}};const Mr={kernelName:i.Any,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:o,keepDims:s}=r,l=a.shape.length,u=i.util.parseAxisParam(o,a.shape);let c=u;const d=i.backend_util.getAxesPermutation(c,l);let h=a;null!=d&&(h=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),c=i.backend_util.getInnerMostAxes(c.length,l)),i.backend_util.assertAxesAreInnerMostDims("any",c,l);const[f,p]=i.backend_util.computeOutAndReduceShapes(h.shape,c),m=sr({inputs:{x:h},backend:n,attrs:{shape:[-1,i.util.sizeFromShape(p)]}}),g=dr(m,m.dtype,"any",n);let y;if(s){y=sr({inputs:{x:g},backend:n,attrs:{shape:i.backend_util.expandShapeToKeepDim(f,u)}})}else y=sr({inputs:{x:g},backend:n,attrs:{shape:f}});return n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),null!=d&&n.disposeIntermediateTensorInfo(h),y}};class Rr{constructor(e,t,n){this.variableNames=["A"];const{windowSize:r,batchSize:a,outSize:i}=e;n||this.variableNames.push("bestIndicesA"),this.outputShape=[a,i];const o="max"===t?">":"<",s=n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));";this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = outIdx * ${r};\n\n int bestIndex = inOffset;\n float bestValue = getA(batch, bestIndex);\n\n for (int i = 0; i < ${r}; i++) {\n int inIdx = ${s};\n float candidate = getA(batch, inIdx);\n if (candidate ${o} bestValue) {\n bestValue = candidate;\n bestIndex = inIdx;\n }\n }\n setOutput(float(bestIndex));\n }\n `}}class Lr{constructor(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,i.util.assert(e.length>2,(()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`));const a=e[e.length-1],o=Math.ceil(a/t);this.outputShape=e.slice(0,-1),o>1&&this.outputShape.push(o),r||this.variableNames.push("bestIndicesA");const s=this.outputShape,l=s.length,u=Pe(l),c=pn("coords",l);let d,h;if(1===o){h=l+1;const e=Pe(h);d=`\n ${e} sourceLocR = ${e}(${c.join()}, 0);\n ++${c[l-1]};\n ${e} sourceLocG = ${e}(${c.join()}, 0);\n ++${c[l-2]};\n ${e} sourceLocA = ${e}(${c.join()}, 0);\n --${c[l-1]};\n ${e} sourceLocB = ${e}(${c.join()}, 0);\n --${c[l-2]};`}else h=l,d=`\n ${u} sourceLocR = coords;\n ++${c[l-1]};\n ${u} sourceLocG = coords;\n ++${c[l-2]};\n ${u} sourceLocA = coords;\n --${c[l-1]};\n ${u} sourceLocB = coords;\n --${c[l-2]};`;const f=["x","y","z","w","u","v"].slice(0,h),p="."+f[h-1],m=f.map((e=>"int "+e)),g=pn("sourceLocR",h-1).concat("inIdx.r"),y=pn("sourceLocG",h-1).concat("inIdx.g"),_=pn("sourceLocB",h-1).concat("inIdx.b"),b=pn("sourceLocA",h-1).concat("inIdx.a"),v="max"===n?"greaterThan":"lessThan",w=r?"":`\n inIdx = round(vec4(getBestIndicesAChannel(${g.join()}),\n getBestIndicesAChannel(${y.join()}),\n getBestIndicesAChannel(${_.join()}),\n getBestIndicesAChannel(${b.join()})));`,F=`vec4(\n getAChannel(${g.join()}),\n hasNextCol ? getAChannel(${y.join()}) : 0.,\n hasNextRow ? getAChannel(${_.join()}) : 0.,\n hasNextRow && hasNextCol ? getAChannel(${b.join()}) : 0.)`,k=r?"":`\n float getBestIndicesAChannel(${m.join()}) {\n return getChannel(getBestIndicesA(${f.join()}),\n vec2(${f.slice(-2).join()}));\n }`;this.userCode=`\n float getAChannel(${m.join()}) {\n return getChannel(getA(${f.join()}),\n vec2(${f.slice(-2).join()}));\n }\n ${k}\n void main() {\n ${u} coords = getOutputCoords();\n bool hasNextCol = ${c[l-1]} < ${s[l-1]-1};\n bool hasNextRow = ${c[l-2]} < ${s[l-2]-1};\n ${d}\n ivec4 srcIdx = ivec4(sourceLocR${p}, sourceLocG${p},\n sourceLocB${p}, sourceLocA${p}) * ${t};\n ivec4 inIdx = srcIdx;\n vec4 bestIndex = vec4(inIdx);\n vec4 bestValue = ${F};\n\n for (int i = 0; i < ${t}; i++) {\n inIdx = srcIdx;\n ${w}\n vec4 candidate = ${F};\n bvec4 nan = isnan(candidate);\n bvec4 replace = bvec4(\n vec4(${v}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n bestValue = vec4(replace.x ? candidate.x : bestValue.x,\n replace.y ? candidate.y : bestValue.y,\n replace.z ? candidate.z : bestValue.z,\n replace.w ? candidate.w : bestValue.w);\n bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n srcIdx++;\n }\n setOutput(bestIndex);\n }\n `}}function Nr(e,t,n,r=null){let a=t.shape[0],o=t.shape[1];null!=r&&(a=r.shape[0],o=r.shape[1]);const s=i.backend_util.computeOptimalWindowSize(o),l={windowSize:s,inSize:o,batchSize:a,outSize:Math.ceil(o/s)},u=new Rr(l,n,null==r),c=[t];null!=r&&c.push(r);const d=e.runWebGLProgram(u,c,"int32");if(1===d.shape[1])return d;const h=Nr(e,t,n,d);return e.disposeIntermediateTensorInfo(d),h}function Br(e,t,n,r=null){const a=null!=r?r.shape:t.shape,o=a[a.length-1],s=i.backend_util.computeOptimalWindowSize(o),l=new Lr(a,s,n,null==r),u=null==r?[t]:[t,r],c=e.runWebGLProgram(l,u,"int32");if(c.shape.length===t.shape.length){const r=Br(e,t,n,c);return e.disposeIntermediateTensorInfo(c),r}return c}function jr(e,t,n,r){const a=[n];if(i.backend_util.assertAxesAreInnerMostDims("arg"+r.charAt(0).toUpperCase()+r.slice(1),a,t.shape.length),!(0,i.env)().getBool("WEBGL_PACK_REDUCE")||t.shape.length<=2){const n=[],o=e.texData.get(t.dataId);let s=t;null!==o&&o.isPacked&&(s=e.unpackTensor(t),n.push(s));const[l,u]=i.backend_util.computeOutAndReduceShapes(s.shape,a),c=i.util.sizeFromShape(u),d=sr({inputs:{x:s},backend:e,attrs:{shape:[-1,c]}});n.push(d);const h=Nr(e,d,r);n.push(h);const f=sr({inputs:{x:h},backend:e,attrs:{shape:l}});return n.forEach((t=>e.disposeIntermediateTensorInfo(t))),f}return Br(e,t,r)}const Vr={kernelName:i.ArgMax,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:o}=r;let s=i.util.parseAxisParam(o,a.shape);const l=i.backend_util.getAxesPermutation(s,a.shape.length);let u=a;const c=[];null!=l&&(u=yr({inputs:{x:a},backend:n,attrs:{perm:l}}),c.push(u),s=i.backend_util.getInnerMostAxes(s.length,u.shape.length)),i.backend_util.assertAxesAreInnerMostDims("argMax",[s[0]],u.shape.length);const d=jr(n,u,s[0],"max");return c.forEach((e=>n.disposeIntermediateTensorInfo(e))),d}};const zr={kernelName:i.ArgMin,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:o}=r;let s=i.util.parseAxisParam(o,a.shape);const l=i.backend_util.getAxesPermutation(s,a.shape.length);let u=a;const c=[];null!=l&&(u=yr({inputs:{x:a},backend:n,attrs:{perm:l}}),c.push(u),s=i.backend_util.getInnerMostAxes(s.length,u.shape.length)),i.backend_util.assertAxesAreInnerMostDims("argMin",[s[0]],u.shape.length);const d=jr(n,u,s[0],"min");return c.forEach((e=>n.disposeIntermediateTensorInfo(e))),d}},Hr=Jn({opSnippet:Fn+"\n if (abs(x) > 1.) {\n return NAN;\n }\n return asin(x);\n"}),Ur={kernelName:i.Asin,backendName:"webgl",kernelFunc:Hr},Wr=Jn({opSnippet:Fn+"return log(x + sqrt(x * x + 1.0));"}),qr={kernelName:i.Asinh,backendName:"webgl",kernelFunc:Wr},$r=Jn({opSnippet:Fn+"\n return atan(x);\n"}),Yr={kernelName:i.Atan,backendName:"webgl",kernelFunc:$r},Gr=Zn({opSnippet:Ln+"\n return atan(a, b);\n",packedOpSnippet:"\n vec4 result = atan(a, b);\n bvec4 isNaNA = isnan(a);\n bvec4 isNaNB = isnan(b);\n bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n "+Bn+"\n return result;\n"}),Xr={kernelName:i.Atan2,backendName:"webgl",kernelFunc:Gr},Kr=Jn({opSnippet:Fn+"\n if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;"}),Jr={kernelName:i.Atanh,backendName:"webgl",kernelFunc:Kr};class Zr{constructor(e,t,n,r=!1,a=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");const i=e.filterWidth,o=e.strideHeight,s=e.strideWidth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterHeight,d=e.effectiveFilterWidth,h=e.padInfo.top,f=e.padInfo.left;this.outputShape=e.outShape;const p="avg"===t,m=`((batch * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + d`,g=`(xR * ${e.inWidth} + xC) * ${e.inChannels} + d`;let y="0.0";if(p||(y="-1.0 / 1e-20"),n){const t=">=";return void(this.userCode=`\n const ivec2 strides = ivec2(${o}, ${s});\n const ivec2 pads = ivec2(${h}, ${f});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n float avgValue = 0.0;\n\n for (int wR = 0; wR < ${c};\n wR += ${l}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${d};\n wC += ${u}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xR, xC, d);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${t} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${r?a?m:g:`wR * ${d} + wC`};\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `)}let _=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(_="avgValue / max(count, 1.0)");const b=4*Math.floor(i/4),v=i%4,w=`\n if (${p}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n `;this.userCode=`\n const ivec2 strides = ivec2(${o}, ${s});\n const ivec2 pads = ivec2(${h}, ${f});\n const float initializationValue = ${y};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xR, int xC, int d) {\n if (xC < 0 || xC >= ${e.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xR, xC, d);\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d = coords[3];\n\n ivec2 xRCCorner = coords.yz * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // max/min x(?, ?, d) to get y(yR, yC, d).\n // ? = to be determined\n vec4 minMaxValue = vec4(${y});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wR = 0; wR < ${c};\n wR += ${l}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${b}; wC += 4) {\n int xC = xCCorner + wC * ${u};\n\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n getValue(batch, xR, xC + 2 * ${u}, d),\n getValue(batch, xR, xC + 3 * ${u}, d)\n );\n\n ${w}\n }\n\n int xC = xCCorner + ${b};\n if (${1===v}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${w}\n } else if (${2===v}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n initializationValue,\n initializationValue\n );\n\n ${w}\n } else if (${3===v}) {\n vec4 values = vec4(\n getValue(batch, xR, xC, d),\n getValue(batch, xR, xC + ${u}, d),\n getValue(batch, xR, xC + 2 * ${u}, d),\n initializationValue\n );\n\n ${w}\n }\n }\n setOutput(${_});\n }\n `}}class Qr{constructor(e,t,n,r=!1,a=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");const i=e.filterWidth,o=e.strideDepth,s=e.strideHeight,l=e.strideWidth,u=e.dilationDepth,c=e.dilationHeight,d=e.dilationWidth,h=e.effectiveFilterDepth,f=e.effectiveFilterHeight,p=e.effectiveFilterWidth,m=e.padInfo.front,g=e.padInfo.top,y=e.padInfo.left;this.outputShape=e.outShape;const _="avg"===t;let b="0.0";if(_||(b="-1.0 / 1e-20"),n){const t=">=";return void(this.userCode=`\n const ivec3 strides =\n ivec3(${o}, ${s}, ${l});\n const ivec3 pads = ivec3(${m}, ${g}, ${y});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n // ? = to be determined\n float minMaxValue = 0.0;\n float minMaxValueFound = 0.0;\n int minMaxPosition = 0;\n\n for (int wD = 0; wD < ${h};\n wD += ${u}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${e.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${f};\n wR += ${c}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${p};\n wC += ${d}) {\n int xC = xCCorner + wC;\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n float value = getX(batch, xD, xR, xC, ch);\n\n // If a min / max value has already been found, use it. If not,\n // use the current value.\n float currMinMaxValue = mix(\n value, minMaxValue, minMaxValueFound);\n if (value ${t} currMinMaxValue) {\n minMaxValue = value;\n minMaxValueFound = 1.0;\n minMaxPosition = ${r?a?`(((batch * ${e.inDepth} + xD) * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`((xD * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`wD * ${f} * ${p} +\n wR * ${p} + wC`};\n }\n }\n }\n }\n setOutput(float(minMaxPosition));\n }\n `)}let v=`${t}(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(v="avgValue / max(count, 1.0)");const w=4*Math.floor(i/4),F=i%4,k=`\n if (${_}) {\n avgValue += dot(values, ones);\n } else {\n minMaxValue = max(values, minMaxValue);\n }\n `;this.userCode=`\n const ivec3 strides =\n ivec3(${o}, ${s}, ${l});\n const ivec3 pads = ivec3(${m}, ${g}, ${y});\n const float initializationValue = ${b};\n const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n float count = 0.0;\n\n float getValue(int batch, int xD, int xR, int xC, int ch) {\n if (xC < 0 || xC >= ${e.inWidth}) {\n return initializationValue;\n }\n count += 1.0;\n return getX(batch, xD, xR, xC, ch);\n }\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xDCorner = xCorner.x;\n int xRCorner = xCorner.y;\n int xCCorner = xCorner.z;\n\n // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n // ? = to be determined\n vec4 minMaxValue = vec4(${b});\n float avgValue = 0.0;\n count = 0.0;\n\n for (int wD = 0; wD < ${h};\n wD += ${u}) {\n int xD = xDCorner + wD;\n\n if (xD < 0 || xD >= ${e.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${f};\n wR += ${c}) {\n int xR = xRCorner + wR;\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${w}; wC += 4) {\n int xC = xCCorner + wC * ${d};\n\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${d}, ch),\n getValue(batch, xD, xR, xC + 2 * ${d}, ch),\n getValue(batch, xD, xR, xC + 3 * ${d}, ch)\n );\n\n ${k}\n }\n\n int xC = xCCorner + ${w};\n if (${1===F}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n ${k}\n } else if (${2===F}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${d}, ch),\n initializationValue,\n initializationValue\n );\n\n ${k}\n } else if (${3===F}) {\n vec4 values = vec4(\n getValue(batch, xD, xR, xC, ch),\n getValue(batch, xD, xR, xC + ${d}, ch),\n getValue(batch, xD, xR, xC + 2 * ${d}, ch),\n initializationValue\n );\n\n ${k}\n }\n }\n }\n setOutput(${v});\n }\n `}}const ea={kernelName:i.AvgPool,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t;pe(a,"avgPool");const{filterSize:o,strides:s,pad:l,dimRoundingMode:u}=r;i.util.assert(i.backend_util.eitherStridesOrDilationsAreOne(s,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${s} and dilations '1'`));const c=i.backend_util.computePool2DInfo(a.shape,o,s,1,l,u);if(1===c.filterWidth&&1===c.filterHeight&&i.util.arraysEqual(c.inShape,c.outShape))return Vn({inputs:{x:a},backend:n});const d=new Zr(c,"avg",!1);return n.runWebGLProgram(d,[a],"float32")}};const ta={kernelName:i.AvgPool3D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{filterSize:o,strides:s,pad:l,dimRoundingMode:u,dataFormat:c}=r,d=i.backend_util.computePool3DInfo(a.shape,o,s,[1,1,1],l,u,c),h=new Qr(d,"avg",!1);return n.runWebGLProgram(h,[a],"float32")}};class na{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,a=e.strideWidth,i=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterHeight,l=e.effectiveFilterWidth,u=s-1-e.padInfo.top,c=l-1-e.padInfo.left,d=1/(t*n);this.userCode=`\n const ivec2 pads = ivec2(${u}, ${c});\n const float avgMultiplier = float(${d});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${s};\n wR += ${i}) {\n float dyR = float(dyRCorner + wR) / ${r}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${l};\n wC+= ${o}) {\n float dyC = float(dyCCorner + wC) / ${a}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n setOutput(dotProd);\n }\n `}}class ra{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;const t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,a=e.strideDepth,i=e.strideHeight,o=e.strideWidth,s=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.effectiveFilterDepth,d=e.effectiveFilterHeight,h=e.effectiveFilterWidth,f=c-1-e.padInfo.front,p=d-1-e.padInfo.top,m=h-1-e.padInfo.left,g=1/(t*n*r);this.userCode=`\n const ivec3 pads = ivec3(${f}, ${p}, ${m});\n const float avgMultiplier = float(${g});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${c};\n wD += ${s}) {\n float dyD = float(dyDCorner + wD) / ${a}.0;\n\n if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${d};\n wR += ${l}) {\n float dyR = float(dyRCorner + wR) / ${i}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${h};\n wC += ${u}) {\n float dyC = float(dyCCorner + wC) / ${o}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n dotProd += dyValue * avgMultiplier;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const aa={kernelName:i.AvgPool3DGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:o}=t,s=o,{filterSize:l,strides:u,pad:c,dimRoundingMode:d}=r,h=i.backend_util.computePool3DInfo(s.shape,l,u,[1,1,1],c,d),f=new ra(h);return n.runWebGLProgram(f,[a],s.dtype)}};const ia={kernelName:i.AvgPoolGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:o}=t,s=o;pe([a,o],"avgPoolGrad");const{filterSize:l,strides:u,pad:c}=r,d=i.backend_util.computePool2DInfo(s.shape,l,u,1,c),h=new na(d);return n.runWebGLProgram(h,[a],s.dtype)}};const oa={kernelName:i.BatchMatMul,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{a:a,b:i}=t,{transposeA:o,transposeB:s}=r;return br({a:a,b:i,transposeA:o,transposeB:s,backend:n})}};class sa{constructor(e,t,n,r,a,o){this.outputShape=[],this.variableNames=["x","mean","variance"],i.backend_util.assertAndGetBroadcastShape(e,t),i.backend_util.assertAndGetBroadcastShape(e,n);let s="0.0";null!=r&&(i.backend_util.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");let l="1.0";null!=a&&(i.backend_util.assertAndGetBroadcastShape(e,a),this.variableNames.push("scale"),l="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n void main() {\n float x = getXAtOutCoords();\n float mean = getMeanAtOutCoords();\n float variance = getVarianceAtOutCoords();\n float offset = ${s};\n float scale = ${l};\n float inv = scale * inversesqrt(variance + float(${o}));\n setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n }\n `}}class la{constructor(e,t,n,r,a,o){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],i.backend_util.assertAndGetBroadcastShape(e,t),i.backend_util.assertAndGetBroadcastShape(e,n);let s="vec4(0.0)";null!=r&&(i.backend_util.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),s="getOffsetAtOutCoords()");let l="vec4(1.0)";null!=a&&(i.backend_util.assertAndGetBroadcastShape(e,a),this.variableNames.push("scale"),l="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n void main() {\n vec4 offset = ${s};\n vec4 scale = ${l};\n\n vec4 x = getXAtOutCoords();\n vec4 mean = getMeanAtOutCoords();\n vec4 variance = getVarianceAtOutCoords();\n\n vec4 inv = scale * inversesqrt(variance + vec4(${o}));\n\n setOutput((x - mean) * inv + offset);\n }\n `}}const ua={kernelName:i.FusedBatchNorm,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r,mean:a,variance:o,offset:s,scale:l}=e;i.util.assert(a.shape.length===o.shape.length,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),i.util.assert(null==s||a.shape.length===s.shape.length,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),i.util.assert(null==l||a.shape.length===l.shape.length,(()=>"Batch normalization gradient requires mean and scale to have equal ranks."));let{varianceEpsilon:u}=n;null==u&&(u=.001);const c=[r,a,o];let d=null;null!=s&&(d=s.shape,c.push(s));let h=null;null!=l&&(h=l.shape,c.push(l));const f=(0,i.env)().getBool("WEBGL_PACK_NORMALIZATION")?new la(r.shape,a.shape,o.shape,d,h,u):new sa(r.shape,a.shape,o.shape,d,h,u);return t.runWebGLProgram(f,c,c[0].dtype)}};class ca{constructor(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;const t=Pe(this.rank);this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const n=function(e){if(1===e)return"sourceLoc";if(e<=6)return da.slice(0,e).map((e=>"sourceLoc."+e)).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}(this.rank);let r;r=`\n ${t} sourceLoc;\n ${t} coords = getOutputCoords();\n ${e.map(((e,t)=>`sourceLoc.${da[t]} = start[${t}] + coords.${da[t]};`)).join("\n")}\n `,this.userCode=`\n void main() {\n ${r}\n setOutput(getSource(${n}));\n }\n `}}const da=["x","y","z","w","u","v"];class ha{constructor(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];const t=Pe(this.rank),n=pn("coords",this.rank),r=pn("sourceLoc",this.rank),a=1===this.rank?"sourceLoc":`vec2(${r.slice(-2).join()})`,i=`getChannel(getSource(${r.join()}), ${a})`,o=`\n result.x = ${i};\n if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n ++${r[this.rank-1]};\n result.y = ${i};\n --${r[this.rank-1]};\n }\n `,s=1===this.rank?"":`\n --${n[this.rank-1]};\n if (++${n[this.rank-2]} < ${e[this.rank-2]}) {\n ++${r[this.rank-2]};\n result.z = ${i};\n if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n ++${r[this.rank-1]};\n result.w = ${i};\n }\n }\n `,l=this.rank<=4?`sourceLoc = coords +\n ${t}(${e.map(((e,t)=>`start[${t}]`)).join()});`:e.map(((e,t)=>`${r[t]} = ${n[t]} + start[${t}];`)).join("\n");this.userCode=`\n void main() {\n ${t} coords = getOutputCoords();\n ${t} sourceLoc;\n ${l}\n vec4 result = vec4(0.);\n ${o}\n ${s}\n setOutput(result);\n }\n `}}function fa(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{begin:o,size:s}=r,[l,u]=i.slice_util.parseSliceParams(a,o,s);if(i.slice_util.assertParamsValid(a,l,u),0===i.util.sizeFromShape(u))return n.makeTensorInfo(u,a.dtype,[]);if(n.shouldExecuteOnCPU([a])||"string"===a.dtype){const e=n.texData.get(a.dataId),t=Jt(e.values,l,u,a.shape,a.dtype);return n.makeTensorInfo(u,a.dtype,t)}const{isPacked:c}=n.texData.get(a.dataId),d=i.slice_util.isSliceContinous(a.shape,l,u);if(c||!d){const e=(0,i.env)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new ha(u):new ca(u),t=[l];return n.runWebGLProgram(e,[a],a.dtype,t)}return n.uploadToGPU(a.dataId),function(e,t,n,r){const a=r.texData.get(e.dataId),o=r.makeTensorInfo(n,e.dtype),s=r.texData.get(o.dataId);Object.assign(s,a),s.refCount=1,s.shape=n,s.dtype=e.dtype;let l=i.slice_util.computeFlatOffset(t,i.util.computeStrides(e.shape));a.slice&&(l+=a.slice.flatOffset),s.slice={flatOffset:l,origDataId:a.slice&&a.slice.origDataId||e.dataId};const u=r.dataRefCount.get(s.slice.origDataId)||1;return r.dataRefCount.set(s.slice.origDataId,u+1),o}(a,l,u,n)}const pa={kernelName:i.Slice,backendName:"webgl",kernelFunc:fa},ma={kernelName:i.BatchToSpaceND,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{blockShape:o,crops:s}=r;i.util.assert(a.shape.length<=4,(()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet"));const l=o.reduce(((e,t)=>e*t)),u=i.backend_util.getReshaped(a.shape,o,l),c=i.backend_util.getPermuted(u.length,o.length),d=i.backend_util.getReshapedPermuted(a.shape,o,l),h=i.backend_util.getSliceBeginCoords(s,o.length),f=i.backend_util.getSliceSize(d,s,o.length),p=[],m=sr({inputs:{x:a},backend:n,attrs:{shape:u}}),g=yr({inputs:{x:m},backend:n,attrs:{perm:c}}),y=sr({inputs:{x:g},backend:n,attrs:{shape:d}}),_=fa({inputs:{x:y},backend:n,attrs:{begin:h,size:f}});return p.push(m),p.push(g),p.push(y),p.forEach((e=>n.disposeIntermediateTensorInfo(e))),_}};const ga={kernelName:i.Bincount,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,weights:i}=t,{size:o}=r,s=n.readSync(a.dataId),l=n.readSync(i.dataId),u=_t(s,l,i.dtype,i.shape,o);return n.makeTensorInfo([o],i.dtype,u)}};const ya={kernelName:i.BitwiseAnd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{a:r,b:a}=t,o=(0,i.env)().getBool("WEBGL_PACK_BINARY_OPERATIONS"),s=(0,i.env)().getNumber("WEBGL_VERSION");if(n.shouldExecuteOnCPU([r,a])||1===s){const e=n.texData.get(r.dataId).values,t=n.texData.get(a.dataId).values,[i,o]=vt(r.shape,a.shape,e,t,r.dtype),s=n.makeTensorInfo(o,r.dtype);return n.texData.get(s.dataId).values=i,s}let l;return l=o?new jn("\n int r = int(a.r) & int(b.r);\n int g = int(a.g) & int(b.g);\n int rb = int(a.b) & int(b.b);\n int ra = int(a.a) & int(b.a);\n return vec4(r, g, rb, ra);\n",r.shape,a.shape,!1):new Nn("\n return float(int(a.r) & int(b.r));\n",r.shape,a.shape),n.runWebGLProgram(l,[r,a],r.dtype)}};const _a={kernelName:i.BroadcastArgs,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{s0:r,s1:a}=t,o=n.readSync(r.dataId),s=n.readSync(a.dataId),l=i.backend_util.assertAndGetBroadcastShape(Array.from(o),Array.from(s));return n.makeTensorInfo([l.length],"int32",Int32Array.from(l))}},ba=Zn({opSnippet:"return float(a != b);",cpuKernelImpl:zt,dtype:"bool"}),va={kernelName:i.NotEqual,backendName:"webgl",kernelFunc:ba};function wa(e){const{inputs:t,backend:n}=e,{input:r}=t;return Vn({inputs:{x:n.texData.get(r.dataId).complexTensorInfos.real},backend:n})}const Fa={kernelName:i.Real,backendName:"webgl",kernelFunc:wa};const ka={kernelName:i.Cast,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r,attrs:a}=t,{x:o}=n,{dtype:s}=a;if("complex64"===s){if("complex64"===o.dtype)return Vn({inputs:{x:o},backend:r});const t=i.zeros(o.shape),n=e({inputs:{x:o},backend:r,attrs:{dtype:"float32"}}),a=Hn({inputs:{real:n,imag:t},backend:r});return t.dispose(),r.disposeIntermediateTensorInfo(n),a}if("complex64"===o.dtype){const t=wa({inputs:{input:o},backend:r}),n=e({inputs:{x:t},backend:r,attrs:{dtype:s}});return r.disposeIntermediateTensorInfo(t),n}if(!i.util.hasEncodingLoss(o.dtype,s)){const e=Vn({inputs:{x:o},backend:r});return{dataId:e.dataId,shape:e.shape,dtype:s}}if(r.shouldExecuteOnCPU([o])){const e=r.texData.get(o.dataId).values,[t,n,a]=wt(e,o.shape,o.dtype,s);return r.makeTensorInfo(t,n,a)}if("int32"===s)return function(e,t){const n=new wn(e.shape,"return float(int(x));"),r=t.runWebGLProgram(n,[e],"int32");return{dataId:r.dataId,shape:r.shape,dtype:r.dtype}}(o,r);if("bool"===s){const e=r.makeTensorInfo([],"bool",i.util.getTypedArrayFromDType("bool",1)),t=ba({inputs:{a:o,b:e},backend:r});return r.disposeIntermediateTensorInfo(e),t}throw new Error(`Error in Cast: failed to cast ${o.dtype} to ${s}`)}},xa="return ceil(x);",Aa=Jn({opSnippet:xa,packedOpSnippet:xa,cpuKernelImpl:Ft}),Sa={kernelName:i.Ceil,backendName:"webgl",kernelFunc:Aa};class Ea{constructor(e){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n\n void main() {\n float value = getAAtOutCoords();\n if (isnan(value)) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, minVal, maxVal));\n }\n "}}class Ca{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n void main() {\n vec4 value = getAAtOutCoords();\n\n if (any(isnan(value))) {\n setOutput(value);\n return;\n }\n\n setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n }\n "}}const Ta={kernelName:i.ClipByValue,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{clipValueMin:o,clipValueMax:s}=r;let l;l=(0,i.env)().getBool("WEBGL_PACK_CLIP")?new Ca(a.shape):new Ea(a.shape);const u=[[o],[s]];return n.runWebGLProgram(l,[a],a.dtype,u)}};class Da{constructor(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode="\n void main() {\n float re = abs(getRealAtOutCoords());\n float im = abs(getImagAtOutCoords());\n float mx = max(re, im);\n\n // sadly the length function in glsl is not underflow-safe\n // (at least not on Intel GPUs). So the safe solution is\n // to ensure underflow-safety in all cases.\n setOutput(\n mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n );\n }\n "}}function Ia(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}}const Oa={kernelName:i.ComplexAbs,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t,a=n.texData.get(r.dataId),i=new Da(r.shape),o=[Ia(r,a.complexTensorInfos.real),Ia(r,a.complexTensorInfos.imag)];return n.runWebGLProgram(i,o,o[0].dtype)}};class Pa{constructor(e){this.outputShape=[],this.outputShape=i.backend_util.computeOutShape(e,1),this.variableNames=e.map(((e,t)=>`T${t}`));const t=new Array(e.length-1);t[0]=e[0][1];for(let i=1;i`T${t}`));const l=new Array(e.length-1);l[0]=e[0][t];for(let i=1;i= ${l[i-1]}) {\n return getChannel(\n getT${i}(${Ra(s,u,e)}),\n vec2(${Ra(c,u,e)}));\n }`}const f=l.length,p=l[l.length-1];h+=`\n return getChannel(\n getT${f}(${Ra(s,u,p)}),\n vec2(${Ra(c,u,p)}));`,this.userCode=`\n float getValue(${s.map((e=>"int "+e))}) {\n ${h}\n }\n\n void main() {\n ${a} coords = getOutputCoords();\n vec4 result = vec4(getValue(${o}), 0., 0., 0.);\n\n ${o[r-1]} = ${o[r-1]} + 1;\n if (${o[r-1]} < ${n[r-1]}) {\n result.g = getValue(${o});\n }\n\n ${o[r-2]} = ${o[r-2]} + 1;\n if (${o[r-2]} < ${n[r-2]}) {\n result.a = getValue(${o});\n }\n\n ${o[r-1]} = ${o[r-1]} - 1;\n if (${o[r-2]} < ${n[r-2]} &&\n ${o[r-1]} < ${n[r-1]}) {\n result.b = getValue(${o});\n }\n setOutput(result);\n }\n `}}function Ra(e,t,n){const r=e.indexOf(t);return e.map(((e,t)=>t===r?`${e} - ${n}`:e)).join()}function La(e){const{inputs:t,backend:n}=e,{input:r}=t;return Vn({inputs:{x:n.texData.get(r.dataId).complexTensorInfos.imag},backend:n})}const Na={kernelName:i.Imag,backendName:"webgl",kernelFunc:La};function Ba(e,t,n){const r=e[0].dtype;if("complex64"===r){const r=e.map((e=>wa({inputs:{input:e},backend:n}))),a=e.map((e=>La({inputs:{input:e},backend:n}))),i=Ba(r,t,n),o=Ba(a,t,n),s=Hn({inputs:{real:i,imag:o},backend:n});return r.forEach((e=>n.disposeIntermediateTensorInfo(e))),a.forEach((e=>n.disposeIntermediateTensorInfo(e))),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(o),s}let a=n.shouldExecuteOnCPU(e);if("string"===r&&(a=!0),a){const a=e.map((e=>{const r=i.util.sizeFromShape(e.shape.slice(t));return sr({inputs:{x:e},backend:n,attrs:{shape:[-1,r]}})})),o=a.map((e=>({vals:n.readSync(e.dataId),shape:e.shape}))),s=i.backend_util.computeOutShape(a.map((e=>e.shape)),1),l=1===a[0].shape[0],u=kt(o,s,r,l),c=i.backend_util.computeOutShape(e.map((e=>e.shape)),t),d=n.makeTensorInfo(c,r,u);return a.forEach((e=>n.disposeIntermediateTensorInfo(e))),d}const o=e.filter((e=>i.util.sizeFromShape(e.shape)>0)),s=(0,i.env)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&o[0].shape.length>1;if(1===o.length){const t=s?new wn(e[0].shape,Sn):new En(e[0].shape,Sn);return n.runWebGLProgram(t,e,r)}const l=(0,i.env)().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER");if(o.length>l){const e=[];for(let a=0;ae.shape)),t);return n.runWebGLProgram(e,o,r)}const{tensors2D:u,outShape:c}=function(e,t,n){const r=i.backend_util.computeOutShape(e.map((e=>e.shape)),t),a=e.map((e=>sr({inputs:{x:e},attrs:{shape:[-1,i.util.sizeFromShape(e.shape.slice(t))]},backend:n})));return{tensors2D:a,outShape:r}}(o,t,n),d=new Pa(u.map((e=>e.shape))),h=n.runWebGLProgram(d,u,r);u.forEach((e=>n.disposeIntermediateTensorInfo(e)));const f=sr({inputs:{x:h},attrs:{shape:c},backend:n});return n.disposeIntermediateTensorInfo(h),f}function ja(e){const{inputs:t,backend:n,attrs:r}=e,{axis:a}=r,o=i.util.parseAxisParam(a,t[0].shape)[0],s=t.map((e=>e.shape));i.backend_util.assertParamsConsistent(s,o);const l=i.backend_util.computeOutShape(t.map((e=>e.shape)),o);if(0===i.util.sizeFromShape(l))return n.makeTensorInfo(l,t[0].dtype,[]);const u=t.filter((e=>i.util.sizeFromShape(e.shape)>0));return 1===u.length?Vn({inputs:{x:u[0]},backend:n}):Ba(u,o,n)}const Va={kernelName:i.Concat,backendName:"webgl",kernelFunc:ja};class za{constructor(e,t=!1,n=null,r=!1,a=!1){this.variableNames=["x","W"],this.outputShape=e.outShape;const i=e.padInfo.top,o=e.padInfo.left,s=e.strideHeight,l=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,d=e.filterHeight,h=e.filterWidth,f=4*Math.floor(e.inChannels/4),p=e.inChannels%4,m="channelsLast"===e.dataFormat,g=m?1:2,y=m?2:3,_=m?3:1;let b="",v="";n&&(b=r?`float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${n}\n }`:a?`float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${n}\n }`:`\n float activation(float x) {\n ${n}\n }\n `,v="result = activation(result);");const w=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),a&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n ${b}\n\n const ivec2 strides = ivec2(${s}, ${l});\n const ivec2 pads = ivec2(${i}, ${o});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d2 = coords[${_}];\n\n ivec2 xRCCorner =\n ivec2(coords[${g}], coords[${y}]) * strides - pads;\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${d}; wR++) {\n int xR = xRCorner + wR * ${u};\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${h}; wC++) {\n int xC = xCCorner + wC * ${c};\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${f}; d1 += 4) {\n vec4 wValues = vec4(\n getW(wR, wC, d1, d2),\n getW(wR, wC, d1 + 1, d2),\n getW(wR, wC, d1 + 2, d2),\n getW(wR, wC, d1 + 3, d2)\n );\n\n if (${m}) {\n vec4 xValues = vec4(\n getX(batch, xR, xC, d1),\n getX(batch, xR, xC, d1 + 1),\n getX(batch, xR, xC, d1 + 2),\n getX(batch, xR, xC, d1 + 3)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec4 xValues = vec4(\n getX(batch, d1, xR, xC),\n getX(batch, d1 + 1, xR, xC),\n getX(batch, d1 + 2, xR, xC),\n getX(batch, d1 + 3, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n\n if (${1===p}) {\n\n if (${m}) {\n dotProd +=\n getX(batch, xR, xC, ${f}) *\n getW(wR, wC, ${f}, d2);\n } else {\n dotProd +=\n getX(batch, ${f}, xR, xC) *\n getW(wR, wC, ${f}, d2);\n }\n\n } else if (${2===p}) {\n vec2 wValues = vec2(\n getW(wR, wC, ${f}, d2),\n getW(wR, wC, ${f} + 1, d2)\n );\n\n if (${m}) {\n vec2 xValues = vec2(\n getX(batch, xR, xC, ${f}),\n getX(batch, xR, xC, ${f} + 1)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec2 xValues = vec2(\n getX(batch, ${f}, xR, xC),\n getX(batch, ${f} + 1, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n } else if (${3===p}) {\n vec3 wValues = vec3(\n getW(wR, wC, ${f}, d2),\n getW(wR, wC, ${f} + 1, d2),\n getW(wR, wC, ${f} + 2, d2)\n );\n\n if (${m}) {\n vec3 xValues = vec3(\n getX(batch, xR, xC, ${f}),\n getX(batch, xR, xC, ${f} + 1),\n getX(batch, xR, xC, ${f} + 2)\n );\n dotProd += dot(xValues, wValues);\n } else {\n vec3 xValues = vec3(\n getX(batch, ${f}, xR, xC),\n getX(batch, ${f} + 1, xR, xC),\n getX(batch, ${f} + 2, xR, xC)\n );\n dotProd += dot(xValues, wValues);\n }\n\n }\n }\n }\n\n float result = dotProd;\n ${w}\n ${v}\n setOutput(result);\n }\n `}}class Ha{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;const t=e.padInfo.front,n=e.padInfo.top,r=e.padInfo.left,a=e.strideDepth,i=e.strideHeight,o=e.strideWidth,s=e.dilationDepth,l=e.dilationHeight,u=e.dilationWidth,c=e.filterDepth,d=e.filterHeight,h=e.filterWidth,f=4*Math.floor(e.inChannels/4),p=e.inChannels%4;this.userCode=`\n const ivec3 strides = ivec3(${a}, ${i}, ${o});\n const ivec3 pads = ivec3(${t}, ${n}, ${r});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d2 = coords.u;\n\n ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n int xFCorner = xFRCCorner.x;\n int xRCorner = xFRCCorner.y;\n int xCCorner = xFRCCorner.z;\n\n // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n // y(yF, yR, yC, d2). ? = to be determined. : = across all\n // values in that axis.\n float dotProd = 0.0;\n for (int wF = 0; wF < ${c}; wF++) {\n int xF = xFCorner + wF * ${s};\n\n if (xF < 0 || xF >= ${e.inDepth}) {\n continue;\n }\n\n for (int wR = 0; wR < ${d}; wR++) {\n int xR = xRCorner + wR * ${l};\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int wC = 0; wC < ${h}; wC++) {\n int xC = xCCorner + wC * ${u};\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n for (int d1 = 0; d1 < ${f}; d1 += 4) {\n vec4 xValues = vec4(\n getX(batch, xF, xR, xC, d1),\n getX(batch, xF, xR, xC, d1 + 1),\n getX(batch, xF, xR, xC, d1 + 2),\n getX(batch, xF, xR, xC, d1 + 3)\n );\n vec4 wValues = vec4(\n getW(wF, wR, wC, d1, d2),\n getW(wF, wR, wC, d1 + 1, d2),\n getW(wF, wR, wC, d1 + 2, d2),\n getW(wF, wR, wC, d1 + 3, d2)\n );\n\n dotProd += dot(xValues, wValues);\n }\n\n if (${1===p}) {\n dotProd +=\n getX(batch, xF, xR, xC, ${f}) *\n getW(wF, wR, wC, ${f}, d2);\n } else if (${2===p}) {\n vec2 xValues = vec2(\n getX(batch, xF, xR, xC, ${f}),\n getX(batch, xF, xR, xC, ${f} + 1)\n );\n vec2 wValues = vec2(\n getW(wF, wR, wC, ${f}, d2),\n getW(wF, wR, wC, ${f} + 1, d2)\n );\n dotProd += dot(xValues, wValues);\n } else if (${3===p}) {\n vec3 xValues = vec3(\n getX(batch, xF, xR, xC, ${f}),\n getX(batch, xF, xR, xC, ${f} + 1),\n getX(batch, xF, xR, xC, ${f} + 2)\n );\n vec3 wValues = vec3(\n getW(wF, wR, wC, ${f}, d2),\n getW(wF, wR, wC, ${f} + 1, d2),\n getW(wF, wR, wC, ${f} + 2, d2)\n );\n dotProd += dot(xValues, wValues);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Ua{constructor(e,t=!1,n=null,r=!1,a=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=je(this.outputShape.length);const o=e.padInfo.left,s=e.strideWidth,l=e.dilationWidth,u=e.filterHeight,c=e.filterWidth,d=c;let h="\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;";for(let i=0;i=0 && xR < inDims[0]) {\n ";for(let g=0;g<(d+1)/2;g++){const t=2*g;if(h+=`\n xC = xCCorner + ${t*l};\n `,1===s){if(t= 0 && xCOffset < inDims[1] && xTexelC${t}Ready == 0) {\n xTexelC${t} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${t}.zw = vec2(0.0);\n }\n xTexelC${t}Ready = 1;\n }\n `,h+=1===l&&t>0?`\n xC${t} = vec4(xTexelC${t-2}.zw, xTexelC${t}.xy);\n `:`\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${t} = vec4(previous.zw, xTexelC${t}.xy);\n } else {\n xC${t} = vec4(0.0, 0.0, xTexelC${t}.xy);\n }\n `):h+=`\n if (xC >= 0 && xC < inDims[1] && xTexelC${t}Ready == 0) {\n xTexelC${t} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${t}.zw = vec2(0.0);\n }\n xTexelC${t}Ready = 1;\n }\n\n xC${t} = xTexelC${t};\n `,t+1= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${t+1}.zw = vec2(0.0);\n }\n xTexelC${t+1}Ready = 1;\n }\n `,h+=l>1?`\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${t+1} = vec4(previous.zw, xTexelC${t+1}.xy);\n } else {\n xC${t+1} = vec4(0.0, 0.0, xTexelC${t+1}.xy);\n }\n `:`\n xC${t+1} = vec4(xTexelC${t}.zw, xTexelC${t+1}.xy);\n `):h+=1===e?`\n xC${t+1} = xTexelC${t};\n `:`\n xCOffset = xC + ${e};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${t+1}.zw = vec2(0.0);\n }\n xTexelC${t+1}Ready = 1;\n }\n\n xC${t+1} = xTexelC${t+1};\n `}}else t= 0 && xCOffset < inDims[1] && xTexelC${t}Ready == 0) {\n xTexelC${t} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${t}.zw = vec2(0.0);\n }\n xTexelC${t}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${t+1}Ready == 0) {\n xTexelC${t+1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${t+1}.zw = vec2(0.0);\n }\n xTexelC${t+1}Ready = 1;\n }\n\n xC${t} = vec4(xTexelC${t}.zw, xTexelC${t+1}.zw);\n `,t+1= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${t+1} = vec4(xTexelC${t+1}.xy, final.xy);\n `)):(h+=`\n if(xC >= 0 && xC < inDims[1] && xTexelC${t}Ready == 0) {\n xTexelC${t} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${t}.zw = vec2(0.0);\n }\n xTexelC${t}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${t+1}Ready == 0) {\n xTexelC${t+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${t+1}.zw = vec2(0.);\n }\n xTexelC${t+1}Ready = 1;\n }\n\n xC${t} = vec4(\n xTexelC${t}.xy, xTexelC${t+1}.xy);\n `,t+1= 0) {\n // Use custom imod instead mod. On Intel GPU, mod may generate\n // unexpected value.\n // https://github.com/tensorflow/tfjs/issues/5447\n offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n inChannels);\n\n if(d1 < inputShape[${o}] && d1 >= 0) {\n\n ch = imod(pos, inChannels);\n\n if (${a}) {\n innerDims = vec2(d1, ch);\n result[${2*u+e}] = getChannel(\n getA(rc.x, d0, int(innerDims.x),\n int(innerDims.y)), innerDims);\n } else {\n innerDims = vec2(d0, d1);\n result[${2*u+e}] = getChannel(\n getA(rc.x, ch, int(innerDims.x),\n int(innerDims.y)), innerDims);\n }\n }\n }\n }\n `;this.userCode=`\n void main() {\n ivec3 rc = getOutputCoords();\n\n vec4 result = vec4(0);\n\n int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n vec2 innerDims;\n\n ${l}\n\n ${r.output} = result;\n }\n `}}function qa(e,t){const n=e.length;return n>=3?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&1===n&&e[0]>1?[e[0],1]:null}function $a({x:e,filter:t,convInfo:n,backend:r,bias:a=null,preluActivationWeights:o=null,leakyreluAlpha:s=0,activation:l=null}){const u=e.shape,c=r.texData.get(e.dataId),d=n.inChannels,h=u[0]*u[1]*u[2],f=n.outChannels,p="channelsLast"===n.dataFormat,m=!1;let g;const y=[];if(null!=o){const e=qa(o.shape,p);null!=e&&(o=sr({inputs:{x:o},backend:r,attrs:{shape:e}}),y.push(o))}if(null!=a){const e=qa(a.shape,p);null!=e&&(a=sr({inputs:{x:a},backend:r,attrs:{shape:e}}),y.push(a))}if(!((1===h||1===f)&&d>1e3)&&c.isPacked&&p&&null!=c.texture&&u[2]%2!==0&&i.util.arraysEqual(c.shape.slice(-3),u.slice(-3))){const d=u[0]*u[1]*(u[2]+1),h={dataId:e.dataId,shape:[1,d,n.inChannels],dtype:e.dtype},f=c.shape;c.shape=c.shape.slice(),c.shape[c.shape.length-2]++,i.util.assert(ee(c.shape,h.shape),(()=>`packed reshape ${c.shape} to ${h.shape} isn't free`));const p=sr({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}});y.push(p);const _=br({a:h,b:p,backend:r,transposeA:false,transposeB:m,bias:a,activation:l,preluActivationWeights:o,leakyreluAlpha:s}),b=r.texData.get(_.dataId);i.util.assert(b.isPacked,(()=>"batchMatMul result is expected to be packed")),c.shape=f,b.shape=n.outShape,g=Vn({inputs:{x:_},backend:r}),g.shape=n.outShape,y.push(_)}else{const i=n.outHeight*n.outWidth,u=sr({inputs:{x:e},backend:r,attrs:{shape:p?[n.batchSize,i,n.inChannels]:[n.batchSize,n.inChannels,i]}}),c=sr({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}}),d=br({a:p?u:c,b:p?c:u,transposeA:!p,transposeB:m,backend:r,bias:a,activation:l,preluActivationWeights:o,leakyreluAlpha:s});g=sr({inputs:{x:d},backend:r,attrs:{shape:n.outShape}}),y.push(u),y.push(c),y.push(d)}for(const i of y)r.disposeIntermediateTensorInfo(i);return g}function Ya({x:e,filter:t,convInfo:n,backend:r,bias:a=null,preluActivationWeights:o=null,leakyreluAlpha:s=0,activation:l=null}){const{filterWidth:u,filterHeight:c,inChannels:d,outWidth:h,outHeight:f,dataFormat:p}=n,m="channelsLast"===p,g=u*c*d,y=f*h,_=[n.batchSize,g,y],b=[];if(null!=o){const e=qa(o.shape,m);null!=e&&(o=sr({inputs:{x:o},backend:r,attrs:{shape:e}}),b.push(o))}if(null!=a){const e=qa(a.shape,m);null!=e&&(a=sr({inputs:{x:a},backend:r,attrs:{shape:e}}),b.push(a))}const v=sr({inputs:{x:t},backend:r,attrs:{shape:[1,g,i.util.sizeFromShape(t.shape)/g]}});b.push(v);const w=new Wa(_,n),F=[e.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],k=r.runWebGLProgram(w,[e],"float32",F),x=sr({inputs:{x:k},backend:r,attrs:{shape:_}});b.push(k),b.push(x);const A=null!=a,S=null!=o,E="leakyrelu"===l,C=l?Qn(l,!0):null,T=new er(m?x.shape:v.shape,m?v.shape:x.shape,m?[n.batchSize,y,n.outChannels]:[n.batchSize,n.outChannels,y],!0,!1,A,C,S,E),D=m?[x,v]:[v,x];if(a&&D.push(a),S&&D.push(o),E){const e=r.makeTensorInfo([],"float32",i.util.createScalarValue(s,"float32"));D.push(e),b.push(e)}const I=r.runWebGLProgram(T,D,"float32"),O=sr({inputs:{x:I},backend:r,attrs:{shape:n.outShape}});b.push(I);for(const i of b)r.disposeIntermediateTensorInfo(i);return O}const Ga={kernelName:i.Conv2D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:o}=t,{strides:s,pad:l,dataFormat:u,dilations:c,dimRoundingMode:d}=r,h=i.backend_util.convertConv2DDataFormat(u),f=i.backend_util.computeConv2DInfo(a.shape,o.shape,s,c,l,d,!1,h);let p;if(1!==f.filterHeight||1!==f.filterWidth||1!==f.dilationHeight||1!==f.dilationWidth||1!==f.strideHeight||1!==f.strideWidth||"SAME"!==f.padInfo.type&&"VALID"!==f.padInfo.type)if(f.strideWidth<=2&&"channelsLast"===h&&(0,i.env)().getBool("WEBGL_EXP_CONV")){const e=new Ua(f),t=[[f.padInfo.top,f.padInfo.left],[f.strideHeight,f.strideWidth],[f.dilationHeight,f.dilationWidth],[f.inHeight,f.inWidth]];p=n.runWebGLProgram(e,[a,o],"float32",t)}else if((0,i.env)().getBool("WEBGL_CONV_IM2COL"))p=Ya({x:a,filter:o,convInfo:f,backend:n});else{const e=new za(f);p=n.runWebGLProgram(e,[a,o],"float32")}else p=$a({x:a,filter:o,convInfo:f,backend:n});const m=sr({inputs:{x:p},backend:n,attrs:{shape:f.outShape}});return n.disposeIntermediateTensorInfo(p),m}};class Xa{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,a=e.padInfo.left,i="channelsLast"===e.dataFormat;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int d2 = coords.w;\n\n // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int b = 0; b < ${e.batchSize}; b++) {\n for (int yR = 0; yR < ${e.outHeight}; yR++) {\n int xR = wR + yR * ${t} - ${r};\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${e.outWidth}; yC++) {\n int xC = wC + yC * ${n} - ${a};\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n ${i?"float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);":"float dyValue = getDy(b, d2, yR, yC);\n float xValue = getX(b, d1, xR, xC);\n dotProd += (xValue * dyValue);"}\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Ka{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,a=e.strideWidth,i="channelsLast"===e.dataFormat,o=t-1-e.padInfo.top,s=n-1-e.padInfo.left,l=i?1:2,u=i?2:3,c=i?3:1;this.userCode=`\n const ivec2 pads = ivec2(${o}, ${s});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[${c}];\n\n ivec2 dyCorner = ivec2(coords[${l}], coords[${u}]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${t}; wR++) {\n float dyR = float(dyRCorner + wR) / ${r}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${t} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n float dyC = float(dyCCorner + wC) / ${a}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${n} - 1 - wC;\n\n for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n\n if (${i}) {\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n } else {\n float xValue = getDy(batch, d2, idyR, idyC);\n float wValue = getW(wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Ja{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,a=e.padInfo.front,i=e.padInfo.top,o=e.padInfo.left;this.userCode=`\n void main() {\n ivec5 coords = getOutputCoords();\n int wF = coords.x;\n int wR = coords.y;\n int wC = coords.z;\n int d1 = coords.w;\n int d2 = coords.u;\n\n float dotProd = 0.0;\n\n for (int b = 0; b < ${e.batchSize}; b++) {\n for (int yF = 0; yF < ${e.outDepth}; yF++) {\n int xF = wF + yF * ${t} - ${a};\n\n if (xF < 0 || xF >= ${e.inDepth}) {\n continue;\n }\n\n for (int yR = 0; yR < ${e.outHeight}; yR++) {\n int xR = wR + yR * ${n} - ${i};\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${e.outWidth}; yC++) {\n int xC = wC + yC * ${r} - ${o};\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yF, yR, yC, d2);\n float xValue = getX(b, xF, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Za{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,a=e.strideDepth,i=e.strideHeight,o=e.strideWidth,s=t-1-e.padInfo.front,l=n-1-e.padInfo.top,u=r-1-e.padInfo.left;this.userCode=`\n const ivec3 pads = ivec3(${s}, ${l}, ${u});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.u;\n\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyFCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n float dotProd = 0.0;\n for (int wF = 0; wF < ${t}; wF++) {\n float dyF = float(dyFCorner + wF) / ${a}.0;\n\n if (dyF < 0.0 || dyF >= ${e.outDepth}.0 || fract(dyF) > 0.0) {\n continue;\n }\n int idyF = int(dyF);\n\n int wFPerm = ${t} - 1 - wF;\n\n for (int wR = 0; wR < ${n}; wR++) {\n float dyR = float(dyRCorner + wR) / ${i}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${n} - 1 - wR;\n\n for (int wC = 0; wC < ${r}; wC++) {\n float dyC = float(dyCCorner + wC) / ${o}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${r} - 1 - wC;\n\n for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n float xValue = getDy(batch, idyF, idyR, idyC, d2);\n float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n dotProd += xValue * wValue;\n }\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const Qa={kernelName:i.Conv2DBackpropFilter,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:o}=t,{strides:s,pad:l,dataFormat:u,dimRoundingMode:c,filterShape:d}=r,h=i.backend_util.convertConv2DDataFormat(u),f=i.backend_util.computeConv2DInfo(a.shape,d,s,1,l,c,!1,h),p=new Xa(f);return n.runWebGLProgram(p,[a,o],"float32")}};class ei{constructor(e){this.variableNames=["dy","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"strides",type:"vec2"}],this.outputShape=e.inShape,this.enableShapeUniforms=je(this.outputShape.length);const t=e.filterHeight,n=e.filterWidth,r=t-1-e.padInfo.top,a=n-1-e.padInfo.left;this.userCode=`\n const ivec2 pads = ivec2(${r}, ${a});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n\n ivec2 dyCorner = ivec2(coords[1], coords[2]) - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n vec4 result = vec4(0.);\n for (int wR = 0; wR < ${t}; wR++) {\n float dyR = float(dyRCorner + wR) / strides[0];\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n int wRPerm = ${t} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n int wCPerm = ${n} - 1 - wC;\n\n float dyC = float(dyCCorner + wC) / strides[1];\n bool idyCVal = (dyC >= 0.0) && (dyC < ${e.outWidth}.0)\n && (fract(dyC) == 0.0);\n int idyC = int(dyC);\n\n float dyC2 = float(dyCCorner + wC + 1) / strides[1];\n bool idyCVal2 = (dyC2 >= 0.0) && (dyC2 < ${e.outWidth}.0)\n && (fract(dyC2) == 0.0);\n int idyC2 = int(dyC2);\n\n if (idyCVal && idyCVal2) {\n for (int d2 = 0; d2 < ${e.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC, d2);\n vec4 dySample2 = (idyC / 2 == idyC2 / 2) ?\n dySample : getDy(batch, idyR, idyC2, d2);\n\n vec2 dyValue = mod(float(idyC), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.xy += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n\n dyValue = mod(float(idyC2), 2.) == 0. ?\n dySample2.xy : dySample2.zw;\n result.zw += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n } else if (idyCVal) {\n for (int d2 = 0; d2 < ${e.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC, d2);\n vec2 dyValue = mod(float(idyC), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.xy += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n } else if (idyCVal2) {\n for (int d2 = 0; d2 < ${e.outChannels}; d2 += 2) {\n vec4 wValue = getW(wRPerm, wCPerm, d1, d2);\n vec4 dySample = getDy(batch, idyR, idyC2, d2);\n vec2 dyValue = mod(float(idyC2), 2.) == 0. ?\n dySample.xy : dySample.zw;\n result.zw += vec2(dot(dyValue, wValue.xy),\n dot(dyValue, wValue.zw));\n }\n }\n }\n }\n setOutput(result);\n }\n `}}const ti={kernelName:i.Conv2DBackpropInput,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:o}=t,{inputShape:s,strides:l,pad:u,dataFormat:c,dimRoundingMode:d}=r,h=i.backend_util.convertConv2DDataFormat(c),f=i.backend_util.computeConv2DInfo(s,o.shape,l,1,u,d,!1,h);if((0,i.env)().getBool("WEBGL_PACK_CONV2DTRANSPOSE")&&"channelsLast"===h){const e=[[f.strideHeight,f.strideWidth]],t=new ei(f);return n.runWebGLProgram(t,[a,o],"float32",e)}{const e=new Ka(f);return n.runWebGLProgram(e,[a,o],"float32")}}};const ni={kernelName:i.Conv3D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:o}=t,{strides:s,pad:l,dilations:u}=r,c=i.backend_util.computeConv3DInfo(a.shape,o.shape,s,u,l),d=new Ha(c);return n.runWebGLProgram(d,[a,o],"float32")}};const ri={kernelName:i.Conv3DBackpropFilterV2,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:o}=t,{strides:s,pad:l,filterShape:u}=r,c=i.backend_util.computeConv3DInfo(a.shape,u,s,1,l),d=new Ja(c);return n.runWebGLProgram(d,[a,o],"float32")}};const ai={kernelName:i.Conv3DBackpropInputV2,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:o}=t,{pad:s,strides:l,inputShape:u}=r,c=i.backend_util.computeConv3DInfo(u,o.shape,l,1,s),d=new Za(c);return n.runWebGLProgram(d,[a,o],"float32")}},ii=Jn({opSnippet:Kn+"\n return cos(x);\n",packedOpSnippet:`\n vec4 result = cos(x);\n bvec4 isNaN = isnan(x);\n ${Bn}\n return result;\n`}),oi={kernelName:i.Cos,backendName:"webgl",kernelFunc:ii},si=Jn({opSnippet:"\n float e2x = exp(-x);\n return (e2x + 1.0 / e2x) / 2.0;\n"}),li={kernelName:i.Cosh,backendName:"webgl",kernelFunc:si};class ui{constructor(e,t,n,r,a){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];const[i,o,s,l]=e,[u]=t,[c,d]=n;this.outputShape=[u,c,d,l];const h="bilinear"===r?1:0,[f,p]=[o-1+".0",s-1+".0"],[m,g,y]=c>1?[""+(o-1)/(c-1),"(y2-y1) * height_ratio",`y1*${f} + float(y)*(height_scale)`]:["0.0","0.0",`0.5 * (y1+y2) * ${f}`],[_,b,v]=d>1?[""+(s-1)/(d-1),"(x2-x1) * width_ratio",`x1*${p} + float(x)*(width_scale)`]:["0.0","0.0",`0.5 * (x1+x2) * ${p}`];this.userCode=`\n const float height_ratio = float(${m});\n const float width_ratio = float(${_});\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int y = coords[1];\n int x = coords[2];\n int d = coords[3];\n\n // get box vals\n float y1 = getBoxes(b,0);\n float x1 = getBoxes(b,1);\n float y2 = getBoxes(b,2);\n float x2 = getBoxes(b,3);\n\n // get image in batch index\n int bInd = round(getBoxInd(b));\n if(bInd < 0 || bInd >= ${i}) {\n return;\n }\n\n float height_scale = ${g};\n float width_scale = ${b};\n\n float in_y = ${y};\n if( in_y < 0.0 || in_y > ${f} ) {\n setOutput(float(${a}));\n return;\n }\n float in_x = ${v};\n if( in_x < 0.0 || in_x > ${p} ) {\n setOutput(float(${a}));\n return;\n }\n\n vec2 sourceFracIndexCR = vec2(in_x,in_y);\n if(${h} == 1) {\n // Compute the four integer indices.\n ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n float top = topLeft + (topRight - topLeft) * fracCR.x;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n float newValue = top + (bottom - top) * fracCR.y;\n setOutput(newValue);\n } else {\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestCR = ivec2(floor(\n sourceFracIndexCR + vec2(0.5,0.5)));\n float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n setOutput(newValue);\n }\n }\n `}}const ci={kernelName:i.CropAndResize,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{image:a,boxes:i,boxInd:o}=t,{cropSize:s,method:l,extrapolationValue:u}=r,c=new ui(a.shape,i.shape,s,l,u);return n.runWebGLProgram(c,[a,i,o],"float32")}};var di;!function(e){e.Prod="*",e.Sum="+"}(di||(di={}));class hi{constructor(e,t,n,r){this.op=e,this.outputShape=t,this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}];const a=this.outputShape.length,i=this.op===di.Prod?"1.0":"0.0",o=n?i:`getX(${fi(a,"coords",this.op)})`,s=this.outputShape[this.outputShape.length-1];let l="",u="";n?(l=r?"end != "+(s-1):"end != 0",u=r?"end + 1":"end - 1"):(l=r?`end + pow2 < ${s}`:"end >= pow2",u=r?"end + pow2":"end - pow2"),this.userCode=`\n void main() {\n ${Pe(a)} coords = getOutputCoords();\n int end = ${pi(a,"coords",this.op)};\n float val = ${o};\n int pow2 = int(pow(2.0, index));\n if (${l}) {\n int idx = ${u};\n ${pi(a,"coords",this.op)} = idx;\n val ${this.op}= getX(${fi(a,"coords",this.op)});\n }\n setOutput(val);\n }\n `}}function fi(e,t,n){if(1===e)return`${t}`;if(2===e)return`${t}.x, ${t}.y`;if(3===e)return`${t}.x, ${t}.y, ${t}.z`;if(4===e)return`${t}.x, ${t}.y, ${t}.z, ${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function pi(e,t,n){if(1===e)return`${t}`;if(2===e)return`${t}.y`;if(3===e)return`${t}.z`;if(4===e)return`${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function mi(e,t,n,r,a,o){const s=t.shape.length,l=i.backend_util.getAxesPermutation([r],s);let u=t;null!=l&&(u=yr({inputs:{x:t},backend:n,attrs:{perm:l}}));const c=i.backend_util.getInnerMostAxes(1,s)[0];if(c!==s-1)throw new Error(`WebGL cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=${r}`);const d=u.shape[c];let h=Vn({inputs:{x:u},backend:n});for(let i=0;i<=Math.ceil(Math.log2(d))-1;i++){const t=new hi(e,u.shape,!1,o),r=[[i]],a=h;h=n.runWebGLProgram(t,[h],h.dtype,r),n.disposeIntermediateTensorInfo(a)}if(a){const t=new hi(e,u.shape,a,o),r=h;h=n.runWebGLProgram(t,[h],h.dtype),n.disposeIntermediateTensorInfo(r)}if(null!=l){const e=yr({inputs:{x:h},backend:n,attrs:{perm:i.backend_util.getUndoAxesPermutation(l)}});return n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(u),e}return h}const gi={kernelName:i.Cumprod,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,exclusive:o,reverse:s}=r;return mi(di.Prod,a,n,i,o,s)}};const yi={kernelName:i.Cumsum,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:i,exclusive:o,reverse:s}=r;return mi(di.Sum,a,n,i,o,s)}};const _i={kernelName:i.DenseBincount,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,weights:i}=t,{size:o,binaryOutput:s}=r;if(1===a.shape.length){const e=n.readSync(a.dataId),t=n.readSync(i.dataId),r=_t(e,t,i.dtype,i.shape,o);return n.makeTensorInfo([o],i.dtype,r)}if(2===a.shape.length){const e=n.bufferSync(a),t=n.bufferSync(i),r=bt(e,t,o,s);return n.makeTensorInfo(r.shape,i.dtype,r.values)}throw new Error(`Error in denseBincount: input must be at most rank 2, but got rank${a.shape.length}.`)}};class bi{constructor(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int h = ${this.getHeightCoordString()};\n int w = ${this.getWidthCoordString()};\n int d = ${this.getDepthCoordString()};\n\n int in_h = h / ${t};\n int offset_h = imod(h, ${t});\n int in_w = w / ${t};\n int offset_w = imod(w, ${t});\n int offset_d = (offset_h * ${t} + offset_w) *\n ${this.getOutputDepthSize()};\n int in_d = d + offset_d;\n\n float result = ${this.getInputSamplingString()};\n setOutput(result);\n }\n `}getHeightCoordString(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"}getWidthCoordString(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"}getDepthCoordString(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"}getOutputDepthSize(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}}const vi={kernelName:i.DepthToSpace,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{blockSize:i,dataFormat:o}=r,s=a.shape[0],l=("NHWC"===o?a.shape[1]:a.shape[2])*i,u=("NHWC"===o?a.shape[2]:a.shape[3])*i,c=("NHWC"===o?a.shape[3]:a.shape[1])/(i*i),d=new bi("NHWC"===o?[s,l,u,c]:[s,c,l,u],i,o);return n.runWebGLProgram(d,[a],a.dtype)}};class wi{constructor(e,t=!1,n=null,r=!1,a=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=je(this.outputShape.length);const i=e.filterHeight,o=e.filterWidth,s=e.outChannels/e.inChannels;let l="",u="";n&&(l=r?`float activation(float a) {\n float b = getPreluActivationWeightsAtOutCoords();\n ${n}\n }`:a?`float activation(float a) {\n float b = getLeakyreluAlphaAtOutCoords();\n ${n}\n }`:`\n float activation(float x) {\n ${n}\n }\n `,u="result = activation(result);");const c=t?"result += getBiasAtOutCoords();":"";t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),a&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n ${l}\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n ivec2 xRCCorner = coords.yz * strides - pads;\n int d2 = coords.w;\n int d1 = d2 / ${s};\n int q = d2 - d1 * ${s};\n\n int xRCorner = xRCCorner.x;\n int xCCorner = xRCCorner.y;\n\n // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n for (int wR = 0; wR < ${i}; wR++) {\n int xR = xRCorner + wR * dilations[0];\n\n if (xR < 0 || xR >= inDims[0]) {\n continue;\n }\n\n for (int wC = 0; wC < ${o}; wC++) {\n int xC = xCCorner + wC * dilations[1];\n\n if (xC < 0 || xC >= inDims[1]) {\n continue;\n }\n\n float xVal = getX(batch, xR, xC, d1);\n float wVal = getW(wR, wC, d1, q);\n dotProd += xVal * wVal;\n }\n }\n\n float result = dotProd;\n ${c}\n ${u}\n setOutput(result);\n }\n `}}class Fi{constructor(e,t=!1,n=null,r=!1,a=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=je(this.outputShape.length);const o=e.outChannels/e.inChannels,s=e.padInfo.left,l=e.strideWidth,u=e.dilationWidth,c=e.filterHeight,d=e.filterWidth,h=d;let f="\n int xR; int xC; int xCOffset;\n vec4 wTexel; vec4 previous; vec4 final;";for(let i=0;i=0 && xR < inDims[0]) {\n ";for(let y=0;y<(h+1)/2;y++){const e=2*y;if(f+=`\n xC = xCCorner + ${e*u};\n `,1===l){if(e= 0 && xCOffset < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n `,f+=1===u&&e>0?`\n xC${e} = vec4(xTexelC${e-2}.zw, xTexelC${e}.xy);\n `:`\n xCOffset = xC + 1 - 2;\n\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n previous.zw = vec2(0.0);\n }\n\n xC${e} = vec4(previous.zw, xTexelC${e}.xy);\n } else {\n xC${e} = vec4(0.0, 0.0, xTexelC${e}.xy);\n }\n `):f+=`\n if (xC >= 0 && xC < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n xC${e} = xTexelC${e};\n `,e+1= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n `,f+=u>1?`\n xCOffset -= 2;\n if (xCOffset >= 0 && xCOffset < inDims[1]) {\n previous = getX(batch, xR, xCOffset, d1);\n xC${e+1} = vec4(previous.zw, xTexelC${e+1}.xy);\n } else {\n xC${e+1} = vec4(0.0, 0.0, xTexelC${e+1}.xy);\n }\n `:`\n xC${e+1} = vec4(xTexelC${e}.zw, xTexelC${e+1}.xy);\n `):f+=1===t?`\n xC${e+1} = xTexelC${e};\n `:`\n xCOffset = xC + ${t};\n\n if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e+1} = xTexelC${e+1};\n `}}else e= 0 && xCOffset < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xCOffset, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xC + 1, d1);\n // Need to manually clear unused channels in case\n // we're reading from recycled texture.\n if (xC + 2 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.0);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e} = vec4(xTexelC${e}.zw, xTexelC${e+1}.zw);\n `,e+1= 0 && xCOffset < inDims[1]) {\n final = getX(batch, xR, xCOffset, d1);\n }\n xC${e+1} = vec4(xTexelC${e+1}.xy, final.xy);\n `)):(f+=`\n if(xC >= 0 && xC < inDims[1] && xTexelC${e}Ready == 0) {\n xTexelC${e} = getX(batch, xR, xC, d1);\n if (xC + 1 >= inDims[1]) {\n xTexelC${e}.zw = vec2(0.0);\n }\n xTexelC${e}Ready = 1;\n }\n\n xCOffset = xC + strides[1];\n if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${e+1}Ready == 0) {\n xTexelC${e+1} = getX(batch, xR, xCOffset, d1);\n if (xCOffset + 1 >= inDims[1]) {\n xTexelC${e+1}.zw = vec2(0.);\n }\n xTexelC${e+1}Ready = 1;\n }\n\n xC${e} = vec4(\n xTexelC${e}.xy, xTexelC${e+1}.xy);\n `,e+1`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${s} and dilations '${d}'`));const h=i.backend_util.computeConv2DInfo(a.shape,o.shape,s,d,l,c,!0);let f;f=(0,i.env)().getBool("WEBGL_PACK_DEPTHWISECONV")&&h.strideWidth<=2&&h.outChannels/h.inChannels===1?new Fi(h):new wi(h);const p=[[h.padInfo.top,h.padInfo.left],[h.strideHeight,h.strideWidth],[h.dilationHeight,h.dilationWidth],[h.inHeight,h.inWidth]];return n.runWebGLProgram(f,[a,o],"float32",p)}};class xi{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;const t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,a=e.padInfo.left,i=e.outChannels/e.inChannels;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int wR = coords.x;\n int wC = coords.y;\n int d1 = coords.z;\n int dm = coords.w;\n int d2 = d1 * ${i} + dm;\n\n float dotProd = 0.0;\n\n // TO DO: Vec4 over the batch size\n for (int b = 0; b < ${e.batchSize}; b++) {\n for (int yR = 0; yR < ${e.outHeight}; yR++) {\n int xR = wR + yR * ${t} - ${r};\n\n if (xR < 0 || xR >= ${e.inHeight}) {\n continue;\n }\n\n for (int yC = 0; yC < ${e.outWidth}; yC++) {\n int xC = wC + yC * ${n} - ${a};\n\n if (xC < 0 || xC >= ${e.inWidth}) {\n continue;\n }\n\n float dyValue = getDy(b, yR, yC, d2);\n float xValue = getX(b, xR, xC, d1);\n dotProd += (xValue * dyValue);\n }\n }\n }\n setOutput(dotProd);\n }\n `}}class Ai{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;const t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,a=e.strideWidth,i=t-1-e.padInfo.top,o=n-1-e.padInfo.left,s=e.outChannels/e.inChannels;this.userCode=`\n const ivec2 pads = ivec2(${i}, ${o});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords[0];\n int d1 = coords[3];\n ivec2 dyCorner = coords.yz - pads;\n int dyRCorner = dyCorner.x;\n int dyCCorner = dyCorner.y;\n\n float dotProd = 0.0;\n\n for (int wR = 0; wR < ${t}; wR++) {\n float dyR = float(dyRCorner + wR) / ${r}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n int wRPerm = ${t} - 1 - wR;\n\n for (int wC = 0; wC < ${n}; wC++) {\n float dyC = float(dyCCorner + wC) / ${a}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n int wCPerm = ${n} - 1 - wC;\n\n // TO DO: Vec4 over the channelMul\n for (int dm = 0; dm < ${s}; dm++) {\n int d2 = d1 * ${s} + dm;\n float xValue = getDy(batch, idyR, idyC, d2);\n float wValue = getW(wRPerm, wCPerm, d1, dm);\n dotProd += xValue * wValue;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const Si={kernelName:i.DepthwiseConv2dNativeBackpropFilter,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,dy:o}=t,{strides:s,dilations:l,pad:u,dimRoundingMode:c,filterShape:d}=r,h=i.backend_util.computeConv2DInfo(a.shape,d,s,l,u,c,!0),f=new xi(h);return n.runWebGLProgram(f,[a,o],"float32")}};const Ei={kernelName:i.DepthwiseConv2dNativeBackpropInput,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,filter:o}=t,{strides:s,dilations:l,pad:u,dimRoundingMode:c,inputShape:d}=r,h=i.backend_util.computeConv2DInfo(d,o.shape,s,l,u,c,!0),f=new Ai(h);return n.runWebGLProgram(f,[a,o],"float32")}};class Ci{constructor(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n setOutput(val);\n }\n "}}const Ti={kernelName:i.Diag,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t,a=[...r.shape,...r.shape],o=i.util.sizeFromShape(r.shape),s=sr({inputs:{x:r},backend:n,attrs:{shape:[o]}}),l=new Ci(o),u=n.runWebGLProgram(l,[s],s.dtype),c=sr({inputs:{x:u},backend:n,attrs:{shape:a}});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(u),c}};class Di{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;const{inHeight:t,inWidth:n,padInfo:r,strideHeight:a,strideWidth:i,filterHeight:o,filterWidth:s,dilationHeight:l,dilationWidth:u}=e,{top:c,left:d}=r;this.userCode=`\n const ivec2 strides = ivec2(${a}, ${i});\n const ivec2 pads = ivec2(${c}, ${d});\n const float neg_infinity = -3.4e38;\n\n void main() {\n ivec4 coords = getOutputCoords();\n int batch = coords.x;\n int d1 = coords.w;\n ivec2 outTopLeftCorner =\n coords.yz * strides - pads;\n int hBeg = outTopLeftCorner.x;\n int wBeg = outTopLeftCorner.y;\n\n float curVal = neg_infinity;\n for (int h = 0; h < ${o}; h++) {\n int hIn = hBeg + h * ${l};\n\n if (hIn >= 0 && hIn < ${t}) {\n for (int w = 0; w < ${s}; w++) {\n int wIn = wBeg + w * ${u};\n\n if (wIn >= 0 && wIn < ${n}) {\n float xVal = getX(batch, hIn, wIn, d1);\n float wVal = getW(h, w, d1);\n\n float val = xVal + wVal;\n if (val > curVal) {\n curVal = val;\n }\n }\n }\n }\n }\n\n float result = curVal;\n setOutput(result);\n }\n `}}const Ii={kernelName:i.Dilation2D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:o}=t,{strides:s,pad:l,dilations:u}=r,c=i.backend_util.computeDilation2DInfo(a.shape,o.shape,s,l,"NHWC",u);let d;const h=new Di(c);d=n.runWebGLProgram(h,[a,o],"float32");const f=sr({inputs:{x:d},backend:n,attrs:{shape:c.outShape}});return n.disposeIntermediateTensorInfo(d),f}};const Oi={kernelName:i.Einsum,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{equation:a}=r,o=t,{allDims:s,summedDims:l,idDims:u}=i.backend_util.decodeEinsumEquation(a,o.length);i.backend_util.checkEinsumDimSizes(s.length,u,o);const{path:c,steps:d}=i.backend_util.getEinsumComputePath(l,u),h=d.length;let f=null,p=s.length;const m=[];for(let g=0;g=0&&(f=mr({inputs:{x:f},backend:n,attrs:{axis:c[g]-(s.length-p),keepDims:!1}}),m.push(f)),p--)}for(const i of m)i!==f&&n.disposeIntermediateTensorInfo(i);return f}},Pi=Jn({opSnippet:"return (x >= 0.0) ? x : (exp(x) - 1.0);",packedOpSnippet:"\n vec4 result;\n\n result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n return result;\n"}),Mi={kernelName:i.Elu,backendName:"webgl",kernelFunc:Pi},Ri={kernelName:i.EluGrad,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n}=e,{dy:r,y:a}=t,o=(0,i.env)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new jn("\n vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",r.shape,a.shape):new Nn("return (b >= 0.0) ? a : a * (b + 1.0);",r.shape,a.shape);return n.runWebGLProgram(o,[r,a],r.dtype)}},Li=Zn({opSnippet:"return float(a == b);",packedOpSnippet:"\n return vec4(equal(a, b));\n",dtype:"bool",cpuKernelImpl:xt}),Ni={kernelName:i.Equal,backendName:"webgl",kernelFunc:Li},Bi=Jn({opSnippet:`\n // Error function is calculated approximately with elementary function.\n // See "Handbook of Mathematical Functions with Formulas,\n // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n float p = ${i.backend_util.ERF_P};\n float a1 = ${i.backend_util.ERF_A1};\n float a2 = ${i.backend_util.ERF_A2};\n float a3 = ${i.backend_util.ERF_A3};\n float a4 = ${i.backend_util.ERF_A4};\n float a5 = ${i.backend_util.ERF_A5};\n\n float sign = sign(x);\n x = abs(x);\n float t = 1.0 / (1.0 + p * x);\n return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`}),ji={kernelName:i.Erf,backendName:"webgl",kernelFunc:Bi},Vi=Jn({opSnippet:Kn+"\n return exp(x);\n",packedOpSnippet:"\n vec4 result = exp(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",cpuKernelImpl:At,dtype:"float32"}),zi={kernelName:i.Exp,backendName:"webgl",kernelFunc:Vi};function Hi(e){const{inputs:t,attrs:n,backend:r}=e,{dim:a}=n,{input:o}=t,s=o.shape.length,l=o.shape.slice();let u=a;return a<0&&(i.util.assert(-(s+1)<=a,(()=>`Axis must be in the interval [${-(s+1)}, ${s}]`)),u=s+a+1),l.splice(u,0,1),sr({inputs:{x:o},backend:r,attrs:{shape:l}})}const Ui={kernelName:i.ExpandDims,backendName:"webgl",kernelFunc:Hi},Wi="return exp(x) - 1.0;",qi=Jn({opSnippet:Wi,packedOpSnippet:Wi,cpuKernelImpl:St}),$i={kernelName:i.Expm1,backendName:"webgl",kernelFunc:qi};class Yi{constructor(e,t,n){this.variableNames=["real","imag"];const r=t[1];this.outputShape=t;const a=n?`2.0 * ${Math.PI}`:`-2.0 * ${Math.PI}`,i=n?`${r}.0`:"1.0";let o;if("real"===e)o="return real * expR - imag * expI;";else{if("imag"!==e)throw new Error(`FFT component must be either "real" or "imag", got ${e}.`);o="return real * expI + imag * expR;"}this.userCode=`\n const float exponentMultiplier = ${a};\n\n float unaryOpComplex(float real, float expR, float imag, float expI) {\n ${o}\n }\n\n float mulMatDFT(int batch, int index) {\n float indexRatio = float(index) / float(${r});\n float exponentMultiplierTimesIndexRatio =\n exponentMultiplier * indexRatio;\n\n float result = 0.0;\n\n for (int i = 0; i < ${r}; i++) {\n // x = (-2|2 * PI / N) * index * i;\n float x = exponentMultiplierTimesIndexRatio * float(i);\n float expR = cos(x);\n float expI = sin(x);\n float real = getReal(batch, i);\n float imag = getImag(batch, i);\n\n result +=\n unaryOpComplex(real, expR, imag, expI) / ${i};\n }\n\n return result;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n setOutput(mulMatDFT(coords[0], coords[1]));\n }\n `}}function Gi(e,t,n){const r=n.texData.get(e.dataId),a=i.util.sizeFromShape(e.shape),o=e.shape[e.shape.length-1],s=sr({inputs:{x:e},backend:n,attrs:{shape:[a/o,o]}}),l=s.shape,u=new Yi("real",l,t),c=new Yi("imag",l,t),d=[{dataId:r.complexTensorInfos.real.dataId,dtype:r.complexTensorInfos.real.dtype,shape:l},{dataId:r.complexTensorInfos.imag.dataId,dtype:r.complexTensorInfos.imag.dtype,shape:l}],h=n.runWebGLProgram(u,d,"float32"),f=n.runWebGLProgram(c,d,"float32"),p=Hn({inputs:{real:h,imag:f},backend:n});n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f);const m=sr({inputs:{x:p},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(p),m}const Xi={kernelName:i.FFT,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{input:r}=t;return Gi(r,!1,n)}};class Ki{constructor(e,t){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=e,this.userCode="\n void main() {\n // Input can be obtained from uniform value.\n setOutput(value);\n }\n "}}function Ji(e){const{backend:t,attrs:n}=e,{shape:r,value:a}=n;let{dtype:o}=n;if(o=o||i.util.inferDtype(a),"string"===o){const e=i.util.getArrayFromDType(o,i.util.sizeFromShape(r));return e.fill(a),t.makeTensorInfo(r,o,e)}{const e=new Ki(r,a),n=[[a]];return t.runWebGLProgram(e,[],o,n)}}const Zi={kernelName:i.Fill,backendName:"webgl",kernelFunc:Ji};class Qi{constructor(e){this.variableNames=["Image"],this.outputShape=[];const t=e[2];this.outputShape=e,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n\n int coordX = ${t} - x - 1;\n float outputValue;\n if(coordX >= 0 && coordX < ${t}) {\n outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n } else {\n outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n }\n setOutput(outputValue);\n }\n `}}const eo={kernelName:i.FlipLeftRight,backendName:"webgl",kernelFunc:({inputs:e,backend:t})=>{const{image:n}=e,r=t,a=new Qi(n.shape);return r.runWebGLProgram(a,[n],n.dtype)}},to="return floor(x);",no=Jn({opSnippet:to,packedOpSnippet:to,cpuKernelImpl:Et}),ro={kernelName:i.Floor,backendName:"webgl",kernelFunc:no},ao=Zn({opSnippet:"\n float s = sign(a) * sign(b);\n int ia = round(a);\n int ib = round(b);\n if (ib != 0) {\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n return float(idiv(ia, ib, s));\n } else {\n return NAN;\n }\n",packedOpSnippet:"\n ivec4 ia = round(a);\n ivec4 ib = round(b);\n bvec4 cond = notEqual(ib, ivec4(0));\n ivec4 result = ivec4(0);\n vec4 s = sign(a) * sign(b);\n\n // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n if (cond[0]) {\n result[0] = idiv(ia[0], ib[0], s[0]);\n }\n if (cond[1]) {\n result[1] = idiv(ia[1], ib[1], s[1]);\n }\n if (cond[2]) {\n result[2] = idiv(ia[2], ib[2], s[2]);\n }\n if (cond[3]) {\n result[3] = idiv(ia[3], ib[3], s[3]);\n }\n return vec4(result);\n",dtype:"int32"}),io={kernelName:i.FloorDiv,backendName:"webgl",kernelFunc:ao};class oo{constructor(e){this.variableNames=["A"];const t=ge(),[n,r]=e;this.outputShape=e,this.userCode=`\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${r}.0, ${n}.0);\n\n vec4 values = ${t.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n setOutput(floor(value * 255.0 + 0.5));\n }\n `}}class so{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;const t=ge(),[n,r]=e;this.outputShape=e,this.userCode=`\n void main() {\n ivec3 coords = getOutputCoords();\n int texR = coords[0];\n int texC = coords[1];\n int depth = coords[2];\n\n vec4 result = vec4(0.);\n\n for(int row=0; row<=1; row++) {\n for(int col=0; col<=1; col++) {\n texC = coords[1] + row;\n depth = coords[2] + col;\n\n vec2 uv = (vec2(texC, texR) + halfCR) /\n vec2(${r}.0, ${n}.0);\n vec4 values = ${t.texture2D}(A, uv);\n float value;\n if (depth == 0) {\n value = values.r;\n } else if (depth == 1) {\n value = values.g;\n } else if (depth == 2) {\n value = values.b;\n } else if (depth == 3) {\n value = values.a;\n }\n\n result[row * 2 + col] = floor(value * 255.0 + 0.5);\n }\n }\n\n ${t.output} = result;\n }\n `}}const lo={kernelName:i.FromPixels,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;let{pixels:a}=t;const{numChannels:o}=r,s="undefined"!==typeof HTMLVideoElement&&a instanceof HTMLVideoElement,l="undefined"!==typeof HTMLImageElement&&a instanceof HTMLImageElement,[u,c]=s?[a.videoWidth,a.videoHeight]:[a.width,a.height],h=[c,u],f=[c,u,o];if(l||s){const e=(0,i.env)().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");null!=uo&&e===co||(co=e,uo=document.createElement("canvas").getContext("2d",{willReadFrequently:co})),uo.canvas.width=u,uo.canvas.height=c,uo.drawImage(a,0,0,u,c),a=uo.canvas}const p=n.makeTensorInfo(h,"int32");n.texData.get(p.dataId).usage=d.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(p.dataId),a);const m=(0,i.env)().getBool("WEBGL_PACK")?new so(f):new oo(f),g=n.runWebGLProgram(m,[p],"int32");return n.disposeData(p.dataId),g}};let uo,co=(0,i.env)().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");const ho={kernelName:i.FusedConv2D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:o,bias:s,preluActivationWeights:l}=t,{strides:u,pad:c,dataFormat:d,dilations:h,dimRoundingMode:f,activation:p,leakyreluAlpha:m}=r,g=i.backend_util.convertConv2DDataFormat(d),y=i.backend_util.computeConv2DInfo(a.shape,o.shape,u,h,c,f,!1,g);let _;const b=[],v=null!=s,w=null!=l,F="leakyrelu"===p,k=()=>{const e=[a,o],t=(e,t)=>{if("NCHW"===t&&1===e.shape.length&&1!==e.shape[0]){const t=sr({inputs:{x:e},backend:n,attrs:{shape:[e.shape[0],1,1]}});return b.push(t),t}return e};if(v&&e.push(t(s,d)),w&&e.push(t(l,d)),F){const t=n.makeTensorInfo([],"float32",i.util.createScalarValue(m,"float32"));e.push(t),b.push(t)}return e};if(1!==y.filterHeight||1!==y.filterWidth||1!==y.dilationHeight||1!==y.dilationWidth||1!==y.strideHeight||1!==y.strideWidth||"SAME"!==y.padInfo.type&&"VALID"!==y.padInfo.type)if(y.strideWidth<=2&&"channelsLast"===g&&(0,i.env)().getBool("WEBGL_EXP_CONV")){const e=p?Qn(p,!0):null,t=new Ua(y,v,e,w,F),r=[[y.padInfo.top,y.padInfo.left],[y.strideHeight,y.strideWidth],[y.dilationHeight,y.dilationWidth],[y.inHeight,y.inWidth]],a=k();_=n.runWebGLProgram(t,a,"float32",r)}else if((0,i.env)().getBool("WEBGL_CONV_IM2COL"))_=Ya({x:a,filter:o,convInfo:y,backend:n,bias:s,activation:p,preluActivationWeights:l,leakyreluAlpha:m});else{const e=p?Qn(p,!1):null,t=new za(y,v,e,w,F),r=k();_=n.runWebGLProgram(t,r,"float32")}else _=$a({x:a,filter:o,convInfo:y,backend:n,bias:s,activation:p,preluActivationWeights:l,leakyreluAlpha:m});const x=sr({inputs:{x:_},backend:n,attrs:{shape:y.outShape}});return b.push(_),b.forEach((e=>n.disposeIntermediateTensorInfo(e))),x}};const fo={kernelName:i.FusedDepthwiseConv2D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,filter:o,bias:s,preluActivationWeights:l}=t,{strides:u,pad:c,dilations:d,dimRoundingMode:h,activation:f,leakyreluAlpha:p}=r,m=[];let g=d;null==g&&(g=[1,1]),i.util.assert(i.backend_util.eitherStridesOrDilationsAreOne(u,g),(()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${u} and dilations '${g}'`));const y=i.backend_util.computeConv2DInfo(a.shape,o.shape,u,g,c,h,!0),_=(0,i.env)().getBool("WEBGL_PACK_DEPTHWISECONV")&&y.strideWidth<=2&&y.outChannels/y.inChannels===1,b=f?Qn(f,_):null,v=[a,o],w=null!=s,F=null!=l,k="leakyrelu"===f;if(w&&v.push(s),F&&v.push(l),k){const e=n.makeTensorInfo([],"float32",i.util.createScalarValue(p,"float32"));v.push(e),m.push(e)}let x;x=_?new Fi(y,w,b,F,k):new wi(y,w,b,F,k);const A=[[y.padInfo.top,y.padInfo.left],[y.strideHeight,y.strideWidth],[y.dilationHeight,y.dilationWidth],[y.inHeight,y.inWidth]],S=n.runWebGLProgram(x,v,"float32",A);return m.forEach((e=>n.disposeIntermediateTensorInfo(e))),S}};class po{constructor(e,t,n,r){this.sliceDim=e,this.strides=t,this.paramsShape=r,this.variableNames=["x","indices"],this.outputShape=n;const a=Pe(n.length);let i="\n int index;";for(let o=0;o= ${this.paramsShape[o]};\n flattenIndex += index * ${this.strides[o]};`;this.userCode=`\n void main() {\n ${a} coords = getOutputCoords();\n int flattenIndex = 0;\n bool out_of_bounds = false;\n\n ${i}\n\n setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1]));\n }\n `}}const mo={kernelName:i.GatherNd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{params:r,indices:a}=t,o=a.shape,s=o[o.length-1],l=i.util.sizeFromShape(r.shape),[u,c,d,h]=i.backend_util.prepareAndValidate(r,a),f=sr({inputs:{x:a},backend:n,attrs:{shape:[c,s]}}),p=sr({inputs:{x:r},backend:n,attrs:{shape:[i.util.sizeFromShape(r.shape)/d,d]}});if(n.shouldExecuteOnCPU([r,a])||"string"===r.dtype){const e=n.readSync(a.dataId),t=n.bufferSync(r),i=Ct(e,t,r.dtype,c,s,d,h,r.shape,l);return n.makeTensorInfo(u,r.dtype,i.values)}const m=new po(s,h,[c,d],r.shape),g=n.runWebGLProgram(m,[p,f],p.dtype),y=sr({inputs:{x:g},backend:n,attrs:{shape:u}});return n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(g),y}};class go{constructor(e,t){this.variableNames=["A","indices"],this.outputShape=t,this.rank=t.length;const n=Pe(this.rank),r=function(e){const t=["resRC.x","resRC.y","resRC.z","resRC.w"],n=[];for(let r=0;r= 0) && (index < ${e[2]}) ? 1.0 : 0.0;\n setOutput(inBounds * getA(${r}));\n }\n `}}function yo(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,indices:o}=t,{axis:s,batchDims:l}=r,u=i.util.parseAxisParam(s,a.shape)[0];if((0,i.env)().get("DEBUG")){const e=n.readSync(o.dataId),t=a.shape[u];for(let n=0;n=0,(()=>`GatherV2: the index value ${r} is not in [0, ${t-1}]`))}}const c=i.backend_util.segment_util.collectGatherOpShapeInfo(a,o,u,l),d=i.util.sizeFromShape(o.shape),h=[],f=sr({inputs:{x:a},backend:n,attrs:{shape:[c.batchSize,c.outerSize,c.dimSize,c.sliceSize]}}),p=sr({inputs:{x:o},backend:n,attrs:{shape:[c.batchSize,d/c.batchSize]}});h.push(f),h.push(p);const m=[c.batchSize,c.outerSize,d/c.batchSize,c.sliceSize];if(n.shouldExecuteOnCPU([a,o])||"string"===a.dtype){const e=n.bufferSync(p),t=n.bufferSync(f),r=Tt(t,e,m);return h.forEach((e=>n.disposeIntermediateTensorInfo(e))),n.makeTensorInfo(c.outputShape,r.dtype,r.values)}const g=new go(f.shape,m),y=n.runWebGLProgram(g,[f,p],f.dtype);h.push(y);const _=sr({inputs:{x:y},backend:n,attrs:{shape:c.outputShape}});return h.forEach((e=>n.disposeIntermediateTensorInfo(e))),_}const _o={kernelName:i.GatherV2,backendName:"webgl",kernelFunc:yo},bo=Zn({opSnippet:"return float(a > b);",packedOpSnippet:"\n return vec4(greaterThan(a, b));\n",cpuKernelImpl:Dt,dtype:"bool"}),vo={kernelName:i.Greater,backendName:"webgl",kernelFunc:bo},wo=Zn({opSnippet:"return float(a >= b);",packedOpSnippet:"\n return vec4(greaterThanEqual(a, b));\n",dtype:"bool",cpuKernelImpl:It}),Fo={kernelName:i.GreaterEqual,backendName:"webgl",kernelFunc:wo};const ko={kernelName:i.IFFT,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{input:r}=t;return Gi(r,!0,n)}},xo=Jn({opSnippet:"return float(!isnan(x) && !isinf(x));",dtype:"bool"}),Ao={kernelName:i.IsFinite,backendName:"webgl",kernelFunc:xo},So=Jn({opSnippet:"return float(isinf(x));",dtype:"bool"}),Eo={kernelName:i.IsInf,backendName:"webgl",kernelFunc:So},Co=Jn({opSnippet:"return float(isnan(x));",dtype:"bool"}),To={kernelName:i.IsNan,backendName:"webgl",kernelFunc:Co},Do=Zn({opSnippet:"return float(a < b);",packedOpSnippet:"\n return vec4(lessThan(a, b));\n",cpuKernelImpl:Ot,dtype:"bool"}),Io={kernelName:i.Less,backendName:"webgl",kernelFunc:Do},Oo=Zn({opSnippet:"return float(a <= b);",packedOpSnippet:"\n return vec4(lessThanEqual(a, b));\n",cpuKernelImpl:Pt,dtype:"bool"}),Po={kernelName:i.LessEqual,backendName:"webgl",kernelFunc:Oo};const Mo={kernelName:i.LinSpace,backendName:"webgl",kernelFunc:function(e){const{backend:t,attrs:n}=e,{start:r,stop:a,num:i}=n,o=Mt(r,a,i);return t.makeTensorInfo([o.length],"float32",o)}},Ro=Jn({opSnippet:Kn+"\n return x < 0.0 ? 0./0. : log(x);\n",packedOpSnippet:"\n vec4 result = log(x);\n bvec4 isNaN = isnan(x);\n result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n return result;\n",cpuKernelImpl:Rt}),Lo={kernelName:i.Log,backendName:"webgl",kernelFunc:Ro},No=Jn({opSnippet:Kn+"\n return log(1.0 + x);\n"}),Bo={kernelName:i.Log1p,backendName:"webgl",kernelFunc:No},jo=Zn({opSnippet:"return float(a >= 1.0 && b >= 1.0);",packedOpSnippet:"\n return vec4(\n vec4(greaterThanEqual(a, vec4(1.0))) *\n vec4(greaterThanEqual(b, vec4(1.0))));\n",dtype:"bool"}),Vo={kernelName:i.LogicalAnd,backendName:"webgl",kernelFunc:jo},zo=Jn({opSnippet:"return float(!(x >= 1.0));"}),Ho={kernelName:i.LogicalNot,backendName:"webgl",kernelFunc:zo},Uo=Zn({opSnippet:"return float(a >= 1.0 || b >= 1.0);",packedOpSnippet:"\n return min(\n vec4(greaterThanEqual(a, vec4(1.0))) +\n vec4(greaterThanEqual(b, vec4(1.0))),\n vec4(1.0));\n",dtype:"bool"}),Wo={kernelName:i.LogicalOr,backendName:"webgl",kernelFunc:Uo};class qo{constructor(e,t,n,r,a){this.variableNames=["x"],this.outputShape=[];const i=t,o=e[3]-1;let s;this.outputShape=e;const l=`float(${n}) + float(${r}) * sum`;s=.5===a?`inversesqrt(${l})`:1===a?`1.0/(${l})`:`exp(log(${l}) * float(-${a}));`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n int d = coords[3];\n float x = getX(b, r, c, d);\n float sum = 0.0;\n for (int j = -${i}; j <= ${i}; j++) {\n int idx = d + j;\n if (idx >= 0 && idx <= ${o}) {\n float z = getX(b, r, c, idx);\n sum += z * z;\n }\n }\n float val = x * ${s};\n setOutput(val);\n }\n `}}class $o{constructor(e,t,n,r,a){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;const i=t,o=e[3]-1;let s;this.outputShape=e;const l=`float(${n}) + float(${r}) * sum`;s=.5===a?`inversesqrt(${l})`:1===a?`1.0/(${l})`:`exp(log(${l}) * float(-${a}));`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords.x;\n int r = coords.y;\n int c = coords.z;\n int d = coords.w;\n\n bool hasNextCol = d < ${this.outputShape[3]};\n bool hasNextRow = c < ${this.outputShape[2]};\n\n vec4 sum = vec4(0.);\n vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n vec4 xAtOutputCoords = vec4(\n getChannel(xFragAtOutputCoords, vec2(c, d)),\n hasNextCol ?\n getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n hasNextRow ?\n getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n (hasNextRow && hasNextCol) ?\n getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n );\n\n int firstChannel = d - ${i};\n vec2 cache = vec2(0.);\n if(firstChannel >= 0){\n vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n if(hasNextRow){\n cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n }\n }\n\n ivec2 depth = ivec2(d, d + 1);\n for (int j = - ${i}; j <= ${i}; j++) {\n ivec2 idx = depth + j;\n bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${o}));\n\n bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n if(depthInRange || depthPlusOneInRange){\n vec4 z = vec4(0.);\n vec4 xFragAtCurrentDepth;\n z.xz = cache.xy;\n if(depthPlusOneInRange && hasNextCol){\n xFragAtCurrentDepth = idx.y != d ?\n getX(b, r, c, idx.y) : xFragAtOutputCoords;\n z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n if(hasNextRow){\n z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n }\n }\n cache.xy = z.yw;\n sum += z * z;\n }\n }\n vec4 result = xAtOutputCoords * ${s};\n setOutput(result);\n }\n `}}const Yo={kernelName:i.LRN,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{depthRadius:o,bias:s,alpha:l,beta:u}=r,c=(0,i.env)().getBool("WEBGL_PACK_NORMALIZATION")?new $o(a.shape,o,s,l,u):new qo(a.shape,o,s,l,u);return n.runWebGLProgram(c,[a],a.dtype)}};class Go{constructor(e,t,n,r,a){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=r,this.beta=a,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int r = coords[1];\n int c = coords[2];\n\n float result = 0.0;\n for (int d = 0; d < ${this.depth}; ++d) {\n int depthBegin = int(max(0.0, float(d - ${t})));\n int depthEnd = int(min(float(${this.depth}),\n float(d + ${t} + 1)));\n\n const int MIN_DEPTH_BEGIN = 0;\n const int MAX_DEPTH_END = ${this.depth};\n\n float norm = 0.0;\n for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd) {\n norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n }\n else {\n break;\n }\n }\n\n norm = float(${r}) * norm + float(${n});\n\n for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n if (k < depthBegin){\n continue;\n }\n else if (k >= depthBegin && k < depthEnd){\n float dyi = -2.0 * float(${r})\n * float(${a})\n * getInputImage(b, r, c, k) * getOutputImage(b, r, c, d)\n / norm;\n if (k == d) {\n dyi += pow(norm, -1.0 * ${a});\n }\n if (k == coords[3]) {\n dyi *= getDy(b, r, c, d);\n result += dyi;\n }\n }\n else {\n break;\n }\n }\n }\n setOutput(result);\n }\n `}}const Xo={kernelName:i.LRNGrad,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a,y:i,dy:o}=t,{depthRadius:s,bias:l,alpha:u,beta:c}=r,d=new Go(a.shape,s,l,u,c);return n.runWebGLProgram(d,[a,i,o],a.dtype)}};function Ko(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{reductionIndices:o,keepDims:s}=r,l=a.shape.length,u=i.util.parseAxisParam(o,a.shape);let c=u;const d=i.backend_util.getAxesPermutation(c,l),h=null!=d,f=n.shouldExecuteOnCPU([a]);let p=a;if(h){if(f){const e=n.texData.get(p.dataId).values,t=new Array(l);for(let n=0;n`Error in maxPool: Either strides or dilations must be 1. Got strides ${s} and dilations '1'`));const c=i.backend_util.computePool2DInfo(a.shape,o,s,1,l,u);if(1===c.filterWidth&&1===c.filterHeight&&i.util.arraysEqual(c.inShape,c.outShape))return Vn({inputs:{x:a},backend:n});const d=new Zr(c,"max",!1);return n.runWebGLProgram(d,[a],a.dtype)}};const ts={kernelName:i.MaxPool3D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{filterSize:o,strides:s,pad:l,dataFormat:u,dimRoundingMode:c}=r,d=i.backend_util.computePool3DInfo(a.shape,o,s,[1,1,1],l,c,u),h=new Qr(d,"max",!1);return n.runWebGLProgram(h,[a],a.dtype)}};class ns{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;const t=e.strideHeight,n=e.strideWidth,r=e.dilationHeight,a=e.effectiveFilterHeight,i=e.effectiveFilterWidth,o=a-1-e.padInfo.top,s=i-1-e.padInfo.left,l=a*i-1;this.userCode=`\n const ivec2 pads = ivec2(${o}, ${s});\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n\n ivec2 dyRCCorner = coords.yz - pads;\n int dyRCorner = dyRCCorner.x;\n int dyCCorner = dyRCCorner.y;\n\n // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n for (int wR = 0; wR < ${a};\n wR += ${r}) {\n float dyR = float(dyRCorner + wR) / ${t}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${i}; wC++) {\n float dyC = float(dyCCorner + wC) / ${n}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(b, idyR, idyC, d);\n int maxPosValue = ${l} - int(getMaxPos(b, idyR, idyC, d));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue = wR * ${i} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n setOutput(dotProd);\n }\n `}}class rs{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;const t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,a=e.dilationDepth,i=e.dilationHeight,o=e.dilationWidth,s=e.effectiveFilterDepth,l=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=s-1-e.padInfo.front,d=l-1-e.padInfo.top,h=u-1-e.padInfo.left,f=s*l*u-1;this.userCode=`\n const ivec3 pads = ivec3(${c}, ${d}, ${h});\n\n void main() {\n ivec5 coords = getOutputCoords();\n int batch = coords.x;\n int ch = coords.u;\n\n ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n int dyDCorner = dyCorner.x;\n int dyRCorner = dyCorner.y;\n int dyCCorner = dyCorner.z;\n\n // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n // dx(xD, xR, xC, ch).\n // ? = to be determined. : = across all values in that axis.\n float dotProd = 0.0;\n\n for (int wD = 0; wD < ${s};\n wD += ${a}) {\n float dyD = float(dyDCorner + wD) / ${t}.0;\n\n if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n continue;\n }\n int idyD = int(dyD);\n\n for (int wR = 0; wR < ${l};\n wR += ${i}) {\n float dyR = float(dyRCorner + wR) / ${n}.0;\n\n if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n fract(dyR) > 0.0) {\n continue;\n }\n int idyR = int(dyR);\n\n for (int wC = 0; wC < ${u};\n wC += ${o}) {\n float dyC = float(dyCCorner + wC) / ${r}.0;\n\n if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n fract(dyC) > 0.0) {\n continue;\n }\n int idyC = int(dyC);\n\n float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n int maxPosValue = ${f} -\n int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n // Get the current value, check it against the value from the\n // position matrix.\n int curPosValue =\n wD * ${l} * ${u} +\n wR * ${u} + wC;\n float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n dotProd += dyValue * mask;\n }\n }\n }\n setOutput(dotProd);\n }\n `}}const as={kernelName:i.MaxPool3DGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:o}=t,s=o,{filterSize:l,strides:u,pad:c,dimRoundingMode:d}=r,h=i.backend_util.computePool3DInfo(s.shape,l,u,[1,1,1],c,d),f=new Qr(h,"max",!0),p=n.runWebGLProgram(f,[s],s.dtype),m=new rs(h),g=n.runWebGLProgram(m,[a,p],s.dtype);return n.disposeIntermediateTensorInfo(p),g}};const is={kernelName:i.MaxPoolGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{dy:a,input:o,output:s}=t,l=o;pe([o,s],"maxPoolGrad");const{filterSize:u,strides:c,pad:d,dimRoundingMode:h}=r,f=i.backend_util.computePool2DInfo(l.shape,u,c,1,d,h),p=new Zr(f,"max",!0),m=n.runWebGLProgram(p,[l],l.dtype),g=new ns(f),y=n.runWebGLProgram(g,[a,m],l.dtype);return n.disposeIntermediateTensorInfo(m),y}};const os={kernelName:i.MaxPoolWithArgmax,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{x:r}=e,{filterSize:a,strides:o,pad:s,includeBatchInIndex:l}=t,u=n;i.util.assert(4===r.shape.length,(()=>`Error in maxPool: input must be rank 4 but got rank ${r.shape.length}.`));const c=[1,1];i.util.assert(i.backend_util.eitherStridesOrDilationsAreOne(o,c),(()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${c}'`));const d=i.backend_util.computePool2DInfo(r.shape,a,o,c,s),[h,f]=function(e,t,n,r){let a=new Zr(n,"max",!1);const i=r.runWebGLProgram(a,[e],"float32");return a=new Zr(n,"max",!0,!0,t),[i,r.runWebGLProgram(a,[e],"float32")]}(r,l,d,u);return[h,f]}};const ss={kernelName:i.Mean,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{x:r}=e,{keepDims:a,axis:o}=t,s=n,l=r.shape.length,u=i.util.parseAxisParam(o,r.shape);let c=u;const d=i.backend_util.getAxesPermutation(c,l),h=null!=d,f=s.shouldExecuteOnCPU([r]),p=[];let m=r;if(h){if(f){const e=s.texData.get(m.dataId).values,t=new Array(l);for(let a=0;at[0]+e[n]+t[1]));const r=e.length,a=Pe(r),i=t.map((e=>e[0])).join(","),o=t.map(((t,n)=>t[0]+e[n])).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r),l="reflect"===n?0:1;this.userCode=1!==r?`\n ${a} start = ${a}(${i});\n ${a} end = ${a}(${o});\n\n void main() {\n ${a} outC = getOutputCoords();\n for (int i = 0; i < ${r}; i++) {\n if (outC[i] < start[i]) {\n outC[i] = start[i] * 2 - outC[i] - ${l};\n } else if(outC[i] >= end[i]) {\n outC[i] = (end[i] - 1) * 2 - outC[i] + ${l};\n }\n }\n ${a} coords = outC - start;\n setOutput(getX(${s}));\n }\n `:`\n int start = ${i};\n int end = ${o};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start) {\n outC = start * 2 - outC - ${l};\n } else if(outC >= end) {\n outC = (end - 1) * 2 - outC + ${l};\n }\n setOutput(getX(outC - start));\n }\n `}}class hs{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map(((t,n)=>t[0]+e[n]+t[1]));const r=e.length,a=Pe(r),i=t.map((e=>e[0])).join(","),o=t.map(((t,n)=>t[0]+e[n])).join(","),s=pn("rc",r),l=pn("source",r),u=`${s[r-1]} < ${this.outputShape[r-1]}`,c=1===r?"source":`vec2(${l.slice(-2).join()})`,d="reflect"===n?0:1;let h="";if(1===r){const e=`\n ${a} source = rc;\n if (source < start) {\n source = start * 2 - source - ${d};\n } else if (source >= end) {\n source = (end - 1) * 2 - source + ${d};\n }\n source -= start;\n `;h=`\n ${a} rc = outputLoc;\n ${e}\n result[0] = getChannel(getX(${l.join()}), ${c});\n ${s[r-1]} += 1;\n if(${u}) {\n ${e}\n result[1] = getChannel(getX(${l.join()}), ${c});\n }\n `}else{const e=`\n ${a} source = rc;\n ${a} lt = ${a}(lessThan(source, start));\n ${a} gte = ${a}(greaterThanEqual(source, end));\n ${a} orig = 1 - (lt + gte);\n source = orig * source +\n lt * (start * 2 - source - ${d}) +\n gte * ((end - 1) * 2 - source + ${d});\n source -= start;\n `;h=`\n ${a} rc = outputLoc;\n ${e}\n result[0] = getChannel(getX(${l.join()}), ${c});\n ${s[r-1]} += 1;\n if(${u}) {\n ${e}\n result[1] = getChannel(getX(${l.join()}), ${c});\n }\n rc = outputLoc;\n ${s[r-2]} += 1;\n if(${s[r-2]} < ${this.outputShape[r-2]}) {\n ${e}\n result[2] = getChannel(getX(${l.join()}), ${c});\n ${s[r-1]} += 1;\n if(${u}) {\n ${e}\n result[3] = getChannel(getX(${l.join()}), ${c});\n }\n }\n `}this.userCode=`\n const ${a} start = ${a}(${i});\n const ${a} end = ${a}(${o});\n\n void main() {\n ${a} outputLoc = getOutputCoords();\n vec4 result = vec4(0.);\n ${h}\n setOutput(result);\n }\n `}}const fs={kernelName:i.MirrorPad,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r}=e,{paddings:a,mode:o}=n,s=(0,i.env)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new hs(r.shape,a,o):new ds(r.shape,a,o);return t.runWebGLProgram(s,[r],r.dtype)}},ps=Zn({opSnippet:"if (b == 0.0) return NAN;\n return mod(a, b);",packedOpSnippet:"\n vec4 result = mod(a, b);\n bvec4 isNaN = equal(b, vec4(0.0));\n "+Bn+"\n return result;\n"}),ms={kernelName:i.Mod,backendName:"webgl",kernelFunc:ps};class gs{constructor(e,t,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[e,n],this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n\n float r = random(seed);\n float cdf = 0.0;\n\n for (int i = 0; i < ${t-1}; i++) {\n cdf += getProbs(batch, i);\n\n if (r < cdf) {\n setOutput(float(i));\n return;\n }\n }\n\n // If no other event happened, last event happened.\n setOutput(float(${t-1}));\n }\n `}}const ys=Zn({opSnippet:"\nif (a == b) {\n return 1.0;\n};\nreturn a / b;",packedOpSnippet:"\n // vec4 one = vec4(equal(a, b));\n // return one + (vec4(1.0) - one) * a / b;\n vec4 result = a / b;\n if(a.x == b.x) {\n result.x = 1.;\n }\n if(a.y == b.y) {\n result.y = 1.;\n }\n if(a.z == b.z) {\n result.z = 1.;\n }\n if(a.w == b.w) {\n result.w = 1.;\n }\n\n return result;\n",checkOutOfBounds:!0}),_s={kernelName:i.RealDiv,backendName:"webgl",kernelFunc:ys},bs="return a - b;",vs=Zn({opSnippet:bs,packedOpSnippet:bs,supportsComplex:!0,cpuKernelImpl:ln}),ws={kernelName:i.Sub,backendName:"webgl",kernelFunc:vs};function Fs(e){const{inputs:t,backend:n,attrs:r}=e,{logits:a}=t,{dim:o}=r,s=i.util.parseAxisParam([o],a.shape),l=Ko({inputs:{x:a},backend:n,attrs:{reductionIndices:s,keepDims:!1}}),u=i.backend_util.expandShapeToKeepDim(l.shape,s),c=sr({inputs:{x:l},backend:n,attrs:{shape:u}}),d=vs({inputs:{a:a,b:c},backend:n}),h=Vi({inputs:{x:d},backend:n}),f=mr({inputs:{x:h},backend:n,attrs:{axis:s,keepDims:!1}}),p=sr({inputs:{x:f},backend:n,attrs:{shape:u}}),m=ys({inputs:{a:h,b:p},backend:n});return n.disposeIntermediateTensorInfo(l),n.disposeIntermediateTensorInfo(c),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(f),n.disposeIntermediateTensorInfo(p),m}const ks={kernelName:i.Softmax,backendName:"webgl",kernelFunc:Fs};const xs={kernelName:i.Multinomial,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{logits:a}=t,{numSamples:i,seed:o,normalized:s}=r,l=s?a:Fs({inputs:{logits:a},backend:n,attrs:{dim:a.shape.length-1}}),u=l.shape[0],c=l.shape[1],d=new gs(u,c,i),h=[[o]],f=n.runWebGLProgram(d,[l],"int32",h);return s||n.disposeIntermediateTensorInfo(l),f}},As=Fn+"\n return -x;\n";const Ss={kernelName:i.Neg,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{x:r}=t;if(n.shouldExecuteOnCPU([r])){const e=n.texData.get(r.dataId),[t,a]=Vt(e.values,r.shape,r.dtype);return n.makeTensorInfo(a,r.dtype,t)}let a;return a=(0,i.env)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new En(r.shape,"\n vec4 result = -x;\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"):new wn(r.shape,As),n.runWebGLProgram(a,[r],r.dtype)}},Es=i.kernel_impls.nonMaxSuppressionV3Impl;const Cs={kernelName:i.NonMaxSuppressionV3,backendName:"webgl",kernelFunc:function(e){i.backend_util.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:o}=t,{maxOutputSize:s,iouThreshold:l,scoreThreshold:u}=r,c=n.readSync(a.dataId),d=n.readSync(o.dataId),{selectedIndices:h}=Es(c,d,s,l,u);return n.makeTensorInfo([h.length],"int32",new Int32Array(h))}},Ts=i.kernel_impls.nonMaxSuppressionV4Impl;const Ds={kernelName:i.NonMaxSuppressionV4,backendName:"webgl",kernelFunc:function(e){i.backend_util.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:o}=t,{maxOutputSize:s,iouThreshold:l,scoreThreshold:u,padToMaxOutputSize:c}=r,d=n.readSync(a.dataId),h=n.readSync(o.dataId),{selectedIndices:f,validOutputs:p}=Ts(d,h,s,l,u,c);return[n.makeTensorInfo([f.length],"int32",new Int32Array(f)),n.makeTensorInfo([],"int32",new Int32Array([p]))]}},Is=i.kernel_impls.nonMaxSuppressionV5Impl;const Os={kernelName:i.NonMaxSuppressionV5,backendName:"webgl",kernelFunc:function(e){i.backend_util.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e,{boxes:a,scores:o}=t,{maxOutputSize:s,iouThreshold:l,scoreThreshold:u,softNmsSigma:c}=r,d=n.readSync(a.dataId),h=n.readSync(o.dataId),f=s,p=l,m=u,g=c,{selectedIndices:y,selectedScores:_}=Is(d,h,f,p,m,g);return[n.makeTensorInfo([y.length],"int32",new Int32Array(y)),n.makeTensorInfo([_.length],"float32",new Float32Array(_))]}};class Ps{constructor(e,t,n,r){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode=`\n void main() {\n ivec2 coords = getOutputCoords();\n int index = round(getIndices(coords.x));\n setOutput(mix(float(${r}), float(${n}),\n float(index == coords.y)));\n }\n `}}const Ms={kernelName:i.OneHot,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{indices:a}=t,{dtype:o,depth:s,onValue:l,offValue:u}=r,c=i.util.sizeFromShape(a.shape),d=new Ps(c,s,l,u),h=sr({inputs:{x:a},backend:n,attrs:{shape:[c]}}),f=n.runWebGLProgram(d,[h],o);n.disposeIntermediateTensorInfo(h);const p=sr({inputs:{x:f},backend:n,attrs:{shape:[...a.shape,s]}});return n.disposeIntermediateTensorInfo(f),p}};function Rs(e){const{inputs:t,backend:n}=e,{x:r}=t;if("complex64"===r.dtype){const e=wa({inputs:{input:r},backend:n}),t=Rs({inputs:{x:e},backend:n}),a=La({inputs:{input:r},backend:n}),i=Rs({inputs:{x:a},backend:n}),o=Hn({inputs:{real:t,imag:i},backend:n});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(t),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(i),o}return Ji({attrs:{shape:r.shape,dtype:r.dtype,value:"string"===r.dtype?"":0},backend:n})}const Ls={kernelName:i.ZerosLike,backendName:"webgl",kernelFunc:Rs};const Ns={kernelName:i.OnesLike,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t,{x:a}=n;if("string"===a.dtype)throw new Error("onesLike is not supported under string dtype");if("complex64"===a.dtype){const t=wa({inputs:{input:a},backend:r}),n=e({inputs:{x:t},backend:r}),i=La({inputs:{input:a},backend:r}),o=Rs({inputs:{x:i},backend:r}),s=Hn({inputs:{real:n,imag:o},backend:r});return r.disposeIntermediateTensorInfo(t),r.disposeIntermediateTensorInfo(n),r.disposeIntermediateTensorInfo(i),r.disposeIntermediateTensorInfo(o),s}return Ji({attrs:{shape:a.shape,dtype:a.dtype,value:1},backend:r})}};const Bs={kernelName:i.Pack,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{axis:a}=r;if(1===t.length)return Hi({inputs:{input:t[0]},backend:n,attrs:{dim:a}});const o=t[0].shape,s=t[0].dtype;t.forEach((e=>{i.util.assertShapesMatch(o,e.shape,"All tensors passed to stack must have matching shapes"),i.util.assert(s===e.dtype,(()=>"All tensors passed to stack must have matching dtypes"))}));const l=[],u=ja({inputs:t.map((e=>{const t=Hi({inputs:{input:e},backend:n,attrs:{dim:a}});return l.push(t),t})),backend:n,attrs:{axis:a}});return l.forEach((e=>n.disposeIntermediateTensorInfo(e))),u}};class js{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map(((t,n)=>t[0]+e[n]+t[1]));const r=e.length,a=Pe(r),i=t.map((e=>e[0])).join(","),o=t.map(((t,n)=>t[0]+e[n])).join(","),s=["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r);this.userCode=1!==r?`\n ${a} start = ${a}(${i});\n ${a} end = ${a}(${o});\n\n void main() {\n ${a} outC = getOutputCoords();\n if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n setOutput(value);\n } else {\n ${a} coords = outC - start;\n setOutput(getX(${s}));\n }\n }\n `:`\n int start = ${i};\n int end = ${o};\n\n void main() {\n int outC = getOutputCoords();\n if (outC < start || outC >= end) {\n setOutput(value);\n } else {\n setOutput(getX(outC - start));\n }\n }\n `}}class Vs{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map(((t,n)=>t[0]+e[n]+t[1]));const r=e.length,a=Pe(r),i=t.map((e=>e[0])).join(","),o=t.map(((t,n)=>t[0]+e[n])).join(","),s=pn("rc",r),l=pn("source",r),u=`${s[r-1]} < ${this.outputShape[r-1]}`,c=1===r?"source":`vec2(${l.slice(-2).join()})`,d=[`${a} rc = outputLoc;`,`${s[r-1]} += 1;\n if(${u}) {\n `,1===r?"":`}\n rc = outputLoc;\n ${s[r-2]} += 1;\n if(${s[r-2]} < ${this.outputShape[r-2]}) {`,1===r?"":` ${s[r-1]} += 1;\n if(${u}) {`],h=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";let f="";for(let p=0,m=1===r?2:4;p{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{paddings:o,constantValue:s}=r;if(0===i.util.sizeFromShape(a.shape)){return Ji({backend:n,attrs:{shape:o.map(((e,t)=>e[0]+a.shape[t]+e[1])),value:s,dtype:a.dtype}})}const l=(0,i.env)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new Vs(a.shape,o,s):new js(a.shape,o,s),u=[[s]];return n.runWebGLProgram(l,[a],a.dtype,u)},Hs={kernelName:i.PadV2,backendName:"webgl",kernelFunc:zs},Us=Zn({opSnippet:"\n if(a < 0.0 && floor(b) < b){\n return NAN;\n }\n if (b == 0.0) {\n return 1.0;\n }\n return (round(mod(b, 2.0)) != 1) ?\n pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",packedOpSnippet:"\n // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n vec4 result = multiplier * pow(abs(a), b);\n\n // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n bvec4 isExpZero = equal(b, vec4(0.0));\n result.r = isExpZero.r ? 1.0 : result.r;\n result.g = isExpZero.g ? 1.0 : result.g;\n result.b = isExpZero.b ? 1.0 : result.b;\n result.a = isExpZero.a ? 1.0 : result.a;\n\n bvec4 isNaN1 = lessThan(a, vec4(0.0));\n bvec4 isNaN2 = lessThan(floor(b), b);\n bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w);\n "+Bn+"\n return result;\n"}),Ws={kernelName:i.Pow,backendName:"webgl",kernelFunc:Us};const qs={kernelName:i.Prod,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{axis:o,keepDims:s}=r,l=a.shape.length,u=[],c=i.util.parseAxisParam(o,a.shape);let d=c;const h=i.backend_util.getAxesPermutation(d,l);let f,p=a;if(null!=h&&(p=yr({inputs:{x:a},backend:n,attrs:{perm:h}}),d=i.backend_util.getInnerMostAxes(d.length,l),u.push(p)),i.backend_util.assertAxesAreInnerMostDims("prod",d,l),n.shouldExecuteOnCPU([p])){const e=n.texData.get(p.dataId).values,{outVals:t,outShape:r,outDtype:a}=Ht(p.shape,p.dtype,e,d);f=n.makeTensorInfo(r,a,t)}else{const[e,t]=i.backend_util.computeOutAndReduceShapes(p.shape,d),r=i.util.sizeFromShape(t),o=sr({inputs:{x:p},backend:n,attrs:{shape:[-1,r]}}),s=dr(o,(0,i.sumOutType)(a.dtype),"prod",n);f=sr({inputs:{x:s},backend:n,attrs:{shape:e}}),u.push(o),u.push(s)}if(s){u.push(f);const e=i.backend_util.expandShapeToKeepDim(f.shape,c);f=sr({inputs:{x:f},backend:n,attrs:{shape:e}})}return u.forEach((e=>n.disposeIntermediateTensorInfo(e))),f}};const $s={kernelName:i.RaggedGather,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{paramsNestedSplits:a,paramsDenseValues:i,indices:o}=t,{outputRaggedRank:s}=r,l=a.map((e=>n.readSync(e.dataId))),u=a.map((e=>e.shape)),c=n.readSync(i.dataId),d=n.readSync(o.dataId),[h,f,p]=Ut(l,u,c,i.shape,i.dtype,d,o.shape,s),m=h.map((e=>n.makeTensorInfo([e.length],"int32",e))),g=n.makeTensorInfo(p,i.dtype,f);return m.concat([g])}};const Ys={kernelName:i.RaggedRange,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{starts:r,limits:a,deltas:i}=t,o=n.readSync(r.dataId),s=n.readSync(a.dataId),l=n.readSync(i.dataId),[u,c]=Wt(o,r.shape,r.dtype,s,a.shape,l,i.shape);return[n.makeTensorInfo([u.length],"int32",u),n.makeTensorInfo([c.length],r.dtype,c)]}};const Gs={kernelName:i.RaggedTensorToTensor,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{shape:a,values:i,defaultValue:o,rowPartitionTensors:s}=t,{rowPartitionTypes:l}=r,u=n.readSync(a.dataId),c=n.readSync(i.dataId),d=n.readSync(o.dataId),h=s.map((e=>n.readSync(e.dataId))),f=s.map((e=>e.shape)),[p,m]=qt(u,a.shape,c,i.shape,i.dtype,d,o.shape,h,f,l);return n.makeTensorInfo(p,i.dtype,m)}},Xs=e=>{const{backend:t,attrs:n}=e,{start:r,stop:a,step:i,dtype:o}=n,s=$t(r,a,i,o);return t.makeTensorInfo([s.length],o,s)},Ks={kernelName:i.Range,backendName:"webgl",kernelFunc:Xs},Js=Jn({opSnippet:"return 1.0 / x;"}),Zs={kernelName:i.Reciprocal,backendName:"webgl",kernelFunc:Js},Qs=Jn({opSnippet:Fn+"\n return (x < 0.0) ? 0.0 : x;\n",packedOpSnippet:"\n vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"}),el={kernelName:i.Relu,backendName:"webgl",kernelFunc:Qs},tl=Jn({opSnippet:Fn+"\n return (x < 0.0) ? 0.0 : min(6.0, x);\n",packedOpSnippet:"\n vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n"}),nl={kernelName:i.Relu6,backendName:"webgl",kernelFunc:tl};class rl{constructor(e,t,n,r,a){this.variableNames=["A"],this.outputShape=[];const[i,o,s,l]=e;this.outputShape=[i,t,n,l];const u=[r&&t>1?o-1:o,r&&n>1?s-1:s],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];let d;d=a?"(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${u[0]/c[0]},\n ${u[1]/c[1]});\n const vec2 inputShapeRC = vec2(${o}.0, ${s}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${d};\n\n // Compute the four integer indices.\n ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n ivec2 sourceCeilRC = ivec2(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n float top = topLeft + (topRight - topLeft) * fracRC.y;\n float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n float newValue = top + (bottom - top) * fracRC.x;\n\n setOutput(newValue);\n }\n `}}class al{constructor(e,t,n,r,a){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[i,o,s,l]=e;this.outputShape=[i,t,n,l];const u=[r&&t>1?o-1:o,r&&n>1?s-1:s],c=[r&&t>1?t-1:t,r&&n>1?n-1:n];let d;d=a?"(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${u[0]/c[0]},\n ${u[1]/c[1]},\n ${u[1]/c[1]});\n const vec3 inputShapeRC = vec3(${o}.0, ${s}.0,\n ${s}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${d};\n\n // Compute the four integer indices.\n ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n ivec3 sourceCeilRC = ivec3(\n min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${l-1};\n bool hasNextRow = coords.z < ${n-1};\n\n // In parallel, construct four corners for all four components in\n // packed 2x2 cell.\n vec4 topLeft = vec4(\n getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 bottomLeft = vec4(\n getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n vec4 topRight = vec4(\n getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec4 bottomRight = vec4(\n getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n vec4 newValue = mix(top, bottom, fracRC.x);\n\n setOutput(newValue);\n }\n `}}const il={kernelName:i.ResizeBilinear,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a}=t,{alignCorners:o,halfPixelCenters:s,size:l}=r,[u,c]=l,d=(0,i.env)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new al(a.shape,u,c,o,s):new rl(a.shape,u,c,o,s);return n.runWebGLProgram(d,[a],"float32")}};class ol{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;const[,r,a]=t,[,i,o]=e,s=[n&&i>1?r-1:r,n&&o>1?a-1:a],l=[n&&i>1?i-1:i,n&&o>1?o-1:o],u=s[0]/l[0],c=s[1]/l[1],d=1/u,h=1/c,f=2*Math.ceil(d)+2,p=2*Math.ceil(h)+2;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${u});\n const float widthScale = float(${c});\n\n const float invHeightScale = float(${d});\n const float invWidthScale = float(${h});\n\n const int winHeight = int(${f});\n const int winWidth = int(${p});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(startRLerp - float(winHeight / 2));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(startCLerp - float(winWidth / 2));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${i}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${o}) {\n continue;\n }\n\n float dxR = float(dyR) * heightScale;\n int topDxRIndex = int(floor(dxR));\n int bottomDxRIndex = int(min(ceil(dxR), ${r-1}.0));\n float dxRLerp = dxR - float(topDxRIndex);\n float inverseDxRLerp = 1.0 - dxRLerp;\n\n float dxC = float(dyC) * widthScale;\n int leftDxCIndex = int(floor(dxC));\n int rightDxCIndex = int(min(ceil(dxC), ${a-1}.0));\n float dxCLerp = dxC - float(leftDxCIndex);\n float inverseDxCLerp = 1.0 - dxCLerp;\n\n if (r == topDxRIndex && c == leftDxCIndex) {\n // topLeft\n accumulator +=\n getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n }\n\n if (r == topDxRIndex && c == rightDxCIndex) {\n // topRight\n accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n }\n\n if (r == bottomDxRIndex && c == leftDxCIndex) {\n // bottomLeft\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n }\n\n if (r == bottomDxRIndex && c == rightDxCIndex) {\n // bottomRight\n accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `}}const sl={kernelName:i.ResizeBilinearGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a,dy:i}=t,{alignCorners:o}=r,s=new ol(i.shape,a.shape,o);return n.runWebGLProgram(s,[i],i.dtype)}};class ll{constructor(e,t,n,r,a){this.variableNames=["A"],this.outputShape=[];const[i,o,s,l]=e;this.outputShape=[i,t,n,l];const u=[r&&t>1?o-1:o,r&&n>1?s-1:s],c=[r&&t>1?t-1:t,r&&n>1?n-1:n],d=r?"0.5":"0.0";let h;h=a?"max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec2 effectiveInputOverOutputRatioRC = vec2(\n ${u[0]/c[0]},\n ${u[1]/c[1]});\n const vec2 inputShapeRC = vec2(${o}.0, ${s}.0);\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n ivec2 yRC = coords.yz;\n\n // Fractional source index.\n vec2 sourceFracIndexRC = ${h};\n\n // Compute the coordinators of nearest neighbor point.\n ivec2 sourceNearestRC = ivec2(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${d})));\n float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n setOutput(newValue);\n }\n `}}class ul{constructor(e,t,n,r,a){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];const[i,o,s,l]=e;this.outputShape=[i,t,n,l];const u=[r&&t>1?o-1:o,r&&n>1?s-1:s],c=[r&&t>1?t-1:t,r&&n>1?n-1:n],d=r?"0.5":"0.0";let h;h=a?"max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n const vec3 effectiveInputOverOutputRatioRC = vec3(\n ${u[0]/c[0]},\n ${u[1]/c[1]},\n ${u[1]/c[1]});\n const vec3 inputShapeRC = vec3(${o}.0, ${s}.0,\n ${s}.0);\n\n float getAValue(int b, int r, int c, int d) {\n return getChannel(getA(b, r, c, d), vec2(c, d));\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n // Calculate values for next column in yRC.z.\n ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n // Fractional source index.\n vec3 sourceFracIndexRC = ${h};\n\n // Compute the coordinators of nearest neighbor point.\n ivec3 sourceNearestRC = ivec3(\n min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${d})));\n\n // Should we calculate next column and row elements in 2x2 packed cell.\n bool hasNextCol = d < ${l-1};\n bool hasNextRow = coords.z < ${n-1};\n\n vec4 newValue = vec4(\n getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n : 0.0,\n hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n : 0.0,\n (hasNextRow && hasNextCol) ?\n getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n setOutput(newValue);\n }\n `}}const cl={kernelName:i.ResizeNearestNeighbor,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a}=t,{alignCorners:o,halfPixelCenters:s,size:l}=r,[u,c]=l,d=(0,i.env)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?new ul(a.shape,u,c,o,s):new ll(a.shape,u,c,o,s);return n.runWebGLProgram(d,[a],a.dtype)}};class dl{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[],this.outputShape=t;const[,r,a]=t,[,i,o]=e,s=[n&&i>1?r-1:r,n&&o>1?a-1:a],l=[n&&i>1?i-1:i,n&&o>1?o-1:o],u=s[0]/l[0],c=s[1]/l[1],d=1/u,h=1/c,f=2*Math.ceil(d)+2,p=2*Math.ceil(h)+2;this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int b = coords[0];\n int d = coords[3];\n int r = coords[1];\n int c = coords[2];\n\n float accumulator = 0.0;\n\n const float heightScale = float(${u});\n const float widthScale = float(${c});\n\n const float invHeightScale = float(${d});\n const float invWidthScale = float(${h});\n\n const int winHeight = int(${f});\n const int winWidth = int(${p});\n\n // Compute bounds for where in dy we will look\n float startRLerp = floor(float(r) * invHeightScale);\n int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n float startCLerp = floor(float(c) * invWidthScale);\n int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n // Loop over dy\n for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n int dyR = dyROffset + startDyR;\n\n // Guard against the window exceeding the bounds of dy\n if (dyR < 0 || dyR >= ${i}) {\n continue;\n }\n\n for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n int dyC = dyCOffset + startDyC;\n\n // Guard against the window exceeding the bounds of dy\n if (dyC < 0 || dyC >= ${o}) {\n continue;\n }\n\n float sourceFracRow =\n float(${s[0]}) *\n (float(dyR) / float(${l[0]}));\n\n float sourceFracCol =\n float(${s[1]}) *\n (float(dyC) / float(${l[1]}));\n\n int sourceNearestRow = int(min(\n float(int(${r}) - 1),\n ${n} ? float(round(sourceFracRow)) :\n float(floor(sourceFracRow))));\n\n int sourceNearestCol = int(min(\n float(int(${a}) - 1),\n ${n} ? float(round(sourceFracCol)) :\n float(floor(sourceFracCol))));\n\n if (r == sourceNearestRow && c == sourceNearestCol) {\n accumulator += getDy(b, dyR, dyC, d);\n }\n }\n }\n // End loop over dy\n\n setOutput(accumulator);\n }\n `}}const hl={kernelName:i.ResizeNearestNeighborGrad,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{images:a,dy:i}=t,{alignCorners:o}=r,s=new dl(i.shape,a.shape,o);return n.runWebGLProgram(s,[i],i.dtype)}};class fl{constructor(e,t){this.variableNames=["x"];const n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);if(this.outputShape=e,1===n)return void(this.userCode=`\n void main() {\n int coord = getOutputCoords();\n setOutput(getX(${e[0]} - coord - 1));\n }\n `);const r=e.map(((n,r)=>(n=>-1!==t.indexOf(n)&&1!==e[n]?`${e[n]} - coords[${n}] - 1`:`coords[${n}]`)(r))).join(","),a=Pe(n);this.userCode=`\n void main() {\n ${a} coords = getOutputCoords();\n setOutput(getX(${r}));\n }\n `}}class pl{constructor(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;const n=e.length;if(n>4)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=e;const r=pn("rc",n),a=`${r[n-1]} + 1 < ${this.outputShape[n-1]}`,i=`${r[n-2]} + 1 < ${this.outputShape[n-2]}`,o=Pe(n);function s(n){const r=e.map(((r,a)=>function(n,r){return-1!==t.indexOf(n)&&1!==e[n]?`${e[n]} - ${r[n]} - 1`:`${r[n]}`}(a,n)));return`getChannel(getX(${r.join(",")}), vec2(${r.slice(-2).join(",")}))`}this.userCode=1===n?`\n void main(){\n int rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = getChannel(getX(${e[0]} - rc - 1),\n ${e[0]} - rc - 1);\n if(${a}){\n result.g = getChannel(getX(${e[0]} - (rc + 1) - 1),\n ${e[0]} - (rc + 1) - 1);\n }\n setOutput(result);\n }\n `:`\n void main() {\n ${o} rc = getOutputCoords();\n vec4 result = vec4(0.);\n result.r = ${function(e){return s(e)}(r.slice())};\n if(${a}){\n result.g = ${function(e){return e[n-1]="("+e[n-1]+" + 1)",s(e)}(r.slice())};\n }\n if(${i}) {\n result.b = ${function(e){return e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())};\n if(${a}) {\n result.a = ${function(e){return e[n-1]="("+e[n-1]+" + 1)",e[n-2]="("+e[n-2]+" + 1)",s(e)}(r.slice())};\n }\n }\n setOutput(result);\n }\n `}}const ml={kernelName:i.Reverse,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{dims:o}=r,s=a.shape.length,l=i.util.parseAxisParam(o,a.shape);if(0===s)return Vn({inputs:{x:a},backend:n});const u=(0,i.env)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?new pl(a.shape,l):new fl(a.shape,l);return n.runWebGLProgram(u,[a],a.dtype)}};class gl{constructor(e,t){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];const n=e[1],r=e[2];this.outputShape=e;let a="";a="number"===typeof t?`float outputValue = ${t.toFixed(2)};`:`\n vec3 fill = vec3(${t.join(",")});\n float outputValue = fill[coords[3]];`,this.userCode=`\n void main() {\n ivec4 coords = getOutputCoords();\n int x = coords[2];\n int y = coords[1];\n float coordXFloat = (float(x) - params[0]) * params[3] -\n (float(y) - params[1]) * params[2];\n float coordYFloat = (float(x) - params[0]) * params[2] +\n (float(y) - params[1]) * params[3];\n int coordX = int(round(coordXFloat + params[0]));\n int coordY = int(round(coordYFloat + params[1]));\n ${a}\n if(coordX >= 0 && coordX < ${r} && coordY >= 0 && coordY < ${n}) {\n outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n }\n setOutput(outputValue);\n }\n `}}const yl={kernelName:i.RotateWithOffset,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const{image:r}=e,{radians:a,fillValue:o,center:s}=t,l=n,u=new gl(r.shape,o),[c,d]=i.backend_util.getImageCenter(s,r.shape[1],r.shape[2]),h=[[c,d,Math.sin(a),Math.cos(a)]];return l.runWebGLProgram(u,[r],r.dtype,h)}},_l=Jn({opSnippet:"\n // OpenGL ES does not support round function.\n // The algorithm is based on banker's rounding.\n float base = floor(x);\n if ((x - base) < 0.5) {\n return floor(x);\n } else if ((x - base) > 0.5) {\n return ceil(x);\n } else {\n if (mod(base, 2.0) == 0.0) {\n return base;\n } else {\n return base + 1.0;\n }\n }\n"}),bl={kernelName:i.Round,backendName:"webgl",kernelFunc:_l},vl=Jn({opSnippet:"return inversesqrt(x);",cpuKernelImpl:Yt}),wl={kernelName:i.Rsqrt,backendName:"webgl",kernelFunc:vl};class Fl{constructor(e,t,n,r,a,i,o=!0,s=!1){this.variableNames=["updates","indices","defaultValue"],this.outputShape=i;const l=Pe(a.length),u=Pe(i.length);let c="";1===n?c="i":2===n&&(c="i, j");const d=`getIndices(${c})`;let h="";1===r?h="i":2===r&&(h="i, coords[1]");const f=`getUpdates(${h})`;let p="";s&&(p="coords[0], coords[1]");const m=`getDefaultValue(${p})`,g=t>1?"strides[j]":"strides";this.userCode=`\n ${l} strides = ${l}(${a});\n\n void main() {\n ${u} coords = getOutputCoords();\n float sum = 0.0;\n bool found = false;\n for (int i = 0; i < ${e}; i++) {\n int flattenedIndex = 0;\n for (int j = 0; j < ${t}; j++) {\n int index = round(${d});\n flattenedIndex += index * ${g};\n }\n if (flattenedIndex == coords[0]) {\n sum += ${f};\n found = true;\n }\n }\n setOutput(mix(${m}, sum, float(found)));\n }\n `}}class kl{constructor(e,t,n,r,a,i,o=!0,s=!1){this.variableNames=["updates","indices","defaultValue"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=i;const l=Pe(a.length),u=Pe(i.length);let c="";1===n?c="i":2===n&&(c="i, j");const d=`getIndices(${c})`;let h="";1===r?h="i":2===r&&(h="i, coords[1]");const f=`getUpdates(${h})`;let p="";s&&(p="coords[0], coords[1]");const m=`getDefaultValue(${p})`,g=t>1?"strides[j]":"strides",y=t>1?"strides[j + 1]":"strides";this.userCode=`\n ${l} strides = ${l}(${a});\n\n void main() {\n ${u} coords = getOutputCoords();\n vec4 sum = vec4(0.);\n vec4 found = vec4(0.);\n for (int i = 0; i < ${e}; i+=2) {\n ivec2 flattenedIndex = ivec2(0);\n for (int j = 0; j < ${t}; j+=2) {\n ivec4 index = round(${d});\n flattenedIndex += index.xz * ${g};\n if (j + 1 < ${t}) {\n flattenedIndex += index.yw * ${y};\n }\n }\n if (flattenedIndex[0] == coords[0] || flattenedIndex[1] == coords[0] ||\n flattenedIndex[0] == coords[0] + 1 || flattenedIndex[1] == coords[0] + 1) {\n vec4 updVals = ${f};\n if (flattenedIndex[0] == coords[0]) {\n sum.xy += updVals.xy;\n found.xy = vec2(1.);\n } else if (flattenedIndex[0] == coords[0] + 1) {\n sum.zw += updVals.xy;\n found.zw = vec2(1.);\n }\n if (flattenedIndex[1] == coords[0]) {\n sum.xy += updVals.zw;\n found.xy = vec2(1.);\n } else if (flattenedIndex[1] == coords[0] + 1) {\n sum.zw += updVals.zw;\n found.zw = vec2(1.);\n }\n }\n }\n setOutput(mix(${m}, sum, found));\n }\n `}}const xl={kernelName:i.ScatterNd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{indices:a,updates:o}=t,{shape:s}=r,{sliceRank:l,numUpdates:u,sliceSize:c,strides:d,outputSize:h}=i.backend_util.calculateShapes(o,a,s),f=[h/c,c];if(0===h)return n.makeTensorInfo(s,a.dtype);const p=sr({inputs:{x:a},backend:n,attrs:{shape:[u,l]}}),m=sr({inputs:{x:o},backend:n,attrs:{shape:[u,c]}}),g=n.makeTensorInfo([],"float32",new Float32Array([0]));let y;y=(0,i.env)().getBool("WEBGL_PACK")?new kl(u,l,p.shape.length,m.shape.length,d,f):new Fl(u,l,p.shape.length,m.shape.length,d,f);const _=n.runWebGLProgram(y,[m,p,g],m.dtype),b=sr({inputs:{x:_},backend:n,attrs:{shape:s}});return n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(_),n.disposeIntermediateTensorInfo(g),b}};class Al{constructor(e,t,n,r){this.variableNames=["sortedSequence","values"],this.customUniforms=[{name:"numInputs",type:"int"}],this.outputShape=[e,n];const a=`for (int i = 0; i < ${Math.ceil(Math.log2(t+1))}; ++i) { if (left >= right) break;`,o=2===(0,i.env)().getNumber("WEBGL_VERSION")?"while (left < right) {":a,s="left"===r?"<":"<=";this.userCode=`\n int findBound(int batch, float value) {\n int left = 0;\n int right = numInputs;\n int mid;\n ${o}\n mid = (left + right) / 2;\n if (getSortedSequence(batch, mid) ${s} value) {\n left = mid + 1;\n } else {\n right = mid;\n }\n }\n return right;\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int valueIndex = coords[1];\n\n float value = getValues(batch, valueIndex);\n\n setOutput(float(findBound(batch, value)));\n }\n `}}const Sl={kernelName:i.SearchSorted,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{sortedSequence:a,values:i}=t,{side:o}=r,s=new Al(a.shape[0],a.shape[1],i.shape[1],o),l=[[a.shape[1]]];return n.runWebGLProgram(s,[a,i],"int32",l)}};class El{constructor(e,t,n){let r,a;if(this.variableNames=["c","a","b"],this.outputShape=t,n>4)throw Error(`Where for rank ${n} is not yet supported`);if(1===n)a="resRC",r="resRC";else{const n=["resRC.x","resRC.y","resRC.z","resRC.w"],i=[],o=[];for(let r=0;r= 1.0) {\n setOutput(getA(${a}));\n } else {\n setOutput(getB(${a}));\n }\n }\n `}}const Cl={kernelName:i.Select,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{condition:r,t:a,e:o}=t,s=new El(r.shape.length,a.shape,a.shape.length);return n.runWebGLProgram(s,[r,a,o],(0,i.upcastType)(a.dtype,o.dtype))}},Tl=Jn({opSnippet:`\n // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n // see: https://arxiv.org/abs/1706.02515\n float scaleAlpha = ${i.backend_util.SELU_SCALEALPHA};\n float scale = ${i.backend_util.SELU_SCALE};\n return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`}),Dl={kernelName:i.Selu,backendName:"webgl",kernelFunc:Tl},Il=Jn({opSnippet:Kn+"\n return 1.0 / (1.0 + exp(-1.0 * x));\n",packedOpSnippet:"\n vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n bvec4 isNaN = isnan(x);\n\n result.r = isNaN.r ? x.r : result.r;\n result.g = isNaN.g ? x.g : result.g;\n result.b = isNaN.b ? x.b : result.b;\n result.a = isNaN.a ? x.a : result.a;\n\n return result;\n",cpuKernelImpl:Xt}),Ol={kernelName:i.Sigmoid,backendName:"webgl",kernelFunc:Il},Pl=Jn({opSnippet:"\n if (isnan(x)) { return 0.0; }\n return sign(x);\n"}),Ml={kernelName:i.Sign,backendName:"webgl",kernelFunc:Pl},Rl=Jn({opSnippet:Kn+"\n return sin(x);\n",packedOpSnippet:`\n vec4 result = sin(x);\n bvec4 isNaN = isnan(x);\n ${Bn}\n return result;\n`}),Ll={kernelName:i.Sin,backendName:"webgl",kernelFunc:Rl},Nl=Jn({opSnippet:"\n float e2x = exp(x);\n return (e2x - 1.0 / e2x) / 2.0;\n"}),Bl={kernelName:i.Sinh,backendName:"webgl",kernelFunc:Nl},jl=Jn({opSnippet:"\n float epsilon = 1.1920928955078125e-7;\n float threshold = log(epsilon) + 2.0;\n\n bool too_large = x > -threshold;\n bool too_small = x < threshold;\n\n float result;\n float exp_x = exp(x);\n\n if (too_large){\n result = x;\n }\n else if (too_small){\n result = exp_x;\n }\n else{\n result = log(exp_x + 1.0);\n }\n return result;\n"}),Vl={kernelName:i.Softplus,backendName:"webgl",kernelFunc:jl},zl={kernelName:i.SpaceToBatchND,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{blockShape:o,paddings:s}=r;i.util.assert(a.shape.length<=4,(()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"));const l=o.reduce(((e,t)=>e*t)),u=[[0,0]];u.push(...s);for(let i=1+o.length;in.disposeIntermediateTensorInfo(e))),y}};const Hl={kernelName:i.SparseFillEmptyRows,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{indices:r,values:a,denseShape:i,defaultValue:o}=t;if(1!==i.shape.length)throw new Error(`Dense shape must be a vector, saw:\n ${i.shape}`);if(2!==r.shape.length)throw new Error(`Indices must be a matrix, saw:\n ${r.shape}`);if(1!==a.shape.length)throw new Error(`Values must be a vector, saw:\n ${a.shape}`);if(0!==o.shape.length)throw new Error(`Default value must be a scalar, saw:\n ${o.shape}`);const s=n.readSync(r.dataId),l=n.readSync(a.dataId),u=n.readSync(i.dataId),c=n.readSync(o.dataId)[0],[d,h,f,p,m]=Zt(s,r.shape,r.dtype,l,a.dtype,u,c);return[n.makeTensorInfo(h,r.dtype,d),n.makeTensorInfo([h[0]],a.dtype,f),n.makeTensorInfo([p.length],"bool",new Uint8Array(p.map((e=>Number(e))))),n.makeTensorInfo([m.length],r.dtype,new Int32Array(m))]}};const Ul={kernelName:i.SparseReshape,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{inputIndices:r,inputShape:a,newShape:i}=t;if(2!==r.shape.length)throw new Error(`Input indices should be a matrix but received shape ${r.shape}`);if(1!==a.shape.length)throw new Error(`Input shape should be a vector but received shape ${a.shape}`);if(1!==i.shape.length)throw new Error(`Target shape should be a vector but received shape ${i.shape}`);const o=Array.from(n.readSync(a.dataId)),s=n.readSync(r.dataId),l=Array.from(n.readSync(i.dataId)),[u,c,d]=Qt(s,r.shape,r.dtype,o,l);return[n.makeTensorInfo(c,r.dtype,u),n.makeTensorInfo([d.length],i.dtype,new Int32Array(d))]}};const Wl={kernelName:i.SparseSegmentMean,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:a,segmentIds:i}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.shape.length)throw new Error(`Indices should be a vector but received shape\n ${a.shape}`);if(1!==i.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${i.shape}`);const o=n.readSync(r.dataId),s=n.readSync(a.dataId),l=n.readSync(i.dataId),[u,c]=en(o,r.shape,r.dtype,s,l,!0);return n.makeTensorInfo(c,r.dtype,u)}};const ql={kernelName:i.SparseSegmentSum,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e,{data:r,indices:a,segmentIds:i}=t;if(r.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.shape.length)throw new Error(`Indices should be a vector but received shape\n ${a.shape}`);if(1!==i.shape.length)throw new Error(`Segment ids should be a vector but received shape\n ${i.shape}`);const o=n.readSync(r.dataId),s=n.readSync(a.dataId),l=n.readSync(i.dataId),[u,c]=en(o,r.shape,r.dtype,s,l);return n.makeTensorInfo(c,r.dtype,u)}};const $l={kernelName:i.SparseToDense,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{sparseIndices:a,sparseValues:o,defaultValue:s}=t,{outputShape:l}=r,{sliceRank:u,numUpdates:c,sliceSize:d,strides:h,outputSize:f}=i.backend_util.calculateShapes(o,a,l),p=!1;if("string"===o.dtype){const e=n.bufferSync(a),t=n.bufferSync(o),r=i.util.decodeString(n.readSync(s.dataId)[0]),m=Gt(e,t,l,f,d,c,u,h,r,p);return n.makeTensorInfo(l,m.dtype,m.values)}const m=new Fl(c,u,a.shape.length,o.shape.length,h,[f,1],p),g=n.runWebGLProgram(m,[o,a,s],o.dtype),y=sr({inputs:{x:g},backend:n,attrs:{shape:l}});return n.disposeIntermediateTensorInfo(g),y}};const Yl={kernelName:i.SplitV,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{numOrSizeSplits:o,axis:s}=r,l=i.util.parseAxisParam(s,a.shape)[0],u=i.backend_util.prepareSplitSize(a,o,l),c=a.shape.length,d=new Array(c).fill(0),h=a.shape.slice();return u.map((e=>{const t=[...h];t[l]=e;const r=fa({inputs:{x:a},backend:n,attrs:{begin:d,size:t}});return d[l]+=e,r}))}},Gl="return sqrt(x);",Xl=Jn({opSnippet:Gl,packedOpSnippet:Gl,cpuKernelImpl:tn}),Kl={kernelName:i.Sqrt,backendName:"webgl",kernelFunc:Xl},Jl=Jn({opSnippet:"return x * x;"}),Zl={kernelName:i.Square,backendName:"webgl",kernelFunc:Jl},Ql="return (a - b) * (a - b);",eu=Zn({opSnippet:Ql,packedOpSnippet:Ql}),tu={kernelName:i.SquaredDifference,backendName:"webgl",kernelFunc:eu};const nu={kernelName:i.StaticRegexReplace,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t;if("string"!==a.dtype)throw new Error("Input must be of datatype string");const o=n.readSync(a.dataId),s=i.backend_util.fromUint8ToStringArray(o),l=nn(s,"string",r);return n.makeTensorInfo(a.shape,"string",l)}};const ru={kernelName:i.Step,backendName:"webgl",kernelFunc:function({inputs:e,attrs:t,backend:n}){const{x:r}=e,a=Fn+`\n return x > 0.0 ? 1.0 : float(${t.alpha});\n `,i=new wn(r.shape,a);return n.runWebGLProgram(i,[r],r.dtype)}};class au{constructor(e,t,n){this.variableNames=["x"],this.outputShape=n;const r=n.length,a=Pe(n.length),i=Pe(n.length);let o="";if(1===r)o="coords * strides + begin";else{let e=0;o=n.map(((t,r)=>(e++,1===n.length?`coords * strides[${r}] + begin[${r}]`:`coords[${e-1}] * strides[${r}] + begin[${r}]`))).join(",")}this.userCode=`\n ${a} begin = ${a}(${e});\n ${a} strides = ${a}(${t});\n\n void main() {\n ${i} coords = getOutputCoords();\n setOutput(getX(${o}));\n }\n `}}const iu={kernelName:i.StridedSlice,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a}=t,{begin:o,end:s,strides:l,beginMask:u,endMask:c,ellipsisMask:d,newAxisMask:h,shrinkAxisMask:f}=r,{finalShapeSparse:p,finalShape:m,isIdentity:g,sliceDim0:y,isSimpleSlice:_,begin:b,end:v,strides:w}=i.slice_util.sliceInfo(a.shape,o,s,l,u,c,d,h,f);let F;if(g)F=sr({inputs:{x:a},backend:n,attrs:{shape:m}});else if(y||_){i.util.assert(a.shape.length>=1,(()=>`Input must have rank at least 1, got: ${a.shape.length}`));const e=i.slice_util.computeOutShape(b,v,w),t=fa({inputs:{x:a},backend:n,attrs:{begin:b,size:e}});F=sr({inputs:{x:t},backend:n,attrs:{shape:m}}),n.disposeIntermediateTensorInfo(t)}else{if(n.shouldExecuteOnCPU([a])){const e=n.readSync(a.dataId),t=(0,i.buffer)(a.shape,a.dtype,e),r=rn(p,t,w,b);F=n.makeTensorInfo(m,a.dtype,r.values)}else{const e=new au(b,w,p);F=n.runWebGLProgram(e,[a],a.dtype)}}const k=sr({inputs:{x:F},backend:n,attrs:{shape:m}});return n.disposeIntermediateTensorInfo(F),k}};const ou={kernelName:i.StringNGrams,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{separator:a,nGramWidths:i,leftPad:o,rightPad:s,padWidth:l,preserveShortSequences:u}=r,{data:c,dataSplits:d}=t,h=n.readSync(c.dataId),f=n.readSync(d.dataId),[p,m]=an(h,f,a,i,o,s,l,u);return[n.makeTensorInfo([p.length],"string",p),n.makeTensorInfo(d.shape,"int32",m)]}};const su={kernelName:i.StringSplit,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{skipEmpty:a}=r,{input:i,delimiter:o}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(1!==i.shape.length)throw new Error(`Input must be a vector, got shape: ${i.shape}`);if(0!==o.shape.length)throw new Error(`Delimiter must be a scalar, got shape: ${o.shape}`);const s=n.readSync(i.dataId),l=n.readSync(o.dataId)[0],[u,c,d]=on(s,l,a),h=c.length;return[n.makeTensorInfo([h,2],"int32",u),n.makeTensorInfo([h],"string",c),n.makeTensorInfo([2],"int32",new Int32Array(d))]}};const lu={kernelName:i.StringToHashBucketFast,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{numBuckets:a}=r,{input:i}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(a<=0)throw new Error("Number of buckets must be at least 1");const o=n.readSync(i.dataId),s=sn(o,a);return n.makeTensorInfo(i.shape,"int32",s)}},uu=Jn({opSnippet:"return tan(x);"}),cu={kernelName:i.Tan,backendName:"webgl",kernelFunc:uu},du=Jn({opSnippet:"\n float e2x = exp(-2.0 * abs(x));\n return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n"}),hu={kernelName:i.Tanh,backendName:"webgl",kernelFunc:du};const fu={kernelName:i.TensorScatterUpdate,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{tensor:a,indices:o,updates:s}=t,{}=r,{sliceRank:l,numUpdates:u,sliceSize:c,strides:d,outputSize:h}=i.backend_util.calculateShapes(s,o,a.shape),f=[h/c,c];if(0===h)return n.makeTensorInfo(a.shape,o.dtype);const p=sr({inputs:{x:o},backend:n,attrs:{shape:[u,l]}}),m=sr({inputs:{x:s},backend:n,attrs:{shape:[u,c]}}),g=sr({inputs:{x:a},backend:n,attrs:{shape:f}}),y=new Fl(u,l,p.shape.length,m.shape.length,d,f,!1,!0),_=n.runWebGLProgram(y,[m,p,g],g.dtype),b=sr({inputs:{x:_},backend:n,attrs:{shape:a.shape}});return n.disposeIntermediateTensorInfo(p),n.disposeIntermediateTensorInfo(m),n.disposeIntermediateTensorInfo(g),n.disposeIntermediateTensorInfo(_),b}};class pu{constructor(e,t){this.variableNames=["A"];const n=new Array(e.length);for(let i=0;i5)throw Error(`Tile for rank ${t} is not yet supported`);if(1===t)return`imod(resRC, ${e[0]})`;const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[];for(let a=0;a5){const e=n.readSync(a.dataId),t="string"===a.dtype?e.map((e=>i.util.decodeString(e))):e,r=(0,i.buffer)(a.shape,a.dtype,t),s=un(r,o);return n.makeTensorInfo(s.shape,s.dtype,s.values)}const s=new pu(a.shape,o);return n.runWebGLProgram(s,[a],a.dtype)}const gu={kernelName:i.Tile,backendName:"webgl",kernelFunc:mu};class yu{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=e,this.userCode="\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // We compare elements pair-wise within a group of size 2 * inc.\n // The comparing rule for each group alternates between ascending\n // and descending. Within each group, we compare each pair at\n // positions i and i+inc. To decide whether an element at position i\n // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n // inc, it is in the first half of the group, we denote it as x0,\n // otherwise we denote it as x1.\n // For example, as shown in the Bitonic top K paper referenced above,\n // Figure5(a) shows that element[1] is in the\n // second half of the group when group size is 2, but it is in the\n // first half of the group when group size is 4.\n\n bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n // Denotes which direction indices are in (ascending or descending).\n bool reverse = imod(elemIdx, 2 * dir) >= dir;\n bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n if (reverse == isGreater) { // Elements in opposite order of direction\n int iTemp = i0;\n i0 = i1;\n i1 = iTemp;\n }\n if (isFirstInPair) {\n setOutput(float(i0));\n } else {\n setOutput(float(i1));\n }\n }\n "}}class _u{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=e,this.userCode="\n void main() {\n // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int elemIdx = coords[1];\n\n // The output size is half of the previous size.\n // If the previous sequence is | | | | _ _ _ _ | | | | _ _ _ _ (k=4),\n // we only need to output the indices at positions |, the indices at\n // positions _ can be thrown away, see Figure5(b) After Phase 2\n // (Merge phase) in the Bitonic Top K paper referenced above.\n // For example, the paper shows we only need to output the orange bars.\n // The output sequence should look like this | | | | | | | |.\n // Because the sequence is halved, to map the output index back\n // to the previous sequence to find the corresponding value,\n // we need to double the index. When we double the index,\n // we basically interpolate a position, so 2i looks like\n // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n // of each 2k positions by - elemIdx % k. E.g. for output at\n // index 4,5,6,7, we want to get the corresponding element at\n // original index 8,9,10,11, for output at index 8,9,10,11,\n // we want to get the corresponding element at original index\n // 16,17,18,19, so on and so forth.\n\n int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n float x0 = getX(batch, i0);\n float x1 = i1 < n ? getX(batch, i1) : x0;\n\n setOutput(x0 >= x1 ? float(i0) : float(i1));\n }\n "}}function bu(e,t){null!==t&&e.disposeIntermediateTensorInfo(t)}function vu(e){let t=1;for(;tu){const e=n.readSync(a.dataId),[t,r]=cn(e,c,a.dtype,o,s);return[n.makeTensorInfo(t.shape,t.dtype,t.values),n.makeTensorInfo(r.shape,r.dtype,r.values)]}if(0===o)return c[c.length-1]=0,[n.makeTensorInfo(c,a.dtype,[]),n.makeTensorInfo(c,"int32",[])];if(1===d)return[a,Ji({attrs:{shape:c,dtype:"int32",value:0},backend:n})];const h=n.texData.get(a.dataId),f=null!==h&&h.isPacked,p=f?n.unpackTensor(a):a,m=i.util.sizeFromShape(c)/d,g=sr({inputs:{x:p},attrs:{shape:[m,d]},backend:n});f&&bu(n,p);const y=vu(o),_=vu(d);let b=null;const v=()=>null===b?[g,g]:[g,b],w=(e,t,r)=>{const a=v(),i=new yu(r),o=[[d],[null===b?1:0],[Number.NEGATIVE_INFINITY],[e],[t]],s=b;b=n.runWebGLProgram(i,a,"int32",o),bu(n,s)};for(let i=1;i=1;t/=2)w(e,t,[m,_])}for(let i=_;i>y;i/=2){const e=v(),t=new _u([m,i/2]),r=[[d],[null===b?1:0],[y]],a=b;b=n.runWebGLProgram(t,e,"int32",r),bu(n,a);const o=y/2,s=2*o;for(let n=o;n>=1;n/=2)w(s,n,b.shape)}let F=b;b=fa({inputs:{x:b},backend:n,attrs:{begin:0,size:[m,o]}}),bu(n,F);let k=yo({inputs:{x:g,indices:b},backend:n,attrs:{axis:1,batchDims:1}});bu(n,g);const x=c.slice(0,-1);x.push(o),F=b,b=sr({inputs:{x:b},attrs:{shape:x},backend:n}),bu(n,F);const A=k;return k=sr({inputs:{x:k},attrs:{shape:x},backend:n}),bu(n,A),[k,b]}};class Fu{constructor(e,t,n,r,a,i){this.variableNames=["Image","Transforms"],this.outputShape=i;const o="nearest"===n?1:2;let s;switch(r){case"constant":default:s=1;break;case"reflect":s=2;break;case"wrap":s=3;break;case"nearest":s=4}this.userCode=`\n float mapCoord(float outCoord, float len) {\n float inCoord = outCoord;\n if(${s} == 2) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n if (inCoord < sz2) {\n inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n inCoord;\n }\n inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz2 = 2.0 * len;\n inCoord -= sz2 * float(int(float(inCoord / sz2)));\n if (inCoord >= len) {\n inCoord = sz2 - inCoord - 1.0;\n }\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${s} == 3) {\n if (inCoord < 0.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n }\n } else if (inCoord > len - 1.0) {\n if (len <= 1.0) {\n inCoord = 0.0;\n } else {\n float sz = len - 1.0;\n inCoord -= len * float(int(float(inCoord / sz)));\n }\n }\n return clamp(inCoord, 0.0, len - 1.0);\n } else if (${s} == 4) {\n return clamp(outCoord, 0.0, len - 1.0);\n } else {\n return outCoord;\n }\n }\n\n float readWithFillValue(int batch, int coordY, int coordX,\n int channel) {\n float outputValue;\n if (0 <= coordY && coordY < ${e} && 0 <= coordX && coordX < ${t}) {\n outputValue = getImage(batch, coordY, coordX, channel);\n } else {\n outputValue = float(${a});\n }\n return outputValue;\n }\n\n void main() {\n ivec4 coords = getOutputCoords();\n float outputValue;\n int batch = coords[0];\n int x = coords[2];\n int y = coords[1];\n int channel = coords[3];\n float xf = float(x);\n float yf = float(y);\n float a1 = getTransforms(batch, 0);\n float a2 = getTransforms(batch, 1);\n float a3 = getTransforms(batch, 2);\n float b1 = getTransforms(batch, 3);\n float b2 = getTransforms(batch, 4);\n float b3 = getTransforms(batch, 5);\n float c1 = getTransforms(batch, 6);\n float c2 = getTransforms(batch, 7);\n float projection = c1 * xf + c2 * yf + 1.0;\n if (projection == 0.0) {\n outputValue = float(${a});\n } else {\n float inX = (a1 * xf + a2 * yf + a3) / projection;\n float inY = (b1 * xf + b2 * yf + b3) / projection;\n float mapX = mapCoord(inX, float(${t}));\n float mapY = mapCoord(inY, float(${e}));\n\n if (${o} == 1) {\n int coordY = int(round(mapY));\n int coordX = int(round(mapX));\n outputValue = readWithFillValue(batch, coordY, coordX,\n channel);\n } else {\n float yFloor = floor(mapY);\n float xFloor = floor(mapX);\n float yCeil = yFloor + 1.0;\n float xCeil = xFloor + 1.0;\n float valueYFloor = (xCeil - mapX) *\n readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n float valueYCeil = (xCeil - mapX) *\n readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n (mapX - xFloor) *\n readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n outputValue = (yCeil - mapY) * valueYFloor +\n (mapY - yFloor) * valueYCeil;\n }\n }\n setOutput(outputValue);\n }\n `}}const ku={kernelName:i.Transform,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{image:a,transforms:i}=t,{interpolation:o,fillMode:s,fillValue:l,outputShape:u}=r,[c,d,h,f]=a.shape,[p,m]=null!=u?u:[d,h],g=new Fu(d,h,o,s,l,[c,p,m,f]);return n.runWebGLProgram(g,[a,i],"float32")}};const xu={kernelName:i.Unique,backendName:"webgl",kernelFunc:function(e){const{inputs:t,attrs:n,backend:r}=e,{axis:a}=n,{x:i}=t;pe(i,"unique"),console.warn("WARNING: ","UI might be locked temporarily as data is being downloaded");const o=r.readSync(i.dataId),{outputValues:s,outputShape:l,indices:u}=hn(o,a,i.shape,i.dtype);return[r.makeTensorInfo(l,i.dtype,s),r.makeTensorInfo([u.length],"int32",u)]}};const Au={kernelName:i.Unpack,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{value:a}=t;let{axis:i}=r;i<0&&(i+=a.shape.length);const o=a,s=o.shape.length,l=a.shape[i],u=new Array(s-1);let c=0;for(let m=0;mn.disposeIntermediateTensorInfo(e))),p}};class Su{constructor(e,t){this.variableNames=["x","segmentIds"];const n=e.windowSize,r=e.batchSize,a=e.inSize,i=e.numSegments,o=i*Math.ceil(a/n);this.outputShape=[r,o];const s=4*Math.floor(n/4),l=n%4,u="\n sumValue += dot(values, segFilter);\n ";let c="";a%n>0&&(c=`\n if (inIdx < 0 || inIdx >= ${a}) {\n return initializationValue;\n }\n `);let d="";a%n>0&&(d=`\n if (inIdx < 0 || inIdx >= ${a}) {\n return -1.0;\n }\n `),this.userCode=`\n const float initializationValue = 0.0;\n\n float getValue(int batch, int inIdx) {\n ${c}\n return getX(batch, inIdx);\n }\n\n float getSegmentIdAtIndex(int inIdx) {\n ${d}\n return getSegmentIds(inIdx);\n }\n\n void main() {\n ivec2 coords = getOutputCoords();\n int batch = coords[0];\n int outIdx = coords[1];\n int inOffset = int(floor(float(outIdx) / float(\n ${i})) * float(${n}));\n int currentSeg = int(mod(float(outIdx), float(${i})));\n\n float sumValue = 0.0;\n\n for (int i = 0; i < ${s}; i += 4) {\n int inIdx = inOffset + i;\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n getValue(batch, inIdx + 3)\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n );\n\n ${u}\n }\n\n int inIdx = inOffset + ${s};\n if (${1===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n initializationValue,\n initializationValue,\n initializationValue\n );\n\n int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n 0,\n 0,\n 0\n );\n\n ${u}\n } else if (${2===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n initializationValue,\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n 0,\n 0\n );\n\n ${u}\n } else if (${3===l}) {\n vec4 values = vec4(\n getValue(batch, inIdx),\n getValue(batch, inIdx + 1),\n getValue(batch, inIdx + 2),\n initializationValue\n );\n\n vec4 segFilter = vec4(\n int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n 0\n );\n\n ${u}\n }\n setOutput(sumValue);\n }\n `}}const Eu=[vr,Fr,xr,Sr,Tr,Or,Pr,Mr,Vr,zr,Ur,qr,Yr,Xr,Jr,ea,ta,aa,ia,oa,ua,ma,ga,ya,_a,ka,Sa,Ta,Un,Oa,Va,Ga,Qa,ti,ni,ri,ai,oi,li,ci,gi,yi,_i,vi,ki,Si,Ei,Ti,Ii,Oi,Mi,Ri,Ni,ji,zi,Ui,$i,Xi,Zi,eo,ro,io,lo,ho,fo,mo,_o,vo,Fo,zn,ko,Na,Ao,Eo,To,$n,Io,Po,Mo,Lo,Bo,Vo,Ho,Wo,Yo,Xo,Jo,Qo,es,ts,as,is,os,ss,ls,cs,fs,ms,xs,or,Ss,Cs,Ds,Os,va,Ms,Ns,Bs,Hs,Ws,Xn,qs,$s,Ys,Gs,Ks,Fa,_s,Zs,el,nl,lr,il,sl,cl,hl,ml,yl,bl,wl,xl,Sl,Cl,Dl,Ol,Ml,Ll,Bl,pa,ks,Vl,zl,Hl,Ul,Wl,ql,$l,Yl,Kl,Zl,tu,nu,ru,iu,ou,su,lu,ws,gr,cu,hu,fu,gu,wu,ku,_r,xu,Au,{kernelName:i.UnsortedSegmentSum,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:a,segmentIds:o}=t,{numSegments:s}=r,l=a.shape.length,u=[];let c=0;const d=i.backend_util.getAxesPermutation([c],l);let h=a;null!=d&&(h=yr({inputs:{x:a},backend:n,attrs:{perm:d}}),u.push(h),c=i.backend_util.getInnerMostAxes(1,l)[0]);const f=i.backend_util.segment_util.computeOutShape(h.shape,c,s),p=i.util.sizeFromShape([h.shape[c]]),m=sr({inputs:{x:h},backend:n,attrs:{shape:[-1,p]}});u.push(m);const g=(0,i.sumOutType)(a.dtype),y=(e,t,r,a,o)=>{const s=e.shape[0],l=e.shape[1],c=i.backend_util.segment_util.segOpComputeOptimalWindowSize(l,o),d=new Su({windowSize:c,inSize:l,batchSize:s,numSegments:o},t),h=n.compileAndRun(d,[e,r],a);if(u.push(h),h.shape[1]===o)return h;const f=Xs({backend:n,attrs:{start:0,stop:o,step:1,dtype:"float32"}}),p=mu({inputs:{x:f},backend:n,attrs:{reps:[l/c]}});u.push(f),u.push(p);return y(h,t,p,a,o)},_=sr({inputs:{x:y(m,"unsortedSegmentSum",o,g,s)},backend:n,attrs:{shape:f}});let b=_;if(null!=d){u.push(_);const e=i.backend_util.getUndoAxesPermutation(d);b=yr({inputs:{x:b},backend:n,attrs:{perm:e}})}return u.forEach((e=>n.disposeIntermediateTensorInfo(e))),b}},Ls];for(const Cu of Eu)(0,i.registerKernel)(Cu)},95070:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DataStorage:()=>i,EPSILON_FLOAT16:()=>a,EPSILON_FLOAT32:()=>r,KernelBackend:()=>o});const r=1e-7,a=1e-4;class i{constructor(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}get(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)}set(e,t){this.dataIdsCount++,this.data.set(e,t)}has(e){return this.data.has(e)}delete(e){return this.dataIdsCount--,this.data.delete(e)}numDataIds(){return this.dataIdsCount}}class o{refCount(e){return s("refCount")}incRef(e){return s("incRef")}timerAvailable(){return!0}time(e){return s("time")}read(e){return s("read")}readSync(e){return s("readSync")}readToGPU(e,t){return s("readToGPU")}numDataIds(){return s("numDataIds")}disposeData(e,t){return s("disposeData")}write(e,t,n){return s("write")}move(e,t,n,r,a){return s("move")}createTensorFromGPUData(e,t,n){return s("createTensorFromGPUData")}memory(){return s("memory")}floatPrecision(){return s("floatPrecision")}epsilon(){return 32===this.floatPrecision()?r:a}dispose(){return s("dispose")}}function s(e){throw new Error(`'${e}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)}},68801:(e,t,n)=>{"use strict";function r(e,t,n){const r=function(e,t,n){return function(e,t,n){let r=0,a=e.length,i=0,o=!1;for(;r>>1);const s=n(t,e[i]);s>0?r=i+1:(a=i,o=!s)}return o?r:-r-1}(e,t,n||a)}(e,t,n),i=r<0?-(r+1):r;e.splice(i,0,t)}function a(e,t){return e>t?1:ei&&f.push({score:t[r],boxIndex:r,suppressBeginIndex:0});f.sort(d);const p=o>0?-.5/o:0,m=[],g=[];for(;m.length0;){const t=f.pop(),{score:n,boxIndex:o,suppressBeginIndex:s}=t;if(n=s;--r){const n=u(e,o,m[r]);if(n>=a){l=!0;break}if(t.score=t.score*c(a,p,n),t.score<=i)break}t.suppressBeginIndex=m.length,l||(t.score===n?(m.push(o),g.push(t.score)):t.score>i&&r(f,t,d))}const y=m.length,_=n-y;l&&_>0&&(m.push(...new Array(_).fill(0)),g.push(...new Array(_).fill(0)));const b={selectedIndices:m};return s&&(b.selectedScores=g),h&&(b.validOutputs=y),b}function u(e,t,n){const r=e.subarray(4*t,4*t+4),a=e.subarray(4*n,4*n+4),i=Math.min(r[0],r[2]),o=Math.min(r[1],r[3]),s=Math.max(r[0],r[2]),l=Math.max(r[1],r[3]),u=Math.min(a[0],a[2]),c=Math.min(a[1],a[3]),d=Math.max(a[0],a[2]),h=Math.max(a[1],a[3]),f=(s-i)*(l-o),p=(d-u)*(h-c);if(f<=0||p<=0)return 0;const m=Math.max(i,u),g=Math.max(o,c),y=Math.min(s,d),_=Math.min(l,h),b=Math.max(y-m,0)*Math.max(_-g,0);return b/(f+p-b)}function c(e,t,n){const r=Math.exp(t*n*n);return n<=e?r:0}function d(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}n.r(t),n.d(t,{nonMaxSuppressionV3Impl:()=>i,nonMaxSuppressionV4Impl:()=>o,nonMaxSuppressionV5Impl:()=>s})},52942:(e,t,n)=>{"use strict";n.r(t),n.d(t,{whereImpl:()=>a});var r=n(97963);function a(e,t){const n=[];for(let r=0;r{"use strict";n.r(t),n.d(t,{ENGINE:()=>v,Engine:()=>_,add:()=>w,getOrMakeEngine:()=>b});var r=n(95070),a=n(1023),i=n(1278),o=n(55626),s=n(73331),l=n(77652),u=n(4152),c=n(42890);class d{constructor(e,t){this.backendTimer=e,this.logger=t,null==t&&(this.logger=new f)}profileKernel(e,t,n){let r;const i=()=>{r=n()};let o;const s=u.now();if(this.backendTimer.timerAvailable())o=this.backendTimer.time(i);else{i();for(const e of r)e.dataSync();o=Promise.resolve({kernelMs:u.now()-s})}if((0,a.env)().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let a=0;a{h(n,t.dtype,e)}))}return{kernelName:e,outputs:r,inputs:t,timeMs:o.then((e=>e.kernelMs)),extraInfo:o.then((e=>null!=e.getExtraProfileInfo?e.getExtraProfileInfo():""))}}logKernelProfile(e){const{kernelName:t,outputs:n,timeMs:r,inputs:a,extraInfo:i}=e;n.forEach((e=>{Promise.all([e.data(),r,i]).then((n=>{this.logger.logKernelProfile(t,e,n[0],n[1],a,n[2])}))}))}}function h(e,t,n){if("float32"!==t)return!1;for(let r=0;r0?n:""} `}}console.log(`%c${s}\t%c${o}\t%c${l}D ${d}\t%c${u}\t%c${h}\t%c${i}`,"font-weight:bold","color:red","color:blue","color: orange","color: green","color: steelblue")}}var p=n(9180),m=n(81324);function g(e){return null!=e.kernelName}class y{constructor(){this.registeredVariables={},this.nextTapeNodeId=0,this.numBytes=0,this.numTensors=0,this.numStringTensors=0,this.numDataBuffers=0,this.gradientDepth=0,this.kernelDepth=0,this.scopeStack=[],this.numDataMovesStack=[],this.nextScopeId=0,this.tensorInfo=new WeakMap,this.profiling=!1,this.activeProfile={newBytes:0,newTensors:0,peakBytes:0,kernels:[],result:null,get kernelNames(){return Array.from(new Set(this.kernels.map((e=>e.name))))}}}dispose(){for(const e in this.registeredVariables)this.registeredVariables[e].dispose()}}class _{constructor(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new y}async ready(){if(null!=this.pendingBackendInit)return this.pendingBackendInit.then((()=>{}));if(null!=this.backendInstance)return;const e=this.getSortedBackends();for(let t=0;t{null!=e.setupFunc&&e.setupFunc(this.backendInstance)}))}disposeRegisteredKernels(e){(0,s.getKernelsForBackend)(e).forEach((t=>{null!=t.disposeFunc&&t.disposeFunc(this.registry[e])}))}initializeBackend(e){const t=this.registryFactory[e];if(null==t)throw new Error(`Cannot initialize backend ${e}, no registration found.`);try{const n=t.factory();if(!n||n instanceof r.KernelBackend||"function"!==typeof n.then)return this.registry[e]=n,{success:!0,asyncInit:!1};{const t=++this.pendingBackendInitId,r=n.then((n=>!(t(tthis.registryFactory[t].priority-this.registryFactory[e].priority))}initializeBackendsAndReturnBest(){const e=this.getSortedBackends();for(let t=0;tthis.startScope(r)),(()=>this.endScope(n)),(()=>(n=t(),n instanceof Promise&&console.error("Cannot return a Promise inside of tidy."),n)))}scopedRun(e,t,n){e();try{const e=n();return t(),e}catch(r){throw t(),r}}nextTensorId(){return _.nextTensorId++}nextVariableId(){return _.nextVariableId++}clone(e){const t=v.runKernel(o.Identity,{x:e}),n={x:e};return this.addTapeNode(this.state.activeScope.name,n,[t],(e=>({x:()=>{const t={x:e},n={dtype:"float32"};return v.runKernel(o.Cast,t,n)}})),[],{}),t}runKernel(e,t,n){null==this.backendName&&this.backend;if(!(null!=(0,s.getKernel)(e,this.backendName)))throw new Error(`Kernel '${e}' not registered for backend '${this.backendName}'`);return this.runKernelFunc({kernelName:e,inputs:t,attrs:n})}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(e,t,n){const r=this.backend.numDataIds();let a=0;n.forEach((e=>{a+="complex64"===e.dtype?3:1}));const i=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],o=r-t-a-i;if(o>0)throw new Error(`Backend '${this.backendName}' has an internal memory leak (${o} data ids) after running '${e}'`)}runKernelFunc(e){let t,n=[];const r=this.isTapeOn(),a=this.state.numBytes,i=this.state.numTensors;let o,l;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0),null==this.backendName&&this.backend;const u=g(e)?e.kernelName:null!=this.state.activeScope?this.state.activeScope.name:"";if(g(e)){const{kernelName:t,inputs:a,attrs:i}=e;null==this.backendName&&this.backend;const u=(0,s.getKernel)(t,this.backendName);c.assert(null!=u,(()=>`Cannot find registered kernel '${t}' for backend '${this.backendName}'`)),o=()=>{const e=this.backend.numDataIds();l=u.kernelFunc({inputs:a,attrs:i,backend:this.backend});const o=Array.isArray(l)?l:[l];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(t,e,o);const s=o.map((e=>null!=e.rank?e:this.makeTensorFromTensorInfo(e)));if(r){const e=this.getTensorsForGradient(t,a,s);n=this.saveTensorsForBackwardMode(e)}return s}}else{const{forwardFunc:t}=e,a=e=>{r&&(n=e.map((e=>this.keep(this.clone(e)))))};o=()=>{const e=this.backend.numDataIds();l=this.tidy((()=>t(this.backend,a)));const n=Array.isArray(l)?l:[l];return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(u,e,n),n}}const{inputs:d,attrs:h}=e,f=g(e)?null:e.backwardsFunc;let p;return this.scopedRun((()=>this.state.kernelDepth++),(()=>this.state.kernelDepth--),(()=>{this.ENV.getBool("DEBUG")||this.state.profiling?(p=this.profiler.profileKernel(u,d,(()=>o())),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(p),t=p.outputs):t=o()})),r&&this.addTapeNode(u,d,t,f,n,h),this.state.profiling&&this.state.activeProfile.kernels.push({name:u,bytesAdded:this.state.numBytes-a,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-i,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(d).map((e=>null!=d[e]?d[e].shape:null)),outputShapes:t.map((e=>e.shape)),kernelTimeMs:p.timeMs,extraInfo:p.extraInfo}),Array.isArray(l)?t:t[0]}saveTensorsForBackwardMode(e){const t=e.map((e=>this.keep(this.clone(e))));return t}getTensorsForGradient(e,t,n){const r=(0,s.getGradient)(e);if(null!=r){const e=r.inputsToSave||[],a=r.outputsToSave||[];let i;r.saveAllInputs?(c.assert(Array.isArray(t),(()=>"saveAllInputs is true, expected inputs to be an array.")),i=Object.keys(t).map((e=>t[e]))):i=e.map((e=>t[e]));const o=n.filter(((e,t)=>a[t]));return i.concat(o)}return[]}makeTensor(e,t,n,r){if(null==e)throw new Error("Values passed to engine.makeTensor() are null");n=n||"float32",r=r||this.backend;let a=e;"string"===n&&c.isString(e[0])&&(a=e.map((e=>u.encodeString(e))));const i=r.write(a,t,n),o=new p.Tensor(t,n,i,this.nextTensorId());if(this.trackTensor(o,r),"string"===n){const e=this.state.tensorInfo.get(i),t=(0,c.bytesFromStringArray)(a);this.state.numBytes+=t-e.bytes,e.bytes=t}return o}makeTensorFromDataId(e,t,n,r){const a={dataId:e,shape:t,dtype:n=n||"float32"};return this.makeTensorFromTensorInfo(a,r)}makeTensorFromTensorInfo(e,t){const{dataId:n,shape:r,dtype:a}=e,i=new p.Tensor(r,a,n,this.nextTensorId());return this.trackTensor(i,t),i}makeVariable(e,t=!0,n,r){n=n||this.nextVariableId().toString(),null!=r&&r!==e.dtype&&(e=e.cast(r));const a=new p.Variable(e,t,n,this.nextTensorId());if(null!=this.state.registeredVariables[a.name])throw new Error(`Variable with name ${a.name} was already registered`);return this.state.registeredVariables[a.name]=a,this.incRef(a,this.backend),a}trackTensor(e,t){this.state.numTensors++,"string"===e.dtype&&this.state.numStringTensors++;let n=0;"complex64"!==e.dtype&&"string"!==e.dtype&&(n=e.size*c.bytesPerElement(e.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(e.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:n})),e instanceof p.Variable||this.track(e)}incRef(e,t){this.trackTensor(e,t),this.backend.incRef(e.dataId)}removeDataId(e,t){this.state.tensorInfo.has(e)&&this.state.tensorInfo.get(e).backend===t&&(this.state.tensorInfo.delete(e),this.state.numDataBuffers--)}disposeTensor(e){if(!this.state.tensorInfo.has(e.dataId))return;const t=this.state.tensorInfo.get(e.dataId);if(this.state.numTensors--,"string"===e.dtype&&(this.state.numStringTensors--,this.state.numBytes-=t.bytes),"complex64"!==e.dtype&&"string"!==e.dtype){const t=e.size*c.bytesPerElement(e.dtype);this.state.numBytes-=t}t.backend.disposeData(e.dataId)&&this.removeDataId(e.dataId,t.backend)}disposeVariables(){for(const e in this.state.registeredVariables){const t=this.state.registeredVariables[e];this.disposeVariable(t)}}disposeVariable(e){this.disposeTensor(e),null!=this.state.registeredVariables[e.name]&&delete this.state.registeredVariables[e.name]}memory(){const e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,this.state.numStringTensors>0&&(e.unreliable=!0,null==e.reasons&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e}async profile(e){this.state.profiling=!0;const t=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map((e=>e.totalBytesSnapshot))),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n;for(const r of this.state.activeProfile.kernels)r.kernelTimeMs=await r.kernelTimeMs,r.extraInfo=await r.extraInfo;return this.state.activeProfile}isTapeOn(){return this.state.gradientDepth>0&&0===this.state.kernelDepth}addTapeNode(e,t,n,r,a,i){const o={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:a},l=(0,s.getGradient)(e);null!=l&&(r=l.gradFunc),null!=r&&(o.gradient=e=>(e=e.map(((e,t)=>{if(null==e){const e=n[t],r=c.makeZerosTypedArray(e.size,e.dtype);return this.makeTensor(r,e.shape,e.dtype)}return e})),r(e.length>1?e:e[0],a,i))),this.state.activeTape.push(o)}keep(e){return e.kept=!0,e}startTape(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(e){const t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t}endScope(e){const t=(0,m.getTensorsInContainer)(e),n=new Set(t.map((e=>e.id)));for(let a=0;a{e.kept||e.scopeId!==r.id||this.track(e)}))}gradients(e,t,n,r=!1){if(c.assert(t.length>0,(()=>"gradients() received an empty list of xs.")),null!=n&&"float32"!==n.dtype)throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);const a=this.scopedRun((()=>this.startTape()),(()=>this.endTape()),(()=>this.tidy("forward",e)));c.assert(a instanceof p.Tensor,(()=>"The result y returned by f() must be a tensor."));const i=function(e,t,n){const r={},a={};for(let l=0;lr[e.id]=!0)),s=!0,a[n.id]=!0;break}if(s)break}}const i={};i[n.id]=!0;const o={};for(let l=e.length-1;l>=0;l--){const t=e[l],n=t.inputs;for(let e=0;e0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that the f you passed encloses all operations that lead from x to y.");return this.tidy("backward",(()=>{const e={};e[a.id]=null==n?function(e){const t=(0,c.makeOnesTypedArray)((0,c.sizeFromShape)(e),"float32");return v.makeTensor(t,e,"float32")}(a.shape):n,function(e,t,n,r){for(let a=t.length-1;a>=0;a--){const i=t[a],o=[];if(i.outputs.forEach((t=>{const n=e[t.id];null!=n?o.push(n):o.push(null)})),null==i.gradient)throw new Error(`Cannot compute gradient: gradient function not found for ${i.kernelName}.`);const s=i.gradient(o);for(const t in i.inputs){if(!(t in s))throw new Error(`Cannot backprop through input ${t}. Available gradients found: ${Object.keys(s)}.`);const a=n((()=>s[t]()));if("float32"!==a.dtype)throw new Error(`Error in gradient for op ${i.kernelName}. The gradient of input ${t} must have 'float32' dtype, but has '${a.dtype}'`);const o=i.inputs[t];if(!c.arraysEqual(a.shape,o.shape))throw new Error(`Error in gradient for op ${i.kernelName}. The gradient of input '${t}' has shape '${a.shape}', which does not match the shape of the input '${o.shape}'`);if(null==e[o.id])e[o.id]=a;else{const t=e[o.id];e[o.id]=r(t,a),t.dispose()}}}}(e,i,(e=>this.tidy(e)),w);const r=t.map((t=>e[t.id]));return 0===this.state.gradientDepth&&(this.state.activeTape.forEach((e=>{for(const t of e.saved)t.dispose()})),this.state.activeTape=null),{value:a,grads:r}}))}customGrad(e){return c.assert(c.isFunction(e),(()=>"The f passed in customGrad(f) must be a function.")),(...t)=>{let n;c.assert(t.every((e=>e instanceof p.Tensor)),(()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors"));const r={};t.forEach(((e,t)=>{r[t]=e}));return this.runKernelFunc({forwardFunc:(r,a)=>(n=e(...t,a),c.assert(n.value instanceof p.Tensor,(()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor")),c.assert(c.isFunction(n.gradFunc),(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function.")),n.value),backwardsFunc:(e,r)=>{const a=n.gradFunc(e,r),i=Array.isArray(a)?a:[a];c.assert(i.length===t.length,(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns the same number of tensors as inputs passed to f(...).")),c.assert(i.every((e=>e instanceof p.Tensor)),(()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."));const o={};return i.forEach(((e,t)=>{o[t]=()=>e})),o},inputs:r})}}readSync(e){return this.state.tensorInfo.get(e).backend.readSync(e)}read(e){return this.state.tensorInfo.get(e).backend.read(e)}readToGPU(e,t){return this.state.tensorInfo.get(e).backend.readToGPU(e,t)}async time(e){const t=(0,u.now)(),n=await this.backend.time(e);return n.wallMs=(0,u.now)()-t,n}track(e){return null!=this.state.activeScope&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new y;for(const e in this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}}function b(){const e=(0,i.getGlobalNamespace)();if(null==e._tfengine){const t=new a.Environment(e);e._tfengine=new _(t)}return(0,a.setEnvironmentGlobal)(e._tfengine.ENV),(0,p.setTensorTracker)((()=>e._tfengine)),e._tfengine}_.nextTensorId=0,_.nextVariableId=0;const v=b();function w(e,t){const n={a:e,b:t};return v.runKernel(o.Add,n)}},1023:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ENV:()=>l,Environment:()=>i,env:()=>s,getQueryParams:()=>o,setEnvironmentGlobal:()=>u});var r=n(42890);const a="tfjsflags";class i{constructor(e){this.global=e,this.flags={},this.flagRegistry={},this.urlFlags={},this.getQueryParams=o,this.populateURLFlags()}setPlatform(e,t){null!=this.platform&&(s().getBool("IS_TEST")||s().getBool("PROD")||console.warn(`Platform ${this.platformName} has already been set. Overwriting the platform with ${e}.`)),this.platformName=e,this.platform=t}registerFlag(e,t,n){if(this.flagRegistry[e]={evaluationFn:t,setHook:n},null!=this.urlFlags[e]){const t=this.urlFlags[e];s().getBool("IS_TEST")||s().getBool("PROD")||console.warn(`Setting feature override from URL ${e}: ${t}.`),this.set(e,t)}}async getAsync(e){return e in this.flags||(this.flags[e]=await this.evaluateFlag(e)),this.flags[e]}get(e){if(e in this.flags)return this.flags[e];const t=this.evaluateFlag(e);if((0,r.isPromise)(t))throw new Error(`Flag ${e} cannot be synchronously evaluated. Please use getAsync() instead.`);return this.flags[e]=t,this.flags[e]}getNumber(e){return this.get(e)}getBool(e){return this.get(e)}getString(e){return this.get(e)}getFlags(){return this.flags}get features(){return this.flags}set(e,t){if(null==this.flagRegistry[e])throw new Error(`Cannot set flag ${e} as it has not been registered.`);this.flags[e]=t,null!=this.flagRegistry[e].setHook&&this.flagRegistry[e].setHook(t)}evaluateFlag(e){if(null==this.flagRegistry[e])throw new Error(`Cannot evaluate flag '${e}': no evaluation function found.`);return this.flagRegistry[e].evaluationFn()}setFlags(e){this.flags=Object.assign({},e)}reset(){this.flags={},this.urlFlags={},this.populateURLFlags()}populateURLFlags(){if("undefined"===typeof this.global||"undefined"===typeof this.global.location||"undefined"===typeof this.global.location.search)return;const e=this.getQueryParams(this.global.location.search);if(a in e){e[a].split(",").forEach((e=>{const[t,n]=e.split(":");this.urlFlags[t]=function(e,t){const n=t.toLowerCase();return"true"===n||"false"===n?"true"===n:""+ +n===n?+n:t}(0,n)}))}}}function o(e){const t={};return e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,((e,...n)=>(function(e,t,n){e[decodeURIComponent(t)]=decodeURIComponent(n||"")}(t,n[0],n[1]),n.join("=")))),t}function s(){return l}let l=null;function u(e){l=e}},1278:(e,t,n)=>{"use strict";let r;function a(){if(null==r){let e;e=window,r=e}return r}function i(e,t){const n=function(){const e=a();return null==e._tfGlobals&&(e._tfGlobals=new Map),e._tfGlobals}();if(n.has(e))return n.get(e);{const r=t();return n.set(e,r),n.get(e)}}n.r(t),n.d(t,{getGlobal:()=>i,getGlobalNamespace:()=>a})},75238:(e,t,n)=>{"use strict";n.r(t),n.d(t,{backend:()=>S,deprecationWarn:()=>c,disableDeprecationWarnings:()=>u,dispose:()=>g,disposeVariables:()=>d,enableDebugMode:()=>l,enableProdMode:()=>s,engine:()=>h,findBackend:()=>k,findBackendFactory:()=>x,getBackend:()=>w,keep:()=>y,memory:()=>f,profile:()=>p,ready:()=>v,registerBackend:()=>A,removeBackend:()=>F,setBackend:()=>b,setPlatform:()=>E,tidy:()=>m,time:()=>_});var r=n(55279),a=n(1023),i=n(9180),o=n(81324);function s(){(0,a.env)().set("PROD",!0)}function l(){(0,a.env)().set("DEBUG",!0)}function u(){(0,a.env)().set("DEPRECATION_WARNINGS_ENABLED",!1),console.warn("TensorFlow.js deprecation warnings have been disabled.")}function c(e){(0,a.env)().getBool("DEPRECATION_WARNINGS_ENABLED")&&console.warn(e+" You can disable deprecation warnings with tf.disableDeprecationWarnings().")}function d(){r.ENGINE.disposeVariables()}function h(){return r.ENGINE}function f(){return r.ENGINE.memory()}function p(e){return r.ENGINE.profile(e)}function m(e,t){return r.ENGINE.tidy(e,t)}function g(e){(0,o.getTensorsInContainer)(e).forEach((e=>e.dispose()))}function y(e){return r.ENGINE.keep(e)}function _(e){return r.ENGINE.time(e)}function b(e){return r.ENGINE.setBackend(e)}function v(){return r.ENGINE.ready()}function w(){return r.ENGINE.backendName}function F(e){r.ENGINE.removeBackend(e)}function k(e){return r.ENGINE.findBackend(e)}function x(e){return r.ENGINE.findBackendFactory(e)}function A(e,t,n=1){return r.ENGINE.registerBackend(e,t,n)}function S(){return r.ENGINE.backend}function E(e,t){(0,a.env)().setPlatform(e,t)}(0,i.setDeprecationWarningFn)(c)},48775:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customGrad:()=>h,grad:()=>s,grads:()=>l,valueAndGrad:()=>u,valueAndGrads:()=>c,variableGrads:()=>d});var r=n(55279),a=n(9180),i=n(41564),o=n(42890);function s(e){return o.assert(o.isFunction(e),(()=>"The f passed in grad(f) must be a function")),(t,n)=>{const a=(0,i.convertToTensor)(t,"x","tf.grad","string_or_numeric"),s=null!=n?(0,i.convertToTensor)(n,"dy","tf.grad"):null;return r.ENGINE.tidy((()=>{const{value:t,grads:n}=r.ENGINE.gradients((()=>e(a)),[a],s);return null!=s&&o.assertShapesMatch(t.shape,s.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),f(n),n[0]}))}}function l(e){return o.assert(o.isFunction(e),(()=>"The f passed in grads(f) must be a function")),(t,n)=>{o.assert(Array.isArray(t),(()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s"));const a=(0,i.convertToTensorArray)(t,"args","tf.grads","string_or_numeric"),s=null!=n?(0,i.convertToTensor)(n,"dy","tf.grads"):null;return r.ENGINE.tidy((()=>{const{value:t,grads:n}=r.ENGINE.gradients((()=>e(...a)),a,s);return null!=s&&o.assertShapesMatch(t.shape,s.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),f(n),n}))}}function u(e){return o.assert(o.isFunction(e),(()=>"The f passed in valueAndGrad(f) must be a function")),(t,n)=>{o.assert(t instanceof a.Tensor,(()=>"The x passed in valueAndGrad(f)(x) must be a tensor")),o.assert(null==n||n instanceof a.Tensor,(()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor"));const{grads:i,value:s}=r.ENGINE.gradients((()=>e(t)),[t],n);return f(i),{grad:i[0],value:s}}}function c(e){return o.assert(o.isFunction(e),(()=>"The f passed in valueAndGrads(f) must be a function")),(t,n)=>{o.assert(Array.isArray(t)&&t.every((e=>e instanceof a.Tensor)),(()=>"The args passed in valueAndGrads(f)(args) must be array of tensors")),o.assert(null==n||n instanceof a.Tensor,(()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor"));const i=r.ENGINE.gradients((()=>e(...t)),t,n);return null!=n&&o.assertShapesMatch(i.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),f(i.grads),i}}function d(e,t){o.assert(o.isFunction(e),(()=>"The f passed in variableGrads(f) must be a function")),o.assert(null==t||Array.isArray(t)&&t.every((e=>e instanceof a.Variable)),(()=>"The varList passed in variableGrads(f, varList) must be an array of variables"));const n=null!=t;if(!n){t=[];for(const e in r.ENGINE.registeredVariables)t.push(r.ENGINE.registeredVariables[e])}const i=n?t.filter((e=>!e.trainable)):null,s=t.length;t=t.filter((e=>e.trainable)),o.assert(t.length>0,(()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${s} variables is trainable.`));const{value:l,grads:u}=r.ENGINE.gradients(e,t,null,!0);o.assert(u.some((e=>null!=e)),(()=>"Cannot find a connection between any variable and the result of the loss function y=f(x). Please make sure the operations that use variables are inside the function f passed to minimize().")),o.assert(0===l.rank,(()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${l.rank} tensor`));const c={};return t.forEach(((e,t)=>{null!=u[t]&&(c[e.name]=u[t])})),null!=i&&i.forEach((e=>c[e.name]=null)),{value:l,grads:c}}function h(e){return r.ENGINE.customGrad(e)}function f(e){if(e.filter((e=>null==e)).length>0)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that\n the f you passed encloses all operations that lead from x to y.")}},66723:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Abs:()=>gt.Abs,Acos:()=>gt.Acos,Acosh:()=>gt.Acosh,AdadeltaOptimizer:()=>Te,AdagradOptimizer:()=>Ie,AdamOptimizer:()=>Me,AdamaxOptimizer:()=>Ne,Add:()=>gt.Add,AddN:()=>gt.AddN,All:()=>gt.All,Any:()=>gt.Any,ArgMax:()=>gt.ArgMax,ArgMin:()=>gt.ArgMin,Asin:()=>gt.Asin,Asinh:()=>gt.Asinh,Atan:()=>gt.Atan,Atan2:()=>gt.Atan2,Atanh:()=>gt.Atanh,AvgPool:()=>gt.AvgPool,AvgPool3D:()=>gt.AvgPool3D,AvgPool3DGrad:()=>gt.AvgPool3DGrad,AvgPoolGrad:()=>gt.AvgPoolGrad,BatchMatMul:()=>gt.BatchMatMul,BatchToSpaceND:()=>gt.BatchToSpaceND,Bincount:()=>gt.Bincount,BitwiseAnd:()=>gt.BitwiseAnd,BroadcastArgs:()=>gt.BroadcastArgs,BroadcastTo:()=>gt.BroadcastTo,Cast:()=>gt.Cast,Ceil:()=>gt.Ceil,ClipByValue:()=>gt.ClipByValue,Complex:()=>gt.Complex,ComplexAbs:()=>gt.ComplexAbs,Concat:()=>gt.Concat,Conv2D:()=>gt.Conv2D,Conv2DBackpropFilter:()=>gt.Conv2DBackpropFilter,Conv2DBackpropInput:()=>gt.Conv2DBackpropInput,Conv3D:()=>gt.Conv3D,Conv3DBackpropFilterV2:()=>gt.Conv3DBackpropFilterV2,Conv3DBackpropInputV2:()=>gt.Conv3DBackpropInputV2,Cos:()=>gt.Cos,Cosh:()=>gt.Cosh,CropAndResize:()=>gt.CropAndResize,Cumprod:()=>gt.Cumprod,Cumsum:()=>gt.Cumsum,DataStorage:()=>Qn.DataStorage,DenseBincount:()=>gt.DenseBincount,DepthToSpace:()=>gt.DepthToSpace,DepthwiseConv2dNative:()=>gt.DepthwiseConv2dNative,DepthwiseConv2dNativeBackpropFilter:()=>gt.DepthwiseConv2dNativeBackpropFilter,DepthwiseConv2dNativeBackpropInput:()=>gt.DepthwiseConv2dNativeBackpropInput,Diag:()=>gt.Diag,Dilation2D:()=>gt.Dilation2D,Dilation2DBackpropFilter:()=>gt.Dilation2DBackpropFilter,Dilation2DBackpropInput:()=>gt.Dilation2DBackpropInput,Draw:()=>gt.Draw,ENV:()=>y.ENV,Einsum:()=>gt.Einsum,Elu:()=>gt.Elu,EluGrad:()=>gt.EluGrad,Environment:()=>y.Environment,Equal:()=>gt.Equal,Erf:()=>gt.Erf,Exp:()=>gt.Exp,ExpandDims:()=>gt.ExpandDims,Expm1:()=>gt.Expm1,FFT:()=>gt.FFT,Fill:()=>gt.Fill,FlipLeftRight:()=>gt.FlipLeftRight,Floor:()=>gt.Floor,FloorDiv:()=>gt.FloorDiv,FromPixels:()=>gt.FromPixels,FusedBatchNorm:()=>gt.FusedBatchNorm,FusedConv2D:()=>gt.FusedConv2D,FusedDepthwiseConv2D:()=>gt.FusedDepthwiseConv2D,GatherNd:()=>gt.GatherNd,GatherV2:()=>gt.GatherV2,Greater:()=>gt.Greater,GreaterEqual:()=>gt.GreaterEqual,IFFT:()=>gt.IFFT,Identity:()=>gt.Identity,Imag:()=>gt.Imag,IsFinite:()=>gt.IsFinite,IsInf:()=>gt.IsInf,IsNan:()=>gt.IsNan,KernelBackend:()=>Qn.KernelBackend,LRN:()=>gt.LRN,LRNGrad:()=>gt.LRNGrad,LeakyRelu:()=>gt.LeakyRelu,Less:()=>gt.Less,LessEqual:()=>gt.LessEqual,LinSpace:()=>gt.LinSpace,Log:()=>gt.Log,Log1p:()=>gt.Log1p,LogSoftmax:()=>gt.LogSoftmax,LogicalAnd:()=>gt.LogicalAnd,LogicalNot:()=>gt.LogicalNot,LogicalOr:()=>gt.LogicalOr,LogicalXor:()=>gt.LogicalXor,LowerBound:()=>gt.LowerBound,MatrixBandPart:()=>gt.MatrixBandPart,Max:()=>gt.Max,MaxPool:()=>gt.MaxPool,MaxPool3D:()=>gt.MaxPool3D,MaxPool3DGrad:()=>gt.MaxPool3DGrad,MaxPoolGrad:()=>gt.MaxPoolGrad,MaxPoolWithArgmax:()=>gt.MaxPoolWithArgmax,Maximum:()=>gt.Maximum,Mean:()=>gt.Mean,Min:()=>gt.Min,Minimum:()=>gt.Minimum,MirrorPad:()=>gt.MirrorPad,Mod:()=>gt.Mod,MomentumOptimizer:()=>je,Multinomial:()=>gt.Multinomial,Multiply:()=>gt.Multiply,Neg:()=>gt.Neg,NonMaxSuppressionV3:()=>gt.NonMaxSuppressionV3,NonMaxSuppressionV4:()=>gt.NonMaxSuppressionV4,NonMaxSuppressionV5:()=>gt.NonMaxSuppressionV5,NotEqual:()=>gt.NotEqual,OP_SCOPE_SUFFIX:()=>Nt.OP_SCOPE_SUFFIX,OneHot:()=>gt.OneHot,OnesLike:()=>gt.OnesLike,Optimizer:()=>Ce,OptimizerConstructors:()=>Rt,Pack:()=>gt.Pack,PadV2:()=>gt.PadV2,Pool:()=>gt.Pool,Pow:()=>gt.Pow,Prelu:()=>gt.Prelu,Prod:()=>gt.Prod,RMSPropOptimizer:()=>Ve,RaggedGather:()=>gt.RaggedGather,RaggedRange:()=>gt.RaggedRange,RaggedTensorToTensor:()=>gt.RaggedTensorToTensor,Range:()=>gt.Range,Rank:()=>Lt.Rank,Real:()=>gt.Real,RealDiv:()=>gt.RealDiv,Reciprocal:()=>gt.Reciprocal,Reduction:()=>Bt.Reduction,Relu:()=>gt.Relu,Relu6:()=>gt.Relu6,Reshape:()=>gt.Reshape,ResizeBilinear:()=>gt.ResizeBilinear,ResizeBilinearGrad:()=>gt.ResizeBilinearGrad,ResizeNearestNeighbor:()=>gt.ResizeNearestNeighbor,ResizeNearestNeighborGrad:()=>gt.ResizeNearestNeighborGrad,Reverse:()=>gt.Reverse,RotateWithOffset:()=>gt.RotateWithOffset,Round:()=>gt.Round,Rsqrt:()=>gt.Rsqrt,SGDOptimizer:()=>Be,ScatterNd:()=>gt.ScatterNd,SearchSorted:()=>gt.SearchSorted,Select:()=>gt.Select,Selu:()=>gt.Selu,Sigmoid:()=>gt.Sigmoid,Sign:()=>gt.Sign,Sin:()=>gt.Sin,Sinh:()=>gt.Sinh,Slice:()=>gt.Slice,Softmax:()=>gt.Softmax,Softplus:()=>gt.Softplus,SpaceToBatchND:()=>gt.SpaceToBatchND,SparseFillEmptyRows:()=>gt.SparseFillEmptyRows,SparseReshape:()=>gt.SparseReshape,SparseSegmentMean:()=>gt.SparseSegmentMean,SparseSegmentSum:()=>gt.SparseSegmentSum,SparseToDense:()=>gt.SparseToDense,SplitV:()=>gt.SplitV,Sqrt:()=>gt.Sqrt,Square:()=>gt.Square,SquaredDifference:()=>gt.SquaredDifference,StaticRegexReplace:()=>gt.StaticRegexReplace,Step:()=>gt.Step,StridedSlice:()=>gt.StridedSlice,StringNGrams:()=>gt.StringNGrams,StringSplit:()=>gt.StringSplit,StringToHashBucketFast:()=>gt.StringToHashBucketFast,Sub:()=>gt.Sub,Sum:()=>gt.Sum,Tan:()=>gt.Tan,Tanh:()=>gt.Tanh,Tensor:()=>de.Tensor,TensorBuffer:()=>de.TensorBuffer,TensorScatterUpdate:()=>gt.TensorScatterUpdate,Tile:()=>gt.Tile,TopK:()=>gt.TopK,Transform:()=>gt.Transform,Transpose:()=>gt.Transpose,Unique:()=>gt.Unique,Unpack:()=>gt.Unpack,UnsortedSegmentSum:()=>gt.UnsortedSegmentSum,UpperBound:()=>gt.UpperBound,Variable:()=>de.Variable,ZerosLike:()=>gt.ZerosLike,_FusedMatMul:()=>gt._FusedMatMul,abs:()=>Nt.abs,acos:()=>Nt.acos,acosh:()=>Nt.acosh,add:()=>Nt.add,addN:()=>Nt.addN,all:()=>Nt.all,any:()=>Nt.any,argMax:()=>Nt.argMax,argMin:()=>Nt.argMin,asin:()=>Nt.asin,asinh:()=>Nt.asinh,atan:()=>Nt.atan,atan2:()=>Nt.atan2,atanh:()=>Nt.atanh,avgPool:()=>Nt.avgPool,avgPool3d:()=>Nt.avgPool3d,backend:()=>fe.backend,backend_util:()=>c,basicLSTMCell:()=>Nt.basicLSTMCell,batchNorm:()=>Nt.batchNorm,batchNorm2d:()=>Nt.batchNorm2d,batchNorm3d:()=>Nt.batchNorm3d,batchNorm4d:()=>Nt.batchNorm4d,batchToSpaceND:()=>Nt.batchToSpaceND,bincount:()=>Nt.bincount,bitwiseAnd:()=>Nt.bitwiseAnd,booleanMaskAsync:()=>Nt.booleanMaskAsync,broadcastArgs:()=>Nt.broadcastArgs,broadcastTo:()=>Nt.broadcastTo,broadcast_util:()=>mt,browser:()=>s,buffer:()=>Nt.buffer,cast:()=>Nt.cast,ceil:()=>Nt.ceil,clipByValue:()=>Nt.clipByValue,clone:()=>Nt.clone,complex:()=>Nt.complex,concat:()=>Nt.concat,concat1d:()=>Nt.concat1d,concat2d:()=>Nt.concat2d,concat3d:()=>Nt.concat3d,concat4d:()=>Nt.concat4d,conv1d:()=>Nt.conv1d,conv2d:()=>Nt.conv2d,conv2dTranspose:()=>Nt.conv2dTranspose,conv3d:()=>Nt.conv3d,conv3dTranspose:()=>Nt.conv3dTranspose,copyRegisteredKernels:()=>yt.copyRegisteredKernels,cos:()=>Nt.cos,cosh:()=>Nt.cosh,cosineWindow:()=>Nt.cosineWindow,cumprod:()=>Nt.cumprod,cumsum:()=>Nt.cumsum,customGrad:()=>ve.customGrad,denseBincount:()=>Nt.denseBincount,deprecationWarn:()=>fe.deprecationWarn,depthToSpace:()=>Nt.depthToSpace,depthwiseConv2d:()=>Nt.depthwiseConv2d,device_util:()=>r,diag:()=>Nt.diag,dilation2d:()=>Nt.dilation2d,disableDeprecationWarnings:()=>fe.disableDeprecationWarnings,dispose:()=>fe.dispose,disposeVariables:()=>fe.disposeVariables,div:()=>Nt.div,divNoNan:()=>Nt.divNoNan,dot:()=>Nt.dot,dropout:()=>Nt.dropout,einsum:()=>Nt.einsum,elu:()=>Nt.elu,enableDebugMode:()=>fe.enableDebugMode,enableProdMode:()=>fe.enableProdMode,enclosingPowerOfTwo:()=>Nt.enclosingPowerOfTwo,engine:()=>fe.engine,ensureShape:()=>Nt.ensureShape,env:()=>y.env,equal:()=>Nt.equal,erf:()=>Nt.erf,euclideanNorm:()=>Nt.euclideanNorm,exp:()=>Nt.exp,expandDims:()=>Nt.expandDims,expm1:()=>Nt.expm1,eye:()=>Nt.eye,fft:()=>Nt.fft,fill:()=>Nt.fill,findBackend:()=>fe.findBackend,findBackendFactory:()=>fe.findBackendFactory,floor:()=>Nt.floor,floorDiv:()=>Nt.floorDiv,fused:()=>Nt.fused,gather:()=>Nt.gather,gatherND:()=>Nt.gatherND,gather_util:()=>l,getBackend:()=>fe.getBackend,getGradient:()=>yt.getGradient,getKernel:()=>yt.getKernel,getKernelsForBackend:()=>yt.getKernelsForBackend,grad:()=>ve.grad,grads:()=>ve.grads,greater:()=>Nt.greater,greaterEqual:()=>Nt.greaterEqual,ifft:()=>Nt.ifft,imag:()=>Nt.imag,image:()=>Nt.image,inTopKAsync:()=>Nt.inTopKAsync,io:()=>i,irfft:()=>Nt.irfft,isFinite:()=>Nt.isFinite,isInf:()=>Nt.isInf,isNaN:()=>Nt.isNaN,keep:()=>fe.keep,kernel_impls:()=>d,leakyRelu:()=>Nt.leakyRelu,less:()=>Nt.less,lessEqual:()=>Nt.lessEqual,linalg:()=>Nt.linalg,linspace:()=>Nt.linspace,localResponseNormalization:()=>Nt.localResponseNormalization,log:()=>Nt.log,log1p:()=>Nt.log1p,logSigmoid:()=>Nt.logSigmoid,logSoftmax:()=>Nt.logSoftmax,logSumExp:()=>Nt.logSumExp,logicalAnd:()=>Nt.logicalAnd,logicalNot:()=>Nt.logicalNot,logicalOr:()=>Nt.logicalOr,logicalXor:()=>Nt.logicalXor,losses:()=>Nt.losses,lowerBound:()=>Nt.lowerBound,matMul:()=>Nt.matMul,math:()=>o,max:()=>Nt.max,maxPool:()=>Nt.maxPool,maxPool3d:()=>Nt.maxPool3d,maxPoolWithArgmax:()=>Nt.maxPoolWithArgmax,maximum:()=>Nt.maximum,mean:()=>Nt.mean,memory:()=>fe.memory,meshgrid:()=>Nt.meshgrid,min:()=>Nt.min,minimum:()=>Nt.minimum,mirrorPad:()=>Nt.mirrorPad,mod:()=>Nt.mod,moments:()=>Nt.moments,movingAverage:()=>Nt.movingAverage,mul:()=>Nt.mul,multiRNNCell:()=>Nt.multiRNNCell,multinomial:()=>Nt.multinomial,neg:()=>Nt.neg,nextFrame:()=>zt,norm:()=>Nt.norm,notEqual:()=>Nt.notEqual,oneHot:()=>Nt.oneHot,ones:()=>Nt.ones,onesLike:()=>Nt.onesLike,op:()=>Nt.op,outerProduct:()=>Nt.outerProduct,pad:()=>Nt.pad,pad1d:()=>Nt.pad1d,pad2d:()=>Nt.pad2d,pad3d:()=>Nt.pad3d,pad4d:()=>Nt.pad4d,pool:()=>Nt.pool,pow:()=>Nt.pow,prelu:()=>Nt.prelu,print:()=>Nt.print,prod:()=>Nt.prod,profile:()=>fe.profile,raggedGather:()=>Nt.raggedGather,raggedRange:()=>Nt.raggedRange,raggedTensorToTensor:()=>Nt.raggedTensorToTensor,rand:()=>Nt.rand,randomGamma:()=>Nt.randomGamma,randomNormal:()=>Nt.randomNormal,randomStandardNormal:()=>Nt.randomStandardNormal,randomUniform:()=>Nt.randomUniform,randomUniformInt:()=>Nt.randomUniformInt,range:()=>Nt.range,ready:()=>fe.ready,real:()=>Nt.real,reciprocal:()=>Nt.reciprocal,registerBackend:()=>fe.registerBackend,registerGradient:()=>yt.registerGradient,registerKernel:()=>yt.registerKernel,relu:()=>Nt.relu,relu6:()=>Nt.relu6,removeBackend:()=>fe.removeBackend,reshape:()=>Nt.reshape,reverse:()=>Nt.reverse,reverse1d:()=>Nt.reverse1d,reverse2d:()=>Nt.reverse2d,reverse3d:()=>Nt.reverse3d,reverse4d:()=>Nt.reverse4d,rfft:()=>Nt.rfft,round:()=>Nt.round,rsqrt:()=>Nt.rsqrt,scalar:()=>Nt.scalar,scatterND:()=>Nt.scatterND,scatter_util:()=>Tt,searchSorted:()=>Nt.searchSorted,selu:()=>Nt.selu,separableConv2d:()=>Nt.separableConv2d,serialization:()=>a,setBackend:()=>fe.setBackend,setPlatform:()=>fe.setPlatform,setdiff1dAsync:()=>Nt.setdiff1dAsync,sigmoid:()=>Nt.sigmoid,sign:()=>Nt.sign,signal:()=>Nt.signal,sin:()=>Nt.sin,sinh:()=>Nt.sinh,slice:()=>Nt.slice,slice1d:()=>Nt.slice1d,slice2d:()=>Nt.slice2d,slice3d:()=>Nt.slice3d,slice4d:()=>Nt.slice4d,slice_util:()=>Dt,softmax:()=>Nt.softmax,softplus:()=>Nt.softplus,spaceToBatchND:()=>Nt.spaceToBatchND,sparse:()=>Nt.sparse,sparseToDense:()=>Nt.sparseToDense,spectral:()=>Nt.spectral,split:()=>Nt.split,sqrt:()=>Nt.sqrt,square:()=>Nt.square,squaredDifference:()=>Nt.squaredDifference,squeeze:()=>Nt.squeeze,stack:()=>Nt.stack,step:()=>Nt.step,stridedSlice:()=>Nt.stridedSlice,string:()=>Nt.string,sub:()=>Nt.sub,sum:()=>Nt.sum,sumOutType:()=>Lt.sumOutType,tan:()=>Nt.tan,tanh:()=>Nt.tanh,tensor:()=>Nt.tensor,tensor1d:()=>Nt.tensor1d,tensor2d:()=>Nt.tensor2d,tensor3d:()=>Nt.tensor3d,tensor4d:()=>Nt.tensor4d,tensor5d:()=>Nt.tensor5d,tensor6d:()=>Nt.tensor6d,tensorScatterUpdate:()=>Nt.tensorScatterUpdate,tensor_util:()=>It,test_util:()=>Ot,tidy:()=>fe.tidy,tile:()=>Nt.tile,time:()=>fe.time,topk:()=>Nt.topk,train:()=>jt,transpose:()=>Nt.transpose,truncatedNormal:()=>Nt.truncatedNormal,unique:()=>Nt.unique,unregisterGradient:()=>yt.unregisterGradient,unregisterKernel:()=>yt.unregisterKernel,unsortedSegmentSum:()=>Nt.unsortedSegmentSum,unstack:()=>Nt.unstack,upcastType:()=>Lt.upcastType,upperBound:()=>Nt.upperBound,util:()=>Pt,valueAndGrad:()=>ve.valueAndGrad,valueAndGrads:()=>ve.valueAndGrads,variable:()=>Nt.variable,variableGrads:()=>ve.variableGrads,version_core:()=>Mt,where:()=>Nt.where,whereAsync:()=>Nt.whereAsync,zeros:()=>Nt.zeros,zerosLike:()=>Nt.zerosLike});var r={};n.r(r),n.d(r,{isBrowser:()=>g,isMobile:()=>m,mockIsMobile:()=>p});var a={};n.r(a),n.d(a,{Serializable:()=>xe,SerializationMap:()=>Ae,getRegisteredName:()=>Ee,registerClass:()=>Se});var i={};n.r(i),n.d(i,{CompositeArrayBuffer:()=>A.CompositeArrayBuffer,browserFiles:()=>qe,browserHTTPRequest:()=>tt,concatenateArrayBuffers:()=>b.concatenateArrayBuffers,copyModel:()=>ee,decodeWeights:()=>b.decodeWeights,decodeWeightsStream:()=>b.decodeWeightsStream,encodeWeights:()=>b.encodeWeights,fromMemory:()=>it,fromMemorySync:()=>ot,getLoadHandlers:()=>x,getModelArtifactsForJSON:()=>b.getModelArtifactsForJSON,getModelArtifactsForJSONSync:()=>b.getModelArtifactsForJSONSync,getModelArtifactsInfoForJSON:()=>b.getModelArtifactsInfoForJSON,getSaveHandlers:()=>k,getWeightSpecs:()=>b.getWeightSpecs,http:()=>et,isHTTPScheme:()=>Ze,listModels:()=>Z,loadWeights:()=>Xe,moveModel:()=>te,registerLoadRouter:()=>F,registerSaveRouter:()=>w,removeModel:()=>Q,weightsLoaderFactory:()=>Ke,withSaveHandler:()=>st,withSaveHandlerSync:()=>lt});var o={};n.r(o),n.d(o,{confusionMatrix:()=>pt});var s={};n.r(s),n.d(s,{draw:()=>St,fromPixels:()=>Et,fromPixelsAsync:()=>kt,toPixels:()=>At});var l={};n.r(l),n.d(l,{prepareAndValidate:()=>Ct});var u={};n.r(u),n.d(u,{collectGatherOpShapeInfo:()=>Gn,computeOutShape:()=>Yn,segOpComputeOptimalWindowSize:()=>$n});var c={};n.r(c),n.d(c,{ERF_A1:()=>un,ERF_A2:()=>cn,ERF_A3:()=>dn,ERF_A4:()=>hn,ERF_A5:()=>fn,ERF_P:()=>ln,PARALLELIZE_THRESHOLD:()=>Zt,RowPartitionType:()=>qt,SELU_SCALE:()=>sn.SELU_SCALE,SELU_SCALEALPHA:()=>sn.SELU_SCALEALPHA,applyActivation:()=>Yt.applyActivation,assertAndGetBroadcastShape:()=>mt.assertAndGetBroadcastShape,assertAxesAreInnerMostDims:()=>Ht.assertAxesAreInnerMostDims,assertParamsConsistent:()=>Ut,assignToTypedArray:()=>vn,axesAreInnerMostDims:()=>Ht.axesAreInnerMostDims,calculateShapes:()=>Tt.calculateShapes,checkEinsumDimSizes:()=>Tn,checkPadOnDimRoundingMode:()=>$t.checkPadOnDimRoundingMode,combineLocations:()=>Ht.combineLocations,combineRaggedTensorToTensorShapes:()=>Gt,complexWithEvenIndex:()=>yn,complexWithOddIndex:()=>_n,computeConv2DInfo:()=>$t.computeConv2DInfo,computeConv3DInfo:()=>$t.computeConv3DInfo,computeDefaultPad:()=>$t.computeDefaultPad,computeDilation2DInfo:()=>$t.computeDilation2DInfo,computeOptimalWindowSize:()=>Qt,computeOutAndReduceShapes:()=>Ht.computeOutAndReduceShapes,computeOutShape:()=>Wt,computePool2DInfo:()=>$t.computePool2DInfo,computePool3DInfo:()=>$t.computePool3DInfo,convertConv2DDataFormat:()=>$t.convertConv2DDataFormat,decodeEinsumEquation:()=>En,eitherStridesOrDilationsAreOne:()=>$t.eitherStridesOrDilationsAreOne,expandShapeToKeepDim:()=>Ht.expandShapeToKeepDim,exponent:()=>Fn,exponents:()=>wn,fromStringArrayToUint8:()=>Kn,fromUint8ToStringArray:()=>Xn,getAxesPermutation:()=>Ht.getAxesPermutation,getBroadcastDims:()=>mt.getBroadcastDims,getComplexWithIndex:()=>bn,getEinsumComputePath:()=>Dn,getEinsumPermutation:()=>Cn,getFusedBiasGradient:()=>Yt.getFusedBiasGradient,getFusedDyActivation:()=>Yt.getFusedDyActivation,getImageCenter:()=>en,getInnerMostAxes:()=>Ht.getInnerMostAxes,getPermuted:()=>nn,getRaggedRank:()=>Kt,getReductionAxes:()=>mt.getReductionAxes,getReshaped:()=>tn,getReshapedPermuted:()=>rn,getRowPartitionTypesHelper:()=>Xt,getSliceBeginCoords:()=>an,getSliceSize:()=>on,getSparseFillEmptyRowsIndicesDenseShapeMismatch:()=>Mn,getSparseFillEmptyRowsNegativeIndexErrorMessage:()=>Rn,getSparseFillEmptyRowsOutOfRangeIndexErrorMessage:()=>Ln,getSparseReshapeEmptyTensorZeroOutputDimErrorMessage:()=>jn,getSparseReshapeInputOutputMismatchErrorMessage:()=>zn,getSparseReshapeInputOutputMultipleErrorMessage:()=>Vn,getSparseReshapeMultipleNegativeOneOutputDimErrorMessage:()=>Nn,getSparseReshapeNegativeOutputDimErrorMessage:()=>Bn,getSparseSegmentReductionIndicesOutOfRangeErrorMessage:()=>qn,getSparseSegmentReductionNegativeSegmentIdsErrorMessage:()=>Hn,getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage:()=>Un,getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage:()=>Wn,getUndoAxesPermutation:()=>Ht.getUndoAxesPermutation,isIdentityPermutation:()=>In,log:()=>pn.log,mergeRealAndImagArrays:()=>mn,prepareAndValidate:()=>Ct,prepareSplitSize:()=>Pn,segment_util:()=>u,shouldFuse:()=>Yt.shouldFuse,slice_util:()=>Dt,splitRealAndImagArrays:()=>gn,stridesOrDilationsArePositive:()=>$t.stridesOrDilationsArePositive,tupleValuesAreOne:()=>$t.tupleValuesAreOne,upcastType:()=>Lt.upcastType,validateDefaultValueShape:()=>Jt,validateInput:()=>Tt.validateInput,validateUpdateShape:()=>Tt.validateUpdateShape,warn:()=>pn.warn});var d={};n.r(d),n.d(d,{nonMaxSuppressionV3Impl:()=>Jn.nonMaxSuppressionV3Impl,nonMaxSuppressionV4Impl:()=>Jn.nonMaxSuppressionV4Impl,nonMaxSuppressionV5Impl:()=>Jn.nonMaxSuppressionV5Impl,whereImpl:()=>Zn.whereImpl});var h=n(55279);let f;function p(e){f=e}function m(e){if(void 0!==f)return f;if(e||"undefined"!==typeof navigator&&null!=navigator){if(e||(e=navigator),"ReactNative"===e.product)return!0;const t=e.userAgent||e.vendor||window.opera;if(!t){const t=e;return t.userAgentData&&t.userAgentData.mobile}return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4))}return!1}function g(){return null!=window.document||"undefined"!==typeof WorkerGlobalScope}var y=n(1023);const _=(0,y.env)();_.registerFlag("DEBUG",(()=>!1),(e=>{e&&console.warn("Debugging mode is ON. The output of every math call will be downloaded to CPU and checked for NaNs. This significantly impacts performance.")})),_.registerFlag("IS_BROWSER",(()=>g())),_.registerFlag("IS_NODE",(()=>"undefined"!==typeof process&&"undefined"!==typeof process.versions&&"undefined"!==typeof process.versions.node)),_.registerFlag("IS_CHROME",(()=>"undefined"!==typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor))),_.registerFlag("IS_SAFARI",(()=>"undefined"!==typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Safari/.test(navigator.userAgent)&&/Apple/.test(navigator.vendor))),_.registerFlag("PROD",(()=>!1)),_.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",(()=>_.getBool("DEBUG"))),_.registerFlag("DEPRECATION_WARNINGS_ENABLED",(()=>!0)),_.registerFlag("IS_TEST",(()=>!1)),_.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",(()=>_.getBool("DEBUG"))),_.registerFlag("WRAP_TO_IMAGEBITMAP",(()=>!1)),_.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU",(()=>!1)),_.registerFlag("USE_SETTIMEOUTCUSTOM",(()=>!1));var b=n(30693);class v{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return null==v.instance&&(v.instance=new v),v.instance}static registerSaveRouter(e){v.getInstance().saveRouters.push(e)}static registerLoadRouter(e){v.getInstance().loadRouters.push(e)}static getSaveHandlers(e){return v.getHandlers(e,"save")}static getLoadHandlers(e,t){return v.getHandlers(e,"load",t)}static getHandlers(e,t,n){const r=[];return("load"===t?v.getInstance().loadRouters:v.getInstance().saveRouters).forEach((t=>{const a=t(e,n);null!==a&&r.push(a)})),r}}const w=e=>v.registerSaveRouter(e),F=e=>v.registerLoadRouter(e),k=e=>v.getSaveHandlers(e),x=(e,t)=>v.getLoadHandlers(e,t);var A=n(88163);const S="tensorflowjs",E="models_store",C="model_info_store";function T(){if(!(0,y.env)().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");const e=window,t=e.indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB;if(null==t)throw new Error("The current browser does not appear to support IndexedDB.");return t}function D(e){const t=e.result;t.createObjectStore(E,{keyPath:"modelPath"}),t.createObjectStore(C,{keyPath:"modelPath"})}class I{constructor(e){if(this.indexedDB=T(),null==e||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,e)}async load(){return this.databaseAction(this.modelPath)}databaseAction(e,t){return new Promise(((e,n)=>{const r=this.indexedDB.open(S,1);r.onupgradeneeded=()=>D(r),r.onsuccess=()=>{const a=r.result;if(null==t){const t=a.transaction(E,"readonly"),r=t.objectStore(E).get(this.modelPath);r.onsuccess=()=>{if(null==r.result)return a.close(),n(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));e(r.result.modelArtifacts)},r.onerror=e=>(a.close(),n(r.error)),t.oncomplete=()=>a.close()}else{t.weightData=A.CompositeArrayBuffer.join(t.weightData);const r=(0,b.getModelArtifactsInfoForJSON)(t),o=a.transaction(C,"readwrite");let s,l,u=o.objectStore(C);try{s=u.put({modelPath:this.modelPath,modelArtifactsInfo:r})}catch(i){return n(i)}s.onsuccess=()=>{l=a.transaction(E,"readwrite");const s=l.objectStore(E);let c;try{c=s.put({modelPath:this.modelPath,modelArtifacts:t,modelArtifactsInfo:r})}catch(i){return n(i)}c.onsuccess=()=>e({modelArtifactsInfo:r}),c.onerror=e=>{u=o.objectStore(C);const t=u.delete(this.modelPath);t.onsuccess=()=>(a.close(),n(c.error)),t.onerror=e=>(a.close(),n(c.error))}},s.onerror=e=>(a.close(),n(s.error)),o.oncomplete=()=>{null==l?a.close():l.oncomplete=()=>a.close()}}},r.onerror=e=>n(r.error)}))}}I.URL_SCHEME="indexeddb://";const O=e=>{return(0,y.env)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(I.URL_SCHEME)?(t=e.slice(I.URL_SCHEME.length),new I(t)):null;var t};v.registerSaveRouter(O),v.registerLoadRouter(O);class P{constructor(){this.indexedDB=T()}async listModels(){return new Promise(((e,t)=>{const n=this.indexedDB.open(S,1);n.onupgradeneeded=()=>D(n),n.onsuccess=()=>{const r=n.result,a=r.transaction(C,"readonly"),i=a.objectStore(C).getAll();i.onsuccess=()=>{const t={};for(const e of i.result)t[e.modelPath]=e.modelArtifactsInfo;e(t)},i.onerror=e=>(r.close(),t(i.error)),a.oncomplete=()=>r.close()},n.onerror=e=>t(n.error)}))}async removeModel(e){var t;return e=(t=e).startsWith(I.URL_SCHEME)?t.slice(I.URL_SCHEME.length):t,new Promise(((t,n)=>{const r=this.indexedDB.open(S,1);r.onupgradeneeded=()=>D(r),r.onsuccess=()=>{const a=r.result,i=a.transaction(C,"readwrite"),o=i.objectStore(C),s=o.get(e);let l;s.onsuccess=()=>{if(null==s.result)return a.close(),n(new Error(`Cannot find model with path '${e}' in IndexedDB.`));{const r=o.delete(e),i=()=>{l=a.transaction(E,"readwrite");const r=l.objectStore(E).delete(e);r.onsuccess=()=>t(s.result.modelArtifactsInfo),r.onerror=e=>n(s.error)};r.onsuccess=i,r.onerror=e=>(i(),a.close(),n(s.error))}},s.onerror=e=>(a.close(),n(s.error)),i.oncomplete=()=>{null==l?a.close():l.oncomplete=()=>a.close()}},r.onerror=e=>n(r.error)}))}}var M=n(42890);const R="/",L="tensorflowjs_models",N="info",B="model_topology",j="weight_specs",V="weight_data",z="model_metadata";function H(e){return{info:[L,e,N].join(R),topology:[L,e,B].join(R),weightSpecs:[L,e,j].join(R),weightData:[L,e,V].join(R),modelMetadata:[L,e,z].join(R)}}function U(e){for(const t of Object.values(e))window.localStorage.removeItem(t)}function W(e){const t=e.split(R);if(t.length<3)throw new Error(`Invalid key format: ${e}`);return t.slice(1,t.length-1).join(R)}class q{constructor(e){if(!(0,y.env)().getBool("IS_BROWSER")||"undefined"===typeof window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==e||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=H(this.modelPath)}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");{const n=JSON.stringify(e.modelTopology),r=JSON.stringify(e.weightSpecs),a=(0,b.getModelArtifactsInfoForJSON)(e),i=A.CompositeArrayBuffer.join(e.weightData);try{this.LS.setItem(this.keys.info,JSON.stringify(a)),this.LS.setItem(this.keys.topology,n),this.LS.setItem(this.keys.weightSpecs,r),this.LS.setItem(this.keys.weightData,(0,b.arrayBufferToBase64String)(i));const t={format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,signature:null!=e.signature?e.signature:void 0,userDefinedMetadata:null!=e.userDefinedMetadata?e.userDefinedMetadata:void 0,modelInitializer:null!=e.modelInitializer?e.modelInitializer:void 0,initializerSignature:null!=e.initializerSignature?e.initializerSignature:void 0,trainingConfig:null!=e.trainingConfig?e.trainingConfig:void 0};return this.LS.setItem(this.keys.modelMetadata,JSON.stringify(t)),{modelArtifactsInfo:a}}catch(t){throw U(this.keys),new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${a.modelTopologyBytes}, weightSpecsBytes=${a.weightSpecsBytes}, weightDataBytes=${a.weightDataBytes}.`)}}}async load(){const e=JSON.parse(this.LS.getItem(this.keys.info));if(null==e)throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);if("JSON"!==e.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");const t={},n=JSON.parse(this.LS.getItem(this.keys.topology));if(null==n)throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);t.modelTopology=n;const r=JSON.parse(this.LS.getItem(this.keys.weightSpecs));if(null==r)throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);t.weightSpecs=r;const a=this.LS.getItem(this.keys.modelMetadata);if(null!=a){const e=JSON.parse(a);t.format=e.format,t.generatedBy=e.generatedBy,t.convertedBy=e.convertedBy,null!=e.signature&&(t.signature=e.signature),null!=e.userDefinedMetadata&&(t.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(t.modelInitializer=e.modelInitializer),null!=e.initializerSignature&&(t.initializerSignature=e.initializerSignature),null!=e.trainingConfig&&(t.trainingConfig=e.trainingConfig)}const i=this.LS.getItem(this.keys.weightData);if(null==i)throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);return t.weightData=(0,b.base64StringToArrayBuffer)(i),t}}q.URL_SCHEME="localstorage://";const $=e=>{return(0,y.env)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(q.URL_SCHEME)?(t=e.slice(q.URL_SCHEME.length),new q(t)):null;var t};v.registerSaveRouter($),v.registerLoadRouter($);class Y{constructor(){(0,M.assert)((0,y.env)().getBool("IS_BROWSER"),(()=>"Current environment is not a web browser")),(0,M.assert)("undefined"!==typeof window.localStorage,(()=>"Current browser does not appear to support localStorage")),this.LS=window.localStorage}async listModels(){const e={},t=L+R,n=R+N;for(let r=0;r"scheme must not be undefined or null.")),e.endsWith(G)&&(e=e.slice(0,e.indexOf(G))),(0,M.assert)(e.length>0,(()=>"scheme must not be an empty string."));const n=X.getInstance();(0,M.assert)(null==n.managers[e],(()=>`A model store manager is already registered for scheme '${e}'.`)),n.managers[e]=t}static getManager(e){const t=X.getInstance().managers[e];if(null==t)throw new Error(`Cannot find model manager for scheme '${e}'`);return t}static getSchemes(){return Object.keys(X.getInstance().managers)}}function K(e){if(-1===e.indexOf(G))throw new Error(`The url string provided does not contain a scheme. Supported schemes are: ${X.getSchemes().join(",")}`);return{scheme:e.split(G)[0],path:e.split(G)[1]}}async function J(e,t,n=!1){(0,M.assert)(e!==t,(()=>`Old path and new path are the same: '${e}'`));const r=v.getLoadHandlers(e);(0,M.assert)(r.length>0,(()=>`Copying failed because no load handler is found for source URL ${e}.`)),(0,M.assert)(r.length<2,(()=>`Copying failed because more than one (${r.length}) load handlers for source URL ${e}.`));const a=r[0],i=v.getSaveHandlers(t);(0,M.assert)(i.length>0,(()=>`Copying failed because no save handler is found for destination URL ${t}.`)),(0,M.assert)(i.length<2,(()=>`Copying failed because more than one (${r.length}) save handlers for destination URL ${t}.`));const o=i[0],s=K(e).scheme,l=K(e).path,u=s===K(e).scheme,c=await a.load();n&&u&&await X.getManager(s).removeModel(l);const d=await o.save(c);return n&&!u&&await X.getManager(s).removeModel(l),d.modelArtifactsInfo}async function Z(){const e=X.getSchemes(),t={};for(const n of e){const e=await X.getManager(n).listModels();for(const r in e){t[n+G+r]=e[r]}}return t}async function Q(e){const t=K(e);return X.getManager(t.scheme).removeModel(t.path)}async function ee(e,t){return J(e,t,!1)}async function te(e,t){return J(e,t,!0)}var ne=n(76815);class re{constructor(){this.messageName="setTimeoutCustom",this.functionRefs=[],this.handledMessageCount=0,this.hasEventListener=!1}fetch(e,t){return fetch(e,t)}now(){return performance.now()}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error(`Browser's encoder only supports utf-8, but got ${t}`);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)}decode(e,t){return new TextDecoder(t).decode(e)}setTimeoutCustom(e,t){(0,y.env)().getBool("USE_SETTIMEOUTCUSTOM")?(this.functionRefs.push(e),setTimeout((()=>{window.postMessage({name:this.messageName,index:this.functionRefs.length-1},"*")}),t),this.hasEventListener||(this.hasEventListener=!0,window.addEventListener("message",(e=>{if(e.source===window&&e.data.name===this.messageName){e.stopPropagation();(0,this.functionRefs[e.data.index])(),this.handledMessageCount++,this.handledMessageCount===this.functionRefs.length&&(this.functionRefs=[],this.handledMessageCount=0)}}),!0))):setTimeout(e,t)}isTypedArray(e){return(0,ne.isTypedArrayBrowser)(e)}}if((0,y.env)().get("IS_BROWSER")){(0,y.env)().setPlatform("browser",new re);try{X.registerManager(q.URL_SCHEME,new Y)}catch(er){}try{X.registerManager(I.URL_SCHEME,new P)}catch(er){}}const ae=()=>n(85817);let ie;class oe{constructor(){this.util=n(18590),this.textEncoder=new this.util.TextEncoder}fetch(e,t){return null!=(0,y.env)().global.fetch?(0,y.env)().global.fetch(e,t):(null==ie&&(ie=ae()),ie(e,t))}now(){const e=process.hrtime();return 1e3*e[0]+e[1]/1e6}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error(`Node built-in encoder only supports utf-8, but got ${t}`);return this.textEncoder.encode(e)}decode(e,t){return 0===e.length?"":new this.util.TextDecoder(t).decode(e)}isTypedArray(e){return this.util.types.isFloat32Array(e)||this.util.types.isInt32Array(e)||this.util.types.isUint8Array(e)||this.util.types.isUint8ClampedArray(e)}}(0,y.env)().get("IS_NODE")&&!(0,y.env)().get("IS_BROWSER")&&(0,y.env)().setPlatform("node",new oe);var se=n(97963),le=n(27322),ue=n(72836),ce=n(65734),de=n(9180);(0,h.getOrMakeEngine)();const he={buffer:se.buffer,cast:le.cast,clone:ue.clone,print:ce.print};(0,de.setOpHandler)(he);var fe=n(75238),pe=n(29666),me=n(24150),ge=n(46939),ye=n(96375),_e=n(58402),be=n(84130),ve=n(48775),we=n(71285);const Fe=new Map,ke=new Map;class xe{getClassName(){return this.constructor.className}static fromConfig(e,t){return new e(t)}}class Ae{constructor(){this.classNameMap={}}static getMap(){return null==Ae.instance&&(Ae.instance=new Ae),Ae.instance}static register(e){Ae.getMap().classNameMap[e.className]=[e,e.fromConfig]}}function Se(e,t,n){(0,M.assert)(null!=e.className,(()=>"Class being registered does not have the static className property defined.")),(0,M.assert)("string"===typeof e.className,(()=>"className is required to be a string, but got type "+typeof e.className)),(0,M.assert)(e.className.length>0,(()=>"Class being registered has an empty-string as its className, which is disallowed.")),"undefined"===typeof t&&(t="Custom"),"undefined"===typeof n&&(n=e.className);const r=t+">"+n;return Ae.register(e),Fe.set(r,e),ke.set(e,r),e}function Ee(e){return ke.has(e)?ke.get(e):e.className}class Ce extends xe{minimize(e,t=!1,n){const{value:r,grads:a}=this.computeGradients(e,n);if(null!=n){const e=n.map((e=>({name:e.name,tensor:a[e.name]})));this.applyGradients(e)}else this.applyGradients(a);return(0,fe.dispose)(a),t?r:(r.dispose(),null)}get iterations(){return null==this.iterations_&&(this.iterations_=0),this.iterations_}incrementIterations(){this.iterations_=this.iterations+1}computeGradients(e,t){return(0,ve.variableGrads)(e,t)}dispose(){null!=this.iterations_&&(0,fe.dispose)(this.iterations_)}async saveIterations(){return null==this.iterations_&&(this.iterations_=0),{name:"iter",tensor:(0,we.scalar)(this.iterations_,"int32")}}async getWeights(){throw new Error("getWeights() is not implemented for this optimizer yet.")}async setWeights(e){throw new Error(`setWeights() is not implemented for this optimizer class ${this.getClassName()}`)}async extractIterations(e){return this.iterations_=(await e[0].tensor.data())[0],e.slice(1)}}Object.defineProperty(Ce,Symbol.hasInstance,{value:e=>null!=e.minimize&&null!=e.computeGradients&&null!=e.applyGradients});class Te extends Ce{static get className(){return"Adadelta"}constructor(e,t,n=null){super(),this.learningRate=e,this.rho=t,this.epsilon=n,this.accumulatedGrads=[],this.accumulatedUpdates=[],null==n&&(this.epsilon=h.ENGINE.backend.epsilon())}applyGradients(e){(Array.isArray(e)?e.map((e=>e.name)):Object.keys(e)).forEach(((t,n)=>{const r=h.ENGINE.registeredVariables[t],a=!1;null==this.accumulatedGrads[n]&&(this.accumulatedGrads[n]={originalName:`${t}/accum_grad`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(a)))}),null==this.accumulatedUpdates[n]&&(this.accumulatedUpdates[n]={originalName:`${t}/accum_var`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(a)))});const i=Array.isArray(e)?e[n].tensor:e[t];if(null==i)return;const o=this.accumulatedGrads[n].variable,s=this.accumulatedUpdates[n].variable;(0,fe.tidy)((()=>{const e=(0,pe.add)((0,ge.mul)(o,this.rho),(0,ge.mul)((0,_e.square)(i),1-this.rho)),t=(0,ge.mul)((0,me.div)((0,ye.sqrt)((0,pe.add)(s,this.epsilon)),(0,ye.sqrt)((0,pe.add)(o,this.epsilon))),i),n=(0,pe.add)((0,ge.mul)(s,this.rho),(0,ge.mul)((0,_e.square)(t),1-this.rho));o.assign(e),s.assign(n);const a=(0,pe.add)((0,ge.mul)(t,-this.learningRate),r);r.assign(a)}))})),this.incrementIterations()}dispose(){null!=this.accumulatedUpdates&&((0,fe.dispose)(this.accumulatedGrads.map((e=>e.variable))),(0,fe.dispose)(this.accumulatedUpdates.map((e=>e.variable))))}async getWeights(){const e=[...this.accumulatedGrads,...this.accumulatedUpdates];return[await this.saveIterations()].concat(e.map((e=>({name:e.originalName,tensor:e.variable}))))}async setWeights(e){const t=(e=await this.extractIterations(e)).length/2,n=!1;this.accumulatedGrads=e.slice(0,t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)}))),this.accumulatedUpdates=e.slice(t,2*t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.rho,t.epsilon)}}var De=n(52812);class Ie extends Ce{static get className(){return"Adagrad"}constructor(e,t=.1){super(),this.learningRate=e,this.initialAccumulatorValue=t,this.accumulatedGrads=[]}applyGradients(e){(Array.isArray(e)?e.map((e=>e.name)):Object.keys(e)).forEach(((t,n)=>{const r=h.ENGINE.registeredVariables[t];if(null==this.accumulatedGrads[n]){const e=!1;this.accumulatedGrads[n]={originalName:`${t}/accumulator`,variable:(0,fe.tidy)((()=>(0,De.fill)(r.shape,this.initialAccumulatorValue).variable(e)))}}const a=Array.isArray(e)?e[n].tensor:e[t];if(null==a)return;const i=this.accumulatedGrads[n].variable;(0,fe.tidy)((()=>{const e=(0,pe.add)(i,(0,_e.square)(a));i.assign(e);const t=(0,pe.add)((0,ge.mul)((0,me.div)(a,(0,ye.sqrt)((0,pe.add)(e,h.ENGINE.backend.epsilon()))),-this.learningRate),r);r.assign(t)}))})),this.incrementIterations()}dispose(){null!=this.accumulatedGrads&&(0,fe.dispose)(this.accumulatedGrads.map((e=>e.variable)))}async getWeights(){return[await this.saveIterations()].concat(this.accumulatedGrads.map((e=>({name:e.originalName,tensor:e.variable}))))}async setWeights(e){e=await this.extractIterations(e);this.accumulatedGrads=e.map((e=>({originalName:e.name,variable:e.tensor.variable(false)})))}getConfig(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}}static fromConfig(e,t){return new e(t.learningRate,t.initialAccumulatorValue)}}var Oe=n(54619),Pe=n(70839);class Me extends Ce{static get className(){return"Adam"}constructor(e,t,n,r=null){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=r,this.accumulatedFirstMoment=[],this.accumulatedSecondMoment=[],(0,fe.tidy)((()=>{this.accBeta1=(0,we.scalar)(t).variable(),this.accBeta2=(0,we.scalar)(n).variable()})),null==r&&(this.epsilon=h.ENGINE.backend.epsilon())}applyGradients(e){const t=Array.isArray(e)?e.map((e=>e.name)):Object.keys(e);(0,fe.tidy)((()=>{const n=(0,Pe.sub)(1,this.accBeta1),r=(0,Pe.sub)(1,this.accBeta2);t.forEach(((t,a)=>{const i=h.ENGINE.registeredVariables[t],o=!1;null==this.accumulatedFirstMoment[a]&&(this.accumulatedFirstMoment[a]={originalName:`${t}/m`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(i).variable(o)))}),null==this.accumulatedSecondMoment[a]&&(this.accumulatedSecondMoment[a]={originalName:`${t}/v`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(i).variable(o)))});const s=Array.isArray(e)?e[a].tensor:e[t];if(null==s)return;const l=this.accumulatedFirstMoment[a].variable,u=this.accumulatedSecondMoment[a].variable,c=(0,pe.add)((0,ge.mul)(l,this.beta1),(0,ge.mul)(s,1-this.beta1)),d=(0,pe.add)((0,ge.mul)(u,this.beta2),(0,ge.mul)((0,_e.square)(s),1-this.beta2)),f=(0,me.div)(c,n),p=(0,me.div)(d,r);l.assign(c),u.assign(d);const m=(0,pe.add)((0,ge.mul)((0,me.div)(f,(0,pe.add)((0,ye.sqrt)(p),this.epsilon)),-this.learningRate),i);i.assign(m)})),this.accBeta1.assign((0,ge.mul)(this.accBeta1,this.beta1)),this.accBeta2.assign((0,ge.mul)(this.accBeta2,this.beta2))})),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.accBeta2.dispose(),null!=this.accumulatedFirstMoment&&(0,fe.dispose)(this.accumulatedFirstMoment.map((e=>e.variable))),null!=this.accumulatedSecondMoment&&(0,fe.dispose)(this.accumulatedSecondMoment.map((e=>e.variable)))}async getWeights(){const e=[...this.accumulatedFirstMoment,...this.accumulatedSecondMoment];return[await this.saveIterations()].concat(e.map((e=>({name:e.originalName,tensor:e.variable}))))}async setWeights(e){e=await this.extractIterations(e),(0,fe.tidy)((()=>{this.accBeta1.assign((0,Oe.pow)(this.beta1,this.iterations_+1)),this.accBeta2.assign((0,Oe.pow)(this.beta2,this.iterations_+1))}));const t=e.length/2,n=!1;this.accumulatedFirstMoment=e.slice(0,t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)}))),this.accumulatedSecondMoment=e.slice(t,2*t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)})))}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)}}var Re=n(31473),Le=n(83227);class Ne extends Ce{static get className(){return"Adamax"}constructor(e,t,n,r=null,a=0){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=r,this.decay=a,this.accumulatedFirstMoment=[],this.accumulatedWeightedInfNorm=[],(0,fe.tidy)((()=>{this.iteration=(0,we.scalar)(0).variable(),this.accBeta1=(0,we.scalar)(t).variable()})),null==r&&(this.epsilon=h.ENGINE.backend.epsilon())}applyGradients(e){const t=Array.isArray(e)?e.map((e=>e.name)):Object.keys(e);(0,fe.tidy)((()=>{const n=(0,Pe.sub)(1,this.accBeta1),r=(0,me.div)(-this.learningRate,(0,pe.add)((0,ge.mul)(this.iteration,this.decay),1));t.forEach(((t,a)=>{const i=h.ENGINE.registeredVariables[t],o=!1;null==this.accumulatedFirstMoment[a]&&(this.accumulatedFirstMoment[a]={originalName:`${t}/m`,variable:(0,be.zerosLike)(i).variable(o)}),null==this.accumulatedWeightedInfNorm[a]&&(this.accumulatedWeightedInfNorm[a]={originalName:`${t}/v`,variable:(0,be.zerosLike)(i).variable(o)});const s=Array.isArray(e)?e[a].tensor:e[t];if(null==s)return;const l=this.accumulatedFirstMoment[a].variable,u=this.accumulatedWeightedInfNorm[a].variable,c=(0,pe.add)((0,ge.mul)(l,this.beta1),(0,ge.mul)(s,1-this.beta1)),d=(0,ge.mul)(u,this.beta2),f=(0,Re.abs)(s),p=(0,Le.maximum)(d,f);l.assign(c),u.assign(p);const m=(0,pe.add)((0,ge.mul)((0,me.div)(r,n),(0,me.div)(c,(0,pe.add)(p,this.epsilon))),i);i.assign(m)})),this.iteration.assign((0,pe.add)(this.iteration,1)),this.accBeta1.assign((0,ge.mul)(this.accBeta1,this.beta1))})),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.iteration.dispose(),null!=this.accumulatedFirstMoment&&(0,fe.dispose)(this.accumulatedFirstMoment.map((e=>e.variable))),null!=this.accumulatedWeightedInfNorm&&(0,fe.dispose)(this.accumulatedWeightedInfNorm.map((e=>e.variable)))}async getWeights(){throw new Error("getWeights() is not implemented for Adamax yet.")}async setWeights(e){throw new Error("setWeights() is not implemented for Adamax yet.")}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)}}class Be extends Ce{static get className(){return"SGD"}constructor(e){super(),this.learningRate=e,this.setLearningRate(e)}applyGradients(e){(Array.isArray(e)?e.map((e=>e.name)):Object.keys(e)).forEach(((t,n)=>{const r=Array.isArray(e)?e[n].tensor:e[t];if(null==r)return;const a=h.ENGINE.registeredVariables[t];(0,fe.tidy)((()=>{const e=(0,pe.add)((0,ge.mul)(this.c,r),a);a.assign(e)}))})),this.incrementIterations()}setLearningRate(e){this.learningRate=e,null!=this.c&&this.c.dispose(),this.c=(0,fe.keep)((0,we.scalar)(-e))}dispose(){this.c.dispose()}async getWeights(){return[await this.saveIterations()]}async setWeights(e){if(0!==(e=await this.extractIterations(e)).length)throw new Error("SGD optimizer does not have settable weights.")}getConfig(){return{learningRate:this.learningRate}}static fromConfig(e,t){return new e(t.learningRate)}}class je extends Be{static get className(){return"Momentum"}constructor(e,t,n=!1){super(e),this.learningRate=e,this.momentum=t,this.useNesterov=n,this.accumulations=[],this.m=(0,we.scalar)(this.momentum)}applyGradients(e){(Array.isArray(e)?e.map((e=>e.name)):Object.keys(e)).forEach(((t,n)=>{const r=h.ENGINE.registeredVariables[t];if(null==this.accumulations[n]){const e=!1;this.accumulations[n]={originalName:`${t}/momentum`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(e)))}}const a=this.accumulations[n].variable,i=Array.isArray(e)?e[n].tensor:e[t];null!=i&&(0,fe.tidy)((()=>{let e;const t=(0,pe.add)((0,ge.mul)(this.m,a),i);e=this.useNesterov?(0,pe.add)((0,ge.mul)(this.c,(0,pe.add)(i,(0,ge.mul)(t,this.m))),r):(0,pe.add)((0,ge.mul)(this.c,t),r),a.assign(t),r.assign(e)}))})),this.incrementIterations()}dispose(){this.m.dispose(),null!=this.accumulations&&(0,fe.dispose)(this.accumulations.map((e=>e.variable)))}setMomentum(e){this.momentum=e}async getWeights(){return[await this.saveIterations()].concat(this.accumulations.map((e=>({name:e.originalName,tensor:e.variable}))))}async setWeights(e){e=await this.extractIterations(e);this.accumulations=e.map((e=>({originalName:e.name,variable:e.tensor.variable(false)})))}getConfig(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}}static fromConfig(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)}}class Ve extends Ce{static get className(){return"RMSProp"}constructor(e,t=.9,n=0,r=null,a=!1){if(super(),this.learningRate=e,this.decay=t,this.momentum=n,this.epsilon=r,this.accumulatedMeanSquares=[],this.accumulatedMoments=[],this.accumulatedMeanGrads=[],this.centered=a,null==r&&(this.epsilon=h.ENGINE.backend.epsilon()),null==e)throw new Error("learningRate for RMSPropOptimizer must be defined.")}applyGradients(e){(Array.isArray(e)?e.map((e=>e.name)):Object.keys(e)).forEach(((t,n)=>{const r=h.ENGINE.registeredVariables[t],a=!1;null==this.accumulatedMeanSquares[n]&&(this.accumulatedMeanSquares[n]={originalName:`${t}/rms`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(a)))}),null==this.accumulatedMoments[n]&&(this.accumulatedMoments[n]={originalName:`${t}/momentum`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(a)))}),null==this.accumulatedMeanGrads[n]&&this.centered&&(this.accumulatedMeanGrads[n]={originalName:`${t}/mg`,variable:(0,fe.tidy)((()=>(0,be.zerosLike)(r).variable(a)))});const i=Array.isArray(e)?e[n].tensor:e[t];if(null==i)return;const o=this.accumulatedMeanSquares[n].variable,s=this.accumulatedMoments[n].variable;(0,fe.tidy)((()=>{const e=(0,pe.add)((0,ge.mul)(o,this.decay),(0,ge.mul)((0,_e.square)(i),1-this.decay));if(this.centered){const t=this.accumulatedMeanGrads[n].variable,a=(0,pe.add)((0,ge.mul)(t,this.decay),(0,ge.mul)(i,1-this.decay)),l=(0,me.div)((0,ge.mul)(i,this.learningRate),(0,ye.sqrt)((0,Pe.sub)(e,(0,pe.add)((0,_e.square)(a),this.epsilon)))),u=(0,pe.add)((0,ge.mul)(s,this.momentum),l);o.assign(e),t.assign(a),s.assign(u);const c=(0,Pe.sub)(r,u);r.assign(c)}else{const e=(0,pe.add)((0,ge.mul)(o,this.decay),(0,ge.mul)((0,_e.square)(i),1-this.decay)),t=(0,pe.add)((0,ge.mul)(s,this.momentum),(0,me.div)((0,ge.mul)(i,this.learningRate),(0,ye.sqrt)((0,pe.add)(e,this.epsilon))));o.assign(e),s.assign(t);const n=(0,Pe.sub)(r,t);r.assign(n)}}))})),this.incrementIterations()}dispose(){null!=this.accumulatedMeanSquares&&(0,fe.dispose)(this.accumulatedMeanSquares.map((e=>e.variable))),null!=this.accumulatedMeanGrads&&this.centered&&(0,fe.dispose)(this.accumulatedMeanGrads.map((e=>e.variable))),null!=this.accumulatedMoments&&(0,fe.dispose)(this.accumulatedMoments.map((e=>e.variable)))}async getWeights(){const e=[...this.accumulatedMeanSquares,...this.accumulatedMoments];return this.centered&&e.push(...this.accumulatedMeanGrads),[await this.saveIterations()].concat(e.map((e=>({name:e.originalName,tensor:e.variable}))))}async setWeights(e){e=await this.extractIterations(e);const t=this.centered?e.length/3:e.length/2,n=!1;this.accumulatedMeanSquares=e.slice(0,t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)}))),this.accumulatedMoments=e.slice(t,2*t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)}))),this.centered&&(this.accumulatedMeanGrads=e.slice(2*t,3*t).map((e=>({originalName:e.name,variable:e.tensor.variable(n)}))))}getConfig(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}}static fromConfig(e,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)}}const ze=[Te,Ie,Me,Ne,je,Ve,Be];function He(e){return new Promise((e=>setTimeout(e))).then(e)}class Ue{constructor(e){if(!(0,y.env)().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");e.startsWith(Ue.URL_SCHEME)&&(e=e.slice(Ue.URL_SCHEME.length)),null!=e&&0!==e.length||(e="model"),this.modelJsonFileName=e+".json",this.weightDataFileName=e+".weights.bin"}async save(e){if("undefined"===typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");const t=A.CompositeArrayBuffer.join(e.weightData),n=window.URL.createObjectURL(new Blob([t],{type:"application/octet-stream"}));if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{const t=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}],r=(0,b.getModelJSONForModelArtifacts)(e,t),a=window.URL.createObjectURL(new Blob([JSON.stringify(r)],{type:"application/json"})),i=null==this.modelJsonAnchor?document.createElement("a"):this.modelJsonAnchor;if(i.download=this.modelJsonFileName,i.href=a,await He((()=>i.dispatchEvent(new MouseEvent("click")))),null!=e.weightData){const e=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor;e.download=this.weightDataFileName,e.href=n,await He((()=>e.dispatchEvent(new MouseEvent("click"))))}return{modelArtifactsInfo:(0,b.getModelArtifactsInfoForJSON)(e)}}}}Ue.URL_SCHEME="downloads://";class We{constructor(e){if(null==e||e.length<1)throw new Error(`When calling browserFiles, at least 1 file is required, but received ${e}`);this.jsonFile=e[0],this.weightsFiles=e.slice(1)}async load(){return new Promise(((e,t)=>{const n=new FileReader;n.onload=n=>{const r=JSON.parse(n.target.result),a=r.modelTopology;if(null==a)return void t(new Error(`modelTopology field is missing from file ${this.jsonFile.name}`));if(null==r.weightsManifest)return void t(new Error(`weightManifest field is missing from file ${this.jsonFile.name}`));if(0===this.weightsFiles.length)return void e({modelTopology:a});const i=(0,b.getModelArtifactsForJSON)(r,(e=>this.loadWeights(e)));e(i)},n.onerror=e=>t(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)}))}loadWeights(e){const t=[],n=[];for(const i of e)t.push(...i.weights),n.push(...i.paths);const r=this.checkManifestAndWeightFiles(e),a=n.map((e=>this.loadWeightsFile(e,r[e])));return Promise.all(a).then((e=>[t,e]))}loadWeightsFile(e,t){return new Promise(((n,r)=>{const a=new FileReader;a.onload=e=>{const t=e.target.result;n(t)},a.onerror=t=>r(`Failed to weights data from file of path '${e}'.`),a.readAsArrayBuffer(t)}))}checkManifestAndWeightFiles(e){const t=[],n=this.weightsFiles.map((e=>(0,b.basename)(e.name))),r={};for(const a of e)a.paths.forEach((e=>{const a=(0,b.basename)(e);if(-1!==t.indexOf(a))throw new Error(`Duplicate file basename found in weights manifest: '${a}'`);if(t.push(a),-1===n.indexOf(a))throw new Error(`Weight file with basename '${a}' is not provided.`);r[e]=this.weightsFiles[n.indexOf(a)]}));if(t.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${t.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return r}}function qe(e){return new We(e)}function $e(e,t,n,r){!function(e){(0,M.assert)(null!=e&&Array.isArray(e)&&e.length>0,(()=>"promises must be a none empty array"))}(e),function(e,t){(0,M.assert)(e>=0&&e<=1,(()=>`Progress fraction must be in range [0, 1], but got startFraction ${e}`)),(0,M.assert)(t>=0&&t<=1,(()=>`Progress fraction must be in range [0, 1], but got endFraction ${t}`)),(0,M.assert)(t>=e,(()=>`startFraction must be no more than endFraction, but got startFraction ${e} and endFraction ${t}`))}(n=null==n?0:n,r=null==r?1:r);let a=0;return Promise.all(e.map((i=>(i.then((i=>{const o=n+ ++a/e.length*(r-n);return t(o),i})),i))))}v.registerSaveRouter((e=>(0,y.env)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(Ue.URL_SCHEME)?function(e="model"){return new Ue(e)}(e.slice(Ue.URL_SCHEME.length)):null));var Ye=n(60010);async function Ge(e,t){null==t&&(t={});const n=null==t.fetchFunc?(0,y.env)().platform.fetch:t.fetchFunc,r=e.map((e=>n(e,t.requestInit,{isBinary:!0}))),a=(null==t.onProgress?await Promise.all(r):await $e(r,t.onProgress,0,.5)).map((e=>e.arrayBuffer()));return null==t.onProgress?await Promise.all(a):await $e(a,t.onProgress,.5,1)}async function Xe(e,t="",n,r){return Ke((e=>Ge(e,{requestInit:r})))(e,t,n)}function Ke(e){return async(t,n="",r)=>{const a=t.map((()=>!1)),i={},o=null!=r?r.map((()=>!1)):[],s=[];if(t.forEach(((e,t)=>{let n=0;e.weights.forEach((e=>{const l="quantization"in e?e.quantization.dtype:e.dtype,u=Ye.DTYPE_VALUE_SIZE_MAP[l]*M.sizeFromShape(e.shape),c=()=>{a[t]=!0,null==i[t]&&(i[t]=[]),i[t].push({manifestEntry:e,groupOffset:n,sizeBytes:u})};null!=r?r.forEach(((t,n)=>{t===e.name&&(c(),o[n]=!0)})):c(),s.push(e.name),n+=u}))})),!o.every((e=>e))){const e=r.filter(((e,t)=>!o[t]));throw new Error(`Could not find weights in manifest with names: ${e.join(", ")}. \nManifest JSON has weights with names: ${s.join(", ")}.`)}const l=a.reduce(((e,t,n)=>(t&&e.push(n),e)),[]),u=[];l.forEach((e=>{t[e].paths.forEach((e=>{const t=n+(n.endsWith("/")?"":"/")+e;u.push(t)}))}));const c=await e(u),d={};let h=0;return l.forEach((e=>{const n=t[e].paths.length,r=new A.CompositeArrayBuffer(c.slice(h,h+n));i[e].forEach((e=>{const t=r.slice(e.groupOffset,e.groupOffset+e.sizeBytes),n=(0,b.decodeWeights)(t,[e.manifestEntry]);for(const r in n)d[r]=n[r]})),h+=n})),d}}class Je{constructor(e,t){if(this.DEFAULT_METHOD="POST",null==t&&(t={}),this.weightPathPrefix=t.weightPathPrefix,this.weightUrlConverter=t.weightUrlConverter,null!=t.fetchFunc?((0,M.assert)("function"===typeof t.fetchFunc,(()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)")),this.fetch=t.fetchFunc):this.fetch=(0,y.env)().platform.fetch,(0,M.assert)(null!=e&&e.length>0,(()=>"URL path for http must not be null, undefined or empty.")),Array.isArray(e)&&(0,M.assert)(2===e.length,(()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`)),this.path=e,null!=t.requestInit&&null!=t.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{},this.loadOptions=t}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");const t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData;const n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}],r=(0,b.getModelJSONForModelArtifacts)(e,n);if(t.body.append("model.json",new Blob([JSON.stringify(r)],{type:"application/json"}),"model.json"),null!=e.weightData){const n=A.CompositeArrayBuffer.join(e.weightData);t.body.append("model.weights.bin",new Blob([n],{type:"application/octet-stream"}),"model.weights.bin")}const a=await this.fetch(this.path,t);if(a.ok)return{modelArtifactsInfo:(0,b.getModelArtifactsInfoForJSON)(e),responses:[a]};throw new Error(`BrowserHTTPRequest.save() failed due to HTTP response status ${a.status}.`)}async loadModelJSON(){const e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code ${e.status}. Please verify this URL points to the model JSON of the model to load.`);let t;try{t=await e.json()}catch(a){let e=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?e+=" Your path contains a .pb file extension. Support for .pb models have been removed in TensorFlow.js 1.0 in favor of .json models. You can re-convert your Python TensorFlow model using the TensorFlow.js 1.0 conversion scripts or you can convert your.pb models with the 'pb2json'NPM script in the tensorflow/tfjs-converter repository.":e+=" Please make sure the server is serving valid JSON for this request.",new Error(e)}const n=t.modelTopology,r=t.weightsManifest;if(null==n&&null==r)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return t}async load(){if(this.loadOptions.streamWeights)return this.loadStream();const e=await this.loadModelJSON();return(0,b.getModelArtifactsForJSON)(e,(e=>this.loadWeights(e)))}async loadStream(){const e=await this.loadModelJSON(),t=await this.getWeightUrls(e.weightsManifest),n=(0,b.getWeightSpecs)(e.weightsManifest);return Object.assign(Object.assign({},e),{weightSpecs:n,getWeightStream:()=>function(e,t){var n;const r=null==t.fetchFunc?(0,y.env)().platform.fetch:t.fetchFunc;let a,i=0;return null===(n=t.onProgress)||void 0===n||n.call(t,0),new ReadableStream({pull:async n=>{for(var o;it?e.substring(n):"";return[r+"/",a]}(t),a=this.weightPathPrefix||n,i=[],o=[];for(const s of e)for(const e of s.paths)null!=this.weightUrlConverter?o.push(this.weightUrlConverter(e)):i.push(a+e+r);return this.weightUrlConverter&&i.push(...await Promise.all(o)),i}async loadWeights(e){const t=await this.getWeightUrls(e);return[(0,b.getWeightSpecs)(e),await Ge(t,this.loadOptions)]}}function Ze(e){return null!=e.match(Je.URL_SCHEME_REGEX)}Je.URL_SCHEME_REGEX=/^https?:\/\//;const Qe=(e,t)=>{if("undefined"===typeof fetch&&(null==t||null==t.fetchFunc))return null;{let n=!0;if(n=Array.isArray(e)?e.every((e=>Ze(e))):Ze(e),n)return et(e,t)}return null};function et(e,t){return new Je(e,t)}function tt(e,t){return et(e,t)}v.registerSaveRouter(Qe),v.registerLoadRouter(Qe);class nt{constructor(e){this.modelArtifacts=e}load(){return this.modelArtifacts}}class rt{constructor(e){this.saveHandler=e}save(e){return this.saveHandler(e)}}class at{constructor(e){e.load&&(this.load=()=>Promise.resolve(e.load())),e.save&&(this.save=t=>Promise.resolve(e.save(t)))}}function it(e,t,n,r){return new at(ot(...arguments))}function ot(e,t,n,r){if(1===arguments.length){return null!=e.modelTopology||null!=e.weightSpecs?new nt(e):(console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new nt({modelTopology:e}))}return console.warn("Please call tf.io.fromMemory() with only one argument. The argument should be of type ModelArtifacts. The multi-argument signature of tf.io.fromMemory() has been deprecated and will be removed in a future release."),new nt({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:r})}function st(e){return new rt(e)}function lt(e){return new rt(e)}var ut=n(41564),ct=n(1666),dt=n(24985),ht=n(8844),ft=n(53058);const pt=(0,ht.op)({confusionMatrix_:function(e,t,n){const r=(0,ut.convertToTensor)(e,"labels","confusionMatrix"),a=(0,ut.convertToTensor)(t,"predictions","confusionMatrix");M.assert(null==n||n>0&&Number.isInteger(n),(()=>`If provided, numClasses must be a positive integer, but got ${n}`)),M.assert(1===r.rank,(()=>`Expected the rank of labels to be 1, but got ${r.rank}`)),M.assert(1===a.rank,(()=>`Expected the rank of predictions to be 1, but got ${a.rank}`)),M.assert(r.shape[0]===a.shape[0],(()=>`Mismatch in the number of examples: ${r.shape[0]} vs. ${a.shape[0]}. Labels and predictions should have the same number of elements.`)),M.assert(n>0&&Number.isInteger(n),(()=>`numClasses is required to be a positive integer, but got ${n}`));const i=(0,dt.oneHot)((0,le.cast)(r,"int32"),n),o=(0,dt.oneHot)((0,le.cast)(a,"int32"),n),s=(0,ft.transpose)(i),l=(0,ct.matMul)(s,o);return(0,le.cast)(l,"int32")}});var mt=n(57229),gt=n(55626),yt=n(73331),_t=n(20763);let bt,vt=!1;function wt(e,t=3){if(t>4)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==e)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,r=!1,a=!1,i=!1,o=!1,s=!1;if(e.data instanceof Uint8Array)n=!0;else if("undefined"!==typeof ImageData&&e instanceof ImageData)r=!0;else if("undefined"!==typeof HTMLVideoElement&&e instanceof HTMLVideoElement)a=!0;else if("undefined"!==typeof HTMLImageElement&&e instanceof HTMLImageElement)i=!0;else if(null!=e.getContext)o=!0;else{if(!("undefined"!==typeof ImageBitmap&&e instanceof ImageBitmap))throw new Error(`pixels passed to tf.browser.fromPixels() must be either an HTMLVideoElement, HTMLImageElement, HTMLCanvasElement, ImageData in browser, or OffscreenCanvas, ImageData in webworker or {data: Uint32Array, width: number, height: number}, but was ${e.constructor.name}`);s=!0}if(null!=(0,yt.getKernel)(gt.FromPixels,h.ENGINE.backendName)){const n={pixels:e},r={numChannels:t};return h.ENGINE.runKernel(gt.FromPixels,n,r)}const[l,u]=a?[e.videoWidth,e.videoHeight]:[e.width,e.height];let c,d;if(o)c=e.getContext("2d").getImageData(0,0,l,u).data;else if(r||n)c=e.data;else if(i||a||s){if(null==bt)if("undefined"===typeof document){if("undefined"===typeof OffscreenCanvas||"undefined"===typeof OffscreenCanvasRenderingContext2D)throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");bt=new OffscreenCanvas(1,1).getContext("2d")}else bt=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});bt.canvas.width=l,bt.canvas.height=u,bt.drawImage(e,0,0,l,u),c=bt.getImageData(0,0,l,u).data}if(4===t)d=new Int32Array(c);else{const e=l*u;d=new Int32Array(e*t);for(let n=0;n4||2===t)throw new Error(`toPixels only supports depth of size 1, 3 or 4 but got ${t}`);if("float32"!==e.dtype&&"int32"!==e.dtype)throw new Error(`Unsupported type for toPixels: ${e.dtype}. Please use float32 or int32 tensors.`)}async function At(e,t){let n=(0,ut.convertToTensor)(e,"img","toPixels");if(!(e instanceof de.Tensor)){const e=n;n=(0,le.cast)(e,"int32"),e.dispose()}xt(n);const[r,a]=n.shape.slice(0,2),i=2===n.rank?1:n.shape[2],o=await n.data(),s="float32"===n.dtype?255:1,l=new Uint8ClampedArray(a*r*4);for(let u=0;u1)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${t}.`)}else if("int32"===n.dtype&&(t<0||t>255))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${t}.`);1===i?(e[0]=t*s,e[1]=t*s,e[2]=t*s):e[r]=t*s}const t=4*u;l[t+0]=Math.round(e[0]),l[t+1]=Math.round(e[1]),l[t+2]=Math.round(e[2]),l[t+3]=Math.round(e[3])}if(null!=t){if(!vt){null!=(0,yt.getKernel)(gt.Draw,h.ENGINE.backendName)&&(console.warn("tf.browser.toPixels is not efficient to draw tensor on canvas. Please try tf.browser.draw instead."),vt=!0)}t.width=a,t.height=r;const e=t.getContext("2d"),n=new ImageData(l,a,r);e.putImageData(n,0,0)}return n!==e&&n.dispose(),l}function St(e,t,n){let r=(0,ut.convertToTensor)(e,"img","draw");if(!(e instanceof de.Tensor)){const e=r;r=(0,le.cast)(e,"int32"),e.dispose()}xt(r),function(e){const t=(null===e||void 0===e?void 0:e.alpha)||1;if(t>1||t<0)throw new Error(`Alpha value ${t} is suppoed to be in range [0 - 1].`)}(null===n||void 0===n?void 0:n.imageOptions);const a={image:r},i={canvas:t,options:n};h.ENGINE.runKernel(gt.Draw,a,i)}const Et=(0,ht.op)({fromPixels_:wt});function Ct(e,t){const n=e.shape.length,r=t.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(r<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${r}.`);if("int32"!==t.dtype)throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.shape[r-1]>n)throw new Error(`index innermost dimension length must be <= tensor rank; saw: ${t.shape[r-1]} vs. ${n}`);if(0===(0,M.sizeFromShape)(e.shape))throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${e.shape}.`);const a=t.shape,i=a[a.length-1];let o=1;for(let d=0;de/u)),1].slice(0,i);return[l,o,u,c]}var Tt=n(35048),Dt=n(69130),It=n(81324),Ot=n(2839),Pt=n(4152);const Mt="4.22.0";class Rt{static sgd(e){return new Be(e)}static momentum(e,t,n=!1){return new je(e,t,n)}static rmsprop(e,t=.9,n=0,r=null,a=!1){return new Ve(e,t,n,r,a)}static adam(e=.001,t=.9,n=.999,r=null){return new Me(e,t,n,r)}static adadelta(e=.001,t=.95,n=null){return new Te(e,t,n)}static adamax(e=.002,t=.9,n=.999,r=null,a=0){return new Ne(e,t,n,r,a)}static adagrad(e,t=.1){return new Ie(e,t)}}var Lt=n(93027),Nt=n(30731),Bt=n(59227);const jt=Rt,Vt="undefined"!==typeof requestAnimationFrame?requestAnimationFrame:"undefined"!==typeof setImmediate?setImmediate:e=>e();function zt(){return new Promise((e=>Vt((()=>e()))))}var Ht=n(24651);function Ut(e,t){const n=e[0].length;e.forEach(((e,t)=>{M.assert(e.length===n,(()=>`Error in concat${n}D: rank of tensors[${t}] must be the same as the rank of the rest (${n})`))})),M.assert(t>=0&&t`Error in concat${n}D: axis must be between 0 and ${n-1}.`));const r=e[0];e.forEach(((e,a)=>{for(let i=0;i`Error in concat${n}D: Shape of tensors[${a}] (${e}) does not match the shape of the rest (${r}) along the non-concatenated axis ${a}.`))}))}function Wt(e,t){const n=e[0].slice();for(let r=1;r=0)if(s>=0){if(s!==i)throw new Error(`rt input.shape and shape=${t} are incompatible: rt input.shape[${a+e}] = ${i} but shape[${a+e}] = ${s}`)}else r[o]=i}return r}function Xt(e){const t={FIRST_DIM_SIZE:qt.FIRST_DIM_SIZE,VALUE_ROWIDS:qt.VALUE_ROWIDS,ROW_LENGTHS:qt.ROW_LENGTHS,ROW_SPLITS:qt.ROW_SPLITS,ROW_LIMITS:qt.ROW_LIMITS,ROW_STARTS:qt.ROW_STARTS},n=[];for(const r of e){if(!(r in t))break;n.push(t[r])}return n}function Kt(e){return 0===e.length?0:e[0]===qt.FIRST_DIM_SIZE?e.length-1:e.length}function Jt(e,t){if(null==e||null==t)return;const n=e.length,r=t.length;if(n>=r)throw new Error(`defaultValue.shape=${e} and ragged tensor flatValues.shape=${t}, are incompatible: defaultValue.rank = ${n} must be less than ragged tensor input flatValues.rank = ${r})`);for(let a=0;a=0&&r>=0&&1!==n&&n!==r)throw new Error(`defaultValue.shape=${e}, and ragged tensor input flatValues.shape=${t} are incompatible: defaultValue.shape[${a-e.length}] = ${n} but ragged tensor input.flatValues.shape[${a-e.length}] = ${r}`)}}!function(e){e[e.FIRST_DIM_SIZE=0]="FIRST_DIM_SIZE",e[e.VALUE_ROWIDS=1]="VALUE_ROWIDS",e[e.ROW_LENGTHS=2]="ROW_LENGTHS",e[e.ROW_SPLITS=3]="ROW_SPLITS",e[e.ROW_LIMITS=4]="ROW_LIMITS",e[e.ROW_STARTS=5]="ROW_STARTS"}(qt||(qt={}));const Zt=30;function Qt(e){return e<=Zt?e:(0,M.nearestDivisor)(e,Math.floor(Math.sqrt(e)))}function en(e,t,n){return[n*("number"===typeof e?e:e[0]),t*("number"===typeof e?e:e[1])]}function tn(e,t,n,r=!0){let a=[];if(r)a=a.concat(t.slice(0)),a.push(e[0]/n),a=a.concat(e.slice(1));else{a=a.concat(e[0]);const n=t.length;for(let r=0;r=2*t+1||r%2===1?a.push(r):n.push(r);r.push(...n),r.push(0),r.push(...a)}return r}function rn(e,t,n,r=!0){const a=[];r?a.push(e[0]/n):a.push(e[0]*n);for(let i=1;i/g,An=",",Sn="...";function En(e,t){const n=((e=e.replace(/\s/g,"")).length-e.replace(xn,"").length)/kn.length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(n>1)throw new Error(`Equation must contain exactly one arrow ("${kn}").`);const[r,a]=e.split(kn);(0,M.assert)(-1===r.indexOf(Sn),(()=>`The ellipsis notation ("${Sn}") is not supported yet.`));const i=r.split(An),o=i.length;if(t!==o)throw new Error(`Expected ${o} input tensors, received ${t}`);if(o>2)throw new Error("Support for more than 2 input tensors is not implemented yet.");const s=[];for(let d=0;d-1!==t.indexOf(e))))throw new Error(`Output subscripts contain the label ${e} not present in the input subscripts.`);-1===s.indexOf(e)&&s.push(e)}for(let d=0;d-1!==e)),{permutationIndices:n,expandDims:r}}function Tn(e,t,n){const r=new Array(e);for(let a=0;a`Expected dimension ${r[t[a][n]]} at axis ${n} of input shaped ${JSON.stringify(e)}, but got dimension ${e[n]}`))}}function Dn(e,t){const n=e,r=[];let a=0;0===e.length&&n.push(-1),a=e.length+1;for(let o=0;oe===t))}function On(e,t){const n=[];for(let r=0;r"Number of splits must evenly divide the axis.")),r=new Array(t).fill(e.shape[n]/t);else{const a=t.reduce(((e,t)=>(-1===t&&(e+=1),e)),0);(0,M.assert)(a<=1,(()=>"There should be only one negative value in split array."));const i=t.indexOf(-1);if(-1!==i){const r=t.reduce(((e,t)=>t>0?e+t:e));t[i]=e.shape[n]-r}(0,M.assert)(e.shape[n]===t.reduce(((e,t)=>e+t)),(()=>"The sum of sizes must match the size of the axis dimension.")),r=t}return r}function Mn(e){return`Received SparseTensor with denseShape[0] = 0 but\n indices.shape[0] = ${e}`}function Rn(e,t){return`indices(${e}, 0) is invalid: ${t} < 0`}function Ln(e,t,n){return`indices(${e}, 0) is invalid: ${t} >= ${n}`}function Nn(e,t){return`only one output dimension may be -1, not both ${e} and ${t}`}function Bn(e,t){return`size ${e} must be non-negative, not ${t}`}function jn(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function Vn(e,t){return`Input to reshape is a SparseTensor with ${(0,M.sizeFromShape)(e)}\n dense values, but the requested shape requires a multiple of ${(0,M.sizeFromShape)(t)}. inputShape=${e} outputShape= ${t}`}function zn(e,t){return`Input to reshape is a tensor with ${(0,M.sizeFromShape)(e)} dense values, but the requested shape has ${(0,M.sizeFromShape)(t)}. inputShape=${e} outputShape=${t}`}function Hn(){return"segment ids must be >= 0"}function Un(){return"segment ids are not increasing"}function Wn(e,t){return`Segment id ${e} out of range [0, ${t}), possibly because segmentIds input is not sorted.`}function qn(e,t,n){return`Bad: indices[${e}] == ${t} out of range [0, ${n})`}function $n(e,t){let n,r=!1;for(e<=Zt?(n=e,r=!0):n=(0,M.nearestDivisor)(e,Math.floor(Math.sqrt(e)));!r;)n>t||n===e?r=!0:n=(0,M.nearestDivisor)(e,n+1);return n}function Yn(e,t,n){const r=[],a=e.length;for(let i=0;ia))throw new Error(`Expect batchDims in the range of [-${a}, ${a}], but got ${r}`);if(r<0&&(r+=a),r>i)throw new Error(`batchDims (${r}) must be less than rank(x) (\n ${i}).`);if(n(0,Pt.decodeString)(e)))}catch(er){throw new Error(`Failed to decode encoded string bytes into utf-8, error: ${er}`)}}function Kn(e){return e.map((e=>(0,Pt.encodeString)(e)))}var Jn=n(68801),Zn=n(52942),Qn=n(95070);!function(){for(const e of ze)Se(e)}()},88163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CompositeArrayBuffer:()=>a,search:()=>i});var r=n(4152);class a{static join(e){return new a(e).slice()}constructor(e){if(this.shards=[],this.previousShardIndex=0,null==e)return;if(e instanceof Array||(e=[e]),0===(e=e.map((e=>r.isTypedArray(e)?e.buffer:e))).length)return;this.bufferUniformSize=e[0].byteLength;let t=0;for(let n=0;n=this.byteLength)return-1;if(null!=this.bufferUniformSize)return this.previousShardIndex=Math.floor(e/this.bufferUniformSize),this.previousShardIndex;function t(t){return e=t.end?1:0}if(0===t(this.shards[this.previousShardIndex]))return this.previousShardIndex;const n=i(this.shards,t);return-1===n?-1:(this.previousShardIndex=n,this.previousShardIndex)}}function i(e,t){let n=0,r=e.length;for(;n<=r;){const a=Math.floor((r-n)/2)+n,i=t(e[a]);if(0===i)return a;i<0?r=a:n=a+1}return-1}},30693:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arrayBufferToBase64String:()=>w,base64StringToArrayBuffer:()=>F,basename:()=>x,concatenateArrayBuffers:()=>k,concatenateTypedArrays:()=>_,decodeWeights:()=>h,decodeWeightsStream:()=>y,encodeWeights:()=>d,getFloat16Decoder:()=>D,getModelArtifactsForJSON:()=>E,getModelArtifactsForJSONSync:()=>S,getModelArtifactsInfoForJSON:()=>C,getModelJSONForModelArtifacts:()=>A,getWeightSpecs:()=>T,stringByteLength:()=>v});var r=n(97629),a=n(59720),i=n(42890),o=n(60010),s=n(88163),l=n(75238),u=n(1023);const c=4;async function d(e,t){const n=[],r=[],a=Array.isArray(e)?e.map((e=>e.name)):Object.keys(e);for(let i=0;i{const t=await s.bytes(),n=t.reduce(((e,t)=>e+t.length),0)+c*t.length,r=new Uint8Array(n);let a=0;for(let i=0;in.slice(a+e,a+t)));r[i.name]=m(i,n.slice(a,a+e)),a+=e}return r}function f(e,t){const n=(0,i.sizeFromShape)(e.shape);let r;if("quantization"in e){const t=e.quantization;r=o.DTYPE_VALUE_SIZE_MAP[t.dtype]}else{if("string"===e.dtype){let e=0;for(let r=0;r(a=await g(r,a,t),a.slice(e,t))));a=await g(r,a,e);const t=a.slice(0,e);a=a.slice(e);const s=m(o,t);if(n[o.name]=s,"webgpu"===(0,l.getBackend)()){const e=(0,l.backend)();"uploadToGPU"in e&&(0,i.sizeFromShape)(s.shape)>=(0,u.env)().get("WEBGPU_CPU_HANDOFF_SIZE_THRESHOLD")&&e.uploadToGPU(s.dataId)}}return n}function _(e){if(null===e)throw new Error(`Invalid input value: ${JSON.stringify(e)}`);let t=0;const n=[];e.forEach((e=>{if(t+=e.byteLength,n.push(e.byteLength===e.buffer.byteLength?e:new e.constructor(e)),!(e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array))throw new Error(`Unsupported TypedArray subtype: ${e.constructor.name}`)}));const r=new Uint8Array(t);let a=0;return n.forEach((e=>{r.set(new Uint8Array(e.buffer),a),a+=e.byteLength})),r.buffer}const b="undefined"!==typeof Buffer&&("undefined"===typeof Blob||"undefined"===typeof atob||"undefined"===typeof btoa);function v(e){return b?Buffer.byteLength(e,"utf8"):new Blob([e]).size}function w(e){if(b)return Buffer.from(e).toString("base64");const t=new Uint8Array(e);let n="";for(let r=0,a=t.length;r{let t=e<<13,n=0;for(;0===(8388608&t);)n-=8388608,t<<=1;return t&=-8388609,n+=947912704,t|n},t=new Uint32Array(2048);t[0]=0;for(let n=1;n<1024;n++)t[n]=e(n);for(let n=1024;n<2048;n++)t[n]=939524096+(n-1024<<13);return t}(),t=function(){const e=new Uint32Array(64);e[0]=0,e[31]=1199570944,e[32]=2147483648,e[63]=3347054592;for(let t=1;t<31;t++)e[t]=t<<23;for(let t=33;t<63;t++)e[t]=2147483648+(t-32<<23);return e}(),n=function(){const e=new Uint32Array(64);for(let t=0;t<64;t++)e[t]=1024;return e[0]=e[32]=0,e}();return r=>{const a=new ArrayBuffer(4*r.length),i=new Uint32Array(a);for(let o=0;o>10]+(1023&a)]+t[a>>10];i[o]=s}return new Float32Array(a)}}},60010:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DTYPE_VALUE_SIZE_MAP:()=>r});const r={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8}},55626:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Abs:()=>r,Acos:()=>a,Acosh:()=>i,Add:()=>o,AddN:()=>s,All:()=>l,Any:()=>u,ArgMax:()=>c,ArgMin:()=>d,Asin:()=>h,Asinh:()=>f,Atan:()=>p,Atan2:()=>g,Atanh:()=>m,AvgPool:()=>y,AvgPool3D:()=>b,AvgPool3DGrad:()=>v,AvgPoolGrad:()=>_,BatchMatMul:()=>w,BatchToSpaceND:()=>F,Bincount:()=>k,BitwiseAnd:()=>x,BroadcastArgs:()=>S,BroadcastTo:()=>A,Cast:()=>E,Ceil:()=>C,ClipByValue:()=>T,Complex:()=>D,ComplexAbs:()=>I,Concat:()=>O,Conv2D:()=>P,Conv2DBackpropFilter:()=>M,Conv2DBackpropInput:()=>R,Conv3D:()=>L,Conv3DBackpropFilterV2:()=>N,Conv3DBackpropInputV2:()=>B,Cos:()=>j,Cosh:()=>V,CropAndResize:()=>U,Cumprod:()=>z,Cumsum:()=>H,DenseBincount:()=>W,DepthToSpace:()=>q,DepthwiseConv2dNative:()=>$,DepthwiseConv2dNativeBackpropFilter:()=>Y,DepthwiseConv2dNativeBackpropInput:()=>G,Diag:()=>X,Dilation2D:()=>K,Dilation2DBackpropFilter:()=>Z,Dilation2DBackpropInput:()=>J,Draw:()=>Q,Einsum:()=>te,Elu:()=>ne,EluGrad:()=>re,Equal:()=>ie,Erf:()=>ae,Exp:()=>oe,ExpandDims:()=>se,Expm1:()=>le,FFT:()=>ue,Fill:()=>ce,FlipLeftRight:()=>de,Floor:()=>he,FloorDiv:()=>fe,FromPixels:()=>yn,FusedBatchNorm:()=>pe,FusedConv2D:()=>vn,FusedDepthwiseConv2D:()=>wn,GatherNd:()=>ge,GatherV2:()=>me,Greater:()=>ye,GreaterEqual:()=>_e,IFFT:()=>ve,Identity:()=>be,Imag:()=>we,IsFinite:()=>Fe,IsInf:()=>ke,IsNan:()=>xe,LRN:()=>Ne,LRNGrad:()=>Be,LeakyRelu:()=>Ae,Less:()=>Se,LessEqual:()=>Ee,LinSpace:()=>Ce,Log:()=>Te,Log1p:()=>De,LogSoftmax:()=>Re,LogicalAnd:()=>Ie,LogicalNot:()=>Oe,LogicalOr:()=>Pe,LogicalXor:()=>Me,LowerBound:()=>Le,MatrixBandPart:()=>je,Max:()=>Ve,MaxPool:()=>He,MaxPool3D:()=>We,MaxPool3DGrad:()=>qe,MaxPoolGrad:()=>Ue,MaxPoolWithArgmax:()=>$e,Maximum:()=>ze,Mean:()=>Ye,Min:()=>Ge,Minimum:()=>Xe,MirrorPad:()=>Ke,Mod:()=>Je,Multinomial:()=>Ze,Multiply:()=>Qe,Neg:()=>et,NonMaxSuppressionV3:()=>nt,NonMaxSuppressionV4:()=>rt,NonMaxSuppressionV5:()=>at,NotEqual:()=>tt,OneHot:()=>ot,OnesLike:()=>it,Pack:()=>st,PadV2:()=>lt,Pool:()=>ut,Pow:()=>ct,Prelu:()=>dt,Prod:()=>ht,RaggedGather:()=>ft,RaggedRange:()=>pt,RaggedTensorToTensor:()=>mt,Range:()=>gt,Real:()=>yt,RealDiv:()=>ee,Reciprocal:()=>_t,Relu:()=>bt,Relu6:()=>At,Reshape:()=>vt,ResizeBilinear:()=>kt,ResizeBilinearGrad:()=>xt,ResizeNearestNeighbor:()=>wt,ResizeNearestNeighborGrad:()=>Ft,Reverse:()=>St,RotateWithOffset:()=>_n,Round:()=>Et,Rsqrt:()=>Ct,ScatterNd:()=>Tt,SearchSorted:()=>It,Select:()=>Ot,Selu:()=>Pt,Sigmoid:()=>Bt,Sign:()=>Nt,Sin:()=>Rt,Sinh:()=>Lt,Slice:()=>Mt,Softmax:()=>Wt,Softplus:()=>jt,SpaceToBatchND:()=>Ht,SparseFillEmptyRows:()=>qt,SparseReshape:()=>$t,SparseSegmentMean:()=>Yt,SparseSegmentSum:()=>Gt,SparseToDense:()=>Xt,SplitV:()=>Ut,Sqrt:()=>Vt,Square:()=>Jt,SquaredDifference:()=>Kt,StaticRegexReplace:()=>Zt,Step:()=>gn,StridedSlice:()=>Qt,StringNGrams:()=>en,StringSplit:()=>tn,StringToHashBucketFast:()=>nn,Sub:()=>rn,Sum:()=>zt,Tan:()=>an,Tanh:()=>on,TensorScatterUpdate:()=>Dt,Tile:()=>sn,TopK:()=>ln,Transform:()=>un,Transpose:()=>cn,Unique:()=>dn,Unpack:()=>hn,UnsortedSegmentSum:()=>fn,UpperBound:()=>pn,ZerosLike:()=>mn,_FusedMatMul:()=>bn});const r="Abs",a="Acos",i="Acosh",o="Add",s="AddN",l="All",u="Any",c="ArgMax",d="ArgMin",h="Asin",f="Asinh",p="Atan",m="Atanh",g="Atan2",y="AvgPool",_="AvgPoolGrad",b="AvgPool3D",v="AvgPool3DGrad",w="BatchMatMul",F="BatchToSpaceND",k="Bincount",x="BitwiseAnd",A="BroadcastTo",S="BroadcastArgs",E="Cast",C="Ceil",T="ClipByValue",D="Complex",I="ComplexAbs",O="Concat",P="Conv2D",M="Conv2DBackpropFilter",R="Conv2DBackpropInput",L="Conv3D",N="Conv3DBackpropFilterV2",B="Conv3DBackpropInputV2",j="Cos",V="Cosh",z="Cumprod",H="Cumsum",U="CropAndResize",W="DenseBincount",q="DepthToSpace",$="DepthwiseConv2dNative",Y="DepthwiseConv2dNativeBackpropFilter",G="DepthwiseConv2dNativeBackpropInput",X="Diag",K="Dilation2D",J="Dilation2DBackpropInput",Z="Dilation2DBackpropFilter",Q="Draw",ee="RealDiv",te="Einsum",ne="Elu",re="EluGrad",ae="Erf",ie="Equal",oe="Exp",se="ExpandDims",le="Expm1",ue="FFT",ce="Fill",de="FlipLeftRight",he="Floor",fe="FloorDiv",pe="FusedBatchNorm",me="GatherV2",ge="GatherNd",ye="Greater",_e="GreaterEqual",be="Identity",ve="IFFT",we="Imag",Fe="IsFinite",ke="IsInf",xe="IsNan",Ae="LeakyRelu",Se="Less",Ee="LessEqual",Ce="LinSpace",Te="Log",De="Log1p",Ie="LogicalAnd",Oe="LogicalNot",Pe="LogicalOr",Me="LogicalXor",Re="LogSoftmax",Le="LowerBound",Ne="LRN",Be="LRNGrad",je="MatrixBandPart",Ve="Max",ze="Maximum",He="MaxPool",Ue="MaxPoolGrad",We="MaxPool3D",qe="MaxPool3DGrad",$e="MaxPoolWithArgmax",Ye="Mean",Ge="Min",Xe="Minimum",Ke="MirrorPad",Je="Mod",Ze="Multinomial",Qe="Multiply",et="Neg",tt="NotEqual",nt="NonMaxSuppressionV3",rt="NonMaxSuppressionV4",at="NonMaxSuppressionV5",it="OnesLike",ot="OneHot",st="Pack",lt="PadV2",ut="Pool",ct="Pow",dt="Prelu",ht="Prod",ft="RaggedGather",pt="RaggedRange",mt="RaggedTensorToTensor",gt="Range",yt="Real",_t="Reciprocal",bt="Relu",vt="Reshape",wt="ResizeNearestNeighbor",Ft="ResizeNearestNeighborGrad",kt="ResizeBilinear",xt="ResizeBilinearGrad",At="Relu6",St="Reverse",Et="Round",Ct="Rsqrt",Tt="ScatterNd",Dt="TensorScatterUpdate",It="SearchSorted",Ot="Select",Pt="Selu",Mt="Slice",Rt="Sin",Lt="Sinh",Nt="Sign",Bt="Sigmoid",jt="Softplus",Vt="Sqrt",zt="Sum",Ht="SpaceToBatchND",Ut="SplitV",Wt="Softmax",qt="SparseFillEmptyRows",$t="SparseReshape",Yt="SparseSegmentMean",Gt="SparseSegmentSum",Xt="SparseToDense",Kt="SquaredDifference",Jt="Square",Zt="StaticRegexReplace",Qt="StridedSlice",en="StringNGrams",tn="StringSplit",nn="StringToHashBucketFast",rn="Sub",an="Tan",on="Tanh",sn="Tile",ln="TopK",un="Transform",cn="Transpose",dn="Unique",hn="Unpack",fn="UnsortedSegmentSum",pn="UpperBound",mn="ZerosLike",gn="Step",yn="FromPixels",_n="RotateWithOffset",bn="_FusedMatMul",vn="FusedConv2D",wn="FusedDepthwiseConv2D"},73331:(e,t,n)=>{"use strict";n.r(t),n.d(t,{copyRegisteredKernels:()=>m,getGradient:()=>u,getKernel:()=>l,getKernelsForBackend:()=>c,registerGradient:()=>h,registerKernel:()=>d,unregisterGradient:()=>p,unregisterKernel:()=>f});var r=n(1023),a=n(1278),i=n(77652);const o=(0,a.getGlobal)("kernelRegistry",(()=>new Map)),s=(0,a.getGlobal)("gradRegistry",(()=>new Map));function l(e,t){const n=g(e,t);return o.get(n)}function u(e){return s.get(e)}function c(e){const t=o.entries(),n=[];for(;;){const{done:r,value:a}=t.next();if(r)break;const[i,o]=a,[s]=i.split("_");s===e&&n.push(o)}return n}function d(e){const{kernelName:t,backendName:n}=e,r=g(t,n);o.has(r)&&i.warn(`The kernel '${t}' for backend '${n}' is already registered`),o.set(r,e)}function h(e){const{kernelName:t}=e;s.has(t)&&(0,r.env)().getBool("DEBUG")&&i.warn(`Overriding the gradient for '${t}'`),s.set(t,e)}function f(e,t){const n=g(e,t);if(!o.has(n))throw new Error(`The kernel '${e}' for backend '${t}' is not registered`);o.delete(n)}function p(e){if(!s.has(e))throw new Error(`The gradient '${e}' for backend is not registered`);s.delete(e)}function m(e,t){c(e).forEach((e=>{d(Object.assign({},e,{backendName:t}))}))}function g(e,t){return`${t}_${e}`}},77652:(e,t,n)=>{"use strict";n.r(t),n.d(t,{log:()=>i,warn:()=>a});var r=n(1023);function a(...e){(0,r.env)().getBool("IS_TEST")||(0,r.env)().getBool("PROD")||console.warn(...e)}function i(...e){(0,r.env)().getBool("IS_TEST")||(0,r.env)().getBool("PROD")||console.log(...e)}},31473:(e,t,n)=>{"use strict";n.r(t),n.d(t,{abs:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({abs_:function(e){const t=(0,i.convertToTensor)(e,"x","abs");if("complex64"===t.dtype){const e={x:t};return r.ENGINE.runKernel(a.ComplexAbs,e)}{const e={x:t};return r.ENGINE.runKernel(a.Abs,e)}}})},67631:(e,t,n)=>{"use strict";n.r(t),n.d(t,{acos:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({acos_:function(e){const t={x:(0,i.convertToTensor)(e,"x","acos")};return r.ENGINE.runKernel(a.Acos,t)}})},60623:(e,t,n)=>{"use strict";n.r(t),n.d(t,{acosh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({acosh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","acosh")};return r.ENGINE.runKernel(a.Acosh,t)}})},29666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{add:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({add_:function(e,t){let n=(0,o.convertToTensor)(e,"a","add"),s=(0,o.convertToTensor)(t,"b","add");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Add,l)}})},97010:(e,t,n)=>{"use strict";n.r(t),n.d(t,{all:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({all_:function(e,t=null,n=!1){const o={x:(0,i.convertToTensor)(e,"x","all","bool")},s={axis:t,keepDims:n};return r.ENGINE.runKernel(a.All,o,s)}})},48627:(e,t,n)=>{"use strict";n.r(t),n.d(t,{any:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({any_:function(e,t=null,n=!1){const o={x:(0,i.convertToTensor)(e,"x","any","bool")},s={axis:t,keepDims:n};return r.ENGINE.runKernel(a.Any,o,s)}})},79236:(e,t,n)=>{"use strict";n.r(t),n.d(t,{argMax:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({argMax_:function(e,t=0){const n={x:(0,i.convertToTensor)(e,"x","argMax")},o={axis:t};return r.ENGINE.runKernel(a.ArgMax,n,o)}})},90634:(e,t,n)=>{"use strict";n.r(t),n.d(t,{argMin:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({argMin_:function(e,t=0){const n={x:(0,i.convertToTensor)(e,"x","argMin")},o={axis:t};return r.ENGINE.runKernel(a.ArgMin,n,o)}})},8666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{asin:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({asin_:function(e){const t={x:(0,i.convertToTensor)(e,"x","asin")};return r.ENGINE.runKernel(a.Asin,t)}})},66440:(e,t,n)=>{"use strict";n.r(t),n.d(t,{asinh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({asinh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","asinh")};return r.ENGINE.runKernel(a.Asinh,t)}})},77843:(e,t,n)=>{"use strict";n.r(t),n.d(t,{atan:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({atan_:function(e){const t={x:(0,i.convertToTensor)(e,"x","atan")};return r.ENGINE.runKernel(a.Atan,t)}})},43157:(e,t,n)=>{"use strict";n.r(t),n.d(t,{atan2:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({atan2_:function(e,t){let n=(0,o.convertToTensor)(e,"a","atan2"),s=(0,o.convertToTensor)(t,"b","atan2");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Atan2,l)}})},89227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{atanh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({atanh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","atanh")};return r.ENGINE.runKernel(a.Atanh,t)}})},55794:(e,t,n)=>{"use strict";n.r(t),n.d(t,{avgPool:()=>d});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(27322),l=n(48938),u=n(8844),c=n(9175);const d=(0,u.op)({avgPool_:function(e,t,n,u,d){const h=(0,i.convertToTensor)(e,"x","avgPool","float32");o.assert(l.eitherStridesOrDilationsAreOne(n,1),(()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`));let f=h,p=!1;3===h.rank&&(p=!0,f=(0,c.reshape)(h,[1,h.shape[0],h.shape[1],h.shape[2]])),o.assert(4===f.rank,(()=>`Error in avgPool: x must be rank 4 but got rank ${f.rank}.`)),l.checkPadOnDimRoundingMode("avgPool",u,d);const m={x:f},g={filterSize:t,strides:n,pad:u,dimRoundingMode:d};let y=r.ENGINE.runKernel(a.AvgPool,m,g);return y=(0,s.cast)(y,h.dtype),p?(0,c.reshape)(y,[y.shape[1],y.shape[2],y.shape[3]]):y}})},24651:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assertAxesAreInnerMostDims:()=>l,axesAreInnerMostDims:()=>a,combineLocations:()=>i,computeOutAndReduceShapes:()=>o,expandShapeToKeepDim:()=>s,getAxesPermutation:()=>u,getInnerMostAxes:()=>d,getUndoAxesPermutation:()=>c});var r=n(42890);function a(e,t){for(let n=0;ne[t]))]}function s(e,t){return i(e,t.map((e=>1)),t)}function l(e,t,n){r.assert(a(t,n),(()=>`${e} supports only inner-most axes for now. Got axes ${t} and rank-${n} input.`))}function u(e,t){if(a(e,t))return null;const n=[];for(let r=0;rn.push(e))),n}function c(e){return e.map(((e,t)=>[t,e])).sort(((e,t)=>e[1]-t[1])).map((e=>e[0]))}function d(e,t){const n=[];for(let r=t-e;r{"use strict";n.r(t),n.d(t,{batchToSpaceND:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({batchToSpaceND_:function(e,t,n){const s=(0,i.convertToTensor)(e,"x","batchToSpaceND"),l=t.reduce(((e,t)=>e*t));o.assert(s.rank>=1+t.length,(()=>`input rank is ${s.rank} but should be > than blockShape.length ${t.length}`)),o.assert(n.length===t.length,(()=>`crops.length is ${n.length} but should be equal to blockShape.length ${t.length}`)),o.assert(s.shape[0]%l===0,(()=>`input tensor batch is ${s.shape[0]} but is not divisible by the product of the elements of blockShape ${t.join(" * ")} === ${l}`));const u={x:s},c={blockShape:t,crops:n};return r.ENGINE.runKernel(a.BatchToSpaceND,u,c)}})},86715:(e,t,n)=>{"use strict";n.r(t),n.d(t,{batchNorm:()=>l});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(9175);const l=(0,n(8844).op)({batchNorm_:function(e,t,n,l,u,c){null==c&&(c=.001);const d=(0,i.convertToTensor)(e,"x","batchNorm"),h=(0,i.convertToTensor)(t,"mean","batchNorm"),f=(0,i.convertToTensor)(n,"variance","batchNorm");let p,m;null!=u&&(p=(0,i.convertToTensor)(u,"scale","batchNorm")),null!=l&&(m=(0,i.convertToTensor)(l,"offset","batchNorm")),o.assert(h.rank===f.rank,(()=>"Batch normalization gradient requires mean and variance to have equal ranks.")),o.assert(null==m||h.rank===m.rank,(()=>"Batch normalization gradient requires mean and offset to have equal ranks.")),o.assert(null==p||h.rank===p.rank,(()=>"Batch normalization gradient requires mean and scale to have equal ranks."));const g={x:function(e){let t;return t=0===e.rank||1===e.rank?(0,s.reshape)(e,[1,1,1,e.size]):2===e.rank?(0,s.reshape)(e,[1,1,e.shape[0],e.shape[1]]):3===e.rank?(0,s.reshape)(e,[1,e.shape[0],e.shape[1],e.shape[2]]):e,t}(d),scale:p,offset:m,mean:h,variance:f},y={varianceEpsilon:c},_=r.ENGINE.runKernel(a.FusedBatchNorm,g,y);return(0,s.reshape)(_,d.shape)}})},68944:(e,t,n)=>{"use strict";n.r(t),n.d(t,{broadcastTo:()=>c});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(72836),l=n(8844),u=n(9175);const c=(0,l.op)({broadcastTo_:function(e,t){let n=(0,i.convertToTensor)(e,"broadcastTo","x");const l=n.shape;if((0,o.assertNonNegativeIntegerDimensions)(t),t.lengthn.rank){const e=n.shape.slice();for(;e.length=0;r--)if(c[r]===t[r])d[r]=1;else if(1!==n.shape[r])throw new Error(`broadcastTo(): [${l}] cannot be broadcast to [${t}].`);if(0===d.map(((e,t)=>e>1?t:-1)).filter((e=>e>=0)).length)return(0,s.clone)(n);const h={x:n},f={reps:d};return r.ENGINE.runKernel(a.Tile,h,f)}})},57229:(e,t,n)=>{"use strict";function r(e,t){const n=e.length,r=[];for(let a=0;a1&&1===o&&r.unshift(i)}return r}function a(e,t){const n=[];for(let r=0;r1)&&n.unshift(i)}return n}function i(e,t){const n=Math.max(e.length,t.length),r=new Array(n);for(let a=0;ai,getBroadcastDims:()=>r,getReductionAxes:()=>a})},97963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{buffer:()=>i});var r=n(9180),a=n(42890);function i(e,t="float32",n){return t=t||"float32",a.assertNonNegativeIntegerDimensions(e),new r.TensorBuffer(e,t,n)}},27322:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cast:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({cast_:function(e,t){const n=(0,i.convertToTensor)(e,"x","cast");if(!o.isValidDtype(t))throw new Error(`Failed to cast to unknown dtype ${t}`);if("string"===t&&"string"!==n.dtype||"string"!==t&&"string"===n.dtype)throw new Error("Only strings can be casted to strings");const s={x:n},l={dtype:t};return r.ENGINE.runKernel(a.Cast,s,l)}})},876:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ceil:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({ceil_:function(e){const t={x:(0,i.convertToTensor)(e,"x","ceil","float32")};return r.ENGINE.runKernel(a.Ceil,t)}})},20157:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clipByValue:()=>l});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(52812);const l=(0,n(8844).op)({clipByValue_:function(e,t,n){const l=(0,i.convertToTensor)(e,"x","clipByValue");if(o.assert(t<=n,(()=>`Error in clip: min (${t}) must be less than or equal to max (${n}).`)),t===n)return(0,s.fill)(l.shape,t,l.dtype);const u={x:l},c={clipValueMin:t,clipValueMax:n};return r.ENGINE.runKernel(a.ClipByValue,u,c)}})},72836:(e,t,n)=>{"use strict";n.r(t),n.d(t,{clone:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({clone_:function(e){const t={x:(0,i.convertToTensor)(e,"x","clone","string_or_numeric")};return r.ENGINE.runKernel(a.Identity,t)}})},97629:(e,t,n)=>{"use strict";n.r(t),n.d(t,{complex:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({complex_:function(e,t){const n=(0,i.convertToTensor)(e,"real","complex"),s=(0,i.convertToTensor)(t,"imag","complex");o.assertShapesMatch(n.shape,s.shape,`real and imag shapes, ${n.shape} and ${s.shape}, must match in call to tf.complex().`);const l={real:n,imag:s};return r.ENGINE.runKernel(a.Complex,l)}})},27493:(e,t,n)=>{"use strict";n.r(t),n.d(t,{concat:()=>l});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(72836);const l=(0,n(8844).op)({concat_:function(e,t=0){(0,o.assert)(e.length>=1,(()=>"Pass at least one tensor to concat"));const n=(0,i.convertToTensorArray)(e,"tensors","concat","string_or_numeric");if("complex64"===n[0].dtype&&n.forEach((e=>{if("complex64"!==e.dtype)throw new Error(`Cannot concatenate complex64 tensors with a tensor\n with dtype ${e.dtype}. `)})),1===n.length)return(0,s.clone)(n[0]);const l=n,u={axis:t};return r.ENGINE.runKernel(a.Concat,l,u)}})},28374:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv1d:()=>u});var r=n(41564),a=n(42890),i=n(58625),o=n(48938),s=n(8844),l=n(9175);const u=(0,s.op)({conv1d_:function(e,t,n,s,u="NWC",c=1,d){const h=(0,r.convertToTensor)(e,"x","conv1d"),f=(0,r.convertToTensor)(t,"filter","conv1d");let p=h,m=!1;2===h.rank&&(m=!0,p=(0,l.reshape)(h,[1,h.shape[0],h.shape[1]])),a.assert(3===p.rank,(()=>`Error in conv1d: input must be rank 3, but got rank ${p.rank}.`)),a.assert(3===f.rank,(()=>`Error in conv1d: filter must be rank 3, but got rank ${f.rank}.`)),o.checkPadOnDimRoundingMode("conv1d",s,d),a.assert(p.shape[2]===f.shape[1],(()=>`Error in conv1d: depth of input (${p.shape[2]}) must match input depth for filter ${f.shape[1]}.`)),a.assert(o.eitherStridesOrDilationsAreOne(n,c),(()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${c}'`)),a.assert(o.stridesOrDilationsArePositive(c),(()=>"Error in conv1D: Dilated rates should be larger than 0.")),a.assert(o.stridesOrDilationsArePositive(n),(()=>"Error in conv1D: Stride should be larger than 0.")),a.assert("NWC"===u,(()=>`Error in conv1d: got dataFormat of ${u} but only NWC is currently supported.`));const g=(0,l.reshape)(f,[1,f.shape[0],f.shape[1],f.shape[2]]),y=(0,l.reshape)(p,[p.shape[0],1,p.shape[1],p.shape[2]]),_=[1,n],b=[1,c],v=(0,i.conv2d)(y,g,_,s,"NHWC",b,d);return m?(0,l.reshape)(v,[v.shape[2],v.shape[3]]):(0,l.reshape)(v,[v.shape[0],v.shape[2],v.shape[3]])}})},58625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv2d:()=>c});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(48938),l=n(8844),u=n(9175);const c=(0,l.op)({conv2d_:function(e,t,n,l,c="NHWC",d=[1,1],h){const f=(0,i.convertToTensor)(e,"x","conv2d","float32"),p=(0,i.convertToTensor)(t,"filter","conv2d","float32");let m=f,g=!1;3===f.rank&&(g=!0,m=(0,u.reshape)(f,[1,f.shape[0],f.shape[1],f.shape[2]])),o.assert(4===m.rank,(()=>`Error in conv2d: input must be rank 4, but got rank ${m.rank}.`)),o.assert(4===p.rank,(()=>`Error in conv2d: filter must be rank 4, but got rank ${p.rank}.`)),s.checkPadOnDimRoundingMode("conv2d",l,h);const y="NHWC"===c?m.shape[3]:m.shape[1];o.assert(y===p.shape[2],(()=>`Error in conv2d: depth of input (${y}) must match input depth for filter ${p.shape[2]}.`)),o.assert(s.eitherStridesOrDilationsAreOne(n,d),(()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${d}'`)),o.assert(s.stridesOrDilationsArePositive(d),(()=>"Error in conv2D: Dilated rates should be larger than 0.")),o.assert(s.stridesOrDilationsArePositive(n),(()=>"Error in conv2D: Strides should be larger than 0."));const _={x:m,filter:p},b={strides:n,pad:l,dataFormat:c,dilations:d,dimRoundingMode:h},v=r.ENGINE.runKernel(a.Conv2D,_,b);return g?(0,u.reshape)(v,[v.shape[1],v.shape[2],v.shape[3]]):v}})},24935:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv2DBackpropFilter:()=>u});var r=n(55279),a=n(55626),i=n(42890),o=n(48938),s=n(8844),l=n(9175);const u=(0,s.op)({conv2DBackpropFilter_:function(e,t,n,s,u,c="NHWC",d){let h=e;3===e.rank&&(h=(0,l.reshape)(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let f=t;3===f.rank&&(f=(0,l.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2]])),i.assert(4===h.rank,(()=>`Error in conv2dDerFilter: input must be rank 4, but got shape ${h.shape}.`)),i.assert(4===f.rank,(()=>`Error in conv2dDerFilter: dy must be rank 4, but got shape ${f.shape}.`)),i.assert(4===n.length,(()=>`Error in conv2dDerFilter: filterShape must be length 4, but got ${n}.`));const p="NHWC"===c?h.shape[3]:h.shape[1],m="NHWC"===c?f.shape[3]:f.shape[1];i.assert(p===n[2],(()=>`Error in conv2dDerFilter: depth of input ${p}) must match input depth in filter (${n[2]}.`)),i.assert(m===n[3],(()=>`Error in conv2dDerFilter: depth of dy (${m}) must match output depth for filter (${n[3]}).`)),o.checkPadOnDimRoundingMode("conv2dDerFilter",u,d);const g={x:h,dy:f},y={strides:s,pad:u,dataFormat:c,dimRoundingMode:d,filterShape:n};return r.ENGINE.runKernel(a.Conv2DBackpropFilter,g,y)}})},3333:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv2DBackpropInput:()=>u});var r=n(55279),a=n(55626),i=n(42890),o=n(48938),s=n(8844),l=n(9175);const u=(0,s.op)({conv2DBackpropInput_:function(e,t,n,s,u,c="NHWC",d){i.assert(e.length===t.rank,(()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`));let h=e,f=t,p=!1;3===t.rank&&(p=!0,f=(0,l.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2]]),h=[1,e[0],e[1],e[2]]),i.assert(4===h.length,(()=>`Error in conv2dDerInput: inShape must be length 4, but got length ${h.length}.`)),i.assert(4===f.rank,(()=>`Error in conv2dDerInput: dy must be rank 4, but got rank ${f.rank}`)),i.assert(4===n.rank,(()=>`Error in conv2dDerInput: filter must be rank 4, but got rank ${n.rank}`));const m="NHWC"===c?h[3]:h[1],g="NHWC"===c?f.shape[3]:f.shape[1];i.assert(m===n.shape[2],(()=>`Error in conv2dDerInput: depth of input (${m}) must match input depth for filter ${n.shape[2]}.`)),i.assert(g===n.shape[3],(()=>`Error in conv2dDerInput: depth of output (${g}) must match output depth for filter ${n.shape[3]}.`)),o.checkPadOnDimRoundingMode("conv2dDerInput",u,d);const y={dy:f,filter:n},_={strides:s,pad:u,dataFormat:c,dimRoundingMode:d,inputShape:h},b=r.ENGINE.runKernel(a.Conv2DBackpropInput,y,_);return p?(0,l.reshape)(b,[b.shape[1],b.shape[2],b.shape[3]]):b}})},92777:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv2dTranspose:()=>i});var r=n(41564),a=n(3333);const i=(0,n(8844).op)({conv2dTranspose_:function(e,t,n,i,o,s){const l=(0,r.convertToTensor)(e,"x","conv2dTranspose"),u=(0,r.convertToTensor)(t,"filter","conv2dTranspose");return(0,a.conv2DBackpropInput)(n,l,u,i,o,"NHWC",s)}})},6082:(e,t,n)=>{"use strict";n.r(t),n.d(t,{conv3DBackpropInput:()=>l});var r=n(55279),a=n(55626),i=n(42890),o=n(8844),s=n(9175);const l=(0,o.op)({conv3DBackpropInput_:function(e,t,n,o,l){i.assert(e.length===t.rank,(()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`));let u=e,c=t,d=!1;4===t.rank&&(d=!0,c=(0,s.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]),u=[1,e[0],e[1],e[2],e[3]]);const h=u[4],f=c.shape[4];i.assert(5===u.length,(()=>`Error in conv3dDerInput: inShape must be length 5, but got length ${u.length}.`)),i.assert(5===c.rank,(()=>`Error in conv3dDerInput: dy must be rank 5, but got rank ${c.rank}`)),i.assert(5===n.rank,(()=>`Error in conv3dDerInput: filter must be rank 5, but got rank ${n.rank}`)),i.assert(h===n.shape[3],(()=>`Error in conv3dDerInput: depth of input (${h}) must match input depth for filter ${n.shape[3]}.`)),i.assert(f===n.shape[4],(()=>`Error in conv3dDerInput: depth of output (${f}) must match output depth for filter ${n.shape[4]}.`));const p={dy:c,filter:n},m={pad:l,strides:o,inputShape:u},g=r.ENGINE.runKernel(a.Conv3DBackpropInputV2,p,m);return d?(0,s.reshape)(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}})},48938:(e,t,n)=>{"use strict";n.r(t),n.d(t,{checkPadOnDimRoundingMode:()=>_,computeConv2DInfo:()=>s,computeConv3DInfo:()=>l,computeDefaultPad:()=>u,computeDilation2DInfo:()=>a,computePool2DInfo:()=>i,computePool3DInfo:()=>o,convertConv2DDataFormat:()=>y,eitherStridesOrDilationsAreOne:()=>m,stridesOrDilationsArePositive:()=>g,tupleValuesAreOne:()=>p});var r=n(42890);function a(e,t,n,r,a="NHWC",i){return s(e,[...t,e[3]],n,i,r,null,null,y(a))}function i(e,t,n,r,a,i,o="channelsLast"){const[l,u]=c(t);let d;if("channelsLast"===o)d=[l,u,e[3],e[3]];else{if("channelsFirst"!==o)throw new Error(`Unknown dataFormat ${o}`);d=[l,u,e[1],e[1]]}return s(e,d,n,r,a,i,!1,o)}function o(e,t,n,r,a,i,o="NDHWC"){const[s,u,c]=d(t);let h,f;if("NDHWC"===o)f="channelsLast",h=[s,u,c,e[4],e[4]];else{if("NCDHW"!==o)throw new Error(`Unknown dataFormat ${o}`);f="channelsFirst",h=[s,u,c,e[1],e[1]]}return l(e,h,n,r,a,!1,f,i)}function s(e,t,n,r,a,i,o=!1,s="channelsLast"){let[l,d,p,m]=[-1,-1,-1,-1];if("channelsLast"===s)[l,d,p,m]=e;else{if("channelsFirst"!==s)throw new Error(`Unknown dataFormat ${s}`);[l,m,d,p]=e}const[g,y,,_]=t,[b,v]=c(n),[w,F]=c(r),k=h(g,w),x=h(y,F),{padInfo:A,outHeight:S,outWidth:E}=function(e,t,n,r,a,i,o,s,l){let c,d,h;if("number"===typeof e){c={top:e,bottom:e,left:e,right:e,type:0===e?"VALID":"NUMBER"};const a=function(e,t,n,r,a){null==r&&(r=u(e,t,n));const i=e[0],o=e[1],s=f((i-t+2*r)/n+1,a),l=f((o-t+2*r)/n+1,a);return[s,l]}([t,n],i,r,e,s);d=a[0],h=a[1]}else if("same"===e){d=Math.ceil(t/r),h=Math.ceil(n/a);const e=Math.max(0,(d-1)*r+i-t),s=Math.max(0,(h-1)*a+o-n),l=Math.floor(e/2),u=e-l,f=Math.floor(s/2);c={top:l,bottom:u,left:f,right:s-f,type:"SAME"}}else if("valid"===e)c={top:0,bottom:0,left:0,right:0,type:"VALID"},d=Math.ceil((t-i+1)/r),h=Math.ceil((n-o+1)/a);else{if("object"!==typeof e)throw Error(`Unknown padding parameter: ${e}`);{const u="channelsLast"===l?e[1][0]:e[2][0],p="channelsLast"===l?e[1][1]:e[2][1],m="channelsLast"===l?e[2][0]:e[3][0],g="channelsLast"===l?e[2][1]:e[3][1];c={top:u,bottom:p,left:m,right:g,type:0===u&&0===p&&0===m&&0===g?"VALID":"EXPLICIT"},d=f((t-i+u+p)/r+1,s),h=f((n-o+m+g)/a+1,s)}}return{padInfo:c,outHeight:d,outWidth:h}}(a,d,p,b,v,k,x,i,s),C=o?_*m:_;let T;return"channelsFirst"===s?T=[l,C,S,E]:"channelsLast"===s&&(T=[l,S,E,C]),{batchSize:l,dataFormat:s,inHeight:d,inWidth:p,inChannels:m,outHeight:S,outWidth:E,outChannels:C,padInfo:A,strideHeight:b,strideWidth:v,filterHeight:g,filterWidth:y,effectiveFilterHeight:k,effectiveFilterWidth:x,dilationHeight:w,dilationWidth:F,inShape:e,outShape:T,filterShape:t}}function l(e,t,n,r,a,i=!1,o="channelsLast",s){let[l,c,p,m,g]=[-1,-1,-1,-1,-1];if("channelsLast"===o)[l,c,p,m,g]=e;else{if("channelsFirst"!==o)throw new Error(`Unknown dataFormat ${o}`);[l,g,c,p,m]=e}const[y,_,b,,v]=t,[w,F,k]=d(n),[x,A,S]=d(r),E=h(y,x),C=h(_,A),T=h(b,S),{padInfo:D,outDepth:I,outHeight:O,outWidth:P}=function(e,t,n,r,a,i,o,s,l,c,d){let h,p,m,g;"valid"===e&&(e=0);if("number"===typeof e){h={top:e,bottom:e,left:e,right:e,front:e,back:e,type:0===e?"VALID":"NUMBER"};const y=function(e,t,n,r,a,i){null==a&&(a=u(e,t[0],r[0]));const o=[0,0,0,n];for(let s=0;s<3;s++)e[s]+2*a>=t[s]&&(o[s]=f((e[s]-t[s]+2*a)/r[s]+1,i));return o}([t,n,r,1],[s,l,c],1,[a,i,o],e,d);p=y[0],m=y[1],g=y[2]}else{if("same"!==e)throw Error(`Unknown padding parameter: ${e}`);{p=Math.ceil(t/a),m=Math.ceil(n/i),g=Math.ceil(r/o);const e=(p-1)*a+s-t,u=(m-1)*i+l-n,d=(g-1)*o+c-r,f=Math.floor(e/2),y=e-f,_=Math.floor(u/2),b=u-_,v=Math.floor(d/2);h={top:_,bottom:b,left:v,right:d-v,front:f,back:y,type:"SAME"}}}return{padInfo:h,outDepth:p,outHeight:m,outWidth:g}}(a,c,p,m,w,F,k,E,C,T,s),M=i?v*g:v;let R;return"channelsFirst"===o?R=[l,M,I,O,P]:"channelsLast"===o&&(R=[l,I,O,P,M]),{batchSize:l,dataFormat:o,inDepth:c,inHeight:p,inWidth:m,inChannels:g,outDepth:I,outHeight:O,outWidth:P,outChannels:M,padInfo:D,strideDepth:w,strideHeight:F,strideWidth:k,filterDepth:y,filterHeight:_,filterWidth:b,effectiveFilterDepth:E,effectiveFilterHeight:C,effectiveFilterWidth:T,dilationDepth:x,dilationHeight:A,dilationWidth:S,inShape:e,outShape:R,filterShape:t}}function u(e,t,n,r=1){const a=h(t,r);return Math.floor((e[0]*(n-1)-n+a)/2)}function c(e){return"number"===typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}function d(e){return"number"===typeof e?[e,e,e]:e}function h(e,t){return t<=1?e:e+(e-1)*(t-1)}function f(e,t){if(!t)return Math.trunc(e);switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error(`Unknown roundingMode ${t}`)}}function p(e){const[t,n,r]=c(e);return 1===t&&1===n&&1===r}function m(e,t){return p(e)||p(t)}function g(e){return c(e).every((e=>e>0))}function y(e){if("NHWC"===e)return"channelsLast";if("NCHW"===e)return"channelsFirst";throw new Error(`Unknown dataFormat ${e}`)}function _(e,t,n){if(null!=n){if("string"===typeof t)throw Error(`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);if("number"===typeof t)r.assert(r.isInt(t),(()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`));else{if("object"!==typeof t)throw Error(`Error in ${e}: Unknown padding parameter: ${t}`);t.forEach((t=>{t.forEach((t=>{r.assert(r.isInt(t),(()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`))}))}))}}}},72286:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cos:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({cos_:function(e){const t={x:(0,i.convertToTensor)(e,"x","cos","float32")};return r.ENGINE.runKernel(a.Cos,t)}})},85348:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cosh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({cosh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","cosh","float32")};return r.ENGINE.runKernel(a.Cosh,t)}})},81107:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cumprod:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({cumprod_:function(e,t=0,n=!1,o=!1){const s={x:(0,i.convertToTensor)(e,"x","cumprod")},l={axis:t,exclusive:n,reverse:o};return r.ENGINE.runKernel(a.Cumprod,s,l)}})},37431:(e,t,n)=>{"use strict";n.r(t),n.d(t,{cumsum:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({cumsum_:function(e,t=0,n=!1,o=!1){const s={x:(0,i.convertToTensor)(e,"x","cumsum")},l={axis:t,exclusive:n,reverse:o};return r.ENGINE.runKernel(a.Cumsum,s,l)}})},89247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{depthToSpace:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({depthToSpace_:function(e,t,n="NHWC"){const s=(0,i.convertToTensor)(e,"x","depthToSpace","float32"),l="NHWC"===n?s.shape[1]:s.shape[2],u="NHWC"===n?s.shape[2]:s.shape[3],c="NHWC"===n?s.shape[3]:s.shape[1];o.assert(t>1,(()=>`blockSize should be > 1 for depthToSpace, but was: ${t}`)),o.assert(l*t>=0,(()=>`Negative dimension size caused by overflow when multiplying\n ${l} and ${t} for depthToSpace with input shape\n ${s.shape}`)),o.assert(u*t>=0,(()=>`Negative dimension size caused by overflow when multiplying\n ${u} and ${t} for depthToSpace with input shape\n ${s.shape}`)),o.assert(c%(t*t)===0,(()=>`Dimension size must be evenly divisible by ${t*t} but is ${c} for depthToSpace with input shape ${s.shape}`));const d={x:s},h={blockSize:t,dataFormat:n};return r.ENGINE.runKernel(a.DepthToSpace,d,h)}})},78819:(e,t,n)=>{"use strict";n.r(t),n.d(t,{depthwiseConv2d:()=>c});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(48938),l=n(8844),u=n(9175);const c=(0,l.op)({depthwiseConv2d_:function(e,t,n,l,c="NHWC",d=[1,1],h){const f=(0,i.convertToTensor)(e,"x","depthwiseConv2d","float32"),p=(0,i.convertToTensor)(t,"filter","depthwiseConv2d","float32");let m=f,g=!1;3===f.rank&&(g=!0,m=(0,u.reshape)(f,[1,f.shape[0],f.shape[1],f.shape[2]])),o.assert(4===m.rank,(()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${m.rank}.`)),o.assert(4===p.rank,(()=>`Error in depthwiseConv2d: filter must be rank 4, but got rank ${p.rank}.`));const y="NHWC"===c?m.shape[3]:m.shape[1];o.assert(y===p.shape[2],(()=>`Error in depthwiseConv2d: number of input channels (${y}) must match the inChannels dimension in filter ${p.shape[2]}.`)),s.checkPadOnDimRoundingMode("depthwiseConv2d",l,h);const _={x:m,filter:p},b={strides:n,pad:l,dataFormat:c,dilations:d,dimRoundingMode:h},v=r.ENGINE.runKernel(a.DepthwiseConv2dNative,_,b);return g?(0,u.reshape)(v,[v.shape[1],v.shape[2],v.shape[3]]):v}})},70703:(e,t,n)=>{"use strict";n.r(t),n.d(t,{depthwiseConv2dNativeBackpropFilter:()=>s});var r=n(55279),a=n(55626),i=n(8844),o=n(9175);const s=(0,i.op)({depthwiseConv2dNativeBackpropFilter_:function(e,t,n,i,s,l=[1,1],u){let c=e;3===e.rank&&(c=(0,o.reshape)(e,[1,e.shape[0],e.shape[1],e.shape[2]]));let d=t;3===d.rank&&(d=(0,o.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2]]));const h={x:c,dy:d},f={strides:i,pad:s,dimRoundingMode:u,dilations:l,filterShape:n};return r.ENGINE.runKernel(a.DepthwiseConv2dNativeBackpropFilter,h,f)}})},97309:(e,t,n)=>{"use strict";n.r(t),n.d(t,{depthwiseConv2dNativeBackpropInput:()=>s});var r=n(55279),a=n(55626),i=n(8844),o=n(9175);const s=(0,i.op)({depthwiseConv2dNativeBackpropInput_:function(e,t,n,i,s,l=[1,1],u){let c=t,d=!1;3===t.rank&&(d=!0,c=(0,o.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2]]));const h={dy:c,filter:n},f={strides:i,pad:s,dimRoundingMode:u,dilations:l,inputShape:e},p=r.ENGINE.runKernel(a.DepthwiseConv2dNativeBackpropInput,h,f);return d?(0,o.reshape)(p,[p.shape[1],p.shape[2],p.shape[3]]):p}})},29093:(e,t,n)=>{"use strict";n.r(t),n.d(t,{dilation2d:()=>u});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(8844),l=n(9175);const u=(0,s.op)({dilation2d_:function(e,t,n,s,u=[1,1],c="NHWC"){const d=(0,i.convertToTensor)(e,"x","dilation2d"),h=(0,i.convertToTensor)(t,"filter","dilation2d");o.assert(3===d.rank||4===d.rank,(()=>`Error in dilation2d: input must be rank 3 or 4, but got rank ${d.rank}.`)),o.assert(3===h.rank,(()=>`Error in dilation2d: filter must be rank 3, but got rank ${h.rank}.`)),o.assert("NHWC"===c,(()=>`Error in dilation2d: Only NHWC is currently supported, but got dataFormat of ${c}`));let f=d,p=!1;3===d.rank&&(f=(0,l.reshape)(d,[1,d.shape[0],d.shape[1],d.shape[2]]),p=!0),o.assert(f.shape[3]===h.shape[2],(()=>`Error in dilation2d: input and filter must have the same depth: ${f.shape[3]} vs ${h.shape[2]}`));const m={x:f,filter:h},g={strides:n,pad:s,dilations:u},y=r.ENGINE.runKernel(a.Dilation2D,m,g);return p?(0,l.reshape)(y,[y.shape[1],y.shape[2],y.shape[3]]):y}})},24150:(e,t,n)=>{"use strict";n.r(t),n.d(t,{div:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(73476);const l=(0,n(8844).op)({div_:function(e,t){let n=(0,o.convertToTensor)(e,"a","div"),l=(0,o.convertToTensor)(t,"b","div");if([n,l]=(0,i.makeTypesMatch)(n,l),"int32"===n.dtype&&"int32"===l.dtype)return(0,s.floorDiv)(n,l);const u={a:n,b:l};return r.ENGINE.runKernel(a.RealDiv,u,{})}})},92660:(e,t,n)=>{"use strict";n.r(t),n.d(t,{divNoNan:()=>c});var r=n(81324),a=n(41564),i=n(24150),o=n(70457),s=n(8844),l=n(1450),u=n(84130);const c=(0,s.op)({divNoNan_:function(e,t){let n=(0,a.convertToTensor)(e,"a","div"),s=(0,a.convertToTensor)(t,"b","div");[n,s]=(0,r.makeTypesMatch)(n,s);const c=(0,i.div)(n,s),d=(0,u.zerosLike)(c),h=(0,o.equal)(s,d);return(0,l.where)(h,d,c)}})},10138:(e,t,n)=>{"use strict";n.r(t),n.d(t,{dot:()=>l});var r=n(41564),a=n(42890),i=n(1666),o=n(8844),s=n(9175);const l=(0,o.op)({dot_:function(e,t){const n=(0,r.convertToTensor)(e,"t1","dot"),o=(0,r.convertToTensor)(t,"t2","dot");a.assert((1===n.rank||2===n.rank)&&(1===o.rank||2===o.rank),(()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ${n.rank} and ${o.rank}.`));const l=1===n.rank?n.size:n.shape[1],u=1===o.rank?o.size:o.shape[0];if(a.assert(l===u,(()=>`Error in dot: inner dimensions of inputs must match, but got ${l} and ${u}.`)),1===n.rank&&1===o.rank){const e=(0,s.reshape)(n,[1,-1]),t=(0,s.reshape)(o,[-1,1]),r=(0,i.matMul)(e,t);return(0,s.reshape)(r,[])}if(1===n.rank&&2===o.rank){const e=(0,s.reshape)(n,[1,-1]),t=(0,s.reshape)(o,[o.shape[0],o.shape[1]]),r=(0,i.matMul)(e,t);return(0,s.reshape)(r,[r.size])}if(2===n.rank&&1===o.rank){const e=(0,s.reshape)(o,[-1,1]),t=(0,i.matMul)(n,e);return(0,s.reshape)(t,[t.size])}{const e=(0,s.reshape)(o,[o.shape[0],o.shape[1]]);return(0,i.matMul)(n,e)}}})},54373:(e,t,n)=>{"use strict";n.r(t),n.d(t,{elu:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({elu_:function(e){const t={x:(0,i.convertToTensor)(e,"x","elu","float32")};return r.ENGINE.runKernel(a.Elu,t)}})},70457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{equal:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({equal_:function(e,t){let n=(0,o.convertToTensor)(e,"a","equal","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","equal","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.Equal,u)}})},32514:(e,t,n)=>{"use strict";n.r(t),n.d(t,{erf:()=>l});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(27322);const l=(0,n(8844).op)({erf_:function(e){let t=(0,i.convertToTensor)(e,"x","erf");o.assert("int32"===t.dtype||"float32"===t.dtype,(()=>"Input dtype must be `int32` or `float32`.")),"int32"===t.dtype&&(t=(0,s.cast)(t,"float32"));const n={x:t};return r.ENGINE.runKernel(a.Erf,n)}})},78418:(e,t,n)=>{"use strict";n.r(t),n.d(t,{euclideanNorm:()=>a});var r=n(37523);const a=(0,n(8844).op)({euclideanNorm_:function(e,t=null,n=!1){return(0,r.norm)(e,"euclidean",t,n)}})},74174:(e,t,n)=>{"use strict";n.r(t),n.d(t,{exp:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({exp_:function(e){const t={x:(0,i.convertToTensor)(e,"x","exp")};return r.ENGINE.runKernel(a.Exp,t)}})},75375:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expandDims:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({expandDims_:function(e,t=0){const n=(0,i.convertToTensor)(e,"x","expandDims","string_or_numeric");o.assert(t<=n.rank,(()=>"Axis must be <= rank of the tensor"));const s={input:n},l={dim:t};return r.ENGINE.runKernel(a.ExpandDims,s,l)}})},46624:(e,t,n)=>{"use strict";n.r(t),n.d(t,{expm1:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({expm1_:function(e){const t={x:(0,i.convertToTensor)(e,"x","expm1")};return r.ENGINE.runKernel(a.Expm1,t)}})},52812:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fill:()=>o});var r=n(55279),a=n(55626),i=n(42890);function o(e,t,n){(0,i.assertNonNegativeIntegerDimensions)(e);const o={shape:e,value:t,dtype:n=n||(0,i.inferDtype)(t)};return r.ENGINE.runKernel(a.Fill,{},o)}},13747:(e,t,n)=>{"use strict";n.r(t),n.d(t,{floor:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({floor_:function(e){const t={x:(0,i.convertToTensor)(e,"x","floor","float32")};return r.ENGINE.runKernel(a.Floor,t)}})},73476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{floorDiv:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({floorDiv_:function(e,t){let n=(0,o.convertToTensor)(e,"a","floorDiv"),s=(0,o.convertToTensor)(t,"b","floorDiv");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.FloorDiv,l)}})},81161:(e,t,n)=>{"use strict";n.r(t),n.d(t,{applyActivation:()=>g,getFusedBiasGradient:()=>m,getFusedDyActivation:()=>p,shouldFuse:()=>y});var r=n(57229),a=n(54373),i=n(75124),o=n(46939),s=n(84247),l=n(69243),u=n(72561),c=n(9175),d=n(72509),h=n(84295),f=n(73630);function p(e,t,n){if(null==n||"linear"===n)return e;if("relu"===n)return(0,o.mul)(e,(0,h.step)(t));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function m(e,t){let n=t;const a=r.getReductionAxes(e.shape,t.shape);return a.length>0&&(n=(0,f.sum)(n,a)),(0,c.reshape)(n,e.shape)}function g(e,t,n,r){if("linear"===t)return e;if("relu"===t)return(0,l.relu)(e);if("elu"===t)return(0,a.elu)(e);if("relu6"===t)return(0,u.relu6)(e);if("prelu"===t)return(0,s.prelu)(e,n);if("leakyrelu"===t)return(0,i.leakyRelu)(e,r);if("sigmoid"===t)return(0,d.sigmoid)(e);throw new Error(`Unknown fused activation ${t}.`)}const y=(e,t)=>!(e>0)||"linear"===t},34602:(e,t,n)=>{"use strict";n.r(t),n.d(t,{gather:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({gather_:function(e,t,n=0,o=0){const s={x:(0,i.convertToTensor)(e,"x","gather"),indices:(0,i.convertToTensor)(t,"indices","gather","int32")},l={axis:n,batchDims:o};return r.ENGINE.runKernel(a.GatherV2,s,l)}})},6175:(e,t,n)=>{"use strict";n.r(t),n.d(t,{greater:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({greater_:function(e,t){let n=(0,o.convertToTensor)(e,"a","greater","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","greater","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.Greater,u)}})},69316:(e,t,n)=>{"use strict";n.r(t),n.d(t,{greaterEqual:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({greaterEqual_:function(e,t){let n=(0,o.convertToTensor)(e,"a","greaterEqual","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","greaterEqual","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.GreaterEqual,u)}})},8639:(e,t,n)=>{"use strict";n.r(t),n.d(t,{imag:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({imag_:function(e){const t={input:(0,i.convertToTensor)(e,"input","imag")};return r.ENGINE.runKernel(a.Imag,t)}})},7294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resizeBilinear:()=>u});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(8844),l=n(9175);const u=(0,s.op)({resizeBilinear_:function(e,t,n=!1,s=!1){const u=(0,i.convertToTensor)(e,"images","resizeBilinear");o.assert(3===u.rank||4===u.rank,(()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${u.rank}.`)),o.assert(2===t.length,(()=>`Error in resizeBilinear: new shape must 2D, but got shape ${t}.`)),o.assert(!1===s||!1===n,(()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false."));let c=u,d=!1;3===u.rank&&(d=!0,c=(0,l.reshape)(u,[1,u.shape[0],u.shape[1],u.shape[2]]));const[]=t,h={images:c},f={alignCorners:n,halfPixelCenters:s,size:t},p=r.ENGINE.runKernel(a.ResizeBilinear,h,f);return d?(0,l.reshape)(p,[p.shape[1],p.shape[2],p.shape[3]]):p}})},91439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{resizeNearestNeighbor:()=>u});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(8844),l=n(9175);const u=(0,s.op)({resizeNearestNeighbor_:function(e,t,n=!1,s=!1){const u=(0,i.convertToTensor)(e,"images","resizeNearestNeighbor");o.assert(3===u.rank||4===u.rank,(()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${u.rank}.`)),o.assert(2===t.length,(()=>`Error in resizeNearestNeighbor: new shape must 2D, but got shape ${t}.`)),o.assert("float32"===u.dtype||"int32"===u.dtype,(()=>"`images` must have `int32` or `float32` as dtype")),o.assert(!1===s||!1===n,(()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false."));let c=u,d=!1;3===u.rank&&(d=!0,c=(0,l.reshape)(u,[1,u.shape[0],u.shape[1],u.shape[2]]));const[]=t,h={images:c},f={alignCorners:n,halfPixelCenters:s,size:t},p=r.ENGINE.runKernel(a.ResizeNearestNeighbor,h,f);return d?(0,l.reshape)(p,[p.shape[1],p.shape[2],p.shape[3]]):p}})},22699:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isFinite:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({isFinite_:function(e){const t={x:(0,i.convertToTensor)(e,"x","isFinite")};return r.ENGINE.runKernel(a.IsFinite,t)}})},49133:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isInf:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({isInf_:function(e){const t={x:(0,i.convertToTensor)(e,"x","isInf")};return r.ENGINE.runKernel(a.IsInf,t)}})},36707:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isNaN:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({isNaN_:function(e){const t={x:(0,i.convertToTensor)(e,"x","isNaN")};return r.ENGINE.runKernel(a.IsNan,t)}})},75124:(e,t,n)=>{"use strict";n.r(t),n.d(t,{leakyRelu:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({leakyRelu_:function(e,t=.2){const n={x:(0,i.convertToTensor)(e,"x","leakyRelu")},o={alpha:t};return r.ENGINE.runKernel(a.LeakyRelu,n,o)}})},65288:(e,t,n)=>{"use strict";n.r(t),n.d(t,{less:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({less_:function(e,t){let n=(0,o.convertToTensor)(e,"a","less","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","less","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.Less,u)}})},12371:(e,t,n)=>{"use strict";n.r(t),n.d(t,{lessEqual:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({lessEqual_:function(e,t){let n=(0,o.convertToTensor)(e,"a","lessEqual","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","lessEqual","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.LessEqual,u)}})},60608:(e,t,n)=>{"use strict";n.r(t),n.d(t,{localResponseNormalization:()=>u});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(8844),l=n(9175);const u=(0,s.op)({localResponseNormalization_:function(e,t=5,n=1,s=1,u=.5){const c=(0,i.convertToTensor)(e,"x","localResponseNormalization");o.assert(4===c.rank||3===c.rank,(()=>`Error in localResponseNormalization: x must be rank 3 or 4 but got\n rank ${c.rank}.`)),o.assert(o.isInt(t),(()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`));let d=c,h=!1;3===c.rank&&(h=!0,d=(0,l.reshape)(c,[1,c.shape[0],c.shape[1],c.shape[2]]));const f={x:d},p={depthRadius:t,bias:n,alpha:s,beta:u},m=r.ENGINE.runKernel(a.LRN,f,p);return h?(0,l.reshape)(m,[m.shape[1],m.shape[2],m.shape[3]]):m}})},68063:(e,t,n)=>{"use strict";n.r(t),n.d(t,{log:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({log_:function(e){const t={x:(0,i.convertToTensor)(e,"x","log","float32")};return r.ENGINE.runKernel(a.Log,t)}})},1730:(e,t,n)=>{"use strict";n.r(t),n.d(t,{log1p:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({log1p_:function(e){const t={x:(0,i.convertToTensor)(e,"x","log1p")};return r.ENGINE.runKernel(a.Log1p,t)}})},66240:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logSigmoid:()=>c});var r=n(48775),a=n(41564),i=n(46939),o=n(58235),s=n(8844),l=n(72509),u=n(89725);const c=(0,s.op)({logSigmoid_:function(e){const t=(0,a.convertToTensor)(e,"x","logSigmoid");return(0,r.customGrad)((e=>({value:(0,o.neg)((0,u.softplus)((0,o.neg)(e))),gradFunc:t=>(0,i.mul)(t,(0,l.sigmoid)((0,o.neg)(e)))})))(t)}})},43826:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logSoftmax:()=>f});var r=n(48775),a=n(41564),i=n(27322),o=n(74174),s=n(68063),l=n(15379),u=n(46939),c=n(8844),d=n(70839),h=n(73630);const f=(0,c.op)({logSoftmax_:function(e,t=-1){const n=(0,a.convertToTensor)(e,"logits","logSoftmax");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error(`Log Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and axis was ${t}`);return(0,r.customGrad)(((e,n)=>{const r=(0,l.max)(e,t,!0),a=(0,d.sub)(e,r),c=(0,d.sub)((0,i.cast)(a,"float32"),(0,s.log)((0,h.sum)((0,o.exp)(a),t,!0)));n([c]);return{value:c,gradFunc:(e,n)=>{const[r]=n,a=(0,o.exp)(r);return(0,d.sub)(e,(0,u.mul)((0,h.sum)(e,t,!0),a))}}}))(n)}})},69815:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logSumExp:()=>p});var r=n(41564),a=n(42890),i=n(29666),o=n(24651),s=n(74174),l=n(68063),u=n(15379),c=n(8844),d=n(9175),h=n(70839),f=n(73630);const p=(0,c.op)({logSumExp_:function(e,t=null,n=!1){const c=(0,r.convertToTensor)(e,"x","logSumExp"),p=(0,a.parseAxisParam)(t,c.shape),m=(0,u.max)(c,p,!0),g=(0,h.sub)(c,m),y=(0,s.exp)(g),_=(0,f.sum)(y,p),b=(0,l.log)(_),v=(0,i.add)((0,d.reshape)(m,b.shape),b);if(n){const e=(0,o.expandShapeToKeepDim)(v.shape,p);return(0,d.reshape)(v,e)}return v}})},78900:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logicalAnd:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(57229);const s=(0,n(8844).op)({logicalAnd_:function(e,t){const n=(0,i.convertToTensor)(e,"a","logicalAnd","bool"),s=(0,i.convertToTensor)(t,"b","logicalAnd","bool");(0,o.assertAndGetBroadcastShape)(n.shape,s.shape);const l={a:n,b:s};return r.ENGINE.runKernel(a.LogicalAnd,l)}})},84248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logicalNot:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({logicalNot_:function(e){const t={x:(0,i.convertToTensor)(e,"x","logicalNot","bool")};return r.ENGINE.runKernel(a.LogicalNot,t)}})},1048:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logicalOr:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(57229);const s=(0,n(8844).op)({logicalOr_:function(e,t){const n=(0,i.convertToTensor)(e,"a","logicalOr","bool"),s=(0,i.convertToTensor)(t,"b","logicalOr","bool");(0,o.assertAndGetBroadcastShape)(n.shape,s.shape);const l={a:n,b:s};return r.ENGINE.runKernel(a.LogicalOr,l)}})},7940:(e,t,n)=>{"use strict";n.r(t),n.d(t,{logicalXor:()=>l});var r=n(41564),a=n(57229),i=n(78900),o=n(84248),s=n(1048);const l=(0,n(8844).op)({logicalXor_:function(e,t){const n=(0,r.convertToTensor)(e,"a","logicalXor","bool"),l=(0,r.convertToTensor)(t,"b","logicalXor","bool");return(0,a.assertAndGetBroadcastShape)(n.shape,l.shape),(0,i.logicalAnd)((0,s.logicalOr)(e,t),(0,o.logicalNot)((0,i.logicalAnd)(e,t)))}})},59227:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{Reduction:()=>r}),function(e){e[e.NONE=0]="NONE",e[e.MEAN=1]="MEAN",e[e.SUM=2]="SUM",e[e.SUM_BY_NONZERO_WEIGHTS=3]="SUM_BY_NONZERO_WEIGHTS"}(r||(r={}))},1666:(e,t,n)=>{"use strict";n.r(t),n.d(t,{matMul:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({matMul_:function(e,t,n=!1,s=!1){let l=(0,o.convertToTensor)(e,"a","matMul"),u=(0,o.convertToTensor)(t,"b","matMul");[l,u]=(0,i.makeTypesMatch)(l,u);const c={a:l,b:u},d={transposeA:n,transposeB:s};return r.ENGINE.runKernel(a.BatchMatMul,c,d)}})},15379:(e,t,n)=>{"use strict";n.r(t),n.d(t,{max:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({max_:function(e,t=null,n=!1){const o={x:(0,i.convertToTensor)(e,"x","max")},s={reductionIndices:t,keepDims:n};return r.ENGINE.runKernel(a.Max,o,s)}})},61476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{maxPool:()=>c});var r=n(55279),a=n(55626),i=n(41564),o=n(42890),s=n(48938),l=n(8844),u=n(9175);const c=(0,l.op)({maxPool_:function(e,t,n,l,c){const d=(0,i.convertToTensor)(e,"x","maxPool");let h=d,f=!1;3===d.rank&&(f=!0,h=(0,u.reshape)(d,[1,d.shape[0],d.shape[1],d.shape[2]])),o.assert(4===h.rank,(()=>`Error in maxPool: input must be rank 4 but got rank ${h.rank}.`)),o.assert(s.eitherStridesOrDilationsAreOne(n,1),(()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`)),s.checkPadOnDimRoundingMode("maxPool",l,c);const p={x:h},m={filterSize:t,strides:n,pad:l,dimRoundingMode:c},g=r.ENGINE.runKernel(a.MaxPool,p,m);return f?(0,u.reshape)(g,[g.shape[1],g.shape[2],g.shape[3]]):g}})},83227:(e,t,n)=>{"use strict";n.r(t),n.d(t,{maximum:()=>u});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229),l=n(27322);const u=(0,n(8844).op)({maximum_:function(e,t){let n=(0,o.convertToTensor)(e,"a","maximum"),u=(0,o.convertToTensor)(t,"b","maximum");[n,u]=(0,i.makeTypesMatch)(n,u),"bool"===n.dtype&&(n=(0,l.cast)(n,"int32"),u=(0,l.cast)(u,"int32")),(0,s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.ENGINE.runKernel(a.Maximum,c)}})},54572:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mean:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({mean_:function(e,t=null,n=!1){const o={x:(0,i.convertToTensor)(e,"x","mean")},s={axis:t,keepDims:n};return r.ENGINE.runKernel(a.Mean,o,s)}})},75969:(e,t,n)=>{"use strict";n.r(t),n.d(t,{min:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({min_:function(e,t=null,n=!1){const o={x:(0,i.convertToTensor)(e,"x","min")},s={axis:t,keepDims:n};return r.ENGINE.runKernel(a.Min,o,s)}})},16505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{minimum:()=>u});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229),l=n(27322);const u=(0,n(8844).op)({minimum_:function(e,t){let n=(0,o.convertToTensor)(e,"a","minimum"),u=(0,o.convertToTensor)(t,"b","minimum");[n,u]=(0,i.makeTypesMatch)(n,u),"bool"===n.dtype&&(n=(0,l.cast)(n,"int32"),u=(0,l.cast)(u,"int32")),(0,s.assertAndGetBroadcastShape)(n.shape,u.shape);const c={a:n,b:u};return r.ENGINE.runKernel(a.Minimum,c)}})},13060:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mirrorPad:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({mirrorPad_:function(e,t,n){o.assert("reflect"===n||"symmetric"===n,(()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`));const s=(0,i.convertToTensor)(e,"x","mirrorPad");if(0===s.rank)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");o.assert(t.length===s.rank,(()=>`Padding doesn't match input. Must be ${s.rank}. Got ${t.length}.`));const l="reflect"===n?1:0;for(let r=0;r"Invalid number of paddings. Must be length of 2 each.")),o.assert(t[r][0]>=0&&t[r][0]<=s.shape[r]-l&&t[r][1]>=0&&t[r][1]<=s.shape[r]-l,(()=>`Padding in dimension ${r} cannot be greater than or equal to ${s.shape[r]-l} or less than 0 for input of shape ${s.shape}`));const u={paddings:t,mode:n},c={x:s};return r.ENGINE.runKernel(a.MirrorPad,c,u)}})},2825:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mod:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({mod_:function(e,t){let n=(0,o.convertToTensor)(e,"a","mod"),s=(0,o.convertToTensor)(t,"b","mod");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Mod,l)}})},46939:(e,t,n)=>{"use strict";n.r(t),n.d(t,{mul:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({mul_:function(e,t){let n=(0,o.convertToTensor)(e,"a","mul"),s=(0,o.convertToTensor)(t,"b","mul");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Multiply,l)}})},58235:(e,t,n)=>{"use strict";n.r(t),n.d(t,{neg:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({neg_:function(e){const t={x:(0,i.convertToTensor)(e,"x","neg")};return r.ENGINE.runKernel(a.Neg,t)}})},37523:(e,t,n)=>{"use strict";n.r(t),n.d(t,{norm:()=>y});var r=n(41564),a=n(42890),i=n(31473),o=n(24651),s=n(15379),l=n(75969),u=n(8844),c=n(54619),d=n(9175),h=n(71285),f=n(96375),p=n(58402),m=n(73630);function g(e,t,n=null){if(0===e.rank)return(0,i.abs)(e);if(1!==e.rank&&null===n)return g((0,d.reshape)(e,[-1]),t,n);if(1===e.rank||"number"===typeof n||Array.isArray(n)&&1===n.length){if(1===t)return(0,m.sum)((0,i.abs)(e),n);if(t===1/0)return(0,s.max)((0,i.abs)(e),n);if(t===-1/0)return(0,l.min)((0,i.abs)(e),n);if("euclidean"===t||2===t)return(0,f.sqrt)((0,m.sum)((0,c.pow)((0,i.abs)(e),(0,h.scalar)(2,"int32")),n));throw new Error(`Error in norm: invalid ord value: ${t}`)}if(Array.isArray(n)&&2===n.length){if(1===t)return(0,s.max)((0,m.sum)((0,i.abs)(e),n[0]),n[1]-1);if(t===1/0)return(0,s.max)((0,m.sum)((0,i.abs)(e),n[1]),n[0]);if(t===-1/0)return(0,l.min)((0,m.sum)((0,i.abs)(e),n[1]),n[0]);if("fro"===t||"euclidean"===t)return(0,f.sqrt)((0,m.sum)((0,p.square)(e),n));throw new Error(`Error in norm: invalid ord value: ${t}`)}throw new Error(`Error in norm: invalid axis: ${n}`)}const y=(0,u.op)({norm_:function(e,t="euclidean",n=null,i=!1){const s=g(e=(0,r.convertToTensor)(e,"x","norm"),t,n);let l=s.shape;if(i){const t=(0,a.parseAxisParam)(n,e.shape);l=o.expandShapeToKeepDim(s.shape,t)}return(0,d.reshape)(s,l)}})},24495:(e,t,n)=>{"use strict";n.r(t),n.d(t,{notEqual:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({notEqual_:function(e,t){let n=(0,o.convertToTensor)(e,"a","notEqual","string_or_numeric"),l=(0,o.convertToTensor)(t,"b","notEqual","string_or_numeric");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.NotEqual,u)}})},24985:(e,t,n)=>{"use strict";n.r(t),n.d(t,{oneHot:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({oneHot_:function(e,t,n=1,o=0,s="int32"){if(t<2)throw new Error(`Error in oneHot: depth must be >=2, but it is ${t}`);const l={indices:(0,i.convertToTensor)(e,"indices","oneHot","int32")},u={dtype:s,depth:t,onValue:n,offValue:o};return r.ENGINE.runKernel(a.OneHot,l,u)}})},87760:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ones:()=>s});var r=n(55279),a=n(42890),i=n(97629),o=n(29186);function s(e,t="float32"){if((0,a.assertNonNegativeIntegerDimensions)(e),"complex64"===t){const t=s(e,"float32"),n=(0,o.zeros)(e,"float32");return(0,i.complex)(t,n)}const n=(0,a.makeOnesTypedArray)((0,a.sizeFromShape)(e),t);return r.ENGINE.makeTensor(n,e,t)}},33948:(e,t,n)=>{"use strict";n.r(t),n.d(t,{onesLike:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({onesLike_:function(e){const t={x:(0,i.convertToTensor)(e,"x","onesLike")};return r.ENGINE.runKernel(a.OnesLike,t)}})},8844:(e,t,n)=>{"use strict";n.r(t),n.d(t,{OP_SCOPE_SUFFIX:()=>i,op:()=>o});var r=n(55279),a=n(42890);const i="__op";function o(e){const t=Object.keys(e);if(1!==t.length)throw new Error(`Please provide an object with a single key (operation name) mapping to a function. Got an object with ${t.length} keys.`);let n=t[0];const o=e[n];n.endsWith("_")&&(n=n.substring(0,n.length-1)),n+=i;const s=(...e)=>{r.ENGINE.startScope(n);try{const t=o(...e);return(0,a.isPromise)(t)&&console.error("Cannot return a Promise inside of tidy."),r.ENGINE.endScope(t),t}catch(t){throw r.ENGINE.endScope(null),t}};return Object.defineProperty(s,"name",{value:n,configurable:!0}),s}},30731:(e,t,n)=>{"use strict";n.r(t),n.d(t,{OP_SCOPE_SUFFIX:()=>h.OP_SCOPE_SUFFIX,abs:()=>a.abs,acos:()=>i.acos,acosh:()=>o.acosh,add:()=>s.add,addN:()=>f,all:()=>p.all,any:()=>m.any,argMax:()=>g.argMax,argMin:()=>y.argMin,asin:()=>_.asin,asinh:()=>b.asinh,atan:()=>v.atan,atan2:()=>w.atan2,atanh:()=>F.atanh,avgPool:()=>k.avgPool,avgPool3d:()=>E,basicLSTMCell:()=>M,batchNorm:()=>L.batchNorm,batchNorm2d:()=>N,batchNorm3d:()=>B,batchNorm4d:()=>j,batchToSpaceND:()=>R.batchToSpaceND,bincount:()=>V,bitwiseAnd:()=>z,booleanMaskAsync:()=>nr,broadcastArgs:()=>H,broadcastTo:()=>U.broadcastTo,buffer:()=>W.buffer,cast:()=>x.cast,ceil:()=>q.ceil,clipByValue:()=>$.clipByValue,clone:()=>Y.clone,complex:()=>G.complex,concat:()=>C.concat,concat1d:()=>X,concat2d:()=>K,concat3d:()=>J,concat4d:()=>Z,conv1d:()=>Q.conv1d,conv2d:()=>ee.conv2d,conv2dTranspose:()=>te.conv2dTranspose,conv3d:()=>ne,conv3dTranspose:()=>ae,cos:()=>ie.cos,cosh:()=>oe.cosh,cosineWindow:()=>hr,cumprod:()=>se.cumprod,cumsum:()=>le.cumsum,denseBincount:()=>ue,depthToSpace:()=>ce.depthToSpace,depthwiseConv2d:()=>de.depthwiseConv2d,diag:()=>he,dilation2d:()=>fe.dilation2d,div:()=>pe.div,divNoNan:()=>me.divNoNan,dot:()=>ge.dot,dropout:()=>cr,einsum:()=>ye,elu:()=>_e.elu,enclosingPowerOfTwo:()=>dr,ensureShape:()=>be,equal:()=>ve.equal,erf:()=>we.erf,euclideanNorm:()=>Fe.euclideanNorm,exp:()=>ke.exp,expandDims:()=>xe.expandDims,expm1:()=>Ae.expm1,eye:()=>Ee,fft:()=>wn.fft,fill:()=>Ce.fill,floor:()=>Te.floor,floorDiv:()=>De.floorDiv,fused:()=>r,gather:()=>Ie.gather,gatherND:()=>ur,greater:()=>Oe.greater,greaterEqual:()=>Pe.greaterEqual,ifft:()=>Fn.ifft,imag:()=>Me.imag,image:()=>ga,inTopKAsync:()=>fr,irfft:()=>kn.irfft,isFinite:()=>Re.isFinite,isInf:()=>Le.isInf,isNaN:()=>Ne.isNaN,leakyRelu:()=>Be.leakyRelu,less:()=>je.less,lessEqual:()=>Ve.lessEqual,linalg:()=>ya,linspace:()=>ze,localResponseNormalization:()=>He.localResponseNormalization,log:()=>Ue.log,log1p:()=>We.log1p,logSigmoid:()=>qe.logSigmoid,logSoftmax:()=>$e.logSoftmax,logSumExp:()=>Ye.logSumExp,logicalAnd:()=>Ge.logicalAnd,logicalNot:()=>Xe.logicalNot,logicalOr:()=>Ke.logicalOr,logicalXor:()=>Je.logicalXor,losses:()=>_a,lowerBound:()=>et,matMul:()=>T.matMul,max:()=>tt.max,maxPool:()=>nt.maxPool,maxPool3d:()=>rt,maxPoolWithArgmax:()=>at,maximum:()=>it.maximum,mean:()=>ot.mean,meshgrid:()=>ut,min:()=>ct.min,minimum:()=>dt.minimum,mirrorPad:()=>ht.mirrorPad,mod:()=>ft.mod,moments:()=>yt,movingAverage:()=>or,mul:()=>D.mul,multiRNNCell:()=>_t,multinomial:()=>bt,neg:()=>vt.neg,norm:()=>ar.norm,notEqual:()=>wt.notEqual,oneHot:()=>Ft.oneHot,ones:()=>st.ones,onesLike:()=>kt.onesLike,op:()=>h.op,outerProduct:()=>xt,pad:()=>At.pad,pad1d:()=>St,pad2d:()=>Et,pad3d:()=>Ct,pad4d:()=>Tt,pool:()=>Dt.pool,pow:()=>It.pow,prelu:()=>Ot.prelu,print:()=>Pt.print,prod:()=>Mt.prod,raggedGather:()=>Rt,raggedRange:()=>Lt,raggedTensorToTensor:()=>Nt,rand:()=>Bt,randomGamma:()=>Ut,randomNormal:()=>Wt,randomStandardNormal:()=>qt,randomUniform:()=>$t,randomUniformInt:()=>Yt,range:()=>Gt,real:()=>Xt.real,reciprocal:()=>Kt.reciprocal,relu:()=>Jt.relu,relu6:()=>Zt.relu6,reshape:()=>S.reshape,reverse:()=>Qt.reverse,reverse1d:()=>en,reverse2d:()=>tn,reverse3d:()=>nn,reverse4d:()=>rn,rfft:()=>xn.rfft,round:()=>an.round,rsqrt:()=>on.rsqrt,scalar:()=>sn.scalar,scatterND:()=>sr,searchSorted:()=>Qe,selu:()=>ln.selu,separableConv2d:()=>un.separableConv2d,setdiff1dAsync:()=>cn,sigmoid:()=>I.sigmoid,sign:()=>dn.sign,signal:()=>ma,sin:()=>hn.sin,sinh:()=>fn.sinh,slice:()=>O.slice,slice1d:()=>pn,slice2d:()=>mn,slice3d:()=>gn,slice4d:()=>yn,softmax:()=>_n.softmax,softplus:()=>bn.softplus,spaceToBatchND:()=>vn.spaceToBatchND,sparse:()=>ba,sparseToDense:()=>lr,spectral:()=>pa,split:()=>An.split,sqrt:()=>Sn.sqrt,square:()=>mt.square,squaredDifference:()=>En.squaredDifference,squeeze:()=>Cn.squeeze,stack:()=>Tn.stack,step:()=>Dn.step,stridedSlice:()=>In.stridedSlice,string:()=>va,sub:()=>gt.sub,sum:()=>On.sum,tan:()=>Pn.tan,tanh:()=>P.tanh,tensor:()=>Mn.tensor,tensor1d:()=>Ln,tensor2d:()=>Nn,tensor3d:()=>Bn.tensor3d,tensor4d:()=>jn,tensor5d:()=>Vn,tensor6d:()=>zn,tensorScatterUpdate:()=>Un,tile:()=>Se.tile,topk:()=>Wn.topk,transpose:()=>rr.transpose,truncatedNormal:()=>qn,unique:()=>$n.unique,unsortedSegmentSum:()=>Yn.unsortedSegmentSum,unstack:()=>Gn.unstack,upperBound:()=>Xn,variable:()=>Kn,where:()=>Jn.where,whereAsync:()=>Qn,zeros:()=>er.zeros,zerosLike:()=>tr.zerosLike});var r={};n.r(r),n.d(r,{conv2d:()=>br,depthwiseConv2d:()=>Fr,matMul:()=>kr});var a=n(31473),i=n(67631),o=n(60623),s=n(29666),l=n(55279),u=n(55626),c=n(41564),d=n(42890),h=n(8844);const f=(0,h.op)({addN_:function(e){d.assert(Array.isArray(e),(()=>"The argument passed to tf.addN() must be a list of tensors")),d.assert(e.length>=1,(()=>`Must pass at least one tensor to tf.addN(), but got ${e.length}`));const t=e.map(((e,t)=>(0,c.convertToTensor)(e,`tensors${t}`,"addN"))),n=t[0];t.forEach((e=>{if(e.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")})),t.forEach((e=>{if(!d.arraysEqual(e.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")}));const r=t;return l.ENGINE.runKernel(u.AddN,r)}});var p=n(97010),m=n(48627),g=n(79236),y=n(90634),_=n(8666),b=n(66440),v=n(77843),w=n(43157),F=n(89227),k=n(55794),x=n(27322),A=n(48938),S=n(9175);const E=(0,h.op)({avgPool3d_:function(e,t,n,r,a,i="NDHWC"){const o=(0,c.convertToTensor)(e,"x","avgPool3d","float32");let s=o,h=!1;4===o.rank&&(h=!0,s=(0,S.reshape)(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),d.assert(5===s.rank,(()=>`Error in avgPool3d: x must be rank 5 but got rank ${s.rank}.`)),d.assert("NDHWC"===i,(()=>`Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of ${i}`)),d.assert("number"===typeof n&&n>0||Array.isArray(n)&&n[0]>0&&n[1]>0&&n[2]>0,(()=>`Error in avgPool3d: Stride must be > 0, but got '${n}'`)),(0,A.checkPadOnDimRoundingMode)("avgPool3d",r,a);const f={x:s},p={filterSize:t,strides:n,pad:r,dimRoundingMode:a,dataFormat:i};let m=l.ENGINE.runKernel(u.AvgPool3D,f,p);return m=(0,x.cast)(m,s.dtype),h?(0,S.reshape)(m,[m.shape[1],m.shape[2],m.shape[3],m.shape[4]]):m}});var C=n(27493),T=n(1666),D=n(46939),I=n(72509),O=n(52439),P=n(7180);const M=(0,h.op)({basicLSTMCell_:function(e,t,n,r,a,i){const o=(0,c.convertToTensor)(e,"forgetBias","basicLSTMCell"),l=(0,c.convertToTensor)(t,"lstmKernel","basicLSTMCell"),u=(0,c.convertToTensor)(n,"lstmBias","basicLSTMCell"),d=(0,c.convertToTensor)(r,"data","basicLSTMCell"),h=(0,c.convertToTensor)(a,"c","basicLSTMCell"),f=(0,c.convertToTensor)(i,"h","basicLSTMCell"),p=(0,C.concat)([d,f],1),m=(0,T.matMul)(p,l),g=(0,s.add)(m,u),y=g.shape[0],_=g.shape[1]/4,b=[y,_],v=(0,O.slice)(g,[0,0],b),w=(0,O.slice)(g,[0,_],b),F=(0,O.slice)(g,[0,2*_],b),k=(0,O.slice)(g,[0,3*_],b),x=(0,s.add)((0,D.mul)((0,I.sigmoid)(v),(0,P.tanh)(w)),(0,D.mul)(h,(0,I.sigmoid)((0,s.add)(o,F))));return[x,(0,D.mul)((0,P.tanh)(x),(0,I.sigmoid)(k))]}});var R=n(89365),L=n(86715);const N=(0,h.op)({batchNorm2d_:function(e,t,n,r,a,i){const o=(0,c.convertToTensor)(e,"x","batchNorm"),s=(0,c.convertToTensor)(t,"mean","batchNorm"),l=(0,c.convertToTensor)(n,"variance","batchNorm");let u,h;return null!=a&&(u=(0,c.convertToTensor)(a,"scale","batchNorm")),null!=r&&(h=(0,c.convertToTensor)(r,"offset","batchNorm")),d.assert(2===o.rank,(()=>`Error in batchNorm2D: x must be rank 2 but got rank ${o.rank}.`)),d.assert(2===s.rank||1===s.rank,(()=>`Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${s.rank}.`)),d.assert(2===l.rank||1===l.rank,(()=>`Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${l.rank}.`)),null!=u&&d.assert(2===u.rank||1===u.rank,(()=>`Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${u.rank}.`)),null!=h&&d.assert(2===h.rank||1===h.rank,(()=>`Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${h.rank}.`)),(0,L.batchNorm)(o,s,l,h,u,i)}});const B=(0,h.op)({batchNorm3d_:function(e,t,n,r,a,i){const o=(0,c.convertToTensor)(e,"x","batchNorm"),s=(0,c.convertToTensor)(t,"mean","batchNorm"),l=(0,c.convertToTensor)(n,"variance","batchNorm");let u,h;return null!=a&&(u=(0,c.convertToTensor)(a,"scale","batchNorm")),null!=r&&(h=(0,c.convertToTensor)(r,"offset","batchNorm")),d.assert(3===o.rank,(()=>`Error in batchNorm3D: x must be rank 3 but got rank ${o.rank}.`)),d.assert(3===s.rank||1===s.rank,(()=>`Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${s.rank}.`)),d.assert(3===l.rank||1===l.rank,(()=>`Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${l.rank}.`)),null!=u&&d.assert(3===u.rank||1===u.rank,(()=>`Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${u.rank}.`)),null!=h&&d.assert(3===h.rank||1===h.rank,(()=>`Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${h.rank}.`)),(0,L.batchNorm)(o,s,l,h,u,i)}});const j=(0,h.op)({batchNorm4d_:function(e,t,n,r,a,i){const o=(0,c.convertToTensor)(e,"x","batchNorm"),s=(0,c.convertToTensor)(t,"mean","batchNorm"),l=(0,c.convertToTensor)(n,"variance","batchNorm");let u,h;return null!=a&&(u=(0,c.convertToTensor)(a,"scale","batchNorm")),null!=r&&(h=(0,c.convertToTensor)(r,"offset","batchNorm")),d.assert(4===o.rank,(()=>`Error in batchNorm4D: x must be rank 4 but got rank ${o.rank}.`)),d.assert(4===s.rank||1===s.rank,(()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${s.rank}.`)),d.assert(4===l.rank||1===l.rank,(()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${l.rank}.`)),null!=u&&d.assert(4===u.rank||1===u.rank,(()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${u.rank}.`)),null!=h&&d.assert(4===h.rank||1===h.rank,(()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${h.rank}.`)),(0,L.batchNorm)(o,s,l,h,u,i)}});const V=(0,h.op)({bincount_:function(e,t,n){const r=(0,c.convertToTensor)(e,"x","bincount"),a=(0,c.convertToTensor)(t,"weights","bincount");d.assert("int32"===r.dtype,(()=>`Error in bincount: input dtype must be int32, but got ${r.dtype}`)),d.assert(n>=0,(()=>`size must be non-negative, but got ${n}.`)),d.assert(a.size===r.size||0===a.size,(()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${r.shape}, weights shape: ${a.shape}.`));const i={x:r,weights:a},o={size:n};return l.ENGINE.runKernel(u.Bincount,i,o)}});const z=(0,h.op)({bitwiseAnd_:function(e,t){const n=(0,c.convertToTensor)(e,"x","bitwiseAnd"),r=(0,c.convertToTensor)(t,"y","bitwiseAnd");if(!(0,d.arraysEqual)(n.shape,r.shape))throw new Error(`BitwiseAnd: Tensors must have the same shape. x: ${n.shape}, y: ${r.shape}`);if("int32"!==n.dtype||"int32"!==r.dtype)throw new Error(`BitwiseAnd: Only supports 'int32' values in tensor, found type of x: ${n.dtype} and type of y: ${r.dtype}`);const a={a:n,b:r};return l.ENGINE.runKernel(u.BitwiseAnd,a)}});const H=(0,h.op)({broadcastArgs_:function(e,t){const n=(0,c.convertToTensor)(e,"s0","broadcastArgs","int32"),r=(0,c.convertToTensor)(t,"s1","broadcastArgs","int32");if(1!==n.rank)throw new Error(`broadcastArgs(): first input must be a vector (rank=1). Has rank ${n.rank}`);if(1!==r.rank)throw new Error(`broadcastArgs(): second input must be a vector (rank=1). Has rank ${r.rank}`);const a={s0:n,s1:r};return l.ENGINE.runKernel(u.BroadcastArgs,a)}});var U=n(68944),W=n(97963),q=n(876),$=n(20157),Y=n(72836),G=n(97629);const X=(0,h.op)({concat1d_:function(e){return(0,C.concat)(e,0)}});const K=(0,h.op)({concat2d_:function(e,t){return(0,C.concat)(e,t)}});const J=(0,h.op)({concat3d_:function(e,t){return(0,C.concat)(e,t)}});const Z=(0,h.op)({concat4d_:function(e,t){return(0,C.concat)(e,t)}});var Q=n(28374),ee=n(58625),te=n(92777);const ne=(0,h.op)({conv3d_:function(e,t,n,r,a="NDHWC",i=[1,1,1]){const o=(0,c.convertToTensor)(e,"x","conv3d"),s=(0,c.convertToTensor)(t,"filter","conv3d");let h=o,f=!1;4===o.rank&&(f=!0,h=(0,S.reshape)(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),d.assert(5===h.rank,(()=>`Error in conv3d: input must be rank 5, but got rank ${h.rank}.`)),d.assert(5===s.rank,(()=>`Error in conv3d: filter must be rank 5, but got rank ${s.rank}.`)),d.assert(h.shape[4]===s.shape[3],(()=>`Error in conv3d: depth of input (${h.shape[4]}) must match input depth for filter ${s.shape[3]}.`)),d.assert((0,A.eitherStridesOrDilationsAreOne)(n,i),(()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`)),d.assert("NDHWC"===a,(()=>`Error in conv3d: got dataFormat of ${a} but only NDHWC is currently supported.`)),d.assert((0,A.stridesOrDilationsArePositive)(i),(()=>"Error in conv3D: Dilated rates should be larger than 0.")),d.assert((0,A.stridesOrDilationsArePositive)(n),(()=>"Error in conv3D: Strides should be larger than 0."));const p={x:h,filter:s},m={strides:n,pad:r,dataFormat:a,dilations:i},g=l.ENGINE.runKernel(u.Conv3D,p,m);return f?(0,S.reshape)(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}});var re=n(6082);const ae=(0,h.op)({conv3dTranspose_:function(e,t,n,r,a){const i=(0,c.convertToTensor)(e,"x","conv3dTranspose"),o=(0,c.convertToTensor)(t,"filter","conv3dTranspose");return(0,re.conv3DBackpropInput)(n,i,o,r,a)}});var ie=n(72286),oe=n(85348),se=n(81107),le=n(37431);const ue=(0,h.op)({denseBincount_:function(e,t,n,r=!1){const a=(0,c.convertToTensor)(e,"x","denseBincount"),i=(0,c.convertToTensor)(t,"weights","denseBincount");d.assert("int32"===a.dtype,(()=>`Error in denseBincount: input dtype must be int32, but got ${a.dtype}`)),d.assert(a.rank<=2,(()=>`Error in denseBincount: input must be at most rank 2, but got rank ${a.rank}.`)),d.assert(n>=0,(()=>`size must be non-negative, but got ${n}.`)),d.assert(i.size===a.size||0===i.size,(()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${a.shape}, weights shape: ${i.shape}.`));const o={x:a,weights:i},s={size:n,binaryOutput:r};return l.ENGINE.runKernel(u.DenseBincount,o,s)}});var ce=n(89247),de=n(78819);const he=(0,h.op)({diag_:function(e){const t={x:(0,c.convertToTensor)(e,"x","diag")};return l.ENGINE.runKernel(u.Diag,t)}});var fe=n(29093),pe=n(24150),me=n(92660),ge=n(10138);const ye=(0,h.op)({einsum_:function(e,...t){const n=t.map(((e,t)=>(0,c.convertToTensor)(e,`tensors${t}`,"einsum"))),r={equation:e};return l.ENGINE.runKernel(u.Einsum,n,r)}});var _e=n(54373);const be=(0,h.op)({ensureShape_:function(e,t){const n=(0,c.convertToTensor)(e,"x","ensureShape","string_or_numeric");if(!(0,d.arraysEqualWithNull)(n.shape,t))throw new Error(`EnsureShape: Shape of tensor ${n.shape} is not compatible with expected shape ${t}`);return e}});var ve=n(70457),we=n(32514),Fe=n(78418),ke=n(74174),xe=n(75375),Ae=n(46624),Se=n(18897);const Ee=(0,h.op)({eye_:function(e,t,n,r="float32"){null==t&&(t=e);const a=(0,W.buffer)([e,t],r),i=e<=t?e:t;for(let s=0;s=Ze)throw new Error("values tensor size must less than 2147483648");if(s.shape[1]>=Ze)throw new Error(`trailing dim_size must less than 2147483648 for int32 output type, was ${s.shape[1]}`);const f={sortedSequence:s,values:h},p={side:n};return l.ENGINE.runKernel(u.SearchSorted,f,p)}});function et(e,t){return Qe(e,t,"left")}var tt=n(15379),nt=n(61476);const rt=(0,h.op)({maxPool3d_:function(e,t=[1,1,1],n,r,a,i="NDHWC"){const o=(0,c.convertToTensor)(e,"x","maxPool3d");let s=o,h=!1;4===o.rank&&(h=!0,s=(0,S.reshape)(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]])),d.assert(5===s.rank,(()=>`Error in maxPool3d: x must be rank 5 but got rank ${s.rank}.`)),d.assert("NDHWC"===i,(()=>`Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of ${i}`)),(0,A.checkPadOnDimRoundingMode)("maxPool3d",r,a);const f={x:s},p={filterSize:t,strides:n,pad:r,dimRoundingMode:a,dataFormat:i},m=l.ENGINE.runKernel(u.MaxPool3D,f,p);return h?(0,S.reshape)(m,[m.shape[1],m.shape[2],m.shape[3],m.shape[4]]):m}});const at=(0,h.op)({maxPoolWithArgmax_:function(e,t,n,r,a=!1){const i={x:(0,c.convertToTensor)(e,"x","maxPoolWithArgmax")},o={filterSize:t,strides:n,pad:r,includeBatchInIndex:a},s=l.ENGINE.runKernel(u.MaxPoolWithArgmax,i,o);return{result:s[0],indexes:s[1]}}});var it=n(83227),ot=n(54572),st=n(87760),lt=n(9180);function ut(e,t,{indexing:n="xy"}={}){if("xy"!==n&&"ij"!==n)throw new TypeError(`${n} is not a valid third argument to meshgrid`);if(void 0===e)return[];let r=(0,c.convertToTensor)(e,"x","meshgrid",e instanceof lt.Tensor?e.dtype:"float32");if(void 0===t)return[r];let a=(0,c.convertToTensor)(t,"y","meshgrid",t instanceof lt.Tensor?t.dtype:"float32");const i=(0,d.sizeFromShape)(r.shape),o=(0,d.sizeFromShape)(a.shape);return"xy"===n?(r=(0,S.reshape)(r,[1,-1]),a=(0,S.reshape)(a,[-1,1]),[(0,T.matMul)((0,st.ones)([o,1],r.dtype),r),(0,T.matMul)(a,(0,st.ones)([1,i],a.dtype))]):(r=(0,S.reshape)(r,[-1,1]),a=(0,S.reshape)(a,[1,-1]),[(0,T.matMul)(r,(0,st.ones)([1,o],r.dtype)),(0,T.matMul)((0,st.ones)([i,1],a.dtype),a)])}var ct=n(75969),dt=n(16505),ht=n(13060),ft=n(2825),pt=n(24651),mt=n(58402),gt=n(70839);const yt=(0,h.op)({moments_:function(e,t=null,n=!1){e=(0,c.convertToTensor)(e,"x","moments");const r=(0,d.parseAxisParam)(t,e.shape),a=(0,ot.mean)(e,r,n);let i=a.shape;n||(i=(0,pt.expandShapeToKeepDim)(a.shape,r));const o=(0,mt.square)((0,gt.sub)((0,x.cast)(e,"float32"),(0,S.reshape)(a,i)));return{mean:a,variance:(0,ot.mean)(o,r,n)}}});const _t=(0,h.op)({multiRNNCell_:function(e,t,n,r){const a=(0,c.convertToTensor)(t,"data","multiRNNCell"),i=(0,c.convertToTensorArray)(n,"c","multiRNNCell"),o=(0,c.convertToTensorArray)(r,"h","multiRNNCell");let s=a;const l=[];for(let c=0;c2)throw new Error(`Rank of probabilities must be 1 or 2, but is ${o}`);n=n||Math.random();const s={logits:1===o?(0,S.reshape)(a,[1,-1]):a},d={numSamples:t,seed:n,normalized:r},h=l.ENGINE.runKernel(u.Multinomial,s,d);return 1===o?(0,S.reshape)(h,[h.size]):h}});var vt=n(58235),wt=n(24495),Ft=n(24985),kt=n(33948);const xt=(0,h.op)({outerProduct_:function(e,t){const n=(0,c.convertToTensor)(e,"v1","outerProduct"),r=(0,c.convertToTensor)(t,"v2","outerProduct");d.assert(1===n.rank&&1===r.rank,(()=>`Error in outerProduct: inputs must be rank 1, but got ranks ${n.rank} and ${r.rank}.`));const a=(0,S.reshape)(n,[-1,1]),i=(0,S.reshape)(r,[1,-1]);return(0,T.matMul)(a,i)}});var At=n(79216);const St=(0,h.op)({pad1d_:function(e,t,n=0){return(0,d.assert)(2===t.length,(()=>"Invalid number of paddings. Must be length of 2.")),(0,At.pad)(e,[t],n)}});const Et=(0,h.op)({pad2d_:function(e,t,n=0){return(0,d.assert)(2===t.length&&2===t[0].length&&2===t[1].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),(0,At.pad)(e,t,n)}});const Ct=(0,h.op)({pad3d_:function(e,t,n=0){return(0,d.assert)(3===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),(0,At.pad)(e,t,n)}});const Tt=(0,h.op)({pad4d_:function(e,t,n=0){return(0,d.assert)(4===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length&&2===t[3].length,(()=>"Invalid number of paddings. Must be length of 2 each.")),(0,At.pad)(e,t,n)}});var Dt=n(43199),It=n(54619),Ot=n(84247),Pt=n(65734),Mt=n(7756);const Rt=(0,h.op)({raggedGather_:function(e,t,n,r){const a={paramsNestedSplits:e.map(((e,t)=>(0,c.convertToTensor)(e,`tensors${t}`,"raggedGather","int32"))),paramsDenseValues:(0,c.convertToTensor)(t,"paramsDenseValues","raggedGather"),indices:(0,c.convertToTensor)(n,"indices","raggedGather","int32")},i={outputRaggedRank:r},o=l.ENGINE.runKernel(u.RaggedGather,a,i);return{outputNestedSplits:o.slice(0,o.length-1),outputDenseValues:o[o.length-1]}}});const Lt=(0,h.op)({raggedRange_:function(e,t,n){const r=(0,c.convertToTensor)(e,"starts","raggedRange"),a={starts:r,limits:(0,c.convertToTensor)(t,"limits","raggedRange",r.dtype),deltas:(0,c.convertToTensor)(n,"deltas","raggedRange",r.dtype)},i=l.ENGINE.runKernel(u.RaggedRange,a);return{rtNestedSplits:i[0],rtDenseValues:i[1]}}});const Nt=(0,h.op)({raggedTensorToTensor_:function(e,t,n,r,a){const i=(0,c.convertToTensor)(e,"shape","raggedTensorToTensor","int32"),o=(0,c.convertToTensor)(t,"values","raggedTensorToTensor"),s={shape:i,values:o,defaultValue:(0,c.convertToTensor)(n,"defaultValue","raggedTensorToTensor",o.dtype),rowPartitionTensors:r.map(((e,t)=>(0,c.convertToTensor)(e,`tensors${t}`,"raggedTensorToTensor","int32")))},d={rowPartitionTypes:a};return l.ENGINE.runKernel(u.RaggedTensorToTensor,s,d)}});const Bt=(0,h.op)({rand_:function(e,t,n){(0,d.assertNonNegativeIntegerDimensions)(e);const r=(0,d.sizeFromShape)(e);let a=null;if(null==n||"float32"===n)a=new Float32Array(r);else if("int32"===n)a=new Int32Array(r);else{if("bool"!==n)throw new Error(`Unknown data type ${n}`);a=new Uint8Array(r)}for(let i=0;i=1||0===i);const o=Math.sqrt(-2*Math.log(i)/i);e=this.mean+this.stdDev*r*o,t=this.mean+this.stdDev*a*o,this.truncated&&!this.isValidTruncated(e)||(n=!0)}return this.truncated&&!this.isValidTruncated(t)||(this.nextVal=this.convertValue(t)),this.convertValue(e)}convertValue(e){return null==this.dtype||"float32"===this.dtype?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}}class zt{constructor(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;const a=r||Math.random();this.randu=jt.alea(a.toString()),this.randn=new Vt(0,1,n,!1,this.randu()),this.d=e<1?e+2/3:e-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let e,t,n,r,a,i;for(;;){do{r=this.randn.nextValue(),i=1+this.c*r}while(i<=0);if(i*=i*i,e=r*r,t=1-.331*e*e,n=.5*e+this.d*(1-i+Math.log(i)),a=this.randu(),anull==this.dtype||"float32"===this.dtype,this.min=e,this.range=t-e,this.dtype=n,null==r&&(r=Math.random()),"number"===typeof r&&(r=r.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=jt.alea(r)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}const Ut=(0,h.op)({randomGamma_:function(e,t,n=1,r="float32",a){if((0,d.assertNonNegativeIntegerDimensions)(e),null==n&&(n=1),null==r&&(r="float32"),"float32"!==r&&"int32"!==r)throw new Error(`Unsupported data type ${r}`);const i=new zt(t,n,r,a),o=(0,W.buffer)(e,r);for(let s=0;s`Error in reverse1D: x must be rank 1 but got rank ${t.rank}.`)),(0,Qt.reverse)(t,0)}});const tn=(0,h.op)({reverse2d_:function(e,t){const n=(0,c.convertToTensor)(e,"x","reverse");return d.assert(2===n.rank,(()=>`Error in reverse2D: x must be rank 2 but got rank ${n.rank}.`)),(0,Qt.reverse)(n,t)}});const nn=(0,h.op)({reverse3d_:function(e,t){const n=(0,c.convertToTensor)(e,"x","reverse");return d.assert(3===n.rank,(()=>`Error in reverse3D: x must be rank 3 but got rank ${n.rank}.`)),(0,Qt.reverse)(n,t)}});const rn=(0,h.op)({reverse4d_:function(e,t){const n=(0,c.convertToTensor)(e,"x","reverse");return d.assert(4===n.rank,(()=>`Error in reverse4D: x must be rank 4 but got rank ${n.rank}.`)),(0,Qt.reverse)(n,t)}});var an=n(18069),on=n(17009),sn=n(71285),ln=n(85630),un=n(50549);const cn=async function(e,t){const n=(0,c.convertToTensor)(e,"x","setdiff1d"),r=(0,c.convertToTensor)(t,"y","setdiff1d");d.assert(n.dtype===r.dtype,(()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${r.dtype}).`)),d.assert(1===n.rank,(()=>`x should be 1D tensor, but got x (${n.shape}).`)),d.assert(1===r.rank,(()=>`y should be 1D tensor, but got y (${r.shape}).`));const a=await n.data(),i=await r.data(),o=new Set(i);let s=0;for(let c=0;c`slice1d expects a rank-1 tensor, but got a rank-${r.rank} tensor`)),(0,O.slice)(r,[t],[n])}});const mn=(0,h.op)({slice2d_:function(e,t,n){const r=(0,c.convertToTensor)(e,"x","slice2d");return d.assert(2===r.rank,(()=>`slice2d expects a rank-2 tensor, but got a rank-${r.rank} tensor`)),(0,O.slice)(r,t,n)}});const gn=(0,h.op)({slice3d_:function(e,t,n){const r=(0,c.convertToTensor)(e,"x","slice3d");return d.assert(3===r.rank,(()=>`slice3d expects a rank-3 tensor, but got a rank-${r.rank} tensor`)),(0,O.slice)(r,t,n)}});const yn=(0,h.op)({slice4d_:function(e,t,n){const r=(0,c.convertToTensor)(e,"x","slice4d");return d.assert(4===r.rank,(()=>`slice4d expects a rank-4 tensor, but got a rank-${r.rank} tensor`)),(0,O.slice)(r,t,n)}});var _n=n(74855),bn=n(89725),vn=n(33625),wn=n(83422),Fn=n(18533),kn=n(75667),xn=n(90406),An=n(3429),Sn=n(96375),En=n(26296),Cn=n(45965),Tn=n(14829),Dn=n(84295),In=n(7223),On=n(73630),Pn=n(7590),Mn=n(59720),Rn=n(45074);function Ln(e,t){(0,d.assertNonNull)(e);const n=(0,c.inferShape)(e,t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return(0,Rn.makeTensor)(e,null,n,t)}function Nn(e,t,n){if((0,d.assertNonNull)(e),null!=t&&2!==t.length)throw new Error("tensor2d() requires shape to have two numbers");const r=(0,c.inferShape)(e,n);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return(0,Rn.makeTensor)(e,t,r,n)}var Bn=n(20763);function jn(e,t,n){if((0,d.assertNonNull)(e),null!=t&&4!==t.length)throw new Error("tensor4d() requires shape to have four numbers");const r=(0,c.inferShape)(e,n);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return(0,Rn.makeTensor)(e,t,r,n)}function Vn(e,t,n){if((0,d.assertNonNull)(e),null!=t&&5!==t.length)throw new Error("tensor5d() requires shape to have five numbers");const r=(0,c.inferShape)(e,n);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return(0,Rn.makeTensor)(e,t,r,n)}function zn(e,t,n){if((0,d.assertNonNull)(e),null!=t&&6!==t.length)throw new Error("tensor6d() requires shape to have six numbers");const r=(0,c.inferShape)(e,n);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return t=t||r,(0,Rn.makeTensor)(e,t,r,n)}var Hn=n(35048);const Un=(0,h.op)({tensorScatterUpdate_:function(e,t,n){const r=(0,c.convertToTensor)(e,"tensor","tensorScatterupdate"),a=(0,c.convertToTensor)(t,"indices","tensorScatterupdate","int32"),i=(0,c.convertToTensor)(n,"updates","tensorScatterupdate");if(Hn.validateInput(i,a,r.shape),r.dtype!==i.dtype)throw new Error(`tensor and updates must have the same dtype, instead they are ${r.dtype} and ${i.dtype}.`);const o={tensor:r,indices:a,updates:i};return l.ENGINE.runKernel(u.TensorScatterUpdate,o,{})}});var Wn=n(15717);const qn=(0,h.op)({truncatedNormal_:function(e,t=0,n=1,r,a){if((0,d.assertNonNegativeIntegerDimensions)(e),null!=r&&"bool"===r)throw new Error("Unsupported data type $ { dtype }");const i=new Vt(t,n,r,!0,a),o=(0,W.buffer)(e,r);for(let s=0;s0,(()=>"mask cannot be scalar")),d.assertShapesMatch(s.slice(i,i+o),a.shape,"mask's shape must match the first K dimensions of tensor's shape,");let l=1;for(let c=i;c"Shape mismatch in v and x"));const u=(0,sn.scalar)(1),h=(0,gt.sub)(u,l);let f=(0,D.mul)((0,gt.sub)(o,i),h);if(a){d.assert(null!=r,(()=>"When using zeroDebias: true, step is required."));const e=(0,c.convertToTensor)(r,"step","movingAverage");f=(0,pe.div)(f,(0,gt.sub)(u,(0,It.pow)(l,e)))}return(0,s.add)(i,f)}});const sr=(0,h.op)({scatterND_:function(e,t,n){(0,d.assertNonNegativeIntegerDimensions)(n);const r=(0,c.convertToTensor)(e,"indices","scatterND","int32"),a=(0,c.convertToTensor)(t,"updates","scatterND");Hn.validateInput(a,r,n);const i={indices:r,updates:a},o={shape:n};return l.ENGINE.runKernel(u.ScatterNd,i,o)}});const lr=(0,h.op)({sparseToDense_:function(e,t,n,r=0){(0,d.assertNonNegativeIntegerDimensions)(n);const a=(0,c.convertToTensor)(e,"sparseIndices","sparseToDense","int32"),i=(0,c.convertToTensor)(t,"sparseValues","sparseToDense","string_or_numeric"),o=(0,c.convertToTensor)(r,"defaultValue","sparseToDense",i.dtype);!function(e,t,n,r){if("int32"!==e.dtype)throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${e.dtype}.`);if(e.rank>2)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${e.shape}.`);const a=e.rank>0?e.shape[0]:1,i=e.rank>1?e.shape[1]:1;if(n.length!==i)throw new Error(`outputShape has incorrect number of elements:, ${n.length}, should be: ${i}.`);const o=t.size;if(0!==t.rank&&(1!==t.rank||o!==a))throw new Error(`sparseValues has incorrect shape ${t.shape}, should be [] or [${a}]`);if(t.dtype!==r.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype")}(a,i,n,o);const s={sparseIndices:a,sparseValues:i,defaultValue:o},h={outputShape:n};return l.ENGINE.runKernel(u.SparseToDense,s,h)}});const ur=(0,h.op)({gatherND_:function(e,t){const n=(0,c.convertToTensor)(t,"indices","gatherND","int32"),r={params:(0,c.convertToTensor)(e,"x","gatherND","string_or_numeric"),indices:n};return l.ENGINE.runKernel(u.GatherNd,r)}});const cr=(0,h.op)({dropout_:function(e,t,n,r){const a=(0,c.convertToTensor)(e,"x","dropout");if(d.assert("float32"===a.dtype,(()=>`x has to be a floating point tensor since it's going to be scaled, but got a ${a.dtype} tensor instead.`)),d.assert(t>=0&&t<1,(()=>`rate must be a float in the range [0, 1), but got ${t}.`)),0===t)return e instanceof lt.Tensor?a.clone():a;const i=function(e,t){if(null==t)return e.shape.slice();if(d.arraysEqual(e.shape,t))return t;if(e.shape.length===t.length){const n=[];for(let r=0;r1,(()=>`inTopK() expects the predictions to be of rank 2 or higher, but got ${r.rank}`)),(0,d.assert)(r.rank-1===a.rank,(()=>`predictions rank should be 1 larger than targets rank, but got predictions rank ${r.rank} and targets rank ${a.rank}`)),(0,d.assertShapesMatch)(r.shape.slice(0,r.shape.length-1),a.shape,"predictions's shape should be align with the targets' shape, except the last dimension.");const i=r.shape[r.shape.length-1];(0,d.assert)(n>0&&n<=i,(()=>`'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${i}), but got ${n}`));const o=await r.data(),s=await a.data(),[l,u]=[o.length/i,i],h=(0,d.getTypedArrayFromDType)("bool",l);for(let c=0;ct.value-e.value)),h[c]=0;for(let a=0;a`Error in fused conv2d: got dataFormat of ${a} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`));let l=(0,ee.conv2d)(e,t,n,r,a,i,o);return null!=h&&(l=(0,s.add)(l,h)),(0,_r.applyActivation)(l,f,p,m)}const g=(0,c.convertToTensor)(e,"x","conv2d","float32"),y=(0,c.convertToTensor)(t,"filter","conv2d","float32");let _=g,b=!1;3===g.rank&&(b=!0,_=(0,S.reshape)(g,[1,g.shape[0],g.shape[1],g.shape[2]])),d.assert(4===_.rank,(()=>`Error in fused conv2d: input must be rank 4, but got rank ${_.rank}.`)),d.assert(4===y.rank,(()=>`Error in fused conv2d: filter must be rank 4, but got rank ${y.rank}.`)),A.checkPadOnDimRoundingMode("fused conv2d",r,o);const v="NHWC"===a?_.shape[3]:_.shape[1];d.assert(y.shape[2]===v,(()=>`Error in conv2d: depth of input (${v}) must match input depth for filter ${y.shape[2]}.`)),d.assert(A.eitherStridesOrDilationsAreOne(n,i),(()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`));const w=A.computeConv2DInfo(_.shape,y.shape,n,i,r,o);let F,k;if(null!=h&&(F=(0,c.convertToTensor)(h,"bias","fused conv2d"),[F]=(0,ir.makeTypesMatch)(F,g),"NHWC"===a?mr.assertAndGetBroadcastShape(w.outShape,F.shape):(d.assert(F.shape.length<=1,(()=>`Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${F.shape.length}.`)),d.assert(0===F.shape.length||F.shape[0]===w.outChannels||1===F.shape[0],(()=>`Error in fused conv2d: bias shape (${F.shape}) is not compatible with the number of output channels (${w.outChannels})`)))),null!=p){const e=p.shape;if(d.assert(e.length<=1||3===e.length,(()=>`Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${e.length}.`)),1===e.length)d.assert(1===e[0]||e[0]===w.outChannels,(()=>`Error in fused conv2d: PReLU activation weights (${e}) is not compatible with the number of output channels (${w.outChannels}).`));else if(3===e.length)try{mr.assertAndGetBroadcastShape(e,w.outShape)}catch(T){const t=`Error in fused conv2d: PReLU activation weights (${e}) is not compatible with the output shape of the conv2d (${w.outShape}).`;throw Error(t)}k=(0,c.convertToTensor)(p,"prelu weights","fused conv2d")}const x=(e,t)=>{d.assert("NHWC"===a,(()=>`Error in gradient of fused conv2D: got dataFormat of ${a} but only NHWC is currently supported.`));const[o,s,l,u]=t,c=(0,_r.getFusedDyActivation)(e,l,f);d.assert(A.tupleValuesAreOne(i),(()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${i}'`));const h=[(0,yr.conv2DBackpropInput)(s.shape,c,o,n,r),(0,gr.conv2DBackpropFilter)(s,c,o.shape,n,r)];if(null!=u){const e=(0,_r.getFusedBiasGradient)(u,c);h.push(e)}return h},E={x:_,filter:y,bias:F,preluActivationWeights:k},C={strides:n,pad:r,dataFormat:a,dilations:i,dimRoundingMode:o,activation:f,leakyreluAlpha:m};if(null==h){const e=(0,pr.customGrad)(((e,t,n)=>{let r=l.ENGINE.runKernel(u.FusedConv2D,E,C);return n([t,e,r]),b&&(r=(0,S.reshape)(r,[r.shape[1],r.shape[2],r.shape[3]])),{value:r,gradFunc:x}}));return e(_,y)}{const e=(0,pr.customGrad)(((e,t,n,r)=>{let a=l.ENGINE.runKernel(u.FusedConv2D,E,C);return r([t,e,a,n]),b&&(a=(0,S.reshape)(a,[a.shape[1],a.shape[2],a.shape[3]])),{value:a,gradFunc:x}}));return e(_,y,F)}}});var vr=n(70703),wr=n(97309);const Fr=(0,h.op)({fusedDepthwiseConv2d_:function({x:e,filter:t,strides:n,pad:r,dataFormat:a="NHWC",dilations:i=[1,1],dimRoundingMode:o,bias:h,activation:f="linear",preluActivationWeights:p,leakyreluAlpha:m}){if(!1===(0,_r.shouldFuse)(l.ENGINE.state.gradientDepth,f)){let l=(0,de.depthwiseConv2d)(e,t,n,r,a,i,o);return null!=h&&(l=(0,s.add)(l,h)),(0,_r.applyActivation)(l,f,p,m)}const g=(0,c.convertToTensor)(e,"x","depthwiseConv2d","float32"),y=(0,c.convertToTensor)(t,"filter","depthwiseConv2d","float32");let _=g,b=!1;3===g.rank&&(b=!0,_=(0,S.reshape)(g,[1,g.shape[0],g.shape[1],g.shape[2]])),d.assert(4===_.rank,(()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${_.rank}.`)),d.assert(4===y.rank,(()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${y.rank}.`)),d.assert(_.shape[3]===y.shape[2],(()=>`Error in fused depthwiseConv2d: number of input channels (${_.shape[3]}) must match the inChannels dimension in filter ${y.shape[2]}.`)),null==i&&(i=[1,1]),d.assert(A.eitherStridesOrDilationsAreOne(n,i),(()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${i}'`)),A.checkPadOnDimRoundingMode("fused depthwiseConv2d",r,o);const v=A.computeConv2DInfo(_.shape,y.shape,n,i,r,o,!0);let w,F;null!=h&&(w=(0,c.convertToTensor)(h,"bias","fused conv2d"),[w]=(0,ir.makeTypesMatch)(w,g),mr.assertAndGetBroadcastShape(v.outShape,w.shape)),null!=p&&(F=(0,c.convertToTensor)(p,"prelu weights","fused depthwiseConv2d"));const k=(e,t)=>{d.assert(A.tupleValuesAreOne(i),(()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${i}'`));const[a,s,l,u]=t,c=(0,_r.getFusedDyActivation)(e,l,f),h=(0,wr.depthwiseConv2dNativeBackpropInput)(s.shape,c,a,n,r,i,o),p=(0,vr.depthwiseConv2dNativeBackpropFilter)(s,c,a.shape,n,r,i,o);if(null!=u){return[h,p,(0,_r.getFusedBiasGradient)(w,c)]}return[h,p]},x={x:_,filter:y,bias:w,preluActivationWeights:F},E={strides:n,pad:r,dataFormat:a,dilations:i,dimRoundingMode:o,activation:f,leakyreluAlpha:m};if(null==h){const e=(0,pr.customGrad)(((e,t,n)=>{let r=l.ENGINE.runKernel(u.FusedDepthwiseConv2D,x,E);return n([t,e,r]),b&&(r=(0,S.reshape)(r,[r.shape[1],r.shape[2],r.shape[3]])),{value:r,gradFunc:k}}));return e(_,y)}{const e=(0,pr.customGrad)(((e,t,n,r)=>{let a=l.ENGINE.runKernel(u.FusedDepthwiseConv2D,x,E);return r([t,e,a,n]),b&&(a=(0,S.reshape)(a,[a.shape[1],a.shape[2],a.shape[3]])),{value:a,gradFunc:k}}));return e(_,y,w)}}});const kr=(0,h.op)({fusedMatMul_:function({a:e,b:t,transposeA:n=!1,transposeB:r=!1,bias:a,activation:i="linear",preluActivationWeights:o,leakyreluAlpha:h=.2}){if(!1===(0,_r.shouldFuse)(l.ENGINE.state.gradientDepth,i)){let l=(0,T.matMul)(e,t,n,r);return null!=a&&(l=(0,s.add)(l,a)),(0,_r.applyActivation)(l,i,o,h)}let f=(0,c.convertToTensor)(e,"a","fused matMul"),p=(0,c.convertToTensor)(t,"b","fused matMul");[f,p]=(0,ir.makeTypesMatch)(f,p);const m=n?f.shape[f.rank-2]:f.shape[f.rank-1],g=r?p.shape[p.rank-1]:p.shape[p.rank-2],y=n?f.shape[f.rank-1]:f.shape[f.rank-2],_=r?p.shape[p.rank-2]:p.shape[p.rank-1],b=f.shape.slice(0,-2),v=p.shape.slice(0,-2),w=d.sizeFromShape(b),F=d.sizeFromShape(v);d.assert(m===g,(()=>`Error in fused matMul: inner shapes (${m}) and (${g}) of Tensors with shapes ${f.shape} and ${p.shape} and transposeA=${n} and transposeB=${r} must match.`));const k=mr.assertAndGetBroadcastShape(f.shape.slice(0,-2),p.shape.slice(0,-2)).concat([y,_]),x=n?(0,S.reshape)(f,[w,m,y]):(0,S.reshape)(f,[w,y,m]),A=r?(0,S.reshape)(p,[F,_,g]):(0,S.reshape)(p,[F,g,_]);let E,C;null!=a&&(E=(0,c.convertToTensor)(a,"bias","fused matMul"),[E]=(0,ir.makeTypesMatch)(E,f),mr.assertAndGetBroadcastShape(k,E.shape)),null!=o&&(C=(0,c.convertToTensor)(o,"prelu weights","fused matMul"));const D=(e,t)=>{const[o,s,l,u]=t,c=(0,_r.getFusedDyActivation)((0,S.reshape)(e,l.shape),l,i);let d,h;if(n||r?!n&&r?(d=(0,T.matMul)(c,s,!1,!1),h=(0,T.matMul)(c,o,!0,!1)):n&&!r?(d=(0,T.matMul)(s,c,!1,!0),h=(0,T.matMul)(o,c,!1,!1)):(d=(0,T.matMul)(s,c,!0,!0),h=(0,T.matMul)(c,o,!0,!0)):(d=(0,T.matMul)(c,s,!1,!0),h=(0,T.matMul)(o,c,!0,!1)),null!=a){return[d,h,(0,_r.getFusedBiasGradient)(u,c)]}return[d,h]},I={a:x,b:A,bias:E,preluActivationWeights:C},O={transposeA:n,transposeB:r,activation:i,leakyreluAlpha:h};if(null==a){const e=(0,pr.customGrad)(((e,t,n)=>{const r=l.ENGINE.runKernel(u._FusedMatMul,I,O);return n([e,t,r]),{value:(0,S.reshape)(r,k),gradFunc:D}}));return e(x,A)}{const e=(0,pr.customGrad)(((e,t,n,r)=>{const a=l.ENGINE.runKernel(u._FusedMatMul,I,O);return r([e,t,a,n]),{value:(0,S.reshape)(a,k),gradFunc:D}}));return e(x,A,E)}}});const xr=(0,h.op)({hammingWindow_:function(e){return hr(e,.54,.46)}});const Ar=(0,h.op)({hannWindow_:function(e){return hr(e,.5,.5)}});const Sr=(0,h.op)({frame_:function(e,t,n,r=!1,a=0){let i=0;const o=[];for(;i+t<=e.size;)o.push((0,O.slice)(e,i,t)),i+=n;if(r)for(;i`Error in cropAndResize: image must be rank 4,but got rank ${o.rank}.`)),d.assert(2===s.rank&&4===s.shape[1],(()=>`Error in cropAndResize: boxes must be have size [${f},4] but had shape ${s.shape}.`)),d.assert(1===h.rank&&h.shape[0]===f,(()=>`Error in cropAndResize: boxInd must be have size [${f}] but had shape ${s.shape}.`)),d.assert(2===r.length,(()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${r.length}.`)),d.assert(r[0]>=1&&r[1]>=1,(()=>`cropSize must be atleast [1,1], but was ${r}`)),d.assert("bilinear"===a||"nearest"===a,(()=>`method must be bilinear or nearest, but was ${a}`));const p={image:o,boxes:s,boxInd:h},m={method:a,extrapolationValue:i,cropSize:r};return l.ENGINE.runKernel(u.CropAndResize,p,m)}});const Tr=(0,h.op)({flipLeftRight_:function(e){const t=(0,c.convertToTensor)(e,"image","flipLeftRight","float32");d.assert(4===t.rank,(()=>`Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`));const n={image:t};return l.ENGINE.runKernel(u.FlipLeftRight,n,{})}});const Dr=(0,h.op)({grayscaleToRGB_:function(e){const t=(0,c.convertToTensor)(e,"image","grayscaleToRGB"),n=t.rank-1,r=t.shape[n];d.assert(t.rank>=2,(()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`)),d.assert(1===r,(()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${r}.`));const a=new Array(t.rank);return a.fill(1,0,n),a[n]=3,(0,Se.tile)(t,a)}});const Ir=(0,h.op)({rgbToGrayscale_:function(e){const t=(0,c.convertToTensor)(e,"image","RGBToGrayscale"),n=t.rank-1,r=t.shape[n];d.assert(t.rank>=2,(()=>`Error in RGBToGrayscale: images must be at least rank 2, but got rank ${t.rank}.`)),d.assert(3===r,(()=>`Error in RGBToGrayscale: last dimension of an RGB image should be size 3, but got size ${r}.`));const a=t.dtype,i=(0,x.cast)(t,"float32"),o=Ln([.2989,.587,.114]);let s;switch(t.rank){case 2:s=ye("ij,j->i",i,o);break;case 3:s=ye("ijk,k->ij",i,o);break;case 4:s=ye("ijkl,l->ijk",i,o);break;case 5:s=ye("ijklm,m->ijkl",i,o);break;case 6:s=ye("ijklmn,n->ijklm",i,o);break;default:throw new Error("Not a valid tensor rank.")}return s=(0,xe.expandDims)(s,-1),(0,x.cast)(s,a)}});const Or=(0,h.op)({rotateWithOffset_:function(e,t,n=0,r=.5){const a=(0,c.convertToTensor)(e,"image","rotateWithOffset","float32");d.assert(4===a.rank,(()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${a.rank}.`));const i={image:a},o={radians:t,fillValue:n,center:r};return l.ENGINE.runKernel(u.RotateWithOffset,i,o)}});function Pr(e,t,n,r,a,i){null==r&&(r=.5),null==a&&(a=Number.NEGATIVE_INFINITY),null==i&&(i=0);const o=e.shape[0];return n=Math.min(n,o),d.assert(0<=r&&r<=1,(()=>`iouThreshold must be in [0, 1], but was '${r}'`)),d.assert(2===e.rank,(()=>`boxes must be a 2D tensor, but was of rank '${e.rank}'`)),d.assert(4===e.shape[1],(()=>`boxes must have 4 columns, but 2nd dimension was ${e.shape[1]}`)),d.assert(1===t.rank,(()=>"scores must be a 1D tensor")),d.assert(t.shape[0]===o,(()=>`scores has incompatible shape with boxes. Expected ${o}, but was ${t.shape[0]}`)),d.assert(0<=i&&i<=1,(()=>`softNmsSigma must be in [0, 1], but was '${i}'`)),{maxOutputSize:n,iouThreshold:r,scoreThreshold:a,softNmsSigma:i}}const Mr=(0,h.op)({nonMaxSuppression_:function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY){const i=(0,c.convertToTensor)(e,"boxes","nonMaxSuppression","float32"),o=(0,c.convertToTensor)(t,"scores","nonMaxSuppression","float32"),s=Pr(i,o,n,r,a),d={maxOutputSize:n=s.maxOutputSize,iouThreshold:r=s.iouThreshold,scoreThreshold:a=s.scoreThreshold};return l.ENGINE.runKernel(u.NonMaxSuppressionV3,{boxes:i,scores:o},d)}});var Rr=n(68801);const Lr=async function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY){const i=(0,c.convertToTensor)(e,"boxes","nonMaxSuppressionAsync"),o=(0,c.convertToTensor)(t,"scores","nonMaxSuppressionAsync"),s=Pr(i,o,n,r,a);n=s.maxOutputSize,r=s.iouThreshold,a=s.scoreThreshold;const l=await Promise.all([i.data(),o.data()]),u=l[0],d=l[1],{selectedIndices:h}=(0,Rr.nonMaxSuppressionV3Impl)(u,d,n,r,a);return i!==e&&i.dispose(),o!==t&&o.dispose(),Ln(h,"int32")};const Nr=(0,h.op)({nonMaxSuppressionWithScore_:function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY,i=0){const o=(0,c.convertToTensor)(e,"boxes","nonMaxSuppression"),s=(0,c.convertToTensor)(t,"scores","nonMaxSuppression"),d=Pr(o,s,n,r,a,i),h={boxes:o,scores:s},f={maxOutputSize:n=d.maxOutputSize,iouThreshold:r=d.iouThreshold,scoreThreshold:a=d.scoreThreshold,softNmsSigma:i=d.softNmsSigma},p=l.ENGINE.runKernel(u.NonMaxSuppressionV5,h,f);return{selectedIndices:p[0],selectedScores:p[1]}}});const Br=async function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY,i=0){const o=(0,c.convertToTensor)(e,"boxes","nonMaxSuppressionAsync"),s=(0,c.convertToTensor)(t,"scores","nonMaxSuppressionAsync"),l=Pr(o,s,n,r,a,i);n=l.maxOutputSize,r=l.iouThreshold,a=l.scoreThreshold,i=l.softNmsSigma;const u=await Promise.all([o.data(),s.data()]),d=u[0],h=u[1],{selectedIndices:f,selectedScores:p}=(0,Rr.nonMaxSuppressionV5Impl)(d,h,n,r,a,i);return o!==e&&o.dispose(),s!==t&&s.dispose(),{selectedIndices:Ln(f,"int32"),selectedScores:Ln(p)}};const jr=(0,h.op)({nonMaxSuppressionPadded_:function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY,i=!1){const o=(0,c.convertToTensor)(e,"boxes","nonMaxSuppression"),s=(0,c.convertToTensor)(t,"scores","nonMaxSuppression"),d=Pr(o,s,n,r,a,null),h={boxes:o,scores:s},f={maxOutputSize:d.maxOutputSize,iouThreshold:d.iouThreshold,scoreThreshold:d.scoreThreshold,padToMaxOutputSize:i},p=l.ENGINE.runKernel(u.NonMaxSuppressionV4,h,f);return{selectedIndices:p[0],validOutputs:p[1]}}});const Vr=async function(e,t,n,r=.5,a=Number.NEGATIVE_INFINITY,i=!1){const o=(0,c.convertToTensor)(e,"boxes","nonMaxSuppressionAsync"),s=(0,c.convertToTensor)(t,"scores","nonMaxSuppressionAsync"),l=Pr(o,s,n,r,a,null),u=l.maxOutputSize,d=l.iouThreshold,h=l.scoreThreshold,[f,p]=await Promise.all([o.data(),s.data()]),{selectedIndices:m,validOutputs:g}=(0,Rr.nonMaxSuppressionV4Impl)(f,p,u,d,h,i);return o!==e&&o.dispose(),s!==t&&s.dispose(),{selectedIndices:Ln(m,"int32"),validOutputs:(0,sn.scalar)(g,"int32")}};var zr=n(7294),Hr=n(91439);const Ur=(0,h.op)({threshold_:function(e,t="binary",n=!1,r=.5){const a=(0,c.convertToTensor)(e,"image","threshold"),i=a.shape[0]*a.shape[1];let o,l,u,h,f=(0,D.mul)(Ln([r]),255);if(d.assert(3===a.rank,(()=>`Error in threshold: image must be rank 3,but got rank ${a.rank}.`)),d.assert(3===a.shape[2]||1===a.shape[2],(()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${a.shape[2]}.`)),d.assert("int32"===a.dtype||"float32"===a.dtype,(()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${a.dtype}.`)),d.assert("otsu"===t||"binary"===t,(()=>`Method must be binary or otsu, but was ${t}`)),3===a.shape[2]){[o,l,u]=(0,An.split)(a,[1,1,1],-1);const e=(0,D.mul)(o,.2989),t=(0,D.mul)(l,.587),n=(0,D.mul)(u,.114);h=(0,s.add)((0,s.add)(e,t),n)}else h=e;if("otsu"===t){f=function(e,t){let n,r,a,i,o,l,u=Ln([-1]),c=Ln([0]),d=Ln([0]);for(let h=0;h`Error in transform: image must be rank 4,but got rank ${o.rank}.`)),d.assert(2===s.rank&&(s.shape[0]===o.shape[0]||1===s.shape[0])&&8===s.shape[1],(()=>"Error in transform: Input transform should be batch x 8 or 1 x 8")),d.assert(null==i||2===i.length,(()=>`Error in transform: outputShape must be [height, width] or null, but got ${i}.`));const h={image:o,transforms:s},f={interpolation:n,fillMode:r,fillValue:a,outputShape:i};return l.ENGINE.runKernel(u.Transform,h,f)}});const qr=(0,h.op)({bandPart_:function(e,t,n){const r=(0,c.convertToTensor)(e,"a","bandPart");(0,d.assert)(r.rank>=2,(()=>`bandPart(): Rank must be at least 2, got ${r.rank}.`));const a=r.shape,[i,o]=r.shape.slice(-2);let s,l;"number"===typeof t?((0,d.assert)(t%1===0,(()=>`bandPart(): numLower must be an integer, got ${t}.`)),(0,d.assert)(t<=i,(()=>`bandPart(): numLower (${t}) must not be greater than the number of rows (${i}).`)),s=(0,c.convertToTensor)(t<0?i:t,"numLower","bandPart")):((0,d.assert)("int32"===t.dtype,(()=>"bandPart(): numLower's dtype must be an int32.")),s=(0,Jn.where)((0,je.less)(t,0),i,(0,dt.minimum)(t,i))),"number"===typeof n?((0,d.assert)(n%1===0,(()=>`bandPart(): numUpper must be an integer, got ${n}.`)),(0,d.assert)(n<=o,(()=>`bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`)),l=(0,c.convertToTensor)(n<0?o:n,"numUpper","bandPart")):((0,d.assert)("int32"===n.dtype,(()=>"bandPart(): numUpper's dtype must be an int32.")),l=(0,Jn.where)((0,je.less)(n,0),o,(0,dt.minimum)(n,o)));const u=(0,S.reshape)(Gt(0,i,1,"int32"),[-1,1]),h=Gt(0,o,1,"int32"),f=(0,gt.sub)(u,h),p=(0,Ge.logicalAnd)((0,Ve.lessEqual)(f,s),(0,Pe.greaterEqual)(f,(0,vt.neg)(l))),m=(0,er.zeros)([i,o],r.dtype);return(0,S.reshape)((0,Tn.stack)((0,Gn.unstack)((0,S.reshape)(r,[-1,i,o])).map((e=>(0,Jn.where)(p,e,m)))),a)}});const $r=(0,h.op)({gramSchmidt_:function(e){let t;if(Array.isArray(e)){t=!1,(0,d.assert)(null!=e&&e.length>0,(()=>"Gram-Schmidt process: input must not be null, undefined, or empty"));const n=e[0].shape[0];for(let t=1;t`Gram-Schmidt: Non-unique lengths found in the input vectors: (${e[t].shape[0]} vs. ${n})`))}else t=!0,e=(0,An.split)(e,e.shape[0],0).map((e=>(0,Cn.squeeze)(e,[0])));(0,d.assert)(e.length<=e[0].shape[0],(()=>`Gram-Schmidt: Number of vectors (${e.length}) exceeds number of dimensions (${e[0].shape[0]}).`));const n=[],r=e;for(let a=0;a{let e=r[a];if(a>0)for(let t=0;t{(0,d.assert)(2===e.shape.length,(()=>`qr2d() requires a 2D Tensor, but got a ${e.shape.length}D Tensor.`));const n=e.shape[0],r=e.shape[1];let a=Ee(n),i=(0,Y.clone)(e);const o=Nn([[1]],[1,1]);let s=(0,Y.clone)(o);const u=n>=r?r:n;for(let e=0;e{const t=(0,O.slice)(i,[e,e],[n-e,1]),l=(0,ar.norm)(t),u=(0,O.slice)(i,[e,e],[1,1]),c=(0,Jn.where)((0,Oe.greater)(u,0),Nn([[-1]]),Nn([[1]])),d=(0,gt.sub)(u,(0,D.mul)(c,l)),h=(0,pe.div)(t,d);s=1===h.shape[0]?(0,Y.clone)(o):(0,C.concat)([o,(0,O.slice)(h,[1,0],[h.shape[0]-1,h.shape[1]])],0);const f=(0,vt.neg)((0,pe.div)((0,T.matMul)(c,d),l)),p=(0,O.slice)(i,[e,0],[n-e,r]),m=(0,D.mul)(f,s),g=(0,rr.transpose)(s);if(0===e)i=(0,gt.sub)(p,(0,T.matMul)(m,(0,T.matMul)(g,p)));else{const t=(0,gt.sub)(p,(0,T.matMul)(m,(0,T.matMul)(g,p)));i=(0,C.concat)([(0,O.slice)(i,[0,0],[e,r]),t],0)}const y=(0,rr.transpose)(m),_=(0,O.slice)(a,[0,e],[n,a.shape[1]-e]);if(0===e)a=(0,gt.sub)(_,(0,T.matMul)((0,T.matMul)(_,s),y));else{const t=(0,gt.sub)(_,(0,T.matMul)((0,T.matMul)(_,s),y));a=(0,C.concat)([(0,O.slice)(a,[0,0],[n,e]),t],1)}return[s,i,a]})),(0,Yr.dispose)([t,u,c])}return!t&&n>r&&(a=(0,O.slice)(a,[0,0],[n,r]),i=(0,O.slice)(i,[0,0],[r,r])),[a,i]}))}const Xr=(0,h.op)({qr_:function(e,t=!1){if((0,d.assert)(e.rank>=2,(()=>`qr() requires input tensor to have a rank >= 2, but got rank ${e.rank}`)),2===e.rank)return Gr(e,t);{const n=e.shape.slice(0,e.shape.length-2).reduce(((e,t)=>e*t)),r=(0,Gn.unstack)((0,S.reshape)(e,[n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),a=[],i=[];r.forEach((e=>{const[n,r]=Gr(e,t);a.push(n),i.push(r)}));return[(0,S.reshape)((0,Tn.stack)(a,0),e.shape),(0,S.reshape)((0,Tn.stack)(i,0),e.shape)]}}});var Kr=n(59227);const Jr=(0,h.op)({computeWeightedLoss_:function(e,t,n=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const r=(0,c.convertToTensor)(e,"losses","computeWeightedLoss");let a=null;null!=t&&(a=(0,c.convertToTensor)(t,"weights","computeWeightedLoss"));const i=null==a?r:(0,D.mul)(r,a);if(n===Kr.Reduction.NONE)return i;if(n===Kr.Reduction.SUM)return(0,On.sum)(i);if(n===Kr.Reduction.MEAN){if(null==a)return(0,ot.mean)(i);{const e=r.size/a.size,t=(0,pe.div)((0,On.sum)(i),(0,On.sum)(a));return e>1?(0,pe.div)(t,(0,sn.scalar)(e)):t}}if(n===Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){if(null==a)return(0,pe.div)((0,On.sum)(i),(0,sn.scalar)(r.size));{const e=(0,D.mul)(a,(0,st.ones)(r.shape)),t=(0,x.cast)((0,On.sum)((0,wt.notEqual)(e,(0,sn.scalar)(0))),"float32");return(0,pe.div)((0,On.sum)(i),t)}}throw Error(`Unknown reduction: ${n}`)}});const Zr=(0,h.op)({absoluteDifference_:function(e,t,n,r=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const i=(0,c.convertToTensor)(e,"labels","absoluteDifference"),o=(0,c.convertToTensor)(t,"predictions","absoluteDifference");let s=null;null!=n&&(s=(0,c.convertToTensor)(n,"weights","absoluteDifference")),(0,d.assertShapesMatch)(i.shape,o.shape,"Error in absoluteDifference: ");const l=(0,a.abs)((0,gt.sub)(i,o));return Jr(l,s,r)}});const Qr=(0,h.op)({cosineDistance_:function(e,t,n,r,a=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const i=(0,c.convertToTensor)(e,"labels","cosineDistance"),o=(0,c.convertToTensor)(t,"predictions","cosineDistance");let s=null;null!=r&&(s=(0,c.convertToTensor)(r,"weights","cosineDistance")),(0,d.assertShapesMatch)(i.shape,o.shape,"Error in cosineDistance: ");const l=(0,sn.scalar)(1),u=(0,gt.sub)(l,(0,On.sum)((0,D.mul)(i,o),n,!0));return Jr(u,s,a)}});const ea=(0,h.op)({hingeLoss_:function(e,t,n,r=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){let a=(0,c.convertToTensor)(e,"labels","hingeLoss");const i=(0,c.convertToTensor)(t,"predictions","hingeLoss");let o=null;null!=n&&(o=(0,c.convertToTensor)(n,"weights","hingeLoss")),(0,d.assertShapesMatch)(a.shape,i.shape,"Error in hingeLoss: ");const s=(0,sn.scalar)(1);a=(0,gt.sub)((0,D.mul)((0,sn.scalar)(2),a),s);const l=(0,Jt.relu)((0,gt.sub)(s,(0,D.mul)(a,i)));return Jr(l,o,r)}});const ta=(0,h.op)({huberLoss_:function(e,t,n,r=1,i=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const o=(0,c.convertToTensor)(e,"labels","huberLoss"),l=(0,c.convertToTensor)(t,"predictions","huberLoss");let u=null;null!=n&&(u=(0,c.convertToTensor)(n,"weights","huberLoss")),(0,d.assertShapesMatch)(o.shape,l.shape,"Error in huberLoss: ");const h=(0,sn.scalar)(r),f=(0,a.abs)((0,gt.sub)(l,o)),p=(0,dt.minimum)(f,h),m=(0,gt.sub)(f,p),g=(0,s.add)((0,D.mul)((0,sn.scalar)(.5),(0,mt.square)(p)),(0,D.mul)(h,m));return Jr(g,u,i)}});const na=(0,h.op)({logLoss_:function(e,t,n,r=1e-7,a=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const i=(0,c.convertToTensor)(e,"labels","logLoss"),o=(0,c.convertToTensor)(t,"predictions","logLoss");let l=null;null!=n&&(l=(0,c.convertToTensor)(n,"weights","logLoss")),(0,d.assertShapesMatch)(i.shape,o.shape,"Error in logLoss: ");const u=(0,sn.scalar)(1),h=(0,sn.scalar)(r),f=(0,vt.neg)((0,D.mul)(i,(0,Ue.log)((0,s.add)(o,h)))),p=(0,D.mul)((0,gt.sub)(u,i),(0,Ue.log)((0,s.add)((0,gt.sub)(u,o),h))),m=(0,gt.sub)(f,p);return Jr(m,l,a)}});const ra=(0,h.op)({meanSquaredError_:function(e,t,n,r=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){const a=(0,c.convertToTensor)(e,"labels","meanSquaredError"),i=(0,c.convertToTensor)(t,"predictions","meanSquaredError");let o=null;null!=n&&(o=(0,c.convertToTensor)(n,"weights","meanSquaredError")),(0,d.assertShapesMatch)(a.shape,i.shape,"Error in meanSquaredError: ");const s=(0,En.squaredDifference)(a,i);return Jr(s,o,r)}});const aa=(0,h.op)({sigmoidCrossEntropy_:function(e,t,n,r=0,i=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){let o=(0,c.convertToTensor)(e,"multiClassLabels","sigmoidCrossEntropy");const l=(0,c.convertToTensor)(t,"logits","sigmoidCrossEntropy");let u=null;if(null!=n&&(u=(0,c.convertToTensor)(n,"weights","sigmoidCrossEntropy")),(0,d.assertShapesMatch)(o.shape,l.shape,"Error in sigmoidCrossEntropy: "),r>0){const e=(0,sn.scalar)(r),t=(0,sn.scalar)(1),n=(0,sn.scalar)(.5);o=(0,s.add)((0,D.mul)(o,(0,gt.sub)(t,e)),(0,D.mul)(n,e))}const h=function(e,t){const n=(0,c.convertToTensor)(e,"labels","sigmoidCrossEntropyWithLogits"),r=(0,c.convertToTensor)(t,"logits","sigmoidCrossEntropyWithLogits");(0,d.assertShapesMatch)(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: ");const i=(0,Jt.relu)(r),o=(0,D.mul)(r,n),l=(0,We.log1p)((0,ke.exp)((0,vt.neg)((0,a.abs)(r))));return(0,s.add)((0,gt.sub)(i,o),l)}(o,l);return Jr(h,u,i)}});const ia=(0,h.op)({softmaxCrossEntropy_:function(e,t,n,r=0,a=Kr.Reduction.SUM_BY_NONZERO_WEIGHTS){let i=(0,c.convertToTensor)(e,"onehotLabels","softmaxCrossEntropy");const o=(0,c.convertToTensor)(t,"logits","softmaxCrossEntropy");let l=null;if(null!=n&&(l=(0,c.convertToTensor)(n,"weights","softmaxCrossEntropy")),(0,d.assertShapesMatch)(i.shape,o.shape,"Error in softmaxCrossEntropy: "),r>0){const e=(0,sn.scalar)(r),t=(0,sn.scalar)(1),n=(0,sn.scalar)(i.shape[1]);i=(0,s.add)((0,D.mul)(i,(0,gt.sub)(t,e)),(0,pe.div)(e,n))}const u=function(e,t,n=-1){if(-1===n&&(n=t.rank-1),n!==t.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${t.rank} and dim was ${n}`);const r=(0,pr.customGrad)(((e,t,r)=>{const a=(0,Ye.logSumExp)(t,[n],!0),i=(0,gt.sub)((0,x.cast)(t,"float32"),a);r([e,i]);const o=(0,vt.neg)((0,D.mul)(i,e));return{value:(0,On.sum)(o,[n]),gradFunc:(e,t)=>{const[r,a]=t,i=(0,pt.expandShapeToKeepDim)(e.shape,[n]);return[(0,D.mul)((0,S.reshape)(e,i),(0,gt.sub)((0,x.cast)(r,"float32"),(0,ke.exp)(a))),(0,D.mul)((0,S.reshape)(e,i),(0,gt.sub)((0,ke.exp)(a),(0,x.cast)(r,"float32")))]}}}));return r(e,t)}(i,o);return Jr(u,l,a)}});const oa=(0,h.op)({sparseFillEmptyRows_:function(e,t,n,r){const a=(0,c.convertToTensor)(e,"indices","sparseFillEmptyRows","int32"),i=(0,c.convertToTensor)(t,"values","sparseFillEmptyRows"),o=(0,c.convertToTensor)(n,"denseShape","sparseFillEmptyRows","int32"),s=(0,c.convertToTensor)(r,"defaultValue","sparseFillEmptyRows",i.dtype);if(2!==a.rank)throw new Error(`Indices should be Tensor2D but received shape\n ${a.shape}`);if(1!==i.rank)throw new Error(`Values should be Tensor1D but received shape ${i.shape}`);if(1!==o.rank)throw new Error(`Dense shape should be Tensor1D but received shape ${o.shape}`);if(0!==s.rank)throw new Error(`Default value should be a scalar but received shape ${s.shape}`);const d={indices:a,values:i,denseShape:o,defaultValue:s},h=l.ENGINE.runKernel(u.SparseFillEmptyRows,d);return{outputIndices:h[0],outputValues:h[1],emptyRowIndicator:h[2],reverseIndexMap:h[3]}}});const sa=(0,h.op)({sparseReshape_:function(e,t,n){const r=(0,c.convertToTensor)(e,"inputIndices","sparseReshape","int32"),a=(0,c.convertToTensor)(t,"inputShape","sparseReshape","int32"),i=(0,c.convertToTensor)(n,"newShape","sparseReshape","int32");if(2!==r.rank)throw new Error(`Input indices should be Tensor2D but received shape\n ${r.shape}`);if(1!==a.rank)throw new Error(`Input shape should be Tensor1D but received shape ${a.shape}`);if(1!==i.rank)throw new Error(`New shape should be Tensor1D but received shape ${i.shape}`);const o={inputIndices:r,inputShape:a,newShape:i},s=l.ENGINE.runKernel(u.SparseReshape,o);return{outputIndices:s[0],outputShape:s[1]}}});const la=(0,h.op)({sparseSegmentMean_:function(e,t,n){const r=(0,c.convertToTensor)(e,"data","sparseSegmentMean"),a=(0,c.convertToTensor)(t,"indices","sparseSegmentMean","int32"),i=(0,c.convertToTensor)(n,"segmentIds","sparseSegmentMean","int32");if(r.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.rank)throw new Error(`Indices should be Tensor1D but received shape\n ${a.shape}`);if(1!==i.rank)throw new Error(`Segment ids should be Tensor1D but received shape\n ${i.shape}`);const o={data:r,indices:a,segmentIds:i};return l.ENGINE.runKernel(u.SparseSegmentMean,o)}});const ua=(0,h.op)({sparseSegmentSum_:function(e,t,n){const r=(0,c.convertToTensor)(e,"data","sparseSegmentSum"),a=(0,c.convertToTensor)(t,"indices","sparseSegmentSum","int32"),i=(0,c.convertToTensor)(n,"segmentIds","sparseSegmentSum","int32");if(r.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==a.rank)throw new Error(`Indices should be Tensor1D but received shape\n ${a.shape}`);if(1!==i.rank)throw new Error(`Segment ids should be Tensor1D but received shape\n ${i.shape}`);const o={data:r,indices:a,segmentIds:i};return l.ENGINE.runKernel(u.SparseSegmentSum,o)}});const ca=(0,h.op)({stringNGrams_:function(e,t,n,r,a,i,o,s){const d=(0,c.convertToTensor)(e,"data","stringNGrams","string");if("string"!==d.dtype)throw new Error("Data must be of datatype string");if(1!==d.shape.length)throw new Error(`Data must be a vector, saw: ${d.shape}`);const h=(0,c.convertToTensor)(t,"dataSplits","stringNGrams");if("int32"!==h.dtype)throw new Error("Data splits must be of datatype int32");const f={separator:n,nGramWidths:r,leftPad:a,rightPad:i,padWidth:o,preserveShortSequences:s},p={data:d,dataSplits:h},m=l.ENGINE.runKernel(u.StringNGrams,p,f);return{nGrams:m[0],nGramsSplits:m[1]}}});const da=(0,h.op)({stringSplit_:function(e,t,n=!0){const r=(0,c.convertToTensor)(e,"input","stringSplit","string"),a=(0,c.convertToTensor)(t,"delimiter","stringSplit","string");if(1!==r.rank)throw new Error(`Input should be Tensor1D but received shape ${r.shape}`);if(0!==a.rank)throw new Error(`Delimiter should be a scalar but received shape ${a.shape}`);const i={skipEmpty:n},o={input:r,delimiter:a},s=l.ENGINE.runKernel(u.StringSplit,o,i);return{indices:s[0],values:s[1],shape:s[2]}}});const ha=(0,h.op)({stringToHashBucketFast_:function(e,t){const n=(0,c.convertToTensor)(e,"input","stringToHashBucketFast","string"),r={numBuckets:t};if(t<=0)throw new Error("Number of buckets must be at least 1");const a={input:n};return l.ENGINE.runKernel(u.StringToHashBucketFast,a,r)}});const fa=(0,h.op)({staticRegexReplace_:function(e,t,n,r=!0){const a=(0,c.convertToTensor)(e,"input","staticRegexReplace","string"),i={pattern:t,rewrite:n,replaceGlobal:r};return l.ENGINE.runKernel(u.StaticRegexReplace,{x:a},i)}}),pa={fft:wn.fft,ifft:Fn.ifft,rfft:xn.rfft,irfft:kn.irfft},ma={hammingWindow:xr,hannWindow:Ar,frame:Sr,stft:Er},ga={flipLeftRight:Tr,grayscaleToRGB:Dr,resizeNearestNeighbor:Hr.resizeNearestNeighbor,resizeBilinear:zr.resizeBilinear,rgbToGrayscale:Ir,rotateWithOffset:Or,cropAndResize:Cr,nonMaxSuppression:Mr,nonMaxSuppressionAsync:Lr,nonMaxSuppressionWithScore:Nr,nonMaxSuppressionWithScoreAsync:Br,nonMaxSuppressionPadded:jr,nonMaxSuppressionPaddedAsync:Vr,threshold:Ur,transform:Wr},ya={bandPart:qr,gramSchmidt:$r,qr:Xr},_a={absoluteDifference:Zr,computeWeightedLoss:Jr,cosineDistance:Qr,hingeLoss:ea,huberLoss:ta,logLoss:na,meanSquaredError:ra,sigmoidCrossEntropy:aa,softmaxCrossEntropy:ia},ba={sparseFillEmptyRows:oa,sparseReshape:sa,sparseSegmentMean:la,sparseSegmentSum:ua},va={stringNGrams:ca,stringSplit:da,stringToHashBucketFast:ha,staticRegexReplace:fa}},79216:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pad:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({pad_:function(e,t,n=0){const o=(0,i.convertToTensor)(e,"x","pad");if(0===o.rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");const s={paddings:t,constantValue:n},l={x:o};return r.ENGINE.runKernel(a.PadV2,l,s)}})},43199:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pool:()=>h});var r=n(41564),a=n(42890),i=n(55794),o=n(89365),s=n(48938),l=n(61476),u=n(8844),c=n(9175),d=n(33625);const h=(0,u.op)({pool_:function(e,t,n,u,h,f,p){null==h&&(h=[1,1]),null==f&&(f=1),0===u&&(u="valid");const m=(0,r.convertToTensor)(e,"x","maxPool");let g=m,y=!1;3===m.rank&&(y=!0,g=(0,c.reshape)(m,[1,m.shape[0],m.shape[1],m.shape[2]])),a.assert(s.eitherStridesOrDilationsAreOne(f,h),(()=>`Error in pool: Either strides or dilations must be 1. Got strides ${f} and dilations '${h}'`));const _=s.computePool2DInfo(g.shape,t,f,h,u),b=[_.dilationHeight,_.dilationWidth];let v;v="same"===u?function(e,t){const n=e.map(((e,n)=>e+(e-1)*(t[n]-1))),r=n.map((e=>e-1)),a=r.map((e=>Math.floor(e/2))),i=r.map(((e,t)=>e-a[t]));return r.map(((e,t)=>[a[t],i[t]]))}([_.filterHeight,_.filterWidth],b):[[0,0],[0,0]];const w=1===b[0]&&1===b[1],[F,k]=function(e,t,n){const r=n.map((e=>e[0])),a=n.map((e=>e[1])),i=e.concat(r,a),o=t.map(((e,t)=>(e-i[t]%e)%e)),s=a.map(((e,t)=>e+o[t])),l=t.map(((e,t)=>[r[t],s[t]])),u=t.map(((e,t)=>[0,o[t]]));return[l,u]}([_.inHeight,_.inWidth],b,v),x=w?u:"valid",A=w?g:(0,d.spaceToBatchND)(g,b,F),S=("avg"===n?()=>(0,i.avgPool)(A,t,f,x,p):()=>(0,l.maxPool)(A,t,f,x,p))(),E=w?S:(0,o.batchToSpaceND)(S,b,k);return y?(0,c.reshape)(E,[E.shape[1],E.shape[2],E.shape[3]]):E}})},54619:(e,t,n)=>{"use strict";n.r(t),n.d(t,{pow:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({pow_:function(e,t){let n=(0,o.convertToTensor)(e,"base","pow"),s=(0,o.convertToTensor)(t,"exp","pow");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Pow,l)}})},84247:(e,t,n)=>{"use strict";n.r(t),n.d(t,{prelu:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({prelu_:function(e,t){const n={x:(0,i.convertToTensor)(e,"x","prelu"),alpha:(0,i.convertToTensor)(t,"alpha","prelu")};return r.ENGINE.runKernel(a.Prelu,n)}})},65734:(e,t,n)=>{"use strict";function r(e,t=!1){console.log(e.toString(t))}n.r(t),n.d(t,{print:()=>r})},7756:(e,t,n)=>{"use strict";n.r(t),n.d(t,{prod:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(27322);const s=(0,n(8844).op)({prod_:function(e,t=null,n=!1){let s=(0,i.convertToTensor)(e,"x","prod");"bool"===s.dtype&&(s=(0,o.cast)(s,"int32"));const l={x:s},u={axis:t,keepDims:n};return r.ENGINE.runKernel(a.Prod,l,u)}})},16733:(e,t,n)=>{"use strict";n.r(t),n.d(t,{real:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({real_:function(e){const t={input:(0,i.convertToTensor)(e,"input","real")};return r.ENGINE.runKernel(a.Real,t)}})},36637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{reciprocal:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({reciprocal_:function(e){const t={x:(0,i.convertToTensor)(e,"x","reciprocal")};return r.ENGINE.runKernel(a.Reciprocal,t)}})},69243:(e,t,n)=>{"use strict";n.r(t),n.d(t,{relu:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({relu_:function(e){const t={x:(0,i.convertToTensor)(e,"x","relu")};return r.ENGINE.runKernel(a.Relu,t)}})},72561:(e,t,n)=>{"use strict";n.r(t),n.d(t,{relu6:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({relu6_:function(e){const t={x:(0,i.convertToTensor)(e,"x","relu6")};return r.ENGINE.runKernel(a.Relu6,t)}})},9175:(e,t,n)=>{"use strict";n.r(t),n.d(t,{reshape:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({reshape_:function(e,t){const n={x:(0,i.convertToTensor)(e,"x","reshape","string_or_numeric")},o={shape:t};return r.ENGINE.runKernel(a.Reshape,n,o)}})},4531:(e,t,n)=>{"use strict";n.r(t),n.d(t,{reverse:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({reverse_:function(e,t){const n={x:(0,i.convertToTensor)(e,"x","reverse")},o={dims:t};return r.ENGINE.runKernel(a.Reverse,n,o)}})},18069:(e,t,n)=>{"use strict";n.r(t),n.d(t,{round:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({round_:function(e){const t={x:(0,i.convertToTensor)(e,"x","round")};return r.ENGINE.runKernel(a.Round,t)}})},17009:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rsqrt:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({rsqrt_:function(e){const t={x:(0,i.convertToTensor)(e,"x","rsqrt","float32")};return r.ENGINE.runKernel(a.Rsqrt,t)}})},71285:(e,t,n)=>{"use strict";n.r(t),n.d(t,{scalar:()=>i});var r=n(4152),a=n(45074);function i(e,t){if(((0,r.isTypedArray)(e)&&"string"!==t||Array.isArray(e))&&"complex64"!==t)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"===t&&(0,r.isTypedArray)(e)&&!(e instanceof Uint8Array))throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.");return(0,a.makeTensor)(e,[],[],t)}},35048:(e,t,n)=>{"use strict";n.r(t),n.d(t,{calculateShapes:()=>o,validateInput:()=>i,validateUpdateShape:()=>a});var r=n(42890);function a(e,t,n){const r=t.rank>1?t.shape[t.rank-1]:1,a=t.rank>1?t.rank-1:1,i=`Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: ${n.shape}, indices.shape: ${t.shape}, shape: ${e}, sliceDim: ${r}, and batchDim: ${a}.`;if(n.rank1?t.shape[a-1]:1,o=n.length;let s=1;for(let r=i;r{"use strict";n.r(t),n.d(t,{selu:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({selu_:function(e){const t={x:(0,i.convertToTensor)(e,"x","selu")};return r.ENGINE.runKernel(a.Selu,t)}})},43245:(e,t,n)=>{"use strict";n.r(t),n.d(t,{SELU_SCALE:()=>a,SELU_SCALEALPHA:()=>r});const r=1.7580993408473768,a=1.0507009873554805},50549:(e,t,n)=>{"use strict";n.r(t),n.d(t,{separableConv2d:()=>u});var r=n(41564),a=n(42890),i=n(58625),o=n(78819),s=n(8844),l=n(9175);const u=(0,s.op)({separableConv2d_:function(e,t,n,s,u,c=[1,1],d="NHWC"){const h=(0,r.convertToTensor)(e,"x","separableConv2d"),f=(0,r.convertToTensor)(t,"depthwiseFilter","separableConv2d"),p=(0,r.convertToTensor)(n,"pointwiseFilter","separableConv2d");let m=h,g=!1;if(3===h.rank&&(g=!0,m=(0,l.reshape)(h,[1,h.shape[0],h.shape[1],h.shape[2]])),"NCHW"===d)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");a.assert(4===m.rank,(()=>`Error in separableConv2d: input must be rank 4, but got rank ${m.rank}.`)),a.assert(4===f.rank,(()=>`Error in separableConv2d: depthwise filter must be rank 4, but got rank ${f.rank}.`)),a.assert(4===p.rank,(()=>`Error in separableConv2d: pointwise filter must be rank 4, but got rank ${f.rank}.`)),a.assert(1===p.shape[0],(()=>`Error in separableConv2d: the first dimension of pointwise filter must be 1, but got ${p.shape[0]}.`)),a.assert(1===p.shape[1],(()=>`Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${p.shape[1]}.`));const y=f.shape[2],_=f.shape[3];a.assert(p.shape[2]===y*_,(()=>`Error in separableConv2d: the third dimension of pointwise filter must be ${y*_}, but got ${p.shape[2]}.`));const b=(0,o.depthwiseConv2d)(m,f,s,u,d,c),v=(0,i.conv2d)(b,p,1,"valid",d);return g?(0,l.reshape)(v,[v.shape[1],v.shape[2],v.shape[3]]):v}})},72509:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sigmoid:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({sigmoid_:function(e){const t={x:(0,i.convertToTensor)(e,"x","sigmoid","float32")};return r.ENGINE.runKernel(a.Sigmoid,t)}})},58100:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sign:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({sign_:function(e){const t={x:(0,i.convertToTensor)(e,"x","sign")};return r.ENGINE.runKernel(a.Sign,t)}})},35335:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sin:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({sin_:function(e){const t={x:(0,i.convertToTensor)(e,"x","sin","float32")};return r.ENGINE.runKernel(a.Sin,t)}})},51847:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sinh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({sinh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","sinh")};return r.ENGINE.runKernel(a.Sinh,t)}})},52439:(e,t,n)=>{"use strict";n.r(t),n.d(t,{slice:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({slice_:function(e,t,n){const o=(0,i.convertToTensor)(e,"x","slice","string_or_numeric");if(0===o.rank)throw new Error("Slicing scalar is not possible");const s={x:o},l={begin:t,size:n};return r.ENGINE.runKernel(a.Slice,s,l)}})},69130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assertParamsValid:()=>o,computeFlatOffset:()=>b,computeOutShape:()=>l,getNormalizedAxes:()=>h,isSliceContinous:()=>_,maskToAxes:()=>s,parseSliceParams:()=>v,sliceInfo:()=>w,startForAxis:()=>g,startIndicesWithElidedDims:()=>f,stopForAxis:()=>y,stopIndicesWithElidedDims:()=>p,stridesForAxis:()=>m,stridesWithElidedDims:()=>u});var r=n(42890);const a=-2,i=-1;function o(e,t,n){const a=e.shape.length;r.assert(a===t.length,(()=>`Error in slice${a}D: Length of begin ${t} must match the rank of the array (${a}).`)),r.assert(a===n.length,(()=>`Error in slice${a}D: Length of size ${n} must match the rank of the array (${a}).`));for(let i=0;i`Error in slice${a}D: begin[${i}] + size[${i}] (${t[i]+n[i]}) would overflow input.shape[${i}] (${e.shape[i]})`))}function s(e){const t=[];let n=0;for(;e>0;)1&e&&t.push(n),e/=2,n++;return t}function l(e,t,n){const r=[];for(let a=0;a0){const l=t[0],c=n+1;d=f(o,l,c,r,e),h=p(s,l,c,a,e),_=u(i,l,c,e)}else for(let u=0;u-1)i[s]=0;else{const a=c(t,n,s);let o=r[a];e&1<-1)o[r]=Number.MAX_SAFE_INTEGER;else{const i=c(t,n,r);let s=a[i];e&1<0?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);const u=a[i];return s<0&&(s+=u),s=r.clamp(0,s,u-1),s}function y(e,t,n,a,i,o){let s=t[i];const l=n[i]||1;(e&1<0?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER);const u=a[i];return s<0&&(s+=u),s=l>0?r.clamp(0,s,u):r.clamp(-1,s,u-1),s}function _(e,t,n){let r=n.length;for(let a=0;a1){r=a;break}for(let a=r+1;a0||n[a]!==e[a])return!1;return!0}function b(e,t){let n=e.length>0?e[e.length-1]:1;for(let r=0;r{r.assert(-1!==e,(()=>"slice() does not support negative begin indexing."))})),o=null==n?new Array(i).fill(-1):"number"===typeof n?[n,...new Array(i-1).fill(-1)]:n.lengtht>=0?t:(r.assert(-1===t,(()=>`Negative size values should be exactly -1 but got ${t} for the slice() size at index ${n}.`)),e.shape[n]-a[n]))),[a,o]}function w(e,t,n,r,o,s,l,u,c){let d;if(null==r?(d=new Array(t.length),d.fill(1)):d=r,null!=l&&0!==(l&l-1))throw new Error("Multiple ellipses in slice is not allowed.");let h=!1;const f={dims:d.length,numAddAxisAfterEllipsis:0,begin:t.slice(),end:n.slice(),strides:d.slice(),beginMask:o,endMask:s,ellipsisMask:l,newAxisMask:u,shrinkAxisMask:c};for(let a=0;a0?0:-1,p.strides[a]>0?n:n-1];if(t&&p.strides[a]<=0)throw Error("only stride 1 allowed on non-range indexing.");y=y&&1===p.strides[a];const o=!!(p.beginMask&1<=n)throw Error(`slice index ${p.begin[a]} of dimension ${a} out of bounds.`)}else p.begin[a]=F(p.begin[a],0,p.strides[a],n,r,i),p.end[a]=F(p.end[a],1,p.strides[a],n,r,i);const e=1===p.strides[a]&&0===p.begin[a]&&p.end[a]===n;m=m&&e,g=g&&(0===a&&1===p.strides[a]||e)}else m=m&&1===p.strides[a]&&o,g=g&&(0===a&&1===p.strides[a]||o);let s,l=!1;if(p.beginValid&&p.endValid?(s=p.end[a]-p.begin[a],l=!0):t?(s=1,l=!0):o&&n>=0&&(s=p.strides[a]<0?-n:n,l=!0),l){let e;e=0===s||s<0!==p.strides[a]<0?0:Math.trunc(s/p.strides[a])+(s%p.strides[a]!==0?1:0),_.push(e)}else _.push(-1)}for(let i=0;i=0?b.push(_[e]):e===a&&b.push(1)}return{finalShapeSparse:b.filter(((e,t)=>p.finalShapeGatherIndices[t]!==a)),finalShape:b,isIdentity:m,sliceDim0:g,isSimpleSlice:y,begin:p.begin,end:p.end,strides:p.strides}}function F(e,t,n,r,a,i){if(a[t])return n>0?i[t]:i[t+1&1];{const t=e<0?r+e:e;return ti[1]?i[1]:t}}},74855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{softmax:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({softmax_:function(e,t=-1){const n=(0,i.convertToTensor)(e,"logits","softmax","float32");if(-1===t&&(t=n.rank-1),t!==n.rank-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${n.rank} and dim was ${t}`);const o={logits:n},s={dim:t};return r.ENGINE.runKernel(a.Softmax,o,s)}})},89725:(e,t,n)=>{"use strict";n.r(t),n.d(t,{softplus:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({softplus_:function(e){const t={x:(0,i.convertToTensor)(e,"x","softplus")};return r.ENGINE.runKernel(a.Softplus,t)}})},33625:(e,t,n)=>{"use strict";n.r(t),n.d(t,{spaceToBatchND:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({spaceToBatchND_:function(e,t,n){const s=(0,i.convertToTensor)(e,"x","spaceToBatchND");o.assert(s.rank>=1+t.length,(()=>`input rank ${s.rank} should be > than [blockShape] ${t.length}`)),o.assert(n.length===t.length,(()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] ${t.length}`)),o.assert(s.shape.reduce(((e,r,a)=>a>0&&a<=t.length?e&&(r+n[a-1][0]+n[a-1][1])%t[a-1]===0:e),!0),(()=>`input spatial dimensions ${s.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes ${t.toString()}`));const l={x:s},u={blockShape:t,paddings:n};return r.ENGINE.runKernel(a.SpaceToBatchND,l,u)}})},83422:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fft:()=>o});var r=n(55279),a=n(55626),i=n(42890);const o=(0,n(8844).op)({fft_:function(e){(0,i.assert)("complex64"===e.dtype,(()=>`The dtype for tf.spectral.fft() must be complex64 but got ${e.dtype}.`));const t={input:e};return r.ENGINE.runKernel(a.FFT,t)}})},18533:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ifft:()=>o});var r=n(55279),a=n(55626),i=n(42890);const o=(0,n(8844).op)({ifft_:function(e){(0,i.assert)("complex64"===e.dtype,(()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${e.dtype}.`));const t={input:e};return r.ENGINE.runKernel(a.IFFT,t)}})},75667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{irfft:()=>p});var r=n(97629),a=n(27493),i=n(8639),o=n(46939),s=n(8844),l=n(16733),u=n(9175),c=n(4531),d=n(71285),h=n(52439),f=n(18533);const p=(0,s.op)({irfft_:function(e){const t=e.shape[e.shape.length-1],n=e.size/t;let s;if(t<=2){const r=(0,u.reshape)(e,[n,t]);s=(0,f.ifft)(r)}else{const p=[n,2*(t-1)],m=(0,u.reshape)((0,l.real)(e),[n,t]),g=(0,u.reshape)((0,i.imag)(e),[n,t]),y=(0,c.reverse)((0,h.slice)(m,[0,1],[n,t-2]),1),_=(0,o.mul)((0,c.reverse)((0,h.slice)(g,[0,1],[n,t-2]),1),(0,d.scalar)(-1)),b=(0,a.concat)([m,y],1),v=(0,a.concat)([g,_],1),w=(0,u.reshape)((0,r.complex)(b,v),[p[0],p[1]]);s=(0,f.ifft)(w)}if(s=(0,l.real)(s),3===e.rank&&0!==e.shape[0]){const t=s,n=e.shape[0];s=(0,u.reshape)(s,[n,s.shape[0]/n,s.shape[1]]),t.dispose()}return s}})},90406:(e,t,n)=>{"use strict";n.r(t),n.d(t,{rfft:()=>m});var r=n(42890),a=n(97629),i=n(27493),o=n(8639),s=n(8844),l=n(16733),u=n(9175),c=n(52439),d=n(3429),h=n(29186),f=n(84130),p=n(83422);const m=(0,s.op)({rfft_:function(e,t){(0,r.assert)("float32"===e.dtype,(()=>`The dtype for rfft() must be real value but got ${e.dtype}`));let n=e.shape[e.shape.length-1];const s=e.size/n;let m;if(null!=t&&t0)),a=e.shape.map((e=>e));a[e.shape.length-1]=t,m=(0,c.slice)(e,r,a),n=t}else if(null!=t&&t>n){const r=e.shape.map((e=>e));r[e.shape.length-1]=t-n,m=(0,i.concat)([e,(0,h.zeros)(r)],e.shape.length-1),n=t}else m=e;const g=(0,f.zerosLike)(m),y=(0,u.reshape)((0,a.complex)(m,g),[s,n]),_=(0,p.fft)(y),b=Math.floor(n/2)+1,v=(0,l.real)(_),w=(0,o.imag)(_),F=(0,d.split)(v,[b,n-b],v.shape.length-1),k=(0,d.split)(w,[b,n-b],w.shape.length-1),x=m.shape.slice();return x[m.shape.length-1]=b,(0,u.reshape)((0,a.complex)(F[0],k[0]),x)}})},3429:(e,t,n)=>{"use strict";n.r(t),n.d(t,{split:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({split_:function(e,t,n=0){const o={x:(0,i.convertToTensor)(e,"x","split")},s={numOrSizeSplits:t,axis:n};return r.ENGINE.runKernel(a.SplitV,o,s)}})},96375:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sqrt:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({sqrt_:function(e){const t={x:(0,i.convertToTensor)(e,"x","sqrt","float32")};return r.ENGINE.runKernel(a.Sqrt,t)}})},58402:(e,t,n)=>{"use strict";n.r(t),n.d(t,{square:()=>i});var r=n(55279),a=n(41564);const i=(0,n(8844).op)({square_:function(e){const t=(0,a.convertToTensor)(e,"x","square");return r.ENGINE.runKernel("Square",{x:t},{})}})},26296:(e,t,n)=>{"use strict";n.r(t),n.d(t,{squaredDifference:()=>l});var r=n(55279),a=n(55626),i=n(81324),o=n(41564),s=n(57229);const l=(0,n(8844).op)({squaredDifference_:function(e,t){let n=(0,o.convertToTensor)(e,"a","squaredDifference"),l=(0,o.convertToTensor)(t,"b","squaredDifference");[n,l]=(0,i.makeTypesMatch)(n,l),(0,s.assertAndGetBroadcastShape)(n.shape,l.shape);const u={a:n,b:l};return r.ENGINE.runKernel(a.SquaredDifference,u,{})}})},45965:(e,t,n)=>{"use strict";n.r(t),n.d(t,{squeeze:()=>s});var r=n(41564),a=n(42890),i=n(8844),o=n(9175);const s=(0,i.op)({squeeze_:function(e,t){const n=(0,r.convertToTensor)(e,"x","squeeze","string_or_numeric");return(0,o.reshape)(n,(0,a.squeezeShape)(n.shape,t).newShape)}})},14829:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stack:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({stack_:function(e,t=0){const n=(0,i.convertToTensorArray)(e,"tensors","stack","string_or_numeric");o.assert(n.length>=1,(()=>"Pass at least one tensor to tf.stack")),n.length>0&&o.assert(t<=n[0].rank,(()=>"Axis must be <= rank of the tensor"));const s=n,l={axis:t};return r.ENGINE.runKernel(a.Pack,s,l)}})},84295:(e,t,n)=>{"use strict";n.r(t),n.d(t,{step:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({step_:function(e,t=0){const n={x:(0,i.convertToTensor)(e,"x","step")},o={alpha:t};return r.ENGINE.runKernel(a.Step,n,o)}})},7223:(e,t,n)=>{"use strict";n.r(t),n.d(t,{stridedSlice:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({stridedSlice_:function(e,t,n,o,s=0,l=0,u=0,c=0,d=0){const h={x:(0,i.convertToTensor)(e,"x","stridedSlice","string_or_numeric")},f={begin:t,end:n,strides:o,beginMask:s,endMask:l,ellipsisMask:u,newAxisMask:c,shrinkAxisMask:d};return r.ENGINE.runKernel(a.StridedSlice,h,f)}})},70839:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sub:()=>s});var r=n(55279),a=n(55626),i=n(81324),o=n(41564);const s=(0,n(8844).op)({sub_:function(e,t){let n=(0,o.convertToTensor)(e,"a","sub"),s=(0,o.convertToTensor)(t,"b","sub");[n,s]=(0,i.makeTypesMatch)(n,s);const l={a:n,b:s};return r.ENGINE.runKernel(a.Sub,l)}})},73630:(e,t,n)=>{"use strict";n.r(t),n.d(t,{sum:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(27322);const s=(0,n(8844).op)({sum_:function(e,t=null,n=!1){let s=(0,i.convertToTensor)(e,"x","sum");"bool"===s.dtype&&(s=(0,o.cast)(s,"int32"));const l={x:s},u={axis:t,keepDims:n};return r.ENGINE.runKernel(a.Sum,l,u)}})},7590:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tan:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({tan_:function(e){const t={x:(0,i.convertToTensor)(e,"x","tan","float32")};return r.ENGINE.runKernel(a.Tan,t)}})},7180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tanh:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({tanh_:function(e){const t={x:(0,i.convertToTensor)(e,"x","tanh","float32")};return r.ENGINE.runKernel(a.Tanh,t)}})},59720:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tensor:()=>i});var r=n(41564),a=n(45074);function i(e,t,n){const i=(0,r.inferShape)(e,n);return(0,a.makeTensor)(e,t,i,n)}},20763:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tensor3d:()=>o});var r=n(41564),a=n(42890),i=n(45074);function o(e,t,n){if((0,a.assertNonNull)(e),null!=t&&3!==t.length)throw new Error("tensor3d() requires shape to have three numbers");const o=(0,r.inferShape)(e,n);if(3!==o.length&&1!==o.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===o.length&&null==t)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return(0,i.makeTensor)(e,t,o,n)}},45074:(e,t,n)=>{"use strict";n.r(t),n.d(t,{makeTensor:()=>s});var r=n(55279),a=n(93027),i=n(42890),o=n(4152);function s(e,t,n,s){if(null==s)s=(0,i.inferDtype)(e);else if("complex64"===s)throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if((0,a.isWebGPUData)(e)||(0,a.isWebGLData)(e)){if("float32"!==s&&"int32"!==s)throw new Error(`Creating tensor from GPU data only supports 'float32'|'int32' dtype, while the dtype is ${s}.`);return r.ENGINE.backend.createTensorFromGPUData(e,t||n,s)}if(!(0,o.isTypedArray)(e)&&!Array.isArray(e)&&"number"!==typeof e&&"boolean"!==typeof e&&"string"!==typeof e)throw new Error("values passed to tensor(values) must be a number/boolean/string or an array of numbers/booleans/strings, or a TypedArray");if(null!=t){(0,i.assertNonNegativeIntegerDimensions)(t);const e=(0,i.sizeFromShape)(t),r=(0,i.sizeFromShape)(n);(0,i.assert)(e===r,(()=>`Based on the provided shape, [${t}], the tensor should have ${e} values but has ${r}`));for(let a=0;a`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `))}}return(0,o.isTypedArray)(e)||Array.isArray(e)||(e=[e]),t=t||n,e="string"!==s?(0,o.toTypedArray)(e,s):(0,o.flatten)(e,[],!0),r.ENGINE.makeTensor(e,t,s)}},18897:(e,t,n)=>{"use strict";n.r(t),n.d(t,{tile:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({tile_:function(e,t){const n=(0,i.convertToTensor)(e,"x","tile","string_or_numeric");o.assert(n.rank===t.length,(()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${t}.`));const s={x:n},l={reps:t};return r.ENGINE.runKernel(a.Tile,s,l)}})},15717:(e,t,n)=>{"use strict";n.r(t),n.d(t,{topk:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({topk_:function(e,t=1,n=!0){const o=(0,i.convertToTensor)(e,"x","topk");if(0===o.rank)throw new Error("topk() expects the input to be of rank 1 or higher");const s=o.shape[o.shape.length-1];if(t<0)throw new Error(`'k' passed to topk() must be >= 0 but got ${t}`);if(t>s)throw new Error(`'k' passed to topk() must be <= the last dimension (${s}) but got ${t}`);const l={x:o},u={k:t,sorted:n},[c,d]=r.ENGINE.runKernel(a.TopK,l,u);return{values:c,indices:d}}})},53058:(e,t,n)=>{"use strict";n.r(t),n.d(t,{transpose:()=>f});var r=n(55279),a=n(75238),i=n(55626),o=n(41564),s=n(42890),l=n(97629),u=n(8639),c=n(58235),d=n(8844),h=n(16733);const f=(0,d.op)({transpose_:function(e,t,n){const d=(0,o.convertToTensor)(e,"x","transpose");if(null==t&&(t=d.shape.map(((e,t)=>t)).reverse()),s.assert(d.rank===t.length,(()=>`Error in transpose: rank of input ${d.rank} must match length of perm ${t}.`)),t.forEach((e=>{s.assert(e>=0&&e"All entries in 'perm' must be between 0 and "+(d.rank-1)+` but got ${t}`))})),d.rank<=1)return d.clone();const f={x:d},p={perm:t};return"complex64"===d.dtype?(0,a.tidy)((()=>{let e=(0,h.real)(d),t=(0,u.imag)(d);return e=r.ENGINE.runKernel(i.Transpose,{x:e},p),t=r.ENGINE.runKernel(i.Transpose,{x:t},p),n&&(t=(0,c.neg)(t)),(0,l.complex)(e,t)})):r.ENGINE.runKernel(i.Transpose,f,p)}})},20438:(e,t,n)=>{"use strict";n.r(t),n.d(t,{unique:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({unique_:function(e,t=0){const n=(0,i.convertToTensor)(e,"x","unique","string_or_numeric");(0,o.assert)(n.rank>0,(()=>"The input tensor must be at least 1D"));const s={x:n},l={axis:t},[u,c]=r.ENGINE.runKernel(a.Unique,s,l);return{values:u,indices:c}}})},23509:(e,t,n)=>{"use strict";n.r(t),n.d(t,{unsortedSegmentSum:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({unsortedSegmentSum_:function(e,t,n){const s=(0,i.convertToTensor)(e,"x","unsortedSegmentSum"),l=(0,i.convertToTensor)(t,"segmentIds","unsortedSegmentSum","int32");(0,o.assert)((0,o.isInt)(n),(()=>"numSegments must be of dtype int"));const u={x:s,segmentIds:l},c={numSegments:n};return r.ENGINE.runKernel(a.UnsortedSegmentSum,u,c)}})},53032:(e,t,n)=>{"use strict";n.r(t),n.d(t,{unstack:()=>s});var r=n(55279),a=n(55626),i=n(41564),o=n(42890);const s=(0,n(8844).op)({unstack_:function(e,t=0){const n=(0,i.convertToTensor)(e,"x","unstack","string_or_numeric");o.assert(t>=-n.shape.length&&t`Axis = ${t} is not in [-${n.shape.length}, ${n.shape.length})`));const s={value:n},l={axis:t};return r.ENGINE.runKernel(a.Unpack,s,l)}})},1450:(e,t,n)=>{"use strict";n.r(t),n.d(t,{where:()=>l});var r=n(55279),a=n(55626),i=n(41564),o=n(68944),s=n(57229);const l=(0,n(8844).op)({where_:function(e,t,n){const l=(0,i.convertToTensor)(t,"a","where"),u=(0,i.convertToTensor)(n,"b","where"),c=(0,i.convertToTensor)(e,"condition","where","bool"),d=(0,s.assertAndGetBroadcastShape)((0,s.assertAndGetBroadcastShape)(c.shape,l.shape),u.shape),h={condition:(0,o.broadcastTo)(c,d),t:(0,o.broadcastTo)(l,d),e:(0,o.broadcastTo)(u,d)};return r.ENGINE.runKernel(a.Select,h)}})},29186:(e,t,n)=>{"use strict";n.r(t),n.d(t,{zeros:()=>o});var r=n(55279),a=n(42890),i=n(97629);function o(e,t="float32"){if((0,a.assertNonNegativeIntegerDimensions)(e),"complex64"===t){const t=o(e,"float32"),n=o(e,"float32");return(0,i.complex)(t,n)}const n=(0,a.makeZerosTypedArray)((0,a.sizeFromShape)(e),t);return r.ENGINE.makeTensor(n,e,t)}},84130:(e,t,n)=>{"use strict";n.r(t),n.d(t,{zerosLike:()=>o});var r=n(55279),a=n(55626),i=n(41564);const o=(0,n(8844).op)({zerosLike_:function(e){const t={x:(0,i.convertToTensor)(e,"x","zerosLike")};return r.ENGINE.runKernel(a.ZerosLike,t)}})},76815:(e,t,n)=>{"use strict";function r(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray}n.r(t),n.d(t,{isTypedArrayBrowser:()=>r})},9180:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Tensor:()=>_,TensorBuffer:()=>d,Variable:()=>v,getGlobalTensorClass:()=>b,setDeprecationWarningFn:()=>y,setOpHandler:()=>g,setTensorTracker:()=>m});var r=n(1278),a=n(42890);function i(e,t,n,r){const i=(0,a.computeStrides)(t),s=function(e,t,n,r){const i=(0,a.sizeFromShape)(t),s=r[r.length-1],l=new Array(s).fill(0),c=t.length,d="complex64"===n?u(e):e;if(c>1)for(let a=0;a" "+e)).join("\n")),h.join("\n")}function o(e,t,n){let r;return r=Array.isArray(e)?`${parseFloat(e[0].toFixed(7))} + ${parseFloat(e[1].toFixed(7))}j`:(0,a.isString)(e)?`'${e}'`:"bool"===n?s(e):parseFloat(e.toFixed(7)).toString(),(0,a.rightPad)(r,t)}function s(e){return 0===e?"false":"true"}function l(e,t,n,r,a,i=!0){const c="complex64"===n?2:1,d=t[0],h=t.length;if(0===h){if("complex64"===n){return[o(u(e)[0],0,n)]}return"bool"===n?[s(e[0])]:[e[0].toString()]}if(1===h){if(d>20){const t=3*c;let r=Array.from(e.slice(0,t)),i=Array.from(e.slice((d-3)*c,d*c));return"complex64"===n&&(r=u(r),i=u(i)),["["+r.map(((e,t)=>o(e,a[t],n))).join(", ")+", ..., "+i.map(((e,t)=>o(e,a[d-3+t],n))).join(", ")+"]"]}return["["+("complex64"===n?u(e):Array.from(e)).map(((e,t)=>o(e,a[t],n))).join(", ")+"]"]}const f=t.slice(1),p=r.slice(1),m=r[0]*c,g=[];if(d>20){for(let t=0;t<3;t++){const r=t*m,i=r+m;g.push(...l(e.slice(r,i),f,n,p,a,!1))}g.push("...");for(let t=d-3;t0?g[0]+y:"");for(let o=1;o`Length of values '${e}' does not match the size inferred by the shape '${this.size}'.`))}if("complex64"===t)throw new Error("complex64 dtype TensorBuffers are not supported. Please create a TensorBuffer for the real and imaginary parts separately and call tf.complex(real, imag).");this.values=n||a.getArrayFromDType(t,this.size),this.strides=(0,a.computeStrides)(e)}set(e,...t){0===t.length&&(t=[0]),a.assert(t.length===this.rank,(()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`));const n=this.locToIndex(t);this.values[n]=e}get(...e){0===e.length&&(e=[0]);let t=0;for(const r of e){if(r<0||r>=this.shape[t]){const t=`Requested out of range element at ${e}. Buffer shape=${this.shape}`;throw new Error(t)}t++}let n=e[e.length-1];for(let r=0;rc.decodeString(e)))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataToGPU(e){return this.throwIfDisposed(),h().readToGPU(this.dataId,e)}dataSync(){this.throwIfDisposed();const e=h().readSync(this.dataId);if("string"===this.dtype)try{return e.map((e=>c.decodeString(e)))}catch(t){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();const e=await h().read(this.dataId);return"string"===this.dtype?e:new Uint8Array(e.buffer)}dispose(){this.isDisposed||(this.kerasMask&&this.kerasMask.dispose(),h().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return f.print(this,e)}clone(){return this.throwIfDisposed(),f.clone(this)}toString(e=!1){return i(this.dataSync(),this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),f.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),h().makeVariable(this,e,t,n)}}function b(){return(0,r.getGlobal)("Tensor",(()=>_))}Object.defineProperty(_,Symbol.hasInstance,{value:e=>!!e&&null!=e.data&&null!=e.dataSync&&null!=e.throwIfDisposed}),b();class v extends _{constructor(e,t,n,r){super(e.shape,e.dtype,e.dataId,r),this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!a.arraysEqual(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);h().disposeTensor(this),this.dataId=e.dataId,h().incRef(this,null)}dispose(){h().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty(v,Symbol.hasInstance,{value:e=>e instanceof _&&null!=e.assign&&e.assign instanceof Function})},81324:(e,t,n)=>{"use strict";n.r(t),n.d(t,{assertTypesMatch:()=>s,getTensorsInContainer:()=>u,isTensorInList:()=>l,makeTypesMatch:()=>o});var r=n(9180),a=n(93027),i=n(42890);function o(e,t){if(e.dtype===t.dtype)return[e,t];const n=(0,a.upcastType)(e.dtype,t.dtype);return[e.cast(n),t.cast(n)]}function s(e,t){(0,i.assert)(e.dtype===t.dtype,(()=>`The dtypes of the first(${e.dtype}) and second(${t.dtype}) input must match`))}function l(e,t){return t.some((t=>t.id===e.id))}function u(e){const t=[];return c(e,t,new Set),t}function c(e,t,n){if(null==e)return;if(e instanceof r.Tensor)return void t.push(e);if(a=e,!Array.isArray(a)&&"object"!==typeof a)return;var a;const i=e;for(const r in i){const e=i[r];n.has(e)||(n.add(e),c(e,t,n))}}},41564:(e,t,n)=>{"use strict";n.r(t),n.d(t,{convertToTensor:()=>h,convertToTensorArray:()=>f,inferShape:()=>u});var r=n(55279),a=n(1023),i=n(9180),o=n(93027),s=n(4152),l=n(42890);function u(e,t){let n=e;if((0,s.isTypedArray)(e))return"string"===t?[]:[e.length];if((0,o.isWebGLData)(e)){const t=e.channels||"RGBA";return[e.height,e.width*t.length]}if((0,o.isWebGPUData)(e))return[e.buffer.size/(null==t?4:(0,l.bytesPerElement)(t))];if(!Array.isArray(e))return[];const r=[];for(;Array.isArray(n)||(0,s.isTypedArray)(n)&&"string"!==t;)r.push(n.length),n=n[0];return Array.isArray(e)&&(0,a.env)().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&c(e,r,[]),r}function c(e,t,n){if(n=n||[],!Array.isArray(e)&&!(0,s.isTypedArray)(e))return void(0,l.assert)(0===t.length,(()=>`Element arr[${n.join("][")}] is a primitive, but should be an array/TypedArray of ${t[0]} elements`));(0,l.assert)(t.length>0,(()=>`Element arr[${n.join("][")}] should be a primitive, but is an array of ${e.length} elements`)),(0,l.assert)(e.length===t[0],(()=>`Element arr[${n.join("][")}] should have ${t[0]} elements, but has ${e.length} elements`));const r=t.slice(1);for(let a=0;a=0&&(o=a),d(a,o,t,n),null==e||!(0,s.isTypedArray)(e)&&!Array.isArray(e)&&"number"!==typeof e&&"boolean"!==typeof e&&"string"!==typeof e){const r=null==e?"null":e.constructor.name;throw new Error(`Argument '${t}' passed to '${n}' must be a Tensor or TensorLike, but got '${r}'`)}const c=u(e,o);(0,s.isTypedArray)(e)||Array.isArray(e)||(e=[e]);const h="string"!==o?(0,s.toTypedArray)(e,o):(0,s.flatten)(e,[],!0);return r.ENGINE.makeTensor(h,c,o)}function f(e,t,n,r="numeric"){if(!Array.isArray(e))throw new Error(`Argument ${t} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return e.map(((e,a)=>h(e,`${t}[${a}]`,n,r)))}},2839:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TEST_EPSILON_FLOAT16:()=>l,createVideoElement:()=>b,encodeStrings:()=>_,expectArrayBuffersEqual:()=>y,expectArraysClose:()=>u,expectArraysEqual:()=>f,expectNumbersClose:()=>p,expectPromiseToFail:()=>h,expectValuesInRange:()=>g,play:()=>v,testEpsilon:()=>c});var r=n(55279),a=n(41564),i=n(4152),o=n(42890);const s=.001,l=.1;function u(e,t,n){return null==n&&(n=c()),d(e,t,((e,t)=>m(e,t,n)))}function c(){return 32===r.ENGINE.backend.floatPrecision()?s:l}function d(e,t,n){let r=!0;if(((0,i.isTypedArray)(e)||(0,i.isTypedArray)(t))&&(r=!1),(0,i.isTypedArray)(e)&&(0,i.isTypedArray)(t)&&(r=!0),r){const n=e.constructor.name,r=t.constructor.name;if(n!==r)throw new Error(`Arrays are of different type. Actual: ${n}. Expected: ${r}`)}if(Array.isArray(e)&&Array.isArray(t)){const n=(0,a.inferShape)(e),r=(0,a.inferShape)(t);if(!(0,o.arraysEqual)(n,r))throw new Error(`Arrays have different shapes. Actual: [${n}]. Expected: [${r}]`)}const s=(0,i.isTypedArray)(e)?e:(0,i.flatten)(e),l=(0,i.isTypedArray)(t)?t:(0,i.flatten)(t);if(s.length!==l.length)throw new Error(`Arrays have different lengths actual: ${s.length} vs expected: ${l.length}.\nActual: ${s}.\nExpected: ${l}.`);for(let a=0;at.fail()),(()=>t())),"undefined"!==typeof expect&&expect().nothing()}function f(e,t){const n="string"===typeof t||"number"===typeof t||"boolean"===typeof t?[t]:t;return(0,o.isString)(e)||(0,o.isString)(e[0])||(0,o.isString)(t)||(0,o.isString)(t[0])?d(e,n,((e,t)=>e==t)):d(e,t,((e,t)=>m(e,t,0)))}function p(e,t,n){if(null==n&&(n=c()),!m(e,t,n))throw new Error(`Numbers differ: actual === ${e}, expected === ${t}`);"undefined"!==typeof expect&&expect().nothing()}function m(e,t,n){return!isFinite(e)&&!isFinite(t)||!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function g(e,t,n){for(let r=0;rn)throw new Error(`Value out of range:${e[r]} low: ${t}, high: ${n}`)}function y(e,t){const n=new Float32Array(e),r=new Float32Array(t);if(n.length!==r.length)throw new Error(`Expected ArrayBuffer to be of length ${r.length}, but it was ${n.length}`);for(let a=0;a{t.addEventListener("loadeddata",(n=>e(t))),t.load()}))}async function v(e){await e.play(),"requestVideoFrameCallback"in e&&await new Promise((t=>{e.requestVideoFrameCallback(t)}))}},93027:(e,t,n)=>{"use strict";var r,a,i,o,s;n.r(t),n.d(t,{Rank:()=>r,isWebGLData:()=>d,isWebGPUData:()=>h,sumOutType:()=>c,upcastType:()=>u}),function(e){e.R0="R0",e.R1="R1",e.R2="R2",e.R3="R3",e.R4="R4",e.R5="R5",e.R6="R6"}(r||(r={})),function(e){e.float32="float32",e.int32="int32",e.bool="int32",e.complex64="complex64"}(a||(a={})),function(e){e.float32="float32",e.int32="int32",e.bool="bool",e.complex64="complex64"}(i||(i={})),function(e){e.float32="float32",e.int32="float32",e.bool="float32",e.complex64="complex64"}(o||(o={})),function(e){e.float32="complex64",e.int32="complex64",e.bool="complex64",e.complex64="complex64"}(s||(s={}));const l={float32:o,int32:a,bool:i,complex64:s};function u(e,t){if("string"===e||"string"===t){if("string"===e&&"string"===t)return"string";throw new Error(`Can not upcast ${e} with ${t}`)}return l[e][t]}function c(e){return u(e,"int32")}function d(e){return null!=e&&"object"===typeof e&&"texture"in e&&e.texture instanceof WebGLTexture}function h(e){return"undefined"!==typeof GPUBuffer&&null!=e&&"object"===typeof e&&"buffer"in e&&e.buffer instanceof GPUBuffer}},4152:(e,t,n)=>{"use strict";n.r(t),n.d(t,{arraysEqual:()=>i.arraysEqual,arraysEqualWithNull:()=>i.arraysEqualWithNull,assert:()=>i.assert,assertNonNegativeIntegerDimensions:()=>i.assertNonNegativeIntegerDimensions,assertNonNull:()=>i.assertNonNull,assertShapesMatch:()=>i.assertShapesMatch,bytesFromStringArray:()=>i.bytesFromStringArray,bytesPerElement:()=>i.bytesPerElement,checkConversionForErrors:()=>i.checkConversionForErrors,clamp:()=>i.clamp,computeStrides:()=>i.computeStrides,convertBackendValuesAndArrayBuffer:()=>i.convertBackendValuesAndArrayBuffer,createScalarValue:()=>v,createShuffledIndices:()=>i.createShuffledIndices,decodeString:()=>A,distSquared:()=>i.distSquared,encodeString:()=>x,fetch:()=>k,fingerPrint64:()=>b,flatten:()=>E,getArrayFromDType:()=>i.getArrayFromDType,getTypedArrayFromDType:()=>i.getTypedArrayFromDType,hasEncodingLoss:()=>i.hasEncodingLoss,hexToLong:()=>l,indexToLoc:()=>i.indexToLoc,inferDtype:()=>i.inferDtype,inferFromImplicitShape:()=>i.inferFromImplicitShape,isBoolean:()=>i.isBoolean,isFunction:()=>i.isFunction,isInt:()=>i.isInt,isNumber:()=>i.isNumber,isPromise:()=>i.isPromise,isScalarShape:()=>i.isScalarShape,isString:()=>i.isString,isTypedArray:()=>S,isValidDtype:()=>i.isValidDtype,locToIndex:()=>i.locToIndex,makeOnesTypedArray:()=>i.makeOnesTypedArray,makeZerosNestedTypedArray:()=>i.makeZerosNestedTypedArray,makeZerosTypedArray:()=>i.makeZerosTypedArray,nearestDivisor:()=>i.nearestDivisor,nearestLargerEven:()=>i.nearestLargerEven,now:()=>F,parseAxisParam:()=>i.parseAxisParam,randUniform:()=>i.randUniform,repeatedTry:()=>i.repeatedTry,rightPad:()=>i.rightPad,shuffle:()=>i.shuffle,shuffleCombo:()=>i.shuffleCombo,sizeFromShape:()=>i.sizeFromShape,sizeToSquarishShape:()=>i.sizeToSquarishShape,squeezeShape:()=>i.squeezeShape,sum:()=>i.sum,swap:()=>i.swap,tanh:()=>i.tanh,toNestedArray:()=>i.toNestedArray,toTypedArray:()=>w});var r=n(1023),a=n(76815),i=n(42890),o=n(52691);const s=n.n(o)()||o;function l(e){return s.fromString(e,!0,16)}const u=l("c3a5c85c97cb3127"),c=l("b492b66fbe98f273"),d=l("9ae16a3b2f90404f");function h(e){return e.xor(e.shru(47))}function f(e,t,n){const r=e.slice(t,t+n);return s.fromBytes(Array.from(r),!0,!0)}function p(e,t){return f(e,t,8)}function m(e,t){return f(e,t,4)}function g(e,t){return 0===t?e:e.shru(t).or(e.shl(64-t))}function y(e,t,n=l("9ddfea08eb382d69")){let r=e.xor(t).mul(n);r=r.xor(r.shru(47));let a=t.xor(r).mul(n);return a=a.xor(a.shru(47)),a=a.mul(n),a}function _(e,t,n,r){return function(e,t,n,r,a,i){a=a.add(e),i=g(i.add(a).add(r),21);const o=a;return a=(a=a.add(t)).add(n),i=i.add(g(a,44)),[a.add(r),i.add(o)]}(p(e,t),p(e,t+8),p(e,t+16),p(e,t+24),n,r)}function b(e,t=e.length){const n=s.fromNumber(81,!0);if(t<=32)return t<=16?function(e,t=e.length){if(t>=8){const n=d.add(2*t),r=p(e,0).add(d),a=p(e,t-8);return y(g(a,37).mul(n).add(r),g(r,25).add(a).mul(n),n)}if(t>=4){const n=d.add(2*t);return y(m(e,0).shl(3).add(t),m(e,t-4),n)}if(t>0){const n=e[0]+(e[t>>1]<<8),r=t+(e[t-1]<<2);return h(d.mul(n).xor(u.mul(r))).mul(d)}return d}(e,t):function(e,t=e.length){const n=d.add(2*t),r=p(e,0).mul(c),a=p(e,8),i=p(e,t-8).mul(n),o=p(e,t-16).mul(d);return y(g(r.add(a),43).add(g(i,30)).add(o),r.add(g(a.add(d),18)).add(i),n)}(e,t);if(t<=64)return function(e,t=e.length){const n=d.add(2*t),r=p(e,0).mul(d),a=p(e,8),i=p(e,t-8).mul(n),o=p(e,t-16).mul(d),s=g(r.add(a),43).add(g(i,30)).add(o),l=y(s,r.add(g(a.add(d),18)).add(i),n),u=p(e,16).mul(n),c=p(e,24),h=s.add(p(e,t-32)).mul(n),f=l.add(p(e,t-24)).mul(n);return y(g(u.add(c),43).add(g(h,30)).add(f),u.add(g(c.add(r),18)).add(h),n)}(e,t);let r=n,a=n.mul(c).add(113),i=h(a.mul(d).add(113)).mul(d),o=[s.UZERO,s.UZERO],l=[s.UZERO,s.UZERO];r=r.mul(d).add(p(e,0));let f=0;const b=64*(t-1>>6),v=b+(t-1&63)-63;do{r=g(r.add(a).add(o[0]).add(p(e,f+8)),37).mul(c),a=g(a.add(o[1]).add(p(e,f+48)),42).mul(c),r=r.xor(l[1]),a=a.add(o[0]).add(p(e,f+40)),i=g(i.add(l[0]),33).mul(c),o=_(e,f,o[1].mul(c),r.add(l[0])),l=_(e,f+32,i.add(l[1]),a.add(p(e,f+16))),[i,r]=[r,i],f+=64}while(f!==b);const w=c.add(i.and(255).shl(1));return f=v,l[0]=l[0].add(t-1&63),o[0]=o[0].add(l[0]),l[0]=l[0].add(o[0]),r=g(r.add(a).add(o[0]).add(p(e,f+8)),37).mul(w),a=g(a.add(o[1]).add(p(e,f+48)),42).mul(w),r=r.xor(l[1].mul(9)),a=a.add(o[0].mul(9).add(p(e,f+40))),i=g(i.add(l[0]),33).mul(w),o=_(e,f,o[1].mul(w),r.add(l[0])),l=_(e,f+32,i.add(l[1]),a.add(p(e,f+16))),[i,r]=[r,i],y(y(o[0],l[0],w).add(h(a).mul(u)).add(i),y(o[1],l[1],w).add(r),w)}function v(e,t){return"string"===t?x(e):w([e],t)}function w(e,t){if("string"===t)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=E(e)),(0,r.env)().getBool("DEBUG")&&i.checkConversionForErrors(e,t),function(e,t){return e instanceof Float32Array&&"float32"===t||e instanceof Int32Array&&"int32"===t||e instanceof Uint8Array&&"bool"===t}(e,t))return e;if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t){const t=new Uint8Array(e.length);for(let n=0;n{"use strict";function r(e){let t=e.length,n=0;for(;t>0;)n=Math.random()*t|0,t--,s(e,t,n)}function a(e,t){if(e.length!==t.length)throw new Error(`Array sizes must match to be shuffled together First array length was ${e.length}Second array length was ${t.length}`);let n=e.length,r=0;for(;n>0;)r=Math.random()*n|0,n--,s(e,n,r),s(t,n,r)}function i(e,t,n){return Math.max(e,Math.min(t,n))}function o(e){return e%2===0?e:e+1}function s(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function l(e){let t=0;for(let n=0;nn+` Shapes ${e} and ${t} must match`))}function f(e){d(null!=e,(()=>"The input to the tensor constructor must be a non-null value."))}function p(e){if(0===e.length)return 1;let t=e[0];for(let n=1;n0,n,r){return new Promise(((a,i)=>{let o=0;const s=()=>{if(e())return void a();o++;const l=t(o);null!=n&&o>=n?i():null!=r?r(s,l):setTimeout(s,l)};s()}))}function x(e,t){let n=1,r=-1;for(let i=0;i=0)n*=e[i];else if(-1===e[i]){if(-1!==r)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${r} and dim ${i}`);r=i}else if(e[i]<0)throw Error(`Shapes can not be < 0. Found ${e[i]} at dim ${i}`);if(-1===r){if(t>0&&t!==n)throw Error(`Size(${t}) must match the product of shape ${e}`);return e}if(0===n)throw Error(`Cannot infer the missing size in [${e}] when there are 0 elements`);if(t%n!==0)throw Error(`The implicit shape can't be a fractional number. Got ${t} / ${n}`);const a=e.slice();return a[r]=t/n,a}function A(e,t){const n=t.length;return d((e=null==e?t.map(((e,t)=>t)):[].concat(e)).every((e=>e>=-n&&e`All values in axis param must be in range [-${n}, ${n}) but got axis ${e}`)),d(e.every((e=>_(e))),(()=>`All values in axis param must be integers but got axis ${e}`)),e.map((e=>e<0?n+e:e))}function S(e,t){const n=[],r=[],a=null!=t&&Array.isArray(t)&&0===t.length,i=null==t||a?null:A(t,e).sort();let o=0;for(let s=0;ss)&&1===e[s]&&(n.push(e[s]),r.push(s)),i[o]<=s&&o++}1!==e[s]&&(n.push(e[s]),r.push(s))}return{newShape:n,keptDims:r}}function E(e,t){return C(e,t)}function C(e,t){let n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else if("bool"===e)n=new Uint8Array(t);else{if("string"!==e)throw new Error(`Unknown data type ${e}`);n=new Array(t)}return n}function T(e,t){for(let n=0;nt+=e.length)),t}function M(e){return"string"===typeof e||e instanceof String}function R(e){return"boolean"===typeof e}function L(e){return"number"===typeof e}function N(e){return Array.isArray(e)?N(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray?"int32":L(e)?"float32":M(e)?"string":R(e)?"bool":"float32"}function B(e){return!!(e&&e.constructor&&e.call&&e.apply)}function j(e,t){for(let n=t;n=0;--r)n[r]=n[r+1]*e[r+1];return n}function z(e,t,n,r=!1){const a=new Array;if(1===t.length){const i=t[0]*(r?2:1);for(let t=0;te*t))*(r?2:1);for(let t=0;te*t))*(n?2:1);if(0===r)return[];if(r!==t.length)throw new Error(`[${e}] does not match the input size ${t.length}${n?" for a complex tensor":""}.`);return z(0,e,t,n)}function U(e,t){if(Array.isArray(e))return e;if("float32"===t)return e instanceof Float32Array?e:new Float32Array(e);if("int32"===t)return e instanceof Int32Array?e:new Int32Array(e);if("bool"===t||"string"===t)return Uint8Array.from(new Int32Array(e));throw new Error(`Unknown dtype ${t}`)}function W(e,t){const n=q(e,t);for(let r=0;re*t),1);if(null==t||"float32"===t)return H(e,new Float32Array(n));if("int32"===t)return H(e,new Int32Array(n));if("bool"===t)return H(e,new Uint8Array(n));throw new Error(`Unknown data type ${t}`)}function Y(e){e.forEach((t=>{d(Number.isInteger(t)&&t>=0,(()=>`Tensor must have a shape comprised of positive integers but got shape [${e}].`))}))}function G(e,t,n){if(0===t)return 0;if(1===t)return e[0];let r=e[e.length-1];for(let a=0;ay,arraysEqualWithNull:()=>g,assert:()=>d,assertNonNegativeIntegerDimensions:()=>Y,assertNonNull:()=>f,assertShapesMatch:()=>h,bytesFromStringArray:()=>P,bytesPerElement:()=>O,checkConversionForErrors:()=>T,clamp:()=>i,computeStrides:()=>V,convertBackendValuesAndArrayBuffer:()=>U,createShuffledIndices:()=>w,distSquared:()=>c,getArrayFromDType:()=>C,getTypedArrayFromDType:()=>E,hasEncodingLoss:()=>I,indexToLoc:()=>X,inferDtype:()=>N,inferFromImplicitShape:()=>x,isBoolean:()=>R,isFunction:()=>B,isInt:()=>_,isNumber:()=>L,isPromise:()=>K,isScalarShape:()=>m,isString:()=>M,isValidDtype:()=>D,locToIndex:()=>G,makeOnesTypedArray:()=>W,makeZerosNestedTypedArray:()=>$,makeZerosTypedArray:()=>q,nearestDivisor:()=>j,nearestLargerEven:()=>o,parseAxisParam:()=>A,randUniform:()=>u,repeatedTry:()=>k,rightPad:()=>F,shuffle:()=>r,shuffleCombo:()=>a,sizeFromShape:()=>p,sizeToSquarishShape:()=>v,squeezeShape:()=>S,sum:()=>l,swap:()=>s,tanh:()=>b,toNestedArray:()=>H})},66592:(e,t,n)=>{"use strict";n.r(t),n.d(t,{asyncStorageIO:()=>j,bundleResourceIO:()=>H,cameraWithTensors:()=>de,decodeJpeg:()=>q,detectGLCapabilities:()=>re,fetch:()=>D,fromTexture:()=>ie,renderToGLView:()=>oe,toTexture:()=>ae,version:()=>$});n(32438);var r=n(15819),a=n(66723),i=n(60245),o=n(98587),s=n(91808),l=n(40495),u=n(28945),c=n(60430),d=n.n(c),h=n(36665),f=n(26725),p=n(33672),m=n(98943),g=n(75675),y=n(73929),_=n(50658),b=n(60397);const v=["pointerEvents","children","style"];const w=h.forwardRef(((e,t)=>(0,_.default)("canvas",Object.assign({},e,{ref:t})))),F=g.default.create({wrapper:{pointerEvents:"box-none"}}),k=e=>{let{pointerEvents:t,children:n,style:r}=e,a=(0,o.default)(e,v);const[i,s]=h.useState(null),l=h.useRef(null),u=h.useRef(null);function c(){const e=u.current;if("undefined"!==typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement){const t=d(),n=m.default.get();e.style.width=`${t.width}px`,e.style.height=`${t.height}px`,e.width=t.width*n,e.height=t.height*n}}function d(){if(i)return i;if(!l.current)return{width:0,height:0};const e=function(e){try{return(0,p.findDOMNode)(e)}catch{return e}}(l.current),{offsetWidth:t=0,offsetHeight:n=0}=e;return{width:t,height:n}}return h.useEffect((()=>{null!=l.current&&s(d())}),[l]),h.useEffect((()=>{c()}),[i]),h.useEffect((()=>{const e=u.current;e&&c(),function(e,t){e&&("function"===typeof e?e(t):"current"in e&&(e.current=t))}(a.canvasRef,e)}),[u]),(0,b.jsxs)(y.default,Object.assign({},a,{style:[F.wrapper,r],ref:l,onLayout:e=>{const{nativeEvent:{layout:{width:t,height:n}}}=e;t===i?.width&&n===i.height||(s({width:t,height:n}),a.onLayout&&a.onLayout(e))},children:[(0,b.jsx)(w,{ref:u,pointerEvents:t,style:g.default.absoluteFill}),n]}))},x=["onContextCreate","onContextRestored","onContextLost","webglContextAttributes","msaaSamples","nativeRef_EXPERIMENTAL","ref"];function A(e){if(null!=e&&"object"===typeof e&&e.downloadAsync){const t=e.localUri||e.uri||"",n=new Image;return n.src=t,n}return e}function S(e,t){if(!e)throw new s.CodedError("ERR_GL_INVALID","Attempting to use the GL context before it has been created.");const n=e.getContext("webgl2",t)||e.getContext("webgl",t)||e.getContext("webgl-experimental",t)||e.getContext("experimental-webgl",t);return d()(n,"Browser does not support WebGL"),(r=n).endFrameEXP=function(){},r._expo_texImage2D||(r._expo_texImage2D=r.texImage2D,r.texImage2D=(...e)=>{const t=[...e];return t.push(A(t.pop())),r._expo_texImage2D(...t)}),r._expo_texSubImage2D||(r._expo_texSubImage2D=r.texSubImage2D,r.texSubImage2D=(...e)=>{const t=[...e];return t.push(A(t.pop())),r._expo_texSubImage2D(...t)}),r;var r}class E extends h.Component{static async createContextAsync(){if(!l.default.isDOMAvailable)return null;const e=document.createElement("canvas"),{width:t,height:n,scale:r}=f.default.get("window");return e.width=t*r,e.height=n*r,S(e)}static async destroyContextAsync(e){return!0}static async takeSnapshotAsync(e,t={}){const{blob:n,width:r,height:a}=await async function(e,t={}){d()(e,"getBlobFromWebGLRenderingContext(): WebGL Rendering Context is not defined");const{canvas:n}=e;let r=null;var a;return r="function"===typeof n.msToBlob?await n.msToBlob():(a=n)&&"function"===typeof a.convertToBlob?await n.convertToBlob({quality:t.compress,type:t.format}):await new Promise((e=>{n.toBlob((t=>e(t)),t.format,t.compress)})),{blob:r,width:n.width,height:n.height}}(e,t);if(!n)throw new s.CodedError("ERR_GL_SNAPSHOT","Failed to save the GL context");return{uri:n,localUri:"",width:r,height:a}}componentWillUnmount(){if(this.gl){const e=this.gl.getExtension("WEBGL_lose_context");e&&e.loseContext(),this.gl=void 0}this.canvas&&(this.canvas.removeEventListener("webglcontextlost",this.onContextLost),this.canvas.removeEventListener("webglcontextrestored",this.onContextRestored))}render(){const e=this.props,t=(0,o.default)(e,x);return(0,b.jsx)(k,Object.assign({},t,{canvasRef:this.setCanvasRef}))}componentDidUpdate(e){const{webglContextAttributes:t}=this.props;this.canvas&&t!==e.webglContextAttributes&&(this.onContextLost(null),this.onContextRestored())}getGLContextOrReject(){const e=this.getGLContext();if(!e)throw new s.CodedError("ERR_GL_INVALID","Attempting to use the GL context before it has been created.");return e}onContextLost=e=>{e&&e.preventDefault&&e.preventDefault(),this.gl=void 0,"function"===typeof this.props.onContextLost&&this.props.onContextLost()};onContextRestored=()=>{if(this.gl=void 0,null==this.getGLContext())throw new s.CodedError("ERR_GL_INVALID","Failed to restore GL context.")};getGLContext(){return this.gl?this.gl:this.canvas?(this.gl=S(this.canvas,this.props.webglContextAttributes),"function"===typeof this.props.onContextCreate&&this.props.onContextCreate(this.gl),this.gl):null}setCanvasRef=e=>{this.canvas=e,"function"===typeof this.props.nativeRef_EXPERIMENTAL&&this.props.nativeRef_EXPERIMENTAL(e),this.canvas&&(this.canvas.addEventListener("webglcontextlost",this.onContextLost),this.canvas.addEventListener("webglcontextrestored",this.onContextRestored),this.getGLContext())};async takeSnapshotAsync(e={}){if(!E.takeSnapshotAsync)throw new u.UnavailabilityError("expo-gl","takeSnapshotAsync");const t=this.getGLContextOrReject();return await E.takeSnapshotAsync(t,e)}async startARSessionAsync(){throw new u.UnavailabilityError("GLView","startARSessionAsync")}async createCameraTextureAsync(){throw new u.UnavailabilityError("GLView","createCameraTextureAsync")}async destroyObjectAsync(e){throw new u.UnavailabilityError("GLView","destroyObjectAsync")}}var C=n(95991);function T(e){const t=new Headers;return e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((e=>{const n=e.split(":"),r=n.shift().trim();if(r){const e=n.join(":").trim();t.append(r,e)}})),t}async function D(e,t,n){return new Promise(((r,a)=>{const i=new Request(e,t),o=new XMLHttpRequest;o.onload=()=>{const e={status:o.status,statusText:o.statusText,headers:T(o.getAllResponseHeaders()||""),url:""};e.url="responseURL"in o?o.responseURL:e.headers.get("X-Request-URL");const t="response"in o?o.response:o.responseText;r(new Response(t,e))},o.onerror=()=>a(new TypeError("Network request failed")),o.ontimeout=()=>a(new TypeError("Network request failed")),o.open(i.method,i.url,!0),"include"===i.credentials?o.withCredentials=!0:"omit"===i.credentials&&(o.withCredentials=!1),null!=n&&n.isBinary&&(o.responseType="arraybuffer"),i.headers.forEach(((e,t)=>{o.setRequestHeader(t,e)})),o.send("undefined"===typeof i._bodyInit?null:i._bodyInit)}))}class I{async fetch(e,t,n){return D(e,t,n)}encode(e,t){return"utf-16"===t&&(t="utf16le"),new Uint8Array(i.Buffer.from(e,t))}decode(e,t){return"utf-16"===t&&(t="utf16le"),i.Buffer.from(e).toString(t)}now(){return n.g.nativePerformanceNow?n.g.nativePerformanceNow():Date.now()}setTimeoutCustom(){throw new Error("react native does not support setTimeoutCustom")}isTypedArray(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray}}a.env().registerFlag("IS_REACT_NATIVE",(()=>navigator&&"ReactNative"===navigator.product)),a.env().getBool("IS_REACT_NATIVE")&&(n.g.Buffer=i.Buffer,function(){try{const e=5;a.registerBackend("rn-webgl",(async()=>{const e=await E.createContextAsync();a.env().set("WEBGL_BUFFER_SUPPORTED",!1);const t=e.getExtension.bind(e);e.getExtension=(e=>"EXT_color_buffer_float"===e?"ios"===C.default.OS?null:{}:"EXT_color_buffer_half_float"===e?{}:t(e)).bind(e),e.fenceSync=(()=>({})).bind(e),e.clientWaitSync=(()=>e.CONDITION_SATISFIED).bind(e),(0,r.setWebGLContext)(2,e);const n=new r.GPGPUContext;return new r.MathBackendWebGL(n)}),e),a.getKernelsForBackend("webgl").forEach((e=>{const t=Object.assign({},e,{backendName:"rn-webgl"});a.registerKernel(t)}))}catch(e){throw new Error(`Failed to register Webgl backend: ${e.message}`)}}(),a.setPlatform("react-native",new I));var O=n(23703),P=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);aV.Asset.fromModule(e)));return e[0].uri.match("^http")?this.loadViaHttp(e):this.loadLocalAsset(e)}async loadViaHttp(e){const t=this.modelJson,n=Object.assign({},t);n.weightSpecs=t.weightsManifest[0].weights,delete n.weightManifest;const r=await Promise.all(e.map((async e=>{const t=e.uri,n=await D(t,undefined,{isBinary:!0});return await n.arrayBuffer()})));return n.weightData=a.io.concatenateArrayBuffers(r),n}async loadLocalAsset(e){const t=n(89369),r=this.modelJson,i=Object.assign({},r);i.weightSpecs=r.weightsManifest[0].weights,delete i.weightManifest;const o=await Promise.all(e.map((async e=>{let n;try{n=await t.readFile(e.uri,"base64")}catch(r){throw new Error(`Error reading resource ${e.uri}.`)}return a.util.encodeString(n,"base64").buffer})));return i.weightData=a.io.concatenateArrayBuffers(o),i}}function H(e,t){if("object"!==typeof e)throw new Error("modelJson must be a JavaScript object (and not a string).\nHave you wrapped your asset path in a require() statement?");if("string"===typeof t)throw new Error("modelWeightsID must be a number or number array.\nHave you wrapped your asset paths in a require() statements?");const n=Array.isArray(t)?t:[t];return new z(e,n)}var U,W=n(11272);function q(e,t=3){a.util.assert(function(e){if(e.length>3&&255===e[0]&&216===e[1]&&255===e[2])return U.JPEG;if(e.length>4&&71===e[0]&&73===e[1]&&70===e[2]&&56===e[3])return U.GIF;if(e.length>8&&137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]&&13===e[4]&&10===e[5]&&26===e[6]&&10===e[7])return U.PNG;if(e.length>3&&66===e[0]&&77===e[1])return U.BMP;throw new Error("Expected image (JPEG, PNG, or GIF), but got unsupported image type")}(e)===U.JPEG,(()=>"The passed contents are not a valid JPEG image")),a.util.assert(3===t,(()=>"Only 3 channels is supported at this time"));const{width:n,height:r,data:i}=W.decode(e,{useTArray:!0}),o=new Uint8Array(n*r*3);let s=0;for(let a=0;a"uploadTextureData Error: imageData length must match w * h * d"));const l=i||t.createTexture();t.activeTexture(t.TEXTURE0),t.bindTexture(t.TEXTURE_2D,l),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE);const u=3===n.depth?t.RGB:t.RGBA,c=u,d=t.UNSIGNED_BYTE;return r.webgl_util.callAndCheck(t,(()=>{t.texImage2D(t.TEXTURE_2D,0,c,o,s,0,u,d,e)})),t.bindTexture(t.TEXTURE_2D,null),l}function Z(e,t,n,a,i,o,s,l){const{program:u,vao:c,vertices:d,uniformLocations:h}=o?function(e,t,n,r,a){K.has(e)||K.set(e,new Map);const i=K.get(e),o=`resize_${t.width}_${t.height}_${t.depth}_${n.width}_${n.height}_${n.depth}_${r}_${a}`;if(!i.has(o)){const s="#version 300 es\nprecision highp float;\nprecision highp int;\n\nin vec2 position;\nin vec2 texCoords;\nout vec2 uv;\n\nvoid main() {\n uv = texCoords;\n gl_Position = vec4(position, 0, 1);\n}";let l;l="nearest_neighbor"===a?function(e,t,n){const r=e.width,a=e.height,i=t.width,o=t.height,s=[n&&i>1?r-1:r,n&&o>1?a-1:a],l=[n&&i>1?i-1:i,n&&o>1?o-1:o],u=n?"0.5":"0.0",c=3===t.depth?"vec3":"vec4",d=3===t.depth?"vec3(texSample)":"texSample";return`#version 300 es\nprecision highp float;\n\nuniform sampler2D inputTexture;\nin vec2 uv;\nout ${c} fragColor;\n\nvec2 sourceDims = vec2(${r}, ${a});\nvec2 targetDims = vec2(${i}, ${o});\n\nconst vec2 inputToOutputRatio = vec2(\n ${s[0]/l[0]},\n ${s[1]/l[1]});\n\nvoid main() {\n ivec2 targetCoords = ivec2(uv * targetDims);\n\n vec2 sourceCoords = vec2(targetCoords) * inputToOutputRatio;\n ivec2 iSourceCoords = ivec2(min(\n sourceDims - 1.0,\n floor(sourceCoords + ${u})));\n\n vec4 texSample = texelFetch(inputTexture, iSourceCoords, 0);\n fragColor = ${d};\n}\n`}(t,n,r):function(e,t,n){const r=e.width,a=e.height,i=t.width,o=t.height,s=[n&&i>1?r-1:r,n&&o>1?a-1:a],l=[n&&i>1?i-1:i,n&&o>1?o-1:o],u=3===t.depth?"vec3":"vec4",c=3===t.depth?"vec3(texSample.r,texSample.g,texSample.b)":"texSample";return`#version 300 es\nprecision highp float;\n\nuniform sampler2D inputTexture;\nin vec2 uv;\nout ${u} fragColor;\n\nvec2 sourceDims = vec2(${r}, ${a});\nvec2 targetDims = vec2(${i}, ${o});\n\nconst vec2 inputToOutputRatio = vec2(\n ${s[0]/l[0]},\n ${s[1]/l[1]});\n\nvoid main() {\n ivec2 targetCoords = ivec2(uv * targetDims);\n\n vec2 sourceCoords = vec2(targetCoords) * inputToOutputRatio;\n\n ivec2 sourceFloor = ivec2(sourceCoords);\n ivec2 sourceCeil = ivec2(min(sourceDims - 1.0, ceil(sourceCoords)));\n\n vec4 topLeft = texelFetch(inputTexture,\n ivec2(sourceFloor.x, sourceFloor.y), 0);\n vec4 bottomLeft = texelFetch(inputTexture,\n ivec2(sourceCeil.x, sourceFloor.y), 0);\n vec4 topRight = texelFetch(inputTexture,\n ivec2(sourceFloor.x, sourceCeil.y), 0);\n vec4 bottomRight = texelFetch(inputTexture,\n ivec2(sourceCeil.x, sourceCeil.y), 0);\n\n vec2 fracRC = sourceCoords - vec2(sourceFloor);\n\n vec4 top = topLeft + (topRight - topLeft) * fracRC.y;\n vec4 bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n vec4 newValue = top + (bottom - top) * fracRC.x;\n\n vec4 texSample = newValue;\n fragColor = ${c};\n}\n`}(t,n,r);const u=te(e,s,l,new Float32Array([-1,-1,-1,1,1,1,1,1,-1,-1,1,-1]),new Float32Array([0,0,0,1,1,1,1,1,0,0,1,0]));i.set(o,u)}return i.get(o)}(e,n,a,i,s):ee(e,!1,!0,l);if(e.useProgram(u),r.webgl_util.callAndCheck(e,(()=>{e.bindVertexArray(c)})),e.uniform1i(h.get("inputTexture"),1),e.activeTexture(e.TEXTURE0+1),e.bindTexture(e.TEXTURE_2D,t),!o){const t="nearest_neighbor"===s?e.NEAREST:e.LINEAR;e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,t)}G.has(e)||G.set(e,e.createTexture());const f=G.get(e),p=a.width,m=a.height;e.activeTexture(e.TEXTURE0+2),e.bindTexture(e.TEXTURE_2D,f),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),X.has(e)||X.set(e,{width:-1,height:-1});const g=X.get(e);if(null==g||g.width!==p||g.height!==m){const t=0,n=3===a.depth?e.RGB:e.RGBA,i=n,o=0,s=e.UNSIGNED_BYTE;r.webgl_util.callAndCheck(e,(()=>{e.texImage2D(e.TEXTURE_2D,t,i,p,m,o,n,s,null)})),X.set(e,{width:p,height:m})}Y.has(e)||Y.set(e,Q(e));const y=Y.get(e);e.viewport(0,0,p,m),e.bindFramebuffer(e.FRAMEBUFFER,y),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,f,0);const _=e.checkFramebufferStatus(e.FRAMEBUFFER);if(_!==e.FRAMEBUFFER_COMPLETE)switch(_){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw new Error("createFrameBuffer: gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT");case e.FRAMEBUFFER_UNSUPPORTED:throw new Error("createFrameBuffer: gl.FRAMEBUFFER_UNSUPPORTED");case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw new Error("createFrameBuffer: gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT");case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw new Error("createFrameBuffer: gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS");case e.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:throw new Error("createFrameBuffer: gl.FRAMEBUFFER_INCOMPLETE_MULTISAMPLE");default:throw new Error(`createFrameBuffer Error: Other or unknown fbo complete status: ${_}`)}return e.drawArrays(e.TRIANGLES,0,d.length/2),e.bindFramebuffer(e.FRAMEBUFFER,null),e.useProgram(null),e.bindVertexArray(null),f}function Q(e){const t=e.createFramebuffer();if(null==t)throw new Error("Could not create framebuffer");return t}function ee(e,t,n,r){K.has(e)||K.set(e,new Map);const a=K.get(e),i=`drawTexture_${t}_${n}_${r}`;if(!a.has(i)){const o=function(e,t,n){const r=e?-1:1,a=t?-1:1;return`#version 300 es\nprecision highp float;\n\nin vec2 position;\nin vec2 texCoords;\n\nout vec2 uv;\n\nvec2 rotate(vec2 uvCoods, vec2 pivot, float rotation) {\n float cosa = cos(rotation);\n float sina = sin(rotation);\n uvCoods -= pivot;\n return vec2(\n cosa * uvCoods.x - sina * uvCoods.y,\n cosa * uvCoods.y + sina * uvCoods.x\n ) + pivot;\n}\n\nvoid main() {\n uv = rotate(texCoords, vec2(0.5), ${0===n?"0.":n*(Math.PI/180)});\n\n // Invert geometry to match the image orientation from the camera.\n gl_Position = vec4(position * vec2(${r}., ${a}. * -1.), 0, 1);\n}`}(t,n,r),s=te(e,o,"#version 300 es\nprecision highp float;\nuniform sampler2D inputTexture;\nin vec2 uv;\nout vec4 fragColor;\nvoid main() {\n vec4 texSample = texture(inputTexture, uv);\n fragColor = texSample;\n}",new Float32Array([-1,-1,-1,1,1,1,1,1,-1,-1,1,-1]),new Float32Array([0,0,0,1,1,1,1,1,0,0,1,0]));a.set(i,s)}return a.get(i)}function te(e,t,n,a,i){const o=e.createShader(e.VERTEX_SHADER);e.shaderSource(o,t),e.compileShader(o);const s=e.createShader(e.FRAGMENT_SHADER);e.shaderSource(s,n),e.compileShader(s);const l=e.createProgram();e.attachShader(l,o),e.attachShader(l,s),e.linkProgram(l),e.validateProgram(l);const u=e.createVertexArray();e.bindVertexArray(u),r.webgl_util.callAndCheck(e,(()=>{const t=e.getAttribLocation(l,"position"),n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.enableVertexAttribArray(t),e.bufferData(e.ARRAY_BUFFER,a,e.STATIC_DRAW),e.vertexAttribPointer(t,2,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,null)})),r.webgl_util.callAndCheck(e,(()=>{const t=e.getAttribLocation(l,"texCoords"),n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n),e.bufferData(e.ARRAY_BUFFER,i,e.STATIC_DRAW),e.enableVertexAttribArray(t),e.vertexAttribPointer(t,2,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,null)}));const c=new Map;return r.webgl_util.callAndCheck(e,(()=>{const t=e.getUniformLocation(l,"inputTexture");c.set("inputTexture",t)})),e.bindVertexArray(null),{program:l,vao:u,vertices:a,uniformLocations:c}}const ne={canDownloadFromRGBTexture:new WeakMap,glCapabilitiesTested:new WeakMap};async function re(e){if(!ne.glCapabilitiesTested.get(e)){ne.canDownloadFromRGBTexture.set(e,!0);try{const t=2,n=4,r=new Uint8Array(t*n*4);for(let e=0;e"imageTensor must be of type int32")),a.util.assert(3===t.rank,(()=>"imageTensor must be a Tensor3D"));return J(Uint8Array.from(await t.data()),e,{height:t.shape[0],width:t.shape[1],depth:t.shape[2]},n)}function ie(e,t,n,i,o=!1,s={}){if(a.util.assert(3===i.depth||4===i.depth,(()=>"fromTexture Error: target depth must be 3 or 4")),3===i.depth&&i.width%4!==0&&ne.canDownloadFromRGBTexture.get(e))throw new Error("When using targetShape.depth=3, targetShape.width must be a multiple of 4. Alternatively do not call detectGLCapabilities()");const l=i.depth,u=ne.canDownloadFromRGBTexture.get(e)?l:4;n={height:Math.floor(n.height),width:Math.floor(n.width),depth:n.depth},i={height:Math.floor(i.height),width:Math.floor(i.width),depth:u};const c=null!=s.alignCorners&&s.alignCorners,d=null!=s.interpolation?s.interpolation:"bilinear",h=null!=s.rotation?s.rotation:0;a.util.assert("bilinear"===d||"nearest_neighbor"===d,(()=>'fromTexture Error: interpolation must be one of "bilinear" or "nearest_neighbor"')),a.util.assert([0,90,180,270,360,-90,-180,-270].includes(h),(()=>"fromTexture Error: rotation must be 0, +/- 90, +/- 180, +/- 270 or 360"));const f=function(e,t,n){const{width:a,height:i,depth:o}=n,s=new Uint8Array(a*i*o);Y.has(e)||Y.set(e,Q(e));const l=Y.get(e);return r.webgl_util.callAndCheck(e,(()=>{e.bindFramebuffer(e.FRAMEBUFFER,l)})),r.webgl_util.callAndCheck(e,(()=>{e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,t)})),r.webgl_util.callAndCheck(e,(()=>{e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)})),r.webgl_util.callAndCheck(e,(()=>{const t=3===o?e.RGB:e.RGBA;e.readPixels(0,0,a,i,t,e.UNSIGNED_BYTE,s)})),r.webgl_util.callAndCheck(e,(()=>{e.bindFramebuffer(e.FRAMEBUFFER,null)})),s}(e,Z(e,t,n,i,c,o,d,h),i);let p;if(l!==u&&3===l){const e=i.height*i.width;p=new Uint8Array(e*l);for(let t=0;t"renderToGLView Error: rotation must be 0, +/- 90, +/- 180, +/- 270 or 360")),function(e,t,n,r,a){const{program:i,vao:o,vertices:s,uniformLocations:l}=ee(e,r,!1,a);e.useProgram(i),e.bindVertexArray(o),e.uniform1i(l.get("inputTexture"),0),e.activeTexture(e.TEXTURE0+0),e.bindTexture(e.TEXTURE_2D,t),e.bindFramebuffer(e.FRAMEBUFFER,null),e.viewport(0,0,n.width,n.height),e.drawArrays(e.TRIANGLES,0,s.length/2),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),e.useProgram(null)}(e,t,n={width:Math.floor(n.width),height:Math.floor(n.height)},r,i)}var se=n(18902);const le=!0,ue=3,ce=!1;function de(e){return class extends h.Component{constructor(e){super(e),this.onCameraLayout=this.onCameraLayout.bind(this),this.onGLContextCreate=this.onGLContextCreate.bind(this),this.state={cameraLayout:null}}componentWillUnmount(){cancelAnimationFrame(this.rafID),this.glContext&&E.destroyContextAsync(this.glContext),this.camera=null,this.glView=null,this.glContext=null}onCameraLayout(e){const{x:t,y:n,width:r,height:a}=e.nativeEvent.layout;this.setState({cameraLayout:{x:t,y:n,width:r,height:a}})}async createCameraTexture(){if(null!=this.glView&&null!=this.camera)return this.glView.createCameraTextureAsync(this.camera);throw new Error("Expo GL context or camera not available")}async onGLContextCreate(e){this.glContext=e;const t=await this.createCameraTexture();await re(e);const n=null!=this.props.autorender?this.props.autorender:le,r=this.previewUpdateFunc(e,t);if(n){const t=()=>{r(),e.endFrameEXP(),this.rafID=requestAnimationFrame(t)};t()}const{resizeDepth:a}=this.props,i=null!=this.props.cameraTextureHeight?this.props.cameraTextureHeight:0,o=null!=this.props.cameraTextureWidth?this.props.cameraTextureWidth:0,s=null!=this.props.useCustomShadersToResize?this.props.useCustomShadersToResize:ce,l=this;const u=function*(){const n={height:i,width:o,depth:4};for(;null!=l.glContext;){const r={height:l.props.resizeHeight,width:l.props.resizeWidth,depth:a||ue},i=ie(e,t,n,r,s,{rotation:l.props.rotation});yield i}}();this.props.onReady(u,r,e,t)}previewUpdateFunc(e,t){return(()=>{const{cameraLayout:n}=this.state,{rotation:r}=this.props,a=m.default.getPixelSizeForLayoutSize(n.width),i=m.default.getPixelSizeForLayoutSize(n.height);this.camera.props.type,se.Camera.Constants.Type.front;oe(e,t,{width:a,height:i},true,r)}).bind(this)}render(){const{cameraLayout:t}=this.state,n=Object.keys({useCustomShadersToResize:null,cameraTextureWidth:null,cameraTextureHeight:null,resizeWidth:null,resizeHeight:null,resizeDepth:null,autorender:null,onReady:null,rotation:0}),r={},a=Object.keys(this.props);for(let e=0;e{this.props.onLayout(e),this.onCameraLayout(e)}:this.onCameraLayout;r.onLayout=i;const o=(0,b.jsx)(e,Object.assign({},r,{ref:e=>this.camera=e}),"camera-with-tensor-camera-view");let s=null;if(null!=t){const e=g.default.create({glView:{position:"absolute",left:t.x,top:t.y,width:t.width,height:t.height,zIndex:this.props.style.zIndex?parseInt(this.props.style.zIndex,10)+10:10}});s=(0,b.jsx)(E,{style:e.glView,onContextCreate:this.onGLContextCreate,ref:e=>this.glView=e},"camera-with-tensor-gl-view")}return[o,s]}}}},60245:(e,t,n)=>{"use strict";var r=n(23703),a=n(69782),i="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"===typeof e){if("string"===typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|m(e,t),r=s(n),a=r.write(e,t);a!==n&&(r=r.slice(0,a));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!==typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"===typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);var a=function(e){if(l.isBuffer(e)){var t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!==typeof e.length||H(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(a)return a;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!==typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return c(e),s(e<0?0:0|p(e))}function h(e){for(var t=e.length<0?0:0|p(e.length),n=s(t),r=0;r=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!==typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var a=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(e).length;default:if(a)return r?-1:B(e).length;t=(""+t).toLowerCase(),a=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,n);case"utf8":case"utf-8":return S(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,a){if(0===e.length)return-1;if("string"===typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),H(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"===typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,a);if("number"===typeof t)return t&=255,"function"===typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function b(e,t,n,r,a){var i,o=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,l/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(a){var c=-1;for(i=n;is&&(n=s-l),i=n;i>=0;i--){for(var d=!0,h=0;ha&&(r=a):r=a;var i=t.length;r>i/2&&(r=i/2);for(var o=0;o>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function A(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function S(e,t,n){n=Math.min(e.length,n);for(var r=[],a=t;a239?4:u>223?3:u>191?2:1;if(a+d<=n)switch(d){case 1:u<128&&(c=u);break;case 2:128===(192&(i=e[a+1]))&&(l=(31&u)<<6|63&i)>127&&(c=l);break;case 3:i=e[a+1],o=e[a+2],128===(192&i)&&128===(192&o)&&(l=(15&u)<<12|(63&i)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:i=e[a+1],o=e[a+2],s=e[a+3],128===(192&i)&&128===(192&o)&&128===(192&s)&&(l=(15&u)<<18|(63&i)<<12|(63&o)<<6|63&s)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),a+=d}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var n="",r=0;for(;rr.length?l.from(i).copy(r,a):Uint8Array.prototype.set.call(r,i,a);else{if(!l.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,a)}a+=i.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tn&&(e+=" ... "),""},i&&(l.prototype[i]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,a){if(z(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(a>>>=0)-(r>>>=0),o=(n>>>=0)-(t>>>=0),s=Math.min(i,o),u=this.slice(r,a),c=e.slice(t,n),d=0;d>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return F(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function C(e,t,n){var r="";n=Math.min(e.length,n);for(var a=t;ar)&&(n=r);for(var a="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,a,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}function M(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,i){return t=+t,n>>>=0,i||M(e,0,n,8),a.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],a=1,i=0;++i>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e+--t],a=1;t>0&&(a*=256);)r+=this[e+--t]*a;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||O(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=this[e],a=1,i=0;++i=(a*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||O(e,t,this.length);for(var r=t,a=1,i=this[e+--r];r>0&&(a*=256);)i+=this[e+--r]*a;return i>=(a*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return e>>>=0,t||O(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||O(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||O(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return e>>>=0,t||O(e,4,this.length),a.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||O(e,4,this.length),a.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||O(e,8,this.length),a.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||O(e,8,this.length),a.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var a=1,i=0;for(this[t]=255&e;++i>>=0,n>>>=0,r)||P(this,e,t,n,Math.pow(2,8*n)-1,0);var a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var a=Math.pow(2,8*n-1);P(this,e,t,n,a-1,-a)}var i=0,o=1,s=0;for(this[t]=255&e;++i>>=0,!r){var a=Math.pow(2,8*n-1);P(this,e,t,n,a-1,-a)}var i=n-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeFloatLE=function(e,t,n){return R(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return R(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"===typeof e)for(i=t;i55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function j(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(N,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}(e))}function V(e,t,n,r){for(var a=0;a=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function H(e){return e!==e}var U=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,a=0;a<16;++a)t[r+a]=e[n]+e[a];return t}()},489:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Abs:()=>D.Abs,Acos:()=>D.Acos,Acosh:()=>D.Acosh,AdadeltaOptimizer:()=>D.AdadeltaOptimizer,AdagradOptimizer:()=>D.AdagradOptimizer,AdamOptimizer:()=>D.AdamOptimizer,AdamaxOptimizer:()=>D.AdamaxOptimizer,Add:()=>D.Add,AddN:()=>D.AddN,All:()=>D.All,Any:()=>D.Any,ArgMax:()=>D.ArgMax,ArgMin:()=>D.ArgMin,Asin:()=>D.Asin,Asinh:()=>D.Asinh,Atan:()=>D.Atan,Atan2:()=>D.Atan2,Atanh:()=>D.Atanh,AvgPool:()=>D.AvgPool,AvgPool3D:()=>D.AvgPool3D,AvgPool3DGrad:()=>D.AvgPool3DGrad,AvgPoolGrad:()=>D.AvgPoolGrad,BatchMatMul:()=>D.BatchMatMul,BatchToSpaceND:()=>D.BatchToSpaceND,Bincount:()=>D.Bincount,BitwiseAnd:()=>D.BitwiseAnd,BroadcastArgs:()=>D.BroadcastArgs,BroadcastTo:()=>D.BroadcastTo,Callback:()=>Eh,CallbackList:()=>as,Cast:()=>D.Cast,Ceil:()=>D.Ceil,ClipByValue:()=>D.ClipByValue,Complex:()=>D.Complex,ComplexAbs:()=>D.ComplexAbs,Concat:()=>D.Concat,Conv2D:()=>D.Conv2D,Conv2DBackpropFilter:()=>D.Conv2DBackpropFilter,Conv2DBackpropInput:()=>D.Conv2DBackpropInput,Conv3D:()=>D.Conv3D,Conv3DBackpropFilterV2:()=>D.Conv3DBackpropFilterV2,Conv3DBackpropInputV2:()=>D.Conv3DBackpropInputV2,Cos:()=>D.Cos,Cosh:()=>D.Cosh,CropAndResize:()=>D.CropAndResize,Cumprod:()=>D.Cumprod,Cumsum:()=>D.Cumsum,CustomCallback:()=>ss,DataStorage:()=>D.DataStorage,DenseBincount:()=>D.DenseBincount,DepthToSpace:()=>D.DepthToSpace,DepthwiseConv2dNative:()=>D.DepthwiseConv2dNative,DepthwiseConv2dNativeBackpropFilter:()=>D.DepthwiseConv2dNativeBackpropFilter,DepthwiseConv2dNativeBackpropInput:()=>D.DepthwiseConv2dNativeBackpropInput,Diag:()=>D.Diag,Dilation2D:()=>D.Dilation2D,Dilation2DBackpropFilter:()=>D.Dilation2DBackpropFilter,Dilation2DBackpropInput:()=>D.Dilation2DBackpropInput,Draw:()=>D.Draw,ENV:()=>D.ENV,EarlyStopping:()=>Dh,Einsum:()=>D.Einsum,Elu:()=>D.Elu,EluGrad:()=>D.EluGrad,Environment:()=>D.Environment,Equal:()=>D.Equal,Erf:()=>D.Erf,Exp:()=>D.Exp,ExpandDims:()=>D.ExpandDims,Expm1:()=>D.Expm1,FFT:()=>D.FFT,Fill:()=>D.Fill,FlipLeftRight:()=>D.FlipLeftRight,Floor:()=>D.Floor,FloorDiv:()=>D.FloorDiv,FromPixels:()=>D.FromPixels,FusedBatchNorm:()=>D.FusedBatchNorm,FusedConv2D:()=>D.FusedConv2D,FusedDepthwiseConv2D:()=>D.FusedDepthwiseConv2D,GPGPUContext:()=>ym.GPGPUContext,GatherNd:()=>D.GatherNd,GatherV2:()=>D.GatherV2,GraphModel:()=>tp,Greater:()=>D.Greater,GreaterEqual:()=>D.GreaterEqual,History:()=>os,IFFT:()=>D.IFFT,Identity:()=>D.Identity,Imag:()=>D.Imag,InputSpec:()=>lo,IsFinite:()=>D.IsFinite,IsInf:()=>D.IsInf,IsNan:()=>D.IsNan,KernelBackend:()=>D.KernelBackend,LRN:()=>D.LRN,LRNGrad:()=>D.LRNGrad,LayerVariable:()=>io,LayersModel:()=>hl,LeakyRelu:()=>D.LeakyRelu,Less:()=>D.Less,LessEqual:()=>D.LessEqual,LinSpace:()=>D.LinSpace,Log:()=>D.Log,Log1p:()=>D.Log1p,LogSoftmax:()=>D.LogSoftmax,LogicalAnd:()=>D.LogicalAnd,LogicalNot:()=>D.LogicalNot,LogicalOr:()=>D.LogicalOr,LogicalXor:()=>D.LogicalXor,LowerBound:()=>D.LowerBound,MathBackendCPU:()=>gm.MathBackendCPU,MathBackendWebGL:()=>ym.MathBackendWebGL,MatrixBandPart:()=>D.MatrixBandPart,Max:()=>D.Max,MaxPool:()=>D.MaxPool,MaxPool3D:()=>D.MaxPool3D,MaxPool3DGrad:()=>D.MaxPool3DGrad,MaxPoolGrad:()=>D.MaxPoolGrad,MaxPoolWithArgmax:()=>D.MaxPoolWithArgmax,Maximum:()=>D.Maximum,Mean:()=>D.Mean,Min:()=>D.Min,Minimum:()=>D.Minimum,MirrorPad:()=>D.MirrorPad,Mod:()=>D.Mod,MomentumOptimizer:()=>D.MomentumOptimizer,Multinomial:()=>D.Multinomial,Multiply:()=>D.Multiply,Neg:()=>D.Neg,NonMaxSuppressionV3:()=>D.NonMaxSuppressionV3,NonMaxSuppressionV4:()=>D.NonMaxSuppressionV4,NonMaxSuppressionV5:()=>D.NonMaxSuppressionV5,NotEqual:()=>D.NotEqual,OP_SCOPE_SUFFIX:()=>D.OP_SCOPE_SUFFIX,OneHot:()=>D.OneHot,OnesLike:()=>D.OnesLike,Optimizer:()=>D.Optimizer,OptimizerConstructors:()=>D.OptimizerConstructors,Pack:()=>D.Pack,PadV2:()=>D.PadV2,Pool:()=>D.Pool,Pow:()=>D.Pow,Prelu:()=>D.Prelu,Prod:()=>D.Prod,RMSPropOptimizer:()=>D.RMSPropOptimizer,RNN:()=>Fu,RaggedGather:()=>D.RaggedGather,RaggedRange:()=>D.RaggedRange,RaggedTensorToTensor:()=>D.RaggedTensorToTensor,Range:()=>D.Range,Rank:()=>D.Rank,Real:()=>D.Real,RealDiv:()=>D.RealDiv,Reciprocal:()=>D.Reciprocal,Reduction:()=>D.Reduction,Relu:()=>D.Relu,Relu6:()=>D.Relu6,Reshape:()=>D.Reshape,ResizeBilinear:()=>D.ResizeBilinear,ResizeBilinearGrad:()=>D.ResizeBilinearGrad,ResizeNearestNeighbor:()=>D.ResizeNearestNeighbor,ResizeNearestNeighborGrad:()=>D.ResizeNearestNeighborGrad,Reverse:()=>D.Reverse,RotateWithOffset:()=>D.RotateWithOffset,Round:()=>D.Round,Rsqrt:()=>D.Rsqrt,SGDOptimizer:()=>D.SGDOptimizer,ScatterNd:()=>D.ScatterNd,SearchSorted:()=>D.SearchSorted,Select:()=>D.Select,Selu:()=>D.Selu,Sequential:()=>gl,Sigmoid:()=>D.Sigmoid,Sign:()=>D.Sign,Sin:()=>D.Sin,Sinh:()=>D.Sinh,Slice:()=>D.Slice,Softmax:()=>D.Softmax,Softplus:()=>D.Softplus,SpaceToBatchND:()=>D.SpaceToBatchND,SparseFillEmptyRows:()=>D.SparseFillEmptyRows,SparseReshape:()=>D.SparseReshape,SparseSegmentMean:()=>D.SparseSegmentMean,SparseSegmentSum:()=>D.SparseSegmentSum,SparseToDense:()=>D.SparseToDense,SplitV:()=>D.SplitV,Sqrt:()=>D.Sqrt,Square:()=>D.Square,SquaredDifference:()=>D.SquaredDifference,StaticRegexReplace:()=>D.StaticRegexReplace,Step:()=>D.Step,StridedSlice:()=>D.StridedSlice,StringNGrams:()=>D.StringNGrams,StringSplit:()=>D.StringSplit,StringToHashBucketFast:()=>D.StringToHashBucketFast,Sub:()=>D.Sub,Sum:()=>D.Sum,SymbolicTensor:()=>uo,Tan:()=>D.Tan,Tanh:()=>D.Tanh,Tensor:()=>D.Tensor,TensorBuffer:()=>D.TensorBuffer,TensorScatterUpdate:()=>D.TensorScatterUpdate,Tile:()=>D.Tile,TopK:()=>D.TopK,Transform:()=>D.Transform,Transpose:()=>D.Transpose,Unique:()=>D.Unique,Unpack:()=>D.Unpack,UnsortedSegmentSum:()=>D.UnsortedSegmentSum,UpperBound:()=>D.UpperBound,Variable:()=>D.Variable,ZerosLike:()=>D.ZerosLike,_FusedMatMul:()=>D._FusedMatMul,abs:()=>D.abs,acos:()=>D.acos,acosh:()=>D.acosh,add:()=>D.add,addN:()=>D.addN,all:()=>D.all,any:()=>D.any,argMax:()=>D.argMax,argMin:()=>D.argMin,asin:()=>D.asin,asinh:()=>D.asinh,atan:()=>D.atan,atan2:()=>D.atan2,atanh:()=>D.atanh,avgPool:()=>D.avgPool,avgPool3d:()=>D.avgPool3d,backend:()=>D.backend,backend_util:()=>D.backend_util,basicLSTMCell:()=>D.basicLSTMCell,batchNorm:()=>D.batchNorm,batchNorm2d:()=>D.batchNorm2d,batchNorm3d:()=>D.batchNorm3d,batchNorm4d:()=>D.batchNorm4d,batchToSpaceND:()=>D.batchToSpaceND,bincount:()=>D.bincount,bitwiseAnd:()=>D.bitwiseAnd,booleanMaskAsync:()=>D.booleanMaskAsync,broadcastArgs:()=>D.broadcastArgs,broadcastTo:()=>D.broadcastTo,broadcast_util:()=>D.broadcast_util,browser:()=>D.browser,buffer:()=>D.buffer,callbacks:()=>Ih,cast:()=>D.cast,ceil:()=>D.ceil,clipByValue:()=>D.clipByValue,clone:()=>D.clone,complex:()=>D.complex,concat:()=>D.concat,concat1d:()=>D.concat1d,concat2d:()=>D.concat2d,concat3d:()=>D.concat3d,concat4d:()=>D.concat4d,constraints:()=>r,conv1d:()=>D.conv1d,conv2d:()=>D.conv2d,conv2dTranspose:()=>D.conv2dTranspose,conv3d:()=>D.conv3d,conv3dTranspose:()=>D.conv3dTranspose,copyRegisteredKernels:()=>D.copyRegisteredKernels,cos:()=>D.cos,cosh:()=>D.cosh,cosineWindow:()=>D.cosineWindow,cumprod:()=>D.cumprod,cumsum:()=>D.cumsum,customGrad:()=>D.customGrad,data:()=>T,denseBincount:()=>D.denseBincount,deprecationWarn:()=>D.deprecationWarn,depthToSpace:()=>D.depthToSpace,depthwiseConv2d:()=>D.depthwiseConv2d,deregisterOp:()=>Nh,device_util:()=>D.device_util,diag:()=>D.diag,dilation2d:()=>D.dilation2d,disableDeprecationWarnings:()=>D.disableDeprecationWarnings,dispose:()=>D.dispose,disposeVariables:()=>D.disposeVariables,div:()=>D.div,divNoNan:()=>D.divNoNan,dot:()=>D.dot,dropout:()=>D.dropout,einsum:()=>D.einsum,elu:()=>D.elu,enableDebugMode:()=>D.enableDebugMode,enableProdMode:()=>D.enableProdMode,enclosingPowerOfTwo:()=>D.enclosingPowerOfTwo,engine:()=>D.engine,ensureShape:()=>D.ensureShape,env:()=>D.env,equal:()=>D.equal,erf:()=>D.erf,euclideanNorm:()=>D.euclideanNorm,exp:()=>D.exp,expandDims:()=>D.expandDims,expm1:()=>D.expm1,eye:()=>D.eye,fft:()=>D.fft,fill:()=>D.fill,findBackend:()=>D.findBackend,findBackendFactory:()=>D.findBackendFactory,floor:()=>D.floor,floorDiv:()=>D.floorDiv,forceHalfFloat:()=>ym.forceHalfFloat,fused:()=>D.fused,gather:()=>D.gather,gatherND:()=>D.gatherND,gather_util:()=>D.gather_util,getBackend:()=>D.getBackend,getGradient:()=>D.getGradient,getKernel:()=>D.getKernel,getKernelsForBackend:()=>D.getKernelsForBackend,gpgpu_util:()=>ym.gpgpu_util,grad:()=>D.grad,grads:()=>D.grads,greater:()=>D.greater,greaterEqual:()=>D.greaterEqual,ifft:()=>D.ifft,imag:()=>D.imag,image:()=>D.image,inTopKAsync:()=>D.inTopKAsync,initializers:()=>a,input:()=>bl,io:()=>D.io,irfft:()=>D.irfft,isFinite:()=>D.isFinite,isInf:()=>D.isInf,isNaN:()=>D.isNaN,keep:()=>D.keep,kernel_impls:()=>D.kernel_impls,layers:()=>i,leakyRelu:()=>D.leakyRelu,less:()=>D.less,lessEqual:()=>D.lessEqual,linalg:()=>D.linalg,linspace:()=>D.linspace,loadGraphModel:()=>np,loadGraphModelSync:()=>rp,loadLayersModel:()=>ml,localResponseNormalization:()=>D.localResponseNormalization,log:()=>D.log,log1p:()=>D.log1p,logSigmoid:()=>D.logSigmoid,logSoftmax:()=>D.logSoftmax,logSumExp:()=>D.logSumExp,logicalAnd:()=>D.logicalAnd,logicalNot:()=>D.logicalNot,logicalOr:()=>D.logicalOr,logicalXor:()=>D.logicalXor,losses:()=>D.losses,lowerBound:()=>D.lowerBound,matMul:()=>D.matMul,math:()=>D.math,max:()=>D.max,maxPool:()=>D.maxPool,maxPool3d:()=>D.maxPool3d,maxPoolWithArgmax:()=>D.maxPoolWithArgmax,maximum:()=>D.maximum,mean:()=>D.mean,memory:()=>D.memory,meshgrid:()=>D.meshgrid,metrics:()=>o,min:()=>D.min,minimum:()=>D.minimum,mirrorPad:()=>D.mirrorPad,mod:()=>D.mod,model:()=>yl,models:()=>s,moments:()=>D.moments,movingAverage:()=>D.movingAverage,mul:()=>D.mul,multiRNNCell:()=>D.multiRNNCell,multinomial:()=>D.multinomial,neg:()=>D.neg,nextFrame:()=>D.nextFrame,norm:()=>D.norm,notEqual:()=>D.notEqual,oneHot:()=>D.oneHot,ones:()=>D.ones,onesLike:()=>D.onesLike,op:()=>D.op,outerProduct:()=>D.outerProduct,pad:()=>D.pad,pad1d:()=>D.pad1d,pad2d:()=>D.pad2d,pad3d:()=>D.pad3d,pad4d:()=>D.pad4d,pool:()=>D.pool,pow:()=>D.pow,prelu:()=>D.prelu,print:()=>D.print,prod:()=>D.prod,profile:()=>D.profile,raggedGather:()=>D.raggedGather,raggedRange:()=>D.raggedRange,raggedTensorToTensor:()=>D.raggedTensorToTensor,rand:()=>D.rand,randomGamma:()=>D.randomGamma,randomNormal:()=>D.randomNormal,randomStandardNormal:()=>D.randomStandardNormal,randomUniform:()=>D.randomUniform,randomUniformInt:()=>D.randomUniformInt,range:()=>D.range,ready:()=>D.ready,real:()=>D.real,reciprocal:()=>D.reciprocal,registerBackend:()=>D.registerBackend,registerCallbackConstructor:()=>vl,registerGradient:()=>D.registerGradient,registerKernel:()=>D.registerKernel,registerOp:()=>Rh,regularizers:()=>l,relu:()=>D.relu,relu6:()=>D.relu6,removeBackend:()=>D.removeBackend,reshape:()=>D.reshape,reverse:()=>D.reverse,reverse1d:()=>D.reverse1d,reverse2d:()=>D.reverse2d,reverse3d:()=>D.reverse3d,reverse4d:()=>D.reverse4d,rfft:()=>D.rfft,round:()=>D.round,rsqrt:()=>D.rsqrt,scalar:()=>D.scalar,scatterND:()=>D.scatterND,scatter_util:()=>D.scatter_util,searchSorted:()=>D.searchSorted,selu:()=>D.selu,separableConv2d:()=>D.separableConv2d,sequential:()=>_l,serialization:()=>D.serialization,setBackend:()=>D.setBackend,setPlatform:()=>D.setPlatform,setWebGLContext:()=>ym.setWebGLContext,setdiff1dAsync:()=>D.setdiff1dAsync,shared:()=>gm.shared,sigmoid:()=>D.sigmoid,sign:()=>D.sign,signal:()=>D.signal,sin:()=>D.sin,sinh:()=>D.sinh,slice:()=>D.slice,slice1d:()=>D.slice1d,slice2d:()=>D.slice2d,slice3d:()=>D.slice3d,slice4d:()=>D.slice4d,slice_util:()=>D.slice_util,softmax:()=>D.softmax,softplus:()=>D.softplus,spaceToBatchND:()=>D.spaceToBatchND,sparse:()=>D.sparse,sparseToDense:()=>D.sparseToDense,spectral:()=>D.spectral,split:()=>D.split,sqrt:()=>D.sqrt,square:()=>D.square,squaredDifference:()=>D.squaredDifference,squeeze:()=>D.squeeze,stack:()=>D.stack,step:()=>D.step,stridedSlice:()=>D.stridedSlice,string:()=>D.string,sub:()=>D.sub,sum:()=>D.sum,sumOutType:()=>D.sumOutType,tan:()=>D.tan,tanh:()=>D.tanh,tensor:()=>D.tensor,tensor1d:()=>D.tensor1d,tensor2d:()=>D.tensor2d,tensor3d:()=>D.tensor3d,tensor4d:()=>D.tensor4d,tensor5d:()=>D.tensor5d,tensor6d:()=>D.tensor6d,tensorScatterUpdate:()=>D.tensorScatterUpdate,tensor_util:()=>D.tensor_util,test_util:()=>D.test_util,tidy:()=>D.tidy,tile:()=>D.tile,time:()=>D.time,topk:()=>D.topk,train:()=>D.train,transpose:()=>D.transpose,truncatedNormal:()=>D.truncatedNormal,unique:()=>D.unique,unregisterGradient:()=>D.unregisterGradient,unregisterKernel:()=>D.unregisterKernel,unsortedSegmentSum:()=>D.unsortedSegmentSum,unstack:()=>D.unstack,upcastType:()=>D.upcastType,upperBound:()=>D.upperBound,util:()=>D.util,valueAndGrad:()=>D.valueAndGrad,valueAndGrads:()=>D.valueAndGrads,variable:()=>D.variable,variableGrads:()=>D.variableGrads,version:()=>_m,version_converter:()=>ap,version_core:()=>D.version_core,version_cpu:()=>gm.version_cpu,version_layers:()=>$s,version_webgl:()=>ym.version_webgl,webgl:()=>ym.webgl,webgl_util:()=>ym.webgl_util,where:()=>D.where,whereAsync:()=>D.whereAsync,zeros:()=>D.zeros,zerosLike:()=>D.zerosLike});var r={};n.r(r),n.d(r,{maxNorm:()=>Ro,minMaxNorm:()=>Bo,nonNeg:()=>No,unitNorm:()=>Lo});var a={};n.r(a),n.d(a,{constant:()=>zo,glorotNormal:()=>Go,glorotUniform:()=>Yo,heNormal:()=>Xo,heUniform:()=>Ko,identity:()=>qo,leCunNormal:()=>Jo,leCunUniform:()=>Zo,ones:()=>Vo,orthogonal:()=>Qo,randomNormal:()=>Uo,randomUniform:()=>Ho,truncatedNormal:()=>Wo,varianceScaling:()=>$o,zeros:()=>jo});var i={};n.r(i),n.d(i,{Layer:()=>po,RNN:()=>Fu,RNNCell:()=>ku,activation:()=>nd,add:()=>dd,alphaDropout:()=>th,average:()=>hd,averagePooling1d:()=>wd,averagePooling2d:()=>xd,averagePooling3d:()=>Ed,avgPool1d:()=>Fd,avgPool2d:()=>Ad,avgPool3d:()=>Cd,avgPooling1d:()=>kd,avgPooling2d:()=>Sd,avgPooling3d:()=>Td,batchNormalization:()=>_d,bidirectional:()=>Yd,categoryEncoding:()=>oh,centerCrop:()=>ah,concatenate:()=>fd,conv1d:()=>Yc,conv2d:()=>Gc,conv2dTranspose:()=>Xc,conv3d:()=>Kc,conv3dTranspose:()=>Jc,convLstm2d:()=>Ud,convLstm2dCell:()=>Wd,cropping2D:()=>Qc,dense:()=>rd,depthwiseConv2d:()=>td,dot:()=>yd,dropout:()=>ad,elu:()=>zc,embedding:()=>cd,flatten:()=>od,gaussianDropout:()=>eh,gaussianNoise:()=>Qd,globalAveragePooling1d:()=>Dd,globalAveragePooling2d:()=>Id,globalMaxPool1d:()=>Xd,globalMaxPool2d:()=>Kd,globalMaxPooling1d:()=>Od,globalMaxPooling2d:()=>Pd,gru:()=>Nd,gruCell:()=>Bd,input:()=>bl,inputLayer:()=>Vc,layerNormalization:()=>bd,leakyReLU:()=>Uc,lstm:()=>jd,lstmCell:()=>Vd,masking:()=>nh,maxPool1d:()=>Jd,maxPool2d:()=>Zd,maxPooling1d:()=>Md,maxPooling2d:()=>Rd,maxPooling3d:()=>Ld,maximum:()=>pd,minimum:()=>md,multiply:()=>gd,permute:()=>ud,prelu:()=>Wc,randomWidth:()=>sh,reLU:()=>Hc,repeatVector:()=>sd,rescaling:()=>rh,reshape:()=>ld,resizing:()=>ih,rnn:()=>qd,separableConv2d:()=>Zc,simpleRNN:()=>zd,simpleRNNCell:()=>Hd,softmax:()=>qc,spatialDropout1d:()=>id,stackedRNNCells:()=>$d,thresholdedReLU:()=>$c,timeDistributed:()=>Gd,upSampling2d:()=>ed,zeroPadding2d:()=>vd});var o={};n.r(o),n.d(o,{MAPE:()=>_h,MSE:()=>wh,binaryAccuracy:()=>lh,binaryCrossentropy:()=>uh,categoricalAccuracy:()=>dh,categoricalCrossentropy:()=>hh,cosineProximity:()=>mh,mape:()=>bh,meanAbsoluteError:()=>gh,meanAbsolutePercentageError:()=>yh,meanSquaredError:()=>vh,mse:()=>Fh,precision:()=>fh,r2Score:()=>kh,recall:()=>ph,sparseCategoricalAccuracy:()=>ch});var s={};n.r(s),n.d(s,{modelFromJSON:()=>pl});var l={};n.r(l),n.d(l,{l1:()=>Ah,l1l2:()=>xh,l2:()=>Sh});var u={};n.r(u),n.d(u,{json:()=>$h});var c={};n.r(c),n.d(c,{json:()=>Yh});var d={};n.r(d),n.d(d,{json:()=>Gh});var h={};n.r(h),n.d(h,{json:()=>Xh});var f={};n.r(f),n.d(f,{json:()=>Kh});var p={};n.r(p),n.d(p,{json:()=>Jh});var m={};n.r(m),n.d(m,{json:()=>Zh});var g={};n.r(g),n.d(g,{json:()=>Qh});var y={};n.r(y),n.d(y,{json:()=>ef});var _={};n.r(_),n.d(_,{json:()=>tf});var b={};n.r(b),n.d(b,{json:()=>nf});var v={};n.r(v),n.d(v,{json:()=>rf});var w={};n.r(w),n.d(w,{json:()=>af});var F={};n.r(F),n.d(F,{json:()=>of});var k={};n.r(k),n.d(k,{json:()=>sf});var x={};n.r(x),n.d(x,{json:()=>lf});var A={};n.r(A),n.d(A,{json:()=>uf});var S={};n.r(S),n.d(S,{json:()=>cf});var E={};n.r(E),n.d(E,{json:()=>df});var C={};n.r(C),n.d(C,{OP_SCOPE_SUFFIX:()=>Cf.OP_SCOPE_SUFFIX,abs:()=>Cf.abs,acos:()=>Cf.acos,acosh:()=>Cf.acosh,add:()=>Cf.add,addN:()=>Cf.addN,all:()=>Cf.all,any:()=>Cf.any,argMax:()=>Cf.argMax,argMin:()=>Cf.argMin,asin:()=>Cf.asin,asinh:()=>Cf.asinh,atan:()=>Cf.atan,atan2:()=>Cf.atan2,atanh:()=>Cf.atanh,avgPool:()=>Cf.avgPool,avgPool3d:()=>Cf.avgPool3d,basicLSTMCell:()=>Cf.basicLSTMCell,batchNorm:()=>Cf.batchNorm,batchNorm2d:()=>Cf.batchNorm2d,batchNorm3d:()=>Cf.batchNorm3d,batchNorm4d:()=>Cf.batchNorm4d,batchToSpaceND:()=>Cf.batchToSpaceND,bincount:()=>Cf.bincount,bitwiseAnd:()=>Cf.bitwiseAnd,booleanMaskAsync:()=>Cf.booleanMaskAsync,broadcastArgs:()=>Cf.broadcastArgs,broadcastTo:()=>Cf.broadcastTo,buffer:()=>Cf.buffer,cast:()=>Cf.cast,ceil:()=>Cf.ceil,clipByValue:()=>Cf.clipByValue,clone:()=>Cf.clone,complex:()=>Cf.complex,concat:()=>Cf.concat,concat1d:()=>Cf.concat1d,concat2d:()=>Cf.concat2d,concat3d:()=>Cf.concat3d,concat4d:()=>Cf.concat4d,conv1d:()=>Cf.conv1d,conv2d:()=>Cf.conv2d,conv2dTranspose:()=>Cf.conv2dTranspose,conv3d:()=>Cf.conv3d,conv3dTranspose:()=>Cf.conv3dTranspose,cos:()=>Cf.cos,cosh:()=>Cf.cosh,cosineWindow:()=>Cf.cosineWindow,cumprod:()=>Cf.cumprod,cumsum:()=>Cf.cumsum,denseBincount:()=>Cf.denseBincount,depthToSpace:()=>Cf.depthToSpace,depthwiseConv2d:()=>Cf.depthwiseConv2d,diag:()=>Cf.diag,dilation2d:()=>Cf.dilation2d,div:()=>Cf.div,divNoNan:()=>Cf.divNoNan,dot:()=>Cf.dot,dropout:()=>Cf.dropout,einsum:()=>Cf.einsum,elu:()=>Cf.elu,enclosingPowerOfTwo:()=>Cf.enclosingPowerOfTwo,ensureShape:()=>Cf.ensureShape,equal:()=>Cf.equal,erf:()=>Cf.erf,euclideanNorm:()=>Cf.euclideanNorm,exp:()=>Cf.exp,expandDims:()=>Cf.expandDims,expm1:()=>Cf.expm1,eye:()=>Cf.eye,fft:()=>Cf.fft,fill:()=>Cf.fill,floor:()=>Cf.floor,floorDiv:()=>Cf.floorDiv,fused:()=>Cf.fused,gather:()=>Cf.gather,gatherND:()=>Cf.gatherND,greater:()=>Cf.greater,greaterEqual:()=>Cf.greaterEqual,ifft:()=>Cf.ifft,imag:()=>Cf.imag,image:()=>Cf.image,inTopKAsync:()=>Cf.inTopKAsync,irfft:()=>Cf.irfft,isFinite:()=>Cf.isFinite,isInf:()=>Cf.isInf,isNaN:()=>Cf.isNaN,leakyRelu:()=>Cf.leakyRelu,less:()=>Cf.less,lessEqual:()=>Cf.lessEqual,linalg:()=>Cf.linalg,linspace:()=>Cf.linspace,localResponseNormalization:()=>Cf.localResponseNormalization,log:()=>Cf.log,log1p:()=>Cf.log1p,logSigmoid:()=>Cf.logSigmoid,logSoftmax:()=>Cf.logSoftmax,logSumExp:()=>Cf.logSumExp,logicalAnd:()=>Cf.logicalAnd,logicalNot:()=>Cf.logicalNot,logicalOr:()=>Cf.logicalOr,logicalXor:()=>Cf.logicalXor,losses:()=>Cf.losses,lowerBound:()=>Cf.lowerBound,matMul:()=>Cf.matMul,max:()=>Cf.max,maxPool:()=>Cf.maxPool,maxPool3d:()=>Cf.maxPool3d,maxPoolWithArgmax:()=>Cf.maxPoolWithArgmax,maximum:()=>Cf.maximum,mean:()=>Cf.mean,meshgrid:()=>Cf.meshgrid,min:()=>Cf.min,minimum:()=>Cf.minimum,mirrorPad:()=>Cf.mirrorPad,mod:()=>Cf.mod,moments:()=>Cf.moments,movingAverage:()=>Cf.movingAverage,mul:()=>Cf.mul,multiRNNCell:()=>Cf.multiRNNCell,multinomial:()=>Cf.multinomial,neg:()=>Cf.neg,norm:()=>Cf.norm,notEqual:()=>Cf.notEqual,oneHot:()=>Cf.oneHot,ones:()=>Cf.ones,onesLike:()=>Cf.onesLike,op:()=>Cf.op,outerProduct:()=>Cf.outerProduct,pad:()=>Cf.pad,pad1d:()=>Cf.pad1d,pad2d:()=>Cf.pad2d,pad3d:()=>Cf.pad3d,pad4d:()=>Cf.pad4d,pool:()=>Cf.pool,pow:()=>Cf.pow,prelu:()=>Cf.prelu,print:()=>Cf.print,prod:()=>Cf.prod,raggedGather:()=>Cf.raggedGather,raggedRange:()=>Cf.raggedRange,raggedTensorToTensor:()=>Cf.raggedTensorToTensor,rand:()=>Cf.rand,randomGamma:()=>Cf.randomGamma,randomNormal:()=>Cf.randomNormal,randomStandardNormal:()=>Cf.randomStandardNormal,randomUniform:()=>Cf.randomUniform,randomUniformInt:()=>Cf.randomUniformInt,range:()=>Cf.range,real:()=>Cf.real,reciprocal:()=>Cf.reciprocal,relu:()=>Cf.relu,relu6:()=>Cf.relu6,reshape:()=>Cf.reshape,reverse:()=>Cf.reverse,reverse1d:()=>Cf.reverse1d,reverse2d:()=>Cf.reverse2d,reverse3d:()=>Cf.reverse3d,reverse4d:()=>Cf.reverse4d,rfft:()=>Cf.rfft,round:()=>Cf.round,rsqrt:()=>Cf.rsqrt,scalar:()=>Cf.scalar,scatterND:()=>Cf.scatterND,searchSorted:()=>Cf.searchSorted,selu:()=>Cf.selu,separableConv2d:()=>Cf.separableConv2d,setdiff1dAsync:()=>Cf.setdiff1dAsync,sigmoid:()=>Cf.sigmoid,sign:()=>Cf.sign,signal:()=>Cf.signal,sin:()=>Cf.sin,sinh:()=>Cf.sinh,slice:()=>Cf.slice,slice1d:()=>Cf.slice1d,slice2d:()=>Cf.slice2d,slice3d:()=>Cf.slice3d,slice4d:()=>Cf.slice4d,softmax:()=>Cf.softmax,softplus:()=>Cf.softplus,spaceToBatchND:()=>Cf.spaceToBatchND,sparse:()=>Cf.sparse,sparseToDense:()=>Cf.sparseToDense,spectral:()=>Cf.spectral,split:()=>Cf.split,sqrt:()=>Cf.sqrt,square:()=>Cf.square,squaredDifference:()=>Cf.squaredDifference,squeeze:()=>Cf.squeeze,stack:()=>Cf.stack,step:()=>Cf.step,stridedSlice:()=>Cf.stridedSlice,string:()=>Cf.string,sub:()=>Cf.sub,sum:()=>Cf.sum,tan:()=>Cf.tan,tanh:()=>Cf.tanh,tensor:()=>Cf.tensor,tensor1d:()=>Cf.tensor1d,tensor2d:()=>Cf.tensor2d,tensor3d:()=>Cf.tensor3d,tensor4d:()=>Cf.tensor4d,tensor5d:()=>Cf.tensor5d,tensor6d:()=>Cf.tensor6d,tensorScatterUpdate:()=>Cf.tensorScatterUpdate,tile:()=>Cf.tile,topk:()=>Cf.topk,transpose:()=>Cf.transpose,truncatedNormal:()=>Cf.truncatedNormal,unique:()=>Cf.unique,unsortedSegmentSum:()=>Cf.unsortedSegmentSum,unstack:()=>Cf.unstack,upperBound:()=>Cf.upperBound,variable:()=>Cf.variable,where:()=>Cf.where,whereAsync:()=>Cf.whereAsync,zeros:()=>Cf.zeros,zerosLike:()=>Cf.zerosLike});var T={};n.r(T),n.d(T,{CSVDataset:()=>Xp,Dataset:()=>Np,FileDataSource:()=>lm,TextLineDataset:()=>Hp,URLDataSource:()=>um,array:()=>jp,csv:()=>cm,func:()=>dm,generator:()=>hm,microphone:()=>pm,version_data:()=>mm,webcam:()=>fm,zip:()=>Vp});var D=n(66723),I=n(55626),O=n(27322),P=n(46939),M=n(84295);const R={kernelName:I.Abs,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,M.step)((0,O.cast)(n,"float32"),-1))}}};var L=n(24150),N=n(58235),B=n(71285),j=n(96375),V=n(58402),z=n(70839);const H={kernelName:I.Acos,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{const t=(0,V.square)((0,O.cast)(n,"float32")),r=(0,j.sqrt)((0,z.sub)((0,B.scalar)(1),t));return(0,N.neg)((0,L.div)(e,r))}}}},U={kernelName:I.Acosh,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{const t=(0,j.sqrt)((0,z.sub)((0,V.square)((0,O.cast)(n,"float32")),1));return(0,L.div)(e,t)}}}};var W=n(57229),q=n(9175),$=n(73630);const Y={kernelName:I.Add,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=W.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{let t=e;const r=W.getReductionAxes(n.shape,a);return r.length>0&&(t=(0,$.sum)(t,r)),(0,q.reshape)(t,n.shape)},b:()=>{let t=e;const n=W.getReductionAxes(r.shape,a);return n.length>0&&(t=(0,$.sum)(t,n)),(0,q.reshape)(t,r.shape)}}}},G={kernelName:I.AddN,saveAllInputs:!0,gradFunc:(e,t)=>{const n={};return t.forEach(((t,r)=>{n[r]=()=>e.clone()})),n}};var X=n(84130);const K={kernelName:I.ArgMax,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,X.zerosLike)(n)}}},J={kernelName:I.ArgMin,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,X.zerosLike)(n)}}},Z={kernelName:I.Asin,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,j.sqrt)((0,z.sub)((0,B.scalar)(1),(0,V.square)((0,O.cast)(n,"float32")))))}}};var Q=n(29666);const ee={kernelName:I.Asinh,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{const t=(0,j.sqrt)((0,Q.add)((0,B.scalar)(1),(0,V.square)((0,O.cast)(n,"float32"))));return(0,L.div)(e,t)}}}},te={kernelName:I.Atan2,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,W.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{const t=(0,Q.add)((0,V.square)(n),(0,V.square)(r));let i=(0,P.mul)(e,(0,L.div)(r,t));const o=(0,W.getReductionAxes)(n.shape,a);return o.length>0&&(i=(0,$.sum)(i,o)),(0,q.reshape)(i,n.shape)},b:()=>{const t=(0,Q.add)((0,V.square)(n),(0,V.square)(r));let i=(0,N.neg)((0,P.mul)(e,(0,L.div)(n,t)));const o=(0,W.getReductionAxes)(r.shape,a);return o.length>0&&(i=(0,$.sum)(i,o)),(0,q.reshape)(i,r.shape)}}}},ne={kernelName:I.Atan,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,Q.add)((0,V.square)((0,O.cast)(n,"float32")),1))}}},re={kernelName:I.Atanh,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,z.sub)((0,B.scalar)(1),(0,V.square)((0,O.cast)(n,"float32"))))}}};var ae=n(55279),ie=n(41564),oe=n(42890),se=n(48938),le=n(8844);const ue=(0,le.op)({avgPool3dGrad_:function(e,t,n,r,a,i){const o=(0,ie.convertToTensor)(e,"dy","avgPool3dGrad"),s=(0,ie.convertToTensor)(t,"input","avgPool3dGrad");let l=o,u=s,c=!1;4===s.rank&&(c=!0,l=(0,q.reshape)(o,[1,o.shape[0],o.shape[1],o.shape[2],o.shape[3]]),u=(0,q.reshape)(s,[1,s.shape[0],s.shape[1],s.shape[2],s.shape[3]])),oe.assert(5===l.rank,(()=>`Error in avgPool3dGrad: dy must be rank 5 but got rank ${l.rank}.`)),oe.assert(5===u.rank,(()=>`Error in avgPool3dGrad: input must be rank 5 but got rank ${u.rank}.`)),(0,se.checkPadOnDimRoundingMode)("avgPool3dGrad",a,i);const d={dy:l,input:u},h={filterSize:n,strides:r,pad:a,dimRoundingMode:i},f=ae.ENGINE.runKernel(I.AvgPool3DGrad,d,h);return c?(0,q.reshape)(f,[f.shape[1],f.shape[2],f.shape[3],f.shape[4]]):f}}),ce={kernelName:I.AvgPool3D,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{filterSize:a,strides:i,pad:o,dimRoundingMode:s}=n;return{x:()=>ue(e,r,a,i,o,s)}}};const de=(0,le.op)({avgPoolGrad_:function(e,t,n,r,a){const i=(0,ie.convertToTensor)(e,"dy","avgPoolGrad"),o=(0,ie.convertToTensor)(t,"input","avgPoolGrad");oe.assert(o.rank===i.rank,(()=>`Rank of input (${o.rank}) does not match rank of dy (${i.rank})`));let s=o,l=i,u=!1;3===o.rank&&(u=!0,s=(0,q.reshape)(o,[1,o.shape[0],o.shape[1],o.shape[2]]),l=(0,q.reshape)(i,[1,i.shape[0],i.shape[1],i.shape[2]])),oe.assert(4===l.rank,(()=>`Error in avgPoolGrad: dy must be rank 4 but got rank ${l.rank}.`)),oe.assert(4===s.rank,(()=>`Error in avgPoolGrad: input must be rank 4 but got rank ${s.rank}.`));const c={dy:l,input:s},d={filterSize:n,strides:r,pad:a},h=ae.ENGINE.runKernel(I.AvgPoolGrad,c,d);return u?(0,q.reshape)(h,[h.shape[1],h.shape[2],h.shape[3]]):h}}),he={kernelName:I.AvgPool,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{filterSize:a,strides:i,pad:o}=n;return{x:()=>de(e,r,a,i,o)}}};var fe=n(1666);const pe={kernelName:I.BatchMatMul,inputsToSave:["a","b"],gradFunc:(e,t,n)=>{const[r,a]=t,{transposeA:i,transposeB:o}=n;return i||o?!i&&o?{a:()=>(0,fe.matMul)(e,a,!1,!1),b:()=>(0,fe.matMul)(e,r,!0,!1)}:i&&!o?{a:()=>(0,fe.matMul)(a,e,!1,!0),b:()=>(0,fe.matMul)(r,e,!1,!1)}:{a:()=>(0,fe.matMul)(a,e,!0,!0),b:()=>(0,fe.matMul)(e,r,!0,!0)}:{a:()=>(0,fe.matMul)(e,a,!1,!0),b:()=>(0,fe.matMul)(r,e,!0,!1)}}};var me=n(33625);const ge={kernelName:I.BatchToSpaceND,gradFunc:(e,t,n)=>{const{blockShape:r,crops:a}=n;return{x:()=>(0,me.spaceToBatchND)(e,r,a)}}},ye={kernelName:I.BroadcastTo,gradFunc:(e,t,n)=>{const r=n,a=r.inputShape,i=r.shape,o=Array.from(i);for(let l=a.length-1;l>=0;l--)if(a[l]===i[l])o[l]=1;else if(1!==a[l])throw new Error(`broadcastTo(): [${a}] cannot be broadcast to [${i}].`);const s=[];for(let l=0;l1&&s.push(l);return{x:()=>(0,$.sum)(e,s,!0)}}},_e={kernelName:I.Cast,gradFunc:e=>({x:()=>e.clone()})},be={kernelName:I.Ceil,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})};var ve=n(69316),we=n(12371),Fe=n(78900),ke=n(1450);const xe={kernelName:I.ClipByValue,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{clipValueMin:a,clipValueMax:i}=n;return{x:()=>(0,ke.where)((0,Fe.logicalAnd)((0,ve.greaterEqual)(r,a),(0,we.lessEqual)(r,i)),e,(0,X.zerosLike)(e))}}},Ae={kernelName:I.ComplexAbs,inputsToSave:["x"],gradFunc:R.gradFunc};var Se=n(3429);const Ee={kernelName:I.Concat,saveAllInputs:!0,gradFunc:(e,t,n)=>{const r=t.map((e=>e.shape)),{axis:a}=n,i=(0,oe.parseAxisParam)(a,t[0].shape)[0],o=r.map((e=>e[i]));return(0,Se.split)(e,o,i).map((e=>()=>e))}};var Ce=n(24935),Te=n(3333);const De={kernelName:I.Conv2D,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const[r,a]=t,{dilations:i,strides:o,pad:s,dataFormat:l}=n;return oe.assert(se.tupleValuesAreOne(i),(()=>`Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${i}'`)),{x:()=>(0,Te.conv2DBackpropInput)(r.shape,e,a,o,s,l),filter:()=>(0,Ce.conv2DBackpropFilter)(r,e,a.shape,o,s,l)}}};var Ie=n(58625);const Oe={kernelName:I.Conv2DBackpropInput,inputsToSave:["dy","filter"],gradFunc:(e,t,n)=>{const[r,a]=t,{strides:i,pad:o,dataFormat:s,dimRoundingMode:l}=n;return{dy:()=>(0,Ie.conv2d)(e,a,i,o,s,1,l),filter:()=>(0,Ce.conv2DBackpropFilter)(e,r,a.shape,i,o,s,l)}}};const Pe=(0,le.op)({conv3DBackpropFilter_:function(e,t,n,r,a){let i=e;4===e.rank&&(i=(0,q.reshape)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]));let o=t;4===o.rank&&(o=(0,q.reshape)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]])),oe.assert(5===i.rank,(()=>`Error in conv3dDerFilter: input must be rank 5, but got shape ${i.shape}.`)),oe.assert(5===o.rank,(()=>`Error in conv3dDerFilter: dy must be rank 5, but got shape ${o.shape}.`)),oe.assert(5===n.length,(()=>`Error in conv3dDerFilter: filterShape must be length 5, but got ${n}.`)),oe.assert(i.shape[4]===n[3],(()=>`Error in conv3dDerFilter: depth of input ${i.shape[4]}) must match input depth in filter (${n[3]}.`)),oe.assert(o.shape[4]===n[4],(()=>`Error in conv3dDerFilter: depth of dy (${o.shape[4]}) must match output depth for filter (${n[4]}).`));const s={x:i,dy:o},l={strides:r,pad:a,filterShape:n};return ae.ENGINE.runKernel(I.Conv3DBackpropFilterV2,s,l)}});var Me=n(6082);const Re={kernelName:I.Conv3D,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const{dilations:r,strides:a,pad:i}=n;oe.assert((0,se.tupleValuesAreOne)(r),(()=>`Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${r}'`));const[o,s]=t;return{x:()=>(0,Me.conv3DBackpropInput)(o.shape,e,s,a,i),filter:()=>Pe(o,e,s.shape,a,i)}}};var Le=n(35335);const Ne={kernelName:I.Cos,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)((0,N.neg)((0,Le.sin)((0,O.cast)(n,"float32"))),e)}}};var Be=n(51847);const je={kernelName:I.Cosh,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)((0,Be.sinh)((0,O.cast)(n,"float32")),e)}}};var Ve=n(24651),ze=n(37431),He=n(53058);const Ue={kernelName:I.Cumsum,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{axis:a,exclusive:i,reverse:o}=n;return{x:()=>{const t=(0,Ve.getAxesPermutation)([a],r.rank);let n=(0,ze.cumsum)(e,a,i,!o);return null!=t&&(n=(0,He.transpose)(n,t)),n}}}};var We=n(70703),qe=n(97309);const $e={kernelName:I.DepthwiseConv2dNative,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const{dilations:r,strides:a,pad:i,dimRoundingMode:o}=n,s=null==r?[1,1]:r;oe.assert(se.tupleValuesAreOne(s),(()=>`Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${s}'`));const[l,u]=t;return oe.assert(4===l.rank,(()=>`Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${l.rank}.`)),oe.assert(4===u.rank,(()=>`Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${u.rank}.`)),oe.assert(l.shape[3]===u.shape[2],(()=>`Error in gradient of depthwiseConv2d: number of input channels (${l.shape[3]}) must match the inChannels dimension in filter ${u.shape[2]}.`)),oe.assert(se.eitherStridesOrDilationsAreOne(a,s),(()=>`Error in gradient of depthwiseConv2d: Either strides or dilations must be 1. Got strides ${a} and dilations '${s}'.`)),se.checkPadOnDimRoundingMode("depthwiseConv2d",i,o),{x:()=>(0,qe.depthwiseConv2dNativeBackpropInput)(l.shape,e,u,a,i,s,o),filter:()=>(0,We.depthwiseConv2dNativeBackpropFilter)(l,e,u.shape,a,i,s,o)}}},Ye={kernelName:I.Dilation2D,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const[r,a]=t,i={x:r,filter:a,dy:e},o={x:r,filter:a,dy:e};return{x:()=>ae.ENGINE.runKernel(I.Dilation2DBackpropInput,i,n),filter:()=>ae.ENGINE.runKernel(I.Dilation2DBackpropFilter,o,n)}}},Ge={kernelName:I.Elu,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t,r={dy:e,y:n};return{x:()=>ae.ENGINE.runKernel(I.EluGrad,r)}}};var Xe=n(74174);const Ke={kernelName:I.Erf,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t,r=(0,P.mul)((0,Xe.exp)((0,N.neg)((0,V.square)(n))),2/Math.sqrt(Math.PI));return{x:()=>(0,P.mul)(e,r)}}},Je={kernelName:I.Exp,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,n)}}},Ze={kernelName:I.ExpandDims,inputsToSave:["input"],gradFunc:(e,t)=>{const[n]=t;return{input:()=>(0,q.reshape)(e,n.shape)}}},Qe={kernelName:I.Expm1,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,Xe.exp)(n))}}},et={kernelName:I.Floor,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})},tt={kernelName:I.FloorDiv,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,W.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{const t=(0,L.div)(e,(0,O.cast)(r,"float32")),i=(0,W.getReductionAxes)(n.shape,a);return i.length>0?(0,q.reshape)((0,$.sum)(t,i),n.shape):t},b:()=>{let t=(0,P.mul)(e,(0,O.cast)(n,"float32"));const i=(0,W.getReductionAxes)(r.shape,a);i.length>0&&(t=(0,q.reshape)((0,$.sum)(t,i),r.shape));const o=(0,V.square)(r);return(0,N.neg)((0,L.div)(t,(0,O.cast)(o,"float32")))}}}};var nt=n(17009),rt=n(18897);const at={kernelName:I.FusedBatchNorm,inputsToSave:["x","mean","variance","scale"],gradFunc:(e,t,n)=>{const{varianceEpsilon:r}=n,[a,i,o,s]=t,l=null==s?(0,B.scalar)(1):s,u=(0,W.getReductionAxes)(i.shape,a.shape),c=[];if(1===i.rank){for(let e=0;e1===i.rank?(0,q.reshape)((0,P.mul)((0,P.mul)(e,(0,rt.tile)((0,q.reshape)(f,[1,1,1,i.shape[0]]),c)),l),a.shape):(0,q.reshape)((0,P.mul)((0,P.mul)(e,f),l),a.shape),mean:()=>{let e=(0,P.mul)((0,P.mul)(f,(0,B.scalar)(-1)),h);return 1===i.rank&&(e=(0,$.sum)(e,u)),(0,q.reshape)(e,i.shape)},variance:()=>{let e=(0,P.mul)((0,P.mul)(p,d),h);return 1===i.rank&&(e=(0,$.sum)(e,u)),(0,q.reshape)(e,i.shape)},scale:()=>{const t=(0,P.mul)(d,f);let n=(0,P.mul)(e,t);return 1===i.rank&&(n=(0,$.sum)(n,u)),(0,q.reshape)(n,i.shape)},offset:()=>{let t=e;return 1===i.rank&&(t=(0,$.sum)(t,u)),(0,q.reshape)(t,i.shape)}}}};var it=n(14829),ot=n(23509);const st={kernelName:I.GatherV2,inputsToSave:["x","indices"],gradFunc:(e,t,n)=>{const[r,a]=t,{axis:i,batchDims:o}=n,s=(0,oe.parseAxisParam)(i,r.shape)[0],l=(e,t,n)=>()=>{const r=e.shape,a=t.size,o=r.slice(0,s),l=o.length,u=r.slice(i,r.length).slice(1),c=u.length,d=lt(0,l),h=lt(l+1,l+1+c),f=ut([o,[a],u]),p=(0,q.reshape)(n,f),m=(0,q.reshape)(t,[a]),g=ut([[l],d,h]),y=(0,He.transpose)(p,g);let _=(0,ot.unsortedSegmentSum)(y,m,e.shape[s]);const b=(0,Ve.getUndoAxesPermutation)(g);return _=(0,He.transpose)(_,b),_};if(1===o){const t=r.shape[0],n=r.split(t,0);return{x:()=>{const t=(0,it.stack)(n.map(((t,n)=>l(t,a.slice(n,1),e.slice(n,1))())));return t.reshape(r.shape)},indices:()=>a}}return{x:l(r,a,e),indices:()=>a}}};function lt(e,t){const n=[];for(let r=e;r{const[n,r]=t;return{a:()=>(0,X.zerosLike)(n),b:()=>(0,X.zerosLike)(r)}}},dt={kernelName:I.Identity,gradFunc:e=>({x:()=>(0,O.cast)(e,"float32")})},ht={kernelName:I.IsFinite,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})},ft={kernelName:I.IsInf,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})},pt={kernelName:I.IsNan,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})};var mt=n(6175);const gt={kernelName:I.LeakyRelu,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{alpha:a}=n,i=(0,mt.greater)(r,0);return{x:()=>(0,ke.where)(i,e,(0,P.mul)(e,a))}}},yt={kernelName:I.Log1p,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,Q.add)(n,1))}}},_t={kernelName:I.Log,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,O.cast)(n,"float32"))}}},bt={kernelName:I.LogSoftmax,inputsToSave:[],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r]=t,{axis:a}=n;return{logits:()=>{const t=(0,Xe.exp)(r);return(0,z.sub)(e,(0,P.mul)((0,$.sum)(e,a,!0),t))}}}};const vt=(0,le.op)({localResponseNormalizationBackprop_:function(e,t,n,r=5,a=1,i=1,o=.5){const s={x:e,y:t,dy:n},l={depthRadius:r,bias:a,alpha:i,beta:o};return ae.ENGINE.runKernel(I.LRNGrad,s,l)}}),wt={kernelName:I.LRN,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,a]=t,{depthRadius:i,bias:o,alpha:s,beta:l}=n;return{x:()=>vt(r,a,e,i,o,s,l)}}};var Ft=n(70457);function kt(e,t,n,r){return t.rank(0,P.mul)(e,(0,O.cast)((0,Ft.equal)(n,t),e.dtype))}}const xt={kernelName:I.Max,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const r=n,{reductionIndices:a}=r,i=t[0],o=kt(e,t[1],i,oe.parseAxisParam(a,i.shape));return{x:()=>o.x()}}};var At=n(65288);const St={kernelName:I.Maximum,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t;return{a:()=>(0,P.mul)(e,(0,O.cast)((0,ve.greaterEqual)(n,r),"float32")),b:()=>(0,P.mul)(e,(0,O.cast)((0,At.less)(n,r),"float32"))}}};const Et=(0,le.op)({maxPool3dGrad_:function(e,t,n,r,a,i,o){const s=(0,ie.convertToTensor)(e,"dy","maxPool3dGrad"),l=(0,ie.convertToTensor)(t,"input","maxPool3dGrad"),u=(0,ie.convertToTensor)(n,"output","maxPool3dGrad");let c=s,d=l,h=u,f=!1;4===l.rank&&(f=!0,c=(0,q.reshape)(s,[1,s.shape[0],s.shape[1],s.shape[2],s.shape[3]]),d=(0,q.reshape)(l,[1,l.shape[0],l.shape[1],l.shape[2],l.shape[3]]),h=(0,q.reshape)(u,[1,u.shape[0],u.shape[1],u.shape[2],u.shape[3]])),oe.assert(5===c.rank,(()=>`Error in maxPool3dGrad: dy must be rank 5 but got rank ${c.rank}.`)),oe.assert(5===d.rank,(()=>`Error in maxPool3dGrad: input must be rank 5 but got rank ${d.rank}.`)),oe.assert(5===h.rank,(()=>`Error in maxPool3dGrad: output must be rank 5 but got rank ${h.rank}.`)),(0,se.checkPadOnDimRoundingMode)("maxPool3dGrad",i,o);const p={dy:c,input:d,output:h},m={filterSize:r,strides:a,pad:i,dimRoundingMode:o},g=ae.ENGINE.runKernel(I.MaxPool3DGrad,p,m);return f?(0,q.reshape)(g,[g.shape[1],g.shape[2],g.shape[3],g.shape[4]]):g}}),Ct={kernelName:I.MaxPool3D,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,a]=t,{filterSize:i,strides:o,pad:s,dimRoundingMode:l}=n;return{x:()=>Et(e,r,a,i,o,s,l)}}};const Tt=(0,le.op)({maxPoolGrad_:function(e,t,n,r,a,i,o){const s=(0,ie.convertToTensor)(e,"dy","maxPoolGrad"),l=(0,ie.convertToTensor)(t,"input","maxPoolGrad"),u=(0,ie.convertToTensor)(n,"output","maxPoolGrad");oe.assert(l.rank===s.rank,(()=>`Rank of input (${l.rank}) does not match rank of dy (${s.rank})`)),oe.assert(4===s.rank,(()=>`Error in maxPoolGrad: dy must be rank 4 but got rank ${s.rank}.`)),oe.assert(4===l.rank,(()=>`Error in maxPoolGrad: input must be rank 4 but got rank ${l.rank}.`)),se.checkPadOnDimRoundingMode("maxPoolGrad",i,o);const c={dy:s,input:l,output:u},d={filterSize:r,strides:a,pad:i,dimRoundingMode:o};return ae.ENGINE.runKernel(I.MaxPoolGrad,c,d)}}),Dt={kernelName:I.MaxPool,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,a]=t,{filterSize:i,strides:o,pad:s}=n;return{x:()=>Tt(e,r,a,i,o,s)}}};var It=n(87760);const Ot={kernelName:I.Mean,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{axis:a}=n,i=oe.parseAxisParam(a,r.shape),o=(0,Ve.computeOutAndReduceShapes)(r.shape,i)[1],s=oe.sizeFromShape(o);return{x:()=>{const t=r.shape.slice();i.forEach((e=>{t[e]=1}));const n=(0,q.reshape)(e,t);return(0,L.div)((0,P.mul)(n,(0,It.ones)(r.shape,"float32")),s)}}}},Pt={kernelName:I.Min,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const r=n,{axis:a}=r,[i,o]=t,s=kt(e,o,i,oe.parseAxisParam(a,i.shape));return{x:()=>s.x()}}},Mt={kernelName:I.Minimum,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t;return{a:()=>(0,P.mul)(e,(0,O.cast)((0,we.lessEqual)(n,r),"float32")),b:()=>(0,P.mul)(e,(0,O.cast)((0,mt.greater)(n,r),"float32"))}}};var Rt=n(52439);const Lt={kernelName:I.MirrorPad,inputsToSave:["x"],gradFunc:(e,t,n)=>{const r=t[0],{paddings:a}=n,i=a.map((e=>e[0]));return{x:()=>(0,Rt.slice)(e,i,r.shape)}}};var Nt=n(13747);const Bt={kernelName:I.Mod,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,W.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{const t=(0,W.getReductionAxes)(n.shape,a);return t.length>0?(0,q.reshape)((0,$.sum)(e,t),n.shape):e},b:()=>{const t=(0,P.mul)(e,(0,N.neg)((0,Nt.floor)((0,L.div)(n,r)))),i=(0,W.getReductionAxes)(r.shape,a);return i.length>0?(0,q.reshape)((0,$.sum)(t,i),r.shape):t}}}},jt={kernelName:I.Multiply,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,W.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{const t=(0,P.mul)(e,(0,O.cast)(r,"float32")),i=(0,W.getReductionAxes)(n.shape,a);return i.length>0?(0,q.reshape)((0,$.sum)(t,i),n.shape):t},b:()=>{const t=(0,P.mul)(e,(0,O.cast)(n,"float32")),i=(0,W.getReductionAxes)(r.shape,a);return i.length>0?(0,q.reshape)((0,$.sum)(t,i),r.shape):t}}}},Vt={kernelName:I.Neg,gradFunc:e=>({x:()=>(0,N.neg)(e)})};var zt=n(29186);const Ht={kernelName:I.OneHot,inputsToSave:["indices"],gradFunc:(e,t)=>{const n=t[0];return{indices:()=>(0,zt.zeros)(n.shape,"float32")}}},Ut={kernelName:I.OnesLike,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})};var Wt=n(53032);const qt={kernelName:I.Pack,saveAllInputs:!0,gradFunc:(e,t,n)=>{const{axis:r}=n;return(0,Wt.unstack)(e,r).map((e=>()=>e))}},$t={kernelName:I.PadV2,inputsToSave:["x"],gradFunc:(e,t,n)=>{const r=t[0],{paddings:a}=n,i=a.map((e=>e[0]));return{x:()=>(0,Rt.slice)(e,i,r.shape)}}};var Yt=n(68063),Gt=n(54619);const Xt={kernelName:I.Pow,inputsToSave:["a","b"],outputsToSave:[!0],gradFunc:(e,t)=>{const[n,r,a]=t,i=n,o=r,s=W.assertAndGetBroadcastShape(i.shape,o.shape);return{a:()=>{const t=(0,O.cast)(o,"float32");let n=(0,P.mul)(e,(0,P.mul)(t,(0,Gt.pow)(i,(0,z.sub)(t,(0,B.scalar)(1)))));const r=W.getReductionAxes(i.shape,s);return r.length>0&&(n=(0,$.sum)(n,r)),(0,q.reshape)(n,i.shape)},b:()=>{const t=(0,mt.greater)(i,0),n=(0,ke.where)(t,(0,Yt.log)(i),(0,X.zerosLike)(i));let r=(0,P.mul)(e,(0,P.mul)(a,n));const l=W.getReductionAxes(o.shape,s);return l.length>0&&(r=(0,$.sum)(r,l)),(0,q.reshape)(r,o.shape)}}}},Kt={kernelName:I.Prelu,inputsToSave:["x","alpha"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,mt.greater)(n,0);return{x:()=>(0,ke.where)(a,e,(0,P.mul)(e,r)),alpha:()=>{let t=(0,ke.where)(a,(0,X.zerosLike)(e),(0,P.mul)(e,n));const i=(0,W.getReductionAxes)(r.shape,e.shape);return i.length>0&&(t=(0,$.sum)(t,i)),(0,q.reshape)(t,r.shape)}}}};var Jt=n(81107);function Zt(e,t,n){const r=e.shape.length,a=r-n.length,i=Ve.getAxesPermutation(n,r);let o=e;null!=i&&(o=(0,He.transpose)(e,i));const s=o.shape.slice(),l=s.splice(r-n.length,n.length).reduce(((e,t)=>e*t),1);s.push(l);let u=function(e,t,n){const r=e.shape.slice();r[n]=1;const a=(0,q.reshape)(t,r),i=(0,Jt.cumprod)(e,n,!0,!1),o=(0,Jt.cumprod)(e,n,!0,!0),s=(0,P.mul)(i,o);return(0,P.mul)(a,s)}(o.reshape(s),t,a);if(u=u.reshape(o.shape),null!=i){const e=Ve.getUndoAxesPermutation(i);u=(0,He.transpose)(u,e)}return u}const Qt={kernelName:I.Prod,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{axis:a}=n;let i=[];return i=void 0===a||null===a?r.shape.map(((e,t)=>t)):"number"===typeof a?[a]:a,{x:()=>Zt(r,e,i)}}},en={kernelName:I.RealDiv,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=W.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{const t=(0,L.div)(e,(0,O.cast)(r,"float32")),i=W.getReductionAxes(n.shape,a);return i.length>0?(0,q.reshape)((0,$.sum)(t,i),n.shape):t},b:()=>{let t=(0,P.mul)(e,(0,O.cast)(n,"float32"));const i=W.getReductionAxes(r.shape,a);i.length>0&&(t=(0,q.reshape)((0,$.sum)(t,i),r.shape));const o=(0,V.square)(r);return(0,N.neg)((0,L.div)(t,(0,O.cast)(o,"float32")))}}}},tn={kernelName:I.Reciprocal,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,N.neg)((0,V.square)(n)))}}},nn={kernelName:I.Relu6,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t,r=(0,P.mul)((0,we.lessEqual)(n,6),(0,M.step)(n));return{x:()=>(0,P.mul)(e,(0,O.cast)(r,"float32"))}}},rn={kernelName:I.Relu,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,O.cast)((0,M.step)(n),"float32"))}}},an={kernelName:I.Reshape,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,q.reshape)(e,n.shape)}}},on={kernelName:I.ResizeBilinear,inputsToSave:["images"],gradFunc:(e,t,n)=>{const[r]=t,a={dy:e,images:r};return{images:()=>ae.ENGINE.runKernel(I.ResizeBilinearGrad,a,n)}}},sn={kernelName:I.ResizeNearestNeighbor,inputsToSave:["images"],gradFunc:(e,t,n)=>{const[r]=t,a={dy:e,images:r};return{images:()=>ae.ENGINE.runKernel(I.ResizeNearestNeighborGrad,a,n)}}};var ln=n(4531);const un={kernelName:I.Reverse,gradFunc:(e,t,n)=>{const{dims:r}=n,a=(0,oe.parseAxisParam)(r,e.shape);return{x:()=>(0,ln.reverse)(e,a)}}},cn={kernelName:I.Round,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})},dn={kernelName:I.Rsqrt,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,N.neg)((0,L.div)(e,(0,P.mul)((0,Gt.pow)(n,1.5),2)))}}};var hn=n(84248);const fn={kernelName:I.Select,inputsToSave:["condition"],gradFunc:(e,t)=>{const[n]=t;return{condition:()=>(0,O.cast)((0,X.zerosLike)(n),"float32"),t:()=>(0,P.mul)(e,(0,O.cast)(n,e.dtype)),e:()=>(0,P.mul)(e,(0,O.cast)((0,hn.logicalNot)(n),e.dtype))}}};var pn=n(43245);const mn={kernelName:I.Selu,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{const t=(0,mt.greater)(n,(0,B.scalar)(0)),r=(0,B.scalar)(pn.SELU_SCALEALPHA),a=(0,B.scalar)(pn.SELU_SCALE),i=(0,P.mul)(e,a),o=(0,P.mul)((0,P.mul)(e,r),(0,Xe.exp)((0,O.cast)(n,"float32")));return(0,ke.where)(t,i,o)}}}},gn={kernelName:I.Sigmoid,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,P.mul)(n,(0,z.sub)((0,B.scalar)(1),n)))}}},yn={kernelName:I.Sign,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})};var _n=n(72286);const bn={kernelName:I.Sin,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)((0,_n.cos)((0,O.cast)(n,"float32")),e)}}};var vn=n(85348);const wn={kernelName:I.Sinh,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)((0,vn.cosh)((0,O.cast)(n,"float32")),e)}}};var Fn=n(79216),kn=n(69130);const xn={kernelName:I.Slice,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{begin:a,size:i}=n,o=r.shape,[s,l]=(0,kn.parseSliceParams)(r,a,i),u=[];for(let c=0;c(0,Fn.pad)(e,u)}}},An={kernelName:I.Softmax,outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r]=t,{dim:a}=n,i=(0,P.mul)(e,r);return{logits:()=>(0,z.sub)(i,(0,P.mul)((0,$.sum)(i,[a],true),r))}}};var Sn=n(72509);const En={kernelName:I.Softplus,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,Sn.sigmoid)(n))}}};var Cn=n(89365);const Tn={kernelName:I.SpaceToBatchND,gradFunc:(e,t,n)=>{const{blockShape:r,paddings:a}=n;return{x:()=>(0,Cn.batchToSpaceND)(e,r,a)}}};var Dn=n(27493);const In={kernelName:I.SplitV,gradFunc:(e,t,n)=>{const{axis:r}=n;return{x:()=>(0,Dn.concat)(e,r)}}},On={kernelName:I.Sqrt,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,P.mul)((0,j.sqrt)((0,O.cast)(n,"float32")),2))}}},Pn={kernelName:I.Square,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)(e,(0,P.mul)((0,O.cast)(n,"float32"),2))}}},Mn={kernelName:I.SquaredDifference,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=(0,B.scalar)(2);return{a:()=>(0,P.mul)(e,(0,P.mul)(a,(0,z.sub)(n,r))),b:()=>(0,P.mul)(e,(0,P.mul)(a,(0,z.sub)(r,n)))}}},Rn={kernelName:I.Step,gradFunc:e=>({x:()=>(0,X.zerosLike)(e)})},Ln={kernelName:I.Sub,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,a=W.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{let t=e;const r=W.getReductionAxes(n.shape,a);return r.length>0&&(t=(0,$.sum)(t,r)),(0,q.reshape)(t,n.shape)},b:()=>{let t=e;const n=W.getReductionAxes(r.shape,a);return n.length>0&&(t=(0,$.sum)(t,n)),(0,q.reshape)((0,N.neg)(t),r.shape)}}}},Nn={kernelName:I.Sum,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,a=r.shape.slice(),{axis:i}=n;(0,oe.parseAxisParam)(i,r.shape).forEach((e=>{a[e]=1}));const o=(0,q.reshape)(e,a),s=(0,P.mul)(o,(0,It.ones)(r.shape,"float32"));return{x:()=>s}}},Bn={kernelName:I.Tan,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,L.div)(e,(0,V.square)((0,_n.cos)(n)))}}},jn={kernelName:I.Tanh,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>(0,P.mul)((0,z.sub)((0,B.scalar)(1),(0,V.square)(n)),e)}}},Vn={kernelName:I.Tile,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{reps:a}=n;return{x:()=>{let t=(0,X.zerosLike)(r);if(1===r.rank)for(let n=0;n{const r=n,{perm:a}=r,i=Ve.getUndoAxesPermutation(a);return{x:()=>(0,He.transpose)(e,i)}}},Hn={kernelName:I.Unpack,gradFunc:(e,t,n)=>{const r=n,{axis:a}=r;return{value:()=>(0,it.stack)(e,a)}}};var Un=n(75375),Wn=n(34602),qn=n(83227);const $n={kernelName:I.UnsortedSegmentSum,inputsToSave:["segmentIds"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>function(e,t){const n=(0,qn.maximum)(t,(0,X.zerosLike)(t)),r=(0,Wn.gather)(e,n);let a=(0,ve.greaterEqual)(t,(0,B.scalar)(0,"int32"));const i=r.rank-a.rank;for(let s=0;s({x:()=>(0,X.zerosLike)(e)})};var Gn=n(73331);const Xn=[R,H,U,Y,G,K,J,Z,ee,te,ne,re,ce,he,pe,ge,ye,_e,be,xe,Ae,Ee,Oe,De,Re,Ne,je,Ue,$e,Ye,en,Ge,Ke,Je,Ze,Qe,tt,et,at,st,ct,dt,ht,ft,pt,gt,yt,_t,bt,wt,xt,xt,St,Ct,Dt,Ot,Pt,Mt,Lt,Bt,jt,Vt,Ht,Ut,qt,$t,$t,Xt,Kt,Qt,tn,nn,rn,an,on,sn,un,cn,dn,fn,mn,gn,yn,bn,wn,xn,An,En,Tn,Tn,In,In,On,Mn,Pn,Rn,Ln,Nn,Bn,jn,Vn,zn,Hn,$n,Yn];for(const bm of Xn)(0,Gn.registerGradient)(bm);var Kn=n(31473),Jn=n(9180);(0,Jn.getGlobalTensorClass)().prototype.abs=function(){return this.throwIfDisposed(),(0,Kn.abs)(this)};var Zn=n(67631);(0,Jn.getGlobalTensorClass)().prototype.acos=function(){return this.throwIfDisposed(),(0,Zn.acos)(this)};var Qn=n(60623);(0,Jn.getGlobalTensorClass)().prototype.acosh=function(){return this.throwIfDisposed(),(0,Qn.acosh)(this)},(0,Jn.getGlobalTensorClass)().prototype.add=function(e){return this.throwIfDisposed(),(0,Q.add)(this,e)};var er=n(97010);(0,Jn.getGlobalTensorClass)().prototype.all=function(e,t){return this.throwIfDisposed(),(0,er.all)(this,e,t)};var tr=n(48627);(0,Jn.getGlobalTensorClass)().prototype.any=function(e,t){return this.throwIfDisposed(),(0,tr.any)(this,e,t)};var nr=n(79236);(0,Jn.getGlobalTensorClass)().prototype.argMax=function(e){return this.throwIfDisposed(),(0,nr.argMax)(this,e)};var rr=n(90634);(0,Jn.getGlobalTensorClass)().prototype.argMin=function(e){return this.throwIfDisposed(),(0,rr.argMin)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.asScalar=function(){return this.throwIfDisposed(),(0,oe.assert)(1===this.size,(()=>"The array must have only 1 element.")),(0,q.reshape)(this,[])},(0,Jn.getGlobalTensorClass)().prototype.asType=function(e){return this.throwIfDisposed(),(0,O.cast)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.as1D=function(){return this.throwIfDisposed(),(0,q.reshape)(this,[this.size])},(0,Jn.getGlobalTensorClass)().prototype.as2D=function(e,t){return this.throwIfDisposed(),(0,q.reshape)(this,[e,t])},(0,Jn.getGlobalTensorClass)().prototype.as3D=function(e,t,n){return this.throwIfDisposed(),(0,q.reshape)(this,[e,t,n])},(0,Jn.getGlobalTensorClass)().prototype.as4D=function(e,t,n,r){return this.throwIfDisposed(),(0,q.reshape)(this,[e,t,n,r])},(0,Jn.getGlobalTensorClass)().prototype.as5D=function(e,t,n,r,a){return this.throwIfDisposed(),(0,q.reshape)(this,[e,t,n,r,a])};var ar=n(8666);(0,Jn.getGlobalTensorClass)().prototype.asin=function(){return this.throwIfDisposed(),(0,ar.asin)(this)};var ir=n(66440);(0,Jn.getGlobalTensorClass)().prototype.asinh=function(){return this.throwIfDisposed(),(0,ir.asinh)(this)};var or=n(77843);(0,Jn.getGlobalTensorClass)().prototype.atan=function(){return this.throwIfDisposed(),(0,or.atan)(this)};var sr=n(43157);(0,Jn.getGlobalTensorClass)().prototype.atan2=function(e){return this.throwIfDisposed(),(0,sr.atan2)(this,e)};var lr=n(89227);(0,Jn.getGlobalTensorClass)().prototype.atanh=function(){return this.throwIfDisposed(),(0,lr.atanh)(this)};var ur=n(55794);(0,Jn.getGlobalTensorClass)().prototype.avgPool=function(e,t,n,r){return this.throwIfDisposed(),(0,ur.avgPool)(this,e,t,n,r)},(0,Jn.getGlobalTensorClass)().prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),(0,Cn.batchToSpaceND)(this,e,t)};var cr=n(86715);(0,Jn.getGlobalTensorClass)().prototype.batchNorm=function(e,t,n,r,a){return this.throwIfDisposed(),(0,cr.batchNorm)(this,e,t,n,r,a)};var dr=n(68944);(0,Jn.getGlobalTensorClass)().prototype.broadcastTo=function(e){return this.throwIfDisposed(),(0,dr.broadcastTo)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.cast=function(e){return this.throwIfDisposed(),(0,O.cast)(this,e)};var hr=n(876);(0,Jn.getGlobalTensorClass)().prototype.ceil=function(){return this.throwIfDisposed(),(0,hr.ceil)(this)};var fr=n(20157);(0,Jn.getGlobalTensorClass)().prototype.clipByValue=function(e,t){return this.throwIfDisposed(),(0,fr.clipByValue)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.concat=function(e,t){return this.throwIfDisposed(),e instanceof Jn.Tensor&&(e=[e]),(0,Dn.concat)([this,...e],t)};var pr=n(28374);(0,Jn.getGlobalTensorClass)().prototype.conv1d=function(e,t,n,r,a,i){return this.throwIfDisposed(),(0,pr.conv1d)(this,e,t,n,r,a,i)};var mr=n(92777);(0,Jn.getGlobalTensorClass)().prototype.conv2dTranspose=function(e,t,n,r,a){return this.throwIfDisposed(),(0,mr.conv2dTranspose)(this,e,t,n,r,a)},(0,Jn.getGlobalTensorClass)().prototype.conv2d=function(e,t,n,r,a,i){return this.throwIfDisposed(),(0,Ie.conv2d)(this,e,t,n,r,a,i)},(0,Jn.getGlobalTensorClass)().prototype.cos=function(){return this.throwIfDisposed(),(0,_n.cos)(this)},(0,Jn.getGlobalTensorClass)().prototype.cosh=function(){return this.throwIfDisposed(),(0,vn.cosh)(this)},(0,Jn.getGlobalTensorClass)().prototype.cumprod=function(e,t,n){return this.throwIfDisposed(),(0,Jt.cumprod)(this,e,t,n)},(0,Jn.getGlobalTensorClass)().prototype.cumsum=function(e,t,n){return this.throwIfDisposed(),(0,ze.cumsum)(this,e,t,n)};var gr=n(89247);(0,Jn.getGlobalTensorClass)().prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),(0,gr.depthToSpace)(this,e,t)};var yr=n(78819);(0,Jn.getGlobalTensorClass)().prototype.depthwiseConv2d=function(e,t,n,r,a,i){return this.throwIfDisposed(),(0,yr.depthwiseConv2d)(this,e,t,n,r,a,i)};var _r=n(29093);(0,Jn.getGlobalTensorClass)().prototype.dilation2d=function(e,t,n,r,a){return this.throwIfDisposed(),(0,_r.dilation2d)(this,e,t,n,r,a)};var br=n(92660);(0,Jn.getGlobalTensorClass)().prototype.divNoNan=function(e){return this.throwIfDisposed(),(0,br.divNoNan)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.div=function(e){return this.throwIfDisposed(),(0,L.div)(this,e)};var vr=n(10138);(0,Jn.getGlobalTensorClass)().prototype.dot=function(e){return this.throwIfDisposed(),(0,vr.dot)(this,e)};var wr=n(54373);(0,Jn.getGlobalTensorClass)().prototype.elu=function(){return this.throwIfDisposed(),(0,wr.elu)(this)},(0,Jn.getGlobalTensorClass)().prototype.equal=function(e){return this.throwIfDisposed(),(0,Ft.equal)(this,e)};var Fr=n(32514);(0,Jn.getGlobalTensorClass)().prototype.erf=function(){return this.throwIfDisposed(),(0,Fr.erf)(this)};var kr=n(78418);(0,Jn.getGlobalTensorClass)().prototype.euclideanNorm=function(e,t){return this.throwIfDisposed(),(0,kr.euclideanNorm)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.exp=function(){return this.throwIfDisposed(),(0,Xe.exp)(this)},(0,Jn.getGlobalTensorClass)().prototype.expandDims=function(e){return this.throwIfDisposed(),(0,Un.expandDims)(this,e)};var xr=n(46624);(0,Jn.getGlobalTensorClass)().prototype.expm1=function(){return this.throwIfDisposed(),(0,xr.expm1)(this)};var Ar=n(83422);(0,Jn.getGlobalTensorClass)().prototype.fft=function(){return this.throwIfDisposed(),(0,Ar.fft)(this)},(0,Jn.getGlobalTensorClass)().prototype.flatten=function(){return this.throwIfDisposed(),(0,q.reshape)(this,[this.size])},(0,Jn.getGlobalTensorClass)().prototype.floor=function(){return this.throwIfDisposed(),(0,Nt.floor)(this)};var Sr=n(73476);(0,Jn.getGlobalTensorClass)().prototype.floorDiv=function(e){return this.throwIfDisposed(),(0,Sr.floorDiv)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.gather=function(e,t,n){return this.throwIfDisposed(),(0,Wn.gather)(this,e,t,n)},(0,Jn.getGlobalTensorClass)().prototype.greaterEqual=function(e){return this.throwIfDisposed(),(0,ve.greaterEqual)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.greater=function(e){return this.throwIfDisposed(),(0,mt.greater)(this,e)};var Er=n(18533);(0,Jn.getGlobalTensorClass)().prototype.ifft=function(){return this.throwIfDisposed(),(0,Er.ifft)(this)};var Cr=n(75667);(0,Jn.getGlobalTensorClass)().prototype.irfft=function(){return this.throwIfDisposed(),(0,Cr.irfft)(this)};var Tr=n(22699);(0,Jn.getGlobalTensorClass)().prototype.isFinite=function(){return this.throwIfDisposed(),(0,Tr.isFinite)(this)};var Dr=n(49133);(0,Jn.getGlobalTensorClass)().prototype.isInf=function(){return this.throwIfDisposed(),(0,Dr.isInf)(this)};var Ir=n(36707);(0,Jn.getGlobalTensorClass)().prototype.isNaN=function(){return this.throwIfDisposed(),(0,Ir.isNaN)(this)};var Or=n(75124);(0,Jn.getGlobalTensorClass)().prototype.leakyRelu=function(e){return this.throwIfDisposed(),(0,Or.leakyRelu)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.lessEqual=function(e){return this.throwIfDisposed(),(0,we.lessEqual)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.less=function(e){return this.throwIfDisposed(),(0,At.less)(this,e)};var Pr=n(60608);(0,Jn.getGlobalTensorClass)().prototype.localResponseNormalization=function(e,t,n,r){return this.throwIfDisposed(),(0,Pr.localResponseNormalization)(this,e,t,n,r)};var Mr=n(66240);(0,Jn.getGlobalTensorClass)().prototype.logSigmoid=function(){return this.throwIfDisposed(),(0,Mr.logSigmoid)(this)};var Rr=n(43826);(0,Jn.getGlobalTensorClass)().prototype.logSoftmax=function(e){return this.throwIfDisposed(),(0,Rr.logSoftmax)(this,e)};var Lr=n(69815);(0,Jn.getGlobalTensorClass)().prototype.logSumExp=function(e,t){return this.throwIfDisposed(),(0,Lr.logSumExp)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.log=function(){return this.throwIfDisposed(),(0,Yt.log)(this)};var Nr=n(1730);(0,Jn.getGlobalTensorClass)().prototype.log1p=function(){return this.throwIfDisposed(),(0,Nr.log1p)(this)},(0,Jn.getGlobalTensorClass)().prototype.logicalAnd=function(e){return this.throwIfDisposed(),(0,Fe.logicalAnd)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.logicalNot=function(){return this.throwIfDisposed(),(0,hn.logicalNot)(this)};var Br=n(1048);(0,Jn.getGlobalTensorClass)().prototype.logicalOr=function(e){return this.throwIfDisposed(),(0,Br.logicalOr)(this,e)};var jr=n(7940);(0,Jn.getGlobalTensorClass)().prototype.logicalXor=function(e){return this.throwIfDisposed(),(0,jr.logicalXor)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.matMul=function(e,t,n){return this.throwIfDisposed(),(0,fe.matMul)(this,e,t,n)};var Vr=n(61476);(0,Jn.getGlobalTensorClass)().prototype.maxPool=function(e,t,n,r){return this.throwIfDisposed(),(0,Vr.maxPool)(this,e,t,n,r)};var zr=n(15379);(0,Jn.getGlobalTensorClass)().prototype.max=function(e,t){return this.throwIfDisposed(),(0,zr.max)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.maximum=function(e){return this.throwIfDisposed(),(0,qn.maximum)(this,e)};var Hr=n(54572);(0,Jn.getGlobalTensorClass)().prototype.mean=function(e,t){return this.throwIfDisposed(),(0,Hr.mean)(this,e,t)};var Ur=n(75969);(0,Jn.getGlobalTensorClass)().prototype.min=function(e,t){return this.throwIfDisposed(),(0,Ur.min)(this,e,t)};var Wr=n(16505);(0,Jn.getGlobalTensorClass)().prototype.minimum=function(e){return this.throwIfDisposed(),(0,Wr.minimum)(this,e)};var qr=n(13060);(0,Jn.getGlobalTensorClass)().prototype.mirrorPad=function(e,t){return this.throwIfDisposed(),(0,qr.mirrorPad)(this,e,t)};var $r=n(2825);(0,Jn.getGlobalTensorClass)().prototype.mod=function(e){return this.throwIfDisposed(),(0,$r.mod)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.mul=function(e){return this.throwIfDisposed(),(0,P.mul)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.neg=function(){return this.throwIfDisposed(),(0,N.neg)(this)};var Yr=n(37523);(0,Jn.getGlobalTensorClass)().prototype.norm=function(e,t,n){return this.throwIfDisposed(),(0,Yr.norm)(this,e,t,n)};var Gr=n(24495);(0,Jn.getGlobalTensorClass)().prototype.notEqual=function(e){return this.throwIfDisposed(),(0,Gr.notEqual)(this,e)};var Xr=n(24985);(0,Jn.getGlobalTensorClass)().prototype.oneHot=function(e,t=1,n=0){return this.throwIfDisposed(),(0,Xr.oneHot)(this,e,t,n)};var Kr=n(33948);(0,Jn.getGlobalTensorClass)().prototype.onesLike=function(){return this.throwIfDisposed(),(0,Kr.onesLike)(this)},(0,Jn.getGlobalTensorClass)().prototype.pad=function(e,t){return this.throwIfDisposed(),(0,Fn.pad)(this,e,t)};var Jr=n(43199);(0,Jn.getGlobalTensorClass)().prototype.pool=function(e,t,n,r,a,i){return this.throwIfDisposed(),(0,Jr.pool)(this,e,t,n,r,a,i)},(0,Jn.getGlobalTensorClass)().prototype.pow=function(e){return this.throwIfDisposed(),(0,Gt.pow)(this,e)};var Zr=n(84247);(0,Jn.getGlobalTensorClass)().prototype.prelu=function(e){return this.throwIfDisposed(),(0,Zr.prelu)(this,e)};var Qr=n(7756);(0,Jn.getGlobalTensorClass)().prototype.prod=function(e,t){return this.throwIfDisposed(),(0,Qr.prod)(this,e,t)};var ea=n(36637);(0,Jn.getGlobalTensorClass)().prototype.reciprocal=function(){return this.throwIfDisposed(),(0,ea.reciprocal)(this)};var ta=n(69243);(0,Jn.getGlobalTensorClass)().prototype.relu=function(){return this.throwIfDisposed(),(0,ta.relu)(this)};var na=n(72561);(0,Jn.getGlobalTensorClass)().prototype.relu6=function(){return this.throwIfDisposed(),(0,na.relu6)(this)},(0,Jn.getGlobalTensorClass)().prototype.reshapeAs=function(e){return this.throwIfDisposed(),(0,q.reshape)(this,e.shape)},(0,Jn.getGlobalTensorClass)().prototype.reshape=function(e){return this.throwIfDisposed(),(0,q.reshape)(this,e)};var ra=n(7294);(0,Jn.getGlobalTensorClass)().prototype.resizeBilinear=function(e,t,n){return this.throwIfDisposed(),(0,ra.resizeBilinear)(this,e,t,n)};var aa=n(91439);(0,Jn.getGlobalTensorClass)().prototype.resizeNearestNeighbor=function(e,t,n){return this.throwIfDisposed(),(0,aa.resizeNearestNeighbor)(this,e,t,n)},(0,Jn.getGlobalTensorClass)().prototype.reverse=function(e){return this.throwIfDisposed(),(0,ln.reverse)(this,e)};var ia=n(90406);(0,Jn.getGlobalTensorClass)().prototype.rfft=function(){return this.throwIfDisposed(),(0,ia.rfft)(this)};var oa=n(18069);(0,Jn.getGlobalTensorClass)().prototype.round=function(){return this.throwIfDisposed(),(0,oa.round)(this)},(0,Jn.getGlobalTensorClass)().prototype.rsqrt=function(){return this.throwIfDisposed(),(0,nt.rsqrt)(this)};var sa=n(85630);(0,Jn.getGlobalTensorClass)().prototype.selu=function(){return this.throwIfDisposed(),(0,sa.selu)(this)};var la=n(50549);(0,Jn.getGlobalTensorClass)().prototype.separableConv2d=function(e,t,n,r,a,i){return this.throwIfDisposed(),(0,la.separableConv2d)(this,e,t,n,r,a,i)},(0,Jn.getGlobalTensorClass)().prototype.sigmoid=function(){return this.throwIfDisposed(),(0,Sn.sigmoid)(this)};var ua=n(58100);(0,Jn.getGlobalTensorClass)().prototype.sign=function(){return this.throwIfDisposed(),(0,ua.sign)(this)},(0,Jn.getGlobalTensorClass)().prototype.sin=function(){return this.throwIfDisposed(),(0,Le.sin)(this)},(0,Jn.getGlobalTensorClass)().prototype.sinh=function(){return this.throwIfDisposed(),(0,Be.sinh)(this)},(0,Jn.getGlobalTensorClass)().prototype.slice=function(e,t){return this.throwIfDisposed(),(0,Rt.slice)(this,e,t)};var ca=n(74855);(0,Jn.getGlobalTensorClass)().prototype.softmax=function(e){return this.throwIfDisposed(),(0,ca.softmax)(this,e)};var da=n(89725);(0,Jn.getGlobalTensorClass)().prototype.softplus=function(){return this.throwIfDisposed(),(0,da.softplus)(this)},(0,Jn.getGlobalTensorClass)().prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),(0,me.spaceToBatchND)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.split=function(e,t){return this.throwIfDisposed(),(0,Se.split)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.sqrt=function(){return this.throwIfDisposed(),(0,j.sqrt)(this)},(0,Jn.getGlobalTensorClass)().prototype.square=function(){return this.throwIfDisposed(),(0,V.square)(this)};var ha=n(26296);(0,Jn.getGlobalTensorClass)().prototype.squaredDifference=function(e){return this.throwIfDisposed(),(0,ha.squaredDifference)(this,e)};var fa=n(45965);(0,Jn.getGlobalTensorClass)().prototype.squeeze=function(e){return this.throwIfDisposed(),(0,fa.squeeze)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.stack=function(e,t){this.throwIfDisposed();const n=e instanceof Jn.Tensor?[this,e]:[this,...e];return(0,it.stack)(n,t)},(0,Jn.getGlobalTensorClass)().prototype.step=function(e){return this.throwIfDisposed(),(0,M.step)(this,e)};var pa=n(7223);(0,Jn.getGlobalTensorClass)().prototype.stridedSlice=function(e,t,n,r,a,i,o,s){return this.throwIfDisposed(),(0,pa.stridedSlice)(this,e,t,n,r,a,i,o,s)},(0,Jn.getGlobalTensorClass)().prototype.sub=function(e){return this.throwIfDisposed(),(0,z.sub)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.sum=function(e,t){return this.throwIfDisposed(),(0,$.sum)(this,e,t)};var ma=n(7590);(0,Jn.getGlobalTensorClass)().prototype.tan=function(){return this.throwIfDisposed(),(0,ma.tan)(this)};var ga=n(7180);(0,Jn.getGlobalTensorClass)().prototype.tanh=function(){return this.throwIfDisposed(),(0,ga.tanh)(this)},(0,Jn.getGlobalTensorClass)().prototype.tile=function(e){return this.throwIfDisposed(),(0,rt.tile)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.toBool=function(){return this.throwIfDisposed(),(0,O.cast)(this,"bool")},(0,Jn.getGlobalTensorClass)().prototype.toFloat=function(){return this.throwIfDisposed(),(0,O.cast)(this,"float32")},(0,Jn.getGlobalTensorClass)().prototype.toInt=function(){return this.throwIfDisposed(),(0,O.cast)(this,"int32")};var ya=n(15717);(0,Jn.getGlobalTensorClass)().prototype.topk=function(e,t){return this.throwIfDisposed(),(0,ya.topk)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.transpose=function(e){return this.throwIfDisposed(),(0,He.transpose)(this,e)};var _a=n(20438);(0,Jn.getGlobalTensorClass)().prototype.unique=function(e){return this.throwIfDisposed(),(0,_a.unique)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),(0,ot.unsortedSegmentSum)(this,e,t)},(0,Jn.getGlobalTensorClass)().prototype.unstack=function(e){return this.throwIfDisposed(),(0,Wt.unstack)(this,e)},(0,Jn.getGlobalTensorClass)().prototype.where=function(e,t){return this.throwIfDisposed(),(0,ke.where)(e,this,t)},(0,Jn.getGlobalTensorClass)().prototype.zerosLike=function(){return this.throwIfDisposed(),(0,X.zerosLike)(this)};class ba extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ba.prototype)}}class va extends Error{constructor(e){super(e),Object.setPrototypeOf(this,va.prototype)}}class wa extends Error{constructor(e){super(e),Object.setPrototypeOf(this,wa.prototype)}}class Fa extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Fa.prototype)}}class ka extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ka.prototype)}}Error;class xa{constructor(e){this.maxEntries=e||100,this.cache=new Map}get(e){let t;return this.cache.has(e)&&(t=this.cache.get(e),this.cache.delete(e),this.cache.set(e,t)),t}put(e,t){if(this.cache.has(e))this.cache.delete(e);else if(this.cache.size>=this.maxEntries){const e=this.cache.keys().next().value;this.cache.delete(e)}this.cache.set(e,t)}getMaxEntries(){return this.maxEntries}setMaxEntries(e){if(e<0)throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${e}.`);if(this.maxEntries>e)for(let t=0;tt.toUpperCase()))}let Oa={};function Pa(e){if(null===e||void 0===e)return null;const t={};return t.className=e.getClassName(),t.config=e.getConfig(),t}function Ma(e){if(null!=e&&"object"===typeof e)if(Array.isArray(e))e.forEach((e=>Ma(e)));else{const t=Object.keys(e);for(const n of t){const t=e[n];null!=t&&"object"===typeof t&&(Array.isArray(t)||"ndarray"!==t.type||"number"!==typeof t.value?Ma(t):e[n]=t.value)}}}function Ra(e,t={},n={},r="object",a=!1){if("string"===typeof e){const a=e;let i;if(a in n)i=n[a];else if(a in Oa)i=Oa[a];else if(i=t[a],null==i)throw new wa(`Unknown ${r}: ${e}. This may be due to one of the following reasons:\n1. The ${r} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${r} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);return i}{const i=e;if(null==i.className||null==i.config)throw new wa(`${r}: Improper config format: ${JSON.stringify(i)}.\n'className' and 'config' must set.`);const o=i.className;let s,l;if(o in n?[s,l]=n[o]:o in Oa?[s,l]=Oa.className:o in t&&([s,l]=t[o]),null==s)throw new wa(`Unknown ${r}: ${o}. This may be due to one of the following reasons:\n1. The ${r} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${r} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);if(null!=l){const e={};for(const n of Object.keys(Oa))e[n]=Oa[n];for(const a of Object.keys(n))e[a]=n[a];i.config.customObjects=e;const t=Object.assign({},Oa);for(const a of Object.keys(n))Oa[a]=n[a];Ma(i.config);const r=l(s,i.config,n,a);return Oa=Object.assign({},t),r}{const e=Object.assign({},Oa);for(const r of Object.keys(n))Oa[r]=n[r];const t=new s(i.config);return Oa=Object.assign({},e),t}}}function La(e,t){return-1*function(e,t){return et?1:0}(e,t)}function Na(e){if(null==e)return e;const t=[];for(const n of e)-1===t.indexOf(n)&&t.push(n);return t}function Ba(e){if(null==e)throw new wa(`Invalid value in obj: ${JSON.stringify(e)}`);for(const t in e)if(e.hasOwnProperty(t))return!1;return!0}function ja(e,t,n){if(null!=n&&e.indexOf(n)<0)throw new wa(`${n} is not a valid ${t}. Valid values are ${e} or null/undefined.`)}function Va(e,t,n=0,r=1/0){return Sa(n>=0),Sa(r>=n),Array.isArray(e)&&e.length>=n&&e.length<=r&&e.every((e=>typeof e===t))}function za(e,t){Array.isArray(e)?(D.util.assert(e.length>0,(()=>`${t} is unexpectedly an empty array.`)),e.forEach(((e,n)=>za(e,`element ${n+1} of ${t}`)))):D.util.assert(Number.isInteger(e)&&e>0,(()=>`Expected ${t} to be a positive integer, but got ${Ha(e)}.`))}function Ha(e){return null===e?"null":Array.isArray(e)?"["+e.map((e=>Ha(e))).join(",")+"]":"string"===typeof e?`"${e}"`:`${e}`}function Ua(e){return"relu"===e?"relu":"linear"===e?"linear":"elu"===e?"elu":null}let Wa=0;function qa(){return Wa++}const $a={};function Ya(e=""){return e in $a||($a[e]=0),$a[e]+=1,e+$a[e].toString()}const Ga=["channelsFirst","channelsLast"],Xa=["nearest","bilinear"],Ka=["valid","same","causal"],Ja=["max","avg"],Za=["sum","mul","concat","ave"],Qa=new Map;function ei(e){ja(Ga,"DataFormat",e)}function ti(e){ja(Ka,"PaddingMode",e)}function ni(e){ja(Ja,"PoolMode",e)}const ri=[];function ai(e,t){ri.push(e);try{const e=t();return ri.pop(),e}catch(n){throw ri.pop(),n}}function ii(e){if(!li(e))throw new Error("Not a valid tensor name: '"+e+"'");return(0===ri.length?"":ri.join("/")+"/")+e}function oi(e){if(!li(e))throw new Error("Not a valid tensor name: '"+e+"'");Qa.has(e)||Qa.set(e,0);const t=Qa.get(e);if(Qa.set(e,Qa.get(e)+1),t>0){const n=`${e}_${t}`;return Qa.set(n,1),n}return e}const si=new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\._\/]*$/);function li(e){return!!e.match(si)}function ui(e,t,n){null==t&&(t=0),null==n&&(n=e.length);let r=1;for(let a=t;at&&(t=r)}return t}function hi(e,t){if(t{switch(e.rank){case 1:return D.slice1d(e,t,n);case 2:return D.slice2d(e,[t,0],[n,e.shape[1]]);case 3:return D.slice3d(e,[t,0,0],[n,e.shape[1],e.shape[2]]);case 4:return D.slice4d(e,[t,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3]]);case 5:return D.slice(e,[t,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4]]);case 6:return D.slice(e,[t,0,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4],e.shape[5]]);default:throw new wa(`sliceAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}}))}function _i(e,t,n){return(0,D.tidy)((()=>{switch(e.rank){case 1:return D.slice1d(e,t,n);case 2:return D.slice2d(e,[0,t],[e.shape[0],n]);case 3:return D.slice3d(e,[0,0,t],[e.shape[0],e.shape[1],n]);case 4:return D.slice4d(e,[0,0,0,t],[e.shape[0],e.shape[1],e.shape[2],n]);default:throw new wa(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}}))}function bi(e,t,n,r){return(0,D.tidy)((()=>{switch(e.rank){case 1:return D.slice1d(e,t,n);case 2:switch(r){case 1:return yi(e,t,n);case 2:return _i(e,t,n);default:throw new wa(`The axis is not within the rank of the tensor ${r}`)}case 3:switch(r){case 1:return yi(e,t,n);case 2:return D.slice3d(e,[0,t,0],[e.shape[0],n,e.shape[2]]);case 3:return _i(e,t,n);default:throw new wa(`The axis is not within the rank of the tensor ${r}`)}case 4:switch(r){case 1:return yi(e,t,n);case 2:return D.slice4d(e,[0,t,0,0],[e.shape[0],n,e.shape[2],e.shape[3]]);case 3:return D.slice4d(e,[0,0,t,0],[e.shape[0],e.shape[1],n,e.shape[3]]);case 4:return _i(e,t,n);default:throw new wa(`The axis is not within the rank of the tensor ${r}`)}default:throw new wa(`sliceAlongLastAxis() received an unsupported tensor rank: ${e.rank}`)}}))}function vi(e,t=-1){let n;return t<0&&(n=e[0].rank,t=0!==n?n:0),t===e[0].rank&&(t=-1),D.concat(e,t)}function wi(e,t){switch(e.rank){case 1:return D.concat1d([e,t]);case 2:return D.concat2d([e,t],0);case 3:return D.concat3d([e,t],0);case 4:return D.concat4d([e,t],0);default:throw new wa(`concatAlongFirstAxis() received an unsupported tensor rank: ${e.rank}`)}}function Fi(e,t){if(Array.isArray(t)||(t=[t]),e.rank!==t.length)throw new wa(`The length of input n (${t.length}) does not match the number of dimensions in input x (${e.rank})`);return D.tile(e,t)}function ki(e,t=0,n=1,r,a){return D.randomNormal(e,t,n,r,a)}function xi(e,t,n,r){if(e.rank<2||t.rank<2)throw new Fa(`dot requires both inputs to be rank >= 2 but got x shape = ${e.shape} and y shape = ${t.shape}`);if(t.rank>=3){if(e.shape.slice(-1)[0]!==t.shape.slice(-2)[0])throw new Fa(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${e.shape} and y shape = ${t.shape}`)}if(2===e.rank&&2===t.rank){const a=!1,i=!1;return D.fused.matMul({a:e,b:t,transposeA:a,transposeB:i,bias:r?Ei(e.rank,r,"channelsLast"):null,activation:n})}{const a=e.shape.slice(),i=a.pop();e=D.reshape(e,[-1,i]);const o=t.shape.slice(),s=o.pop(),l=o.pop(),u=[...o,s],c=Array.from({length:t.rank},((e,n)=>0===n?t.rank-2:n<=t.rank-2?n-1:n));t=D.reshape(D.transpose(t,c),[l,-1]);const d=[...a,...u],h=!1,f=!1;return D.reshape(D.fused.matMul({a:e,b:t,transposeA:h,transposeB:f,bias:r?Ei(e.rank,r,"channelsLast"):null,activation:n}),d)}}function Ai(e,t,n){return(0,D.tidy)((()=>(t=Array.isArray(t)?(0,D.tensor1d)(t,"int32"):D.cast(t,"int32"),D.gather(e,t,n))))}function Si(e){return D.mul(e,e)}function Ei(e,t,n){const r=t.shape;if(1!==t.rank&&t.rank!==e)throw new wa(`Unexpected bias dimensions: ${t.rank}; expected it to be 1 or ${e}`);if(5===e){if("channelsFirst"===n)return 1===r.length?D.reshape(t,[1,r[0],1,1,1]):D.reshape(t,[1,r[3],r[0],r[1],r[2]]);if("channelsLast"===n)return 1===r.length?D.reshape(t,[1,1,1,1,r[0]]):D.reshape(t,[1].concat(r))}else if(4===e){if("channelsFirst"===n)return 1===r.length?D.reshape(t,[1,r[0],1,1]):D.reshape(t,[1,r[2],r[0],r[1]]);if("channelsLast"===n)return 1===r.length?D.reshape(t,[1,1,1,r[0]]):D.reshape(t,[1].concat(r))}else if(3===e){if("channelsFirst"===n)return 1===r.length?D.reshape(t,[1,r[0],1]):D.reshape(t,[1,r[1],r[0]]);if("channelsLast"===n)return 1===r.length?D.reshape(t,[1,1,r[0]]):D.reshape(t,[1].concat(r))}else if(e<3)return t;throw new wa(`Unsupported input rank by biasAdd: ${t.rank}`)}function Ci(e,t,n){return(0,D.tidy)((()=>(null==n&&(n="channelsLast"),ei(n),D.add(e,Ei(e.rank,t,n)))))}function Ti(e,t,n,r){return(0,D.tidy)((()=>D.dropout(e,t,n,r)))}function Di(e,t,n=!1){return n?e():t()}const Ii=["fanIn","fanOut","fanAvg"],Oi=["normal","uniform","truncatedNormal"];class Pi extends D.serialization.Serializable{fromConfigUsesCustomObjects(){return!1}getConfig(){return{}}}class Mi extends Pi{apply(e,t){return(0,D.zeros)(e,t)}}Mi.className="Zeros",D.serialization.registerClass(Mi);class Ri extends Pi{apply(e,t){return(0,D.ones)(e,t)}}Ri.className="Ones",D.serialization.registerClass(Ri);class Li extends Pi{constructor(e){if(super(),"object"!==typeof e)throw new wa(`Expected argument of type ConstantConfig but got ${e}`);if(void 0===e.value)throw new wa(`config must have value set but got ${e}`);this.value=e.value}apply(e,t){return(0,D.tidy)((()=>(0,D.mul)((0,D.scalar)(this.value),(0,D.ones)(e,t))))}getConfig(){return{value:this.value}}}Li.className="Constant",D.serialization.registerClass(Li);class Ni extends Pi{constructor(e){super(),this.DEFAULT_MINVAL=-.05,this.DEFAULT_MAXVAL=.05,this.minval=e.minval||this.DEFAULT_MINVAL,this.maxval=e.maxval||this.DEFAULT_MAXVAL,this.seed=e.seed}apply(e,t){return(0,D.randomUniform)(e,this.minval,this.maxval,t,this.seed)}getConfig(){return{minval:this.minval,maxval:this.maxval,seed:this.seed}}}Ni.className="RandomUniform",D.serialization.registerClass(Ni);class Bi extends Pi{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if("float32"!==(t=t||"float32")&&"int32"!==t)throw new Fa(`randomNormal does not support dType ${t}.`);return ki(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}Bi.className="RandomNormal",D.serialization.registerClass(Bi);class ji extends Pi{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if("float32"!==(t=t||"float32")&&"int32"!==t)throw new Fa(`truncatedNormal does not support dType ${t}.`);return(0,D.truncatedNormal)(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}ji.className="TruncatedNormal",D.serialization.registerClass(ji);class Vi extends Pi{constructor(e){super(),this.gain=null!=e.gain?e.gain:1}apply(e,t){return(0,D.tidy)((()=>{if(2!==e.length||e[0]!==e[1])throw new wa("Identity matrix initializer can only be used for 2D square matrices.");return(0,D.mul)(this.gain,(0,D.eye)(e[0]))}))}getConfig(){return{gain:this.gain}}}Vi.className="Identity",D.serialization.registerClass(Vi);class zi extends Pi{constructor(e){if(super(),e.scale<0)throw new wa(`scale must be a positive float. Got: ${e.scale}`);this.scale=null==e.scale?1:e.scale,this.mode=null==e.mode?"fanIn":e.mode,function(e){ja(Ii,"FanMode",e)}(this.mode),this.distribution=null==e.distribution?"normal":e.distribution,function(e){ja(Oi,"Distribution",e)}(this.distribution),this.seed=e.seed}apply(e,t){const n=function(e,t="channelsLast"){let n,r;if(ei(t),2===e.length)n=e[0],r=e[1];else if(-1!==[3,4,5].indexOf(e.length)){if("channelsFirst"===t){const t=ui(e,2);n=e[1]*t,r=e[0]*t}else if("channelsLast"===t){const t=ui(e,0,e.length-2);n=e[e.length-2]*t,r=e[e.length-1]*t}}else{const t=ui(e);n=Math.sqrt(t),r=Math.sqrt(t)}return[n,r]}(e),r=n[0],a=n[1];let i=this.scale;if("fanIn"===this.mode?i/=Math.max(1,r):"fanOut"===this.mode?i/=Math.max(1,a):i/=Math.max(1,(r+a)/2),"normal"===this.distribution){const n=Math.sqrt(i);if("float32"!==(t=t||"float32")&&"int32"!==t)throw new Fa(`${this.getClassName()} does not support dType ${t}.`);return(0,D.truncatedNormal)(e,0,n,t,this.seed)}{const n=Math.sqrt(3*i);return(0,D.randomUniform)(e,-n,n,t,this.seed)}}getConfig(){return{scale:this.scale,mode:this.mode,distribution:this.distribution,seed:this.seed}}}zi.className="VarianceScaling",D.serialization.registerClass(zi);class Hi extends zi{constructor(e){super({scale:1,mode:"fanAvg",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return zi.className}}Hi.className="GlorotUniform",D.serialization.registerClass(Hi);class Ui extends zi{constructor(e){super({scale:1,mode:"fanAvg",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return zi.className}}Ui.className="GlorotNormal",D.serialization.registerClass(Ui);class Wi extends zi{constructor(e){super({scale:2,mode:"fanIn",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return zi.className}}Wi.className="HeNormal",D.serialization.registerClass(Wi);class qi extends zi{constructor(e){super({scale:2,mode:"fanIn",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return zi.className}}qi.className="HeUniform",D.serialization.registerClass(qi);class $i extends zi{constructor(e){super({scale:1,mode:"fanIn",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return zi.className}}$i.className="LeCunNormal",D.serialization.registerClass($i);class Yi extends zi{constructor(e){super({scale:1,mode:"fanIn",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return zi.className}}Yi.className="LeCunUniform",D.serialization.registerClass(Yi);class Gi extends Pi{constructor(e){super(),this.DEFAULT_GAIN=1,this.ELEMENTS_WARN_SLOW=2e3,this.gain=null==e.gain?this.DEFAULT_GAIN:e.gain,this.seed=e.seed}apply(e,t){return(0,D.tidy)((()=>{if(e.length<2)throw new Fa("Shape must be at least 2D.");if("int32"!==t&&"float32"!==t&&void 0!==t)throw new TypeError(`Unsupported data type ${t}.`);const n=D.util.sizeFromShape(e.slice(0,-1)),r=e[e.length-1],a=n*r;a>this.ELEMENTS_WARN_SLOW&&console.warn(`Orthogonal initializer is being called on a matrix with more than ${this.ELEMENTS_WARN_SLOW} (${a}) elements: Slowness may result.`);const i=ki([Math.max(r,n),Math.min(r,n)],0,1,t,this.seed),o=D.linalg.qr(i,!1);let s=o[0];const l=o[1].flatten().stridedSlice([0],[Math.min(r,n)*Math.min(r,n)],[Math.min(r,n)+1]);return s=(0,D.mul)(s,l.sign()),ne*t));return t}const ao="Variable";class io{constructor(e,t="float32",n=ao,r=!0,a=null){this.dtype=null==t?"float32":t,this.shape=e.shape,this.id=qa(),n=null==n?ao:n,this.originalName=ii(n),this.name=oi(this.originalName),this.trainable_=r,this.constraint=a,this.val=D.variable(e,this.trainable_,this.name,this.dtype)}read(){return this.assertNotDisposed(),this.val}write(e){return this.assertNotDisposed(),function(e,t){if(e.shape.toString()!==t.shape.toString())throw new Error("Shape mismatch: "+JSON.stringify(e.shape)+" vs. "+JSON.stringify(t.shape))}(this.val,e),this.val.id!==e.id&&(this.val.assign(e),null!=this.constraint&&this.val.assign(this.constraint.apply(this.val))),this}dispose(){this.assertNotDisposed(),this.val.dispose()}assertNotDisposed(){if(this.val.isDisposed)throw new Error(`LayersVariable ${this.name} is already disposed.`)}get trainable(){return this.trainable_}set trainable(e){this.trainable_=e,this.val.trainable=e}}function oo(e){return e.map((e=>e.read()))}function so(e){e.forEach((e=>{e[0].write(e[1])}))}class lo{constructor(e){this.dtype=e.dtype,this.shape=e.shape,null!=e.shape?this.ndim=e.shape.length:this.ndim=e.ndim,this.maxNDim=e.maxNDim,this.minNDim=e.minNDim,this.axes=e.axes||{}}}class uo{constructor(e,t,n,r,a,i,o){this.dtype=e,this.shape=t,this.sourceLayer=n,this.inputs=r,this.callArgs=a,this.outputTensorIndex=o,this.id=qa(),null!=i&&(this.originalName=ii(i),this.name=oi(this.originalName)),this.rank=t.length}}let co=0;class ho{constructor(e,t){this.callArgs=t,this.id=co++,this.outboundLayer=e.outboundLayer,this.inboundLayers=e.inboundLayers,this.nodeIndices=e.nodeIndices,this.tensorIndices=e.tensorIndices,this.inputTensors=e.inputTensors,this.outputTensors=e.outputTensors,this.inputMasks=e.inputMasks,this.outputMasks=e.outputMasks,this.inputShapes=e.inputShapes,this.outputShapes=e.outputShapes;for(const n of e.inboundLayers)null!=n&&n.outboundNodes.push(this);e.outboundLayer.inboundNodes.push(this)}getConfig(){const e=[];for(const t of this.inboundLayers)null!=t?e.push(t.name):e.push(null);return{outboundLayer:this.outboundLayer?this.outboundLayer.name:null,inboundLayers:e,nodeIndices:this.nodeIndices,tensorIndices:this.tensorIndices}}}let fo=0;class po extends D.serialization.Serializable{constructor(e={}){super(),this._callHook=null,this._addedWeightNames=[],this._stateful=!1,this.id=fo++,this.activityRegularizer=null,this.inputSpec=null,this.supportsMasking=!1,this._trainableWeights=[],this._nonTrainableWeights=[],this._losses=[],this._updates=[],this._built=!1,this.inboundNodes=[],this.outboundNodes=[];let t=e.name;if(!t){const e=this.getClassName();t=Da(e)+"_"+Ya(e)}if(this.name=t,this.trainable_=null==e.trainable||e.trainable,null!=e.inputShape||null!=e.batchInputShape){let t;if(null!=e.batchInputShape)t=e.batchInputShape;else if(null!=e.inputShape){let n=null;null!=e.batchSize&&(n=e.batchSize),t=[n].concat(e.inputShape)}this.batchInputShape=t;let n=e.dtype;null==n&&(n=e.inputDType),null==n&&(n="float32"),this.dtype=n}null!=e.weights?this.initialWeights=e.weights:this.initialWeights=null,this._refCount=null,this.fastWeightInitDuringBuild=!1}static nodeKey(e,t){return e.name+"_ib-"+t.toString()}getNodeAtIndex(e,t){if(0===this.inboundNodes.length)throw new va(`The layer has never been called and thus has no defined ${t}.`);if(this.inboundNodes.length<=e)throw new wa(`Asked to get ${t} at node ${e}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);return this.inboundNodes[e]}getInputAt(e){return Ca(this.getNodeAtIndex(e,"input").inputTensors)}getOutputAt(e){return Ca(this.getNodeAtIndex(e,"output").outputTensors)}get input(){if(this.inboundNodes.length>1)throw new ba(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use \`getInputAt(nodeIndex)\` instead.`);if(0===this.inboundNodes.length)throw new ba(`Layer ${this.name} is not connected, no input to return.`);return Ca(this.getNodeAtIndex(0,"input").inputTensors)}get output(){if(0===this.inboundNodes.length)throw new ba(`Layer ${this.name} has no inbound nodes.`);if(this.inboundNodes.length>1)throw new ba(`Layer ${this.name} has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use \`getOutputAt(nodeIndex)\` instead.`);return Ca(this.getNodeAtIndex(0,"output").outputTensors)}get losses(){return this._losses}calculateLosses(){return this.losses.map((e=>e()))}get updates(){return this._updates}get built(){return this._built}set built(e){this._built=e}get trainable(){return this.trainable_}set trainable(e){this._trainableWeights.forEach((t=>t.trainable=e)),this.trainable_=e}get trainableWeights(){return this.trainable_?this._trainableWeights.filter((e=>e.trainable)):[]}set trainableWeights(e){this._trainableWeights=e}get nonTrainableWeights(){return this.trainable?this._trainableWeights.filter((e=>!e.trainable)).concat(this._nonTrainableWeights):this._trainableWeights.concat(this._nonTrainableWeights)}set nonTrainableWeights(e){this._nonTrainableWeights=e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}get stateful(){return this._stateful}resetStates(){if(!this.stateful)throw new Error("Cannot call the resetStates() method of a non-stateful Layer object.")}assertInputCompatibility(e){const t=Ta(e);if(null==this.inputSpec||0===this.inputSpec.length)return;const n=Ta(this.inputSpec);if(t.length!==n.length)throw new wa(`Layer ${this.name} expects ${n.length} inputs, but it received ${t.length} input tensors. Input received: ${e}`);for(let r=0;ra.maxNDim)throw new wa(`Input ${r} is incompatible with layer ${this.name}: expected max_ndim=${a.maxNDim}, found ndim=${i}`);if(null!=a.minNDim&&i=0?t[n]:t[t.length+n];if(null!=i&&-1===[i,null].indexOf(o))throw new wa(`Input ${r} is incompatible with layer ${this.name}: expected axis ${n} of input shape to have value ${i} but got shape ${t}.`)}}if(null!=a.shape)for(let t=0;t{if(!this.built){this.assertInputCompatibility(e);const t=[];for(const n of Ta(e))t.push(n.shape);this.build(Ca(t)),this.built=!0,this.initialWeights&&this.setWeights(this.initialWeights),null===this._refCount&&a&&(this._refCount=1)}if(this.assertInputCompatibility(e),a){let r=this.call(e,t);this.supportsMasking&&this.setMaskMetadata(e,r);const a=Ta(r),i=[];for(let e of a)-1!==n.indexOf(e)&&(e=e.clone()),i.push(e);if(r=Ca(i),null!=this.activityRegularizer)throw new Fa("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return r}{const n=function(e){e=Ta(e);const t=[];for(const n of e)t.push(n.shape);return Ca(t)}(e),r=this.computeOutputShape(n);let a;const i="float32";if(this.warnOnIncompatibleInputShape(Array.isArray(e)?n[0]:n),a=null!=r&&r.length>0&&Array.isArray(r[0])?r.map(((n,r)=>new uo(i,n,this,Ta(e),t,this.name,r))):new uo(i,r,this,Ta(e),t,this.name),this.addInboundNode(e,a,null,null,n,r,t),this._refCount++,null!=this.activityRegularizer)throw new Fa("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return a}}))}warnOnIncompatibleInputShape(e){if(null!=this.batchInputShape)if(e.length!==this.batchInputShape.length)console.warn(`The rank of the input tensor provided (shape: ${JSON.stringify(e)}) does not match that of the batchInputShape (${JSON.stringify(this.batchInputShape)}) of the layer ${this.name}`);else{let t=!1;this.batchInputShape.forEach(((n,r)=>{null!=n&&null!=e[r]&&e[r]!==n&&(t=!0)})),t&&console.warn(`The shape of the input tensor (${JSON.stringify(e)}) does not match the expectation of layer ${this.name}: ${JSON.stringify(this.batchInputShape)}`)}}get outputShape(){if(null==this.inboundNodes||0===this.inboundNodes.length)throw new ba(`The layer ${this.name} has never been called and thus has no defined output shape.`);const e=[];for(const t of this.inboundNodes){const n=JSON.stringify(t.outputShapes);-1===e.indexOf(n)&&e.push(n)}if(1===e.length){const e=this.inboundNodes[0].outputShapes;return Array.isArray(e)&&Array.isArray(e[0])&&1===e.length?e[0]:e}throw new ba(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of "output shape" is ill-defined for the layer.`)}countParams(){if(!this.built)throw new va(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`);return ro(this.weights)}build(e){this.built=!0}getWeights(e=!1){return oo(e?this.trainableWeights:this.weights)}setWeights(e){(0,D.tidy)((()=>{const t=this.weights;if(t.length!==e.length)throw new wa(`You called setWeights(weights) on layer "${this.name}" with a weight list of length ${e.length}, but the layer was expecting ${t.length} weights. Provided weights: ${e}...`);if(0===t.length)return;const n=[],r=oo(t);for(let a=0;aa.apply(u.read()))),null==i&&(i=!0),i?this._trainableWeights.push(u):this._nonTrainableWeights.push(u),u}setFastWeightInitDuringBuild(e){this.fastWeightInitDuringBuild=e}addLoss(e){null==e||Array.isArray(e)&&0===e.length||(e=Ta(e),void 0!==this._losses&&null!==this._losses&&this.losses.push(...e))}computeOutputShape(e){return e}computeMask(e,t){if(!this.supportsMasking){if(null!=t){if(!Array.isArray(t))throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);t.forEach((e=>{if(null!=e)throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`)}))}return null}return t}setMaskMetadata(e,t,n){if(!this.supportsMasking)return;const r=this.computeMask(e,n),a=Ta(t),i=Ta(r);if(a.length!==i.length)throw new Error(`${this.name} outputs ${a.length} tensors but ${a.length} masks for those tensors`);for(let o=0;oe.dispose())),this.weights.length}assertNotDisposed(){if(0===this._refCount)throw new Error(`Layer '${this.name}' is already disposed.`)}dispose(){if(!this.built)throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);if(null===this._refCount)throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);this.assertNotDisposed();let e=0;return 0===--this._refCount&&(e=this.disposeWeights()),{refCountAfterDispose:this._refCount,numDisposedVariables:e}}}function mo(e,t,n){if((null==t||null!=n&&n>0)&&(t=e.sourceLayer,n=e.nodeIndex),0===t.inboundNodes.length)return[e];{const e=t.inboundNodes[n];if(0===e.inboundLayers.length)return e.inputTensors;{const t=[];for(let n=0;ne.name)),l=[],u=t.names();for(const p of s)-1!==u.indexOf(p)?l.push(t.getValue(p)):l.push(null);null!=r&&(r.maxNumTensors=-1/0,r.minNumTensors=1/0);const c=s.join(",")+"|"+t.names().sort().join(",");let d,h=bo.get(c);if(null==h){const e=function(e,t){D.util.assert(null!=e&&e.length>0,(()=>"Expected at least one fetch, got none"));let n=[],r={};if(1===e.length){const a=ko(e[0],t);n=a.sorted,r=a.recipientMap}else{const a=new Set;for(const i of e){const{sorted:e,recipientMap:o}=ko(i,t);for(const t of e)a.has(t.name)||(n.push(t),a.add(t.name));for(const t in o)null==r[t]&&(r[t]=new Set),o[t].forEach((e=>r[t].add(e)))}}return{sorted:n,recipientCounts:Fo(r)}}(o,t);h=e.sorted,d=e.recipientCounts,bo.put(c,h),vo.put(c,d)}d={},a||Object.assign(d,vo.get(c));const f=new _o(t);for(let p=0;pr.maxNumTensors&&(r.maxNumTensors=e),e0;){const e=i[i.length-1];if(n.has(e.name)){i.pop();continue}const t=o[o.length-1]===i.length-1;if(0===e.inputs.length||t)i.pop(),r.push(e),n.add(e.name),t&&o.pop();else{o.push(i.length-1);for(const t of e.inputs)null==a[t.name]&&(a[t.name]=new Set),a[t.name].add(e.name),n.has(t.name)||i.push(t)}}return{sorted:r,recipientMap:a}}function xo(e){let t;if(1===e.sourceLayer.inboundNodes.length)t=e.sourceLayer.output;else{let n=null;for(let t=0;tD.sqrt(D.sum(D.mul(e,e),t,!0))))}(0,D.env)().registerFlag("TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES",(()=>100),(function(e){null!=bo&&bo.setMaxEntries(e),null!=vo&&vo.setMaxEntries(e)}));class So extends D.serialization.Serializable{getConfig(){return{}}}class Eo extends So{constructor(e){super(),this.defaultMaxValue=2,this.defaultAxis=0,this.maxValue=null!=e.maxValue?e.maxValue:this.defaultMaxValue,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return(0,D.tidy)((()=>{const t=Ao(e,this.axis),n=D.clipByValue(t,0,this.maxValue);return D.mul(e,D.div(n,D.add(pi(),t)))}))}getConfig(){return{maxValue:this.maxValue,axis:this.axis}}}Eo.className="MaxNorm",D.serialization.registerClass(Eo);class Co extends So{constructor(e){super(),this.defaultAxis=0,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return(0,D.tidy)((()=>D.div(e,D.add(pi(),Ao(e,this.axis)))))}getConfig(){return{axis:this.axis}}}Co.className="UnitNorm",D.serialization.registerClass(Co);class To extends So{apply(e){return D.relu(e)}}To.className="NonNeg",D.serialization.registerClass(To);class Do extends So{constructor(e){super(),this.defaultMinValue=0,this.defaultMaxValue=1,this.defaultRate=1,this.defaultAxis=0,this.minValue=null!=e.minValue?e.minValue:this.defaultMinValue,this.maxValue=null!=e.maxValue?e.maxValue:this.defaultMaxValue,this.rate=null!=e.rate?e.rate:this.defaultRate,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return(0,D.tidy)((()=>{const t=Ao(e,this.axis),n=D.add(D.mul(this.rate,D.clipByValue(t,this.minValue,this.maxValue)),D.mul(1-this.rate,t));return D.mul(e,D.div(n,D.add(pi(),t)))}))}getConfig(){return{minValue:this.minValue,maxValue:this.maxValue,rate:this.rate,axis:this.axis}}}Do.className="MinMaxNorm",D.serialization.registerClass(Do);const Io={maxNorm:"MaxNorm",minMaxNorm:"MinMaxNorm",nonNeg:"NonNeg",unitNorm:"UnitNorm"};function Oo(e){return Pa(e)}function Po(e,t={}){return Ra(e,D.serialization.SerializationMap.getMap().classNameMap,t,"constraint")}function Mo(e){if(null==e)return null;if("string"===typeof e){return Po({className:e in Io?Io[e]:e,config:{}})}return e instanceof So?e:Po(e)}function Ro(e){return new Eo(e)}function Lo(e){return new Co(e)}function No(){return new To}function Bo(e){return new Do(e)}function jo(){return new Mi}function Vo(){return new Ri}function zo(e){return new Li(e)}function Ho(e){return new Ni(e)}function Uo(e){return new Bi(e)}function Wo(e){return new ji(e)}function qo(e){return new Vi(e)}function $o(e){return new zi(e)}function Yo(e){return new Hi(e)}function Go(e){return new Ui(e)}function Xo(e){return new Wi(e)}function Ko(e){return new qi(e)}function Jo(e){return new $i(e)}function Zo(e){return new Yi(e)}function Qo(e){return new Gi(e)}async function es(e){if(null==e)return;const t=[],n=[],r=[];for(const a in e){const i=e[a];if("number"!==typeof i){const e=i;t.push(e.data()),n.push(a),r.push(e)}}if(t.length>0){const a=await Promise.all(t);for(let t=0;t(0,D.add)(this.totals[r],(0,D.mul)(e,n))));this.totals[r]=a,null!=t&&t.dispose()}}}async onEpochEnd(e,t){if(null!=t)for(const n of this.params.metrics)null!=this.totals[n]&&("number"===typeof this.totals[n]?t[n]=this.totals[n]/this.seen:(0,D.tidy)((()=>{const e=(0,D.mul)((0,D.div)(1,this.seen),this.totals[n]);t[n]=e,this.totals[n].dispose(),(0,D.keep)(t[n])})))}}class os extends rs{async onTrainBegin(e){this.epoch=[],this.history={}}async onEpochEnd(e,t){null==t&&(t={}),this.epoch.push(e);for(const n in t)null==this.history[n]&&(this.history[n]=[]),this.history[n].push(t[n])}async syncData(){const e=[],t=[],n=[];for(const a in this.history){const r=this.history[a];for(let i=0;i{const o=null!=n?n():D.util.now();return o-anew ss(e,t)))}class us{constructor(){}static registerCallbackConstructor(e,t){D.util.assert(e>=0&&Number.isInteger(e),(()=>`Verbosity level is expected to be an integer >= 0, but got ${e}`)),us.checkForDuplicate(t),null==us.constructors[e]&&(us.constructors[e]=[]),us.constructors[e].push(t)}static checkForDuplicate(e){for(const t in us.constructors){us.constructors[+t].forEach((t=>{if(t===e)throw new wa("Duplicate callback constructor.")}))}}static clear(){us.constructors={}}static createCallbacks(e){const t=[];for(const n in us.constructors){const r=+n;e>=r&&t.push(...us.constructors[r])}return t.map((e=>new e))}}function cs(e,t,n,r,a,i,o,s,l){const u=new os,c=[new is,...us.createCallbacks(t)];null!=e&&c.push(...e),c.push(u);const d=new as(c);return d.setParams({epochs:n,initialEpoch:r,samples:a,steps:i,batchSize:o,verbose:t,doValidation:s,metrics:l}),{callbackList:d,history:u}}function ds(e,t={},n=!1){return Ra(e,D.serialization.SerializationMap.getMap().classNameMap,t,"layer",n)}function hs(e,t){return(0,D.tidy)((()=>{"float32"!==e.dtype&&(e=D.cast(e,"float32"));const n=D.sum(Si(e),t,!0),r=D.fill(n.shape,pi()),a=D.sqrt(D.maximum(n,r));return D.div(e,a)}))}function fs(e,t){return(0,D.tidy)((()=>D.mean(Si(D.sub(t,e)),-1)))}function ps(e,t){return(0,D.tidy)((()=>D.mean(D.abs(D.sub(t,e)),-1)))}function ms(e,t){return(0,D.tidy)((()=>{const n=D.sub(e,t),r=D.clipByValue(D.abs(e),pi(),Number.MAX_VALUE),a=D.abs(D.div(n,r));return D.mul(100,D.mean(a,-1))}))}function gs(e,t){return(0,D.tidy)((()=>{const n=D.clipByValue(t,pi(),Number.MAX_VALUE),r=D.log(D.add(1,n)),a=D.clipByValue(e,pi(),Number.MAX_VALUE),i=D.log(D.add(1,a));return D.mean(Si(D.sub(r,i)),-1)}))}function ys(e,t,n=!1){return(0,D.tidy)((()=>{if(n)t=D.softmax(t);else{const e=D.sum(t,t.shape.length-1,!0);t=D.div(t,e)}return t=D.clipByValue(t,pi(),1-pi()),D.neg(D.sum(D.mul(D.cast(e,"float32"),D.log(t)),t.shape.length-1))}))}function _s(e,t,n=!1){return(0,D.tidy)((()=>{const r=D.cast(D.floor(function(e){const t=[ui(e.shape)];return D.reshape(e,t)}(e)),"int32"),a=(t=D.clipByValue(t,pi(),1-pi())).shape;return ys(D.reshape(D.oneHot(r,a[a.length-1]),a),t,n)}))}function bs(e,t){return(0,D.tidy)((()=>{let n;return n=D.clipByValue(t,pi(),1-pi()),n=D.log(D.div(n,D.sub(1,n))),D.mean(function(e,t){if(!D.util.arraysEqual(e.shape,t.shape))throw new wa(`logits and labels must have the same shape, but got shapes ${JSON.stringify(e.shape)} and ${JSON.stringify(t.shape)}`);return(0,D.tidy)((()=>{const n=D.relu(t),r=D.neg(D.abs(t));return D.add(D.sub(n,D.mul(t,e)),D.log1p(D.exp(r)))}))}(e,n),-1)}))}function vs(e,t){return(0,D.tidy)((()=>{const n=D.clipByValue(e,pi(),1),r=D.clipByValue(t,pi(),1);return D.sum(D.mul(e,D.log(D.div(n,r))),-1)}))}function ws(e,t){return(0,D.tidy)((()=>{const n=hs(e,-1),r=hs(t,-1),a=D.mul(n,r);return D.neg(D.sum(a,-1))}))}us.constructors={};const Fs={meanSquaredError:fs,meanAbsoluteError:ps,meanAbsolutePercentageError:ms,meanSquaredLogarithmicError:gs,squaredHinge:function(e,t){return(0,D.tidy)((()=>{const n=D.maximum(0,D.sub(1,D.mul(e,t)));return D.mean(Si(n),-1)}))},hinge:function(e,t){return(0,D.tidy)((()=>{const n=D.maximum(0,D.sub(1,D.mul(e,t)));return D.mean(n,-1)}))},categoricalHinge:function(e,t){return(0,D.tidy)((()=>{const n=D.sum(D.mul(e,t),-1),r=D.max(D.mul(D.sub(1,e),t),-1);return D.maximum(0,D.add(1,D.sub(r,n)))}))},logcosh:function(e,t){return(0,D.tidy)((()=>{const n=Math.log(2),r=D.sub(t,e),a=D.sub(D.add(r,D.softplus(D.mul(-2,r))),n);return D.mean(a,-1)}))},categoricalCrossentropy:ys,sparseCategoricalCrossentropy:_s,binaryCrossentropy:bs,kullbackLeiblerDivergence:vs,poisson:function(e,t){return(0,D.tidy)((()=>{const n=D.log(D.add(pi(),t));return D.mean(D.sub(t,D.mul(e,n)),-1)}))},cosineProximity:ws};function ks(e){if("string"===typeof e){if(e in Fs)return Fs[e];let t=`Unknown loss ${e}`;throw e.toLowerCase().includes("softmaxcrossentropy")&&(t=`Unknown loss ${e}. Use "categoricalCrossentropy" as the string name for tf.losses.softmaxCrossEntropy`),new wa(t)}return e}function xs(e,t){return(0,D.tidy)((()=>{const n=D.mul(.5,D.onesLike(t)),r=mi(D.greater(t,n),e.dtype);return D.mean(D.equal(e,r),-1)}))}function As(e,t){return(0,D.tidy)((()=>mi(D.equal(D.argMax(e,-1),D.argMax(t,-1)),"float32")))}function Ss(e,t){return(0,D.tidy)((()=>D.cast(D.sum(D.logicalAnd(D.equal(e,1),D.equal(t,1))),"float32")))}function Es(e,t){return(0,D.tidy)((()=>{const n=Ss(e,t),r=function(e,t){return(0,D.tidy)((()=>D.cast(D.sum(D.logicalAnd(D.equal(e,0),D.equal(t,1))),"float32")))}(e,t),a=D.add(n,r);return D.cast(D.where(D.greater(a,0),D.div(n,a),0),"float32")}))}function Cs(e,t){return(0,D.tidy)((()=>{const n=Ss(e,t),r=function(e,t){return(0,D.tidy)((()=>D.cast(D.sum(D.logicalAnd(D.equal(e,1),D.equal(t,0))),"float32")))}(e,t),a=D.add(n,r);return D.cast(D.where(D.greater(a,0),D.div(n,a),0),"float32")}))}function Ts(e,t){return bs(e,t)}function Ds(e,t){return e.rank===t.rank&&(e=D.squeeze(e,[e.rank-1])),(t=D.argMax(t,-1)).dtype!==e.dtype&&(t=D.cast(t,e.dtype)),D.cast(D.equal(e,t),"float32")}const Is=ys,Os=_s,Ps={binaryAccuracy:xs,categoricalAccuracy:As,precision:Es,categoricalCrossentropy:Is,sparseCategoricalCrossentropy:Os,mse:fs,MSE:fs,mae:ps,MAE:ps,mape:ms,MAPE:ms,cosine:ws};function Ms(e){if("string"===typeof e&&e in Ps)return Ps[e];if("string"!==typeof e&&null!=e)return e;throw new wa(`Unknown metric ${e}`)}function Rs(e){if(Sa(null!==e,`Unknown LossOrMetricFn ${e}`),"string"===typeof e)return e;{let t;for(const n of Object.keys(Fs))if(Fs[n]===e){t=n;break}if(void 0!==t)return t;for(const n of Object.keys(Ps))if(Ps[n]===e){t=n;break}return void 0!==t?t:e.name}}const Ls=1048576;function Ns(e,t,n=!1){if(null==e||"object"!==typeof e||Object.getPrototypeOf(e)!==Object.prototype||!Bs(e))throw new Error("User-defined metadata is expected to be a JSON object, but is not.");if(n){const n=JSON.stringify(e);n.length>Ls&&console.warn(`User-defined metadata of model "${t}" is too large in size (length=${n.length} when serialized). It is not recommended to store such large objects in user-defined metadata. Please make sure its serialized length is <= 1048576.`)}}function Bs(e){if(null===e)return!0;if("object"===typeof e){if(Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);for(const n of t){if("string"!==typeof n)return!1;if(!Bs(e[n]))return!1}return!0}if(Array.isArray(e)){for(const t of e)if(!Bs(t))return!1;return!0}return!1}{const t=typeof e;return"string"===t||"number"===t||"boolean"===t}}function js(e,t,n,r=console.log){const a=function(e){let t=!0;const n=[],r=[];for(const a in e.nodesByDepth)n.push(e.nodesByDepth[a]);for(const a of n){if(a.length>1||1===a.length&&a[0].inboundLayers.length>1){t=!1;break}r.push(...a)}if(t)for(const a of e.layers){let e=!1;for(const n of a.inboundNodes)if(-1!==r.indexOf(n)){if(e){t=!1;break}e=!0}if(!t)break}return t}(e),i=["Layer (type)","Input Shape","Output shape","Param #"];let o;if(a?(t=t||90,n=n||[.32,.61,.89,1]):(t=t||115,n=n||[.24,.48,.7,.8,1]),n[n.length-1]<=1&&(n=n.map((e=>Math.floor(t*e)))),!a){i.push("Receives inputs"),o=[];for(const t in e.nodesByDepth)o.push(...e.nodesByDepth[t])}r("_".repeat(t)),Vs(i,n,r),r("=".repeat(t));const s=e.layers;for(let c=0;c0&&(r=r.slice(0,r.length-1)+" "),r+=e[a],r=r.slice(0,t[a]),r+=" ".repeat(t[a]-r.length);n(r)}function zs(e,t,n){let r,a;try{a=e.inboundNodes.map((e=>JSON.stringify(e.inputShapes))).join(",")}catch(i){a="multiple"}try{r=JSON.stringify(e.outputShape)}catch(i){r="multiple"}Vs([`${e.name} (${e.getClassName()})`,a,r,e.countParams().toString()],t,n)}function Hs(e,t,n,r){let a,i;try{i=e.inboundNodes.map((e=>JSON.stringify(e.inputShapes))).join(",")}catch(c){i="multiple"}try{a=JSON.stringify(e.outputShape)}catch(c){a="multiple"}const o=[];for(const d of e.inboundNodes)if(!(null!=n&&n.length>0&&-1===n.indexOf(d)))for(let e=0;ee.name))}`);Na(this.outputs).length!==this.outputs.length&&console.warn(`The list of outputs passed to the model is redundant. All outputs should only appear once. Found: ${this.outputs.map((e=>e.name))}`),this.inputLayers=[],this.inputLayersNodeIndices=[],this.inputLayersTensorIndices=[],this.outputLayers=[],this.outputLayersNodeIndices=[],this.outputLayersTensorIndices=[],this.layers=[],this.internalContainerRefs=[];for(const y of this.outputs){const e=y.sourceLayer,t=y.nodeIndex,n=y.tensorIndex;this.outputLayers.push(e),this.outputLayersNodeIndices.push(t),this.outputLayersTensorIndices.push(n)}for(const y of this.inputs){const e=y.sourceLayer,t=y.nodeIndex,n=y.tensorIndex;Sa(0===t,"input layer has >1 nodes"),Sa(0===n,"input layer has >1 tensors"),this.inputLayers.push(e),this.inputLayersNodeIndices.push(t),this.inputLayersTensorIndices.push(n)}this.inputNames=[],this.outputNames=[],this.feedInputShapes=[],this.feedInputNames=[],this.feedOutputNames=[];for(let y=0;ye.shape)),this.internalOutputShapes=this.outputs.map((e=>e.shape));const t={},n={},r={},a={},i={},o=[],s=(e,t,n,r,a,l)=>{null!=r&&null!=a&&null!=l||(r=e.sourceLayer,a=e.nodeIndex,l=e.tensorIndex);const u=r.inboundNodes[a];if(-1!==n.indexOf(u))throw new va(`The tensor ${e.name} at layer "${r.name}" is part of a cycle.`);if(-1!==t.indexOf(u))return;this.containerNodes.add(Ys.nodeKey(r,a)),r.id in i||(i[r.id]=Object.keys(i).length),-1===n.indexOf(u)&&n.push(u);const c=u.inboundLayers.length;for(let i=0;i=0;)n.splice(n.indexOf(u),1);o.push(u)},l=[],u=[];for(const y of this.outputs)s(y,l,u);const c=o.slice().reverse();for(const y of c){n[y.id]=y,y.id in t||(t[y.id]=0);let e=t[y.id];const i=null==r[y.outboundLayer.id]?0:r[y.outboundLayer.id];e=Math.max(e,i),r[y.outboundLayer.id]=e,a[y.outboundLayer.id]=y.outboundLayer,t[y.id]=e;for(let r=0;rparseInt(e,10))).sort(La);this.layers=[];for(const y of f){const e=h[y];e.sort(((e,t)=>{const n=i[e.id],r=i[t.id];return nr?1:0}));for(const t of e)t instanceof Ys&&this.internalContainerRefs.push(t),this.layers.push(t)}this.layersByDepth=h,f=Object.keys(d).map((e=>parseInt(e,10))).sort(La);const p=this.inputs.slice(),m=[];for(const y of f)for(const e of d[y]){const t=e.outboundLayer;if(null!=t){for(const n of e.inputTensors)if(-1===p.indexOf(n))throw new va(`Graph disconnected: cannot obtain value for tensor ${n} at layer "${t.name}". The following previous layers were accessed without issue: ${m}`);for(const t of e.outputTensors)p.push(t);m.push(t.name)}}this.nodesByDepth=d;const g=this.layers.map((e=>e.name));for(const y of g){const e=g.filter((e=>e===y)).length;if(1!==e)throw new va(`The name "${y}" is used ${e} times in the model. All layer names should be unique. Layer names: `+JSON.stringify(g))}this.outboundNodes=[],this.inboundNodes=[],new ho({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:this.inputs.map((e=>null)),outputMasks:this.outputs.map((e=>null)),inputShapes:this.inputs.map((e=>e.shape)),outputShapes:this.outputs.map((e=>e.shape))}),this.built=!0,this._refCount=1}assertNotDisposed(){if(0===this._refCount)throw new Error(`Container '${this.name}' is already disposed.`)}dispose(){this.assertNotDisposed();const e={refCountAfterDispose:null,numDisposedVariables:0};if(0===--this._refCount){for(const t of this.layers)e.numDisposedVariables+=t.dispose().numDisposedVariables;for(const t of this.internalContainerRefs)e.numDisposedVariables+=t.dispose().numDisposedVariables}return e.refCountAfterDispose=this._refCount,e}get trainable(){return this.trainable_}set trainable(e){this.layers.forEach((t=>{t._trainableWeights.forEach((t=>t.trainable=e))})),this.trainable_=e}get trainableWeights(){if(this._trainableWeights.length>0)throw new wa("Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.");if(!this.trainable)return[];let e=[];for(const t of this.layers)e=e.concat(t.trainableWeights);return e}get nonTrainableWeights(){const e=[];for(const t of this.layers)e.push(...t.nonTrainableWeights);if(!this.trainable){const t=[];for(const e of this.layers)t.push(...e.trainableWeights);return t.concat(e)}return e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}loadWeights(e,t=!0){const n={};let r=0;const a=(e=>{const t=Object.keys(e);if(0===t.length)return!1;const n=t[0].split("/");return!isNaN(parseInt(n[n.length-1],10))})(e);a&&this.parseWeights(e);for(const o of this.layers)for(const[e,t]of o.weights.entries()){const i=a?`${t.name.split("/").slice(0,-1).join("/")+"/"}${e}`:t.originalName;if(null!=n[i])throw new wa(`Duplicate weight name: ${i}`);n[i]=t,r++}const i=[];for(const o in e){let r=o;if(null==n[o]){const e=o.split("/");r=e.slice(0,-2).concat([e[e.length-1]]).join("/")}if(null!=n[r])i.push([n[r],e[o]]);else if(t)throw new wa(`Provided weight data has no target variable: ${o}`);delete n[r]}if(t){const e=[];for(const t in n)e.push(t);if(e.length>0)throw new wa(`${e.length} of ${r} weights are not set: ${e}`)}so(i)}parseWeights(e){for(const t in Object.keys(e)){const n=t.split("/"),r=["vars","layer_checkpoint_dependencies"],a=n.map((e=>e.startsWith("_")?e.slice(1):e)).filter((e=>!r.includes(e))).join("/");a!==t&&(e[a]=e[t],delete e[t])}}updatedConfig(){const e=this.getConfig(),t={};return t.className=this.getClassName(),t.config=e,t.kerasVersion=`tfjs-layers ${$s}`,t.backend="TensorFlow.js",t}toJSON(e,t=!0){const n=qs(this.updatedConfig());return t?JSON.stringify(n):n}call(e,t){return(0,D.tidy)((()=>{e=Ta(e);const n=new _o;for(let t=0;t{let n;return e=Ta(e),n=null==t?Aa(null,e.length):Ta(t),this.runInternalGraph(e,n)[1]}))}computeOutputShape(e){const t=eo(e);if(t.length!==this.inputLayers.length)throw new wa(`Invalid inputShape argument ${e}: model has ${this.inputLayers.length} tensor inputs.`);const n={};for(let o=0;oparseInt(e,10))).sort(La);if(r.length>1)for(const o of r){const e=this.nodesByDepth[o];for(const t of e){const e=t.outboundLayer;if(-1!==this.inputLayers.map((e=>e.id)).indexOf(e.id))continue;const r=[];for(let o=0;oparseInt(e,10))).sort(La);for(const s of r){const e=this.nodesByDepth[s];for(const t of e){const e=t.outboundLayer,r=t.inputTensors,a=t.outputTensors,i=new Array;for(const t of r)t.id in n&&i.push(n[t.id]);if(i.length===r.length){let r,o,s,l,u={};if(null!=t.callArgs&&(u=t.callArgs),1===i.length){const[t,n]=i[0];null==u.mask&&(u.mask=n),s=Ta(e.call(t,u)),l=Ta(e.computeMask(t,n)),r=[t],o=[n]}else r=i.map((e=>e[0])),o=i.map((e=>e[1])),null==u.mask&&(u.mask=o),s=Ta(e.call(r,u)),l=Ta(e.computeMask(r,o));if(e.activityRegularizer)throw new Fa("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.");for(let e=0;e{const e=[];for(const t of this.layers)for(let n=0;n0){const n=[];for(let r=0;r0&&e.apply(Ca(n),r)}function l(e){const n=e.name,i=ds(e,null!=t.customObjects?t.customObjects:{});i.setFastWeightInitDuringBuild(r),a[n]=i;e.inboundNodes.forEach((e=>{if(!(e instanceof Array))throw new wa(`Corrupted configuration, expected array for nodeData: ${e}`);o(i,e)}))}const u=t.name,c=t.layers;for(const m of c)l(m);for(;!Ba(i);)for(const e of c){const t=a[e.name];if(t.name in i){const e=i[t.name];delete i[t.name];for(const n of e)s(t,n)}}const d=[],h=[],f=t.inputLayers;for(const m of f){const e=m[0],t=m[1],n=m[2];Sa(e in a);const r=a[e].inboundNodes[t].outputTensors;d.push(r[n])}const p=t.outputLayers;for(const m of p){const e=m[0],t=m[1],n=m[2];Sa(e in a);const r=a[e].inboundNodes[t].outputTensors;h.push(r[n])}return new e({inputs:d,outputs:h,name:u})}get stateful(){if(this._stateful)throw new wa("Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.");for(const e of this.layers)if(e.stateful)return!0;return!1}resetStates(){(0,D.tidy)((()=>{this.layers.forEach((e=>{e.stateful&&e.resetStates()}))}))}}function Gs(e,t,n){const r=t.length;if(null==e||Array.isArray(e)&&0===e.length)return t.map((e=>null));if(1===r)return Array.isArray(e)&&1===e.length?e:"object"===typeof e&&t[0]in e?[e[t[0]]]:[e];if(Array.isArray(e)){if(e.length!==r)throw new Error(`Provided ${n} is an array of ${e.length} element(s), but the model has ${r} outputs. Make sure a set of weights is provided for each model output.`);return e}if("object"===typeof e&&Object.keys(e).length>0&&"object"===typeof e[Object.keys(e)[0]]){const n=[];return t.forEach((t=>{t in e?n.push(e[t]):n.push(null)})),n}throw new Error(`The model has multiple (${r}) outputs, so ${n} must be either an array with ${r} elements or an object with ${t} keys. Provided ${n} not understood: ${JSON.stringify(e)}`)}function Xs(e,t){return Gs(e,t,"classWeight")}async function Ks(e,t,n,r){if(null!=t||null!=r)throw new Error("Support sampleWeight is not implemented yet");if(null!=n){const t=(0,D.tidy)((()=>{if(1===e.shape.length)return(0,D.clone)(e);if(2===e.shape.length){if(e.shape[1]>1){const t=1;return(0,D.argMax)(e,t)}if(1===e.shape[1])return(0,D.reshape)(e,[e.shape[0]]);throw new Error(`Encountered unexpected last-dimension size (${e.shape[1]}) during handling of class weights. The size is expected to be >= 1.`)}throw new Error(`Unexpected rank of target (y) tensor (${e.rank}) during handling of class weights. The rank is expected to be 1 or 2.`)})),r=Array.from(await t.data());(0,D.dispose)(t);const a=[];return r.forEach((e=>{if(null==n[e])throw new Error(`classWeight must contain all classes in the training data. The class ${e} exists in the data but not in classWeight`);a.push(n[e])})),(0,D.tensor1d)(a,"float32")}return null}function Js(e,t){return(0,D.mul)(e,t)}function Zs(e,t){let n,r;const a=t;n=a.xs,r=a.ys,D.util.assert(null!=n&&null!=r,(()=>`A Dataset iterator for fitDataset() is expected to generate objects of the form \`{xs: xVal, ys: yVal}\`, where the two values may be \`tf.Tensor\`, an array of Tensors, or a map of string to Tensor. The provided Dataset instead generates ${t}`));const i=Qs("input",e.inputNames,n),o=Qs("output",e.outputNames,r),s=i[0].shape[0];D.util.assert(i.length===e.inputs.length,(()=>`LayersModel has ${e.inputs.length} inputs, but the dataset provides ${i.length} inputs. (Expected input keys: ${JSON.stringify(e.inputNames)})`)),D.util.assert(o.length===e.outputs.length,(()=>`LayersModel has ${e.outputs.length} outputs, but the dataset provides ${o.length} outputs. (Expected output keys: ${JSON.stringify(e.outputNames)})`));for(let l=0;l`Batch size mismatch: input ${e.inputNames[l]} has ${i[l].shape[0]}; expected ${s} based on input ${e.inputNames[0]}.`));for(let l=0;l`Batch size mismatch: output ${e.outputNames[l]} has ${o[l].shape[0]}; expected ${s} based on input ${e.inputNames[0]}.`));return{xs:i,ys:o}}function Qs(e,t,n){if(n instanceof D.Tensor)return[n];if(Array.isArray(n))return D.util.assert(n.length===t.length,(()=>`Received an array of ${n.length} Tensors, but expected ${t.length} to match the ${e} keys ${t}.`)),n;{const r=[];for(const a of t){if(null==n[a])throw new wa(`The feature data generated by the dataset lacks the required ${e} key '${a}'.`);r.push(n[a])}return r}}async function el(e,t,n){const r=null!=n.batchesPerEpoch;if(D.util.assert(null!=e.optimizer,(()=>"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig).")),D.util.assert(null!=n,(()=>"For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call.")),D.util.assert(null!=n.epochs&&n.epochs>0&&Number.isInteger(n.epochs),(()=>`For fitDataset(), config.epochs is expected to be a positive integer, but got ${n.epochs}`)),D.util.assert(!r||n.batchesPerEpoch>0&&Number.isInteger(n.batchesPerEpoch),(()=>`For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got ${n.batchesPerEpoch}`)),D.util.assert(null==n.validationSplit,(()=>"`validationSplit` is not supported by `fitDataset()`. Use validationData instead.")),e.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");e.isTraining=!0;try{const a=null!=n.validationData;let i,o;if(a)if(tl(n.validationData))D.util.assert(null==n.validationBatches||n.validationBatches>0&&Number.isInteger(n.validationBatches),(()=>`For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got ${n.validationBatches}`));else{const e=function(e){if(3===e.length)throw new Fa("Validation with sample weights is not implemented yet.");return{xs:e[0],ys:e[1]}}(n.validationData);i=e.xs,o=e.ys}const s=e.makeTrainFunction(),l=e.getDedupedMetricsNames();let u;u=a?l.slice().concat(l.map((e=>"val_"+e))):l.slice();const c=ls(n.callbacks,n.yieldEvery),d=null==n.verbose?1:n.verbose,{callbackList:h,history:f}=cs(c,d,n.epochs,null,null,function(e,t){let n=null;null!=t.batchesPerEpoch?n=t.batchesPerEpoch:Number.isFinite(e.size)&&(n=e.size);return n}(t,n),null,a,u);h.setModel(e),e.history=f,await h.onTrainBegin(),e.stopTraining_=!1;let p=null==n.initialEpoch?0:n.initialEpoch,m=await t.iterator();for(;p=n.batchesPerEpoch:t.done){if(a){let t;t=tl(n.validationData)?Ta(await e.evaluateDataset(n.validationData,{batches:n.validationBatches})):Ta(e.evaluate(i,o,{batchSize:null==n.validationBatchSize?32:n.validationBatchSize,verbose:0}));for(let n=0;n0&&Number.isInteger(e),(()=>`batchSize is required to be a positive integer, but got ${e}`))}function rl(e,t,n){return null==e?[null]:Array.isArray(e)?e.map((e=>yi(e,t,n-t))):yi(e,t,n-t)}function al(e,t){return D.tidy((()=>null==e?null:Array.isArray(e)?e.map((e=>al(e,t))):Ai(e,"int32"===t.dtype?t:D.cast(t,"int32"))))}function il(e,t){const n=[];let r=0,a=null;for(;r=e&&(a=e),n.push([r,a]),r=a;return n}function ol(e){const t=[];e instanceof D.Tensor&&(e=[e]);for(let n=0;nn.push(e.id)));else if(null!=t)for(const a in t){const e=t[a];n.push(e.id)}const r=[];if(e instanceof D.Tensor)-1===n.indexOf(e.id)&&r.push(e);else if(Array.isArray(e))e.forEach((e=>{-1===n.indexOf(e.id)&&r.push(e)}));else if(null!=e)for(const a in e){const t=e[a];-1===n.indexOf(t.id)&&r.push(t)}r.forEach((e=>{e.isDisposed||e.dispose()}))}function ll(e){return Array.isArray(e)}function ul(e){return!function(e){return e instanceof D.Tensor}(e)&&!ll(e)}function cl(e,t,n,r=!0,a=""){if(null==t||0===t.length){if(null!=e){let t=!1;if(ll(e)&&e.length>0)t=!0;else if(ul(e)){for(const n in e)if(e.hasOwnProperty(n)){t=!0;break}}else t=!0;if(t)throw new wa(`Error when checking model ${a} expected no data, but got ${e}`)}return[]}if(null==e)return t.map((e=>null));let i;if(ul(e)){i=[];for(const n of t){if(null==e[n])throw new wa(`No data provided for "${n}". Need data for each key in: ${t}`);i.push(e[n])}}else if(ll(e)){if(e.length!==t.length)throw new wa(`Error when checking model ${a}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${t.length} Tensor(s), but instead got the following list of Tensor(s): ${e}`);i=e}else{if(t.length>1)throw new wa(`The model ${a} expects ${t.length} Tensor(s), but only received one Tensor. Found: Tensor with shape ${e.shape}`);i=[e]}if(i=ol(i),null!=n)for(let o=0;o=0&&i!==s)throw new wa(`${a} expected a batch of elements where each example has shape [${n[o].slice(1,n[o].length)}] (i.e.,tensor shape [*,${n[o].slice(1,n[o].length)}]) but the ${a} received an input with ${e.shape[0]} examples, each with shape [${e.shape.slice(1,e.shape.length)}] (tensor shape [${e.shape}])`)}}return i}function dl(e,t,n,r=!0,a=""){let i;if(Array.isArray(e)){if(e.length!==t.length)throw new wa(`Error when checking model ${a}: the Array of Tensors that you are passing to your model is not the size the the model expected. Expected to see ${t.length} Tensor(s), but instead got ${e.length} Tensors(s).`);i=e}else{if(t.length>1)throw new wa(`The model expects ${t.length} ${a} Tensors, but only received one Tensor. Found: array with shape ${JSON.stringify(e.shape)}.`);i=[e]}if(null!=n)for(let o=0;oD.train.adagrad(.01),Adadelta:()=>D.train.adadelta(1,.95,pi()),Adam:()=>D.train.adam(.001,.9,.999,pi()),Adamax:()=>D.train.adamax(.002,.9,.999,pi(),0),RMSProp:()=>D.train.rmsprop(.001,.9,0,pi()),SGD:()=>D.train.sgd(.01)};if(t.adagrad=t.Adagrad,t.adadelta=t.Adadelta,t.adam=t.Adam,t.adamax=t.Adamax,t.rmsprop=t.RMSProp,t.sgd=t.SGD,e in t)return t[e]();throw new wa(`Unknown Optimizer ${e}`)}(e.optimizer),this.isOptimizerOwned=!0;else{if(!(e.optimizer instanceof D.Optimizer))throw new wa("User-defined optimizer must be an instance of tf.Optimizer.");this.optimizer_=e.optimizer,this.isOptimizerOwned=!1}let t=[];if(Array.isArray(e.loss)||"string"===typeof e.loss||"function"===typeof e.loss)if(Array.isArray(e.loss)){if(e.loss.length!==this.outputs.length)throw new wa(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${e.loss}.`);const n=e.loss;t=n.map((e=>ks(e)))}else{const n=ks(e.loss);this.outputs.forEach((e=>{t.push(n)}))}else{e.loss=e.loss;for(const t in e.loss)if(-1===this.outputNames.indexOf(t))throw new wa(`Unknown entry in loss dictionary: "${t}". Only expected the following keys: ${this.outputNames}`);for(const n of this.outputNames)null==e.loss[n]&&console.warn(`Output "${n}" is missing from loss dictionary. We assume this was done on purpose, and we will not be expecting data to be passed to ${n} during training`),t.push(ks(e.loss[n]))}this.lossFunctions=t,this.feedOutputNames=[],this.feedOutputShapes=[],this.feedLossFns=[];for(let i=0;i{for(let e=0;e1&&(this.metricsTensors.push([t,e]),this.metricsNames.push(this.outputNames[e]+"_loss"))}}));const r=function(e,t){if(null==e||Array.isArray(e)&&0===e.length)return t.map((e=>[]));let n;if("string"===typeof e||"function"===typeof e)n=[e];else{if(!Array.isArray(e)&&"object"!==typeof e)throw new TypeError(`Type of metrics argument not understood. Expected an string,function, Array, or Object, found: ${e}`);n=e}if(Array.isArray(n))return t.map((e=>n));{const e=[];for(const r of t){let t=n.hasOwnProperty(r)?n[r]:[];Array.isArray(t)||(t=[t]),e.push(t)}return e}}(e.metrics,this.outputNames),a=(e,t,n)=>{this.outputNames.length>1&&(t=this.outputNames[e]+"_"+t),this.metricsNames.push(t),this.metricsTensors.push([n,e])};ai("metric",(()=>{for(let e=0;e{let n,r,i;for(const o of t){if("string"===typeof o&&-1!==["accuracy","acc","crossentropy","ce"].indexOf(o)){const t=this.internalOutputShapes[e];let a;1===t[t.length-1]||this.lossFunctions[e]===bs?-1!==["accuracy","acc"].indexOf(o)?r=xs:-1!==["crossentropy","ce"].indexOf(o)&&(r=Ts):this.lossFunctions[e]===_s?-1!==["accuracy","acc"].indexOf(o)?r=Ds:-1!==["crossentropy","ce"].indexOf(o)&&(r=Os):-1!==["accuracy","acc"].indexOf(o)?r=As:-1!==["crossentropy","ce"].indexOf(o)&&(r=Is),-1!==["accuracy","acc"].indexOf(o)?a="acc":-1!==["crossentropy","ce"].indexOf(o)&&(a="ce"),i=r,n=""+a}else{const e=Ms(o);i=e,n=""+Rs(o)}let t;ai(n,(()=>{t=i})),a(e,n,t)}})(r[e])}})),this.collectedTrainableWeights=this.trainableWeights}checkTrainableWeightsConsistency(){null!=this.collectedTrainableWeights&&this.trainableWeights.length!==this.collectedTrainableWeights.length&&console.warn("Discrepancy between trainableweights and collected trainable weights. Did you set `model.trainable` without calling `model.compile()` afterwards?")}evaluate(e,t,n={}){const r=null==n.batchSize?32:n.batchSize;nl(r);const a=this.standardizeUserDataXY(e,t,!0,r);try{const e=a[0].concat(a[1]);this.makeTestFunction();const t=this.testFunction;return Ca(this.testLoop(t,e,r,n.verbose,n.steps))}finally{sl(a[0],e),sl(a[1],t)}}async evaluateDataset(e,t){return this.makeTestFunction(),async function(e,t,n){const r=null!=(n=n||{}).batches,a=e.testFunction;let i=[];if(n.verbose>0)throw new Fa("Verbose mode is not implemented yet.");D.util.assert(!r||n.batches>0&&Number.isInteger(n.batches),(()=>`Test loop expects \`batches\` to be a positive integer, but received ${JSON.stringify(n.batches)}`));const o="function"===typeof t.next?t:await t.iterator();let s=0,l=0;for(;!r||l{if(t.value){const{xs:n,ys:r}=Zs(e,t.value),o=n.concat(r),u=D.tidy((()=>a(o)));if(D.dispose(o),0===l)for(let e=0;eD.add(i[e],D.mul(c,t)))),l>0&&D.dispose(n)}D.dispose(u),s+=c,++l}return i})),t.done){r&&console.warn(`Your dataset iterator ran out of data during evaluateDataset(). Interrupting evalution. Make sure that your dataset can generate at least \`batches\` batches (in this case, ${n.batches} batches). You may need to use the repeat() function when building your dataset.`);break}}for(let u=0;ue.name));for(let r=0;r0){const n=[];throw t.forEach(((t,r)=>{null==t&&n.push(e[r])})),new wa(`Cannot find SymbolicTensors for output name(s): ${JSON.stringify(n)}`)}return t}predictLoop(e,t=32,n=!1){return D.tidy((()=>{const r=this.checkNumSamples(e);if(n)throw new Fa("Verbose predictLoop() is not implemented yet.");const a=il(r,t),i=this.outputs.map((e=>[]));for(let t=0;t{const n=a[t][0],r=a[t][1],i=rl(e,n,r),o=[];if(Array.isArray(i))for(let e=0;ei[t].push(e)))}return Ca(i.map((e=>D.concat(e,0))))}))}predict(e,t={}){const n=ol(e);dl(n,this.inputNames,this.feedInputShapes,!1);try{const e=null==t.batchSize?32:t.batchSize;return nl(e),this.predictLoop(n,e)}finally{sl(n,e)}}predictOnBatch(e){dl(e,this.inputNames,this.feedInputShapes,!0);const t=(Array.isArray(e)?e[0]:e).shape[0];return this.predictLoop(e,t)}standardizeUserDataXY(e,t,n=!0,r){if(null==this.optimizer_)throw new va("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).");const a=[];for(let i=0;ie.shape[0])));n.sort();const r=Na(t.map((e=>e.shape[0])));if(r.sort(),n.length>1)throw new wa(`All input Tensors (x) should have the same number of samples. Got array shapes: ${JSON.stringify(e.map((e=>e.shape)))}`);if(r.length>1)throw new wa(`All target Tensors (y) should have the same number of samples. Got array shapes: ${JSON.stringify(t.map((e=>e.shape)))}`);if(n.length>0&&r.length>0&&!D.util.arraysEqual(n,r))throw new wa(`Input Tensors should have the same number of samples as target Tensors. Found ${n[0]} input sample(s) and ${r[0]} target sample(s).`)}(e=cl(e,this.feedInputNames,this.feedInputShapes,!1,"input"),t=cl(t,this.feedOutputNames,a,!1,"target")),function(e,t,n){const r=[fs,bs,ys];for(let a=0;a0&&e[0].shape[0]%r!==0)throw new wa(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${r}. Found: ${e[0].shape[0]} sample(s).`);return[e,t]}async standardizeUserData(e,t,n,r,a=!0,i){const[o,s]=this.standardizeUserDataXY(e,t,a,i);if(null!=n)throw new Error("sample weight is not supported yet.");let l=null;if(null!=r){const e=Xs(r,this.outputNames);l=[];for(let t=0;t{const i=this.checkNumSamples(t,n,a,"steps"),o=[];if(r>0)throw new Fa("Verbose mode is not implemented yet.");if(null!=a)throw new Fa("steps mode in testLoop() is not implemented yet");{const r=il(i,n),a=(0,D.tensor1d)(hi(0,i));for(let n=0;n1){a+=`_${Ea(e.slice(0,n),r)}`}t.push(a)}return t}makeTrainFunction(){return e=>{const t=[],n=e.slice(0,this.inputs.length),r=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),a=e.slice(this.inputs.length+this.outputs.length,this.inputs.length+2*this.outputs.length),i=[],o=this.collectedTrainableWeights.map((e=>e.read()));return[this.optimizer_.minimize((()=>{const e=[];for(let t=0;t1&&n{l=D.add(l,e)})),l}),!0,o)].concat(i)}}makeTestFunction(){this.testFunction=e=>D.tidy((()=>{const t=[];let n;const r=e.slice(0,this.inputs.length),a=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),i=[];for(let e=0;e0){if(g=!0,2!==n.validationData.length)throw 3===n.validationData.length?new Fa("validationData including sample weights is not supported yet."):new wa(`When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; ${n.validationData} is invalid.`);s=n.validationData[0],l=n.validationData[1];const e=!0,t=await this.standardizeUserData(s,l,null,null,e,h);u=t[0],c=t[1],m=u.concat(c)}else if(null!=n.validationSplit&&n.validationSplit>0&&n.validationSplit<1){g=!0;const e=Math.floor(r[0].shape[0]*(1-n.validationSplit)),t=r[0].shape[0];u=rl(r,e,t),i=r,r=rl(r,0,e),c=rl(a,e,t),o=a,a=rl(a,0,e),m=u.concat(c)}else null!=n.validationSteps&&(g=!0);const y=r.concat(a).concat(d);this.checkTrainableWeightsConsistency();const _=this.makeTrainFunction(),b=this.getDedupedMetricsNames();let v,w;g?(this.makeTestFunction(),v=this.testFunction,w=b.slice().concat(b.map((e=>"val_"+e)))):(v=null,m=[],w=b.slice());const F=ls(n.callbacks,n.yieldEvery);return await this.fitLoop(_,y,b,h,n.epochs,n.verbose,F,v,m,n.shuffle,w,n.initialEpoch,null,null)}finally{this.isTraining=!1,sl(r,e),sl(a,t),sl(i,e),sl(o,t),sl(u,s),sl(c,l),null!=d&&D.dispose(d)}}async fitLoop(e,t,n,r,a,i,o,s,l,u,c,d,h,f){null==r&&(r=32),null==a&&(a=1),null==u&&(u=!0),null==d&&(d=0);let p=!1;if(null!=s&&null!=l&&(p=!0),null!=f&&(p=!0,null==h))throw new wa("Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.");const m=this.checkNumSamples(t,r,h,"steps_per_epoch");let g;null!=m&&(g=hi(0,m)),null==i&&(i=1);const{callbackList:y,history:_}=cs(o,i,a,d,m,h,r,p,c);y.setModel(this),this.history=_,await y.onTrainBegin(),this.stopTraining_=!1;for(let b=d;b{const d=o[u][0],h=o[u][1],f=yi(i,d,h-d);c.batch=u,c.size=h-d;const m=al(t,f),g=e(m);for(let e=0;eDa(e)))}else{const t=Object.keys(this.loss);e={};const n=this.loss;for(const r of t){if("string"!==typeof n[r])throw new Error("Serialization of non-string loss is not supported.");e[r]=Da(n[r])}}return e}getMetricIdentifiers(){if("string"===typeof this.metrics||"function"===typeof this.metrics)return[Da(Rs(this.metrics))];if(Array.isArray(this.metrics))return this.metrics.map((e=>Da(Rs(e))));{const e={};for(const t in this.metrics)e[t]=Da(Rs(this.metrics[t]));return e}}getTrainingConfig(){return{loss:this.getLossIdentifiers(),metrics:this.getMetricIdentifiers(),optimizer_config:{class_name:this.optimizer.getClassName(),config:this.optimizer.getConfig()}}}loadTrainingConfig(e){if(null!=e.weighted_metrics)throw new Error("Loading weight_metrics is not supported yet.");if(null!=e.loss_weights)throw new Error("Loading loss_weights is not supported yet.");if(null!=e.sample_weight_mode)throw new Error("Loading sample_weight_mode is not supported yet.");const t=ds(Ws(e.optimizer_config));let n,r;if("string"===typeof e.loss)n=Ia(e.loss);else if(Array.isArray(e.loss))n=e.loss.map((e=>Ia(e)));else if(null!=e.loss){n={};for(const t in e.loss)n[t]=Ia(e.loss[t])}if(Array.isArray(e.metrics))r=e.metrics.map((e=>Ia(e)));else if(null!=e.metrics){r={};for(const t in e.metrics)r[t]=Ia(e.metrics[t])}this.compile({loss:n,metrics:r,optimizer:t})}async save(e,t){if("string"===typeof e){const t=D.io.getSaveHandlers(e);if(0===t.length)throw new wa(`Cannot find any save handlers for URL '${e}'`);if(t.length>1)throw new wa(`Found more than one (${t.length}) save handlers for URL '${e}'`);e=t[0]}if(null==e.save)throw new wa("LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");const n=await D.io.encodeWeights(this.getNamedWeights(t)),r={modelTopology:this.toJSON(null,!1),format:"layers-model",generatedBy:`TensorFlow.js tfjs-layers v${$s}`,convertedBy:null};if(null!=t&&t.includeOptimizer&&null!=this.optimizer){r.trainingConfig=this.getTrainingConfig();const e="optimizer",{data:t,specs:a}=await D.io.encodeWeights(await this.optimizer.getWeights(),e);n.specs.push(...a),n.data=D.io.concatenateArrayBuffers([n.data,t])}if(null!=this.userDefinedMetadata){const e=!0;Ns(this.userDefinedMetadata,this.name,e),r.userDefinedMetadata=this.userDefinedMetadata}return r.weightData=n.data,r.weightSpecs=n.specs,e.save(r)}setUserDefinedMetadata(e){Ns(e,this.name),this.userDefinedMetadata=e}getUserDefinedMetadata(){return this.userDefinedMetadata}}hl.className="Model",D.serialization.registerClass(hl);class fl extends hl{}async function pl(e,t){"modelTopology"in e||(e={modelTopology:e});let n=e.modelTopology;null!=n.model_config&&(n=n.model_config);const r=ds(Ws(n),t);if(null!=e.weightsManifest){const t=await D.io.loadWeights(e.weightsManifest,e.pathPrefix,r.weights.map((e=>e.originalName))),n={};for(const e of r.weights)n[e.originalName]=t[e.originalName];r.loadWeights(n),(0,D.dispose)(t)}return r}async function ml(e,t){if(null==t&&(t={}),"string"===typeof e){const n=D.io.getLoadHandlers(e,t);if(0===n.length)n.push(D.io.browserHTTPRequest(e,t));else if(n.length>1)throw new wa(`Found more than one (${n.length}) load handlers for URL '${e}'`);e=n[0]}return async function(e,t,n){null==n&&(n={});if(null==e.load)throw new wa("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const r=await e.load();let a=r.modelTopology;null!=a.model_config&&(a=a.model_config);const i=null==n.strict||n.strict,o=null!=r.weightData&&null!=r.weightSpecs&&i,s=ds(Ws(a),t,o),l=r.trainingConfig;null!=l&&s.loadTrainingConfig(l);null!=r.userDefinedMetadata&&s.setUserDefinedMetadata(r.userDefinedMetadata);if(null!=r.weightData){if(null==r.weightSpecs)throw new wa("LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.");const{modelWeights:e,optimizerWeights:t}=function(e,t){const n=D.io.decodeWeights(e,t),r={},a=[];return t.forEach((e=>{"optimizer"===e.group?a.push({name:e.name,tensor:n[e.name]}):r[e.name]=n[e.name]})),{modelWeights:r,optimizerWeights:a}}(r.weightData,r.weightSpecs);s.loadWeights(e,i),null!=s.optimizer&&t.length>0&&await s.optimizer.setWeights(t),(0,D.dispose)(e),(0,D.dispose)(t.map((e=>e.tensor)))}return s}(e,void 0,t)}fl.className="Functional",D.serialization.registerClass(fl);class gl extends hl{constructor(e){if(super({inputs:[],outputs:[]}),e=e||{},this.trainable=!0,this.built=!1,this.name=null!=e.name?e.name:Ya("sequential_"),null!=e.layers)for(const t of e.layers)this.add(t)}checkShape(e){if(e.inboundNodes[0].outputTensors[0].shape.some((e=>e<0)))throw new wa(`Negative dimension size caused by adding layer ${e.name} with input shape [${e.inboundNodes[0].inputTensors[0].shape}]`)}add(e){const t=e instanceof gl||e instanceof hl;let n;if(t){if(n=e,1!==n.outputs.length)throw new wa("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");if(1!==n.inputs.length)throw new wa("All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.")}if(0===this.outputs.length){if(0===e.inboundNodes.length){if(null==e.batchInputShape)throw new wa("The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.");const t=yo({batchShape:e.batchInputShape,dtype:e.dtype,name:e.name+"_input"});e.apply(t)}if(t)this.outputs=n.outputs,this.inputs=n.inputs;else{if(1!==e.inboundNodes.length)throw new wa(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${e.name} which has ${e.inboundNodes.length} pre-existing inbound connections.`);if(1!==e.inboundNodes[0].outputTensors.length)throw new wa("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[e.inboundNodes[0].outputTensors[0]],this.inputs=mo(this.outputs[0])}this.inboundNodes=[],new ho({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:Aa(null,this.inputs.length),outputMasks:[null],inputShapes:this.inputs.map((e=>e.shape)),outputShapes:this.outputs[0].shape})}else{const t=e.apply(this.outputs[0]);if(Array.isArray(t))throw new TypeError("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[t],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}this.layers.push(e),this.built=!1}pop(){if(0===this.layers.length)throw new TypeError("There are no layers in the model.");if(this.layers.pop(),0===this.layers.length)this.outputs=[],this.inboundNodes=[],this.outboundNodes=[];else{const e=this.layers.length-1;this.layers[e].outboundNodes=[],this.outputs=[this.layers[e].output],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}}call(e,t){return null==this.model&&this.build(),this.model.call(e,t)}build(e){if(no(e),0===this.inputs.length||0===this.outputs.length)throw new TypeError("Sequential model cannot be built: model is empty. Add some layers first.");this.model=new hl({inputs:this.inputs,outputs:this.outputs[0],name:this.name+"_model"}),this.model.trainable=this.trainable,this.supportsMasking=this.model.supportsMasking,this.inputLayers=this.model.inputLayers,this.inputLayersNodeIndices=this.model.inputLayersNodeIndices,this.inputLayersTensorIndices=this.model.inputLayersTensorIndices,this.outputLayers=this.model.outputLayers,this.outputLayersNodeIndices=this.model.outputLayersNodeIndices,this.outputLayersTensorIndices=this.model.outputLayersTensorIndices,this.nodesByDepth=this.model.nodesByDepth,this.containerNodes=this.model.containerNodes,this.outputNames=this.model.outputNames,this.inputNames=this.model.inputNames,this.built=!0}countParams(){return this.built||this.build(),super.countParams()}summary(e,t,n=console.log){this.built||this.build(),super.summary(e,t,n)}setWeights(e){null==this.model&&this.build(),this.model.setWeights(e)}evaluate(e,t,n={}){if(!this.built)throw new va("The model needs to be compiled before being used.");return this.model.evaluate(e,t,n)}async evaluateDataset(e,t){if(!this.built)throw new va("The model needs to be compiled before being used.");return this.model.evaluateDataset(e,t)}predict(e,t={}){return null==this.model&&this.build(),this.model.predict(e,t)}predictOnBatch(e){return null==this.model&&this.build(),this.model.predictOnBatch(e)}compile(e){this.build(),this.model.compile(e),this.optimizer_=this.model.optimizer,this.isOptimizerOwned=this.model.isOptimizerOwned,this.loss=this.model.loss,this.metrics=this.model.metrics,this.metricsTensors=this.model.metricsTensors,this.metricsNames=this.model.metricsNames}get optimizer(){return null==this.model?void 0:this.model.optimizer}set optimizer(e){this.model.optimizer=e}async fit(e,t,n={}){if(!this.built)throw new va("The model needs to be compiled before being used.");return this.model.fit(e,t,n)}async fitDataset(e,t){if(!this.built)throw new va("The model needs to be compiled before being used.");return this.model.fitDataset(e,t)}async trainOnBatch(e,t){return this.model.trainOnBatch(e,t)}static fromConfig(e,t,n={},r=!1){let a,i={};if(t instanceof Array){if(null==t[0].className||"Merge"===t[0].className)throw new wa("Legacy serialization format not supported yet.");a=t}else D.util.assert(null!=t.layers,(()=>"When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field.")),a=t.layers,delete t.layers,i=t;const o=new e(i);if(!(o instanceof gl))throw new Fa(`Sequential.fromConfig called on non-Sequential input: ${o}`);for(const s of a){const e=ds(s,void 0,r);r&&e.setFastWeightInitDuringBuild(!0),o.add(e)}return o}set stopTraining(e){if(null==this.model)throw new wa("Cannot set the stopTraining property of a sequential model before it is compiled.");this.model.stopTraining=e}get stopTraining(){if(null==this.model)throw new wa("Cannot get the stopTraining property of a sequential model before it is compiled.");return this.model.stopTraining}getConfig(){const e=[];for(const t of this.layers){const n={};n.className=t.getClassName(),n.config=t.getConfig(),e.push(n)}return{name:this.name,layers:e}}}function yl(e){return new hl(e)}function _l(e){return new gl(e)}function bl(e){return yo(e)}function vl(e,t){us.registerCallbackConstructor(e,t)}gl.className="Sequential",D.serialization.registerClass(gl);class wl extends D.serialization.Serializable{getConfig(){return{}}}class Fl extends wl{apply(e,t=1){return function(e,t=1){if(1!==t)throw new Fa(`Support for alpha values other than 1 (${t}) is not implemented yet.`);return D.elu(e)}(e,t)}}Fl.className="elu",D.serialization.registerClass(Fl);class kl extends wl{apply(e){return D.selu(e)}}kl.className="selu",D.serialization.registerClass(kl);class xl extends wl{apply(e){return D.relu(e)}}xl.className="relu",D.serialization.registerClass(xl);class Al extends wl{apply(e){return(0,D.tidy)((()=>D.minimum(6,D.relu(e))))}}Al.className="relu6",D.serialization.registerClass(Al);class Sl extends wl{apply(e){return e}}Sl.className="linear",D.serialization.registerClass(Sl);class El extends wl{apply(e){return D.sigmoid(e)}}El.className="sigmoid",D.serialization.registerClass(El);class Cl extends wl{apply(e){return function(e){return(0,D.tidy)((()=>{const t=D.add(.5,D.mul(.2,e));return D.clipByValue(t,0,1)}))}(e)}}Cl.className="hardSigmoid",D.serialization.registerClass(Cl);class Tl extends wl{apply(e){return D.softplus(e)}}Tl.className="softplus",D.serialization.registerClass(Tl);class Dl extends wl{apply(e){return function(e){return(0,D.tidy)((()=>D.div(e,D.add(D.abs(e),1))))}(e)}}Dl.className="softsign",D.serialization.registerClass(Dl);class Il extends wl{apply(e){return D.tanh(e)}}Il.className="tanh",D.serialization.registerClass(Il);class Ol extends wl{apply(e,t=-1){return D.softmax(e,t)}}Ol.className="softmax",D.serialization.registerClass(Ol);class Pl extends wl{apply(e,t=-1){return D.logSoftmax(e,t)}}Pl.className="logSoftmax",D.serialization.registerClass(Pl);class Ml extends wl{apply(e){return(0,D.tidy)((()=>D.tidy((()=>{const t=Math.sqrt(2),n=D.mul(.5,D.add(1,D.erf(D.div(e,t))));return D.mul(e,n)}))))}}Ml.className="gelu",D.serialization.registerClass(Ml);class Rl extends wl{apply(e){return(0,D.tidy)((()=>D.mul(.5,D.mul(e,D.add(1,D.tanh(D.mul(D.sqrt(D.div(2,Math.PI)),D.add(e,D.mul(.044715,D.pow(e,3))))))))))}}Rl.className="gelu_new",D.serialization.registerClass(Rl);class Ll extends wl{apply(e){return(0,D.tidy)((()=>D.mul(e,D.tanh(D.softplus(e)))))}}Ll.className="mish",D.serialization.registerClass(Ll);class Nl extends wl{apply(e,t=1){return(0,D.tidy)((()=>D.mul(D.sigmoid(D.mul(e,t)),e)))}}function Bl(e){return e.getClassName()}function jl(e,t={}){return Ra(e,D.serialization.SerializationMap.getMap().classNameMap,t,"activation")}function Vl(e){if(null==e){const e={className:"linear",config:{}};return jl(e)}if("string"===typeof e){const t={};return t.className=e,t.config={},jl(t)}return e instanceof wl?e:jl(e)}function zl(e){if(null!=e&&"object"!==typeof e)throw new Error(`Argument to L1L2 regularizer's constructor is expected to be an object, but received: ${e}`)}Nl.className="swish",D.serialization.registerClass(Nl);class Hl extends D.serialization.Serializable{}class Ul extends Hl{constructor(e){super(),zl(e),this.l1=null==e||null==e.l1?.01:e.l1,this.l2=null==e||null==e.l2?.01:e.l2,this.hasL1=0!==this.l1,this.hasL2=0!==this.l2}apply(e){return(0,D.tidy)((()=>{let t=(0,D.zeros)([1]);return this.hasL1&&(t=(0,D.add)(t,(0,D.sum)(D.mul(this.l1,(0,D.abs)(e))))),this.hasL2&&(t=(0,D.add)(t,(0,D.sum)(D.mul(this.l2,Si(e))))),D.reshape(t,[])}))}getConfig(){return{l1:this.l1,l2:this.l2}}static fromConfig(e,t){return new e({l1:t.l1,l2:t.l2})}}Ul.className="L1L2",D.serialization.registerClass(Ul);const Wl={l1l2:"L1L2"};function ql(e){return Pa(e)}function $l(e,t={}){return Ra(e,D.serialization.SerializationMap.getMap().classNameMap,t,"regularizer")}function Yl(e){if(null==e)return null;if("string"===typeof e){return $l({className:e in Wl?Wl[e]:e,config:{}})}return e instanceof Hl?e:$l(e)}class Gl extends po{constructor(e){super(null==e?{}:e),this.supportsMasking=!0,null!=e&&(this.maxValue=e.maxValue)}call(e,t){e=to(e);let n=(0,D.relu)(e);return null!=this.maxValue&&(n=(0,D.clipByValue)(n,0,this.maxValue)),n}computeOutputShape(e){return e}getConfig(){const e={maxValue:this.maxValue},t=super.getConfig();return Object.assign(e,t),e}}Gl.className="ReLU",D.serialization.registerClass(Gl);class Xl extends po{constructor(e){super(null==e?{}:e),this.DEFAULT_ALPHA=.3,null==e&&(e={}),this.alpha=null==e.alpha?this.DEFAULT_ALPHA:e.alpha}call(e,t){const n=to(e);return(0,D.leakyRelu)(n,this.alpha)}computeOutputShape(e){return e}getConfig(){const e={alpha:this.alpha},t=super.getConfig();return Object.assign(e,t),e}}Xl.className="LeakyReLU",D.serialization.registerClass(Xl);class Kl extends po{constructor(e){if(super(null==e?{}:e),this.DEFAULT_ALPHA_INITIALIZER="zeros",null==e&&(e={}),this.supportsMasking=!0,this.alphaInitializer=Zi(e.alphaInitializer||this.DEFAULT_ALPHA_INITIALIZER),this.alphaRegularizer=Yl(e.alphaRegularizer),this.alphaConstraint=Mo(e.alphaConstraint),null==e.sharedAxes)this.sharedAxes=null;else if(Array.isArray(e.sharedAxes))this.sharedAxes=e.sharedAxes;else{if("number"!==typeof e.sharedAxes)throw new wa(`Expected sharedAxes to be a number or an array of numbers, but got ${e.sharedAxes}`);this.sharedAxes=[e.sharedAxes]}}build(e){const t=(e=no(e)).slice(1);if(null!=this.sharedAxes)for(const r of this.sharedAxes)t[r-1]=1;this.alpha=this.addWeight("alpha",t,"float32",this.alphaInitializer,this.alphaRegularizer,!0,this.alphaConstraint);const n={};if(null!=this.sharedAxes)for(let r=1;r{let n=to(e);const r=t.mask;if(null!=r){const e=(0,D.mul)((0,D.sub)((0,D.ones)(n.shape),(0,D.cast)(r,n.dtype)),(0,D.scalar)(-1e9));n=(0,D.add)(n,e)}return this.axis instanceof Array?this.axis.length>1?(0,D.exp)((0,D.sub)(n,(0,D.logSumExp)(n,this.axis,!0))):this.softmax(n,this.axis[0]):this.softmax(n,this.axis)}))}computeOutputShape(e){return e}getConfig(){const e={axis:this.axis},t=super.getConfig();return Object.assign(e,t),e}}function eu(e,t,n){if("number"===typeof e)return Aa(e,t);if(e.length!==t)throw new wa(`The ${n} argument must be an integer or tuple of ${t} integers. Received: ${e.length} elements.`);for(let a=0;a(ei(t),"channelsFirst"===t?D.transpose(e,[0,2,3,1]):e)))}function au(e,t){return(0,D.tidy)((()=>(ei(t),"channelsFirst"===t?D.transpose(e,[0,2,3,4,1]):e)))}function iu(e,t,n,r=1,a="valid",i,o=1){return(0,D.tidy)((()=>{if(null==i&&(i="channelsLast"),ei(i),3!==e.shape.length)throw new wa(`The input of a conv1dWithBias operation should be 3, but is ${e.shape.length} instead.`);if(3!==t.shape.length)throw new wa(`The kernel for a conv1dWithBias operation should be 3, but is ${t.shape.length} instead`);if(null!=n&&1!==n.shape.length)throw new wa(`The bias for a conv1dWithBias operation should be 1, but is ${n.shape.length} instead`);if("channelsFirst"===i&&(e=D.transpose(e,[0,2,1])),"causal"===a)throw new Fa("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");let s=D.conv1d(e,t,r,"same"===a?"same":"valid","NWC",o);return null!=n&&(s=Ci(s,n)),s}))}function ou(e,t,n,r=[1,1],a="valid",i,o,s=null){return(0,D.tidy)((()=>{if(null==i&&(i="channelsLast"),ei(i),3!==e.rank&&4!==e.rank)throw new wa(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${e.rank}.`);if(3!==t.rank&&4!==t.rank)throw new wa(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${e.rank}.`);let l=ru(e,i);if("causal"===a)throw new Fa("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");return l=D.fused.conv2d({x:l,filter:t,strides:r,pad:"same"===a?"same":"valid",dilations:o,dataFormat:"NHWC",bias:n,activation:s}),"channelsFirst"===i&&(l=D.transpose(l,[0,3,1,2])),l}))}function su(e,t,n,r=[1,1,1],a="valid",i,o){return(0,D.tidy)((()=>{if(null==i&&(i="channelsLast"),ei(i),4!==e.rank&&5!==e.rank)throw new wa(`conv3dWithBias expects input to be of rank 4 or 5, but received ${e.rank}.`);if(4!==t.rank&&5!==t.rank)throw new wa(`conv3dWithBias expects kernel to be of rank 4 or 5, but received ${e.rank}.`);let s=au(e,i);if("causal"===a)throw new Fa("The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.");return s=D.conv3d(s,t,r,"same"===a?"same":"valid","NDHWC",o),null!=n&&(s=Ci(s,n)),"channelsFirst"===i&&(s=D.transpose(s,[0,4,1,2,3])),s}))}Ql.className="Softmax",D.serialization.registerClass(Ql);class lu extends po{constructor(e,t){if(super(t),this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",lu.verifyArgs(t),this.rank=e,za(this.rank,"rank"),1!==this.rank&&2!==this.rank&&3!==this.rank)throw new Fa(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);if(this.kernelSize=eu(t.kernelSize,e,"kernelSize"),this.strides=eu(null==t.strides?1:t.strides,e,"strides"),this.padding=null==t.padding?"valid":t.padding,ti(this.padding),this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,ei(this.dataFormat),this.activation=Vl(t.activation),this.useBias=null==t.useBias||t.useBias,this.biasInitializer=Zi(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.biasConstraint=Mo(t.biasConstraint),this.biasRegularizer=Yl(t.biasRegularizer),this.activityRegularizer=Yl(t.activityRegularizer),this.dilationRate=eu(null==t.dilationRate?1:t.dilationRate,e,"dilationRate"),1===this.rank&&Array.isArray(this.dilationRate)&&1!==this.dilationRate.length)throw new wa(`dilationRate must be a number or an array of a single number for 1D convolution, but received ${JSON.stringify(this.dilationRate)}`);if(2===this.rank){if("number"===typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate];else if(2!==this.dilationRate.length)throw new wa(`dilationRate must be a number or array of two numbers for 2D convolution, but received ${JSON.stringify(this.dilationRate)}`)}else if(3===this.rank)if("number"===typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate,this.dilationRate];else if(3!==this.dilationRate.length)throw new wa(`dilationRate must be a number or array of three numbers for 3D convolution, but received ${JSON.stringify(this.dilationRate)}`)}static verifyArgs(e){if(Sa("kernelSize"in e,"required key 'kernelSize' not in config"),"number"!==typeof e.kernelSize&&!Va(e.kernelSize,"number",1,3))throw new wa(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(e.kernelSize)}.`)}getConfig(){const e={kernelSize:this.kernelSize,strides:this.strides,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,activation:Bl(this.activation),useBias:this.useBias,biasInitializer:Ji(this.biasInitializer),biasRegularizer:ql(this.biasRegularizer),activityRegularizer:ql(this.activityRegularizer),biasConstraint:Oo(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}}class uu extends lu{constructor(e,t){super(e,t),this.kernel=null,uu.verifyArgs(t),this.filters=t.filters,za(this.filters,"filters"),this.kernelInitializer=Zi(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.kernelConstraint=Mo(t.kernelConstraint),this.kernelRegularizer=Yl(t.kernelRegularizer)}build(e){e=no(e);const t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new wa(`The channel dimension of the input should be defined. Found ${e[t]}`);const n=e[t],r=this.kernelSize.concat([n,this.filters]);this.kernel=this.addWeight("kernel",r,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[{ndim:this.rank+2,axes:{[t]:n}}],this.built=!0}call(e,t){return(0,D.tidy)((()=>{let t;e=to(e);const n=null==this.bias?null:this.bias.read(),r=Ua(this.activation.getClassName());if(null!=r&&2===this.rank)t=ou(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate,r);else{if(1===this.rank)t=iu(e,this.kernel.read(),n,this.strides[0],this.padding,this.dataFormat,this.dilationRate[0]);else if(2===this.rank)t=ou(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate);else{if(3!==this.rank)throw new Fa("convolutions greater than 3D are not implemented yet.");t=su(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate)}null!=this.activation&&(t=this.activation.apply(t))}return t}))}computeOutputShape(e){e=no(e);const t=[],n="channelsLast"===this.dataFormat?e.slice(1,e.length-1):e.slice(2);for(let a=0;a 0 but got ${JSON.stringify(e.filters)}`)}}class cu extends uu{constructor(e){super(2,e),cu.verifyArgs(e)}getConfig(){const e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if("number"!==typeof e.kernelSize&&!Va(e.kernelSize,"number",1,2))throw new wa(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(e.kernelSize)}.`)}}cu.className="Conv2D",D.serialization.registerClass(cu);class du extends uu{constructor(e){super(3,e),du.verifyArgs(e)}getConfig(){const e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if("number"!==typeof e.kernelSize&&(!Array.isArray(e.kernelSize)||1!==e.kernelSize.length&&3!==e.kernelSize.length))throw new wa(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(e.kernelSize)}.`)}}du.className="Conv3D",D.serialization.registerClass(du);class hu extends cu{constructor(e){if(super(e),this.inputSpec=[new lo({ndim:4})],"same"!==this.padding&&"valid"!==this.padding)throw new wa(`Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(4!==(e=no(e)).length)throw new wa("Input should have rank 4; Received input shape: "+JSON.stringify(e));const t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new wa("The channel dimension of the inputs should be defined. Found `None`.");const n=e[t],r=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",r,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new lo({ndim:4,axes:{[t]:n}})],this.built=!0}call(e,t){return D.tidy((()=>{let t=to(e);if(4!==t.shape.length)throw new wa(`Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${t.shape.length}`);const n=t.shape,r=n[0];let a,i;"channelsFirst"===this.dataFormat?(a=2,i=3):(a=1,i=2);const o=n[a],s=n[i],l=this.kernelSize[0],u=this.kernelSize[1],c=this.strides[0],d=this.strides[1],h=[r,nu(o,c,l,this.padding),nu(s,d,u,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(t=D.transpose(t,[0,2,3,1]));let f=D.conv2dTranspose(t,this.kernel.read(),h,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(f=D.transpose(f,[0,3,1,2])),null!=this.bias&&(f=Ci(f,this.bias.read(),this.dataFormat)),null!=this.activation&&(f=this.activation.apply(f)),f}))}computeOutputShape(e){const t=(e=no(e)).slice();let n,r,a;"channelsFirst"===this.dataFormat?(n=1,r=2,a=3):(n=3,r=1,a=2);const i=this.kernelSize[0],o=this.kernelSize[1],s=this.strides[0],l=this.strides[1];return t[n]=this.filters,t[r]=nu(t[r],s,i,this.padding),t[a]=nu(t[a],l,o,this.padding),t}getConfig(){const e=super.getConfig();return delete e.dilationRate,e}}hu.className="Conv2DTranspose",D.serialization.registerClass(hu);class fu extends du{constructor(e){if(super(e),this.inputSpec=[new lo({ndim:5})],"same"!==this.padding&&"valid"!==this.padding)throw new wa(`Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode ${this.padding}`)}build(e){if(5!==(e=no(e)).length)throw new wa("Input should have rank 5; Received input shape: "+JSON.stringify(e));const t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new wa("The channel dimension of the inputs should be defined. Found `None`.");const n=e[t],r=this.kernelSize.concat([this.filters,n]);this.kernel=this.addWeight("kernel",r,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new lo({ndim:5,axes:{[t]:n}})],this.built=!0}call(e,t){return D.tidy((()=>{let t=to(e);if(5!==t.shape.length)throw new wa(`Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-${t.shape.length}`);const n=t.shape,r=n[0];let a,i,o;"channelsFirst"===this.dataFormat?(o=2,a=3,i=4):(o=1,a=2,i=3);const s=n[o],l=n[a],u=n[i],c=this.kernelSize[0],d=this.kernelSize[1],h=this.kernelSize[2],f=this.strides[0],p=this.strides[1],m=this.strides[2],g=[r,nu(s,f,c,this.padding),nu(l,p,d,this.padding),nu(u,m,h,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(t=D.transpose(t,[0,2,3,4,1]));let y=D.conv3dTranspose(t,this.kernel.read(),g,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(y=D.transpose(y,[0,4,1,2,3])),null!==this.bias&&(y=Ci(y,this.bias.read(),this.dataFormat)),null!==this.activation&&(y=this.activation.apply(y)),y}))}computeOutputShape(e){const t=(e=no(e)).slice();let n,r,a,i;"channelsFirst"===this.dataFormat?(n=1,r=2,a=3,i=4):(n=4,r=1,a=2,i=3);const o=this.kernelSize[0],s=this.kernelSize[1],l=this.kernelSize[2],u=this.strides[0],c=this.strides[1],d=this.strides[2];return t[n]=this.filters,t[r]=nu(t[r],u,o,this.padding),t[a]=nu(t[a],c,s,this.padding),t[i]=nu(t[i],d,l,this.padding),t}getConfig(){const e=super.getConfig();return delete e.dilationRate,e}}fu.className="Conv3DTranspose",D.serialization.registerClass(fu);class pu extends uu{constructor(e,t){if(super(e,t),this.DEFAULT_DEPTHWISE_INITIALIZER="glorotUniform",this.DEFAULT_POINTWISE_INITIALIZER="glorotUniform",this.depthwiseKernel=null,this.pointwiseKernel=null,null==t.filters)throw new wa("The `filters` configuration field is required by SeparableConv, but is unspecified.");if(null!=t.kernelInitializer||null!=t.kernelRegularizer||null!=t.kernelConstraint)throw new wa("Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.");if(null!=t.padding&&"same"!==t.padding&&"valid"!==t.padding)throw new wa(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received ${JSON.stringify(t.padding)}`);this.depthMultiplier=null==t.depthMultiplier?1:t.depthMultiplier,this.depthwiseInitializer=Zi(t.depthwiseInitializer||this.DEFAULT_DEPTHWISE_INITIALIZER),this.depthwiseRegularizer=Yl(t.depthwiseRegularizer),this.depthwiseConstraint=Mo(t.depthwiseConstraint),this.pointwiseInitializer=Zi(t.depthwiseInitializer||this.DEFAULT_POINTWISE_INITIALIZER),this.pointwiseRegularizer=Yl(t.pointwiseRegularizer),this.pointwiseConstraint=Mo(t.pointwiseConstraint)}build(e){if((e=no(e)).length{let t;if(e=to(e),1===this.rank)throw new Fa("1D separable convolution is not implemented yet.");return 2===this.rank&&("channelsFirst"===this.dataFormat&&(e=D.transpose(e,[0,2,3,1])),t=D.separableConv2d(e,this.depthwiseKernel.read(),this.pointwiseKernel.read(),this.strides,this.padding,this.dilationRate,"NHWC")),this.useBias&&(t=Ci(t,this.bias.read(),this.dataFormat)),null!=this.activation&&(t=this.activation.apply(t)),"channelsFirst"===this.dataFormat&&(t=D.transpose(t,[0,3,1,2])),t}))}getConfig(){const e=super.getConfig();return delete e.rank,delete e.kernelInitializer,delete e.kernelRegularizer,delete e.kernelConstraint,e.depthwiseInitializer=Ji(this.depthwiseInitializer),e.pointwiseInitializer=Ji(this.pointwiseInitializer),e.depthwiseRegularizer=ql(this.depthwiseRegularizer),e.pointwiseRegularizer=ql(this.pointwiseRegularizer),e.depthwiseConstraint=Oo(this.depthwiseConstraint),e.pointwiseConstraint=Oo(this.pointwiseConstraint),e}}pu.className="SeparableConv";class mu extends pu{constructor(e){super(2,e)}}mu.className="SeparableConv2D",D.serialization.registerClass(mu);class gu extends uu{constructor(e){super(1,e),gu.verifyArgs(e),this.inputSpec=[{ndim:3}]}getConfig(){const e=super.getConfig();return delete e.rank,delete e.dataFormat,e}static verifyArgs(e){if("number"!==typeof e.kernelSize&&!Va(e.kernelSize,"number",1,1))throw new wa(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(e.kernelSize)}.`)}}gu.className="Conv1D",D.serialization.registerClass(gu);class yu extends po{constructor(e){super(e),"number"===typeof e.cropping?this.cropping=[[e.cropping,e.cropping],[e.cropping,e.cropping]]:"number"===typeof e.cropping[0]?this.cropping=[[e.cropping[0],e.cropping[0]],[e.cropping[1],e.cropping[1]]]:this.cropping=e.cropping,this.dataFormat=void 0===e.dataFormat?"channelsLast":e.dataFormat,this.inputSpec=[{ndim:4}]}computeOutputShape(e){return"channelsFirst"===this.dataFormat?[e[0],e[1],e[2]-this.cropping[0][0]-this.cropping[0][1],e[3]-this.cropping[1][0]-this.cropping[1][1]]:[e[0],e[1]-this.cropping[0][0]-this.cropping[0][1],e[2]-this.cropping[1][0]-this.cropping[1][1],e[3]]}call(e,t){return(0,D.tidy)((()=>{if(e=to(e),"channelsLast"===this.dataFormat){const t=bi(e,this.cropping[0][0],e.shape[1]-this.cropping[0][0]-this.cropping[0][1],2);return bi(t,this.cropping[1][0],e.shape[2]-this.cropping[1][1]-this.cropping[1][0],3)}{const t=bi(e,this.cropping[0][0],e.shape[2]-this.cropping[0][0]-this.cropping[0][1],3);return bi(t,this.cropping[1][0],e.shape[3]-this.cropping[1][1]-this.cropping[1][0],4)}}))}getConfig(){const e={cropping:this.cropping,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}yu.className="Cropping2D",D.serialization.registerClass(yu);class _u extends po{constructor(e){super(e),this.DEFAULT_SIZE=[2,2],this.inputSpec=[{ndim:4}],this.size=null==e.size?this.DEFAULT_SIZE:e.size,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,ei(this.dataFormat),this.interpolation=null==e.interpolation?"nearest":e.interpolation,function(e){ja(Xa,"InterpolationFormat",e)}(this.interpolation)}computeOutputShape(e){if("channelsFirst"===this.dataFormat){const t=null==e[2]?null:this.size[0]*e[2],n=null==e[3]?null:this.size[1]*e[3];return[e[0],e[1],t,n]}{const t=null==e[1]?null:this.size[0]*e[1],n=null==e[2]?null:this.size[1]*e[2];return[e[0],t,n,e[3]]}}call(e,t){return D.tidy((()=>{let t=to(e);const n=t.shape;if("channelsFirst"===this.dataFormat){t=D.transpose(t,[0,2,3,1]);const e=this.size[0]*n[2],r=this.size[1]*n[3],a="nearest"===this.interpolation?D.image.resizeNearestNeighbor(t,[e,r]):D.image.resizeBilinear(t,[e,r]);return D.transpose(a,[0,3,1,2])}{const e=this.size[0]*n[1],r=this.size[1]*n[2];return"nearest"===this.interpolation?D.image.resizeNearestNeighbor(t,[e,r]):D.image.resizeBilinear(t,[e,r])}}))}getConfig(){const e={size:this.size,dataFormat:this.dataFormat,interpolation:this.interpolation},t=super.getConfig();return Object.assign(e,t),e}}_u.className="UpSampling2D",D.serialization.registerClass(_u);class bu extends lu{constructor(e){super(2,e),this.depthwiseKernel=null,this.depthMultiplier=null==e.depthMultiplier?1:e.depthMultiplier,this.depthwiseInitializer=Zi(e.depthwiseInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.depthwiseConstraint=Mo(e.depthwiseConstraint),this.depthwiseRegularizer=Yl(e.depthwiseRegularizer)}build(e){if((e=no(e)).length<4)throw new wa(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(e)}.`);const t="channelsFirst"===this.dataFormat?1:3;if(null==e[t]||e[t]<0)throw new wa(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${e[t]}).`);const n=e[t],r=[this.kernelSize[0],this.kernelSize[1],n,this.depthMultiplier];this.depthwiseKernel=this.addWeight("depthwise_kernel",r,null,this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[n*this.depthMultiplier],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return(0,D.tidy)((()=>{let t=function(e,t,n=[1,1],r="valid",a,i){return(0,D.tidy)((()=>{null==a&&(a="channelsLast"),ei(a);let o=ru(e,a);if(4!==e.rank)throw new wa(`Input for depthwiseConv2d is required to be 4-D, but is instead ${e.rank}-D`);if(4!==t.rank)throw new wa(`depthwiseKernel is required to be 4-D, but is instead ${t.rank}-D`);return o=D.depthwiseConv2d(o,t,n,"same"===r?"same":"valid","NHWC",i),"channelsFirst"===a&&(o=D.transpose(o,[0,3,1,2])),o}))}(e=to(e),this.depthwiseKernel.read(),this.strides,this.padding,this.dataFormat,null);return this.useBias&&(t=Ci(t,this.bias.read(),this.dataFormat)),null!=this.activation&&(t=this.activation.apply(t)),t}))}computeOutputShape(e){e=no(e);const t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2],r="channelsFirst"===this.dataFormat?e[1]*this.depthMultiplier:e[3]*this.depthMultiplier,a=tu(t,this.kernelSize[0],this.padding,this.strides[0]),i=tu(n,this.kernelSize[1],this.padding,this.strides[1]);return"channelsFirst"===this.dataFormat?[e[0],r,a,i]:[e[0],a,i,r]}getConfig(){const e=super.getConfig();return e.depthMultiplier=this.depthMultiplier,e.depthwiseInitializer=Ji(this.depthwiseInitializer),e.depthwiseRegularizer=ql(this.depthwiseRegularizer),e.depthwiseConstraint=Oo(this.depthwiseRegularizer),e}}function vu(e,t,n,r){if(Array.isArray(e)){if(null!=t||null!=n)throw new wa("When inputs is an array, neither initialState or constants should be provided");null!=r&&(n=e.slice(e.length-r,e.length),e=e.slice(0,e.length-r)),e.length>1&&(t=e.slice(1,e.length)),e=e[0]}function a(e){return null==e||Array.isArray(e)?e:[e]}return{inputs:e,initialState:t=a(t),constants:n=a(n)}}function wu(e,t,n,r=!1,a,i,o=!1,s=!1){return D.tidy((()=>{const l=t.shape.length;if(l<3)throw new wa(`Input should be at least 3D, but is ${l}D.`);const u=[1,0].concat(hi(2,l));if(t=D.transpose(t,u),null!=i)throw new Fa("The rnn() functoin of the deeplearn.js backend does not support constants yet.");o&&console.warn("Backend rnn(): the unroll = true option is not applicable to the imperative deeplearn.js backend."),null!=a&&((a=D.cast(D.cast(a,"bool"),"float32")).rank===l-1&&(a=D.expandDims(a,-1)),a=D.transpose(a,u)),r&&(t=D.reverse(t,0),null!=a&&(a=D.reverse(a,0)));const c=[];let d,h=n;const f=t.shape[0],p=D.unstack(t);let m,g;null!=a&&(m=D.unstack(a));for(let t=0;te(n,h)));if(null==a)d=r[0],h=r[1];else{const e=D.tidy((()=>{const e=m[t],n=D.sub(D.onesLike(e),e);return{output:D.add(D.mul(r[0],e),D.mul(h[0],n)),newStates:h.map(((t,a)=>D.add(D.mul(r[1][a],e),D.mul(t,n))))}}));d=e.output,h=e.newStates}s&&c.push(d)}if(s){const e=1;g=D.stack(c,e)}return[d,g,h]}))}bu.className="DepthwiseConv2D",D.serialization.registerClass(bu);class Fu extends po{constructor(e){let t;if(super(e),null==e.cell)throw new wa("cell property is missing for the constructor of RNN.");if(t=Array.isArray(e.cell)?new Du({cells:e.cell}):e.cell,null==t.stateSize)throw new wa("The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).");this.cell=t,this.returnSequences=null!=e.returnSequences&&e.returnSequences,this.returnState=null!=e.returnState&&e.returnState,this.goBackwards=null!=e.goBackwards&&e.goBackwards,this._stateful=null!=e.stateful&&e.stateful,this.unroll=null!=e.unroll&&e.unroll,this.supportsMasking=!0,this.inputSpec=[new lo({ndim:3})],this.stateSpec=null,this.states_=null,this.numConstants=null,this.keptStates=[]}getStates(){if(null==this.states_){return hi(0,Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1).map((e=>null))}return this.states_}setStates(e){this.states_=e}computeOutputShape(e){Qi(e)&&(e=e[0]);let t=this.cell.stateSize;Array.isArray(t)||(t=[t]);const n=t[0];let r;if(r=this.returnSequences?[e[0],e[1],n]:[e[0],n],this.returnState){const n=[];for(const r of t)n.push([e[0],r]);return[r].concat(n)}return r}computeMask(e,t){return D.tidy((()=>{Array.isArray(t)&&(t=t[0]);const e=this.returnSequences?t:null;if(this.returnState){const t=this.states.map((e=>null));return[e].concat(t)}return e}))}get states(){if(null==this.states_){const e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1,t=[];for(let n=0;ne.shape[e.shape.length-1])),a))throw new wa(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is ${this.cell.stateSize}`)}else this.stateSpec=a.map((e=>new lo({shape:[null,e]})));this.stateful&&this.resetStates()}resetStates(e,t=!1){(0,D.tidy)((()=>{if(!this.stateful)throw new ba("Cannot call resetStates() on an RNN Layer that is not stateful.");const n=this.inputSpec[0].shape[0];if(null==n)throw new wa("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.states_)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((e=>D.zeros([n,e]))):this.states_=[D.zeros([n,this.cell.stateSize])];else if(null==e)D.dispose(this.states_),null!=this.keptStates&&(D.dispose(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((e=>D.zeros([n,e]))):this.states_[0]=D.zeros([n,this.cell.stateSize]);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new wa(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);!0===t?this.keptStates.push(this.states_.slice()):D.dispose(this.states_);for(let t=0;tD.keep(e.clone())))}))}apply(e,t){let n=null==t?null:t.initialState,r=null==t?null:t.constants;null==t&&(t={});const a=vu(e,n,r,this.numConstants);e=a.inputs,n=a.initialState,r=a.constants;let i=[],o=[];if(null!=n){t.initialState=n,i=i.concat(n),this.stateSpec=[];for(const e of n)this.stateSpec.push(new lo({shape:e.shape}));o=o.concat(this.stateSpec)}null!=r&&(t.constants=r,i=i.concat(r),this.numConstants=r.length);if(i[0]instanceof uo){const n=[e].concat(i),r=this.inputSpec.concat(o),a=this.inputSpec;this.inputSpec=r;const s=super.apply(n,t);return this.inputSpec=a,s}return super.apply(e,t)}call(e,t){return(0,D.tidy)((()=>{const n=null==t?null:t.mask,r=null==t?null:t.training;let a=null==t?null:t.initialState;e=to(e),null==a&&(a=this.stateful?this.states_:this.getInitialState(e));const i=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;if(a.length!==i)throw new wa(`RNN Layer has ${i} state(s) but was passed ${a.length} initial state(s).`);this.unroll&&console.warn("Ignoring unroll = true for RNN layer, due to imperative backend.");const o={training:r},s=wu(((e,t)=>{const n=this.cell.call([e].concat(t),o);return[n[0],n.slice(1)]}),e,a,this.goBackwards,n,null,this.unroll,this.returnSequences),l=s[0],u=s[1],c=s[2];this.stateful&&this.resetStates(c,r);const d=this.returnSequences?u:l;return this.returnState?[d].concat(c):d}))}getInitialState(e){return(0,D.tidy)((()=>{let t=D.zeros(e.shape);return t=D.sum(t,[1,2]),t=gi(t),Array.isArray(this.cell.stateSize)?this.cell.stateSize.map((e=>e>1?Fi(t,[1,e]):t)):this.cell.stateSize>1?[Fi(t,[1,this.cell.stateSize])]:[t]}))}get trainableWeights(){return this.trainable?this.cell.trainableWeights:[]}get nonTrainableWeights(){return this.trainable?this.cell.nonTrainableWeights:this.cell.weights}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.cell&&this.cell.setFastWeightInitDuringBuild(e)}getConfig(){const e=super.getConfig(),t={returnSequences:this.returnSequences,returnState:this.returnState,goBackwards:this.goBackwards,stateful:this.stateful,unroll:this.unroll};null!=this.numConstants&&(t.numConstants=this.numConstants);const n=this.cell.getConfig();return this.getClassName()===Fu.className&&(t.cell={className:this.cell.getClassName(),config:n}),Object.assign(Object.assign(Object.assign({},n),e),t)}static fromConfig(e,t,n={}){const r=ds(t.cell,n);return new e(Object.assign(t,{cell:r}))}}Fu.className="RNN",D.serialization.registerClass(Fu);class ku extends po{}class xu extends ku{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,za(this.units,"units"),this.activation=Vl(null==e.activation?this.DEFAULT_ACTIVATION:e.activation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=Zi(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Zi(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Zi(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=Yl(e.kernelRegularizer),this.recurrentRegularizer=Yl(e.recurrentRegularizer),this.biasRegularizer=Yl(e.biasRegularizer),this.kernelConstraint=Mo(e.kernelConstraint),this.recurrentConstraint=Mo(e.recurrentConstraint),this.biasConstraint=Mo(e.biasConstraint),this.dropout=ci([1,di([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=ci([1,di([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=no(e),this.kernel=this.addWeight("kernel",[e[e.length-1],this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return(0,D.tidy)((()=>{if(2!==e.length)throw new wa(`SimpleRNNCell expects 2 input Tensors, got ${e.length}.`);let n=e[1];e=e[0];const r=null!=t.training&&t.training;let a;0D.onesLike(e),rate:this.dropout,training:r,dropoutFunc:this.dropoutFunc})),0D.onesLike(n),rate:this.recurrentDropout,training:r,dropoutFunc:this.dropoutFunc}));const i=this.dropoutMask,o=this.recurrentDropoutMask;a=xi(null!=i?D.mul(e,i):e,this.kernel.read()),null!=this.bias&&(a=Ci(a,this.bias.read())),null!=o&&(n=D.mul(n,o));let s=D.add(a,xi(n,this.recurrentKernel.read()));return null!=this.activation&&(s=this.activation.apply(s)),[s,s]}))}getConfig(){const e=super.getConfig(),t={units:this.units,activation:Bl(this.activation),useBias:this.useBias,kernelInitializer:Ji(this.kernelInitializer),recurrentInitializer:Ji(this.recurrentInitializer),biasInitializer:Ji(this.biasInitializer),kernelRegularizer:ql(this.kernelRegularizer),recurrentRegularizer:ql(this.recurrentRegularizer),biasRegularizer:ql(this.biasRegularizer),activityRegularizer:ql(this.activityRegularizer),kernelConstraint:Oo(this.kernelConstraint),recurrentConstraint:Oo(this.recurrentConstraint),biasConstraint:Oo(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout};return Object.assign(Object.assign({},e),t)}}xu.className="SimpleRNNCell",D.serialization.registerClass(xu);class Au extends Fu{constructor(e){e.cell=new xu(e),super(e)}call(e,t){return(0,D.tidy)((()=>{null!=this.cell.dropoutMask&&(D.dispose(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(D.dispose(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==t?null:t.mask,r=null==t?null:t.training,a=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:a})}))}static fromConfig(e,t){return new e(t)}}Au.className="SimpleRNN",D.serialization.registerClass(Au);class Su extends ku{constructor(e){if(super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.resetAfter)throw new wa("GRUCell does not support reset_after parameter set to true.");this.units=e.units,za(this.units,"units"),this.activation=Vl(void 0===e.activation?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=Vl(void 0===e.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=Zi(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Zi(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Zi(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=Yl(e.kernelRegularizer),this.recurrentRegularizer=Yl(e.recurrentRegularizer),this.biasRegularizer=Yl(e.biasRegularizer),this.kernelConstraint=Mo(e.kernelConstraint),this.recurrentConstraint=Mo(e.recurrentConstraint),this.biasConstraint=Mo(e.biasConstraint),this.dropout=ci([1,di([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=ci([1,di([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){const t=(e=no(e))[e.length-1];this.kernel=this.addWeight("kernel",[t,3*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,3*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[3*this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return(0,D.tidy)((()=>{if(2!==e.length)throw new wa(`GRUCell expects 2 input Tensors (inputs, h, c), got ${e.length}.`);const n=null!=t.training&&t.training;let r=e[1];e=e[0],0D.onesLike(e),rate:this.dropout,training:n,count:3,dropoutFunc:this.dropoutFunc})),0D.onesLike(r),rate:this.recurrentDropout,training:n,count:3,dropoutFunc:this.dropoutFunc}));const a=this.dropoutMask,i=this.recurrentDropoutMask;let o,s,l;0{null!=this.cell.dropoutMask&&(D.dispose(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(D.dispose(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==t?null:t.mask,r=null==t?null:t.training,a=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:a})}))}static fromConfig(e,t){return 0===t.implmentation&&(t.implementation=1),new e(t)}}Eu.className="GRU",D.serialization.registerClass(Eu);class Cu extends ku{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,za(this.units,"units"),this.activation=Vl(void 0===e.activation?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=Vl(void 0===e.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=Zi(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=Zi(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=Zi(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.unitForgetBias=e.unitForgetBias,this.kernelRegularizer=Yl(e.kernelRegularizer),this.recurrentRegularizer=Yl(e.recurrentRegularizer),this.biasRegularizer=Yl(e.biasRegularizer),this.kernelConstraint=Mo(e.kernelConstraint),this.recurrentConstraint=Mo(e.recurrentConstraint),this.biasConstraint=Mo(e.biasConstraint),this.dropout=ci([1,di([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=ci([1,di([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=[this.units,this.units],this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){var t;const n=(e=no(e))[e.length-1];let r;if(this.kernel=this.addWeight("kernel",[n,4*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,4*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){if(this.unitForgetBias){const e=this.biasInitializer,n=this.units;r=new((t=class extends Pi{apply(t,r){const a=e.apply([n]),i=(new Ri).apply([n]),o=e.apply([2*n]);return wi(wi(a,i),o)}}).className="CustomInit",t)}else r=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.units],null,r,this.biasRegularizer,!0,this.biasConstraint)}else this.bias=null;this.built=!0}call(e,t){return(0,D.tidy)((()=>{const n=null!=t.training&&t.training;if(3!==e.length)throw new wa(`LSTMCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);let r=e[1];const a=e[2];e=e[0],0D.onesLike(e),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),0D.onesLike(r),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const i=this.dropoutMask,o=this.recurrentDropoutMask;let s,l,u,c;0{null!=this.cell.dropoutMask&&(D.dispose(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(D.dispose(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);const n=null==t?null:t.mask,r=null==t?null:t.training,a=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:a})}))}static fromConfig(e,t){return 0===t.implmentation&&(t.implementation=1),new e(t)}}Tu.className="LSTM",D.serialization.registerClass(Tu);class Du extends ku{constructor(e){super(e),this.cells=e.cells}get stateSize(){const e=[];for(const t of this.cells.slice().reverse())Array.isArray(t.stateSize)?e.push(...t.stateSize):e.push(t.stateSize);return e}call(e,t){return(0,D.tidy)((()=>{let n=e.slice(1);const r=[];for(const e of this.cells.slice().reverse())Array.isArray(e.stateSize)?r.push(n.splice(0,e.stateSize.length)):r.push(n.splice(0,1));r.reverse();const a=[];let i;for(let o=0;o{ai(`RNNCell_${r}`,(()=>{n.build(e),t=Array.isArray(n.stateSize)?n.stateSize[0]:n.stateSize,e=[e[0],t]}))})),this.built=!0}getConfig(){const e=super.getConfig(),t={cells:this.cells.map((e=>({className:e.getClassName(),config:e.getConfig()})))};return Object.assign(Object.assign({},e),t)}static fromConfig(e,t,n={}){const r=[];for(const a of t.cells)r.push(ds(a,n));return new e({cells:r})}get trainableWeights(){if(!this.trainable)return[];const e=[];for(const t of this.cells)e.push(...t.trainableWeights);return e}get nonTrainableWeights(){const e=[];for(const t of this.cells)e.push(...t.nonTrainableWeights);if(!this.trainable){const t=[];for(const e of this.cells)t.push(...e.trainableWeights);return t.concat(e)}return e}getWeights(){const e=[];for(const t of this.cells)e.push(...t.weights);return oo(e)}setWeights(e){const t=[];for(const n of this.cells){const r=n.weights.length,a=e.splice(r);for(let e=0;enull!=i?i(t(),n):Ti(t(),n),s=()=>Di(o,t,r);if(!a||a<=1)return D.keep(s().clone());return Array(a).fill(void 0).map(s).map((e=>D.keep(e.clone())))}Du.className="StackedRNNCells",D.serialization.registerClass(Du);var Ou=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a{if(null!=this.cell.dropoutMask&&(D.dispose(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(D.dispose(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null),t&&t.constants)throw new wa("ConvRNN2D cell does not support constants");const n=null==t?null:t.mask,r=null==t?null:t.training,a=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:a})}))}computeOutputShape(e){let t=this.computeSingleOutputShape(e);return this.returnSequences||(t=[t[0],...t.slice(2)]),this.returnState&&(t=[t,...Array(2).fill([e[0],...t.slice(-3)])]),t}getInitialState(e){return D.tidy((()=>{const{stateSize:t}=this.cell,n=e.shape,r=this.computeSingleOutputShape(n),a=[r[0],...r.slice(2)],i=D.zeros(a);return Array.isArray(t)?Array(t.length).fill(i):[i]}))}resetStates(e,t=!1){D.tidy((()=>{if(!this.stateful)throw new ba("Cannot call resetStates() on an RNN Layer that is not stateful.");const n=this.inputSpec[0].shape,r=this.computeSingleOutputShape(n),a=[r[0],...r.slice(2)];if(null==n[0])throw new wa("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.getStates())Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((()=>D.zeros(a))):this.states_=[D.zeros(a)];else if(null==e)D.dispose(this.states_),null!=this.keptStates&&(D.dispose(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map((()=>D.zeros(a))):this.states_[0]=D.zeros(a);else{if(Array.isArray(e)||(e=[e]),e.length!==this.states_.length)throw new wa(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: ${e}`);t?this.keptStates.push(this.states_.slice()):D.dispose(this.states_);for(let t=0;tD.keep(e.clone())))}))}computeSingleOutputShape(e){const{dataFormat:t,filters:n,kernelSize:r,padding:a,strides:i,dilationRate:o}=this.cell,s="channelsFirst"===t,l=e[s?3:2],u=e[s?4:3],c=tu(l,r[0],a,i[0],o[0]),d=tu(u,r[1],a,i[1],o[1]);return[...e.slice(0,2),...s?[n,c,d]:[c,d,n]]}}Pu.className="ConvRNN2D";class Mu extends Cu{constructor(e){const{filters:t,kernelSize:n,strides:r,padding:a,dataFormat:i,dilationRate:o}=e;super(Object.assign(Object.assign({},e),{units:t})),this.filters=t,za(this.filters,"filters"),this.kernelSize=eu(n,2,"kernelSize"),this.kernelSize.forEach((e=>za(e,"kernelSize"))),this.strides=eu(r||1,2,"strides"),this.strides.forEach((e=>za(e,"strides"))),this.padding=a||"valid",ti(this.padding),this.dataFormat=i||"channelsLast",ei(this.dataFormat),this.dilationRate=eu(o||1,2,"dilationRate"),this.dilationRate.forEach((e=>za(e,"dilationRate")))}build(e){var t;e=no(e);const n="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[n])throw new wa(`The channel dimension of the input should be defined. Found ${e[n]}`);const r=e[n],a=this.kernelSize.concat([r,4*this.filters]);this.kernel=this.addWeight("kernel",a,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint);const i=this.kernelSize.concat([this.filters,4*this.filters]);if(this.recurrentKernel=this.addWeight("recurrent_kernel",i,null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){let e;if(this.unitForgetBias){const n=this.biasInitializer,r=this.filters;e=new((t=class extends Pi{apply(e,t){return vi([n.apply([r]),D.ones([r]),n.apply([2*r])])}}).className="CustomInit",t)}else e=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.filters],null,e,this.biasRegularizer,!0,this.biasConstraint)}this.built=!0}call(e,t){return D.tidy((()=>{if(3!==e.length)throw new wa(`ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got ${e.length}.`);const n=t.training||!1,r=e[0],a=e[1],i=e[2];0D.onesLike(r),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const o=this.dropoutMask,s=(e,t,n)=>t&&t[n]?D.mul(t[n],e):e;let l=s(r,o,0),u=s(r,o,1),c=s(r,o,2),d=s(r,o,3);0D.onesLike(a),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc}));const h=this.recurrentDropoutMask;let f=s(a,h,0),p=s(a,h,1),m=s(a,h,2),g=s(a,h,3);const[y,_,b,v]=D.split(this.kernel.read(),4,3),[w,F,k,x]=this.useBias?D.split(this.bias.read(),4):[null,null,null,null];l=this.inputConv(l,y,w,this.padding),u=this.inputConv(u,_,F,this.padding),c=this.inputConv(c,b,k,this.padding),d=this.inputConv(d,v,x,this.padding);const[A,S,E,C]=D.split(this.recurrentKernel.read(),4,3);f=this.recurrentConv(f,A),p=this.recurrentConv(p,S),m=this.recurrentConv(m,E),g=this.recurrentConv(g,C);const T=this.recurrentActivation.apply(D.add(l,f)),I=this.recurrentActivation.apply(D.add(u,p)),O=D.add(D.mul(I,i),D.mul(T,this.activation.apply(D.add(c,m)))),P=D.mul(this.recurrentActivation.apply(D.add(d,g)),this.activation.apply(O));return[P,P,O]}))}getConfig(){const e=super.getConfig(),{units:t}=e,n=Ou(e,["units"]),r={filters:this.filters,kernelSize:this.kernelSize,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,strides:this.strides};return Object.assign(Object.assign({},n),r)}inputConv(e,t,n,r){const a=D.conv2d(e,t,this.strides,r||"valid","channelsFirst"===this.dataFormat?"NCHW":"NHWC",this.dilationRate);return n?Ci(a,n,this.dataFormat):a}recurrentConv(e,t){return D.conv2d(e,t,1,"same","channelsFirst"===this.dataFormat?"NCHW":"NHWC")}}Mu.className="ConvLSTM2DCell",D.serialization.registerClass(Mu);class Ru extends Pu{constructor(e){const t=new Mu(e);super(Object.assign(Object.assign({},e),{cell:t}))}static fromConfig(e,t){return new e(t)}}Ru.className="ConvLSTM2D",D.serialization.registerClass(Ru);class Lu extends po{constructor(e){super(e),this.rate=Math.max(Math.min(e.rate,1),0),this.noiseShape=e.noiseShape,this.seed=e.seed,this.supportsMasking=!0}getNoiseShape(e){if(null==this.noiseShape)return this.noiseShape;const t=e.shape,n=[];for(let r=0;r{this.invokeCallHook(e,t);const n=to(e);if(0Ti(n,this.rate,r,this.seed)),(()=>n),e)}return e}))}getConfig(){const e={rate:this.rate,noiseShape:this.noiseShape,seed:this.seed},t=super.getConfig();return Object.assign(e,t),e}dispose(){return super.dispose()}}Lu.className="Dropout",D.serialization.registerClass(Lu);class Nu extends Lu{constructor(e){super(e),this.inputSpec=[{ndim:3}]}getNoiseShape(e){const t=e.shape;return[t[0],1,t[2]]}}Nu.className="SpatialDropout1D",D.serialization.registerClass(Nu);class Bu extends po{constructor(e){if(super(e),this.activation=null,this.useBias=!0,this.kernel=null,this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",null==e.batchInputShape&&null==e.inputShape&&null!=e.inputDim){let t=null;null!=e.batchSize&&(t=e.batchSize),this.batchInputShape=[t,e.inputDim]}this.units=e.units,za(this.units,"units"),this.activation=Vl(e.activation),null!=e.useBias&&(this.useBias=e.useBias),this.kernelInitializer=Zi(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.biasInitializer=Zi(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelConstraint=Mo(e.kernelConstraint),this.biasConstraint=Mo(e.biasConstraint),this.kernelRegularizer=Yl(e.kernelRegularizer),this.biasRegularizer=Yl(e.biasRegularizer),this.activityRegularizer=Yl(e.activityRegularizer),this.supportsMasking=!0,this.inputSpec=[{minNDim:2}]}build(e){const t=(e=no(e))[e.length-1];null==this.kernel&&(this.kernel=this.addWeight("kernel",[t,this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint))),this.inputSpec=[{minNDim:2,axes:{[-1]:t}}],this.built=!0}computeOutputShape(e){const t=(e=no(e)).slice();return t[t.length-1]=this.units,t}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t);const n=to(e),r=Ua(this.activation.getClassName());let a;return null!=r?a=xi(n,this.kernel.read(),r,this.bias?this.bias.read():null):(a=xi(n,this.kernel.read()),null!=this.bias&&(a=Ci(a,this.bias.read())),null!=this.activation&&(a=this.activation.apply(a))),a}))}getConfig(){const e={units:this.units,activation:Bl(this.activation),useBias:this.useBias,kernelInitializer:Ji(this.kernelInitializer),biasInitializer:Ji(this.biasInitializer),kernelRegularizer:ql(this.kernelRegularizer),biasRegularizer:ql(this.biasRegularizer),activityRegularizer:ql(this.activityRegularizer),kernelConstraint:Oo(this.kernelConstraint),biasConstraint:Oo(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}}Bu.className="Dense",D.serialization.registerClass(Bu);class ju extends po{constructor(e){super(e=e||{}),this.inputSpec=[{minNDim:3}],this.dataFormat=e.dataFormat}computeOutputShape(e){e=no(e);for(const t of e.slice(1))if(null==t)throw new wa(`The shape of the input to "Flatten" is not fully defined (got ${e.slice(1)}). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.`);return[e[0],ui(e,1)]}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t);let n=to(e);if("channelsFirst"===this.dataFormat&&n.rank>1){const e=[0];for(let t=2;t{this.invokeCallHook(e,t);const n=to(e);return this.activation.apply(n)}))}getConfig(){const e={activation:Bl(this.activation)},t=super.getConfig();return Object.assign(e,t),e}}Vu.className="Activation",D.serialization.registerClass(Vu);class zu extends po{constructor(e){super(e),this.n=e.n,this.inputSpec=[{ndim:2}]}computeOutputShape(e){return[e[0],this.n,e[1]]}call(e,t){return(0,D.tidy)((()=>{return e=to(e),t=e,n=this.n,(0,D.tidy)((()=>{if(2!==t.shape.length)throw new wa(`repeat() expects a rank-2 tensor, but received a rank-${t.shape.length} tensor.`);return Fi(gi(t,1),[1,n,1])}));var t,n}))}getConfig(){const e={n:this.n},t=super.getConfig();return Object.assign(e,t),e}}zu.className="RepeatVector",D.serialization.registerClass(zu);class Hu extends po{constructor(e){super(e),this.targetShape=e.targetShape;for(let t=0;t{this.invokeCallHook(e,t);const n=to(e),r=n.shape,a=r.slice(0,1).concat(this.fixUnknownDimension(r.slice(1),this.targetShape));return(0,D.reshape)(n,a)}))}getConfig(){const e={targetShape:this.targetShape},t=super.getConfig();return Object.assign(e,t),e}}Hu.className="Reshape",D.serialization.registerClass(Hu);class Uu extends po{constructor(e){if(super(e),null==e.dims)throw new Error("Required configuration field `dims` is missing during Permute constructor call.");if(!Array.isArray(e.dims))throw new Error(`Permute constructor requires \`dims\` to be an Array, but received ${e.dims} instead.`);const t=hi(1,e.dims.length+1);if(!D.util.arraysEqual(e.dims.slice().sort(),t))throw new Error("Invalid permutation `dims`: "+JSON.stringify(e.dims)+" `dims` must contain consecutive integers starting from 1.");this.dims=e.dims,this.dimsIncludingBatch=[0].concat(this.dims),this.inputSpec=[new lo({ndim:this.dims.length+1})]}computeOutputShape(e){const t=(e=no(e)).slice();return this.dims.forEach(((n,r)=>{t[r+1]=e[n]})),t}call(e,t){return(0,D.transpose)(to(e),this.dimsIncludingBatch)}getConfig(){const e={dims:this.dims},t=super.getConfig();return Object.assign(e,t),e}}Uu.className="Permute",D.serialization.registerClass(Uu);class Wu extends po{constructor(e){super(null==e?{}:e),this.supportsMasking=!0,this.maskValue=null!=e?null==e.maskValue?0:e.maskValue:0}computeOutputShape(e){return e}getConfig(){const e=super.getConfig(),t={maskValue:this.maskValue};return Object.assign(t,e),t}computeMask(e,t){const n=to(e);return(0,D.any)((0,D.notEqual)(n,this.maskValue),-1)}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t);const n=to(e),r=(0,D.any)((0,D.notEqual)(n,this.maskValue),-1,!0);return(0,D.mul)(n,(0,D.cast)(r,n.dtype))}))}}Wu.className="Masking",D.serialization.registerClass(Wu);class qu extends po{constructor(e){if(super(e),this.embeddings=null,this.DEFAULT_EMBEDDINGS_INITIALIZER="randomUniform",null==e.batchInputShape&&null==e.inputShape){let t=null;null!=e.batchSize&&(t=e.batchSize),null==e.inputLength?this.batchInputShape=[t,null]:this.batchInputShape=[t].concat(Ta(e.inputLength))}this.inputDim=e.inputDim,za(this.inputDim,"inputDim"),this.outputDim=e.outputDim,za(this.outputDim,"outputDim"),this.embeddingsInitializer=Zi(e.embeddingsInitializer||this.DEFAULT_EMBEDDINGS_INITIALIZER),this.embeddingsRegularizer=Yl(e.embeddingsRegularizer),this.activityRegularizer=Yl(e.activityRegularizer),this.embeddingsConstraint=Mo(e.embeddingsConstraint),this.maskZero=e.maskZero,this.supportsMasking=e.maskZero,this.inputLength=e.inputLength}build(e){this.embeddings=this.addWeight("embeddings",[this.inputDim,this.outputDim],this.dtype,this.embeddingsInitializer,this.embeddingsRegularizer,!0,this.embeddingsConstraint),this.built=!0}warnOnIncompatibleInputShape(e){}computeMask(e,t){return(0,D.tidy)((()=>this.maskZero?(e=to(e),(0,D.notEqual)(e,(0,D.zerosLike)(e))):null))}computeOutputShape(e){if(e=no(e),null==this.inputLength)return[...e,this.outputDim];const t=Ta(this.inputLength);if(t.length!==e.length-1)throw new wa(`"inputLength" is ${this.inputLength}, but received input shape has shape ${e}`);{let n=0;for(let r=0;r{this.invokeCallHook(e,t);let n=to(e);"int32"!==n.dtype&&(n=mi(n,"int32"));const r=Ai(this.embeddings.read(),(0,D.reshape)(n,[n.size]));return(0,D.reshape)(r,no(this.computeOutputShape(n.shape)))}))}getConfig(){const e={inputDim:this.inputDim,outputDim:this.outputDim,embeddingsInitializer:Ji(this.embeddingsInitializer),embeddingsRegularizer:ql(this.embeddingsRegularizer),activityRegularizer:ql(this.activityRegularizer),embeddingsConstraint:Oo(this.embeddingsConstraint),maskZero:this.maskZero,inputLength:this.inputLength},t=super.getConfig();return Object.assign(e,t),e}}qu.className="Embedding",D.serialization.registerClass(qu);class $u extends po{constructor(e){super(e||{}),this.supportsMasking=!0}mergeFunction(e){throw new Fa}computeElementwiseOpOutputShape(e,t){if(null==e||null==t)return null;if(e.length1)throw new wa(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(e)}.`);let n=null==e[0]?null:e[0].slice(1);for(let a=1;ae.length));-1===e.indexOf(null)&&1===Na(r).length?this.reshapeRequired=!1:this.reshapeRequired=!0}call(e,t){return(0,D.tidy)((()=>{if(this.reshapeRequired){const t=[],n=e.map((e=>e.rank));if(-1===n.indexOf(null)){const r=di(n);for(let n of e){const e=n.rank;for(let t=0;t1){const r=hi(1,e).concat([0]);t.push(D.transpose(i,r)),n=!0}else t.push(i)}let r=this.mergeFunction(t);const a=r.rank;if(n)if(null==a){const e=r.shape,t=e[e.length-1],n=[t].concat(e.slice(0,e.length-1));r=D.reshape(D.transpose(D.reshape(r,[-1,t]),[1,0]),n)}else if(a>1){const e=[a-1].concat(hi(0,a-1));r=D.transpose(r,e)}return r}}return this.mergeFunction(e)}))}computeOutputShape(e){let t;t=null==e[0]?null:e[0].slice(1);for(let r=1;r{if(null==t)return null;if(!Array.isArray(t))throw new wa("`mask` should be an Array");if(!Array.isArray(e))throw new wa("`inputs` should be an Array");if(t.length!==e.length)throw new wa(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${e.length} vs ${t.length})`);if(t.every((e=>null==e)))return null;let n=(t=t.map((e=>null==e?e:D.expandDims(e,0))))[0];for(let e=1;e{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0].clone();for(let n=1;n{let t=e[0];for(let n=1;n{let t=e[0];for(let n=1;n1)throw new wa("A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: "+JSON.stringify(e))}mergeFunction(e){return(0,D.tidy)((()=>vi(e,this.axis)))}computeOutputShape(e){if(!Array.isArray(e)||!Array.isArray(e[0]))throw new wa("A `Concatenate` layer should be called on a list of inputs.");const t=e,n=t[0].slice(),r=this.axis<0?n.length+this.axis:this.axis;for(const a of t.slice(1)){if(null==n[r]||null==a[r]){n[r]=null;break}n[r]+=a[r]}return n}computeMask(e,t){if(null==t)return null;if(!Array.isArray(t))throw new wa("`mask` should be an array for Concatenate");if(!Array.isArray(e))throw new wa("`inputs` should be an array for Concatenate");if(t.length!==e.length)throw new wa(`Mismatch in the length of mask (${t.length}) and the legnth of inputs (${e.length})`);return D.tidy((()=>{let n=!0;if(t.forEach((e=>{null==e||(n=!1)})),n)return null;const r=[];for(let i=0;i"A `Dot` layer should be called on a list of exactly 2 inputs."));const t=e[0],n=e[1];if(t.length>3||n.length>3)throw new Fa("Dot layer does not support tensors of 4D or higher rank yet.");const r=this.interpretAxes(t,n);if(t[r[0]]!==n[r[1]])throw new wa(`Dimension incompatibility: ${t[r[0]]} !== ${n[r[1]]}`)}mergeFunction(e){if(2!==e.length)throw new wa(`A \`Dot\` layer must be called on exactly 2 inputs, but received ${e.length} input(s).`);let t,n=e[0],r=e[1];return t=Array.isArray(this.axes)?this.axes.map(((t,n)=>Qu(t,e[n].shape.length))):[Qu(this.axes,n.shape.length),Qu(this.axes,r.shape.length)],this.normalize&&(n=hs(n,t[0]),r=hs(r,t[1])),function(e,t,n){if(e.shape.length>3||t.shape.length>3)throw new Fa("batchDot is not implemented for tensors of 4D or higher rank yet");if(D.util.assert(e.shape.length>=2,(()=>`batchDot requires the rank of x to be >= 2, but got ${e.shape.length}`)),D.util.assert(e.shape.length>=2,(()=>`batchDot requires the rank of y to be >= 2, but got ${t.shape.length}`)),"number"===typeof n&&(n=[n,n]),"complex64"===e.dtype||"complex64"===t.dtype)throw new Fa("batchDot is not implemented for complex64-type Tensors yet.");const r=e.shape.length,a=t.shape.length;null==n&&(n=[r-1,a-2]);const i=n;return D.tidy((()=>{let n,o;if(r>a){n=r-a;const e=[];for(let t=0;tr){n=a-r;const t=[];for(let e=0;e0){let e;e=r>a?r+a-3:r-1;const t=[];for(let r=e;r"A `Dot` layer should be called on a list of exactly 2 inputs."));const t=e[0].slice(),n=e[1].slice();if(t.length>3||n.length>3)throw new Fa("Dot layer does not support tensors of 4D or higher rank yet.");const r=this.interpretAxes(t,n);t.splice(r[0],1),n.splice(r[1],1),n.splice(0,1);const a=t.concat(n);return 1===a.length&&a.push(1),a}computeMask(e,t){return null}getConfig(){const e={axes:this.axes,normalize:this.normalize},t=super.getConfig();return Object.assign(e,t),e}}ec.className="Dot",D.serialization.registerClass(ec);class tc extends po{constructor(e){super(e),this.supportsMasking=!0,this.stddev=e.stddev}computeOutputShape(e){return e}getConfig(){const e=super.getConfig(),t={stddev:this.stddev};return Object.assign(t,e),t}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t);const n=to(e);return Di((()=>(0,D.add)(ki(n.shape,0,this.stddev),n)),(()=>n),t.training||!1)}))}}tc.className="GaussianNoise",D.serialization.registerClass(tc);class nc extends po{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate}computeOutputShape(e){return e}getConfig(){const e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t);const n=to(e);if(this.rate>0&&this.rate<1){return Di((()=>{const e=Math.sqrt(this.rate/(1-this.rate));return(0,D.mul)(n,ki(n.shape,1,e))}),(()=>n),t.training||!1)}return n}))}}nc.className="GaussianDropout",D.serialization.registerClass(nc);class rc extends po{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate,this.noiseShape=e.noiseShape}_getNoiseShape(e){return this.noiseShape||to(e).shape}computeOutputShape(e){return e}getConfig(){const e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return(0,D.tidy)((()=>{if(this.rate<1&&this.rate>0){const n=this._getNoiseShape(e),r=()=>{const t=to(e),r=-1.7580993408473766;let a=(0,D.greaterEqual)((0,D.randomUniform)(n),this.rate);a=mi(a,"float32");const i=((1-this.rate)*(1+this.rate*r**2))**-.5,o=-i*r*this.rate,s=(0,D.add)((0,D.mul)(t,a),(0,D.mul)((0,D.add)(a,-1),r));return(0,D.add)((0,D.mul)(s,i),o)};return Di(r,(()=>to(e)),t.training||!1)}return e}))}}function ac(e,t,n,r,a,i=.001){let o;if(2===e.rank)o=D.batchNorm2d(e,t,n,r,a,i);else if(3===e.rank)o=D.batchNorm3d(e,t,n,r,a,i);else{if(4!==e.rank)throw new Fa(`batchNormalization is not implemented for array of rank ${e.rank} yet`);o=D.batchNorm4d(e,t,n,r,a,i)}return o}function ic(e,t,n,r,a=.001){return D.util.arraysEqual(r.slice().sort(),hi(0,e.rank-1))?function(e,t,n,r,a=.001){return(0,D.tidy)((()=>{const i=D.moments(e,r),o=i.mean,s=i.variance;return[ac(e,o,s,n,t,a),o,s]}))}(e,t,n,r,a):function(e,t,n,r,a=.001){return(0,D.tidy)((()=>{const i=D.moments(e,r),o=i.mean,s=i.variance,l=[];for(const t of hi(0,e.rank))-1!==r.indexOf(t)?l.push(1):l.push(e.shape[t]);const u=(0,D.reshape)(o,l),c=(0,D.reshape)(s,l),d=null==t?null:(0,D.reshape)(t,l),h=null==n?null:(0,D.reshape)(n,l);return[ac(e,u,c,h,d,a),o,s]}))}(e,t,n,r,a)}rc.className="AlphaDropout",D.serialization.registerClass(rc);class oc extends po{constructor(e){null==e&&(e={}),super(e),this.supportsMasking=!0,this.axis=null==e.axis?-1:e.axis,this.momentum=null==e.momentum?.99:e.momentum,this.epsilon=null==e.epsilon?.001:e.epsilon,this.center=null==e.center||e.center,this.scale=null==e.scale||e.scale,this.betaInitializer=Zi(e.betaInitializer||"zeros"),this.gammaInitializer=Zi(e.gammaInitializer||"ones"),this.movingMeanInitializer=Zi(e.movingMeanInitializer||"zeros"),this.movingVarianceInitializer=Zi(e.movingVarianceInitializer||"ones"),this.betaConstraint=Mo(e.betaConstraint),this.gammaConstraint=Mo(e.gammaConstraint),this.betaRegularizer=Yl(e.betaRegularizer),this.gammaRegularizer=Yl(e.gammaRegularizer)}build(e){e=no(e);const t=this.axis>=0?this.axis:this.axis+e.length,n=e[t];if(null==n)throw new wa(`Axis ${t} of input tensor should have a defined dimension but the layer received an input with shape ${JSON.stringify(e)}.`);this.inputSpec=[new lo({ndim:e.length,axes:{[t]:n}})];const r=[n];this.scale&&(this.gamma=this.addWeight("gamma",r,null,this.gammaInitializer,this.gammaRegularizer,!0,this.gammaConstraint)),this.center&&(this.beta=this.addWeight("beta",r,null,this.betaInitializer,this.betaRegularizer,!0,this.betaConstraint)),this.movingMean=this.addWeight("moving_mean",r,null,this.movingMeanInitializer,null,!1),this.movingVariance=this.addWeight("moving_variance",r,null,this.movingVarianceInitializer,null,!1),this.built=!0}call(e,t){return(0,D.tidy)((()=>{const n=null!=t.training&&t.training,r=to(e),a=r.shape,i=a.length,o=hi(0,i),s=this.axis>=0?this.axis:this.axis+i;o.splice(s,1);const l=Aa(1,i);l[s]=a[s];const u=o.slice();u.sort();const c=!D.util.arraysEqual(u,hi(0,i).slice(0,i-1));if(!n)return(()=>{if(c){const e=(0,D.reshape)(this.movingMean.read(),l),t=(0,D.reshape)(this.movingVariance.read(),l),n=this.center?(0,D.reshape)(this.beta.read(),l):null,a=this.scale?(0,D.reshape)(this.gamma.read(),l):null;return ac(r,e,t,n,a,this.epsilon)}return ac(r,this.movingMean.read(),this.movingVariance.read(),null==this.beta?null:this.beta.read(),null==this.gamma?null:this.gamma.read(),this.epsilon)})();const[d,h,f]=ic(r,this.gamma.read(),this.beta.read(),o,this.epsilon),p=(e,t,n)=>{D.tidy((()=>{const r=1-n,a=e.read(),i=D.mul(D.sub(a,t),r);e.write(D.sub(a,i))}))};return(()=>{p(this.movingMean,h,this.momentum),p(this.movingVariance,f,this.momentum)})(),d}))}getConfig(){const e={axis:this.axis,momentum:this.momentum,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:Ji(this.betaInitializer),gammaInitializer:Ji(this.gammaInitializer),movingMeanInitializer:Ji(this.movingMeanInitializer),movingVarianceInitializer:Ji(this.movingVarianceInitializer),betaRegularizer:ql(this.betaRegularizer),gammaRegularizer:ql(this.gammaRegularizer),betaConstraint:Oo(this.betaConstraint),gammaConstraint:Oo(this.gammaConstraint)},t=super.getConfig();return Object.assign(e,t),e}}oc.className="BatchNormalization",D.serialization.registerClass(oc);class sc extends po{constructor(e){if(null==e&&(e={}),super(e),this.axis=null==e.axis?-1:e.axis,"number"===typeof this.axis){if(!Number.isInteger(this.axis))throw new Error(`Expected axis to be an integer, but received ${this.axis}`)}else{if(!Array.isArray(this.axis))throw new Error(`Expected axis to be an integer or an array of integers, but received ${JSON.stringify(this.axis)}`);for(const e of this.axis)if(!Number.isInteger(e))throw new Error(`Expected axis to be an array of integers, but received ${JSON.stringify(this.axis)}`)}this.epsilon=null==e.epsilon?.001:e.epsilon,this.center=null==e.center||e.center,this.scale=null==e.scale||e.scale,this.betaInitializer=Zi(e.betaInitializer||"zeros"),this.gammaInitializer=Zi(e.gammaInitializer||"ones"),this.betaRegularizer=Yl(e.betaRegularizer),this.gammaRegularizer=Yl(e.gammaRegularizer),this.supportsMasking=!0}build(e){const t=(e=no(e)).length;"number"===typeof this.axis&&(this.axis=[this.axis]);for(let a=0;a=t)throw new Error(`Invalid axis: ${a}`);if(this.axis.length!==Na(this.axis).length)throw new Error(`Found duplicate axes in: ${this.axis}`);const n=this.axis.map((t=>e[t])),r=!0;this.scale?this.gamma=this.addWeight("gamma",n,"float32",this.gammaInitializer,this.gammaRegularizer,r):this.gamma=null,this.center?this.beta=this.addWeight("beta",n,"float32",this.betaInitializer,this.betaRegularizer,r):this.beta=null,this.built=!0}call(e,t){const n=to(e),r=n.shape,a=r.length;return(0,D.tidy)((()=>{let{mean:e,variance:t}=(0,D.moments)(n,this.axis,!0);const i=Aa(1,a);for(const n of this.axis)i[n]=r[n];const o=e=>null!=e&&e.shape.length!==a?D.reshape(e,i):e;let s=this.scale?o(this.gamma.read()):null,l=this.center?o(this.beta.read()):null;const u=[],c=[];for(let n=0;n=0?e[2]+this.padding[0][0]+this.padding[0][1]:null,n=null!=e[3]&&e[3]>=0?e[3]+this.padding[1][0]+this.padding[1][1]:null,[e[0],e[1],t,n]):(t=null!=e[1]&&e[1]>=0?e[1]+this.padding[0][0]+this.padding[0][1]:null,n=null!=e[2]&&e[2]>=0?e[2]+this.padding[1][0]+this.padding[1][1]:null,[e[0],t,n,e[3]])}call(e,t){return(0,D.tidy)((()=>{return t=to(e),n=this.padding,r=this.dataFormat,(0,D.tidy)((()=>{if(4!==t.rank)throw new wa(`temporalPadding expects input tensor to be 4-D, but received a ${t.rank}-D tensor.`);if(null==n&&(n=[[1,1],[1,1]]),2!==n.length||2!==n[0].length||2!==n[1].length)throw new wa("spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.");if(null==r&&(r="channelsLast"),"channelsLast"!==r&&"channelsFirst"!==r)throw new wa(`Unknown data format: ${r}. Supported data formats are 'channelsLast' and 'channelsFirst.`);let e;return e="channelsFirst"===r?[[0,0],[0,0],n[0],n[1]]:[[0,0],n[0],n[1],[0,0]],D.pad(t,e)}));var t,n,r}))}getConfig(){const e={padding:this.padding,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}function uc(e,t,n,r,a,i){return(0,D.tidy)((()=>{let o;ei(a),ni(i),ti(r),null==n&&(n=[1,1]),null==r&&(r="valid"),null==a&&(a="channelsLast"),null==i&&(i="max"),e=ru(e,a);const s="same"===r?"same":"valid";return o="max"===i?D.maxPool(e,t,n,s):D.avgPool(e,t,n,s),"channelsFirst"===a&&(o=D.transpose(o,[0,3,1,2])),o}))}function cc(e,t,n,r,a,i){return(0,D.tidy)((()=>{let o;ei(a),ni(i),ti(r),null==n&&(n=[1,1,1]),null==r&&(r="valid"),null==a&&(a="channelsLast"),null==i&&(i="max"),e=au(e,a);const s="same"===r?"same":"valid";return o="max"===i?D.maxPool3d(e,t,n,s):D.avgPool3d(e,t,n,s),"channelsFirst"===a&&(o=D.transpose(o,[0,4,1,2,3])),o}))}lc.className="ZeroPadding2D",D.serialization.registerClass(lc);class dc extends po{constructor(e){if(null==e.poolSize&&(e.poolSize=2),super(e),"number"===typeof e.poolSize)this.poolSize=[e.poolSize];else{if(!Array.isArray(e.poolSize)||1!==e.poolSize.length||"number"!==typeof e.poolSize[0])throw new wa(`poolSize for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.poolSize)}`);this.poolSize=e.poolSize}if(za(this.poolSize,"poolSize"),null==e.strides)this.strides=this.poolSize;else if("number"===typeof e.strides)this.strides=[e.strides];else{if(!Array.isArray(e.strides)||1!==e.strides.length||"number"!==typeof e.strides[0])throw new wa(`strides for 1D convolutional layer must be a number or an Array of a single number, but received ${JSON.stringify(e.strides)}`);this.strides=e.strides}za(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,ti(this.padding),this.inputSpec=[new lo({ndim:3})]}computeOutputShape(e){const t=tu((e=no(e))[1],this.poolSize[0],this.padding,this.strides[0]);return[e[0],t,e[2]]}call(e,t){return(0,D.tidy)((()=>{this.invokeCallHook(e,t),e=gi(to(e),2);const n=this.poolingFunction(to(e),[this.poolSize[0],1],[this.strides[0],1],this.padding,"channelsLast");return D.squeeze(n,[2])}))}getConfig(){const e={poolSize:this.poolSize,padding:this.padding,strides:this.strides},t=super.getConfig();return Object.assign(e,t),e}}class hc extends dc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),uc(e,t,n,r,a,"max")}}hc.className="MaxPooling1D",D.serialization.registerClass(hc);class fc extends dc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),uc(e,t,n,r,a,"avg")}}fc.className="AveragePooling1D",D.serialization.registerClass(fc);class pc extends po{constructor(e){if(null==e.poolSize&&(e.poolSize=[2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize],null==e.strides)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(2!==e.strides.length)throw new wa(`If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides];za(this.poolSize,"poolSize"),za(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,ei(this.dataFormat),ti(this.padding),this.inputSpec=[new lo({ndim:4})]}computeOutputShape(e){e=no(e);let t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2];return t=tu(t,this.poolSize[0],this.padding,this.strides[0]),n=tu(n,this.poolSize[1],this.padding,this.strides[1]),"channelsFirst"===this.dataFormat?[e[0],e[1],t,n]:[e[0],t,n,e[3]]}call(e,t){return(0,D.tidy)((()=>(this.invokeCallHook(e,t),this.poolingFunction(to(e),this.poolSize,this.strides,this.padding,this.dataFormat))))}getConfig(){const e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class mc extends pc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),uc(e,t,n,r,a,"max")}}mc.className="MaxPooling2D",D.serialization.registerClass(mc);class gc extends pc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),uc(e,t,n,r,a,"avg")}}gc.className="AveragePooling2D",D.serialization.registerClass(gc);class yc extends po{constructor(e){if(null==e.poolSize&&(e.poolSize=[2,2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize,e.poolSize],null==e.strides)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(3!==e.strides.length)throw new wa(`If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length ${e.strides.length}.`);this.strides=e.strides}else this.strides=[e.strides,e.strides,e.strides];za(this.poolSize,"poolSize"),za(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,ei(this.dataFormat),ti(this.padding),this.inputSpec=[new lo({ndim:5})]}computeOutputShape(e){e=no(e);let t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2],r="channelsFirst"===this.dataFormat?e[4]:e[3];return t=tu(t,this.poolSize[0],this.padding,this.strides[0]),n=tu(n,this.poolSize[1],this.padding,this.strides[1]),r=tu(r,this.poolSize[2],this.padding,this.strides[2]),"channelsFirst"===this.dataFormat?[e[0],e[1],t,n,r]:[e[0],t,n,r,e[4]]}call(e,t){return(0,D.tidy)((()=>(this.invokeCallHook(e,t),this.poolingFunction(to(e),this.poolSize,this.strides,this.padding,this.dataFormat))))}getConfig(){const e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class _c extends yc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),cc(e,t,n,r,a,"max")}}_c.className="MaxPooling3D",D.serialization.registerClass(_c);class bc extends yc{constructor(e){super(e)}poolingFunction(e,t,n,r,a){return ei(a),ti(r),cc(e,t,n,r,a,"avg")}}bc.className="AveragePooling3D",D.serialization.registerClass(bc);class vc extends po{constructor(e){super(e),this.inputSpec=[new lo({ndim:3})]}computeOutputShape(e){return[e[0],e[2]]}call(e,t){throw new Fa}}class wc extends vc{constructor(e){super(e||{})}call(e,t){return(0,D.tidy)((()=>{const t=to(e);return D.mean(t,1)}))}}wc.className="GlobalAveragePooling1D",D.serialization.registerClass(wc);class Fc extends vc{constructor(e){super(e||{})}call(e,t){return(0,D.tidy)((()=>{const t=to(e);return D.max(t,1)}))}}Fc.className="GlobalMaxPooling1D",D.serialization.registerClass(Fc);class kc extends po{constructor(e){super(e),this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,ei(this.dataFormat),this.inputSpec=[new lo({ndim:4})]}computeOutputShape(e){return"channelsLast"===this.dataFormat?[e[0],e[3]]:[e[0],e[1]]}call(e,t){throw new Fa}getConfig(){const e={dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class xc extends kc{call(e,t){return(0,D.tidy)((()=>{const t=to(e);return"channelsLast"===this.dataFormat?D.mean(t,[1,2]):D.mean(t,[2,3])}))}}xc.className="GlobalAveragePooling2D",D.serialization.registerClass(xc);class Ac extends kc{call(e,t){return(0,D.tidy)((()=>{const t=to(e);return"channelsLast"===this.dataFormat?D.max(t,[1,2]):D.max(t,[2,3])}))}}Ac.className="GlobalMaxPooling2D",D.serialization.registerClass(Ac);class Sc extends po{constructor(e){super(e),this.layer=e.layer}build(e){this.built=!0}get trainable(){return null!=this.layer&&this.layer.trainable}set trainable(e){null!=this.layer&&(this.layer.trainable=e)}get trainableWeights(){return this.layer.trainableWeights}get nonTrainableWeights(){return this.layer.nonTrainableWeights}get updates(){return this.layer._updates}get losses(){return this.layer.losses}getWeights(){return this.layer.getWeights()}setWeights(e){this.layer.setWeights(e)}getConfig(){const e={layer:{className:this.layer.getClassName(),config:this.layer.getConfig()}},t=super.getConfig();return Object.assign(e,t),e}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.layer&&this.layer.setFastWeightInitDuringBuild(e)}static fromConfig(e,t,n={}){const r=ds(t.layer,n);delete t.layer;const a={layer:r};return Object.assign(a,t),new e(a)}}class Ec extends Sc{constructor(e){super(e),this.supportsMasking=!0}build(e){if((e=no(e)).length<3)throw new wa(`TimeDistributed layer expects an input shape >= 3D, but received input shape ${JSON.stringify(e)}`);this.inputSpec=[{shape:e}];const t=[e[0]].concat(e.slice(2));this.layer.built||(this.layer.build(t),this.layer.built=!0),super.build(e)}computeOutputShape(e){const t=[(e=no(e))[0]].concat(e.slice(2)),n=this.layer.computeOutputShape(t),r=e[1];return[n[0],r].concat(n.slice(1))}call(e,t){return(0,D.tidy)((()=>wu(((e,n)=>[to(this.layer.call(e,t)),[]]),e=to(e),[],!1,null,null,!1,!0)[1]))}}Ec.className="TimeDistributed",D.serialization.registerClass(Ec);class Cc extends Sc{constructor(e){super(e);const t=e.layer.getConfig(),n={};n.className=e.layer.getClassName(),n.config=t,this.forwardLayer=ds(n),t.goBackwards=!0!==t.goBackwards;const r={};if(r.className=e.layer.getClassName(),r.config=t,this.backwardLayer=ds(r),this.forwardLayer.name="forward_"+this.forwardLayer.name,this.backwardLayer.name="backward_"+this.backwardLayer.name,this.mergeMode=void 0===e.mergeMode?"concat":e.mergeMode,function(e){ja(Za,"BidirectionalMergeMode",e)}(this.mergeMode),e.weights)throw new Fa("weights support is not implemented for Bidirectional layer yet.");this._stateful=e.layer.stateful,this.returnSequences=e.layer.returnSequences,this.returnState=e.layer.returnState,this.supportsMasking=!0,this._trainable=!0,this.inputSpec=e.layer.inputSpec,this.numConstants=null}get trainable(){return this._trainable}set trainable(e){this._trainable=e,null!=this.forwardLayer&&(this.forwardLayer.trainable=e),null!=this.backwardLayer&&(this.backwardLayer.trainable=e)}getWeights(){return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights())}setWeights(e){const t=e.length,n=Math.floor(t/2);this.forwardLayer.setWeights(e.slice(0,n)),this.backwardLayer.setWeights(e.slice(n))}computeOutputShape(e){let t,n,r,a=this.forwardLayer.computeOutputShape(e);return Array.isArray(a)&&Array.isArray(a[0])||(a=[a]),this.returnState?(r=a.slice(1),t=a[0]):t=a[0],"concat"===this.mergeMode?(t[t.length-1]*=2,n=[t]):n=null==this.mergeMode?[t,t.slice()]:[t],this.returnState?null==this.mergeMode?n.concat(r).concat(r.slice()):[t].concat(r).concat(r.slice()):Ca(n)}apply(e,t){let n=null==t?null:t.initialState,r=null==t?null:t.constants;null==t&&(t={});const a=vu(e,n,r,this.numConstants);if(e=a.inputs,n=a.initialState,r=a.constants,Array.isArray(e)&&(n=e.slice(1),e=e[0]),(null==n||0===n.length)&&null==r)return super.apply(e,t);const i=[],o=[];if(null!=n){const e=n.length;if(e%2>0)throw new wa("When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.");t.initialState=n,i.push(...n);const r=n.map((e=>new lo({shape:e.shape})));this.forwardLayer.stateSpec=r.slice(0,e/2),this.backwardLayer.stateSpec=r.slice(e/2),o.push(...r)}if(null!=r)throw new Fa("Support for constants in Bidirectional layers is not implemented yet.");const s=i[0]instanceof uo;for(const l of i)if(l instanceof uo!==s)throw new wa("The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors");if(s){const n=[e].concat(i),r=this.inputSpec.concat(o),a=this.inputSpec;this.inputSpec=r;const s=super.apply(n,t);return this.inputSpec=a,s}return super.apply(e,t)}call(e,t){return(0,D.tidy)((()=>{const n=t.initialState;let r,a,i,o;if(null==n)r=this.forwardLayer.call(e,t),a=this.backwardLayer.call(e,t);else{const i=n.slice(0,n.length/2),o=n.slice(n.length/2);r=this.forwardLayer.call(e,Object.assign(t,{initialState:i})),a=this.backwardLayer.call(e,Object.assign(t,{initialState:o}))}return this.returnState&&(Array.isArray(r)&&(i=r.slice(1).concat(a.slice(1))),r=r[0],a=a[0]),this.returnSequences&&(a=D.reverse(a,1)),"concat"===this.mergeMode?o=vi([r,a]):"sum"===this.mergeMode?o=D.add(r,a):"ave"===this.mergeMode?o=D.mul(.5,D.add(r,a)):"mul"===this.mergeMode?o=D.mul(r,a):null==this.mergeMode&&(o=[r,a]),this.returnState?null==this.mergeMode?o.concat(i):[o].concat(i):o}))}resetStates(e){this.forwardLayer.resetStates(),this.backwardLayer.resetStates()}build(e){ai(this.forwardLayer.name,(()=>{this.forwardLayer.build(e)})),ai(this.backwardLayer.name,(()=>{this.backwardLayer.build(e)})),this.built=!0}computeMask(e,t){let n;if(Array.isArray(t)&&(t=t[0]),n=this.returnSequences?null==this.mergeMode?[t,t]:t:null==this.mergeMode?[null,null]:null,this.returnState){const e=this.forwardLayer.states.map((e=>null));return Array.isArray(n)?n.concat(e).concat(e):[n].concat(e).concat(e)}return n}get trainableWeights(){return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights)}get nonTrainableWeights(){return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights)}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.forwardLayer&&this.forwardLayer.setFastWeightInitDuringBuild(e),null!=this.backwardLayer&&this.backwardLayer.setFastWeightInitDuringBuild(e)}getConfig(){const e={mergeMode:this.mergeMode},t=super.getConfig();return Object.assign(e,t),e}static fromConfig(e,t){const n=ds(t.layer);if(delete t.layer,null!=t.numConstants)throw new Fa("Deserialization of a Bidirectional layer with numConstants present is not supported yet.");const r=t;return r.layer=n,new e(r)}}Cc.className="Bidirectional",D.serialization.registerClass(Cc);class Tc extends po{constructor(e){super(e),this.scale=e.scale,e.offset?this.offset=e.offset:this.offset=0}getConfig(){const e={scale:this.scale,offset:this.offset},t=super.getConfig();return Object.assign(e,t),e}call(e,t){return(0,D.tidy)((()=>("float32"!==(e=to(e)).dtype&&(e=mi(e,"float32")),(0,D.add)((0,D.mul)(e,this.scale),this.offset))))}}Tc.className="Rescaling",D.serialization.registerClass(Tc);const{resizeBilinear:Dc,cropAndResize:Ic}=D.image;class Oc extends po{constructor(e){super(e),this.height=e.height,this.width=e.width}centerCrop(e,t,n,r,a,i,o,s){return(0,D.tidy)((()=>{let l,u=!1;const c=[t/i,n/o,(r+t)/i,(a+n)/o],d=[];3===e.rank?(u=!0,l=(0,D.stack)([e])):l=e;for(let e=0;emi(Dc(e,[t,n]),r)))}call(e,t){return(0,D.tidy)((()=>{const t=to(e),n=t.dtype,r=t.shape,a=r[r.length-3],i=r[r.length-2];let o=0;a!==this.height&&(o=Math.floor((a-this.height)/2));let s=0;return i!==this.width&&(s=Math.floor((i-this.width)/2),0===s&&(s=1)),o>=0&&s>=0?this.centerCrop(t,o,s,this.height,this.width,a,i,n):this.upsize(e,this.height,this.width,n)}))}getConfig(){const e={height:this.height,width:this.width},t=super.getConfig();return Object.assign(e,t),e}computeOutputShape(e){const t=(e=no(e)).length-3,n=e.length-2;return e[t]=this.height,e[n]=this.width,e}}Oc.className="CenterCrop",D.serialization.registerClass(Oc);class Pc extends po{constructor(e){super(e),this.numTokens=e.numTokens,e.outputMode?this.outputMode=e.outputMode:this.outputMode="multiHot"}getConfig(){const e={numTokens:this.numTokens,outputMode:this.outputMode},t=super.getConfig();return Object.assign(e,t),e}computeOutputShape(e){return null==(e=no(e))?[this.numTokens]:"oneHot"===this.outputMode&&1!==e[e.length-1]?(e.push(this.numTokens),e):(e[e.length-1]=this.numTokens,e)}call(e,t){return(0,D.tidy)((()=>{let n;if("int32"!==(e=to(e)).dtype&&(e=mi(e,"int32")),"undefined"!==typeof t.countWeights){if("count"!==this.outputMode)throw new wa(`countWeights is not used when outputMode !== count.\n Received countWeights=${t.countWeights}`);n=to(t.countWeights)}const r=(0,D.max)(e),a=(0,D.min)(e),i=(0,D.greater)(this.numTokens,r).bufferSync().get(0),o=(0,D.greaterEqual)(a,0).bufferSync().get(0);if(!i||!o)throw new wa(`Input values must be between 0 < values <= numTokens with numTokens=${this.numTokens}`);return function(e,t,n,r){let a=to(e);if("int32"!==a.dtype&&(a=mi(a,"int32")),"int"===t)return a;const i=a.shape;if(0===a.rank&&(a=(0,D.expandDims)(a,-1)),"oneHot"===t&&1!==a.shape[a.shape.length-1]&&(a=(0,D.expandDims)(a,-1)),a.rank>2)throw new wa(`When outputMode is not int, maximum output rank is 2 Received outputMode ${t} and input shape ${i} which would result in output rank ${a.rank}.`);const o=["multiHot","oneHot"].includes(t),s=a;let l;if(l="undefined"!==typeof r&&"count"===t?(0,D.denseBincount)(s,r,n,o):(0,D.denseBincount)(s,[],n,o),"tfIdf"!==t)return l;if(r)return(0,D.mul)(l,r);throw new wa("When outputMode is 'tfIdf', weights must be provided.")}(e,this.outputMode,this.numTokens,n)}))}}Pc.className="CategoryEncoding",D.serialization.registerClass(Pc);const Mc=new Set(["bilinear","nearest"]);class Rc extends po{constructor(e){if(super(e),this.height=e.height,this.width=e.width,e.interpolation){if(!Mc.has(e.interpolation))throw new wa(`Invalid interpolation parameter: ${e.interpolation} is not implemented`);this.interpolation=e.interpolation}else this.interpolation="bilinear";this.cropToAspectRatio=Boolean(e.cropToAspectRatio)}computeOutputShape(e){const t=(e=no(e))[2];return[this.height,this.width,t]}getConfig(){const e={height:this.height,width:this.width,interpolation:this.interpolation,cropToAspectRatio:this.cropToAspectRatio},t=super.getConfig();return Object.assign(e,t),e}call(e,t){return(0,D.tidy)((()=>{const t=[this.height,this.width];if("bilinear"===this.interpolation)return D.image.resizeBilinear(e,t,!this.cropToAspectRatio);if("nearest"===this.interpolation)return D.image.resizeNearestNeighbor(e,t,!this.cropToAspectRatio);throw new Error(`Interpolation is ${this.interpolation} but only ${[...Mc]} are supported`)}))}}Rc.className="Resizing",D.serialization.registerClass(Rc);class Lc{constructor(e){this.seed=e}next(){if(void 0!==this.seed)return this.seed++}}Lc.className="RandomSeed";class Nc extends po{constructor(e){super(e),this.randomGenerator=new Lc(e.seed)}getConfig(){const e={seed:this.randomGenerator.seed},t=super.getConfig();return Object.assign(e,t),e}}Nc.className="BaseRandomLayer";const Bc=new Set(["bilinear","nearest"]);class jc extends Nc{constructor(e){super(e);const{factor:t,interpolation:n="bilinear"}=e;if(this.factor=t,Array.isArray(this.factor)&&2===this.factor.length)this.widthLower=this.factor[0],this.widthUpper=this.factor[1];else{if(Array.isArray(this.factor)||!(this.factor>0))throw new wa(`Invalid factor: ${this.factor}. Must be positive number or tuple of 2 numbers`);this.widthLower=-this.factor,this.widthUpper=this.factor}if(this.widthLower<-1||this.widthUpper<-1)throw new wa(`factor must have values larger than -1. Got: ${this.factor}`);if(this.widthUpper{const t=to(e);this.imgHeight=t.shape[t.shape.length-3];const n=t.shape[t.shape.length-2];this.widthFactor=(0,D.randomUniform)([1],1+this.widthLower,1+this.widthUpper,"float32",this.randomGenerator.next());let r=this.widthFactor.dataSync()[0]*n;r=Math.round(r);const a=[this.imgHeight,r];switch(this.interpolation){case"bilinear":return D.image.resizeBilinear(e,a);case"nearest":return D.image.resizeNearestNeighbor(e,a);default:throw new Error(`Interpolation is ${this.interpolation}\n but only ${[...Bc]} are supported`)}}))}}function Vc(e){return new go(e)}function zc(e){return new Jl(e)}function Hc(e){return new Gl(e)}function Uc(e){return new Xl(e)}function Wc(e){return new Kl(e)}function qc(e){return new Ql(e)}function $c(e){return new Zl(e)}function Yc(e){return new gu(e)}function Gc(e){return new cu(e)}function Xc(e){return new hu(e)}function Kc(e){return new du(e)}function Jc(e){return new fu(e)}function Zc(e){return new mu(e)}function Qc(e){return new yu(e)}function ed(e){return new _u(e)}function td(e){return new bu(e)}function nd(e){return new Vu(e)}function rd(e){return new Bu(e)}function ad(e){return new Lu(e)}function id(e){return new Nu(e)}function od(e){return new ju(e)}function sd(e){return new zu(e)}function ld(e){return new Hu(e)}function ud(e){return new Uu(e)}function cd(e){return new qu(e)}function dd(e){return new Yu(e)}function hd(e){return new Xu(e)}function fd(e){return new Zu(e)}function pd(e){return new Ku(e)}function md(e){return new Ju(e)}function gd(e){return new Gu(e)}function yd(e){return new ec(e)}function _d(e){return new oc(e)}function bd(e){return new sc(e)}function vd(e){return new lc(e)}function wd(e){return new fc(e)}function Fd(e){return wd(e)}function kd(e){return wd(e)}function xd(e){return new gc(e)}function Ad(e){return xd(e)}function Sd(e){return xd(e)}function Ed(e){return new bc(e)}function Cd(e){return Ed(e)}function Td(e){return Ed(e)}function Dd(e){return new wc(e)}function Id(e){return new xc(e)}function Od(e){return new Fc(e)}function Pd(e){return new Ac(e)}function Md(e){return new hc(e)}function Rd(e){return new mc(e)}function Ld(e){return new _c(e)}function Nd(e){return new Eu(e)}function Bd(e){return new Su(e)}function jd(e){return new Tu(e)}function Vd(e){return new Cu(e)}function zd(e){return new Au(e)}function Hd(e){return new xu(e)}function Ud(e){return new Ru(e)}function Wd(e){return new Mu(e)}function qd(e){return new Fu(e)}function $d(e){return new Du(e)}function Yd(e){return new Cc(e)}function Gd(e){return new Ec(e)}jc.className="RandomWidth",D.serialization.registerClass(jc);const Xd=Od,Kd=Pd,Jd=Md,Zd=Rd;function Qd(e){return new tc(e)}function eh(e){return new nc(e)}function th(e){return new rc(e)}function nh(e){return new Wu(e)}function rh(e){return new Tc(e)}function ah(e){return new Oc(e)}function ih(e){return new Rc(e)}function oh(e){return new Pc(e)}function sh(e){return new jc(e)}function lh(e,t){return xs(e,t)}function uh(e,t){return Ts(e,t)}function ch(e,t){return Ds(e,t)}function dh(e,t){return As(e,t)}function hh(e,t){return Is(e,t)}function fh(e,t){return Es(e,t)}function ph(e,t){return Cs(e,t)}function mh(e,t){return ws(e,t)}function gh(e,t){return ps(e,t)}function yh(e,t){return ms(e,t)}function _h(e,t){return ms(e,t)}function bh(e,t){return ms(e,t)}function vh(e,t){return fs(e,t)}function wh(e,t){return fs(e,t)}function Fh(e,t){return fs(e,t)}function kh(e,t){return function(e,t){return(0,D.tidy)((()=>{const n=e.sub(t).square().sum(),r=e.sub(e.mean()).square().sum();return D.scalar(1).sub(n.div(r))}))}(e,t)}function xh(e){return new Ul(e)}function Ah(e){return zl(t=e),new Ul({l1:null!=t?t.l1:null,l2:0});var t}function Sh(e){return zl(t=e),new Ul({l2:null!=t?t.l2:null,l1:0});var t}class Eh extends rs{constructor(){super(...arguments),this.model=null}setModel(e){if(!(e instanceof hl))throw new Error("model must be a LayersModel, not some other Container");this.model=e}}function Ch(e,t){return et}class Dh extends Eh{constructor(e){if(super(),null==e&&(e={}),e.restoreBestWeights)throw new Fa("restoreBestWeights = True is not implemented in EarlyStopping yet.");this.monitor=e.monitor||"val_loss",this.minDelta=Math.abs(e.minDelta||0),this.patience=e.patience||0,this.verbose=e.verbose||0,this.mode=e.mode||"auto",this.baseline=e.baseline,-1===["auto","min","max"].indexOf(this.mode)&&(console.warn(`EarlyStopping mode '${this.mode}' is invalid. Falling back to mode 'auto'.`),this.mode="auto"),"min"===this.mode?this.monitorFunc=Ch:"max"===this.mode||-1!==this.monitor.indexOf("acc")?this.monitorFunc=Th:this.monitorFunc=Ch,this.monitorFunc===Ch&&(this.minDelta*=-1)}async onTrainBegin(e){this.wait=0,this.stoppedEpoch=0,null!=this.baseline?this.best=this.baseline:this.best=this.monitorFunc===Ch?1/0:-1/0}async onEpochEnd(e,t){await es(t);const n=this.getMonitorValue(t);null!=n&&(this.monitorFunc(n-this.minDelta,this.best)?(this.best=n,this.wait=0):(this.wait++,this.wait>=this.patience&&(this.stoppedEpoch=e,this.model.stopTraining=!0)))}async onTrainEnd(e){this.stoppedEpoch>0&&this.verbose&&console.log(`Epoch ${this.stoppedEpoch}: early stopping.`)}getMonitorValue(e){null==e&&(e={});const t=e[this.monitor];return null==t&&console.warn(`Metric for EarlyStopping ${this.monitor} is not available. Available metrics are: ${Object.keys(e)}`),t}}const Ih={earlyStopping:function(e){return new Dh(e)}};var Oh,Ph;(0,D.env)().registerFlag("KEEP_INTERMEDIATE_TENSORS",(()=>!1),(e=>{e&&console.warn("Keep intermediate tensors is ON. This will print the values of all intermediate tensors during model inference. Not all models support this mode. For details, check e2e/benchmarks/ model_config.js. This significantly impacts performance.")})),function(e){e[e.DT_INVALID=0]="DT_INVALID",e[e.DT_FLOAT=1]="DT_FLOAT",e[e.DT_DOUBLE=2]="DT_DOUBLE",e[e.DT_INT32=3]="DT_INT32",e[e.DT_UINT8=4]="DT_UINT8",e[e.DT_INT16=5]="DT_INT16",e[e.DT_INT8=6]="DT_INT8",e[e.DT_STRING=7]="DT_STRING",e[e.DT_COMPLEX64=8]="DT_COMPLEX64",e[e.DT_INT64=9]="DT_INT64",e[e.DT_BOOL=10]="DT_BOOL",e[e.DT_QINT8=11]="DT_QINT8",e[e.DT_QUINT8=12]="DT_QUINT8",e[e.DT_QINT32=13]="DT_QINT32",e[e.DT_BFLOAT16=14]="DT_BFLOAT16",e[e.DT_QINT16=15]="DT_QINT16",e[e.DT_QUINT16=16]="DT_QUINT16",e[e.DT_UINT16=17]="DT_UINT16",e[e.DT_COMPLEX128=18]="DT_COMPLEX128",e[e.DT_HALF=19]="DT_HALF",e[e.DT_RESOURCE=20]="DT_RESOURCE",e[e.DT_VARIANT=21]="DT_VARIANT",e[e.DT_UINT32=22]="DT_UINT32",e[e.DT_UINT64=23]="DT_UINT64",e[e.DT_FLOAT_REF=101]="DT_FLOAT_REF",e[e.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",e[e.DT_INT32_REF=103]="DT_INT32_REF",e[e.DT_UINT8_REF=104]="DT_UINT8_REF",e[e.DT_INT16_REF=105]="DT_INT16_REF",e[e.DT_INT8_REF=106]="DT_INT8_REF",e[e.DT_STRING_REF=107]="DT_STRING_REF",e[e.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",e[e.DT_INT64_REF=109]="DT_INT64_REF",e[e.DT_BOOL_REF=110]="DT_BOOL_REF",e[e.DT_QINT8_REF=111]="DT_QINT8_REF",e[e.DT_QUINT8_REF=112]="DT_QUINT8_REF",e[e.DT_QINT32_REF=113]="DT_QINT32_REF",e[e.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",e[e.DT_QINT16_REF=115]="DT_QINT16_REF",e[e.DT_QUINT16_REF=116]="DT_QUINT16_REF",e[e.DT_UINT16_REF=117]="DT_UINT16_REF",e[e.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",e[e.DT_HALF_REF=119]="DT_HALF_REF",e[e.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",e[e.DT_VARIANT_REF=121]="DT_VARIANT_REF",e[e.DT_UINT32_REF=122]="DT_UINT32_REF",e[e.DT_UINT64_REF=123]="DT_UINT64_REF"}(Oh||(Oh={})),function(e){let t;!function(e){e[e.LEGACY=0]="LEGACY",e[e.V1=1]="V1",e[e.V2=2]="V2"}(t=e.CheckpointFormatVersion||(e.CheckpointFormatVersion={}))}(Ph||(Ph={}));const Mh={};function Rh(e,t){const n={tfOpName:e,category:"custom",inputs:[],attrs:[],customExecutor:t};Mh[e]=n}function Lh(e){return Mh[e]}function Nh(e){delete Mh[e]}function Bh(e,t,n,r,a){const i=t.inputParams[e];if(i&&void 0!==i.inputIndexStart){const e=i.inputIndexStart,o=0===i.inputIndexEnd?void 0:void 0===i.inputIndexEnd?e+1:i.inputIndexEnd,s=e<0?t.inputNames.length+e:e;if("tensor"===i.type)return jh(t.inputNames[s],n,r,a);if("tensors"===i.type){const i=t.inputs.slice(e,o);return t.inputNames.slice(e,o).filter(((e,t)=>{var n;return"NoOp"!==(null===(n=i[t])||void 0===n?void 0:n.op)})).map((e=>jh(e,n,r,a)))}const l=jh(t.inputNames[s],n,r,a),u=l.dataSync();return"number"===i.type?u[0]:D.util.toNestedArray(l.shape,u)}const o=t.attrParams[e];return o&&o.value}function jh(e,t,n,r){const[a,i]=Uh(e,n);if(null!=r){const e=r.getHashTableHandleByName(a);if(null!=e)return e}const o=n.currentContextIds.find((e=>!!t[Hh(a,e)]));return void 0!==o?t[Hh(a,o)][i]:void 0}function Vh(e,t,n){return t[Hh(e,n.currentContextId)]}function zh(e,t){const[n,r,a]=Uh(e,t);return[Hh(n,t&&t.currentContextId),r,a]}function Hh(e,t){return t?`${e}-${t}`:e}function Uh(e,t){if(""===e)return["",0,void 0];const n=null!=t&&null!=t.parseNodeNameCache;if(n){const n=t.parseNodeNameCache.get(e);if(null!=n)return n}const r=e.split(":");let a;if(1===r.length)a=[e,0,void 0];else{const e=r[0],t=3===r.length?r[1]:void 0;a=[e,Number(r[r.length-1]),t]}return n&&t.parseNodeNameCache.set(e,a),a}function Wh(e,t,n){let r=Bh("pad",e,t,n);if("explicit"===r){r=Bh("explicitPaddings",e,t,n);const a=[[0,0],[0,0],[0,0],[0,0]];for(let e=0;e<4;e++)a[e][0]=r[2*e],a[e][1]=r[2*e+1];return a}return r}function qh(e){return e.kept?e:(0,D.clone)(e)}const $h=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],Yh=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsFinite",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsInf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],Gh=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcatV2",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListLength",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}]},{tfOpName:"TensorListResize",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"size",type:"number"}]}],Xh=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}],Kh=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomStandardNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniformInt",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number"},{tfName:"maxval",name:"maxval",type:"number"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}],Jh=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}],Zh=[{tfOpName:"LowerBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"UpperBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}],Qh=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}],ef=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"InitializeTable",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]},{tfOpName:"InitializeTableV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]}],tf=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]},{tfOpName:"ImageProjectiveTransformV3",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"transforms",type:"tensor"},{start:2,name:"outputShape",type:"number[]"},{start:3,name:"fillValue",type:"number"}],attrs:[{tfName:"interpolation",name:"interpolation",type:"string"},{tfName:"fill_mode",name:"fillMode",type:"string"}]}],nf=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BitwiseAnd",category:"logical",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}]}],rf=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"MatrixBandPart",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"numLower",type:"tensor"},{start:1,name:"numUpper",type:"tensor"}]}],af=[{tfOpName:"EuclideanNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",defaultValue:!1}]},{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]}],of=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cumprod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}],sf=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]},{tfOpName:"TensorScatterUpdate",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"values",type:"tensor"}]}],lf=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}],uf=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}],cf=[{tfOpName:"StaticRegexReplace",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"pattern",name:"pattern",type:"string"},{tfName:"rewrite",name:"rewrite",type:"string"},{tfName:"replace_global",name:"replaceGlobal",type:"bool"}]},{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}],df=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"EnsureShape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}];class hf{static get Instance(){return this._instance||(this._instance=new this)}constructor(){const e=[].concat(...[u,c,d,h,f,p,m,g,y,_,b,v,w,F,k,x,A,S,E].map((e=>e.json)));this.opMappers=e.reduce(((e,t)=>(e[t.tfOpName]=t,e)),{})}transformGraph(e,t={}){const n=e.node,r=[],a=[],i=[],o=n.reduce(((e,t)=>(e[t.name]=this.mapNode(t),t.op.startsWith("Placeholder")?r.push(e[t.name]):"Const"===t.op?a.push(e[t.name]):null!=t.input&&0!==t.input.length||i.push(e[t.name]),e)),{});let s=[];const l=[];let u={},c={};null!=t&&(u=this.mapSignatureEntries(t.inputs),c=this.mapSignatureEntries(t.outputs));const d=Object.keys(o);d.forEach((e=>{const t=o[e];t.inputNames.forEach(((e,n)=>{const[r,,a]=zh(e),i=o[r];if(null!=i.outputs){const e=i.outputs.indexOf(a);if(-1!==e){const a=`${r}:${e}`;t.inputNames[n]=a}}t.inputs.push(i),i.children.push(t)}))})),0===Object.keys(c).length?d.forEach((e=>{const t=o[e];0===t.children.length&&l.push(t)})):Object.keys(c).forEach((e=>{const[t]=zh(e),n=o[t];null!=n&&(n.signatureKey=c[e],l.push(n))})),Object.keys(u).length>0?Object.keys(u).forEach((e=>{const[t]=zh(e),n=o[t];n&&(n.signatureKey=u[e],s.push(n))})):s=r;let h={};null!=e.library&&null!=e.library.function&&(h=e.library.function.reduce(((e,t)=>(e[t.signature.name]=this.mapFunction(t),e)),{}));const f={nodes:o,inputs:s,outputs:l,weights:a,placeholders:r,signature:t,functions:h};return i.length>0&&(f.initNodes=i),f}mapSignatureEntries(e){return Object.keys(e||{}).reduce(((t,n)=>(t[e[n].name]=n,t)),{})}mapNode(e){const t=Lh(e.op)||this.opMappers[e.op]||{};null==e.attr&&(e.attr={});const n={name:e.name,op:e.op,category:t.category,inputNames:(e.input||[]).map((e=>e.startsWith("^")?e.slice(1):e)),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:e.attr,outputs:t.outputs};return null!=t.inputs&&(n.inputParams=t.inputs.reduce(((e,t)=>(e[t.name]={type:t.type,inputIndexStart:t.start,inputIndexEnd:t.end},e)),{})),null!=t.attrs&&(n.attrParams=t.attrs.reduce(((t,n)=>{const r=n.type;let a;switch(n.type){case"string":a=pf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=pf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"string[]":a=xf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=xf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number":a=gf(e.attr,n.tfName,n.defaultValue||0),void 0===a&&n.tfDeprecatedName&&(a=gf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number[]":a=kf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=kf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool":a=mf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=mf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool[]":a=Sf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=Sf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape":a=Ff(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=Ff(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape[]":a=Af(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=Af(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype":a=bf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=bf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype[]":a=vf(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=vf(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"func":a=_f(e.attr,n.tfName,n.defaultValue),void 0===a&&n.tfDeprecatedName&&(a=_f(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${n.type} for op: ${e.op}`)}return t[n.name]={value:a,type:r},t}),{})),n}mapFunction(e){const t=e.nodeDef,n=[];let r={};null!=t&&(r=t.reduce(((e,t)=>(e[t.name]=this.mapNode(t),"Const"===t.op&&n.push(e[t.name]),e)),{}));const a=[],i=[];e.signature.inputArg.forEach((e=>{const[t]=zh(e.name),n={name:t,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:yf(e.type),type:"dtype"}},children:[]};n.signatureKey=e.name,a.push(n),r[t]=n}));Object.keys(r).forEach((e=>{const t=r[e];t.inputNames.forEach(((e,n)=>{const[a,,i]=zh(e),o=r[a];if(null!=o.outputs){const e=o.outputs.indexOf(i);if(-1!==e){const r=`${a}:${e}`;t.inputNames[n]=r}}t.inputs.push(o),o.children.push(t)}))}));const o=e.ret;e.signature.outputArg.forEach((e=>{const[t,n]=zh(o[e.name]),a=r[t];null!=a&&(a.defaultOutput=n,i.push(a))}));const s=this.mapArgsToSignature(e);return{nodes:r,inputs:a,outputs:i,weights:n,placeholders:[],signature:s}}mapArgsToSignature(e){return{methodName:e.signature.name,inputs:e.signature.inputArg.reduce(((e,t)=>(e[t.name]=this.mapArgToTensorInfo(t),e)),{}),outputs:e.signature.outputArg.reduce(((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n,e.ret),t)),{})}}mapArgToTensorInfo(e,t){let n=e.name;return null!=t&&(n=t[n]),{name:n,dtype:e.type}}}function ff(e,t){const n=Array.isArray(e)?String.fromCharCode.apply(null,e):function(e){const t=(0,D.env)().global;if("undefined"!==typeof t.atob)return t.atob(e);if("undefined"!==typeof Buffer)return new Buffer(e,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}(e);return t?n:n.toLowerCase()}function pf(e,t,n,r=!1){const a=e[t];return null!=a?ff(a.s,r):n}function mf(e,t,n){const r=e[t];return r?r.b:n}function gf(e,t,n){const r=e[t]||{},a=null!=r.i?r.i:null!=r.f?r.f:n;return"number"===typeof a?a:parseInt(a,10)}function yf(e){switch("string"===typeof e&&(e=Oh[e]),e){case Oh.DT_FLOAT:case Oh.DT_HALF:return"float32";case Oh.DT_INT32:case Oh.DT_INT64:case Oh.DT_INT8:case Oh.DT_UINT8:return"int32";case Oh.DT_BOOL:return"bool";case Oh.DT_DOUBLE:return"float32";case Oh.DT_STRING:return"string";case Oh.DT_COMPLEX64:case Oh.DT_COMPLEX128:return"complex64";default:return null}}function _f(e,t,n){const r=e[t];return r&&r.func?r.func.name:n}function bf(e,t,n){const r=e[t];return r&&r.type?yf(r.type):n}function vf(e,t,n){const r=e[t];return r&&r.list&&r.list.type?r.list.type.map((e=>yf(e))):n}function wf(e){if(!e.unknownRank)return null!=e.dim?e.dim.map((e=>"number"===typeof e.size?e.size:parseInt(e.size,10))):[]}function Ff(e,t,n){const r=e[t];return r&&r.shape?wf(r.shape):n}function kf(e,t,n){const r=e[t];return r?((r.list.f&&r.list.f.length?r.list.f:r.list.i)||[]).map((e=>"number"===typeof e?e:parseInt(e,10))):n}function xf(e,t,n,r=!1){const a=e[t];return a&&a.list&&a.list.s?a.list.s.map((e=>ff(e,r))):n}function Af(e,t,n){const r=e[t];return r&&r.list&&r.list.shape?r.list.shape.map((e=>wf(e))):n}function Sf(e,t,n){const r=e[t];return r&&r.list&&r.list.b?r.list.b:n}class Ef{constructor(e,t,n){this.node=e,this.tensorMap=t,this.context=n,this.inputs=[],this.attrs={},this.inputs=e.inputNames.map((e=>this.getInput(e))),null!=e.rawAttrs&&(this.attrs=Object.keys(e.rawAttrs).reduce(((e,t)=>(e[t]=this.getAttr(t),e)),{}))}getInput(e){return jh(e,this.tensorMap,this.context)}getAttr(e,t){const n=this.node.rawAttrs[e];if(null!=n.tensor)return jh(e,this.tensorMap,this.context);if(null!=n.i||null!=n.f)return gf(this.node.rawAttrs,e,t);if(null!=n.s)return pf(this.node.rawAttrs,e,t);if(null!=n.b)return mf(this.node.rawAttrs,e,t);if(null!=n.shape)return Ff(this.node.rawAttrs,e,t);if(null!=n.type)return bf(this.node.rawAttrs,e,t);if(null!=n.list){if(null!=n.list.i||null!=n.list.f)return kf(this.node.rawAttrs,e,t);if(null!=n.list.s)return xf(this.node.rawAttrs,e,t);if(null!=n.list.shape)return Af(this.node.rawAttrs,e,t);if(null!=n.list.b)return Sf(this.node.rawAttrs,e,t);if(null!=n.list.type)return vf(this.node.rawAttrs,e,t)}return t}}var Cf=n(30731);function Tf(e,t,n=""){if("number"!==typeof e&&"number"!==typeof t){D.util.assert(e.length===t.length,(()=>n+` Shapes ${e} and ${t} must match`));for(let r=0;rn+` Shapes ${e} and ${t} must match`))}}}function Df(e){return"number"!==typeof e&&!e.some((e=>e<0))}function If(e,t,n){let r=Of(e,n);const a=!Df(r);if(a&&0===t.length)throw new Error(`Tried to calculate elements of an empty list with non-fully-defined elementShape: ${r}`);if(a&&t.forEach((e=>{r=Of(e.shape,r)})),!Df(r))throw new Error(`Non-fully-defined elementShape: ${r}`);return r}function Of(e,t){if("number"===typeof e)return t;if("number"===typeof t)return e;if(e.length!==t.length)throw new Error(`Incompatible ranks during merge: ${e} vs. ${t}`);const n=[];for(let r=0;r=0&&i>=0&&a!==i)throw new Error(`Incompatible shape during merge: ${e} vs. ${t}`);n[r]=a>=0?a:i}return n}class Pf{constructor(e,t,n,r,a,i,o){this.name=e,this.dtype=t,this.maxSize=n,this.elementShape=r,this.identicalElementShapes=a,this.dynamicSize=i,this.clearAfterRead=o,this.tensors=[],this.closed_=!1,this.idTensor=(0,D.scalar)(0),(0,D.keep)(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(e){this.tensors.forEach((t=>{null!=e&&e.has(t.tensor.id)||t.tensor.dispose()})),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||e>=this.size())throw new Error(`Tried to read from index ${e}, but array size is: ${this.size()}`);const t=this.tensors[e];if(t.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${e} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(t.cleared=!0),t.read=!0,t.tensor}readMany(e){return e.map((e=>this.read(e)))}write(e,t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||!this.dynamicSize&&e>=this.maxSize)throw new Error(`Tried to write to index ${e}, but array is not resizeable and size is: ${this.maxSize}`);const n=this.tensors[e]||{};if(t.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e},\n because the value dtype is ${t.dtype}, but TensorArray dtype is ${this.dtype}.`);if(0!==this.size()||null!=this.elementShape&&0!==this.elementShape.length||(this.elementShape=t.shape),Tf(this.elementShape,t.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${e}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been written.`);n.tensor=t,(0,D.keep)(t),n.written=!0,this.tensors[e]=n}writeMany(e,t){if(e.length!==t.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${e.length} is not the same as tensors size: ${t.length}.`);e.forEach(((e,n)=>this.write(e,t[n])))}gather(e,t){if(t&&t!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype ${t}`);if(e)e=e.slice(0,this.size());else{e=[];for(let t=0;t=this.maxSize)throw new Error(`Max index must be < array size (${n} vs. ${this.maxSize})`);this.writeMany(e,(0,D.unstack)(t,0))}split(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype ${t.dtype}`);let n=0;const r=e.map((e=>(n+=e,n)));if(n!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${n}, and tensor's shape is: ${t.shape}`);if(!this.dynamicSize&&e.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${e.length}), and the TensorArray is not marked as dynamically resizeable`);const a=0===n?0:t.size/n,i=[];(0,D.tidy)((()=>{t=(0,D.reshape)(t,[1,n,a]);for(let n=0;n{if(n!==e.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements ${e.dtype}`);Tf(t,e.shape,"TensorList shape mismatch: "),(0,D.keep)(e)})),this.idTensor=(0,D.scalar)(0),this.maxNumElements=r,(0,D.keep)(this.idTensor)}copy(){return new Mf([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(e){this.tensors.forEach((t=>{null!=e&&e.has(t.id)||t.dispose()})),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(e,t,n=-1){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(-1!==n&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);Tf(e,this.elementShape,"TensorList shape mismatch: ");const r=If(this.elementShape,this.tensors,e);return(0,D.tidy)((()=>{const e=this.tensors.map((e=>(0,D.reshape)(e,r)));return(0,D.stack)(e,0)}))}popBack(e,t){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);if(0===this.size())throw new Error("Trying to pop from an empty list.");const n=If(this.elementShape,this.tensors,e),r=this.tensors.pop();return r.kept=!1,Tf(r.shape,e,"TensorList shape mismatch: "),(0,D.reshape)(r,n)}pushBack(e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${this.elementDtype}`);if(Tf(e.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");(0,D.keep)(e),this.tensors.push(e)}resize(e){if(e<0)throw new Error(`TensorListResize expects size to be non-negative. Got: ${e}`);if(-1!==this.maxNumElements&&e>this.maxNumElements)throw new Error(`TensorListResize input size ${e} is greater maxNumElement ${this.maxNumElements}.`);const t=new Mf([],this.elementShape,this.elementDtype,this.maxNumElements);t.tensors.length=e;for(let n=0;nthis.tensors.length)throw new Error(`Trying to access element ${e} in a list with ${this.tensors.length} elements.`);if(null==this.tensors[e])throw new Error(`element at index ${e} is null.`);Tf(this.tensors[e].shape,t,"TensorList shape mismatch: ");const r=If(this.elementShape,this.tensors,t);return(0,D.reshape)(this.tensors[e],r)}setItem(e,t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements ${this.elementDtype}`);if(e<0||-1!==this.maxNumElements&&e>=this.maxNumElements)throw new Error(`Trying to set element ${e} in a list with max ${this.maxNumElements} elements.`);Tf(this.elementShape,t.shape,"TensorList shape mismatch: "),(0,D.keep)(t),null!=this.tensors[e]&&(this.tensors[e].kept=!1),this.tensors[e]=t}gather(e,t,n){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements ${this.elementDtype}`);Tf(this.elementShape,n,"TensorList shape mismatch: "),e=e.slice(0,this.size());const r=If(this.elementShape,this.tensors,n);return 0===e.length?(0,D.tensor)([],[0].concat(r)):(0,D.tidy)((()=>{const t=e.map((e=>(0,D.reshape)(this.tensors[e],r)));return(0,D.stack)(t,0)}))}concat(e,t){if(e&&e!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype ${e}`);Tf(this.elementShape,t,"TensorList shape mismatch: ");const n=If(this.elementShape,this.tensors,t);return 0===this.size()?(0,D.tensor)([],[0].concat(n)):(0,D.tidy)((()=>{const e=this.tensors.map((e=>(0,D.reshape)(e,n)));return(0,D.concat)(e,0)}))}}const Rf=async(e,t,n)=>{switch(e.op){case"If":case"StatelessIf":{const r=Bh("thenBranch",e,t,n),a=Bh("elseBranch",e,t,n),i=Bh("cond",e,t,n),o=Bh("args",e,t,n);return(await i.data())[0]?n.functionMap[r].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap):n.functionMap[a].executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{const r=Bh("body",e,t,n),a=Bh("cond",e,t,n),i=Bh("args",e,t,n),o=await n.functionMap[a].executeFunctionAsync(i,n.tensorArrayMap,n.tensorListMap),s=i.map((e=>e.id));let l=await o[0].data();o.forEach((e=>{e.kept||-1!==s.indexOf(e.id)||e.dispose()}));let u=i;for(;l[0];){const e=u;u=await n.functionMap[r].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);const t=u.map((e=>e.id));e.forEach((e=>{e.kept||-1!==s.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()}));const i=await n.functionMap[a].executeFunctionAsync(u,n.tensorArrayMap,n.tensorListMap);l=await i[0].data(),i.forEach((e=>{e.kept||-1!==s.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()}))}return u}case"LoopCond":return[qh(Bh("pred",e,t,n))];case"Switch":{const r=Bh("pred",e,t,n);let a=Bh("data",e,t,n);return a.kept||(a=qh(a)),(await r.data())[0]?[void 0,a]:[a,void 0]}case"Merge":{const r=e.inputNames.find((e=>void 0!==jh(e,t,n)));if(r){return[qh(jh(r,t,n))]}return}case"Enter":{const r=Bh("frameName",e,t,n),a=Bh("tensor",e,t,n);return n.enterFrame(r),[qh(a)]}case"Exit":{const r=Bh("tensor",e,t,n);return n.exitFrame(),[qh(r)]}case"NextIteration":{const r=Bh("tensor",e,t,n);return n.nextIteration(),[qh(r)]}case"TensorArrayV3":{const r=Bh("size",e,t,n),a=Bh("dtype",e,t,n),i=Bh("elementShape",e,t,n),o=Bh("dynamicSize",e,t,n),s=Bh("clearAfterRead",e,t,n),l=Bh("identicalElementShapes",e,t,n),u=Bh("name",e,t,n),c=new Pf(u,a,r,i,l,o,s);return n.addTensorArray(c),[c.idTensor,(0,D.scalar)(1)]}case"TensorArrayWriteV3":{const r=Bh("tensorArrayId",e,t,n),a=Bh("index",e,t,n),i=Bh("tensor",e,t,n),o=n.getTensorArray(r.id);return o.write(a,i),[o.idTensor]}case"TensorArrayReadV3":{const r=Bh("tensorArrayId",e,t,n),a=Bh("index",e,t,n);return[n.getTensorArray(r.id).read(a)]}case"TensorArrayGatherV3":{const r=Bh("tensorArrayId",e,t,n),a=Bh("indices",e,t,n),i=Bh("dtype",e,t,n);return[n.getTensorArray(r.id).gather(a,i)]}case"TensorArrayScatterV3":{const r=Bh("tensorArrayId",e,t,n),a=Bh("indices",e,t,n),i=Bh("tensor",e,t,n),o=n.getTensorArray(r.id);return o.scatter(a,i),[o.idTensor]}case"TensorArrayConcatV3":{const r=Bh("tensorArrayId",e,t,n),a=n.getTensorArray(r.id),i=Bh("dtype",e,t,n);return[a.concat(i)]}case"TensorArraySplitV3":{const r=Bh("tensorArrayId",e,t,n),a=Bh("tensor",e,t,n),i=Bh("lengths",e,t,n),o=n.getTensorArray(r.id);return o.split(i,a),[o.idTensor]}case"TensorArraySizeV3":{const r=Bh("tensorArrayId",e,t,n),a=n.getTensorArray(r.id);return[(0,D.scalar)(a.size(),"int32")]}case"TensorArrayCloseV3":{const r=Bh("tensorArrayId",e,t,n),a=n.getTensorArray(r.id);return a.clearAndClose(),[a.idTensor]}case"TensorListSetItem":{const r=Bh("tensorListId",e,t,n),a=Bh("index",e,t,n),i=Bh("tensor",e,t,n),o=n.getTensorList(r.id);return o.setItem(a,i),[o.idTensor]}case"TensorListGetItem":{const r=Bh("tensorListId",e,t,n),a=Bh("index",e,t,n),i=Bh("elementShape",e,t,n),o=Bh("elementDType",e,t,n);return[n.getTensorList(r.id).getItem(a,i,o)]}case"TensorListScatterV2":case"TensorListScatter":{const r=Bh("indices",e,t,n),a=function(e,t,n,r){if(t.length!==e.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${t.length} vs. ${e.shape[0]}`);const a=Math.max(...t);if(null!=r&&-1!==r&&a>=r)throw new Error(`Max index must be < array size (${a} vs. ${r})`);const i=new Mf([],n,e.dtype,r),o=(0,D.unstack)(e,0);return t.forEach(((e,t)=>{i.setItem(e,o[t])})),i}(Bh("tensor",e,t,n),r,Bh("elementShape",e,t,n),Bh("numElements",e,t,n));return n.addTensorList(a),[a.idTensor]}case"TensorListReserve":case"EmptyTensorList":{const r=Bh("elementShape",e,t,n),a=Bh("elementDType",e,t,n);let i;i="TensorListReserve"===e.op?"numElements":"maxNumElements";const o=Bh(i,e,t,n),s=function(e,t,n,r){return new Mf([],e,t,r)}(r,a,0,"TensorListReserve"===e.op?-1:o);return n.addTensorList(s),[s.idTensor]}case"TensorListGather":{const r=Bh("tensorListId",e,t,n),a=Bh("indices",e,t,n),i=Bh("elementShape",e,t,n),o=Bh("elementDType",e,t,n);return[n.getTensorList(r.id).gather(a,o,i)]}case"TensorListStack":{const r=Bh("tensorListId",e,t,n),a=Bh("elementShape",e,t,n),i=Bh("elementDType",e,t,n),o=Bh("numElements",e,t,n);return[n.getTensorList(r.id).stack(a,i,o)]}case"TensorListFromTensor":{const r=function(e,t,n){const r=e.dtype;if(e.shape.length<1)throw new Error(`Tensor must be at least a vector, but saw shape: ${e.shape}`);if(e.dtype!==n)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements ${n}`);Tf(e.shape.slice(1),t,"TensorList shape mismatch: ");const a=(0,D.unstack)(e);return new Mf(a,t,r)}(Bh("tensor",e,t,n),Bh("elementShape",e,t,n),Bh("elementDType",e,t,n));return n.addTensorList(r),[r.idTensor]}case"TensorListConcat":case"TensorListConcatV2":{const r=Bh("tensorListId",e,t,n),a=n.getTensorList(r.id),i=Bh("dtype",e,t,n),o=Bh("elementShape",e,t,n);return[a.concat(i,o)]}case"TensorListPushBack":{const r=Bh("tensorListId",e,t,n),a=Bh("tensor",e,t,n),i=n.getTensorList(r.id);return i.pushBack(a),[i.idTensor]}case"TensorListPopBack":{const r=Bh("tensorListId",e,t,n),a=Bh("elementShape",e,t,n),i=Bh("elementDType",e,t,n);return[n.getTensorList(r.id).popBack(a,i)]}case"TensorListSplit":{const r=Bh("tensor",e,t,n),a=Bh("elementShape",e,t,n),i=function(e,t,n){let r=0;const a=t.map((e=>(r+=e,r)));if(r!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to\n tensor.shape[0], but sum of lengths is\n ${r}, and tensor's shape is: ${e.shape}`);const i=Of(e.shape.slice(1),n),o=0===r?0:e.size/r,s=(0,D.tidy)((()=>{const n=[];e=(0,D.reshape)(e,[1,r,o]);for(let r=0;re.dispose())),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return B.scalar(this.size(),"int32")}async import(e,t){this.checkKeyAndValueTensor(e,t);const n=await e.data();return this.tensorMap.forEach((e=>e.dispose())),this.tensorMap.clear(),(0,D.tidy)((()=>{const e=(0,D.unstack)(t),r=n.length,a=e.length;D.util.assert(r===a,(()=>`The number of elements doesn't match, keys has ${r} elements, the values has ${a} elements.`));for(let t=0;t{const e=[];for(let r=0;r{switch(e.category){case"arithmetic":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"BiasAdd":case"AddV2":case"Add":return[r.add(Bh("a",e,t,n),Bh("b",e,t,n))];case"AddN":return[r.addN(Bh("tensors",e,t,n))];case"FloorMod":case"Mod":return[r.mod(Bh("a",e,t,n),Bh("b",e,t,n))];case"Mul":return[r.mul(Bh("a",e,t,n),Bh("b",e,t,n))];case"RealDiv":case"Div":return[r.div(Bh("a",e,t,n),Bh("b",e,t,n))];case"DivNoNan":return[r.divNoNan(Bh("a",e,t,n),Bh("b",e,t,n))];case"FloorDiv":return[r.floorDiv(Bh("a",e,t,n),Bh("b",e,t,n))];case"Sub":return[r.sub(Bh("a",e,t,n),Bh("b",e,t,n))];case"Minimum":return[r.minimum(Bh("a",e,t,n),Bh("b",e,t,n))];case"Maximum":return[r.maximum(Bh("a",e,t,n),Bh("b",e,t,n))];case"Pow":return[r.pow(Bh("a",e,t,n),Bh("b",e,t,n))];case"SquaredDifference":return[r.squaredDifference(Bh("a",e,t,n),Bh("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"basic_math":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Abs":case"ComplexAbs":return[r.abs(Bh("x",e,t,n))];case"Acos":return[r.acos(Bh("x",e,t,n))];case"Acosh":return[r.acosh(Bh("x",e,t,n))];case"Asin":return[r.asin(Bh("x",e,t,n))];case"Asinh":return[r.asinh(Bh("x",e,t,n))];case"Atan":return[r.atan(Bh("x",e,t,n))];case"Atan2":return[r.atan2(Bh("x",e,t,n),Bh("y",e,t,n))];case"Atanh":return[r.atanh(Bh("x",e,t,n))];case"Ceil":return[r.ceil(Bh("x",e,t,n))];case"Complex":return[r.complex(Bh("real",e,t,n),Bh("imag",e,t,n))];case"Cos":return[r.cos(Bh("x",e,t,n))];case"Cosh":return[r.cosh(Bh("x",e,t,n))];case"Elu":return[r.elu(Bh("x",e,t,n))];case"Erf":return[r.erf(Bh("x",e,t,n))];case"Exp":return[r.exp(Bh("x",e,t,n))];case"Expm1":return[r.expm1(Bh("x",e,t,n))];case"Floor":return[r.floor(Bh("x",e,t,n))];case"Log":return[r.log(Bh("x",e,t,n))];case"Log1p":return[r.log1p(Bh("x",e,t,n))];case"Imag":return[r.imag(Bh("x",e,t,n))];case"Neg":return[r.neg(Bh("x",e,t,n))];case"Reciprocal":return[r.reciprocal(Bh("x",e,t,n))];case"Real":return[r.real(Bh("x",e,t,n))];case"Relu":return[r.relu(Bh("x",e,t,n))];case"Round":return[r.round(Bh("x",e,t,n))];case"Selu":return[r.selu(Bh("x",e,t,n))];case"Sigmoid":return[r.sigmoid(Bh("x",e,t,n))];case"Sin":return[r.sin(Bh("x",e,t,n))];case"Sign":return[r.sign(Bh("x",e,t,n))];case"Sinh":return[r.sinh(Bh("x",e,t,n))];case"Softplus":return[r.softplus(Bh("x",e,t,n))];case"Sqrt":return[r.sqrt(Bh("x",e,t,n))];case"Square":return[r.square(Bh("x",e,t,n))];case"Tanh":return[r.tanh(Bh("x",e,t,n))];case"Tan":return[r.tan(Bh("x",e,t,n))];case"ClipByValue":return[r.clipByValue(Bh("x",e,t,n),Bh("clipValueMin",e,t,n),Bh("clipValueMax",e,t,n))];case"Relu6":return[r.relu6(Bh("x",e,t,n))];case"Rsqrt":return[r.rsqrt(jh(e.inputNames[0],t,n))];case"LeakyRelu":return[r.leakyRelu(Bh("x",e,t,n),Bh("alpha",e,t,n))];case"Prelu":return[r.prelu(Bh("x",e,t,n),Bh("alpha",e,t,n))];case"IsNan":return[r.isNaN(jh(e.inputNames[0],t,n))];case"IsInf":return[r.isInf(jh(e.inputNames[0],t,n))];case"IsFinite":return[r.isFinite(jh(e.inputNames[0],t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"control":return Rf(e,t,n);case"convolution":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Conv1D":{const a=Bh("stride",e,t,n),i=Bh("pad",e,t,n),o=Bh("dataFormat",e,t,n).toUpperCase(),s=Bh("dilation",e,t,n);return[r.conv1d(Bh("x",e,t,n),Bh("filter",e,t,n),a,i,o,s)]}case"Conv2D":{const a=Bh("strides",e,t,n),i=Wh(e,t,n),o=Bh("dataFormat",e,t,n).toUpperCase(),s=Bh("dilations",e,t,n);return[r.conv2d(Bh("x",e,t,n),Bh("filter",e,t,n),[a[1],a[2]],i,o,[s[1],s[2]])]}case"_FusedConv2D":{const{stride:a,pad:i,dataFormat:o,dilations:s,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:d}=Lf(e,t,n);return[r.fused.conv2d({x:Bh("x",e,t,n),filter:Bh("filter",e,t,n),strides:[a[1],a[2]],pad:i,dataFormat:o,dilations:[s[1],s[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:d})]}case"FusedDepthwiseConv2dNative":{const{stride:a,pad:i,dataFormat:o,dilations:s,biasArg:l,preluArg:u,activationFunc:c,leakyreluAlpha:d}=Lf(e,t,n);return[r.fused.depthwiseConv2d({x:Bh("x",e,t,n),filter:Bh("filter",e,t,n),strides:[a[1],a[2]],pad:i,dataFormat:o,dilations:[s[1],s[2]],bias:l,activation:c,preluActivationWeights:u,leakyreluAlpha:d})]}case"Conv2DBackpropInput":case"Conv2dTranspose":{const a=Bh("outputShape",e,t,n),i=Bh("strides",e,t,n),o=Wh(e,t,n);return[r.conv2dTranspose(Bh("x",e,t,n),Bh("filter",e,t,n),a,[i[1],i[2]],o)]}case"DepthwiseConv2dNative":case"DepthwiseConv2d":{const a=Bh("strides",e,t,n),i=Wh(e,t,n),o=Bh("dilations",e,t,n),s=Bh("dataFormat",e,t,n).toUpperCase();return[r.depthwiseConv2d(Bh("input",e,t,n),Bh("filter",e,t,n),[a[1],a[2]],i,s,[o[1],o[2]])]}case"Conv3D":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("dataFormat",e,t,n).toUpperCase(),s=Bh("dilations",e,t,n);return[r.conv3d(Bh("x",e,t,n),Bh("filter",e,t,n),[a[1],a[2],a[3]],i,o,[s[1],s[2],s[3]])]}case"AvgPool":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("kernelSize",e,t,n);return[r.avgPool(Bh("x",e,t,n),[o[1],o[2]],[a[1],a[2]],i)]}case"MaxPool":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("kernelSize",e,t,n);return[r.maxPool(Bh("x",e,t,n),[o[1],o[2]],[a[1],a[2]],i)]}case"MaxPoolWithArgmax":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("kernelSize",e,t,n),s=Bh("includeBatchInIndex",e,t,n),{result:l,indexes:u}=r.maxPoolWithArgmax(Bh("x",e,t,n),[o[1],o[2]],[a[1],a[2]],i,s);return[l,u]}case"AvgPool3D":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("kernelSize",e,t,n);return[r.avgPool3d(Bh("x",e,t,n),[o[1],o[2],o[3]],[a[1],a[2],a[3]],i)]}case"MaxPool3D":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("kernelSize",e,t,n);return[r.maxPool3d(Bh("x",e,t,n),[o[1],o[2],o[3]],[a[1],a[2],a[3]],i)]}case"Dilation2D":{const a=Bh("strides",e,t,n),i=Bh("pad",e,t,n),o=Bh("dilations",e,t,n),s=a[1],l=a[2],u=o[1],c=o[2];return[r.dilation2d(Bh("x",e,t,n),Bh("filter",e,t,n),[s,l],i,[u,c],"NHWC")]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"creation":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Fill":{const a=Bh("shape",e,t,n),i=Bh("dtype",e,t,n),o=Bh("value",e,t,n);return[r.fill(a,o,i)]}case"LinSpace":{const a=Bh("start",e,t,n),i=Bh("stop",e,t,n),o=Bh("num",e,t,n);return[r.linspace(a,i,o)]}case"Multinomial":{const a=Bh("logits",e,t,n),i=Bh("numSamples",e,t,n),o=Bh("seed",e,t,n);return[r.multinomial(a,i,o)]}case"OneHot":{const a=Bh("indices",e,t,n),i=Bh("depth",e,t,n),o=Bh("onValue",e,t,n),s=Bh("offValue",e,t,n),l=Bh("dtype",e,t,n);return[r.oneHot(a,i,o,s,l)]}case"Ones":return[r.ones(Bh("shape",e,t,n),Bh("dtype",e,t,n))];case"OnesLike":return[r.onesLike(Bh("x",e,t,n))];case"RandomStandardNormal":return[r.randomStandardNormal(Bh("shape",e,t,n),Bh("dtype",e,t,n),Bh("seed",e,t,n))];case"RandomUniform":return[r.randomUniform(Bh("shape",e,t,n),Bh("minval",e,t,n),Bh("maxval",e,t,n),Bh("dtype",e,t,n))];case"RandomUniformInt":return[r.randomUniformInt(Bh("shape",e,t,n),Bh("minval",e,t,n),Bh("maxval",e,t,n),Bh("seed",e,t,n))];case"Range":{const a=Bh("start",e,t,n),i=Bh("stop",e,t,n),o=Bh("step",e,t,n);return[r.range(a,i,o,Bh("dtype",e,t,n))]}case"TruncatedNormal":{const a=Bh("shape",e,t,n),i=Bh("mean",e,t,n),o=Bh("stdDev",e,t,n),s=Bh("seed",e,t,n);return[r.truncatedNormal(a,i,o,Bh("dtype",e,t,n),s)]}case"Zeros":return[r.zeros(Bh("shape",e,t,n),Bh("dtype",e,t,n))];case"ZerosLike":return[r.zerosLike(Bh("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"dynamic":return(async(e,t,n,r,a=C)=>{switch(e.op){case"NonMaxSuppressionV5":{const{boxes:r,scores:i,maxOutputSize:o,iouThreshold:s,scoreThreshold:l,softNmsSigma:u}=Nf(e,t,n),c=await a.image.nonMaxSuppressionWithScoreAsync(r,i,o,s,l,u);return[c.selectedIndices,c.selectedScores]}case"NonMaxSuppressionV4":{const{boxes:r,scores:i,maxOutputSize:o,iouThreshold:s,scoreThreshold:l}=Nf(e,t,n),u=Bh("padToMaxOutputSize",e,t,n),c=await a.image.nonMaxSuppressionPaddedAsync(r,i,o,s,l,u);return[c.selectedIndices,c.validOutputs]}case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":{const{boxes:r,scores:i,maxOutputSize:o,iouThreshold:s,scoreThreshold:l}=Nf(e,t,n);return[await a.image.nonMaxSuppressionAsync(r,i,o,s,l)]}case"Where":{const r=a.cast(Bh("condition",e,t,n),"bool"),i=[await a.whereAsync(r)];return r.dispose(),i}case"ListDiff":return a.setdiff1dAsync(Bh("x",e,t,n),Bh("y",e,t,n));default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n);case"evaluation":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"LowerBound":{const a=Bh("sortedSequence",e,t,n),i=Bh("values",e,t,n);return[r.lowerBound(a,i)]}case"TopKV2":{const a=Bh("x",e,t,n),i=Bh("k",e,t,n),o=Bh("sorted",e,t,n),s=r.topk(a,i,o);return[s.values,s.indices]}case"UpperBound":{const a=Bh("sortedSequence",e,t,n),i=Bh("values",e,t,n);return[r.upperBound(a,i)]}case"Unique":{const a=Bh("x",e,t,n),i=r.unique(a);return[i.values,i.indices]}case"UniqueV2":{const a=Bh("x",e,t,n),i=Bh("axis",e,t,n),o=r.unique(a,i);return[o.values,o.indices]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"image":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"ResizeBilinear":{const a=Bh("images",e,t,n),i=Bh("size",e,t,n),o=Bh("alignCorners",e,t,n),s=Bh("halfPixelCenters",e,t,n);return[r.image.resizeBilinear(a,[i[0],i[1]],o,s)]}case"ResizeNearestNeighbor":{const a=Bh("images",e,t,n),i=Bh("size",e,t,n),o=Bh("alignCorners",e,t,n),s=Bh("halfPixelCenters",e,t,n);return[r.image.resizeNearestNeighbor(a,[i[0],i[1]],o,s)]}case"CropAndResize":{const a=Bh("image",e,t,n),i=Bh("boxes",e,t,n),o=Bh("boxInd",e,t,n),s=Bh("cropSize",e,t,n),l=Bh("method",e,t,n),u=Bh("extrapolationValue",e,t,n);return[r.image.cropAndResize(a,i,o,s,l,u)]}case"ImageProjectiveTransformV3":{const a=Bh("images",e,t,n),i=Bh("transforms",e,t,n),o=Bh("outputShape",e,t,n),s=Bh("fillValue",e,t,n),l=Bh("interpolation",e,t,n),u=Bh("fillMode",e,t,n);return[r.image.transform(a,i,l.toLowerCase(),u.toLowerCase(),s,o)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"graph":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Const":return t[e.name];case"PlaceholderWithDefault":const a=Bh("default",e,t,n);return[jh(e.name,t,n)||a];case"Placeholder":return[jh(e.name,t,n)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":case"Snapshot":return[qh(Bh("x",e,t,n))];case"IdentityN":return Bh("x",e,t,n).map((e=>qh(e)));case"Shape":return[r.tensor1d(Bh("x",e,t,n).shape,"int32")];case"ShapeN":return Bh("x",e,t,n).map((e=>r.tensor1d(e.shape)));case"Size":return[r.scalar(Bh("x",e,t,n).size,"int32")];case"Rank":return[r.scalar(Bh("x",e,t,n).rank,"int32")];case"NoOp":return[r.scalar(1)];case"Print":const i=Bh("x",e,t,n),o=Bh("data",e,t,n),s=Bh("message",e,t,n),l=Bh("summarize",e,t,n);console.warn("The graph has a tf.print() operation,usually used for debugging, which slows down performance."),console.log(s);for(let e=0;e((e,t,n,r=C)=>{switch(e.op){case"Equal":return[r.equal(Bh("a",e,t,n),Bh("b",e,t,n))];case"NotEqual":return[r.notEqual(Bh("a",e,t,n),Bh("b",e,t,n))];case"Greater":return[r.greater(Bh("a",e,t,n),Bh("b",e,t,n))];case"GreaterEqual":return[r.greaterEqual(Bh("a",e,t,n),Bh("b",e,t,n))];case"Less":return[r.less(Bh("a",e,t,n),Bh("b",e,t,n))];case"LessEqual":return[r.lessEqual(Bh("a",e,t,n),Bh("b",e,t,n))];case"LogicalAnd":return[r.logicalAnd(Bh("a",e,t,n),Bh("b",e,t,n))];case"LogicalNot":return[r.logicalNot(Bh("a",e,t,n))];case"LogicalOr":return[r.logicalOr(Bh("a",e,t,n),Bh("b",e,t,n))];case"Select":case"SelectV2":return[r.where(Bh("condition",e,t,n),Bh("a",e,t,n),Bh("b",e,t,n))];case"BitwiseAnd":return[r.bitwiseAnd(Bh("a",e,t,n),Bh("b",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"matrices":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[r.matMul(Bh("a",e,t,n),Bh("b",e,t,n),Bh("transposeA",e,t,n),Bh("transposeB",e,t,n))];case"Einsum":return[r.einsum(Bh("equation",e,t,n),...Bh("tensors",e,t,n))];case"Transpose":return[r.transpose(Bh("x",e,t,n),Bh("perm",e,t,n))];case"_FusedMatMul":const[a,i]=Bh("fusedOps",e,t,n),o="biasadd"===a,s="prelu"===i,l=Bh("numArgs",e,t,n),u=Bh("leakyreluAlpha",e,t,n);if(o){if(s&&2!==l)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!s&&1!==l)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}const[c,d]=Bh("args",e,t,n);return[r.fused.matMul({a:Bh("a",e,t,n),b:Bh("b",e,t,n),transposeA:Bh("transposeA",e,t,n),transposeB:Bh("transposeB",e,t,n),bias:c,activation:i,preluActivationWeights:d,leakyreluAlpha:u})];case"MatrixBandPart":return[r.linalg.bandPart(Bh("a",e,t,n),Bh("numLower",e,t,n),Bh("numUpper",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"normalization":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"EuclideanNorm":return[r.euclideanNorm(Bh("x",e,t,n),Bh("axis",e,t,n),Bh("keepDims",e,t,n))];case"FusedBatchNorm":case"FusedBatchNormV2":case"FusedBatchNormV3":return[r.batchNorm(Bh("x",e,t,n),Bh("mean",e,t,n),Bh("variance",e,t,n),Bh("offset",e,t,n),Bh("scale",e,t,n),Bh("epsilon",e,t,n))];case"LRN":return[r.localResponseNormalization(Bh("x",e,t,n),Bh("radius",e,t,n),Bh("bias",e,t,n),Bh("alpha",e,t,n),Bh("beta",e,t,n))];case"Softmax":return[r.softmax(Bh("x",e,t,n))];case"LogSoftmax":return[r.logSoftmax(Bh("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"ragged":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"RaggedGather":{const{outputNestedSplits:a,outputDenseValues:i}=r.raggedGather(Bh("paramsNestedSplits",e,t,n),Bh("paramsDenseValues",e,t,n),Bh("indices",e,t,n),Bh("outputRaggedRank",e,t,n));return a.concat(i)}case"RaggedRange":{const{rtNestedSplits:a,rtDenseValues:i}=r.raggedRange(Bh("starts",e,t,n),Bh("limits",e,t,n),Bh("splits",e,t,n));return[a,i]}case"RaggedTensorToTensor":return[r.raggedTensorToTensor(Bh("shape",e,t,n),Bh("values",e,t,n),Bh("defaultValue",e,t,n),Bh("rowPartitionTensors",e,t,n),Bh("rowPartitionTypes",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"reduction":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Max":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.max(Bh("x",e,t,n),a,i)]}case"Mean":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.mean(Bh("x",e,t,n),a,i)]}case"Min":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.min(Bh("x",e,t,n),a,i)]}case"Sum":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.sum(Bh("x",e,t,n),a,i)]}case"All":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.all(Bh("x",e,t,n),a,i)]}case"Any":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.any(Bh("x",e,t,n),a,i)]}case"ArgMax":{const a=Bh("axis",e,t,n);return[r.argMax(Bh("x",e,t,n),a)]}case"ArgMin":{const a=Bh("axis",e,t,n);return[r.argMin(Bh("x",e,t,n),a)]}case"Prod":{const a=Bh("axis",e,t,n),i=Bh("keepDims",e,t,n);return[r.prod(Bh("x",e,t,n),a,i)]}case"Cumprod":{const a=Bh("axis",e,t,n),i=Bh("exclusive",e,t,n),o=Bh("reverse",e,t,n);return[r.cumprod(Bh("x",e,t,n),a,i,o)]}case"Cumsum":{const a=Bh("axis",e,t,n),i=Bh("exclusive",e,t,n),o=Bh("reverse",e,t,n);return[r.cumsum(Bh("x",e,t,n),a,i,o)]}case"Bincount":const a=Bh("x",e,t,n),i=Bh("weights",e,t,n),o=Bh("size",e,t,n);return[r.bincount(a,i,o)];case"DenseBincount":{const a=Bh("x",e,t,n),i=Bh("weights",e,t,n),o=Bh("size",e,t,n),s=Bh("binaryOutput",e,t,n);return[r.denseBincount(a,i,o,s)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"slice_join":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"ConcatV2":case"Concat":{const a=Bh("n",e,t,n),i=Bh("axis",e,t,n);let o=Bh("tensors",e,t,n);return o=o.slice(0,a),[r.concat(o,i)]}case"Gather":{const a=Bh("x",e,t,n),i=Bh("indices",e,t,n);return[r.gather(a,r.cast(i,"int32"),0)]}case"GatherV2":{const a=Bh("axis",e,t,n),i=Bh("batchDims",e,t,n),o=Bh("x",e,t,n),s=Bh("indices",e,t,n);return[r.gather(o,r.cast(s,"int32"),a,i)]}case"Reverse":{const a=Bh("dims",e,t,n),i=[];for(let e=0;e{const a=Bh("axis",e,t,n),i=Bh("tensors",e,t,n),o=i[0].shape,s=r.squeeze(i[0]).shape,l=i.map((e=>{const t=D.util.arraysEqual(e.shape,o);if(!t&&!D.util.arraysEqual(r.squeeze(e).shape,s))throw new Error("the input tensors shape does not match");return t?e:r.reshape(e,o)}));return[r.stack(l,a)]}));case"Unpack":{const a=Bh("axis",e,t,n),i=Bh("tensor",e,t,n);return r.unstack(i,a)}case"Tile":{const a=Bh("reps",e,t,n);return[r.tile(Bh("x",e,t,n),a)]}case"Split":case"SplitV":{const a=Bh("axis",e,t,n),i=Bh("numOrSizeSplits",e,t,n),o=Bh("x",e,t,n);return r.split(o,i,a)}case"ScatterNd":{const a=Bh("indices",e,t,n),i=Bh("values",e,t,n),o=Bh("shape",e,t,n);return[r.scatterND(a,i,o)]}case"GatherNd":{const a=Bh("x",e,t,n),i=Bh("indices",e,t,n);return[r.gatherND(a,i)]}case"SparseToDense":{const a=Bh("sparseIndices",e,t,n),i=Bh("outputShape",e,t,n),o=Bh("sparseValues",e,t,n),s=Bh("defaultValue",e,t,n);return[r.sparseToDense(a,o,i,o.dtype===s.dtype?s:r.cast(s,o.dtype))]}case"TensorScatterUpdate":{const a=Bh("indices",e,t,n),i=Bh("values",e,t,n),o=Bh("tensor",e,t,n);return[r.tensorScatterUpdate(o,a,i)]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"sparse":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"SparseFillEmptyRows":{const{outputIndices:a,outputValues:i,emptyRowIndicator:o,reverseIndexMap:s}=r.sparse.sparseFillEmptyRows(Bh("indices",e,t,n),Bh("values",e,t,n),Bh("denseShape",e,t,n),Bh("defaultValue",e,t,n));return[a,i,o,s]}case"SparseReshape":{const{outputIndices:a,outputShape:i}=r.sparse.sparseReshape(Bh("inputIndices",e,t,n),Bh("inputShape",e,t,n),Bh("newShape",e,t,n));return[a,i]}case"SparseSegmentMean":return[r.sparse.sparseSegmentMean(Bh("data",e,t,n),Bh("indices",e,t,n),Bh("segmentIds",e,t,n))];case"SparseSegmentSum":return[r.sparse.sparseSegmentSum(Bh("data",e,t,n),Bh("indices",e,t,n),Bh("segmentIds",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"spectral":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"FFT":return[r.fft(Bh("x",e,t,n))];case"IFFT":return[r.ifft(Bh("x",e,t,n))];case"RFFT":return[r.rfft(Bh("x",e,t,n))];case"IRFFT":return[r.irfft(Bh("x",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"string":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"StaticRegexReplace":return[r.string.staticRegexReplace(Bh("input",e,t,n),Bh("pattern",e,t,n),Bh("rewrite",e,t,n),Bh("replaceGlobal",e,t,n))];case"StringNGrams":{const{nGrams:a,nGramsSplits:i}=r.string.stringNGrams(Bh("data",e,t,n),Bh("dataSplits",e,t,n),Bh("separator",e,t,n),Bh("nGramWidths",e,t,n),Bh("leftPad",e,t,n),Bh("rightPad",e,t,n),Bh("padWidth",e,t,n),Bh("preserveShortSequences",e,t,n));return[a,i]}case"StringSplit":{const{indices:a,values:i,shape:o}=r.string.stringSplit(Bh("input",e,t,n),Bh("delimiter",e,t,n),Bh("skipEmpty",e,t,n));return[a,i,o]}case"StringToHashBucketFast":return[r.string.stringToHashBucketFast(Bh("input",e,t,n),Bh("numBuckets",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"transformation":return a((()=>((e,t,n,r=C)=>{switch(e.op){case"Cast":return[r.cast(Bh("x",e,t,n),Bh("dtype",e,t,n))];case"ExpandDims":{const a=Bh("axis",e,t,n);return[r.expandDims(Bh("x",e,t,n),a)]}case"Squeeze":{const a=Bh("axis",e,t,n);return[r.squeeze(Bh("x",e,t,n),a)]}case"Reshape":return[r.reshape(Bh("x",e,t,n),Bh("shape",e,t,n))];case"EnsureShape":return[r.ensureShape(Bh("x",e,t,n),Bh("shape",e,t,n))];case"MirrorPad":return[r.mirrorPad(Bh("x",e,t,n),Bh("padding",e,t,n),Bh("mode",e,t,n))];case"PadV2":case"Pad":return[r.pad(Bh("x",e,t,n),Bh("padding",e,t,n),Bh("constantValue",e,t,n))];case"SpaceToBatchND":{const a=Bh("blockShape",e,t,n),i=Bh("paddings",e,t,n);return[r.spaceToBatchND(Bh("x",e,t,n),a,i)]}case"BatchToSpaceND":{const a=Bh("blockShape",e,t,n),i=Bh("crops",e,t,n);return[r.batchToSpaceND(Bh("x",e,t,n),a,i)]}case"DepthToSpace":{const a=Bh("blockSize",e,t,n),i=Bh("dataFormat",e,t,n).toUpperCase();return[r.depthToSpace(Bh("x",e,t,n),a,i)]}case"BroadcastTo":return[r.broadcastTo(Bh("x",e,t,n),Bh("shape",e,t,n))];case"BroadcastArgs":return[r.broadcastArgs(Bh("s0",e,t,n),Bh("s1",e,t,n))];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n)));case"hash_table":return(async(e,t,n,r)=>{switch(e.op){case"HashTable":case"HashTableV2":{const a=r.getHashTableHandleByName(e.name);if(null!=a)return[a];{const a=Bh("keyDType",e,t,n),i=Bh("valueDType",e,t,n),o=new Bf(a,i);return r.addHashTable(e.name,o),[o.handle]}}case"InitializeTable":case"InitializeTableV2":case"LookupTableImport":case"LookupTableImportV2":{const a=Bh("tableHandle",e,t,n,r),i=Bh("keys",e,t,n),o=Bh("values",e,t,n),s=r.getHashTableById(a.id);return[await s.import(i,o)]}case"LookupTableFind":case"LookupTableFindV2":{const a=Bh("tableHandle",e,t,n,r),i=Bh("keys",e,t,n),o=Bh("defaultValue",e,t,n),s=r.getHashTableById(a.id);return[await s.find(i,o)]}case"LookupTableSize":case"LookupTableSizeV2":{const a=Bh("tableHandle",e,t,n,r);return[r.getHashTableById(a.id).tensorSize()]}default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n,r);case"custom":const i=Lh(e.op);if(i&&i.customExecutor)return i.customExecutor(new Ef(e,t,n));throw TypeError(`Custom op ${e.op} is not registered.`);default:throw TypeError(`Unknown op '${e.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(e,t,n);return D.util.isPromise(i)?i.then((e=>[].concat(e))):[].concat(i)}class Vf{constructor(e={},t={},n={},r={},a){this.weightMap=e,this.tensorArrayMap=t,this.tensorListMap=n,this.functionMap=r,this.parseNodeNameCache=a,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(e,t){return{id:e,frameName:t,iterationId:0}}set currentContext(e){this.contexts!==e&&(this.contexts=e,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){const e=[];for(let t=0;t0===e.id&&0===e.iterationId?"":`${e.frameName}-${e.iterationId}`)).join("/"):""}enterFrame(e){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,e)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(!(this.contexts&&this.contexts.length>1))throw new Error("Cannot exit frame, the context is empty");this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift()}nextIteration(){if(!(this.contexts&&this.contexts.length>0))throw new Error("Cannot increase frame iteration, the context is empty");{this.contexts=this.contexts.slice(),this.lastId++;const e=Object.assign({},this.contexts[this.contexts.length-1]);e.iterationId+=1,e.id=this.lastId,this.contexts.splice(-1,1,e),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}}getWeight(e){return this.weightMap[e]}addTensorArray(e){this.tensorArrayMap[e.id]=e}getTensorArray(e){return this.tensorArrayMap[e]}addTensorList(e){this.tensorListMap[e.id]=e}getTensorList(e){return this.tensorListMap[e]}dispose(e){for(const t in this.tensorArrayMap)this.tensorArrayMap[t].clearAndClose(e);for(const t in this.tensorListMap)this.tensorListMap[t].clearAndClose(e)}}function zf(e,t,n,r){const a=new Set,i=[];let o=null,s=null;const l=new Set,u=new Set(Object.keys(e).map((e=>Uh(e)[0])));r=r||[];const c=new Set(r.map((e=>Uh(e.name)[0]))),d=[...t];for(;d.length>0;){const e=d.pop();(Yf(e)||Gf(e)||Xf(e))&&null==o&&(o=e,s=o.children.map((e=>e.name)).filter((e=>a.has(e)))),a.add(e.name),null==n[e.name]&&(u.has(e.name)||c.has(e.name)||(0!==e.inputs.length?e.inputs.forEach((e=>{l.has(e.name)||(l.add(e.name),d.push(e))})):i.push(e.name)))}return{inputs:e,outputs:t,usedNodes:a,missingInputs:i,dynamicNode:o,syncInputs:s}}function Hf(e,t){const{usedNodes:n,inputs:r}=t,a=Object.keys(r).map((e=>Uh(e)[0])).map((t=>e.nodes[t])),i=e.initNodes||[],o=e=>n.has("string"===typeof e?e:e.name);function s(e){return[...new Map(e.map((e=>[e.name,e]))).values()]}const l=s([...a,...e.weights,...i]).filter(o),u=s([...l,...Object.values(e.nodes)]).filter(o),c=new Map(u.map((e=>[e.name,e]))),d={};for(const m of u){d[m.name]=d[m.name]||0;for(const e of m.children)o(e)||(d[e.name]=Number.POSITIVE_INFINITY),d[e.name]=(d[e.name]||0)+1}const h=Object.entries(d).filter((([,e])=>0===e)).map((([e])=>e)),f=[...h];for(;h.length>0;){const e=h.pop(),t=c.get(e);for(const n of t.children.filter(o))0===--d[n.name]&&(f.push(n.name),h.push(n.name))}const p=function(e,t){const n=new Map(e.map((e=>[e.name,e]))),r=t.map((e=>e.name)),a=new Set(r);for(;r.length>0;){const e=r.pop(),t=n.get(e);for(const i of t.children)n.has(i.name)&&!a.has(i.name)&&(a.add(i.name),r.push(i.name))}const i=e.filter((e=>a.has(e.name)));return i}(f.map((e=>c.get(e))),l);return function(e,t){const n=new Map(e.map(((e,t)=>[e.name,t]))),r=new Set(t.map((e=>e.name))),a=e=>r.has("string"===typeof e?e:e.name),i=new Set(e.map((e=>e.name))),o=e=>i.has("string"===typeof e?e:e.name);for(const s of e){for(const e of s.children.filter(o)){if(!n.has(e.name))throw new Uf(`Child ${e.name} of node ${s.name} is unreachable.`);if(n.get(s.name)>n.get(e.name))throw new Uf(`Node ${s.name} is scheduled to run after its child ${e.name}.`)}if(!a(s))for(const e of s.inputs){if(!n.has(e.name))throw new Uf(`Input ${e.name} of node ${s.name} is unreachable.`);if(n.get(e.name)>n.get(s.name))throw new Uf(`Node ${s.name} is scheduled to run before its input ${e.name}.`)}}}(p,l),p}class Uf extends Error{constructor(e){super(`NodesExecutionOrderError: ${e}`)}}const Wf=new Set(["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"]),qf=new Set(["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"]),$f=new Set(["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"]);function Yf(e){return Wf.has(e.op)}function Gf(e){return qf.has(e.op)}function Xf(e){return $f.has(e.op)}class Kf{get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(e){const t=Object.keys(e).map((t=>e[t].map((e=>e.id))));this._weightIds=[].concat(...t),this._weightMap=e}set resourceManager(e){this._resourceManager=e}get inputs(){return this._inputs.map((e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0})))}get outputs(){return this._outputs.map((e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0})))}get inputNodes(){return this._inputs.map((e=>e.signatureKey||e.name))}get outputNodes(){return this._outputs.map((e=>{const t=e.signatureKey||e.name;return e.defaultOutput?`${t}:${e.defaultOutput}`:t}))}get functions(){return Object.keys(this._functions).reduce(((e,t)=>(e[t]=this._functions[t].signature,e)),{})}constructor(e,t){this.graph=e,this.parent=t,this.compiledMap=new Map,this.parseNodeNameCache=new Map,this._weightMap={},this.SEPARATOR=",",this._functions={},this._functionExecutorMap={},this.keepIntermediateTensors=!1,this._outputs=e.outputs,this._inputs=e.inputs,this._initNodes=e.initNodes,this._signature=e.signature,this._functions=e.functions,null!=e.functions&&Object.keys(e.functions).forEach((t=>{this._functionExecutorMap[t]=new Kf(e.functions[t],this)}))}getCompilationKey(e,t){const n=e.map((e=>e.name)).sort(),r=t.map((e=>e.name)).sort();return n.join(this.SEPARATOR)+"--"+r.join(this.SEPARATOR)}compile(e,t){const n=zf(e,t,this.weightMap,this._initNodes),{missingInputs:r,dynamicNode:a,syncInputs:i}=n;if(null!=a)throw new Error(`This execution contains the node '${a.name}', which has the dynamic op '${a.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${i}]`);if(r.length>0){const n=t.map((e=>e.name)),a=Object.keys(e);throw new Error(`Cannot compute the outputs [${n}] from the provided inputs [${a}]. Missing the following inputs: [${r}]`)}const o=Hf(this.graph,n),s=function(e){const t=new Map(e.map(((e,t)=>[e.name,t]))),n=Number.MAX_SAFE_INTEGER,r=e.map(((e,t)=>Yf(e)?n:t)),a=e=>{const n=r[t.get(e.name)];return null==n?-1:n},i=e.map(((e,t)=>e.children.map(a).reduce(((e,t)=>Math.max(e,t)),r[t]))),o=new Map;for(let s=0;sthis.cloneAndKeepTensor(e)));return t}cloneTensorMap(e){return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,this.cloneTensorList(t)])))}execute(e,t){this.disposeIntermediateTensors(),e=this.mapInputs(e);const n=Object.keys(e).sort();this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t);const r=n.map((e=>this.graph.nodes[Uh(e)[0]])),a=t.map((e=>Uh(e)[0])),i=new Set(a);let o=a.map((e=>this.graph.nodes[e]));0===o.length&&(o=this._outputs);const s=this.getCompilationKey(r,o);let l=this.compiledMap.get(s);null==l&&(l=this.compile(e,o),this.compiledMap.set(s,l));try{this.keepIntermediateTensors=(0,D.env)().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(d){this.keepIntermediateTensors=!1,console.warn(d.message)}const u={},c={};return(0,D.tidy)((()=>{const n=new Vf(this.weightMap,u,c,this.functionExecutorMap,this.parseNodeNameCache),r=Object.assign({},this.weightMap);this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap)),Object.keys(e).forEach((t=>{const[a,i]=Uh(t,n),o=[];o[i]=e[t],r[a]=o,this.keepIntermediateTensors&&(this.clonedTensorsMap[a]=this.cloneTensorList(o))}));const a=this.getFrozenTensorIds(r),{orderedNodes:o,nodeLiveUntilMap:s}=l;for(const e of o){if(r[e.name])continue;const t=jf(e,r,n,this._resourceManager);if(D.util.isPromise(t))throw new Error(`The execution of the op '${e.op}' returned a promise. Please use model.executeAsync() instead.`);r[e.name]=t,this.keepIntermediateTensors&&(this.clonedTensorsMap[e.name]=this.cloneTensorList(t)),this.checkTensorForDisposalWithNodeLiveUntilInfo(e,r,n,a,i,s.get(e.name))}return null==this.parent&&n.dispose(a),t.map((e=>jh(e,r,n)))}))}getFrozenTensorIds(e){const t=[].concat.apply([],Object.keys(e).map((t=>e[t])).map((e=>e.map((e=>e.id)))));return new Set(t)}checkTensorForDisposal(e,t,n,r,a,i,o){if(!Yf(t)&&!i.has(e)){for(const r of n[e])null!=r&&(o[r.id]=(o[r.id]||0)+t.children.length);for(const e of t.inputs){if(Yf(e))continue;const t=Vh(e.name,n,r);if(null!=t)for(const e of t){if(!e||e.kept||a.has(e.id))continue;const t=o[e.id];1===t?(e.dispose(),delete o[e.id]):null!=t&&o[e.id]--}}}}checkTensorForDisposalWithNodeLiveUntilInfo(e,t,n,r,a,i){function o(e){return Yf(e)||a.has(e.name)}if(!Yf(e)&&null!=i)for(const s of i){if(o(s))continue;const e=Vh(s.name,t,n);for(const t of e)!t||t.kept||r.has(t.id)||t.dispose()}}async executeAsync(e,t){return this._executeAsync(e,t)}disposeIntermediateTensors(){this.clonedTensorsMap&&(Object.values(this.clonedTensorsMap).forEach((e=>{for(const t of e)t&&!t.isDisposed&&t.dispose()})),this.clonedTensorsMap=null)}getIntermediateTensors(){return this.clonedTensorsMap}async _executeAsync(e,t,n=!1,r={},a={}){this.disposeIntermediateTensors(),n||(e=this.mapInputs(e),this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t));try{this.keepIntermediateTensors=(0,D.env)().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(d){this.keepIntermediateTensors=!1,console.warn(d.message)}const i=new Vf(this.weightMap,r,a,this.functionExecutorMap,this.parseNodeNameCache);this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap));const o=await this.executeWithControlFlow(e,i,t,n),s=t.map((e=>jh(e,o,i))),l=s.map((e=>e.id)),u=Object.keys(e).map((t=>e[t].id)),c=new Set([...l,...u,...this.weightIds]);return Object.values(o).forEach((e=>{e.forEach((e=>{!e||e.isDisposed||c.has(e.id)||e.dispose()}))})),null==this.parent&&i.dispose(c),s}async executeFunctionAsync(e,t,n){const r=e.reduce(((e,t,n)=>(e[this.inputs[n].name]=t,e)),{});return this._executeAsync(r,this.outputNodes,!0,t,n)}async executeWithControlFlow(e,t,n,r){const a=Object.keys(e),i=a.map((e=>this.graph.nodes[Uh(e)[0]])),o=n.map((e=>Uh(e)[0])),s=new Set(o);let l=o.map((e=>this.graph.nodes[e]));0===l.length&&(l=this._outputs);const{usedNodes:u,missingInputs:c,dynamicNode:d,syncInputs:h}=zf(e,l,this.weightMap,this._initNodes),f=[...i,...this.graph.weights,...this._initNodes||[]].map((e=>({node:e,contexts:t.currentContext}))),p=Object.assign({},this.weightMap);Object.keys(e).forEach((t=>{const[n,r]=Uh(t),a=[];a[r]=e[t],p[n]=a}));const m={},g=this.getFrozenTensorIds(p),y={};for(;f.length>0;){const e=this.processStack(i,f,t,p,y,g,s,m,u);await Promise.all(e)}null!=d||r||console.warn("This model execution did not contain any nodes with control flow or dynamic output shapes. You can use model.execute() instead.");const _=l.filter((e=>!Yf(e)&&!jh(e.name,p,t))).map((e=>e.name));if(_.length>0){let e="";throw null!=d&&(e=`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${h}]`),new Error(`Cannot compute the outputs [${_}] from the provided inputs [${a}]. Consider providing the following inputs: [${c}]. ${e}`)}return p}processStack(e,t,n,r,a,i,o,s,l){const u=[];for(;t.length>0;){const e=t.pop();n.currentContext=e.contexts;let c="";if("Enter"===e.node.op&&Bh("isConstant",e.node,r,n)&&([c]=zh(e.node.name,n)),null==r[e.node.name]){const d=jf(e.node,r,n,this._resourceManager);c||([c]=zh(e.node.name,n));const h=n.currentContext;D.util.isPromise(d)?u.push(d.then((u=>(r[c]=u,this.keepIntermediateTensors&&(this.clonedTensorsMap[c]=this.cloneTensorList(u)),n.currentContext=h,this.checkTensorForDisposal(c,e.node,r,n,i,o,s),this.processChildNodes(e.node,t,n,r,a,l),u)))):(r[c]=d,this.keepIntermediateTensors&&(this.clonedTensorsMap[c]=this.cloneTensorList(d)),this.checkTensorForDisposal(c,e.node,r,n,i,o,s),this.processChildNodes(e.node,t,n,r,a,l))}else this.processChildNodes(e.node,t,n,r,a,l)}return u}processChildNodes(e,t,n,r,a,i){e.children.forEach((e=>{const[o]=zh(e.name,n);!a[o]&&i.has(e.name)&&("Merge"===e.op?e.inputNames.some((e=>!!jh(e,r,n)))&&(a[o]=!0,t.push({contexts:n.currentContext,node:e})):e.inputNames.every((e=>!!jh(e,r,n)))&&(a[o]=!0,t.push({contexts:n.currentContext,node:e})))}))}dispose(){Object.keys(this.weightMap).forEach((e=>this.weightMap[e].forEach((e=>e.dispose()))))}checkInputShapeAndType(e){Object.keys(e).forEach((t=>{const n=e[t],[r]=Uh(t),a=this.graph.nodes[r];if(a.attrParams.shape&&a.attrParams.shape.value){const e=a.attrParams.shape.value,t=e.length===n.shape.length&&n.shape.every(((t,n)=>-1===e[n]||e[n]===t));D.util.assert(t,(()=>`The shape of dict['${a.name}'] provided in model.execute(dict) must be [${e}], but was [${n.shape}]`))}a.attrParams.dtype&&a.attrParams.dtype.value&&D.util.assert(n.dtype===a.attrParams.dtype.value,(()=>`The dtype of dict['${a.name}'] provided in model.execute(dict) must be ${a.attrParams.dtype.value}, but was ${n.dtype}`))}))}mapInputs(e){var t,n;const r={};for(const a in e){const i=null===(n=null===(t=this._signature)||void 0===t?void 0:t.inputs)||void 0===n?void 0:n[a];null!=i?r[i.name]=e[a]:r[a]=e[a]}return r}checkInputs(e){const t=Object.keys(e).filter((e=>{const[t]=Uh(e);return null==this.graph.nodes[t]}));if(t.length>0)throw new Error(`The dict provided in model.execute(dict) has keys: [${t}] that are not part of graph`)}mapOutputs(e){return e.map((e=>{var t,n;const r=null===(n=null===(t=this._signature)||void 0===t?void 0:t.outputs)||void 0===n?void 0:n[e];return null!=r?r.name:e}),{})}checkOutputs(e){e.forEach((e=>{const[t]=Uh(e);if(!this.graph.nodes[t])throw new Error(`The output '${e}' is not found in the graph`)}))}}class Jf{constructor(e={},t={}){this.hashTableNameToHandle=e,this.hashTableMap=t}addHashTable(e,t){this.hashTableNameToHandle[e]=t.handle,this.hashTableMap[t.id]=t}getHashTableHandleByName(e){return this.hashTableNameToHandle[e]}getHashTableById(e){return this.hashTableMap[e]}dispose(){for(const e in this.hashTableMap)this.hashTableMap[e].clearAndClose(),delete this.hashTableMap[e];for(const e in this.hashTableNameToHandle)this.hashTableNameToHandle[e].dispose(),delete this.hashTableNameToHandle[e]}}var Zf=n(30693);const Qf="?tfjs-format=file",ep="model.json";class tp{get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}get modelStructuredOutputKeys(){return this.structuredOutputKeys}constructor(e,t={},n=D.io){this.modelUrl=e,this.loadOptions=t,this.version="n/a",this.io=n,null==t&&(this.loadOptions={}),this.resourceManager=new Jf}findIOHandler(){const e=this.modelUrl;if(null!=e.load)this.handler=e;else if(null!=this.loadOptions.requestInit)this.handler=this.io.browserHTTPRequest(e,this.loadOptions);else{const t=this.io.getLoadHandlers(e,this.loadOptions);if(0===t.length)t.push(this.io.browserHTTPRequest(e,this.loadOptions));else if(t.length>1)throw new Error(`Found more than one (${t.length}) load handlers for URL '${[e]}'`);this.handler=t[0]}}load(){if(this.findIOHandler(),null==this.handler.load)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const e=this.handler.load();return D.util.isPromise(e)?e.then((e=>null==e.getWeightStream?this.loadSync(e):this.loadStreaming(e))):this.loadSync(e)}loadSync(e){const t=this.io.decodeWeights(e.weightData,e.weightSpecs);return this.loadWithWeightMap(e,t)}async loadStreaming(e){if(null==e.getWeightStream)throw new Error("Model artifacts missing streamWeights function");const t=await(0,Zf.decodeWeightsStream)(e.getWeightStream(),e.weightSpecs);return this.loadWithWeightMap(e,t)}loadWithWeightMap(e,t){this.artifacts=e;const n=this.artifacts.modelTopology;let r=this.artifacts.signature;if(null!=this.artifacts.userDefinedMetadata){const e=this.artifacts.userDefinedMetadata;null!=e.signature&&(r=e.signature),null!=e.structuredOutputKeys&&(this.structuredOutputKeys=e.structuredOutputKeys)}if(this.signature=r,this.version=`${n.versions.producer}.${n.versions.minConsumer}`,this.executor=new Kf(hf.Instance.transformGraph(n,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(t),this.executor.resourceManager=this.resourceManager,null!=e.modelInitializer&&null!=e.modelInitializer.node){const t=hf.Instance.transformGraph(e.modelInitializer);this.initializer=new Kf(t),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializerSignature=e.initializerSignature}return!0}async save(e,t){if("string"===typeof e){const t=this.io.getSaveHandlers(e);if(0===t.length)throw new Error(`Cannot find any save handlers for URL '${e}'`);if(t.length>1)throw new Error(`Found more than one (${t.length}) save handlers for URL '${e}'`);e=t[0]}if(null==e.save)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return e.save(this.artifacts)}addStructuredOutputNames(e){if(this.structuredOutputKeys){const t=e instanceof D.Tensor?[e]:e,n={};return t.forEach(((e,t)=>n[this.structuredOutputKeys[t]]=e)),n}return e}predict(e,t){const n=this.execute(e,this.outputNodes);return this.addStructuredOutputNames(n)}async predictAsync(e,t){const n=await this.executeAsync(e,this.outputNodes);return this.addStructuredOutputNames(n)}normalizeInputs(e){var t;if(!(e instanceof D.Tensor)&&!Array.isArray(e)){const n=null===(t=this.signature)||void 0===t?void 0:t.inputs;if(null!=n)for(const t in n){const r=n[t];null!=r.resourceId&&(e[t]=this.resourceIdToCapturedInput[r.resourceId])}return e}e=Array.isArray(e)?e:[e];const n=Object.keys(this.resourceIdToCapturedInput).length;if(e.length+n!==this.inputNodes.length)throw new Error(`Input tensor count mismatch, the graph model has ${this.inputNodes.length-n} non-resource placeholders, while there are ${e.length} input tensors provided.`);let r=0;return this.inputNodes.reduce(((t,n)=>{var a,i,o;const s=null===(o=null===(i=null===(a=this.signature)||void 0===a?void 0:a.inputs)||void 0===i?void 0:i[n])||void 0===o?void 0:o.resourceId;return t[n]=null!=s?this.resourceIdToCapturedInput[s]:e[r++],t}),{})}normalizeOutputs(e){return e=e||this.outputNodes,Array.isArray(e)?e:[e]}executeInitializerGraph(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.execute({},[]):this.initializer.execute({},Object.keys(this.initializerSignature.outputs))}async executeInitializerGraphAsync(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.executeAsync({},[]):this.initializer.executeAsync({},Object.keys(this.initializerSignature.outputs))}setResourceIdToCapturedInput(e){if(this.resourceIdToCapturedInput={},this.initializerSignature){const t=this.initializerSignature.outputs,n=Object.keys(t);for(let r=0;r1?n:n[0]}async executeAsync(e,t){null==this.resourceIdToCapturedInput&&this.setResourceIdToCapturedInput(await this.executeInitializerGraphAsync()),e=this.normalizeInputs(e),t=this.normalizeOutputs(t);const n=await this.executor.executeAsync(e,t);return n.length>1?n:n[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(e){return Object.keys(e).reduce(((t,n)=>(t[n]=[e[n]],t)),{})}dispose(){this.executor.dispose(),this.initializer&&(this.initializer.dispose(),this.resourceIdToCapturedInput&&(0,D.dispose)(this.resourceIdToCapturedInput)),this.resourceManager.dispose()}}async function np(e,t={},n=D.io){if(null==e)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");null==t&&(t={}),t.fromTFHub&&"string"===typeof e&&(e=function(e){e.endsWith("/")||(e+="/");return`${e}${ep}${Qf}`}(e));const r=new tp(e,t,n);return await r.load(),r}function rp(e){if(null==e)throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model");let t;if(e instanceof Array){const[n,r]=e;if(!n)throw new Error("modelJSON must be the first element of the array");if(!r||!(r instanceof ArrayBuffer))throw new Error("An ArrayBuffer of weights must be the second element of the array");if(!("modelTopology"in n))throw new Error("Model JSON is missing 'modelTopology'");if(!("weightsManifest"in n))throw new Error("Model JSON is missing 'weightsManifest'");const a=D.io.getWeightSpecs(n.weightsManifest),i=D.io.getModelArtifactsForJSONSync(n,a,r);t=D.io.fromMemorySync(i)}else if("load"in e)t=e;else{if(!("modelTopology"in e&&"weightSpecs"in e&&"weightData"in e))throw new Error("Unknown model format");t=D.io.fromMemorySync(e)}const n=new tp(t);return n.load(),n}const ap="4.22.0";var ip,op=n(31472);function sp(e,t,n=new Map,r=new Set){if(null==e)return null;if("function"===typeof Blob&&e instanceof Blob)return e.slice();if(r.has(e))throw new Error("Circular references are not supported.");if(n.has(e))return n.get(e);const a=t(e);if(a.recurse&&null!==a.value)throw new Error("A deep map function may not return both a value and recurse=true.");if(a.recurse){if(hp(e)){const a=Array.isArray(e)?[]:{};r.add(e);for(const i in e){const o=sp(e[i],t,n,r);a[i]=o}return r.delete(e),e.__proto__&&(a.__proto__=e.__proto__),a}throw new Error(`Can't recurse into non-iterable type: ${e}`)}return n.set(e,a.value),a.value}function lp(e,t=cp){return up(e,t)}function up(e,t,n=new Set){const r=e[0];if(n.has(r))throw new Error("Circular references are not supported.");const a=t(e);if(a.recurse&&null!==a.value)throw new Error("A deep zip function may not return both a value and recurse=true.");if(a.recurse){if(hp(r)){const a=Array.isArray(r)?[]:{};n.add(r);for(const i in r){const r=up(e.map((e=>e[i])),t,n);a[i]=r}return n.delete(r),a}throw new Error(`Can't recurse into non-iterable type: ${r}`)}return a.value}function cp(e){return null===e?null:hp(e[0])?{value:null,recurse:!0}:{value:e,recurse:!1}}async function dp(e,t){const n=new Map;sp(e,t,n);for(const r of Array.from(n.keys())){const e=n.get(r);if(D.util.isPromise(e)){const t=await e;n.set(r,t)}}return sp(e,t,n)}function hp(e){let t=!1;if(D.env().get("IS_BROWSER"))t=e instanceof TextDecoder;else{const{StringDecoder:r}=n(80551);t=e instanceof r}return null!=e&&!ArrayBuffer.isView(e)&&(Array.isArray(e)||"object"===typeof e&&!(e instanceof D.Tensor)&&!(e instanceof Promise)&&!t)}function fp(e){return function(e,t){return sp(e,t)}(e,pp)}function pp(e){return e instanceof D.Tensor?{value:e.clone(),recurse:!1}:hp(e)?{value:null,recurse:!0}:{value:e,recurse:!1}}class mp{constructor(e){if(this.capacity=e,this.begin=0,this.end=0,null==e)throw new RangeError("Can't create a ring buffer of unknown capacity.");if(e<1)throw new RangeError("Can't create ring buffer of capacity < 1.");this.data=new Array(e),this.doubledCapacity=2*e}wrap(e){for(;e<0;)e+=this.doubledCapacity;return e%this.doubledCapacity}get(e){if(e<0)throw new RangeError("Can't get item at a negative index.");return this.data[e%this.capacity]}set(e,t){if(e<0)throw new RangeError("Can't set item at a negative index.");this.data[e%this.capacity]=t}length(){let e=this.end-this.begin;return e<0&&(e=this.doubledCapacity+e),e}isFull(){return this.length()===this.capacity}isEmpty(){return 0===this.length()}push(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.set(this.end,e),this.end=this.wrap(this.end+1)}pushAll(e){for(const t of e)this.push(t)}pop(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");this.end=this.wrap(this.end-1);const e=this.get(this.end);return this.set(this.end,void 0),e}unshift(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.begin=this.wrap(this.begin-1),this.set(this.begin,e)}shift(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");const e=this.get(this.begin);return this.set(this.begin,void 0),this.begin=this.wrap(this.begin+1),e}shuffleExcise(e){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");const t=this.wrap(this.begin+e),n=this.get(t);return this.set(t,this.pop()),n}}class gp extends mp{constructor(){super(gp.INITIAL_CAPACITY)}isFull(){return!1}push(e){super.isFull()&&this.expand(),super.push(e)}unshift(e){super.isFull()&&this.expand(),super.unshift(e)}expand(){const e=2*this.capacity,t=new Array(e),n=this.length();for(let r=0;r!0===e))}rowMajorBatch(e,t=!0){return new Sp(this,e,t)}columnMajorBatch(e,t=!0,n=cp){return this.rowMajorBatch(e,t).map((e=>lp(e,n)))}concatenate(e,t){return new Pp(yp([this,e]),t)}take(e){return e<0||null==e?this:new Ap(this,e)}skip(e){return e<0||null==e?this:new xp(this,e)}prefetch(e){return new Rp(this,e)}shuffle(e,t){return new Lp(this,e,t)}serial(){return new kp(this)}}class wp extends vp{constructor(e){super(),this.items=e,this.trav=0}summary(){return`Array of ${this.items.length} items`}async next(){if(this.trav>=this.items.length)return{value:null,done:!0};const e=this.items[this.trav];return this.trav++,{value:fp(e),done:!1}}}class Fp extends vp{constructor(e){super(),this.nextFn=e}summary(){return"Function call"}async next(){try{return this.nextFn()}catch(e){throw e.message=`Error thrown while iterating through a dataset: ${e.message}`,e}}}class kp extends vp{constructor(e){super(),this.upstream=e,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Serial`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){return this.upstream.next()}}class xp extends vp{constructor(e,t){super(),this.upstream=e,this.maxCount=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Skip`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;this.count++ Take`}async next(){return this.count++>=this.maxCount?{value:null,done:!0}:this.upstream.next()}}class Sp extends vp{constructor(e,t,n=!0){super(),this.upstream=e,this.batchSize=t,this.enableSmallLastBatch=n,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> RowMajorBatch`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){const e=[];for(;e.length0?{value:e,done:!1}:{value:null,done:!0};e.push(t.value)}return{value:e,done:!1}}}class Ep extends vp{constructor(e,t){super(),this.upstream=e,this.predicate=t,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> Filter`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;;){const e=await this.upstream.next();if(e.done||this.predicate(e.value))return e;D.dispose(e.value)}}}class Cp extends vp{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Map`}async next(){const e=await this.upstream.next();if(e.done)return{value:null,done:!0};const t=D.tensor_util.getTensorsInContainer(e.value),n=this.transform(e.value),r=D.tensor_util.getTensorsInContainer(n);for(const a of t)D.tensor_util.isTensorInList(a,r)||a.dispose();return{value:n,done:!1}}}class Tp extends vp{constructor(e,t){super(),this.upstream=e,this.handler=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return`${this.upstream.summary()} -> handleErrors`}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;;)try{return await this.upstream.next()}catch(e){if(!this.handler(e))return{value:null,done:!0}}}}class Dp extends vp{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> AsyncMap`}async next(){const e=await this.upstream.next();if(e.done)return{value:null,done:!0};const t=D.tensor_util.getTensorsInContainer(e.value),n=await this.transform(e.value),r=D.tensor_util.getTensorsInContainer(n);for(const a of t)D.tensor_util.isTensorInList(a,r)||a.dispose();return{value:n,done:!1}}}class Ip extends vp{constructor(){super(),this.outputQueue=new gp,this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}async serialNext(){for(;0===this.outputQueue.length();)if(!await this.pump())return{value:null,done:!0};return{value:this.outputQueue.shift(),done:!1}}}class Op extends Ip{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return`${this.upstream.summary()} -> Flatmap`}async pump(){const e=await this.upstream.next();if(e.done)return!1;const t=D.tensor_util.getTensorsInContainer(e.value),n=this.transform(e.value),r=D.tensor_util.getTensorsInContainer(n);this.outputQueue.pushAll(n);for(const a of t)D.tensor_util.isTensorInList(a,r)||a.dispose();return!0}}class Pp extends vp{constructor(e,t){super(),this.baseErrorHandler=t,this.lastRead=null,this.iterator=null,this.moreIterators=e}summary(){return"TODO: fill in upstream of chained summaries -> Chained"}async next(){return this.lastRead=this.readFromChain(this.lastRead),this.lastRead}async readFromChain(e){if(await e,null==this.iterator){const e=await this.moreIterators.next();if(e.done)return{value:null,done:!0};this.iterator=e.value,null!=this.baseErrorHandler&&(this.iterator=this.iterator.handleErrors(this.baseErrorHandler))}const t=await this.iterator.next();return t.done?(this.iterator=null,this.readFromChain(e)):t}}!function(e){e[e.FAIL=0]="FAIL",e[e.SHORTEST=1]="SHORTEST",e[e.LONGEST=2]="LONGEST"}(ip||(ip={}));class Mp extends vp{constructor(e,t=ip.FAIL){super(),this.iterators=e,this.mismatchMode=t,this.count=0,this.currentPromise=null}summary(){return"{TODO: fill in upstream of zip summaries} -> Zip"}async nextState(e){await e;let t=0,n=0;const r=await dp(this.iterators,(function(e){if(e instanceof vp){return{value:e.next().then((e=>(t++,e.done&&n++,e.value))),recurse:!1}}return{value:null,recurse:!0}}));if(t===n)return{value:null,done:!0};if(n>0)switch(this.mismatchMode){case ip.FAIL:throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);case ip.SHORTEST:return{value:null,done:!0};case ip.LONGEST:}return this.count++,{value:r,done:!1}}async next(){return this.currentPromise=this.nextState(this.currentPromise),this.currentPromise}}class Rp extends vp{constructor(e,t){super(),this.upstream=e,this.bufferSize=t,this.buffer=new mp(t)}summary(){return`${this.upstream.summary()} -> Prefetch`}refill(){for(;!this.buffer.isFull();){const e=this.upstream.next();this.buffer.push(e)}}next(){return this.refill(),this.buffer.shift()}}class Lp extends Rp{constructor(e,t,n){super(e,t),this.upstream=e,this.windowSize=t,this.upstreamExhausted=!1,this.random=op.alea(n||D.util.now().toString()),this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then((()=>this.serialNext())),this.lastRead}randomInt(e){return Math.floor(this.random()*e)}chooseIndex(){return this.randomInt(this.buffer.length())}async serialNext(){for(this.upstreamExhausted||this.refill();!this.buffer.isEmpty();){const e=this.chooseIndex(),t=await this.buffer.shuffleExcise(e);if(!t.done)return this.refill(),t;this.upstreamExhausted=!0}return{value:null,done:!0}}}class Np{constructor(){this.size=null}batch(e,t=!0){const n=this;let r;return D.util.assert(e>0,(()=>`batchSize needs to be positive, but it is\n ${e}`)),r=this.size===1/0||null==this.size?this.size:t?Math.ceil(this.size/e):Math.floor(this.size/e),Bp((async()=>(await n.iterator()).columnMajorBatch(e,t,zp)),r)}concatenate(e){const t=this;let n;return n=this.size===1/0||e.size===1/0?1/0:null!=this.size&&null!=e.size?this.size+e.size:null,Bp((async()=>(await t.iterator()).concatenate(await e.iterator())),n)}filter(e){const t=this;let n;return n=this.size===1/0?1/0:null,Bp((async()=>(await t.iterator()).filter((t=>D.tidy((()=>e(t)))))),n)}async forEachAsync(e){return(await this.iterator()).forEachAsync(e)}map(e){const t=this;return Bp((async()=>(await t.iterator()).map((t=>D.tidy((()=>e(t)))))),this.size)}mapAsync(e){const t=this;return Bp((async()=>(await t.iterator()).mapAsync(e)),this.size)}prefetch(e){if(null==e)throw new RangeError("`Dataset.prefetch()` requires bufferSize to be specified.");const t=this;return Bp((async()=>(await t.iterator()).prefetch(e)),this.size)}repeat(e){const t=this;let n;return n=null!=this.size&&e>0?this.size*e:0===e?0:null!=this.size&&(void 0===e||e<0)?1/0:null,Bp((async()=>bp(_p((async()=>({value:await t.iterator(),done:!1}))).take(e))),n)}skip(e){const t=this;let n;return n=null!=this.size&&e>=0&&this.size>=e?this.size-e:null!=this.size&&(this.size(await t.iterator()).skip(e)),n)}shuffle(e,t,n=!0){if(null==e||e<0)throw null==this.size?new RangeError("`Dataset.shuffle()` requires bufferSize to be specified."):new RangeError(`\`Dataset.shuffle()\` requires bufferSize to be specified. If your data fits in main memory (for regular JS objects), and/or GPU memory (for \`tf.Tensor\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);const r=this,a=op.alea(t||D.util.now().toString());return Bp((async()=>{let t=a.int32();return n&&(t+=a.int32()),(await r.iterator()).shuffle(e,t.toString())}),this.size)}take(e){const t=this;let n;return n=null!=this.size&&this.size>e?e:null!=this.size&&this.size<=e?this.size:null,Bp((async()=>(await t.iterator()).take(e)),n)}async toArray(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArray()}async toArrayForTest(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArrayForTest()}}function Bp(e,t=null){return new class extends Np{constructor(){super(...arguments),this.size=t}async iterator(){return e()}}}function jp(e){return Bp((async()=>yp(e)),e.length)}function Vp(e){if(!hp(e))throw new Error("The argument to zip() must be an object or array.");let t;if(Array.isArray(e))for(let n=0;nfunction(e,t=ip.FAIL){return new Mp(e,t)}(await dp(e,(e=>{if(e instanceof Np)return{value:e.iterator(),recurse:!1};if(hp(e))return{value:null,recurse:!0};throw new Error("Leaves of the structure passed to zip() must be Datasets, not primitives.")})),ip.SHORTEST)),t)}function zp(e){if(null===e)return null;const t=e[0];if(null==(n=t)||function(e){return null===e||"object"!==typeof e&&"function"!==typeof e}(n)||Array.isArray(n)||"object"===typeof n&&n instanceof D.Tensor||D.util.isTypedArray(n)){return{value:function(e){if(0===e.length)throw new Error("Can't make a batch of zero elements.");return e[0]instanceof D.Tensor?D.stack(e):D.tensor(e)}(e),recurse:!1}}var n;return{value:null,recurse:!0}}Np.MAX_BUFFER_SIZE=1e4;class Hp extends Np{constructor(e){super(),this.input=e}async iterator(){return(await this.input.iterator()).decodeUTF8().split("\n").map((e=>(e.endsWith("\r")&&(e=e.slice(0,-1)),e)))}}const Up='"',Wp=Symbol("out"),qp=Symbol("field"),$p=Symbol("quote"),Yp=Symbol("quoteafterquote"),Gp=Symbol("quoteinquote");class Xp extends Np{async columnNames(){return this.columnNamesValidated||await this.setColumnNames(),this.configuredColumnsOnly?Object.keys(this.columnConfigs):this.fullColumnNames}async setColumnNames(){const e=await this.maybeReadHeaderLine();if(!this.fullColumnNames&&!e)throw new Error("Column names must be provided if there is no header line.");this.fullColumnNames&&e&&D.util.assert(e.length===this.fullColumnNames.length,(()=>"The length of provided columnNames ("+this.fullColumnNames.length.toString()+") does not match the length of the header line read from file ("+e.length.toString()+").")),this.fullColumnNames||(this.fullColumnNames=e);const t=this.fullColumnNames.reduce(((e,t)=>(e[t]=e[t]+1||1,e)),{}),n=Object.keys(t).filter((e=>t[e]>1));if(D.util.assert(0===n.length,(()=>"Duplicate column names found: "+n.toString())),this.columnConfigs)for(const r of Object.keys(this.columnConfigs)){if(-1===this.fullColumnNames.indexOf(r))throw new Error('The key "'+r+'" provided in columnConfigs does not match any of the column names ('+this.fullColumnNames.toString()+").")}this.columnNamesValidated=!0}async maybeReadHeaderLine(){if(this.hasHeader){const e=await this.base.iterator(),t=await e.next();if(t.done)throw new Error("No data was found for CSV parsing.");const n=t.value;return this.parseRow(n,!1)}return null}constructor(e,t){super(),this.input=e,this.hasHeader=!0,this.fullColumnNames=null,this.columnNamesValidated=!1,this.columnConfigs=null,this.configuredColumnsOnly=!1,this.delimiter=",",this.delimWhitespace=!1,this.base=new Hp(e),t||(t={}),this.hasHeader=!1!==t.hasHeader,this.fullColumnNames=t.columnNames,this.columnConfigs=t.columnConfigs,this.configuredColumnsOnly=t.configuredColumnsOnly,t.delimWhitespace?(D.util.assert(null==t.delimiter,(()=>"Delimiter should not be provided when delimWhitespace is true.")),this.delimWhitespace=!0,this.delimiter=" "):this.delimiter=t.delimiter?t.delimiter:","}async iterator(){this.columnNamesValidated||await this.setColumnNames();let e=await this.base.iterator();return this.hasHeader&&(e=e.skip(1)),e.map((e=>this.makeDataElement(e)))}makeDataElement(e){const t=this.parseRow(e),n={},r={};for(let a=0;a14||!Number.isInteger(t))throw new Error(`Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got ${this.fftSize}`);if(this.numFrames=e.numFramesPerSpectrogram||43,this.sampleRateHz=e.sampleRateHz,this.columnTruncateLength=e.columnTruncateLength||this.fftSize,this.audioTrackConstraints=e.audioTrackConstraints,this.smoothingTimeConstant=e.smoothingTimeConstant||0,this.includeSpectrogram=!1!==e.includeSpectrogram,this.includeWaveform=!0===e.includeWaveform,!this.includeSpectrogram&&!this.includeWaveform)throw new Error("Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.")}summary(){return"microphone"}static async create(e={}){if(!(0,D.env)().get("IS_BROWSER"))throw new Error("microphone API is only supported in browser environment.");const t=new Kp(e);return await t.start(),t}async start(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:null==this.audioTrackConstraints||this.audioTrackConstraints,video:!1})}catch(n){throw new Error(`Error thrown while initializing video stream: ${n.message}`)}if(!this.stream)throw new Error("Could not obtain audio from microphone.");const e=window.AudioContext||window.webkitAudioContext;if(this.audioContext=new e,this.sampleRateHz){if(this.audioContext.sampleRate!==this.sampleRateHz)throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: ${this.audioContext.sampleRate}`)}else this.sampleRateHz=this.audioContext.sampleRate;const t=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2*this.fftSize,this.analyser.smoothingTimeConstant=this.smoothingTimeConstant,t.connect(this.analyser),this.freqData=new Float32Array(this.fftSize),this.timeData=new Float32Array(this.fftSize)}async next(){if(this.isClosed)return{value:null,done:!0};let e,t;const n=await this.getAudioData();if(this.includeSpectrogram){const t=this.flattenQueue(n.freqDataQueue);e=this.getTensorFromAudioDataArray(t,[this.numFrames,this.columnTruncateLength,1])}if(this.includeWaveform){const e=this.flattenQueue(n.timeDataQueue);t=this.getTensorFromAudioDataArray(e,[this.numFrames*this.fftSize,1])}return{value:{spectrogram:e,waveform:t},done:!1}}async capture(){return(await this.next()).value}async getAudioData(){const e=[],t=[];let n=0;return new Promise((r=>{const a=setInterval((()=>{this.includeSpectrogram&&(this.analyser.getFloatFrequencyData(this.freqData),this.freqData[0]===-1/0&&r({freqDataQueue:e,timeDataQueue:t}),e.push(this.freqData.slice(0,this.columnTruncateLength))),this.includeWaveform&&(this.analyser.getFloatTimeDomainData(this.timeData),t.push(this.timeData.slice())),++n===this.numFrames&&(clearInterval(a),r({freqDataQueue:e,timeDataQueue:t}))}),this.fftSize/this.sampleRateHz*1e3)}))}stop(){this.isClosed||(this.isClosed=!0,this.analyser.disconnect(),this.audioContext.close(),null!=this.stream&&this.stream.getTracks().length>0&&this.stream.getTracks()[0].stop())}toArray(){throw new Error("Can not convert infinite audio stream to array.")}getSampleRate(){return this.sampleRateHz}flattenQueue(e){const t=e[0].length,n=new Float32Array(e.length*t);return e.forEach(((e,r)=>n.set(e,r*t))),n}getTensorFromAudioDataArray(e,t){const n=new Float32Array(D.util.sizeFromShape(t));return n.set(e,n.length-e.length),(0,D.tensor)(n,t)}}class Jp extends vp{constructor(e,t){if(super(),this.webcamVideoElement=e,this.webcamConfig=t,this.isClosed=!0,this.resize=!1,this.needToResize())if(this.resize=!0,this.cropSize=[this.webcamConfig.resizeHeight,this.webcamConfig.resizeWidth],this.cropBoxInd=(0,D.tensor1d)([0],"int32"),this.webcamConfig.centerCrop){const e=1*this.webcamConfig.resizeWidth/this.webcamVideoElement.width,t=1*this.webcamConfig.resizeHeight/this.webcamVideoElement.height,n=(1-e)/2,r=(1-t)/2,a=n+e,i=t+r;this.cropBox=(0,D.tensor2d)([r,n,i,a],[1,4])}else this.cropBox=(0,D.tensor2d)([0,0,1,1],[1,4])}summary(){return"webcam"}static async create(e,t={}){if(!(0,D.env)().get("IS_BROWSER"))throw new Error("tf.data.webcam is only supported in browser environment.");if(!e){if(e=document.createElement("video"),!t.resizeWidth||!t.resizeHeight)throw new Error("Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.");e.width=t.resizeWidth,e.height=t.resizeHeight}const n=new Jp(e,t);return await n.start(),n}async start(){this.webcamConfig.facingMode&&D.util.assert("user"===this.webcamConfig.facingMode||"environment"===this.webcamConfig.facingMode,(()=>`Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`));try{this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:this.webcamConfig.deviceId,facingMode:this.webcamConfig.facingMode?this.webcamConfig.facingMode:"user",width:this.webcamVideoElement.width,height:this.webcamVideoElement.height}})}catch(e){throw e.message=`Error thrown while initializing video stream: ${e.message}`,e}if(!this.stream)throw new Error("Could not obtain video from webcam.");try{this.webcamVideoElement.srcObject=this.stream}catch(t){console.log(t),this.webcamVideoElement.src=window.URL.createObjectURL(this.stream)}return this.webcamVideoElement.play(),this.isClosed=!1,new Promise((e=>{this.webcamVideoElement.onloadedmetadata=()=>{e()}}))}async next(){if(this.isClosed)return{value:null,done:!0};let e;try{e=D.browser.fromPixels(this.webcamVideoElement)}catch(t){throw new Error(`Error thrown converting video to pixels: ${JSON.stringify(t)}`)}if(!this.resize)return{value:e,done:!1};try{return{value:this.cropAndResizeFrame(e),done:!1}}catch(t){throw new Error(`Error thrown cropping the video: ${t.message}`)}finally{e.dispose()}}needToResize(){return!(!this.webcamConfig.resizeWidth||!this.webcamConfig.resizeHeight||this.webcamVideoElement.width===this.webcamConfig.resizeWidth&&this.webcamVideoElement.height===this.webcamConfig.resizeHeight)}cropAndResizeFrame(e){return(0,D.tidy)((()=>{const t=(0,D.expandDims)((0,D.cast)(e,"float32"),0);let n;n=D.image.cropAndResize(t,this.cropBox,this.cropBoxInd,this.cropSize,"bilinear");const r=n.shape;return(0,D.reshape)(n,r.slice(1))}))}async capture(){return(await this.next()).value}stop(){this.stream.getTracks().forEach((e=>e.stop()));try{this.webcamVideoElement.srcObject=null}catch(e){console.log(e),this.webcamVideoElement.src=null}this.isClosed=!0}toArray(){throw new Error("Can not convert infinite video stream to array.")}}class Zp{}class Qp extends vp{split(e){return new em(this,e)}}class em extends Qp{constructor(e,t){super(),this.upstream=e,this.impl=new tm(e,t)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class tm extends Ip{constructor(e,t){super(),this.upstream=e,this.separator=t,this.carryover=""}summary(){return`${this.upstream.summary()} -> Split('${this.separator}')`}async pump(){const e=await this.upstream.next();if(e.done)return""!==this.carryover&&(this.outputQueue.push(this.carryover),this.carryover="",!0);const t=e.value.split(this.separator);t[0]=this.carryover+t[0];for(const n of t.slice(0,-1))this.outputQueue.push(n);return this.carryover=t[t.length-1],!0}}class nm extends vp{decodeUTF8(){return new rm(this)}}class rm extends Qp{constructor(e){super(),this.upstream=e,this.impl=new am(e)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class am extends Ip{constructor(e){if(super(),this.upstream=e,(0,D.env)().get("IS_BROWSER"))this.decoder=new TextDecoder("utf-8");else{const{StringDecoder:e}=n(4530);this.decoder=new e("utf8")}}summary(){return`${this.upstream.summary()} -> Utf8`}async pump(){const e=await this.upstream.next();let t,n;return!e.done&&(t=e.value,n=(0,D.env)().get("IS_BROWSER")?this.decoder.decode(t,{stream:!0}):this.decoder.write(Buffer.from(t.buffer)),this.outputQueue.push(n),!0)}}class im extends nm{constructor(e,t={}){super(),this.file=e,this.options=t,D.util.assert(e instanceof Uint8Array||!!(0,D.env)().get("IS_BROWSER")&&(e instanceof File||e instanceof Blob),(()=>"FileChunkIterator only supports File, Blob and Uint8Array right now.")),this.offset=t.offset||0,this.chunkSize=t.chunkSize||1048576}summary(){return`FileChunks ${this.file}`}async next(){if(this.offset>=(this.file instanceof Uint8Array?this.file.byteLength:this.file.size))return{value:null,done:!0};const e=new Promise(((e,t)=>{const n=this.offset+this.chunkSize;if(this.file instanceof Uint8Array)e(new Uint8Array(this.file.slice(this.offset,n)));else{const r=new FileReader;r.onload=n=>{let a=r.result;if(a instanceof ArrayBuffer&&(a=new Uint8Array(a)),!(a instanceof Uint8Array))return t(new TypeError("FileReader returned unknown type."));e(a)},r.onabort=e=>t(new Error("Aborted")),r.onerror=e=>t(new Error(e.type));const a=this.file.slice(this.offset,n);r.readAsArrayBuffer(a)}this.offset=n}));return{value:await e,done:!1}}}const om=e=>({method:e.method,headers:e.headers,body:e.body,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity});function sm(e){return"string"===typeof e&&"file://"===e.slice(0,7)}class lm extends Zp{constructor(e,t={}){super(),this.input=e,this.options=t}async iterator(){if(sm(this.input)&&(0,D.env)().get("IS_NODE")){const e=n(8108);this.input=e.readFileSync(this.input.slice(7))}return new im(this.input,this.options)}}class um extends Zp{constructor(e,t={}){super(),this.url=e,this.fileOptions=t}async iterator(){return sm(this.url)?new lm(this.url,this.fileOptions).iterator():async function(e,t={},n){let r,a;"string"===typeof e?r=e:(r=e.url,a=om(e));const i=await(n||D.util.fetch)(r,a);if(i.ok){const e=new Uint8Array(await i.arrayBuffer());return new im(e,t)}throw new Error(i.statusText)}(this.url,this.fileOptions)}}function cm(e,t={}){return new Xp(new um(e),t)}function dm(e){const t=_p(e);return Bp((async()=>t))}function hm(e){return Bp((async()=>{const t=await e();return _p((()=>t.next()))}))}async function fm(e,t){return Jp.create(e,t)}async function pm(e){return Kp.create(e)}const mm="4.22.0";var gm=n(32438),ym=n(15819);const _m={"tfjs-core":D.version_core,"tfjs-backend-cpu":gm.version_cpu,"tfjs-backend-webgl":ym.version_webgl,"tfjs-data":mm,"tfjs-layers":$s,"tfjs-converter":ap,tfjs:"4.22.0"}},52386:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Asset:()=>p});var r=n(35190),a=n(98943),i=n(45548);class o{constructor(e,t,n){this.serverUrl=e||"https://expo.dev",this.jsbundleUrl=null,this.asset=n}isLoadedFromServer(){return!0}isLoadedFromFileSystem(){return!1}defaultAsset(){return this.assetServerURL()}assetServerURL(){const e=new URL(function(e){const t=o.pickScale(e.scales,a.default.get()),n=1===t?"":"@"+t+"x",r=e.type?`.${e.type}`:"";return e.httpServerLocation.replace(/\.\.\//g,"_")+"/"+e.name+n+r}(this.asset),this.serverUrl);return e.searchParams.set("platform","web"),e.searchParams.set("hash",this.asset.hash),this.fromSource(e.toString().replace(e.origin,""))}fromSource(e){return{__packager_asset:!0,width:this.asset.width??void 0,height:this.asset.height??void 0,uri:e,scale:o.pickScale(this.asset.scales,a.default.get())}}static pickScale(e,t){for(let n=0;n=t)return e[n];return e[e.length-1]||1}}function s(e){const{pathname:t,searchParams:n}=new URL(e,"https://e");return function(e){return e.substring(e.lastIndexOf("/")+1)}(t)}function l(e){const t=s(e),n=t.lastIndexOf(".");return n>0?t.substring(n):""}var u=n(40495);let c;function d(e){c=e}function h(e){if("object"===typeof e)return e;const t=(0,r.getAssetByID)(e);if(!t)return null;const n=new o("https://expo.dev",null,t);return c?c(n):n.defaultAsset()}Object.defineProperty(h,"setCustomSourceTransformer",{get:()=>d});const{pickScale:f}=o;class p{static byHash={};static byUri={};hash=null;localUri=null;width=null;height=null;downloading=!1;downloaded=!1;_downloadCallbacks=[];constructor({name:e,type:t,hash:n=null,uri:r,width:a,height:i}){this.name=e,this.type=t,this.hash=n,this.uri=r,"number"===typeof a&&(this.width=a),"number"===typeof i&&(this.height=i),n&&(this.localUri=null,this.localUri&&(this.downloaded=!0)),e||(this.name=s(r)),t||(this.type=l(r))}static loadAsync(e){const t=Array.isArray(e)?e:[e];return Promise.all(t.map((e=>p.fromModule(e).downloadAsync())))}static fromModule(e){if("string"===typeof e)return p.fromURI(e);if("object"===typeof e&&"uri"in e&&"string"===typeof e.uri){const t=l(e.uri);return new p({name:"",type:t.startsWith(".")?t.substring(1):t,hash:null,uri:e.uri,width:e.width,height:e.height})}const t=(0,r.getAssetByID)(e);if(!t)throw new Error(`Module "${e}" is missing from the asset registry`);{const{uri:n}=h(e),r=new p({name:t.name,type:t.type,hash:t.hash,uri:n,width:t.width,height:t.height});return p.byHash[t.hash]=r,r}}static fromMetadata(e){const t=e.hash;if(p.byHash[t])return p.byHash[t];const{uri:n,hash:r}=function(e){const t=o.pickScale(e.scales,a.default.get()),n=e.scales.findIndex((e=>e===t)),r=e.fileHashes?e.fileHashes[n]??e.fileHashes[0]:e.hash,s=e.fileUris?e.fileUris[n]??e.fileUris[0]:e.uri;if(s)return{uri:s,hash:r};const l=1===t?"":`@${t}x`,u=e.type?`.${encodeURIComponent(e.type)}`:"",c=`/${encodeURIComponent(e.name)}${l}${u}`,d=new URLSearchParams({platform:"web",hash:e.hash});if(/^https?:\/\//.test(e.httpServerLocation))return{uri:e.httpServerLocation+c+"?"+d,hash:r};const h={},f=h?.extra?.expoGo?.developer?"http://"+h.extra.expoGo.debuggerHost:null;if(f){const t=new URL(e.httpServerLocation+c,f);return t.searchParams.set("platform","web"),t.searchParams.set("hash",e.hash),{uri:t.href,hash:r}}return i.default.ExponentKernel?{uri:`https://classic-assets.eascdn.net/~assets/${encodeURIComponent(r)}`,hash:r}:{uri:"",hash:r}}(e),s=new p({name:e.name,type:e.type,hash:r,uri:n,width:e.width,height:e.height});return p.byHash[t]=s,s}static fromURI(e){if(p.byUri[e])return p.byUri[e];let t="";if(e.indexOf(";base64")>-1)t=e.split(";")[0].split("/")[1];else{const n=l(e);t=n.startsWith(".")?n.substring(1):n}const n=new p({name:"",type:t,hash:null,uri:e});return p.byUri[e]=n,n}async downloadAsync(){if(this.downloaded)return this;if(this.downloading)return await new Promise(((e,t)=>{this._downloadCallbacks.push({resolve:e,reject:t})})),this;this.downloading=!0;try{if(t=this.type,/^(jpeg|jpg|gif|png|bmp|webp|heic)$/i.test(t)){const{width:t,height:n,name:r}=await(e=this.uri,u.default.isDOMAvailable?new Promise(((t,n)=>{const r=new Image;r.onerror=n,r.onload=()=>{t({name:s(e),width:r.naturalWidth,height:r.naturalHeight})},r.src=e})):Promise.resolve({name:s(e),width:0,height:0}));this.width=t,this.height=n,this.name=r}else this.name=s(this.uri);this.localUri=await async function(e){return e}(this.uri,this.hash,this.type),this.downloaded=!0,this._downloadCallbacks.forEach((({resolve:e})=>e()))}catch(n){throw this._downloadCallbacks.forEach((({reject:e})=>e(n))),n}finally{this.downloading=!1,this._downloadCallbacks=[]}var e,t;return this}}},91433:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AuthRequest:()=>f});var r=n(98587),a=n(8787),i=n(60430),o=n.n(i),s=n(90111),l=n(62752),u=n(36541);var c=n(98861);const d=["url"];let h=!1;class f{url=null;constructor(e){this.responseType=e.responseType??s.ResponseType.Code,this.clientId=e.clientId,this.redirectUri=e.redirectUri,this.scopes=e.scopes,this.clientSecret=e.clientSecret,this.prompt=e.prompt,this.state=e.state??u.generateRandom(10),this.extraParams=e.extraParams??{},this.codeChallengeMethod=e.codeChallengeMethod??s.CodeChallengeMethod.S256,this.usePKCE=e.usePKCE??!0,o()(this.codeChallengeMethod!==s.CodeChallengeMethod.Plain,"`AuthRequest` does not support `CodeChallengeMethod.Plain` as it's not secure."),o()(this.redirectUri,"`AuthRequest` requires a valid `redirectUri`. Ex: https://yourwebsite.com/")}async getAuthRequestConfigAsync(){return this.usePKCE&&await this.ensureCodeIsSetupAsync(),{responseType:this.responseType,clientId:this.clientId,redirectUri:this.redirectUri,scopes:this.scopes,clientSecret:this.clientSecret,codeChallenge:this.codeChallenge,codeChallengeMethod:this.codeChallengeMethod,prompt:this.prompt,state:this.state,extraParams:this.extraParams,usePKCE:this.usePKCE}}async promptAsync(e,t={}){let{url:n}=t,i=(0,r.default)(t,d);if(!n){if(!this.url)return this.promptAsync(e,Object.assign({},i,{url:await this.makeAuthUrlAsync(e)}));n=this.url}o()(n,"No authUrl provided to AuthSession.startAsync. An authUrl is required -- it points to the page where the user will be able to sign in.");const s=n,l=this.redirectUri;if(h)return{type:"locked"};let u;h=!0;try{u=await a.openAuthSessionAsync(s,l,i)}finally{h=!1}if("opened"===u.type)throw new Error("An unexpected error occurred");return"success"!==u.type?{type:u.type}:this.parseReturnUrl(u.url)}parseReturnUrl(e){const{params:t,errorCode:n}=function(e){const t=new URL(e,"https://phony.example"),n=t.searchParams.get("errorCode");t.searchParams.delete("errorCode");const r=Object.fromEntries(t.searchParams);return t.hash&&new URLSearchParams(t.hash.replace(/^#/,"")).forEach(((e,t)=>{r[t]=e})),{errorCode:n,params:r}}(e),{state:r,error:a=n}=t;let i=null,o=null;return r!==this.state?i=new l.AuthError({error:"state_mismatch",error_description:"Cross-Site request verification failed. Cached state and returned state do not match."}):a&&(i=new l.AuthError(Object.assign({error:a},t))),t.access_token&&(o=c.TokenResponse.fromQueryParams(t)),{type:i?"error":"success",error:i,url:e,params:t,authentication:o,errorCode:n}}async makeAuthUrlAsync(e){const t=await this.getAuthRequestConfigAsync();if(!t.state)throw new Error("Cannot make request URL without a valid `state` loaded");const n={};t.codeChallenge&&(n.code_challenge=t.codeChallenge);for(const r in t.extraParams)r in t.extraParams&&(n[r]=t.extraParams[r]);return t.usePKCE&&t.codeChallengeMethod&&(n.code_challenge_method=t.codeChallengeMethod),t.clientSecret&&(n.client_secret=t.clientSecret),t.prompt&&(n.prompt="string"===typeof t.prompt?t.prompt:t.prompt.join(" ")),n.redirect_uri=t.redirectUri,n.client_id=t.clientId,n.response_type=t.responseType,n.state=t.state,t.scopes?.length&&(n.scope=t.scopes.join(" ")),this.url=`${e.authorizationEndpoint}?${new URLSearchParams(n)}`,this.url}async ensureCodeIsSetupAsync(){if(this.codeVerifier)return;const{codeVerifier:e,codeChallenge:t}=await u.buildCodeAsync();this.codeVerifier=e,this.codeChallenge=t}}},90111:(e,t,n)=>{"use strict";var r,a,i;n.r(t),n.d(t,{CodeChallengeMethod:()=>r,Prompt:()=>i,ResponseType:()=>a}),function(e){e.S256="S256",e.Plain="plain"}(r||(r={})),function(e){e.Code="code",e.Token="token",e.IdToken="id_token"}(a||(a={})),function(e){e.None="none",e.Login="login",e.Consent="consent",e.SelectAccount="select_account"}(i||(i={}))},33922:(e,t,n)=>{"use strict";n.r(t),n.d(t,{useAuthRequest:()=>d,useAuthRequestResult:()=>c,useAutoDiscovery:()=>l,useLoadedAuthRequest:()=>u});var r=n(98587),a=n(36665),i=n(91433),o=n(84105);const s=["windowFeatures"];function l(e){const[t,n]=(0,a.useState)(null);return(0,a.useEffect)((()=>{let t=!0;return(0,o.resolveDiscoveryAsync)(e).then((e=>{t&&n(e)})),()=>{t=!1}}),[e]),t}function u(e,t,n){const[r,i]=(0,a.useState)(null),o=e.scopes?.join(" "),s=function(e){if(!e)return;if(Array.isArray(e))return e.join(" ");return e}(e.prompt),l=(0,a.useMemo)((()=>JSON.stringify(e.extraParams||{})),[e.extraParams]);return(0,a.useEffect)((()=>{let r=!0;if(t){const a=new n(e);a.makeAuthUrlAsync(t).then((()=>{r&&i(a)}))}return()=>{r=!1}}),[t?.authorizationEndpoint,e.clientId,e.redirectUri,e.responseType,e.clientSecret,e.codeChallenge,e.state,e.usePKCE,o,s,l]),r}function c(e,t,n={}){const[i,o]=(0,a.useState)(null),l=(0,a.useCallback)((async(a={})=>{let{windowFeatures:i={}}=a,l=(0,r.default)(a,s);if(!t||!e)throw new Error("Cannot prompt to authenticate until the request has finished loading.");const u=Object.assign({},n,l,{windowFeatures:Object.assign({},n.windowFeatures??{},i)}),c=await(e?.promptAsync(t,u));return o(c),c}),[e?.url,t?.authorizationEndpoint]);return[i,l]}function d(e,t){const n=u(e,t,i.AuthRequest),[r,a]=c(n,t);return[n,r,a]}},70476:(e,t,n)=>{"use strict";n.r(t),n.d(t,{dismiss:()=>h,getDefaultReturnUrl:()=>f,getRedirectUrl:()=>p,loadAsync:()=>g,makeRedirectUri:()=>m});var r=n(78848),a=n(8787),i=n(91433),o=n(84105),s=n(30511),l=n(20269),u=n(40495);class c{static BASE_URL="https://auth.expo.io";static SESSION_PATH="expo-auth-session";getDefaultReturnUrl(e,t){const n=c.getHostAddressQueryParams();let a=c.SESSION_PATH;return e&&(a=[a,c.removeLeadingSlash(e)].filter(Boolean).join("/")),r.createURL(a,{scheme:t?.scheme??r.resolveScheme({isSilent:!0}),queryParams:n,isTripleSlashed:t?.isTripleSlashed})}getStartUrl(e,t,n){if(!u.default.isDOMAvailable)return"";const r=new URLSearchParams({authUrl:e,returnUrl:t});return`${this.getRedirectUrl({projectNameForProxy:n})}/start?${r}`}getRedirectUrl(e){return u.default.isDOMAvailable?[window.location.origin,e.urlPath].filter(Boolean).join("/"):""}static getHostAddressQueryParams(){let e=s.default.expoConfig?.hostUri;if(e||l.ExecutionEnvironment.StoreClient!==s.default.executionEnvironment&&!r.resolveScheme({})||(e=s.default.linkingUri?c.removeScheme(s.default.linkingUri).replace(/\/--(\/.*)?$/,""):""),!e)return;const t=e?.split("?");try{return Object.fromEntries(new URLSearchParams(t?.[1]))}catch{}}static warnIfAnonymous(e,t){e.startsWith("@anonymous/")&&console.warn(`You are not currently signed in to Expo on your development machine. As a result, the redirect URL for AuthSession will be "${t}". If you are using an OAuth provider that requires adding redirect URLs to an allow list, we recommend that you do not add this URL -- instead, you should sign in to Expo to acquire a unique redirect URL. Additionally, if you do decide to publish this app using Expo, you will need to register an account to do it.`)}static removeScheme(e){return e.replace(/^[a-zA-Z0-9+.-]+:\/\//,"")}static removeLeadingSlash(e){return e.replace(/^\//,"")}}const d=new c;function h(){(0,a.dismissAuthSession)()}const f=d.getDefaultReturnUrl;function p(e){return d.getRedirectUrl({urlPath:e})}function m({native:e,scheme:t,isTripleSlashed:n,queryParams:a,path:i,preferLocalhost:o}={}){const s=r.createURL(i||"",{isTripleSlashed:n,scheme:t,queryParams:a});if(o){const e=s.match(/\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/);if(e?.length){const[t,n]=s.split(e[0]);return`${t}localhost${n}`}}return s}async function g(e,t){const n=new i.AuthRequest(e),r=await(0,o.resolveDiscoveryAsync)(t);return await n.makeAuthUrlAsync(r),n}},84105:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fetchDiscoveryAsync:()=>s,issuerWithWellKnownUrl:()=>o,resolveDiscoveryAsync:()=>l});var r=n(60430),a=n.n(r),i=n(25723);function o(e){return`${e}/.well-known/openid-configuration`}async function s(e){const t=await(0,i.requestAsync)(o(e),{dataType:"json",method:"GET"});return{discoveryDocument:t,authorizationEndpoint:t.authorization_endpoint,tokenEndpoint:t.token_endpoint,revocationEndpoint:t.revocation_endpoint,userInfoEndpoint:t.userinfo_endpoint,endSessionEndpoint:t.end_session_endpoint,registrationEndpoint:t.registration_endpoint}}async function l(e){return a()(e&&!["number","boolean"].includes(typeof e),"Expected a valid discovery object or issuer URL"),"string"===typeof e?await s(e):e}},62752:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AuthError:()=>o,ResponseError:()=>i,TokenError:()=>s});var r=n(91808);const a={auth:{invalid_request:"The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed.",unauthorized_client:"The client is not authorized to request an authorization code using this method.",access_denied:"The resource owner or authorization server denied the request.",unsupported_response_type:"The authorization server does not support obtaining an authorization code using this method.",invalid_scope:"The requested scope is invalid, unknown, or malformed.",server_error:"The authorization server encountered an unexpected condition that prevented it from fulfilling the request. (This error code is needed because a 500 Internal Server Error HTTP status code cannot be returned to the client via an HTTP redirect.)",temporarily_unavailable:"The authorization server is currently unable to handle the request due to a temporary overloading or maintenance of the server. (This error code is needed because a 503 Service Unavailable HTTP status code cannot be returned to the client via an HTTP redirect.)",interaction_required:"Auth server requires user interaction of some form to proceed. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user interaction.",login_required:"Auth server requires user authentication. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user authentication.",account_selection_required:"User is required to select a session at the auth server. The user may be authenticated at the auth server with different associated accounts, but the user did not select a session. This error may be returned when the prompt parameter value in the auth request is `none`, but the auth request cannot be completed without displaying a user interface to prompt for a session to use.",consent_required:"Auth server requires user consent. This error may be returned when the prompt parameter value in the auth request is none, but the auth request cannot be completed without displaying a user interface for user consent.",invalid_request_uri:"The `request_uri` in the auth request returns an error or contains invalid data.",invalid_request_object:"The request parameter contains an invalid request object.",request_not_supported:"The OP does not support use of the `request` parameter defined in Section 6. (https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests)",request_uri_not_supported:"The OP does not support use of the `request_uri` parameter defined in Section 6. (https://openid.net/specs/openid-connect-core-1_0.html#JWTRequests)",registration_not_supported:"The OP does not support use of the `registration` parameter defined in Section 7.2.1. (https://openid.net/specs/openid-connect-core-1_0.html#RegistrationParameter)"},token:{invalid_request:"The request is missing a required parameter, includes an unsupported parameter value (other than grant type), repeats a parameter, includes multiple credentials, utilizes more than one mechanism for authenticating the client, or is otherwise malformed.",invalid_client:'Client authentication failed (e.g., unknown client, no client authentication included, or unsupported authentication method). The authorization server MAY return an HTTP 401 (Unauthorized) status code to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate via the "Authorization" request header field, the authorization server MUST respond with an HTTP 401 (Unauthorized) status code and include the "WWW-Authenticate" response header field matching the authentication scheme used by the client.',invalid_grant:"The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",unauthorized_client:"The authenticated client is not authorized to use this authorization grant type.",unsupported_grant_type:"The authorization grant type is not supported by the authorization server."}};class i extends r.CodedError{constructor(e,t){const{error:n,error_description:r,error_uri:i}=e,o=a[t][n];let s;s=o?o+(r?`\nMore info: ${r}`:""):r||"An unknown error occurred",super(n,s),this.description=r??o,this.uri=i,this.params=e}}class o extends i{constructor(e){super(e,"auth"),this.state=e.state}}class s extends i{constructor(e){super(e,"token")}}},25723:(e,t,n)=>{"use strict";async function r(e,t){const n=new URL(e),r={method:t.method,mode:"cors",headers:{}},a="json"===t.dataType?.toLowerCase();if(t.headers)for(const l in t.headers)l in t.headers&&(r.headers[l]=t.headers[l]);if(t.body)if("POST"===t.method?.toUpperCase())r.body=new URLSearchParams(t.body).toString();else for(const l of Object.keys(t.body))n.searchParams.append(l,t.body[l]);a&&!("Accept"in r.headers)&&(r.headers.Accept="application/json, text/javascript; q=0.01");const i=n.toString().replace(/\/$/,""),o=await fetch(i,r),s=o.headers.get("content-type");return a||s?.includes("application/json")?o.json():o.text()}n.r(t),n.d(t,{requestAsync:()=>r})},36541:(e,t,n)=>{"use strict";n.r(t),n.d(t,{buildCodeAsync:()=>y,deriveChallengeAsync:()=>g,generateHexStringAsync:()=>_,generateRandom:()=>m});n(23703);var r,a,i=n(28945);!function(e){e.SHA1="SHA-1",e.SHA256="SHA-256",e.SHA384="SHA-384",e.SHA512="SHA-512",e.MD2="MD2",e.MD4="MD4",e.MD5="MD5"}(r||(r={})),function(e){e.HEX="hex",e.BASE64="base64"}(a||(a={}));var o=n(91808);const s=()=>window.crypto??window.msCrypto,l={async digestStringAsync(e,t,n){if(!crypto.subtle)throw new o.CodedError("ERR_CRYPTO_UNAVAILABLE","Access to the WebCrypto API is restricted to secure origins (localhost/https).");const r=(new TextEncoder).encode(t),i=await crypto.subtle.digest(e,r);if(n.encoding===a.HEX)return function(e){const t=new Uint8Array(e);return[...t].map((e=>e.toString(16).padStart(2,"0"))).join("")}(i);if(n.encoding===a.BASE64)return btoa(String.fromCharCode(...new Uint8Array(i)));throw new o.CodedError("ERR_CRYPTO_DIGEST","Invalid encoding type provided.")},getRandomBytes(e){const t=new Uint8Array(e);return s().getRandomValues(t)},async getRandomBytesAsync(e){const t=new Uint8Array(e);return s().getRandomValues(t)},getRandomValues:e=>s().getRandomValues(e),randomUUID:()=>s().randomUUID(),digestAsync:(e,t)=>s().subtle.digest(e,t)};class u extends TypeError{code="ERR_CRYPTO";constructor(e){super(`expo-crypto: ${e}`)}}async function c(e,t,n={encoding:a.HEX}){if(!l.digestStringAsync)throw new i.UnavailabilityError("expo-crypto","digestStringAsync");return function(e){if(!Object.values(r).includes(e))throw new u(`Invalid algorithm provided. Expected one of: CryptoDigestAlgorithm.${Object.keys(r).join(", AlgCryptoDigestAlgorithmorithm.")}`)}(e),function(e){if("string"!==typeof e)throw new u("Invalid data provided. Expected a string.")}(t),function(e){if(!Object.values(a).includes(e))throw new u(`Invalid encoding provided. Expected one of: CryptoEncoding.${Object.keys(a).join(", CryptoEncoding.")}`)}(n.encoding),await l.digestStringAsync(e,t,n)}r.SHA1,r.SHA256,r.SHA384,r.SHA512,r.MD2,r.MD4,r.MD5;var d=n(60430),h=n.n(d);const f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function p(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function m(e){var t;return function(e){const t=[];for(let n=0;n42&&e.length<129,"Invalid code length for PKCE.");return p(await c(r.SHA256,e,{encoding:a.BASE64}))}async function y(e=128){const t=m(e);return{codeVerifier:t,codeChallenge:await g(t)}}async function _(e){const t=m(e);return p(await c(r.SHA256,t,{encoding:a.HEX}))}},98861:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessTokenRequest:()=>p,RefreshTokenRequest:()=>m,Request:()=>h,RevokeTokenRequest:()=>g,TokenRequest:()=>f,TokenResponse:()=>d,exchangeCodeAsync:()=>y,fetchUserInfoAsync:()=>v,getCurrentTimeInSeconds:()=>c,refreshAsync:()=>_,revokeAsync:()=>b});var r=n(60430),a=n.n(r);const i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function o(e){let t="",n=0;do{const r=e.charCodeAt(n++),a=e.charCodeAt(n++),o=e.charCodeAt(n++),s=r>>2,l=(3&r)<<4|a>>4;let u=(15&a)<<2|o>>6,c=63&o;isNaN(a)?(u=64,c=64):isNaN(o)&&(c=64),t=t+i.charAt(s)+i.charAt(l)+i.charAt(u)+i.charAt(c)}while(n{"use strict";var r,a;n.r(t),n.d(t,{GrantType:()=>a,TokenTypeHint:()=>r}),function(e){e.AccessToken="access_token",e.RefreshToken="refresh_token"}(r||(r={})),function(e){e.AuthorizationCode="authorization_code",e.Implicit="implicit",e.RefreshToken="refresh_token",e.ClientCredentials="client_credentials"}(a||(a={}))},39559:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AccessTokenRequest:()=>u.AccessTokenRequest,AuthError:()=>o.AuthError,AuthRequest:()=>r.AuthRequest,CodeChallengeMethod:()=>c.CodeChallengeMethod,GrantType:()=>d.GrantType,Prompt:()=>c.Prompt,RefreshTokenRequest:()=>u.RefreshTokenRequest,Request:()=>u.Request,ResponseError:()=>o.ResponseError,ResponseType:()=>c.ResponseType,RevokeTokenRequest:()=>u.RevokeTokenRequest,TokenError:()=>o.TokenError,TokenRequest:()=>u.TokenRequest,TokenResponse:()=>u.TokenResponse,TokenTypeHint:()=>d.TokenTypeHint,dismiss:()=>i.dismiss,exchangeCodeAsync:()=>u.exchangeCodeAsync,fetchDiscoveryAsync:()=>l.fetchDiscoveryAsync,fetchUserInfoAsync:()=>u.fetchUserInfoAsync,getCurrentTimeInSeconds:()=>u.getCurrentTimeInSeconds,getDefaultReturnUrl:()=>i.getDefaultReturnUrl,getRedirectUrl:()=>i.getRedirectUrl,issuerWithWellKnownUrl:()=>l.issuerWithWellKnownUrl,loadAsync:()=>i.loadAsync,makeRedirectUri:()=>i.makeRedirectUri,refreshAsync:()=>u.refreshAsync,requestAsync:()=>s.requestAsync,resolveDiscoveryAsync:()=>l.resolveDiscoveryAsync,revokeAsync:()=>u.revokeAsync,useAuthRequest:()=>a.useAuthRequest,useAuthRequestResult:()=>a.useAuthRequestResult,useAutoDiscovery:()=>a.useAutoDiscovery,useLoadedAuthRequest:()=>a.useLoadedAuthRequest});var r=n(91433),a=n(33922),i=n(70476),o=n(62752),s=n(25723),l=n(84105),u=n(98861),c=n(90111),d=n(8002)},22180:(e,t,n)=>{"use strict";function r(e=[],t){return[...new Set([...e,...t])]}function a(e,t,n){if("undefined"===typeof t)throw new Error(`Client Id property \`${e}\` must be defined to use ${n} auth on this platform.`)}n.r(t),n.d(t,{applyRequiredScopes:()=>r,invariantClientId:()=>a})},66162:(e,t,n)=>{"use strict";n.r(t),n.d(t,{discovery:()=>_,useAuthRequest:()=>w,useIdTokenAuthRequest:()=>v});var r,a=n(98587);n(28945);!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SIMULATOR=1]="SIMULATOR",e[e.ENTERPRISE=2]="ENTERPRISE",e[e.DEVELOPMENT=3]="DEVELOPMENT",e[e.AD_HOC=4]="AD_HOC",e[e.APP_STORE=5]="APP_STORE"}(r||(r={}));const i={get applicationName(){return null},get bundleId(){return null},get nativeApplicationVersion(){return null},get nativeBuildVersion(){return null},get androidId(){return null},getInstallationTimeAsync:async()=>null},o=(i&&i.nativeApplicationVersion,i&&i.nativeBuildVersion,i&&i.applicationName,i&&i.applicationId||null);var s=n(36665),l=n(22180),u=n(91433),c=n(90111),d=n(33922),h=n(70476),f=n(36541),p=n(98861);const m=["language","loginHint","selectAccount","extraParams","clientSecret"],g=["extraParams"],y={windowFeatures:{width:515,height:680},minimumScopes:["openid","https://www.googleapis.com/auth/userinfo.profile","https://www.googleapis.com/auth/userinfo.email"]},_={authorizationEndpoint:"https://accounts.google.com/o/oauth2/v2/auth",tokenEndpoint:"https://oauth2.googleapis.com/token",revocationEndpoint:"https://oauth2.googleapis.com/revoke",userInfoEndpoint:"https://openidconnect.googleapis.com/v1/userinfo"};class b extends u.AuthRequest{constructor(e){let{language:t,loginHint:n,selectAccount:r,extraParams:i={},clientSecret:o}=e,s=(0,a.default)(e,m);const u=Object.assign({},i);t&&(u.hl=t),n&&(u.login_hint=n),r&&(u.prompt=c.Prompt.SelectAccount);const d=(0,l.applyRequiredScopes)(s.scopes,y.minimumScopes);let h;(s.responseType===c.ResponseType.Token||s.responseType===c.ResponseType.IdToken)&&(s.usePKCE=!1),s.responseType&&s.responseType!==c.ResponseType.Code&&(h=o),super(Object.assign({},s,{clientSecret:h,scopes:d,extraParams:u}))}async getAuthRequestConfigAsync(){const e=await super.getAuthRequestConfigAsync(),{extraParams:t={}}=e,n=(0,a.default)(e,g);return n.responseType!==c.ResponseType.IdToken||t.nonce||this.nonce||(this.nonce||(this.nonce=await(0,f.generateHexStringAsync)(16)),t.nonce=this.nonce),Object.assign({},n,{extraParams:t})}}function v(e,t={}){return w(Object.assign({},e,{responseType:e.clientSecret?void 0:c.ResponseType.IdToken}),Object.assign({},t))}function w(e={},t={}){const n=(0,s.useMemo)((()=>{const t="webClientId",n=e[t]??e.clientId;return(0,l.invariantClientId)(t,n,"Google"),n}),[e.iosClientId,e.androidClientId,e.webClientId,e.clientId]),r=(0,s.useMemo)((()=>{if("undefined"!==typeof e.responseType)return e.responseType;return e.clientSecret?c.ResponseType.Code:c.ResponseType.Token}),[e.responseType,e.clientSecret]),a=(0,s.useMemo)((()=>"undefined"!==typeof e.redirectUri?e.redirectUri:(0,h.makeRedirectUri)(Object.assign({native:`${o}:/oauthredirect`},t))),[e.redirectUri,t]),i=(0,s.useMemo)((()=>{const t=e.extraParams?Object.assign({},e.extraParams):{};return e.language&&(t.hl=t.language),e.loginHint&&(t.login_hint=t.loginHint),e.selectAccount&&(t.prompt=c.Prompt.SelectAccount),t}),[e.extraParams,e.language,e.loginHint,e.selectAccount]),u=(0,d.useLoadedAuthRequest)(Object.assign({},e,{responseType:r,extraParams:i,clientId:n,redirectUri:a}),_,b),[f,m]=(0,d.useAuthRequestResult)(u,_,{windowFeatures:y.windowFeatures}),[g,v]=(0,s.useState)(null),w=(0,s.useMemo)((()=>"undefined"!==typeof e.shouldAutoExchangeCode?e.shouldAutoExchangeCode:"success"===f?.type&&f.params.code&&!f.authentication),[e.shouldAutoExchangeCode,f?.type]);return(0,s.useEffect)((()=>{let t=!0;if(w&&"success"===f?.type){new p.AccessTokenRequest({clientId:n,clientSecret:e.clientSecret,redirectUri:a,scopes:e.scopes,code:f.params.code,extraParams:{code_verifier:u?.codeVerifier||""}}).performAsync(_).then((e=>{t&&v(Object.assign({},f,{params:Object.assign({id_token:e?.idToken||"",access_token:e.accessToken},f.params),authentication:e}))}))}else v(f);return()=>{t=!1}}),[n,a,w,e.clientSecret,e.scopes?.join(","),u?.codeVerifier,f]),[u,g,m]}},14708:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PitchCorrectionQuality:()=>a.PitchCorrectionQuality,PlaybackMixin:()=>h,_DEFAULT_INITIAL_PLAYBACK_STATUS:()=>o,_DEFAULT_PROGRESS_UPDATE_INTERVAL_MILLIS:()=>i,assertStatusValuesInBounds:()=>u,getNativeSourceAndFullInitialStatusForLoadAsync:()=>c,getNativeSourceFromSource:()=>s,getUnloadedStatus:()=>d});var r=n(52386),a=n(53335);const i=500,o={positionMillis:0,progressUpdateIntervalMillis:i,shouldPlay:!1,rate:1,shouldCorrectPitch:!1,volume:1,audioPan:0,isMuted:!1,isLooping:!1};function s(e){let t,n=null,r=null;if("string"===typeof e)return{uri:e,overridingExtension:r,headers:t};const a=l(e);return null!=a?n=a.localUri||a.uri:null!=e&&"number"!==typeof e&&"uri"in e&&"string"===typeof e.uri&&(n=e.uri),null==n?null:(null!=e&&"number"!==typeof e&&"overrideFileExtensionAndroid"in e&&"string"===typeof e.overrideFileExtensionAndroid&&(r=e.overrideFileExtensionAndroid),null!=e&&"number"!==typeof e&&"headers"in e&&"object"===typeof e.headers&&(t=e.headers),{uri:n,overridingExtension:r,headers:t})}function l(e){if(null==e)return null;let t=null;return"number"===typeof e?t=r.Asset.fromModule(e):e instanceof r.Asset&&(t=e),t}function u(e){if("number"===typeof e.rate&&(e.rate<0||e.rate>32))throw new RangeError("Rate value must be between 0.0 and 32.0");if("number"===typeof e.volume&&(e.volume<0||e.volume>1))throw new RangeError("Volume value must be between 0.0 and 1.0");if("number"===typeof e.audioPan&&(e.audioPan<-1||e.audioPan>1))throw new RangeError("Pan value must be between -1.0 and 1.0")}async function c(e,t,n){const r=null==t?o:Object.assign({},o,t);if(u(r),"string"===typeof e)return{nativeSource:{uri:e,overridingExtension:null},fullInitialStatus:r};const a=l(e);n&&a&&await a.downloadAsync();const i=s(e);if(null===i)throw new Error("Cannot load an AV asset from a null playback source");return a&&a.localUri&&(i.uri=a.localUri),{nativeSource:i,fullInitialStatus:r}}function d(e=null){return Object.assign({isLoaded:!1},e?{error:e}:null)}const h={async playAsync(){return this.setStatusAsync({shouldPlay:!0})},async playFromPositionAsync(e,t={}){return this.setStatusAsync({positionMillis:e,shouldPlay:!0,seekMillisToleranceAfter:t.toleranceMillisAfter,seekMillisToleranceBefore:t.toleranceMillisBefore})},async pauseAsync(){return this.setStatusAsync({shouldPlay:!1})},async stopAsync(){return this.setStatusAsync({positionMillis:0,shouldPlay:!1})},async setPositionAsync(e,t={}){return this.setStatusAsync({positionMillis:e,seekMillisToleranceAfter:t.toleranceMillisAfter,seekMillisToleranceBefore:t.toleranceMillisBefore})},async setRateAsync(e,t=!1,n=a.PitchCorrectionQuality.Medium){return this.setStatusAsync({rate:e,shouldCorrectPitch:t,pitchCorrectionQuality:n})},async setVolumeAsync(e,t){return this.setStatusAsync({volume:e,audioPan:t})},async setIsMutedAsync(e){return this.setStatusAsync({isMuted:e})},async setIsLoopingAsync(e){return this.setStatusAsync({isLooping:e})},async setProgressUpdateIntervalAsync(e){return this.setStatusAsync({progressUpdateIntervalMillis:e})}}},53335:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PitchCorrectionQuality:()=>r});var r,a=n(36655);!function(e){e[e.Low=a.default&&a.default.Qualities&&a.default.Qualities.Low]="Low",e[e.Medium=a.default&&a.default.Qualities&&a.default.Qualities.Medium]="Medium",e[e.High=a.default&&a.default.Qualities&&a.default.Qualities.High]="High"}(r||(r={}))},2176:(e,t,n)=>{"use strict";var r,a;n.r(t),n.d(t,{AndroidAudioEncoder:()=>o.AndroidAudioEncoder,AndroidOutputFormat:()=>o.AndroidOutputFormat,IOSAudioQuality:()=>o.IOSAudioQuality,IOSBitRateStrategy:()=>o.IOSBitRateStrategy,IOSOutputFormat:()=>o.IOSOutputFormat,PermissionStatus:()=>o.PermissionStatus,PitchCorrectionQuality:()=>u.PitchCorrectionQuality,Recording:()=>o.Recording,RecordingOptionsPresets:()=>o.RecordingOptionsPresets,Sound:()=>s.Sound,getPermissionsAsync:()=>o.getPermissionsAsync,requestPermissionsAsync:()=>o.requestPermissionsAsync,setAudioModeAsync:()=>f,setIsEnabledAsync:()=>l.setIsEnabledAsync,usePermissions:()=>o.usePermissions}),function(e){e[e.MixWithOthers=0]="MixWithOthers",e[e.DoNotMix=1]="DoNotMix",e[e.DuckOthers=2]="DuckOthers"}(r||(r={})),function(e){e[e.DoNotMix=1]="DoNotMix",e[e.DuckOthers=2]="DuckOthers"}(a||(a={}));var i=n(36655),o=n(21213),s=n(27924),l=n(16019),u=n(53335);const c=(e,t)=>{for(const n in t)e.hasOwnProperty(n)||(e[n]=t[n]);return e},d={allowsRecordingIOS:!1,interruptionModeIOS:r.MixWithOthers,playsInSilentModeIOS:!1,staysActiveInBackground:!1,interruptionModeAndroid:a.DuckOthers,shouldDuckAndroid:!0,playThroughEarpieceAndroid:!1};let h=null;async function f(e){const t=c(e,h||d);if(!r[t.interruptionModeIOS])throw new Error('"interruptionModeIOS" was set to an invalid value.');if(!a[t.interruptionModeAndroid])throw new Error('"interruptionModeAndroid" was set to an invalid value.');if("boolean"!==typeof t.allowsRecordingIOS||"boolean"!==typeof t.playsInSilentModeIOS||"boolean"!==typeof t.staysActiveInBackground||"boolean"!==typeof t.shouldDuckAndroid||"boolean"!==typeof t.playThroughEarpieceAndroid)throw new Error('"allowsRecordingIOS", "playsInSilentModeIOS", "playThroughEarpieceAndroid", "staysActiveInBackground" and "shouldDuckAndroid" must be booleans.');return h=t,await i.default.setAudioMode(t)}},16019:(e,t,n)=>{"use strict";n.r(t),n.d(t,{isAudioEnabled:()=>i,setIsEnabledAsync:()=>s,throwIfAudioIsDisabled:()=>o});var r=n(36655);let a=!0;function i(){return a}function o(){if(!a)throw new Error("Cannot complete operation because audio is not enabled.")}async function s(e){a=e,await r.default.setAudioIsEnabled(e)}},21213:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AndroidAudioEncoder:()=>o.AndroidAudioEncoder,AndroidOutputFormat:()=>o.AndroidOutputFormat,IOSAudioQuality:()=>o.IOSAudioQuality,IOSBitRateStrategy:()=>o.IOSBitRateStrategy,IOSOutputFormat:()=>o.IOSOutputFormat,PermissionStatus:()=>a.PermissionStatus,Recording:()=>m,RecordingOptionsPresets:()=>o.RecordingOptionsPresets,getPermissionsAsync:()=>h,requestPermissionsAsync:()=>f,usePermissions:()=>p});var r=n(7836),a=n(35992),i=n(16019),o=n(41632),s=n(27924),l=n(14708),u=n(36655);let c=!1;const d=null;async function h(){return u.default.getPermissionsAsync()}async function f(){return u.default.requestPermissionsAsync()}const p=(0,r.createPermissionHook)({getMethod:h,requestMethod:f});class m{_subscription=null;_canRecord=!1;_isDoneRecording=!1;_finalDurationMillis=0;_uri=null;_onRecordingStatusUpdate=null;_progressUpdateTimeoutVariable=null;_progressUpdateIntervalMillis=l._DEFAULT_PROGRESS_UPDATE_INTERVAL_MILLIS;_options=null;_cleanupForUnloadedRecorder=async e=>(this._canRecord=!1,this._isDoneRecording=!0,this._finalDurationMillis=e?.durationMillis??0,c=!1,this._subscription&&(this._subscription.remove(),this._subscription=null),this._disablePolling(),await this.getStatusAsync());_pollingLoop=async()=>{if((0,i.isAudioEnabled)()&&this._canRecord&&null!=this._onRecordingStatusUpdate){this._progressUpdateTimeoutVariable=setTimeout(this._pollingLoop,this._progressUpdateIntervalMillis);try{await this.getStatusAsync()}catch{this._disablePolling()}}};_disablePolling(){null!=this._progressUpdateTimeoutVariable&&(clearTimeout(this._progressUpdateTimeoutVariable),this._progressUpdateTimeoutVariable=null)}_enablePollingIfNecessaryAndPossible(){(0,i.isAudioEnabled)()&&this._canRecord&&null!=this._onRecordingStatusUpdate&&(this._disablePolling(),this._pollingLoop())}_callOnRecordingStatusUpdateForNewStatus(e){null!=this._onRecordingStatusUpdate&&this._onRecordingStatusUpdate(e)}async _performOperationAndHandleStatusAsync(e){if((0,i.throwIfAudioIsDisabled)(),this._canRecord){const t=await e();return this._callOnRecordingStatusUpdateForNewStatus(t),t}throw new Error("Cannot complete operation because this recorder is not ready to record.")}static createAsync=async(e=o.RecordingOptionsPresets.LOW_QUALITY,t=null,n=null)=>{const r=new m;n&&(r._progressUpdateIntervalMillis=n),r.setOnRecordingStatusUpdate(t),await r.prepareToRecordAsync(Object.assign({},e,{keepAudioActiveHint:!0}));try{const e=await r.startAsync();return{recording:r,status:e}}catch(a){throw r.stopAndUnloadAsync().catch((e=>{})),a}};getStatusAsync=async()=>{if(this._canRecord)return this._performOperationAndHandleStatusAsync((()=>u.default.getAudioRecordingStatus()));const e={canRecord:!1,isRecording:!1,isDoneRecording:this._isDoneRecording,durationMillis:this._finalDurationMillis};return this._callOnRecordingStatusUpdateForNewStatus(e),e};setOnRecordingStatusUpdate(e){this._onRecordingStatusUpdate=e,null==e?this._disablePolling():this._enablePollingIfNecessaryAndPossible(),this.getStatusAsync()}setProgressUpdateInterval(e){this._progressUpdateIntervalMillis=e,this.getStatusAsync()}async prepareToRecordAsync(e=o.RecordingOptionsPresets.LOW_QUALITY){if((0,i.throwIfAudioIsDisabled)(),c)throw new Error("Only one Recording object can be prepared at a given time.");if(this._isDoneRecording)throw new Error("This Recording object is done recording; you must make a new one.");if(!e||!e.android||!e.ios)throw new Error("You must provide recording options for android and ios in order to prepare to record.");const t=/^\.\w+$/;if(!e.android.extension||!e.ios.extension||!t.test(e.android.extension)||!t.test(e.ios.extension))throw new Error(`Your file extensions must match ${t.toString()}.`);if(this._canRecord)throw new Error("This Recording object is already prepared to record.");{d&&(this._subscription=d.addListener("Expo.Recording.recorderUnloaded",this._cleanupForUnloadedRecorder));const{uri:t,status:n}=await u.default.prepareAudioRecorder(e);c=!0,this._uri=t,this._options=e,this._canRecord=!0;const r=Object.assign({},n,{canRecord:!0});return this._callOnRecordingStatusUpdateForNewStatus(r),this._enablePollingIfNecessaryAndPossible(),r}}async getAvailableInputs(){return u.default.getAvailableInputs()}async getCurrentInput(){return u.default.getCurrentInput()}async setInput(e){return u.default.setInput(e)}async startAsync(){return this._performOperationAndHandleStatusAsync((()=>u.default.startAudioRecording()))}async pauseAsync(){return this._performOperationAndHandleStatusAsync((()=>u.default.pauseAudioRecording()))}async stopAndUnloadAsync(){if(!this._canRecord)throw this._isDoneRecording?new Error("Cannot unload a Recording that has already been unloaded."):new Error("Cannot unload a Recording that has not been prepared.");let e,t;try{e=await u.default.stopAudioRecording()}catch(r){t=r}void 0!==e?.uri&&(this._uri=e.uri),await u.default.unloadAudioRecorder();const n=await this._cleanupForUnloadedRecorder(e);return t?Promise.reject(t):n}getURI(){return this._uri}async createNewLoadedSound(e={},t=null){return console.warn("createNewLoadedSound is deprecated in favor of createNewLoadedSoundAsync, which has the same API aside from the method name"),this.createNewLoadedSoundAsync(e,t)}async createNewLoadedSoundAsync(e={},t=null){if(null==this._uri||!this._isDoneRecording)throw new Error("Cannot create sound when the Recording has not finished!");return s.Sound.createAsync({uri:this._uri},e,t,!1)}}},41632:(e,t,n)=>{"use strict";var r,a,i,o,s;n.r(t),n.d(t,{AndroidAudioEncoder:()=>a,AndroidOutputFormat:()=>r,IOSAudioQuality:()=>o,IOSBitRateStrategy:()=>s,IOSOutputFormat:()=>i,RecordingOptionsPresets:()=>l}),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.THREE_GPP=1]="THREE_GPP",e[e.MPEG_4=2]="MPEG_4",e[e.AMR_NB=3]="AMR_NB",e[e.AMR_WB=4]="AMR_WB",e[e.AAC_ADIF=5]="AAC_ADIF",e[e.AAC_ADTS=6]="AAC_ADTS",e[e.RTP_AVP=7]="RTP_AVP",e[e.MPEG2TS=8]="MPEG2TS",e[e.WEBM=9]="WEBM"}(r||(r={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.AMR_NB=1]="AMR_NB",e[e.AMR_WB=2]="AMR_WB",e[e.AAC=3]="AAC",e[e.HE_AAC=4]="HE_AAC",e[e.AAC_ELD=5]="AAC_ELD"}(a||(a={})),function(e){e.LINEARPCM="lpcm",e.AC3="ac-3",e["60958AC3"]="cac3",e.APPLEIMA4="ima4",e.MPEG4AAC="aac ",e.MPEG4CELP="celp",e.MPEG4HVXC="hvxc",e.MPEG4TWINVQ="twvq",e.MACE3="MAC3",e.MACE6="MAC6",e.ULAW="ulaw",e.ALAW="alaw",e.QDESIGN="QDMC",e.QDESIGN2="QDM2",e.QUALCOMM="Qclp",e.MPEGLAYER1=".mp1",e.MPEGLAYER2=".mp2",e.MPEGLAYER3=".mp3",e.APPLELOSSLESS="alac",e.MPEG4AAC_HE="aach",e.MPEG4AAC_LD="aacl",e.MPEG4AAC_ELD="aace",e.MPEG4AAC_ELD_SBR="aacf",e.MPEG4AAC_ELD_V2="aacg",e.MPEG4AAC_HE_V2="aacp",e.MPEG4AAC_SPATIAL="aacs",e.AMR="samr",e.AMR_WB="sawb",e.AUDIBLE="AUDB",e.ILBC="ilbc",e[e.DVIINTELIMA=1836253201]="DVIINTELIMA",e[e.MICROSOFTGSM=1836253233]="MICROSOFTGSM",e.AES3="aes3",e.ENHANCEDAC3="ec-3"}(i||(i={})),function(e){e[e.MIN=0]="MIN",e[e.LOW=32]="LOW",e[e.MEDIUM=64]="MEDIUM",e[e.HIGH=96]="HIGH",e[e.MAX=127]="MAX"}(o||(o={})),function(e){e[e.CONSTANT=0]="CONSTANT",e[e.LONG_TERM_AVERAGE=1]="LONG_TERM_AVERAGE",e[e.VARIABLE_CONSTRAINED=2]="VARIABLE_CONSTRAINED",e[e.VARIABLE=3]="VARIABLE"}(s||(s={}));const l={HIGH_QUALITY:{isMeteringEnabled:!0,android:{extension:".m4a",outputFormat:r.MPEG_4,audioEncoder:a.AAC,sampleRate:44100,numberOfChannels:2,bitRate:128e3},ios:{extension:".m4a",outputFormat:i.MPEG4AAC,audioQuality:o.MAX,sampleRate:44100,numberOfChannels:2,bitRate:128e3,linearPCMBitDepth:16,linearPCMIsBigEndian:!1,linearPCMIsFloat:!1},web:{mimeType:"audio/webm",bitsPerSecond:128e3}},LOW_QUALITY:{isMeteringEnabled:!0,android:{extension:".3gp",outputFormat:r.THREE_GPP,audioEncoder:a.AMR_NB,sampleRate:44100,numberOfChannels:2,bitRate:128e3},ios:{extension:".m4a",audioQuality:o.MIN,outputFormat:i.MPEG4AAC,sampleRate:44100,numberOfChannels:2,bitRate:64e3,linearPCMBitDepth:16,linearPCMIsBigEndian:!1,linearPCMIsFloat:!1},web:{mimeType:"audio/webm",bitsPerSecond:128e3}}}},27924:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Sound:()=>h});var r=n(60430),a=n.n(r),i=n(14177);const o="@@nativeEmitterSubscription@@";class s{_listenerCount=0;constructor(e){if(e.__expo_module_name__)return e;this._nativeModule=e,this._eventEmitter=new i.default(e)}addListener(e,t){!this._listenerCount&&this._nativeModule.startObserving&&this._nativeModule.startObserving(),this._listenerCount++;const n=this._eventEmitter.addListener(e,t),r={[o]:n,remove:()=>{this.removeSubscription(r)}};return r}removeAllListeners(e){const t=this._eventEmitter.listenerCount?this._eventEmitter.listenerCount(e):this._eventEmitter.listeners(e).length;this._eventEmitter.removeAllListeners(e),this._listenerCount-=t,a()(this._listenerCount>=0,"EventEmitter must have a non-negative number of listeners"),!this._listenerCount&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving()}removeSubscription(e){const t=e[o];t&&("remove"in t&&t.remove(),this._listenerCount--,delete e[o],e.remove=()=>{},!this._listenerCount&&this._nativeModule.stopObserving&&this._nativeModule.stopObserving())}emit(e,...t){this._eventEmitter.emit(e,...t)}}var l=n(28945),u=n(16019),c=n(14708),d=n(36655);class h{_loaded=!1;_loading=!1;_key=null;_lastStatusUpdate=null;_lastStatusUpdateTime=null;_subscriptions=[];_eventEmitter=new s(d.default);_coalesceStatusUpdatesInMillis=100;_onPlaybackStatusUpdate=null;_onMetadataUpdate=null;_onAudioSampleReceived=null;static create=async(e,t={},n=null,r=!0)=>(console.warn("Sound.create is deprecated in favor of Sound.createAsync with the same API except for the new method name"),h.createAsync(e,t,n,r));static createAsync=async(e,t={},n=null,r=!0)=>{const a=new h;a.setOnPlaybackStatusUpdate(n);const i=await a.loadAsync(e,t,r);return{sound:a,status:i}};_callOnPlaybackStatusUpdateForNewStatus(e){const t=this._lastStatusUpdateTime&&JSON.stringify(e)===this._lastStatusUpdate&&Date.now()-this._lastStatusUpdateTime.getTime(){this._key===e&&this._callOnPlaybackStatusUpdateForNewStatus(t)};_internalMetadataUpdateCallback=({key:e,metadata:t})=>{this._key===e&&this._onMetadataUpdate?.(t)};_internalErrorCallback=({key:e,error:t})=>{this._key===e&&this._errorCallback(t)};_subscribeToNativeEvents(){this._loaded&&(this._subscriptions.push(this._eventEmitter.addListener("didUpdatePlaybackStatus",this._internalStatusUpdateCallback),this._eventEmitter.addListener("didUpdateMetadata",this._internalMetadataUpdateCallback)),this._subscriptions.push(this._eventEmitter.addListener("ExponentAV.onError",this._internalErrorCallback)))}_clearSubscriptions(){this._subscriptions.forEach((e=>e.remove())),this._subscriptions=[]}_errorCallback=e=>{this._clearSubscriptions(),this._loaded=!1,this._key=null,this._callOnPlaybackStatusUpdateForNewStatus((0,c.getUnloadedStatus)(e))};getStatusAsync=async()=>{if(this._loaded)return this._performOperationAndHandleStatusAsync((()=>d.default.getStatusForSound(this._key)));const e=(0,c.getUnloadedStatus)();return this._callOnPlaybackStatusUpdateForNewStatus(e),e};setOnPlaybackStatusUpdate(e){this._onPlaybackStatusUpdate=e,this.getStatusAsync()}setOnMetadataUpdate(e){this._onMetadataUpdate=e}setOnAudioSampleReceived(e){this._onAudioSampleReceived=e,null!=this._key&&this._updateAudioSampleReceivedCallback()}async loadAsync(e,t={},n=!0){if((0,u.throwIfAudioIsDisabled)(),this._loading)throw new Error("The Sound is already loading.");if(this._loaded)throw new Error("The Sound is already loaded.");{this._loading=!0;const{nativeSource:r,fullInitialStatus:a}=await(0,c.getNativeSourceAndFullInitialStatusForLoadAsync)(e,t,n);return new Promise(((e,t)=>{d.default.loadForSound(r,a).then((t=>{const[n,r]=t;this._key=n,this._loaded=!0,this._loading=!1,this._subscribeToNativeEvents(),this._callOnPlaybackStatusUpdateForNewStatus(r),e(r)})).catch((e=>{this._loading=!1,t(e)}))}))}}async unloadAsync(){if(this._loaded){this._loaded=!1;const e=this._key;this._key=null;const t=await d.default.unloadForSound(e);return this._callOnPlaybackStatusUpdateForNewStatus(t),this._clearSubscriptions(),t}return this.getStatusAsync()}async setStatusAsync(e){return(0,c.assertStatusValuesInBounds)(e),this._performOperationAndHandleStatusAsync((()=>d.default.setStatusForSound(this._key,e)))}async replayAsync(e={}){if(e.positionMillis&&0!==e.positionMillis)throw new Error("Requested position after replay has to be 0.");return this._performOperationAndHandleStatusAsync((()=>d.default.replaySound(this._key,Object.assign({},e,{positionMillis:0,shouldPlay:!0}))))}}Object.assign(h.prototype,c.PlaybackMixin)},36655:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(98587),a=n(35992),i=n(40668),o=n(41632);const s=["uri"];function l(e){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia(e);const t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||function(){const e=new Error("Permission unimplemented");throw e.code=0,e.name="NotAllowedError",e};return new Promise(((n,r)=>{t.call(navigator,e,n,r)}))}function u(e){if(!e)return{isLoaded:!1,error:void 0};const t=!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2);return{isLoaded:!0,uri:e.src,progressUpdateIntervalMillis:100,durationMillis:1e3*e.duration,positionMillis:1e3*e.currentTime,shouldPlay:e.autoplay,isPlaying:t,isBuffering:!1,rate:e.playbackRate,shouldCorrectPitch:!1,volume:e.volume,audioPan:0,isMuted:e.muted,isLooping:e.loop,didJustFinish:e.ended}}async function c(e,t){return void 0!==t.positionMillis&&(e.currentTime=t.positionMillis/1e3),void 0!==t.shouldPlay&&(t.shouldPlay?await e.play():await e.pause()),void 0!==t.rate&&(e.playbackRate=t.rate),void 0!==t.shouldCorrectPitch&&(e.preservesPitch=t.shouldCorrectPitch),void 0!==t.volume&&(e.volume=t.volume),void 0!==t.isMuted&&(e.muted=t.isMuted),void 0!==t.isLooping&&(e.loop=t.isLooping),u(e)}let d=null,h=0,f=0,p=!1;function m(){let e=f;return p&&h>0&&(e+=Date.now()-h),e}const g={getStatusForVideo:async e=>u(e),loadForVideo:async(e,t,n)=>u(e),unloadForVideo:async e=>u(e),setStatusForVideo:async(e,t)=>c(e,t),replayVideo:async(e,t)=>c(e,t),async setAudioMode(){},async setAudioIsEnabled(){},getStatusForSound:async e=>u(e),async loadForSound(e,t){const n="string"===typeof e?e:e.uri,r=new Audio(n);r.ontimeupdate=()=>{i.default.emit("didUpdatePlaybackStatus",{key:r,status:u(r)})},r.onerror=()=>{i.default.emit("ExponentAV.onError",{key:r,error:r.error.message})};const a=await c(r,t);return[r,a]},unloadForSound:async e=>(e.pause(),e.removeAttribute("src"),e.load(),u(e)),setStatusForSound:async(e,t)=>c(e,t),replaySound:async(e,t)=>c(e,t),getAudioRecordingStatus:async()=>({canRecord:"recording"===d?.state||"inactive"===d?.state,isRecording:"recording"===d?.state,isDoneRecording:!1,durationMillis:m(),uri:null}),async prepareAudioRecorder(e){if("undefined"!==typeof navigator&&!navigator.mediaDevices)throw new Error("No media devices available");h=0,f=0;const t=await l({audio:!0});d=new window.MediaRecorder(t,e?.web||o.RecordingOptionsPresets.HIGH_QUALITY.web),d.addEventListener("pause",(()=>{f=m(),p=!1})),d.addEventListener("resume",(()=>{h=Date.now(),p=!0})),d.addEventListener("start",(()=>{h=Date.now(),f=0,p=!0})),d.addEventListener("stop",(()=>{f=m(),p=!1,t.getTracks().forEach((e=>e.stop()))}));const n=await this.getAudioRecordingStatus();return{uri:null,status:(0,r.default)(n,s)}},async startAudioRecording(){if(null===d)throw new Error("Cannot start an audio recording without initializing a MediaRecorder. Run prepareToRecordAsync() before attempting to start an audio recording.");return"paused"===d.state?d.resume():d.start(),this.getAudioRecordingStatus()},async pauseAudioRecording(){if(null===d)throw new Error("Cannot start an audio recording without initializing a MediaRecorder. Run prepareToRecordAsync() before attempting to start an audio recording.");return d.pause(),this.getAudioRecordingStatus()},async stopAudioRecording(){if(null===d)throw new Error("Cannot start an audio recording without initializing a MediaRecorder. Run prepareToRecordAsync() before attempting to start an audio recording.");if("inactive"===d.state)return this.getAudioRecordingStatus();const e=new Promise((e=>d.addEventListener("dataavailable",(t=>e(t.data)))));d.stop();const t=await e,n=URL.createObjectURL(t);return Object.assign({},await this.getAudioRecordingStatus(),{uri:n})},async unloadAudioRecorder(){d=null},async getPermissionsAsync(){switch(await async function(e){if(!navigator||!navigator.permissions||!navigator.permissions.query)return null;try{const{state:t}=await navigator.permissions.query({name:e});switch(t){case"granted":return a.PermissionStatus.GRANTED;case"denied":return a.PermissionStatus.DENIED;default:return a.PermissionStatus.UNDETERMINED}}catch{return a.PermissionStatus.UNDETERMINED}}("microphone")){case a.PermissionStatus.GRANTED:return{status:a.PermissionStatus.GRANTED,expires:"never",canAskAgain:!0,granted:!0};case a.PermissionStatus.DENIED:return{status:a.PermissionStatus.DENIED,expires:"never",canAskAgain:!0,granted:!1};default:return await this.requestPermissionsAsync()}},async requestPermissionsAsync(){try{return(await l({audio:!0})).getTracks().forEach((e=>e.stop())),{status:a.PermissionStatus.GRANTED,expires:"never",canAskAgain:!0,granted:!0}}catch{return{status:a.PermissionStatus.DENIED,expires:"never",canAskAgain:!0,granted:!1}}}}},36393:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(98587),a=n(36665),i=n(73929);function o(e,t){const n=e/100;switch(t){case"dark":case"systemMaterialDark":return`rgba(25,25,25,${.78*n})`;case"light":case"extraLight":case"systemMaterialLight":case"systemUltraThinMaterialLight":case"systemThickMaterialLight":return`rgba(249,249,249,${.78*n})`;case"default":case"prominent":case"systemMaterial":return`rgba(255,255,255,${.3*n})`;case"regular":return`rgba(179,179,179,${.82*n})`;case"systemThinMaterial":return`rgba(199,199,199,${.97*n})`;case"systemChromeMaterial":return`rgba(255,255,255,${.75*n})`;case"systemChromeMaterialLight":return`rgba(255,255,255,${.97*n})`;case"systemUltraThinMaterial":case"systemThickMaterial":return`rgba(191,191,191,${.44*n})`;case"systemThickMaterialDark":return`rgba(37,37,37,${.9*n})`;case"systemThinMaterialDark":return`rgba(37,37,37,${.7*n})`;case"systemUltraThinMaterialDark":return`rgba(37,37,37,${.55*n})`;case"systemChromeMaterialDark":return`rgba(0,0,0,${.75*n})`;case"systemThinMaterialLight":return`rgba(199,199,199,${.78*n})`}}var s=n(60397);const l=["tint","intensity","style"];function u({intensity:e,tint:t}){const n=`saturate(180%) blur(${.2*Math.min(e,100)}px)`;return{backgroundColor:o(Math.min(e,100),t),backdropFilter:n,WebkitBackdropFilter:n}}const c=(0,a.forwardRef)(((e,t)=>{let{tint:n="default",intensity:o=50,style:c}=e,d=(0,r.default)(e,l);const h=(0,a.useRef)(null),f=u({tint:n,intensity:o});return(0,a.useImperativeHandle)(t,(()=>({setNativeProps:e=>{if(!h.current?.style)return;const t=u({intensity:e.style?.intensity??o,tint:n??"default"});if(e.style)for(const n in e.style)"intensity"!==n&&(h.current.style[n]=e.style[n]);h.current.style.backgroundColor=t.backgroundColor,h.current.style.backdropFilter=t.backdropFilter,h.current.style.webkitBackdropFilter=t.WebkitBackdropFilter}})),[o,n]),(0,s.jsx)(i.default,Object.assign({},d,{style:[c,f],ref:h}))}))},69202:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>q});var r=n(28945),a=n(36665),i=n(98587),o=n(91808),s=n(75675),l=n(73929),u=n(50658),c=n(88293),d=n(60430),h=n.n(d);function f(e){return"torch"===e}function p(e){switch(e){case"on":case"auto":return"continuous";case"off":return"none";case"singleShot":return"single-shot";default:return}}function m(e){switch(e){case"on":case"auto":return"continuous";case"off":return"manual";case"singleShot":return"single-shot";default:return}}const g=Object.keys({"3840x2160":3840/2160,"1920x1080":1920/1080,"1280x720":1280/720,"640x480":640/480,"352x288":352/288}),y={jpg:"image/jpeg",png:"image/png"},_={audio:!1,video:!0},b={front:"user",back:"environment"},v={user:"front",environment:"back"};var w=n(75084);const F=.92;function k(e,{scale:t=1,isImageMirror:n=!1}){const{videoWidth:r,videoHeight:a}=e,{width:i,height:o}=function(e,t,n){const r=e*n;return{width:r,height:t/(e/r)}}(r,a,t),s=document.createElement("canvas");s.width=i,s.height=o;const l=s.getContext("2d",{alpha:!1});if(!l)throw new Error("Context is not defined");return n&&l.setTransform(-1,0,0,1,s.width,0),l.drawImage(e,0,0,i,o),s}function x(e,t){const n=function(e){const t={scale:1,imageType:"png",isImageMirror:!1};for(const n in e)n in e&&void 0!==e[n]&&n in t&&(t[n]=e[n]);return t}(t),r=k(e,n),{imageType:a,quality:i=F}=n;return function(e,t,n){const r=["png","jpg"];h()(r.includes(t),`expo-camera: ${t} is not a valid ImageType. Expected a string from: ${r.join(", ")}`);const a=y[t];return"jpg"===t?(h()(n<=1&&n>=0,`expo-camera: ${n} is not a valid image quality. Expected a number from 0...1`),e.toDataURL(a,n)):e.toDataURL(a)}(r,a,i)}function A(e,t,n){const r={audio:!1,video:{}};if(function(e,t,n){return void 0!==e&&void 0!==t&&void 0!==n}(e,t,n))return _;const a=navigator.mediaDevices&&navigator.mediaDevices.getSupportedConstraints?navigator.mediaDevices.getSupportedConstraints():null;if(!a||!a.facingMode||!a.width||!a.height)return _;if(e&&["front","back"].includes(e)){const t=b[e];if(/WebKit/.test(navigator.userAgent)&&!/Edg/.test(navigator.userAgent)){const e="user"===t?"exact":"ideal";r.video.facingMode={[e]:t}}else r.video.facingMode={ideal:b[e]}}var i;return(i=r.video)&&"boolean"!==typeof i.video&&(r.video.width=t,r.video.height=n),r}async function S(e,t,n){const r=A(e,t,n);return await(0,w.requestUserMediaAsync)(r)}async function E(e,t,n={}){t?.getVideoTracks&&await Promise.all(t.getVideoTracks().map((t=>async function(e,t,n={}){if("function"!==typeof t.getCapabilities)return;const r=t.getCapabilities(),a={},i=["exposureCompensation","colorTemperature","iso","brightness","contrast","saturation","sharpness","focusDistance","zoom"];for(const l of i)r[l]&&(a[l]=D(r[l],n[l]));function o(t,a,i){return function(e){const{constraintKey:t,settingsKey:n,convertedSetting:r,capabilities:a,settings:i,cameraType:o}=e;i[n];if(Array.isArray(a[t])&&r&&!a[t].includes(r))return void 0;return r}({constraintKey:t,settingsKey:a,convertedSetting:i(n[a]),capabilities:r,settings:n,cameraType:e})}r.focusMode&&void 0!==n.autoFocus&&(a.focusMode=o("focusMode","autoFocus",m));r.torch&&void 0!==n.flashMode&&(a.torch=o("torch","flashMode",f));r.whiteBalanceMode&&void 0!==n.whiteBalance&&(a.whiteBalanceMode=o("whiteBalanceMode","whiteBalance",p));try{await t.applyConstraints({advanced:[a]})}catch(s){0}}(e,t,n))))}function C(e){e&&(e.getAudioTracks&&e.getAudioTracks().forEach((e=>e.stop())),e.getVideoTracks&&e.getVideoTracks().forEach((e=>e.stop())),"function"===typeof e.stop&&e.stop())}function T(e,t){const n=window.URL.createObjectURL??window.webkitURL.createObjectURL;if("undefined"!==typeof e.srcObject?e.srcObject=t:"undefined"!==typeof e.mozSrcObject?e.mozSrcObject=t:t&&n&&(e.src=n(t)),!t){const t=window.URL.revokeObjectURL??window.webkitURL.revokeObjectURL,n=e.src??e.srcObject??e.mozSrcObject;t&&"string"===typeof n&&t(n)}}function D(e,t){if(!t)return;const n=function(e,t,n=[0,1]){return(e-n[0])*(t[1]-t[0])/(n[1]-n[0])+t[0]}(t,[e.min,e.max]);return Math.min(e.max,Math.max(e.min,n))}const I=["autoFocus","flashMode","exposureCompensation","colorTemperature","iso","brightness","contrast","saturation","sharpness","focusDistance","whiteBalance","zoom"];function O(e,t,n,{onCameraReady:r,onMountError:i}){const o=a.useRef(!1),s=a.useRef([]),l=a.useRef({autoFocus:"continuous",flashMode:"off",whiteBalance:"continuous",zoom:1}),[u,c]=a.useState(null),d=a.useMemo((()=>u?u.getTracks()[0].getSettings():null),[u]),h=a.useMemo((()=>{if(!d)return null;const{facingMode:e="user"}=d;return v[e]}),[d]),f=a.useCallback((async()=>{try{return await async function(e,t,n){try{return await S(e,t,n)}catch(r){if(r instanceof OverconstrainedError&&"facingMode"===r.constraint){const r="back"===e?"front":"back";return await S(r,t,n)}throw r}}(t)}catch(e){return i&&i({nativeEvent:e}),null}}),[t,i]),p=a.useCallback((async()=>{const e=await f();return function(e,t){if(!e||!t)return!1;const n=e.getTracks()[0].getSettings(),r=t.getTracks()[0].getSettings();return n.deviceId===r.deviceId}(e,u)||(s.current.some((t=>t.id===e?.id))||s.current.push(e),c(e),r&&r()),!1}),[f,c,r,u,s.current]);return a.useEffect((()=>{o.current||(o.current=!0,p().then((e=>{o.current=e})).catch((()=>{o.current=!1})))}),[t]),a.useEffect((()=>{const e={};for(const t of Object.keys(n)){if(!I.includes(t))continue;const r=n[t];r!==l.current[t]&&(e[t]=r)}const r=!!Object.keys(e).length,a=Object.assign({},l.current,e);r&&E(t,u,e),l.current=a}),[n.autoFocus,n.flashMode,n.exposureCompensation,n.colorTemperature,n.iso,n.brightness,n.contrast,n.saturation,n.sharpness,n.focusDistance,n.whiteBalance,n.zoom]),a.useEffect((()=>{e.current&&T(e.current,u)}),[e.current,u]),a.useEffect((()=>()=>{for(const e of s.current)C(e);e.current&&T(e.current,u)}),[]),function(e,t){a.useEffect((()=>{e&&e.addEventListener("loadedmetadata",(()=>{requestAnimationFrame((()=>{t()}))}))}),[e])}(e.current,(()=>{E(t,u,l.current)})),{type:h,mediaTrackSettings:d}}const P=((e,t)=>{const n=[`self.func = ${e.toString()};`,"self.onmessage = (e) => {"," const result = self.func(e.data);"," self.postMessage(result);","};"];t.length>0&&n.unshift(`importScripts(${t.map((e=>`'${e}'`)).join(", ")});`);const r=new Blob(n,{type:"text/javascript"}),a=new Worker(URL.createObjectURL(r)),i=[];return a.onmessage=e=>i.shift()?.resolve(e.data),e=>new Promise(((t,n)=>{i.push({resolve:t,reject:n}),a.postMessage(e)}))})((({data:e,width:t,height:n})=>{const r=self.jsQR(e,t,n,{inversionAttempts:"attemptBoth"});let a;try{a=JSON.parse(r)}catch{a=r}if(a?.data){const e={type:"qr",data:a.data,cornerPoints:[],bounds:{origin:{x:0,y:0},size:{width:0,height:0}}};return a.location&&(e.cornerPoints=[a.location.topLeftCorner,a.location.bottomLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner]),e}return a}),["https://cdn.jsdelivr.net/npm/jsqr@1.2.0/dist/jsQR.min.js"]);function M(e,{isEnabled:t,captureOptions:n,interval:r,onScanned:i,onError:o}){const s=a.useRef(!1),l=a.useRef(void 0);async function u(){if(s.current&&i)try{const t=function(e,t={}){if(!e||e.readyState!==e.HAVE_ENOUGH_DATA)return null;const n=k(e,t),r=n.getContext("2d",{alpha:!1});return r&&n.width&&n.height?r.getImageData(0,0,n.width,n.height):null}(e.current,n);if(t){const e=await P(t);e?.data&&i({nativeEvent:e})}}catch(t){o&&o({nativeEvent:t})}finally{if(0===r)return void c();const e=!r||r<0?16:r;l.current=setTimeout((()=>{u()}),e)}else c()}function c(){s.current=!1,clearTimeout(l.current)}a.useEffect((()=>(t&&(s.current=!0,u()),()=>{t&&c()})),[t])}var R=n(60397);const L=["facing","poster"],N=(0,a.forwardRef)(((e,t)=>{let{facing:n,poster:r}=e,u=(0,i.default)(e,L);const d=(0,a.useRef)(null),h=O(d,n,u,{onCameraReady(){u.onCameraReady&&u.onCameraReady()},onMountError:u.onMountError}),f=(0,a.useMemo)((()=>Boolean(u.barcodeScannerSettings?.barcodeTypes?.includes("qr")&&!!u.onBarcodeScanned)),[u.barcodeScannerSettings?.barcodeTypes,u.onBarcodeScanned]);M(d,{interval:300,isEnabled:f,captureOptions:{scale:1,isImageMirror:"front"===h.type},onScanned(e){u.onBarcodeScanned&&u.onBarcodeScanned(e)}}),(0,a.useImperativeHandle)(t,(()=>({getAvailablePictureSizes:async()=>g,async takePicture(e){if(!d.current||d.current?.readyState!==d.current?.HAVE_ENOUGH_DATA)throw new o.CodedError("ERR_CAMERA_NOT_READY","HTMLVideoElement does not have enough camera data to construct an image yet.");const t=h.mediaTrackSettings;if(!t)throw new o.CodedError("ERR_CAMERA_NOT_READY","MediaStream is not ready yet.");return function(e,t,n){const r=x(e,n),a={uri:r,base64:r,width:0,height:0};if(t){const{width:e=0,height:n=0}=t;a.width=e,a.height=n,a.exif=t}return n.onPictureSaved&&n.onPictureSaved(a),a}(d.current,t,Object.assign({},e,{onPictureSaved(t){e.onPictureSaved&&e.onPictureSaved(t),u.onPictureSaved&&u.onPictureSaved({nativeEvent:{data:t,id:-1}})}}))},async resumePreview(){d.current&&d.current.play()},async pausePreview(){d.current&&d.current.pause()}})),[h.mediaTrackSettings,u.onPictureSaved]);const p=(0,a.useMemo)((()=>{const e=h.type===c.default.Type.front;return[s.default.absoluteFill,j.video,{transform:e?[{scaleX:-1}]:void 0}]}),[h.type]);return(0,R.jsxs)(l.default,{pointerEvents:"box-none",style:[j.videoWrapper,u.style],children:[(0,R.jsx)(B,{autoPlay:!0,playsInline:!0,muted:!0,poster:r,pointerEvents:u.pointerEvents,ref:d,style:p}),u.children]})})),B=(0,a.forwardRef)(((e,t)=>(0,u.default)("video",Object.assign({},e,{ref:t})))),j=s.default.create({videoWrapper:{flex:1,alignItems:"stretch"},video:{width:"100%",height:"100%",objectFit:"cover"}}),V={type:c.default.Type,flash:c.default.FlashMode};function z(e){const t=function(e){if(!e||"object"!==typeof e)return{};const t={};for(const[n,r]of Object.entries(e))t[n]="string"===typeof r&&V[n]?V[n][r]:r;return t}(e);return t.barcodeScannerEnabled=!!e?.onBarcodeScanned,t.flashMode=e?.flash??"off",t.mute=e?.mute??!1,t.autoFocus=e?.autofocus??"off",t}const H={};let U=1;function W({nativeEvent:e}){const{id:t,data:n}=e,r=H[t];r&&(r(n),delete H[t])}class q extends a.Component{static isModernBarcodeScannerAvailable=c.default.isModernBarcodeScannerAvailable;static async isAvailableAsync(){if(!c.default.isAvailableAsync)throw new r.UnavailabilityError("expo-camera","isAvailableAsync");return await c.default.isAvailableAsync()}static async getAvailableVideoCodecsAsync(){if(!c.default.getAvailableVideoCodecsAsync)throw new r.UnavailabilityError("Camera","getAvailableVideoCodecsAsync");return await c.default.getAvailableVideoCodecsAsync()}async getAvailablePictureSizesAsync(){return await(this._cameraRef.current?.getAvailablePictureSizes())??[]}async resumePreview(){return this._cameraRef.current?.resumePreview()}async pausePreview(){return this._cameraRef.current?.pausePreview()}static ConversionTables=V;static defaultProps={zoom:0,facing:"back",enableTorch:!1,mode:"picture",flash:"off"};_cameraRef=(0,a.createRef)();_lastEvents={};_lastEventsTimes={};async takePictureAsync(e){const t=function(e){if(!e||"object"!==typeof e)return{};if(void 0===e.quality&&(e.quality=1),e.mirror&&console.warn("The `mirror` option is deprecated. Please use the `mirror` prop on the `CameraView` instead."),e.onPictureSaved){const t=U++;H[t]=e.onPictureSaved,e.id=t,e.fastMode=!0}return e}(e);return this._cameraRef.current?.takePicture(t)}static async launchScanner(e){e||(e={barcodeTypes:[]})}static async dismissScanner(){0}static onModernBarcodeScanned(e){return c.default.addListener("onModernBarcodeScanned",e)}async recordAsync(e){const t=function(e={}){return e&&"object"===typeof e?(e.mirror&&console.warn("The `mirror` option is deprecated. Please use the `mirror` prop on the `CameraView` instead."),e):{}}(e);return this._cameraRef.current?.record(t)}stopRecording(){this._cameraRef.current?.stopRecording()}_onCameraReady=()=>{this.props.onCameraReady&&this.props.onCameraReady()};_onMountError=({nativeEvent:e})=>{this.props.onMountError&&this.props.onMountError(e)};_onResponsiveOrientationChanged=({nativeEvent:e})=>{this.props.onResponsiveOrientationChanged&&this.props.onResponsiveOrientationChanged(e)};_onObjectDetected=e=>({nativeEvent:t})=>{const{type:n}=t;this._lastEvents[n]&&this._lastEventsTimes[n]&&JSON.stringify(t)===this._lastEvents[n]&&(new Date).getTime()-this._lastEventsTimes[n].getTime()<500||e&&(e(t),this._lastEventsTimes[n]=new Date,this._lastEvents[n]=JSON.stringify(t))};_setReference=e=>{e&&(this._cameraHandle=e)};render(){const e=z(this.props),t=this.props.onBarcodeScanned?this._onObjectDetected(this.props.onBarcodeScanned):void 0;return(0,R.jsx)(N,Object.assign({},e,{ref:this._cameraRef,onCameraReady:this._onCameraReady,onMountError:this._onMountError,onBarcodeScanned:t,onPictureSaved:W,onResponsiveOrientationChanged:this._onResponsiveOrientationChanged}))}}},88293:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(28945),a=n(35992),i=n(75084);function o(e){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia(e);const t=navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||function(){const e=new Error("Permission unimplemented");throw e.code=0,e.name="NotAllowedError",e};return new Promise(((n,r)=>{t.call(navigator,e,n,r)}))}function s({message:e}){return"Permission dismissed"===e?{status:a.PermissionStatus.UNDETERMINED,expires:"never",canAskAgain:!0,granted:!1}:{status:a.PermissionStatus.DENIED,expires:"never",canAskAgain:!0,granted:!1}}async function l(){try{return await o({video:!0}),{status:a.PermissionStatus.GRANTED,expires:"never",canAskAgain:!0,granted:!0}}catch({message:e}){return s({message:e})}}async function u(e){if(!navigator?.permissions?.query)throw new r.UnavailabilityError("expo-camera","navigator.permissions API is not available");try{const{state:t}=await navigator.permissions.query({name:e});switch(t){case"prompt":return{status:a.PermissionStatus.UNDETERMINED,expires:"never",canAskAgain:!0,granted:!1};case"granted":return{status:a.PermissionStatus.GRANTED,expires:"never",canAskAgain:!0,granted:!0};case"denied":return{status:a.PermissionStatus.DENIED,expires:"never",canAskAgain:!0,granted:!1}}}catch(t){if(t instanceof TypeError)return{status:a.PermissionStatus.UNDETERMINED,expires:"never",canAskAgain:!0,granted:!1};throw t}}const c={get Type(){return{back:"back",front:"front"}},get FlashMode(){return{on:"on",off:"off",auto:"auto",torch:"torch"}},get AutoFocus(){return{on:"on",off:"off",auto:"auto",singleShot:"singleShot"}},get WhiteBalance(){return{auto:"auto",continuous:"continuous",manual:"manual"}},get VideoQuality(){return{}},get VideoStabilization(){return{}},isAvailableAsync:async()=>(0,i.canGetUserMedia)(),takePicture:async(e,t)=>await t.takePicture(e),async pausePreview(e){await e.pausePreview()},resumePreview:async e=>await e.resumePreview(),async getAvailableCameraTypesAsync(){if(!(0,i.canGetUserMedia)()||!navigator.mediaDevices.enumerateDevices)return[];const e=await navigator.mediaDevices.enumerateDevices();return(await Promise.all([await(0,i.isFrontCameraAvailableAsync)(e)&&"front",await(0,i.isBackCameraAvailableAsync)()&&"back"])).filter(Boolean)},getAvailablePictureSizes:async(e,t)=>await t.getAvailablePictureSizes(e),getPermissionsAsync:async()=>u("camera"),requestPermissionsAsync:async()=>l(),getCameraPermissionsAsync:async()=>u("camera"),requestCameraPermissionsAsync:async()=>l(),getMicrophonePermissionsAsync:async()=>u("microphone"),async requestMicrophonePermissionsAsync(){try{return await o({audio:!0}),{status:a.PermissionStatus.GRANTED,expires:"never",canAskAgain:!0,granted:!0}}catch({message:e}){return s({message:e})}}}},18902:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Camera:()=>p,CameraView:()=>i.default,PermissionStatus:()=>o.PermissionStatus,scanFromURLAsync:()=>f,useCameraPermissions:()=>u,useMicrophonePermissions:()=>h});var r=n(7836),a=n(88293),i=n(69202),o=n(35992);async function s(){return a.default.getCameraPermissionsAsync()}async function l(){return a.default.requestCameraPermissionsAsync()}const u=(0,r.createPermissionHook)({getMethod:s,requestMethod:l});async function c(){return a.default.getMicrophonePermissionsAsync()}async function d(){return a.default.requestMicrophonePermissionsAsync()}const h=(0,r.createPermissionHook)({getMethod:c,requestMethod:d});async function f(e,t=["qr"]){return a.default.scanFromURLAsync(e,t)}const p={getCameraPermissionsAsync:s,requestCameraPermissionsAsync:l,getMicrophonePermissionsAsync:c,requestMicrophonePermissionsAsync:d,scanFromURLAsync:f}},75084:(e,t,n)=>{"use strict";n.r(t),n.d(t,{canGetUserMedia:()=>c,getAnyUserMediaAsync:()=>l,getUserMediaAsync:()=>u,isBackCameraAvailableAsync:()=>h,isFrontCameraAvailableAsync:()=>d,mountedInstances:()=>i,requestUserMediaAsync:()=>s,userMediaRequested:()=>a});var r=n(40495);const a=!1,i=[];async function o(e,t,n){const r={video:"undefined"===typeof n||n};return e||(r.audio="undefined"===typeof t||t),await l(r)}async function s(e,t=!0){if(c())return await o(t,e.audio,e.video);const[n,r]=await async function(e){const t=e=>({optional:[{sourceId:e}]}),n=e=>{const{deviceId:t}=e;return"string"===typeof t?t:Array.isArray(t)&&t.length>0?t[0]:"object"===typeof t&&t.ideal?t.ideal:null},r=await new Promise((e=>MediaStreamTrack.getSources((t=>e(t)))));let a=null,i=null;r.forEach((e=>{"audio"===e.kind?a=e.id:"video"===e.kind&&(i=e.id)}));const o=n(e.audioConstraints);o&&(a=o);const s=n(e.videoConstraints);return s&&(i=s),[t(a),t(i)]}(e);return await o(t,n,r)}async function l(e,t=!1){try{return await u(Object.assign({},e,{video:t||e.video}))}catch(n){if(!t&&"ConstraintNotSatisfiedError"===n.name)return await l(e,!0);throw n}}async function u(e){if(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia(e);const t=navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia;return new Promise(((n,r)=>t.call(navigator,e,n,r)))}function c(){return r.default.isDOMAvailable&&!!(navigator.mediaDevices&&navigator.mediaDevices.getUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia||navigator.msGetUserMedia)}async function d(e){return await f(["front","user","facetime"],"user",e)}async function h(e){return await f(["back","rear"],"environment",e)}async function f(e,t,n){if(!n){if(!navigator.mediaDevices.enumerateDevices)return null;n=await navigator.mediaDevices.enumerateDevices()}const r=n.filter((e=>"videoinput"===e.kind)),[a]=r.filter((t=>e.some((e=>t.label.toLowerCase().includes(e))))),[i]=r.filter((e=>{if(!("getCapabilities"in e))return null;const n=e.getCapabilities();return n.facingMode?n.facingMode.find((e=>t)):null}));return i?.deviceId||a?.deviceId||null}},64505:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Checkbox:()=>c,default:()=>h});var r=n(98587),a=n(36665),i=n(75675),o=n(73929),s=n(50658),l=n(60397);const u=["color","disabled","onChange","onValueChange","style","value"],c=a.forwardRef(((e,t)=>{let{color:n,disabled:a,onChange:i,onValueChange:c,style:h,value:f}=e,p=(0,r.default)(e,u);const m=(0,l.jsx)(o.default,{style:[d.fakeControl,f&&d.fakeControlChecked,!!n&&{backgroundColor:f?n:void 0,borderColor:n},a&&d.fakeControlDisabled,f&&a&&d.fakeControlCheckedAndDisabled]}),g=(0,s.default)("input",{"aria-checked":f,"aria-disabled":a,checked:f,disabled:a,onChange:e=>{const t=e.nativeEvent.target.checked;e.nativeEvent.value=t,i?.(e),c?.(t)},style:[d.nativeControl,d.cursorInherit],type:"checkbox"});return(0,l.jsxs)(o.default,Object.assign({ref:t},p,{style:[d.root,h,a&&d.cursorDefault],children:[g,m]}))})),d=i.default.create({root:{cursor:"pointer",height:16,userSelect:"none",width:16},cursorDefault:{cursor:"default"},cursorInherit:{cursor:"inherit"},fakeControl:Object.assign({},i.default.absoluteFillObject,{pointerEvents:"none",alignItems:"center",backgroundColor:"#fff",borderColor:"#657786",borderRadius:2,borderStyle:"solid",borderWidth:2,height:"100%",justifyContent:"center",width:"100%"}),fakeControlChecked:{backgroundColor:"#009688",backgroundImage:'url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgdmVyc2lvbj0iMS4xIgogICB2aWV3Qm94PSIwIDAgMSAxIgogICBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWluWU1pbiBtZWV0Ij4KICA8cGF0aAogICAgIGQ9Ik0gMC4wNDAzODA1OSwwLjYyNjc3NjcgMC4xNDY0NDY2MSwwLjUyMDcxMDY4IDAuNDI5Mjg5MzIsMC44MDM1NTMzOSAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IE0gMC4yMTcxNTcyOSwwLjgwMzU1MzM5IDAuODUzNTUzMzksMC4xNjcxNTcyOSAwLjk1OTYxOTQxLDAuMjczMjIzMyAwLjMyMzIyMzMsMC45MDk2MTk0MSB6IgogICAgIGlkPSJyZWN0Mzc4MCIKICAgICBzdHlsZT0iZmlsbDojZmZmZmZmO2ZpbGwtb3BhY2l0eToxO3N0cm9rZTpub25lIiAvPgo8L3N2Zz4K")',backgroundRepeat:"no-repeat",borderColor:"#009688"},fakeControlDisabled:{borderColor:"#CCD6DD"},fakeControlCheckedAndDisabled:{backgroundColor:"#AAB8C2",borderColor:"#AAB8C2"},nativeControl:Object.assign({},i.default.absoluteFillObject,{height:"100%",margin:0,padding:0,width:"100%",WebkitAppearance:"none"})}),h=c},30511:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppOwnership:()=>s.AppOwnership,ExecutionEnvironment:()=>s.ExecutionEnvironment,UserInterfaceIdiom:()=>s.UserInterfaceIdiom,default:()=>F});var r=n(98587);function a(e){return"object"===typeof globalThis.ExpoDomWebView&&null!=globalThis?.expo?.modules?globalThis.expo?.modules?.[e]??null:null}var i=n(91808),o=n(45548),s=n(20269);const l=(Date.now()+"-"+Math.floor(1e9*Math.random())).toString();const u={get appOwnership(){return null},get executionEnvironment(){return s.ExecutionEnvironment.Bare},get sessionId(){return l},get isHeadless(){return"undefined"===typeof navigator||/\bHeadlessChrome\//.test(navigator.userAgent)},get expoVersion(){return this.manifest.sdkVersion||null},get linkingUri(){return"undefined"!==typeof location?location.origin:""},get expoRuntimeVersion(){return this.expoVersion},get deviceName(){return function(){if("undefined"!==typeof navigator&&"string"===typeof navigator.userAgent){const e=navigator.userAgent.toLowerCase();if(e.includes("edge"))return"Edge";if(e.includes("edg"))return"Chromium Edge";if(e.includes("opr")&&window.opr)return"Opera";if(e.includes("chrome")&&window.chrome)return"Chrome";if(e.includes("trident"))return"IE";if(e.includes("firefox"))return"Firefox";if(e.includes("safari"))return"Safari"}}()},get systemFonts(){return[]},get statusBarHeight(){return 0},get deviceYearClass(){return null},get manifest(){return{web:{},experiments:{tsconfigPaths:!0},name:"SmartSaaS",slug:"smartsaas-resolver",version:"1.0.1004",icon:"./assets/icon.png",platforms:["android","ios","web"],userInterfaceStyle:"automatic",scheme:"com.anonymous.smartsaas",orientation:"default",splash:{image:"./assets/splash.png",resizeMode:"contain"},androidStatusBar:{translucent:!0,backgroundColor:"#00000000"},updates:{fallbackToCacheTimeout:0,url:"https://u.expo.dev/24afda9c-55af-4500-9ddf-124aa0491594"},extra:{eas:{projectId:"24afda9c-55af-4500-9ddf-124aa0491594"}},owner:"smartsaas",runtimeVersion:{policy:"appVersion"},sdkVersion:"52.0.0"}||{}},get manifest2(){return null},get experienceUrl(){return"undefined"!==typeof location?location.origin:""},get debugMode(){return!1},getWebViewUserAgentAsync:async()=>"undefined"!==typeof navigator?navigator.userAgent:null};u||console.warn("No native ExponentConstants module found, are you sure the expo-constants's module is linked properly?");const c=a("ExpoUpdates");let d=null;if(c){let e;c.manifest?e=c.manifest:c.manifestString&&(e=JSON.parse(c.manifestString)),e&&Object.keys(e).length>0&&(d=e)}let h=null;if(o.default.EXDevLauncher){let e;o.default.EXDevLauncher.manifestString&&(e=JSON.parse(o.default.EXDevLauncher.manifestString)),e&&Object.keys(e).length>0&&(h=e)}let f=null;if(u&&u.manifest){const e=u.manifest;f="string"===typeof e?JSON.parse(e):e}let p=d??h??f;const m=u||{},{appOwnership:g}=m,y=(0,r.default)(m,["name","appOwnership"]),_=Object.assign({},y,{appOwnership:g??null});function b(e){return!v(e)}function v(e){return"metadata"in e}function w(e=!1){if(!p){const e=null===p?"null":"undefined";if(y.executionEnvironment,s.ExecutionEnvironment.Bare,y.executionEnvironment===s.ExecutionEnvironment.StoreClient||y.executionEnvironment===s.ExecutionEnvironment.Standalone)throw new i.CodedError("ERR_CONSTANTS_MANIFEST_UNAVAILABLE",`Constants.manifest is ${e}, must be an object.`)}return p}Object.defineProperties(_,{__unsafeNoWarnManifest:{get(){const e=w(!0);return e&&b(e)?e:null},enumerable:!1},__unsafeNoWarnManifest2:{get(){const e=w(!0);return e&&v(e)?e:null},enumerable:!1},manifest:{get(){const e=w();return e&&b(e)?e:null},enumerable:!0},manifest2:{get(){const e=w();return e&&v(e)?e:null},enumerable:!0},expoConfig:{get(){const e=w(!0);return e?c&&c.isEmbeddedLaunch?f:v(e)?e.extra?.expoClient??null:b(e)?e:null:null},enumerable:!0},expoGoConfig:{get(){const e=w(!0);return e?v(e)?e.extra?.expoGo??null:b(e)?e:null:null},enumerable:!0},easConfig:{get(){const e=w(!0);return e?v(e)?e.extra?.eas??null:b(e)?e:null:null},enumerable:!0},__rawManifest_TEST:{get:()=>p,set(e){p=e},enumerable:!1}});const F=_},20269:(e,t,n)=>{"use strict";var r,a,i;n.r(t),n.d(t,{AppOwnership:()=>r,ExecutionEnvironment:()=>a,UserInterfaceIdiom:()=>i}),function(e){e.Expo="expo"}(r||(r={})),function(e){e.Bare="bare",e.Standalone="standalone",e.StoreClient="storeClient"}(a||(a={})),function(e){e.Handset="handset",e.Tablet="tablet",e.Desktop="desktop",e.TV="tv",e.Unsupported="unsupported"}(i||(i={}))},48891:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DeviceType:()=>r,brand:()=>h,designName:()=>g,deviceName:()=>C,deviceType:()=>_,deviceYearClass:()=>b,getDeviceTypeAsync:()=>T,getMaxMemoryAsync:()=>I,getPlatformFeaturesAsync:()=>M,getUptimeAsync:()=>D,hasPlatformFeatureAsync:()=>R,isDevice:()=>d,isRootedExperimentalAsync:()=>O,isSideLoadingEnabledAsync:()=>P,manufacturer:()=>f,modelId:()=>p,modelName:()=>m,osBuildFingerprint:()=>S,osBuildId:()=>x,osInternalBuildId:()=>A,osName:()=>F,osVersion:()=>k,platformApiLevel:()=>E,productName:()=>y,supportedCpuArchitectures:()=>w,totalMemory:()=>v});var r,a=n(28945);!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.PHONE=1]="PHONE",e[e.TABLET=2]="TABLET",e[e.DESKTOP=3]="DESKTOP",e[e.TV=4]="TV"}(r||(r={}));var i=n(40495),o=n(93887),s=n.n(o);let l=null;if(i.default.isDOMAvailable){const e=new(s())(window.navigator.userAgent);l=e.getResult()}function u(){switch(l?.device?.type){case"mobile":return r.PHONE;case"tablet":return r.TABLET;case"smarttv":return r.TV;case"console":case"embedded":case"wearable":return r.UNKNOWN;default:return r.DESKTOP}}const c={get isDevice(){return!0},get brand(){return null},get manufacturer(){return l&&l.device.vendor||null},get modelName(){return l&&l.device.model||null},get deviceYearClass(){return null},get deviceType(){return u()},get totalMemory(){if(i.default.isDOMAvailable&&"deviceMemory"in navigator){const{deviceMemory:t}=navigator;return e=t,Math.round(e*1024**3)}var e;return null},get supportedCpuArchitectures(){return l&&l.cpu.architecture?[l.cpu.architecture]:null},get osName(){return l&&l.os.name||""},get osVersion(){return l&&l.os.version||""},get osBuildId(){return null},get osInternalBuildId(){return null},get deviceName(){return null},getDeviceTypeAsync:async()=>u(),isRootedExperimentalAsync:async()=>!1},d=!c||c.isDevice,h=c?c.brand:null,f=c?c.manufacturer:null,p=c&&c.modelId||null,m=c?c.modelName:null,g=c&&c.designName||null,y=c&&c.productName||null,_=c?c.deviceType:null,b=c?c.deviceYearClass:null,v=c?c.totalMemory:null,w=c?c.supportedCpuArchitectures:null,F=c?c.osName:null,k=c?c.osVersion:null,x=c?c.osBuildId:null,A=c?c.osInternalBuildId:null,S=c&&c.osBuildFingerprint||null,E=c&&c.platformApiLevel||null,C=c?c.deviceName:null;async function T(){if(!c.getDeviceTypeAsync)throw new a.UnavailabilityError("expo-device","getDeviceTypeAsync");return await c.getDeviceTypeAsync()}async function D(){if(!c.getUptimeAsync)throw new a.UnavailabilityError("expo-device","getUptimeAsync");return await c.getUptimeAsync()}async function I(){if(!c.getMaxMemoryAsync)throw new a.UnavailabilityError("expo-device","getMaxMemoryAsync");let e=await c.getMaxMemoryAsync();return-1===e&&(e=Number.MAX_SAFE_INTEGER),e}async function O(){if(!c.isRootedExperimentalAsync)throw new a.UnavailabilityError("expo-device","isRootedExperimentalAsync");return await c.isRootedExperimentalAsync()}async function P(){if(!c.isSideLoadingEnabledAsync)throw new a.UnavailabilityError("expo-device","isSideLoadingEnabledAsync");return await c.isSideLoadingEnabledAsync()}async function M(){return c.getPlatformFeaturesAsync?await c.getPlatformFeaturesAsync():[]}async function R(e){return!!c.hasPlatformFeatureAsync&&await c.hasPlatformFeatureAsync(e)}},68480:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ImageManipulator:()=>b,manipulateAsync:()=>E,useImageManipulator:()=>C});var r=n(98587),a=n(36665);var i=n(71980),o=n(20356),s=n(86254);(0,n(90620).ensureNativeModulesAreInstalled)();const l=globalThis.expo.SharedObject;var u=n(25633),c=n(91808);function d(e){const t=e.getContext("2d");if(!t)throw new c.CodedError("ERR_IMAGE_MANIPULATOR","Failed to create canvas context");return t}async function h(e){return(await new Promise(((t,n)=>{const r=new FileReader;r.onloadend=()=>t(r.result),r.onerror=()=>n(new Error(`Unable to convert blob to base64 string: ${r.error}`)),r.readAsDataURL(e)}))).replace(/^data:image\/\w+;base64,/,"")}function f(e){return new Promise(((t,n)=>{const r=new Image;r.crossOrigin="anonymous";const a=document.createElement("canvas");r.onload=()=>{a.width=r.naturalWidth,a.height=r.naturalHeight;d(a).drawImage(r,0,0,r.naturalWidth,r.naturalHeight),t(a)},r.onerror=()=>n(a),r.src=e}))}class p extends u.default{nativeRefType="image";constructor(e,t,n){super(),this.uri=e,this.width=t,this.height=n}async saveAsync(e={base64:!1}){return{uri:this.uri,width:this.width,height:this.height,base64:e.base64?await h(await fetch(this.uri).then((e=>e.blob()))):void 0}}}const m=(e,{width:t,height:n})=>{const r=e.width/e.height;let a=0,i=0;return void 0!==t&&(a=t,i=a/r),void 0!==n&&(i=n,0===a&&(a=i*r)),function(e,t,n,r=!1){const a=document.createElement("canvas");a.width=e.width,a.height=e.height;const i=e.width,o=e.height,s=i/(t=Math.round(t)),l=o/(n=Math.round(n)),u=Math.ceil(s/2),c=Math.ceil(l/2),h=d(e),f=h.getImageData(0,0,i,o),p=h.createImageData(t,n),m=f.data,g=p.data;for(let d=0;d=1)continue;r=2*s*s*s-3*s*s+1;const c=4*(e+t*i);y+=r*m[c+3],o+=r,m[c+3]<255&&(r=r*m[c+3]/250),h+=r*m[c],f+=r*m[c+1],p+=r*m[c+2],a+=r}}g[n]=h/a,g[n+1]=f/a,g[n+2]=p/a,g[n+3]=y/o}return r&&(a.width=t,a.height=n),d(a).putImageData(p,0,0),a}(e,a,i,!0)};const g=(e,t)=>{const{width:n,height:r}=function(e,t,n){const r=n*Math.PI/180;let a=Math.cos(r),i=Math.sin(r);return i<0&&(i=-i),a<0&&(a=-a),{width:t*i+e*a,height:t*a+e*i}}(e.width,e.height,t),a=document.createElement("canvas");a.width=n,a.height=r;const i=d(a);i.translate(a.width/2,a.height/2);const o=t*Math.PI/180;return i.rotate(o),i.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),a};class y extends l{constructor(e){super(),this.loader=e??(()=>document.createElement("canvas")),this.currentTask=new Promise((e=>e(this.loader())))}resize(e){return this.addTask((t=>m(t,e)))}rotate(e){return this.addTask((t=>g(t,e)))}flip(e){return this.addTask((t=>((e,t)=>{const n=t===i.FlipType.Horizontal,r=t===i.FlipType.Vertical,a=document.createElement("canvas");a.width=e.width,a.height=e.height;const o=d(a);o.translate(e.width/2,e.height/2);const s=n?-1:1,l=r?-1:1;return o.scale(s,l),o.drawImage(e,-e.width/2,-e.height/2,e.width,e.height),a})(t,e)))}crop(e){return this.addTask((t=>((e,t)=>{let{originX:n=0,originY:r=0,width:a=0,height:i=0}=t;const o=(e,t)=>Math.max(0,Math.min(t,e));if(a=o(a,e.width),i=o(i,e.height),n=o(n,e.width),r=o(r,e.height),a=Math.min(n+a,e.width)-n,i=Math.min(r+i,e.height)-r,0===a||0===i)throw new c.CodedError("ERR_IMAGE_MANIPULATOR_CROP","Crop size must be greater than 0: "+JSON.stringify(t,null,2));const s=document.createElement("canvas");return s.width=a,s.height=i,d(s).drawImage(e,n,r,a,i,0,0,a,i),s})(t,e)))}extent(e){return this.addTask((t=>((e,t)=>{const{backgroundColor:n=null,originX:r=0,originY:a=0,width:i=0,height:o=0}=t;if(0===i||0===o)throw new c.CodedError("ERR_IMAGE_MANIPULATOR_EXTENT","Extent size must be greater than 0: "+JSON.stringify(t,null,2));const s=document.createElement("canvas");s.width=i,s.height=o;const l=r<0?0:r,u=a<0?0:a,h=r<0?Math.min(e.width,i+r):Math.min(e.width-r,i),f=a<0?Math.min(e.height,o+a):Math.min(e.height-a,o),p=r<0?-r:0,m=a<0?-a:0,g=d(s);return null!=n&&(g.fillStyle=n,g.fillRect(0,0,i,o)),g.drawImage(e,l,u,h,f,p,m,h,f),s})(t,e)))}reset(){return this.currentTask=new Promise((e=>e(this.loader()))),this}async renderAsync(){const e=await this.currentTask;return new Promise((t=>{e.toBlob((n=>{const r=n?URL.createObjectURL(n):e.toDataURL();t(new p(r,e.width,e.height))}))}))}addTask(e){return this.currentTask=this.currentTask.then((t=>e(t))),this}}class _ extends o.default{Context=y;Image=p;manipulate(e){return new y((()=>{if("string"===typeof e)return f(e);if("object"===typeof e&&"uri"in e&&"string"===typeof e.uri)return f(e.uri);throw new Error(`Source not supported: ${e}`)}))}}const b=(0,s.registerWebModule)(_);function v(e,t,n){!function(e){if("string"!==typeof e)throw new TypeError('The "uri" argument must be a string')}(e),function(e){if(!Array.isArray(e))throw new TypeError('The "actions" argument must be an array');for(const t of e){if("object"!==typeof t||null===t)throw new TypeError("Action must be an object");const e=["crop","extent","flip","rotate","resize"],n=Object.keys(t);if(1!==n.length)throw new TypeError(`Single action must contain exactly one transformation: ${e.join(", ")}`);const r=n[0];if(!e.includes(r))throw new TypeError(`Unsupported action type: ${r}`);"crop"===r?w(t):"extent"===r?F(t):"flip"===r?k(t):"rotate"===r?x(t):"resize"===r&&A(t)}}(t),function({base64:e,compress:t,format:n}){if(void 0!==e&&"boolean"!==typeof e)throw new TypeError('The "base64" argument must be a boolean');if(void 0!==t){if("number"!==typeof t)throw new TypeError('The "compress" argument must be a number');if(t<0||t>1)throw new TypeError('The "compress" argument must be a number between 0 and 1')}const r=[i.SaveFormat.JPEG,i.SaveFormat.PNG,i.SaveFormat.WEBP];if(void 0!==n&&!r.includes(n))throw new TypeError(`The "format" argument must be one of: ${r.join(", ")}`)}(n)}function w(e){if(!("object"===typeof e.crop&&null!==e.crop&&"number"===typeof e.crop.originX&&"number"===typeof e.crop.originY&&"number"===typeof e.crop.width&&"number"===typeof e.crop.height))throw new TypeError("Crop action must be an object of shape { originX: number; originY: number; width: number; height: number }")}function F(e){if(!("object"===typeof e.extent&&null!==e.extent&&(null==e.extent.backgroundColor||"string"===typeof e.extent.backgroundColor)&&(null==e.extent.originX||"number"===typeof e.extent.originX)&&(null==e.extent.originY||"number"===typeof e.extent.originY)&&"number"===typeof e.extent.width&&"number"===typeof e.extent.height))throw new TypeError("Extent action must be an object of shape { backgroundColor?: string; originX?: number; originY?: number; width: number; height: number }")}function k(e){if("string"!==typeof e.flip||![i.FlipType.Horizontal,i.FlipType.Vertical].includes(e.flip))throw new TypeError(`Unsupported flip type: ${e.flip}`)}function x(e){if("number"!==typeof e.rotate)throw new TypeError("Rotation must be a number")}function A(e){if(!("object"===typeof e.resize&&null!==e.resize&&("number"===typeof e.resize.width||"undefined"===typeof e.resize.width)&&("number"===typeof e.resize.height||"undefined"===typeof e.resize.height)))throw new TypeError("Resize action must be an object of shape { width?: number; height?: number }")}const S=["format"];async function E(e,t=[],n={}){v(e,t,n);const{format:a=i.SaveFormat.JPEG}=n,o=(0,r.default)(n,S),s=b.manipulate(e);for(const r of t)"resize"in r?s.resize(r.resize):"rotate"in r?s.rotate(r.rotate):"flip"in r?s.flip(r.flip):"crop"in r?s.crop(r.crop):"extent"in r&&s.extent&&s.extent(r.extent);const l=await s.renderAsync(),u=await l.saveAsync(Object.assign({format:a},o));return s.release(),l.release(),u}function C(e){return function(e,t){const n=(0,a.useRef)(null),r=(0,a.useRef)(!1),i=(0,a.useRef)(t);null==n.current&&(n.current=e());const o=(0,a.useMemo)((()=>{let a=n.current;const o=i.current?.length===t.length&&t.every(((e,t)=>e===i.current[t]));return a&&o?r.current=!0:(n.current?.release(),a=e(),n.current=a,i.current=t),a}),t);return(0,a.useEffect)((()=>(r.current=!1,()=>{!r.current&&n.current&&n.current.release()})),[]),o}((()=>b.manipulate(e)),[e])}},71980:(e,t,n)=>{"use strict";n.r(t),n.d(t,{FlipType:()=>r,SaveFormat:()=>a});let r=function(e){return e.Vertical="vertical",e.Horizontal="horizontal",e}({}),a=function(e){return e.JPEG="jpeg",e.PNG="png",e.WEBP="webp",e}({})},48801:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CameraType:()=>l.CameraType,MediaTypeOptions:()=>l.MediaTypeOptions,PermissionStatus:()=>o.PermissionStatus,UIImagePickerControllerQualityType:()=>l.UIImagePickerControllerQualityType,UIImagePickerPreferredAssetRepresentationMode:()=>l.UIImagePickerPreferredAssetRepresentationMode,UIImagePickerPresentationStyle:()=>l.UIImagePickerPresentationStyle,VideoExportPreset:()=>l.VideoExportPreset,getCameraPermissionsAsync:()=>m,getMediaLibraryPermissionsAsync:()=>g,getPendingResultAsync:()=>w,launchCameraAsync:()=>F,launchImageLibraryAsync:()=>k,requestCameraPermissionsAsync:()=>y,requestMediaLibraryPermissionsAsync:()=>_,useCameraPermissions:()=>v,useMediaLibraryPermissions:()=>b});var r=n(91808),a=n(7836),i=n(28945),o=n(35992),s=n(40495),l=n(49050);function u(e){const t={Images:["images"],Videos:["videos"],All:["images","videos"]};return e===l.MediaTypeOptions.Images||e===l.MediaTypeOptions.Videos||e===l.MediaTypeOptions.All?(console.warn("[expo-image-picker] `ImagePicker.MediaTypeOptions` have been deprecated. Use `ImagePicker.MediaType` or an array of `ImagePicker.MediaType` instead."),t[e]):"string"===typeof e?[e]:e}function c(e){return e.mediaTypes?Object.assign({},e,{mediaTypes:u(e.mediaTypes??[])}):e}const d={images:"image/*",videos:"video/mp4,video/quicktime,video/x-m4v,video/*",livePhotos:""},h={launchImageLibraryAsync:async({mediaTypes:e=["images"],allowsMultipleSelection:t=!1,base64:n=!1})=>s.default.isDOMAvailable?await p({mediaTypes:e,allowsMultipleSelection:t,base64:n}):{canceled:!0,assets:null},launchCameraAsync:async({mediaTypes:e=l.MediaTypeOptions.Images,allowsMultipleSelection:t=!1,base64:n=!1})=>s.default.isDOMAvailable?await p({mediaTypes:e,allowsMultipleSelection:t,capture:!0,base64:n}):{canceled:!0,assets:null},getCameraPermissionsAsync:async()=>f(),requestCameraPermissionsAsync:async()=>f(),getMediaLibraryPermissionsAsync:async e=>f(),requestMediaLibraryPermissionsAsync:async e=>f()};function f(){return{status:o.PermissionStatus.GRANTED,expires:"never",granted:!0,canAskAgain:!0}}function p({mediaTypes:e,capture:t=!1,allowsMultipleSelection:n=!1,base64:r}){const a=function(e){const t=e.filter((e=>"livePhotos"!==e));if(0===t.length)return"image/*";let n="";for(const r of t)n.includes(d[r])||(n=n.concat(",",d[r]));return n}(u(e)),i=document.createElement("input");return i.style.display="none",i.setAttribute("type","file"),i.setAttribute("accept",a),i.setAttribute("id",String(Math.random())),i.setAttribute("data-testid","file-input"),n&&i.setAttribute("multiple","multiple"),t&&i.setAttribute("capture","camera"),document.body.appendChild(i),new Promise((e=>{i.addEventListener("change",(async()=>{if(i.files?.length){const t=n?i.files:[i.files[0]],a=await Promise.all(Array.from(t).map((e=>{return t=e,n={base64:r},new Promise(((e,r)=>{const a=new FileReader;a.onerror=()=>{r(new Error("Failed to read the selected media because the operation failed."))},a.onload=({target:r})=>{const a=r.result,i=()=>e({uri:a,width:0,height:0}),o=r=>{e(Object.assign({},r,n.base64&&{base64:a.substr(a.indexOf(",")+1)},{file:t}))};if("string"===typeof a)if(t.type.startsWith("image/")){const e=new Image;e.src=a,e.onload=()=>{o({uri:a,width:e.naturalWidth??e.width,height:e.naturalHeight??e.height,type:"image",mimeType:t.type,fileName:t.name,fileSize:t.size})},e.onerror=()=>i()}else if(t.type.startsWith("video/")){const e=document.createElement("video");e.preload="metadata",e.src=a,e.onloadedmetadata=()=>{o({uri:a,width:e.videoWidth,height:e.videoHeight,type:"video",mimeType:t.type,fileName:t.name,fileSize:t.size,duration:e.duration})},e.onerror=()=>i()}else i();else i()},a.readAsDataURL(t)}));var t,n})));e({canceled:!1,assets:a})}else e({canceled:!0,assets:null});document.body.removeChild(i)})),i.addEventListener("cancel",(()=>{i.dispatchEvent(new Event("change"))}));const t=new MouseEvent("click");i.dispatchEvent(t)}))}async function m(){return h.getCameraPermissionsAsync()}async function g(e=!1){return h.getMediaLibraryPermissionsAsync(e)}async function y(){return h.requestCameraPermissionsAsync()}async function _(e=!1){return(0,h.requestMediaLibraryPermissionsAsync)(e)}const b=(0,a.createPermissionHook)({getMethod:e=>g(e?.writeOnly),requestMethod:e=>_(e?.writeOnly)}),v=(0,a.createPermissionHook)({getMethod:m,requestMethod:y});async function w(){return h.getPendingResultAsync?h.getPendingResultAsync():[]}async function F(e={}){if(!h.launchCameraAsync)throw new i.UnavailabilityError("ImagePicker","launchCameraAsync");const t=c(e);return await h.launchCameraAsync(function(e){const{aspect:t,quality:n,videoMaxDuration:a}=e;if(null!=t){const[e,n]=t;if(e<=0||n<=0)throw new r.CodedError("ERR_INVALID_ARGUMENT",`Invalid aspect ratio values ${e}:${n}. Provide positive numbers.`)}if(n&&(n<0||n>1))throw new r.CodedError("ERR_INVALID_ARGUMENT",`Invalid 'quality' value ${n}. Provide a value between 0 and 1.`);if(a&&a<0)throw new r.CodedError("ERR_INVALID_ARGUMENT",`Invalid 'videoMaxDuration' value ${a}. Provide a non-negative number.`);return e}(t))}async function k(e={}){const t=c(e);if(!h.launchImageLibraryAsync)throw new i.UnavailabilityError("ImagePicker","launchImageLibraryAsync");return t?.allowsEditing&&t.allowsMultipleSelection&&console.warn("[expo-image-picker] `allowsEditing` is not supported when `allowsMultipleSelection` is enabled and will be ignored.Disable either 'allowsEditing' or 'allowsMultipleSelection' in 'launchImageLibraryAsync' to fix this warning."),await h.launchImageLibraryAsync(t)}},49050:(e,t,n)=>{"use strict";var r,a,i,o,s,l;n.r(t),n.d(t,{CameraType:()=>l,MediaTypeOptions:()=>r,UIImagePickerControllerQualityType:()=>i,UIImagePickerPreferredAssetRepresentationMode:()=>s,UIImagePickerPresentationStyle:()=>o,VideoExportPreset:()=>a}),function(e){e.All="All",e.Videos="Videos",e.Images="Images"}(r||(r={})),function(e){e[e.Passthrough=0]="Passthrough",e[e.LowQuality=1]="LowQuality",e[e.MediumQuality=2]="MediumQuality",e[e.HighestQuality=3]="HighestQuality",e[e.H264_640x480=4]="H264_640x480",e[e.H264_960x540=5]="H264_960x540",e[e.H264_1280x720=6]="H264_1280x720",e[e.H264_1920x1080=7]="H264_1920x1080",e[e.H264_3840x2160=8]="H264_3840x2160",e[e.HEVC_1920x1080=9]="HEVC_1920x1080",e[e.HEVC_3840x2160=10]="HEVC_3840x2160"}(a||(a={})),function(e){e[e.High=0]="High",e[e.Medium=1]="Medium",e[e.Low=2]="Low",e[e.VGA640x480=3]="VGA640x480",e[e.IFrame1280x720=4]="IFrame1280x720",e[e.IFrame960x540=5]="IFrame960x540"}(i||(i={})),function(e){e.FULL_SCREEN="fullScreen",e.PAGE_SHEET="pageSheet",e.FORM_SHEET="formSheet",e.CURRENT_CONTEXT="currentContext",e.OVER_FULL_SCREEN="overFullScreen",e.OVER_CURRENT_CONTEXT="overCurrentContext",e.POPOVER="popover",e.AUTOMATIC="automatic"}(o||(o={})),function(e){e.Automatic="automatic",e.Compatible="compatible",e.Current="current"}(s||(s={})),function(e){e.back="back",e.front="front"}(l||(l={}))},90102:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>Ae});var r=n(98587),a=n(36665);function i(){return a.createRef()}var o=n(75675),s=n(73929),l=n(60397);const u=["cross-dissolve","flip-from-left","flip-from-right","flip-from-top","flip-from-bottom"];function c(e,t){return a.useMemo((()=>{if(!e)return null;const[n,r]=e;return{animationKey:n,persistedElement:r,status:t||"mounted"}}),[e?.[0]])}function d(e){if(!e?.duration)return null;const t=(n=e.effect,u.includes(n)?n:"cross-dissolve");var n;if(!t)return{startingClass:"",animateInClass:"",animateOutClass:"",containerClass:"",timingFunction:"linear",animationClass:"",duration:0};const r=function(e,t){return e?.includes("flip")?t?.includes("ease")?"ease-in-out":"linear":t||null}(t,e.timing),a=`image-timing-${r}`;return{startingClass:`${t}-start`,animateInClass:[t,"transitioning",`${t}-active`,a].join(" "),animateOutClass:[t,`${t}-end`,a].join(" "),containerClass:`${t}-container`,timingFunction:r,animationClass:t,duration:e?.duration||0}}function h({children:e,initial:t,transition:n,recyclingKey:r}){const i=d(n),o=c(t,"active"),[s,u]=a.useState(o?[o]:[]),[h,f]=a.useState(r??"");h!==(r??"")&&(f(r??""),u(o?[o]:[]));const p=e=>{u((t=>t.filter((t=>!!e&&t.animationKey!==e||"in"===t.status||"active"===t.status))))},m=c(e);a.useEffect((()=>{u((e=>{if(!m)return e;return e.findIndex((e=>e.animationKey===m.animationKey))>=0?i?e.map((e=>e.animationKey===m.animationKey?Object.assign({},m,{status:"in"}):Object.assign({},e,{status:"out"}))):[Object.assign({},m,{status:"in"})]:[...e,m]}))}),[m]);const g={transitionDuration:`${i?.duration||0}ms`,transitionTimingFunction:i?.timingFunction||"linear"},y={in:i?.animateInClass,out:i?.animateOutClass,mounted:i?.startingClass};return(0,l.jsx)(l.Fragment,{children:[...s].filter((e=>"errored"!==e.status)).map((n=>{return(0,l.jsx)("div",{className:i?.containerClass,children:(r=n,e[0]===r.animationKey?e[1]({onReady:()=>{u(i?e=>e.map((e=>e===m?Object.assign({},e,{status:"in"}):Object.assign({},e,{status:"out"}))):[Object.assign({},r,{status:"in"})])},onAnimationFinished:()=>{u([Object.assign({},r,{status:"in"})])},onError:()=>{u((e=>e.map((e=>e===r?Object.assign({},e,{status:"errored"}):e))))}}):t?.[0]===r.animationKey?t[1]({onAnimationFinished:()=>{"out"===r.status&&p(r.animationKey)},onError:()=>{u((e=>e.map((e=>e===r?Object.assign({},e,{status:"errored"}):e))))}}):r.persistedElement({onAnimationFinished:()=>{p(r.animationKey)}}))(y[n.status],g)},n.animationKey);var r}))})}function f(e){return e?{filter:`url(#expo-image-tint-${e})`}:{}}function p({tintColor:e}){return e?(0,l.jsx)("svg",{style:m.svg,children:(0,l.jsx)("defs",{children:(0,l.jsxs)("filter",{id:`expo-image-tint-${e}`,children:[(0,l.jsx)("feFlood",{floodColor:e}),(0,l.jsx)("feComposite",{in2:"SourceAlpha",operator:"atop"})]})})}):null}const m=o.default.create({svg:{width:0,height:0}});var g=n(35190),y=n(98943);class _{constructor(e,t,n){this.serverUrl=e||"https://expo.dev",this.jsbundleUrl=null,this.asset=n}isLoadedFromServer(){return!0}isLoadedFromFileSystem(){return!1}defaultAsset(){return this.assetServerURL()}assetServerURL(){const e=new URL(function(e){const t=_.pickScale(e.scales,y.default.get()),n=1===t?"":"@"+t+"x",r=e.type?`.${e.type}`:"";return e.httpServerLocation.replace(/\.\.\//g,"_")+"/"+e.name+n+r}(this.asset),this.serverUrl);return e.searchParams.set("platform","web"),e.searchParams.set("hash",this.asset.hash),this.fromSource(e.toString().replace(e.origin,""))}fromSource(e){return{__packager_asset:!0,width:this.asset.width??void 0,height:this.asset.height??void 0,uri:e,scale:_.pickScale(this.asset.scales,y.default.get())}}static pickScale(e,t){for(let n=0;n=t)return e[n];return e[e.length-1]||1}}let b;function v(e){b=e}function w(e){if("object"===typeof e)return e;const t=(0,g.getAssetByID)(e);if(!t)return;const n=new _("https://expo.dev",null,t);return b?b(n):n.defaultAsset()}Object.defineProperty(w,"setCustomSourceTransformer",{get:()=>v});const{pickScale:F}=_;function k(e){const[t,n,r]=e.replace(/^blurhash:\//,"").split("/");return{uri:"blurhash:/"+t,width:parseInt(n,10)||16,height:parseInt(r,10)||16}}function x(e){return{uri:"thumbhash:/"+e.replace(/^thumbhash:\//,"")}}var A=n(25633);let S=!1,E=!1,C=!1;function T(e,t){if(e)return e;if(t)switch(S||(console.log('[expo-image]: Prop "resizeMode" is deprecated, use "contentFit" instead'),S=!0),t){case"contain":case"cover":return t;case"stretch":return"fill";case"center":return"scale-down";case"repeat":E||(console.log('[expo-image]: Resize mode "repeat" is no longer supported'),E=!0)}return"cover"}function D(e){if("string"===typeof e){const t={center:{top:"50%",left:"50%"},top:{top:0,left:"50%"},right:{top:"50%",right:0},bottom:{bottom:0,left:"50%"},left:{top:"50%",left:0},"top center":{top:0,left:"50%"},"top right":{top:0,right:0},"top left":{top:0,left:0},"right center":{top:"50%",right:0},"right top":{top:0,right:0},"right bottom":{bottom:0,right:0},"bottom center":{bottom:0,left:"50%"},"bottom right":{bottom:0,right:0},"bottom left":{bottom:0,left:0},"left center":{top:"50%",left:0},"left top":{top:0,left:0},"left bottom":{bottom:0,left:0}},n=t[e];return n||(console.warn(`[expo-image]: Content position "${e}" is invalid`),t.center)}return e??{top:"50%",left:"50%"}}function I(e,t){return"number"===typeof e?{duration:e}:e||"number"!==typeof t?e??null:(C||(console.warn('[expo-image]: Prop "fadeDuration" is deprecated, use "transition" instead'),C=!0),{duration:t})}function O(e){return e instanceof A.default&&"image"===e.nativeRefType}const P=["blurhash","thumbhash"];function M(e){return/^(blurhash:\/)+[\w#$%*+,\-.:;=?@[\]^_{}|~]+(\/[\d.]+)*$/.test(e)}function R(e){return e.startsWith("thumbhash:/")}function L(e){if("string"===typeof e)return M(e)?k(e):R(e)?x(e):{uri:e};if("number"===typeof e)return w(e);if("object"===typeof e&&(e?.blurhash||e?.thumbhash)){const{blurhash:t,thumbhash:n}=e,a=(0,r.default)(e,P),i=n?x(n):k(t);return Object.assign({},i,a)}return e??null}function N(e){return Array.isArray(e)?e.map(L).filter(Boolean):O(e)?e:[L(e)].filter(Boolean)}function B(e,t){return{onLoad:t=>{e?.onLoad?.forEach((e=>e?.(t))),window.requestAnimationFrame((()=>{e?.onDisplay?.forEach((e=>e?.()))}))},onTransitionEnd:()=>e?.onTransitionEnd?.forEach((e=>e?.())),onError:()=>{t?.uri&&M(t?.uri)||e?.onError?.forEach((e=>e?.({source:t||null})))}}}const j=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","#","$","%","*","+",",","-",".",":",";","=","?","@","[","]","^","_","{","|","}","~"],V=e=>{let t=0;for(let n=0;n{const t=e/255;return t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)},U=e=>{const t=Math.max(0,Math.min(1,e));return t<=.0031308?Math.trunc(12.92*t*255+.5):Math.trunc(255*(1.055*Math.pow(t,1/2.4)-.055)+.5)},W=(e,t)=>(e<0?-1:1)*Math.pow(Math.abs(e),t),q=e=>{if(!e||e.length<6)throw new z("The blurhash string must be at least 6 characters");const t=V(e[0]),n=Math.floor(t/9)+1,r=t%9+1;if(e.length!==4+2*r*n)throw new z(`blurhash length mismatch: length is ${e.length} but it should be ${4+2*r*n}`)},$=e=>{const t=e>>8&255,n=255&e;return[H(e>>16),H(t),H(n)]},Y=(e,t)=>{const n=Math.floor(e/361),r=Math.floor(e/19)%19,a=e%19;return[W((n-9)/9,2)*t,W((r-9)/9,2)*t,W((a-9)/9,2)*t]},G=(e,t,n,r)=>{q(e),r=1|(r||1);const a=V(e[0]),i=Math.floor(a/9)+1,o=a%9+1,s=(V(e[1])+1)/166,l=new Array(o*i);for(let d=0;d{let n=!1;if(!e||!e.uri||!i)return;const a=e.uri.replace(/blurhash:\//,""),o=G(a,e.width??X,e.height??K,t),s=document.createElement("canvas"),l=document.createElement("canvas");s.width=e.width??X,s.height=e.height??K,l.width=10*(e.width??X),l.height=10*(e.height??K);const u=s.getContext("2d");if(!u)return void console.warn("Failed to decode blurhash");const c=u.createImageData(s.width,s.height);c.data.set(o),u.putImageData(c,0,0);const d=l.getContext("2d");if(d)return d.scale(10,10),d.drawImage(s,0,0),l.toBlob((e=>{n||r((t=>(t&&URL.revokeObjectURL(t),e?URL.createObjectURL(e):t)))})),function(){n=!0,r((e=>(e&&URL.revokeObjectURL(e),null)))};console.warn("Failed to decode blurhash")}),[e?.uri,e?.height,e?.width,t,i]);return[(0,a.useMemo)((()=>n?{uri:n}:null),[n]),i]}function Z(e){const t=function(e){const{PI:t,min:n,max:r,cos:a,round:i}=Math,o=e[0]|e[1]<<8|e[2]<<16,s=e[3]|e[4]<<8,l=(63&o)/63,u=(o>>6&63)/31.5-1,c=(o>>12&63)/31.5-1,d=(o>>18&31)/31,h=o>>23,f=(s>>3&63)/63,p=(s>>9&63)/63,m=s>>15,g=r(3,m?h?5:7:7&s),y=r(3,m?7&s:h?5:7),_=h?(15&e[5])/15:1,b=(e[5]>>4)/15,v=h?6:5;let w=0;const F=(t,n,r)=>{const a=[];for(let i=0;i>1)]>>((1&w++)<<2)&15)/7.5-1)*r);return a},k=F(g,y,d),x=F(3,3,1.25*f),A=F(3,3,1.25*p),S=h&&F(5,5,b),E=function(e){const t=e[3],n=128&e[2],r=128&e[4];return(r?n?5:7:7&t)/(r?7&t:n?5:7)}(e),C=i(E>1?32:32*E),T=i(E>1?32/E:32),D=new Uint8Array(C*T*4),I=[],O=[];for(let P=0,M=0;P>8,255&e,0,0,t>>8,255&t,8,6,0,0,0,0,0,0,0,a>>>24,a>>16&255,a>>8&255,255&a,73,68,65,84,120,1],o=[0,498536548,997073096,651767980,1994146192,1802195444,1303535960,1342533948,-306674912,-267414716,-690576408,-882789492,-1687895376,-2032938284,-1609899400,-1111625188];let s=1,l=0;for(let u=0,c=0,d=r-1;u>8,255&~r,r>>8^255,0),l=(l+s)%65521;c>8,255&l,s>>8,255&s,0,0,0,0,0,0,0,0,73,69,78,68,174,66,96,130);for(let[u,c]of[[12,29],[37,41+a]]){let e=-1;for(let t=u;t>>4^o[15&e],e=e>>>4^o[15&e];e=~e,i[c++]=e>>>24,i[c++]=e>>16&255,i[c++]=e>>8&255,i[c++]=255&e}return"data:image/png;base64,"+btoa(String.fromCharCode(...i))}(t.w,t.h,t.rgba)}function Q(e){const t=R(e?.uri||""),n=e?.uri?.replace(/thumbhash:\//,"")??"";return[(0,a.useMemo)((()=>{return t?{uri:(e=n,Z(Uint8Array.from(atob(e),(e=>e.charCodeAt(0)))))}:null;var e}),[n,t]),t]}const ee={width:"100%",height:"100%",position:"absolute",left:0,top:0};function te(e){const t=Object.assign({},e);return t?(null==t.top&&null==t.bottom&&(t.top="50%"),null==t.left&&null==t.right&&(t.left="50%"),["top","bottom","left","right"].map((e=>e in t?`${e} ${function(e){const t=String(e).trim();return t.endsWith("%")?t:`${t}px`}(t[e])}`:"")).join(" ")||"50% 50%"):"50% 50%"}const ne=["source","events","contentPosition","hashPlaceholderContentPosition","priority","style","hashPlaceholderStyle","tintColor","className","accessibilityLabel","cachePolicy"];function re(e="normal"){return e&&["low","high"].includes(e)?e:"auto"}function ae(e){return e&&"srcset"in e?{srcSet:e.srcset,sizes:e.sizes}:{}}const ie=a.forwardRef(((e,t)=>{let{source:n,events:i,contentPosition:o,hashPlaceholderContentPosition:s,priority:u,style:c,hashPlaceholderStyle:d,tintColor:h,className:m,accessibilityLabel:g,cachePolicy:y}=e,_=(0,r.default)(e,ne);(0,a.useEffect)((()=>{i?.onMount?.forEach((e=>e?.()))}),[]);const{resolvedSource:b,isImageHash:v}=function(e){const[t,n]=Q(e),[r,i]=J(e);return(0,a.useMemo)((()=>n||i?r||t?{resolvedSource:r??t,isImageHash:!0}:{resolvedSource:null,isImageHash:!0}:{resolvedSource:e,isImageHash:!1}),[r,t,n,i,e])}(n),w=te(v?s:o),F=function(e,t,n){const[r,i]=(0,a.useState)(null);return(0,a.useEffect)((()=>{(async()=>{if(e?.headers&&e.uri)try{const n=await fetch(e.uri,{headers:e.headers,cache:"none"===t?"no-cache":"default",redirect:"follow"});if(!n.ok)throw new Error(`Failed to fetch image: ${n.status} ${n.statusText}`);const r=await n.blob();i((e=>(e&&URL.revokeObjectURL(e),URL.createObjectURL(r))))}catch{n?.forEach((t=>t?.({source:e})))}})()}),[e]),e?.headers?r?Object.assign({},e,{uri:r}):null:e}(b,y,i?.onError);return F?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(p,{tintColor:h}),(0,l.jsx)("img",Object.assign({ref:t,alt:g,className:m,src:F?.uri||void 0,style:Object.assign({objectPosition:w},ee,f(h),c,v?d:{}),fetchpriority:re(u||"normal")},B(i,F),ae(n),_),n?.uri)]}):null})),oe=ie;function se(e,t){return 1===e?.length?e[0]:[...e||[]]?.map((e=>{if(!t)return{source:e,penalty:0,covers:!1};const{width:n,height:r}="object"===typeof e?e:{width:null,height:null};return null==n||null==r?{source:e,penalty:0,covers:!1}:ne.penalty-t.penalty)).sort(((e,t)=>Number(t.covers)-Number(e.covers)))[0]?.source??null}function le(e){return`(max-width: ${e.webMaxViewportWidth??e.width}px) ${e.width}px`}function ue(e,t="static",n,r=null){const i=(Array.isArray(e)?e.length:0)>1,[o,s]=(0,a.useState)(n.current?.getBoundingClientRect()??null);return o&&n.current&&r?.(n.current,o),a.useEffect((()=>{if(!i&&!r||!n.current)return()=>{};if("live"===t){const e=new ResizeObserver((e=>{s(e[0].contentRect),r?.(e[0].target,e[0].contentRect)}));return e.observe(n.current),()=>{e.disconnect()}}return()=>{}}),[t,i,n.current,r]),O(e)?e:function(e,t,n){if(null==e||0===e.length)return null;if(1===e.length)return e[0];if("static"!==n)return se(e,t);const r=e.filter((e=>e.uri&&null!=e.width&&!M(e.uri)&&!R(e.uri))).sort(((e,t)=>(e.webMaxViewportWidth??e.width??0)-(t.webMaxViewportWidth??t.width??0)));if(0===r.length)return console.warn("You've set the `static` responsivePolicy but none of the sources have the `width` properties set. Make sure you set both `width` and `webMaxViewportWidth` for best results when using static responsiveness. Falling back to the `initial` policy."),se(e,t);const a=r?.map((e=>`${e.uri} ${e.width}w`)).join(", ");return{srcset:a,sizes:`${r?.map(le).join(", ")}, ${r[r.length-1]?.width}px`,uri:r[r.length-1]?.uri??"",type:"srcset"}}(e,o,t)}const ce=["source","placeholder","contentFit","contentPosition","placeholderContentFit","cachePolicy","onLoad","transition","onError","responsivePolicy","onLoadEnd","onDisplay","priority","blurRadius","recyclingKey","style","nativeViewRef","accessibilityLabel","tintColor","containerViewRef"];function de(e){return t=>{const n=t.target;e?.({source:{url:n.currentSrc,width:n.naturalWidth,height:n.naturalHeight,mediaType:null},cacheType:"none"})}}function he(e){return({source:t})=>{e?.({error:`Failed to load image from url: ${t?.uri}`})}}function fe(e,t){e?.style.setProperty("--expo-image-width",`${t.width}px`),e?.style.setProperty("--expo-image-height",`${t.height}px`)}function pe(e,t){const n=e&&"uri"in e&&e.uri||"";return t?[t,n].join("-"):n}function me(e){let{source:t,placeholder:n,contentFit:a,contentPosition:i,placeholderContentFit:o,cachePolicy:u,onLoad:c,transition:d,onError:f,responsivePolicy:p,onLoadEnd:m,onDisplay:g,priority:y,blurRadius:_,recyclingKey:b,style:v,nativeViewRef:w,accessibilityLabel:F,tintColor:k,containerViewRef:x}=e,A=(0,r.default)(e,ce);const S=o||"scale-down",E={objectFit:o||a},C=ue(t,p,x,function(e){return"flip-from-bottom"===e?.effect||"flip-from-top"===e?.effect||"flip-from-left"===e?.effect||"flip-from-right"===e?.effect}(d)?fe:null),T=pe(n?.[0],b),D=n?.[0]?.uri?[T,({onAnimationFinished:e})=>(t,r)=>(0,l.jsx)(oe,{ref:w,source:n?.[0],style:Object.assign({objectFit:S},_?{filter:`blur(${_}px)`}:{},r),className:t,events:{onTransitionEnd:[e]},contentPosition:{left:"50%",top:"50%"},hashPlaceholderContentPosition:i,hashPlaceholderStyle:E,accessibilityLabel:F,cachePolicy:u,priority:y,tintColor:k})]:null,I=[pe(C??n?.[0],b),({onAnimationFinished:e,onReady:t,onMount:r,onError:o})=>(s,d)=>(0,l.jsx)(oe,{ref:w,source:C||n?.[0],events:{onError:[he(f),m,o],onLoad:[de(c),m,t],onMount:[r],onTransitionEnd:[e],onDisplay:[g]},style:Object.assign({objectFit:C?a:S},_?{filter:`blur(${_}px)`}:{},d),className:s,cachePolicy:u,priority:y,contentPosition:C?i:{top:"50%",left:"50%"},hashPlaceholderContentPosition:i,hashPlaceholderStyle:E,accessibilityLabel:F,tintColor:k})];return(0,l.jsx)(s.default,Object.assign({ref:x,dataSet:{expoimage:!0},style:[{overflow:"hidden"},v]},A,{children:(0,l.jsx)(h,{transition:d,recyclingKey:b,initial:D,children:I})}))}!function(){{const e=document.createElement("style");e.innerHTML="\n[data-expoimage] .cross-dissolve {\n transition-property: opacity;\n animation-fill-mode: forwards;\n}\n[data-expoimage] .cross-dissolve-start:not(.transitioning) {\n opacity: 0;\n}\n[data-expoimage] .cross-dissolve-active {\n opacity: 1;\n}\n[data-expoimage] .cross-dissolve-end {\n opacity: 0;\n}\n[data-expoimage] .flip-from-left {\n transition-property: transform, opacity;\n transition-timing-function: var(--expo-image-timing,linear), steps(2, jump-none) !important;\n transform-origin: center;\n\n}\n[data-expoimage] .flip-from-left-container {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n perspective: 1000px;\n}\n[data-expoimage] .flip-from-left-start:not(.transitioning) {\n transform: translateZ(calc(var(--expo-image-width,1000px) * -1.25)) rotateY(-180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-left-active {\n transform: translateZ(0px) rotateY(0) ;\n opacity:1;\n}\n[data-expoimage] .flip-from-left-end {\n transform: translateZ(calc(var(--expo-image-width,1000px) * -1.25)) rotateY(180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-right {\n transition-property: transform, opacity;\n transition-timing-function: var(--expo-image-timing,linear), steps(2, jump-none) !important;\n transform-origin: center;\n}\n[data-expoimage] .flip-from-right-container {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n perspective: 1000px;\n}\n[data-expoimage] .flip-from-right-start:not(.transitioning) {\n transform: translateZ(calc(var(--expo-image-width,1000px) * -1.25)) rotateY(180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-right-active {\n transform: translateZ(0px) rotateY(0) ;\n opacity:1;\n}\n[data-expoimage] .flip-from-right-end {\n transform: translateZ(calc(var(--expo-image-width,1000px) * -1.25)) rotateY(-180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-top {\n transition-property: transform, opacity;\n transition-timing-function: var(--expo-image-timing,linear), steps(2, jump-none) !important;\n transform-origin: center;\n}\n[data-expoimage] .flip-from-top-container {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n perspective: 1000px;\n}\n[data-expoimage] .flip-from-top-start:not(.transitioning) {\n transform: translateZ(calc(var(--expo-image-height,1000px) * -1.5)) rotateX(180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-top-active {\n transform: translateZ(0px) rotateX(0) ;\n opacity:1;\n}\n[data-expoimage] .flip-from-top-end {\n transform: translateZ(calc(var(--expo-image-height,1000px) * -1.5)) rotateX(-180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-bottom {\n transition-property: transform, opacity;\n transition-timing-function: var(--expo-image-timing,linear), steps(2, jump-none) !important;\n transform-origin: center;\n}\n[data-expoimage] .flip-from-bottom-container {\n width: 100%;\n height: 100%;\n position: absolute;\n left: 0;\n top: 0;\n perspective: 1000px;\n}\n[data-expoimage] .flip-from-bottom-start:not(.transitioning) {\n transform: translateZ(calc(var(--expo-image-height,1000px) * -1.25)) rotateX(-180deg);\n opacity: 0;\n}\n[data-expoimage] .flip-from-bottom-active {\n transform: translateZ(0px) rotateX(0) ;\n opacity:1;\n}\n[data-expoimage] .flip-from-bottom-end {\n transform: translateZ(calc(var(--expo-image-height,1000px) * -1.25)) rotateX(180deg);\n opacity: 0;\n}\n[data-expoimage] .image-timing-linear {\n --expo-image-timing: linear;\n}\n[data-expoimage] .image-timing-ease-in {\n --expo-image-timing: ease-in;\n}\n[data-expoimage] .image-timing-ease-out {\n --expo-image-timing: ease-out;\n}\n[data-expoimage] .image-timing-ease-in-out {\n --expo-image-timing: ease-in-out;\n}\n",e.id="expo-image-styles",document.head.appendChild(e)}}();var ge=n(20356),ye=n(86254);class _e extends A.default{nativeRefType="image";uri=null;width=0;height=0;mediaType=null;scale=1;isAnimated=!1;static init(e,t,n,r){return Object.assign(new _e,{uri:e,width:t,height:n,mediaType:r,isAnimated:"image/gif"===r})}}class be extends ge.default{static name="ExpoImage";Image=_e;async prefetch(e,t,n){const r=Array.isArray(e)?e:[e];return new Promise((e=>{let t=0;r.forEach((n=>{const a=new Image;a.src=n,a.onload=()=>{t++,t===r.length&&e(!0)},a.onerror=()=>e(!1)}))}))}async clearMemoryCache(){return!1}async clearDiskCache(){return!1}async loadAsync(e){if(!e.uri)throw new Error('The image source must have the "uri" property defined');const t=await fetch(e.uri,{headers:e.headers});if(!t.ok)throw new Error(`Image request failed with the status code: ${t.status}`);const n=await t.blob(),r=URL.createObjectURL(n),a=await async function(e){return new Promise(((t,n)=>{const r=document.createElement("img");r.onload=()=>t(r),r.onerror=()=>n(new Error(`Unable to load the image from '${e}'`)),r.src=e}))}(r);return _e.init(r,a.width,a.height,t.headers.get("Content-Type"))}}const ve=(0,ye.registerWebModule)(be),we=["style","source","placeholder","contentFit","contentPosition","transition","fadeDuration","resizeMode","defaultSource","loadingIndicatorSource"],Fe=["resizeMode"];let ke=!1,xe=!1;class Ae extends a.PureComponent{constructor(e){super(e),this.nativeViewRef=i(),this.containerViewRef=i()}getAnimatableRef=()=>this.containerViewRef.current;static Image=ve.Image;static async prefetch(e,t){let n,r="memory-disk";switch(typeof t){case"string":r=t;break;case"object":r=t.cachePolicy??r,n=t.headers}return ve.prefetch(Array.isArray(e)?e:[e],r,n)}static async clearMemoryCache(){return await ve.clearMemoryCache()}static async clearDiskCache(){return await ve.clearDiskCache()}static async getCachePathAsync(e){return await ve.getCachePathAsync(e)}static async generateBlurhashAsync(e,t){return await ve.generateBlurhashAsync(e,t)}async startAnimating(){await this.nativeViewRef.current.startAnimating()}async stopAnimating(){await this.nativeViewRef.current.stopAnimating()}static async loadAsync(e,t){const n=L(e);return await ve.loadAsync(n,t)}render(){const e=this.props,{style:t,source:n,placeholder:a,contentFit:i,contentPosition:s,transition:u,fadeDuration:c,resizeMode:d,defaultSource:h,loadingIndicatorSource:f}=e,p=(0,r.default)(e,we),m=o.default.flatten(t)||{},{resizeMode:g}=m,y=(0,r.default)(m,Fe),_=d??g;return!h&&!f||ke||(console.warn("[expo-image]: `defaultSource` and `loadingIndicatorSource` props are deprecated, use `placeholder` instead"),ke=!0),p.children&&!xe&&(console.warn("The component does not support children. If you want to render content on top of the image, consider using the component or absolute positioning."),xe=!0),(0,l.jsx)(me,Object.assign({},p,{style:y,source:N(n),placeholder:N(a??h??f),contentFit:T(i,_),contentPosition:D(s),transition:I(u,c),nativeViewRef:this.nativeViewRef,containerViewRef:this.containerViewRef}))}}},60893:(e,t,n)=>{"use strict";n.r(t),n.d(t,{LinearGradient:()=>d});var r=n(98587),a=n(36665),i=n(73929),o=n(69e3);var s=n(60397);const l=["colors","locations","startPoint","endPoint"];function u(e){let{colors:t,locations:n,startPoint:u,endPoint:c}=e,d=(0,r.default)(e,l);const[{height:h,width:f},p]=a.useState({height:1,width:1}),m=a.useMemo((()=>function(e,t,n,r,a=1,i=1){const s=function(e,t){return e.map(((e,n)=>{const r=function(e,t=1){if(null==e)return;if("string"===typeof e&&(e=>"currentcolor"===e||"currentColor"===e||"inherit"===e||0===e.indexOf("var("))(e))return e;const n=(0,o.default)(e);if(null!=n)return`rgba(${n>>16&255},${n>>8&255},${255&n},${((n>>24&255)/255*t).toFixed(2)})`}(e);if(t&&t[n]){return`${r} ${100*Math.max(0,Math.min(1,t[n]))}%`}return r}))}(e,t),l=function(e,t,n,r){const a=()=>{let e=[0,0];Array.isArray(n)&&(e=[null!=n[0]?n[0]:0,null!=n[1]?n[1]:0]);let t=[0,1];return Array.isArray(r)&&(t=[null!=r[0]?r[0]:0,null!=r[1]?r[1]:1]),[e,t]},[i,o]=a();i[0]*=e,o[0]*=e,i[1]*=t,o[1]*=t;const s=o[1]-i[1],l=o[0]-i[0];return 90+180*Math.atan2(s,l)/Math.PI}(a,i,n,r);return`linear-gradient(${l}deg, ${s.join(", ")})`}(t,n,u,c,f,h)),[t,n,u,c,f,h]);return(0,s.jsx)(i.default,Object.assign({},d,{style:[d.style,{backgroundImage:m}],onLayout:e=>{const{width:t,height:n}=e.nativeEvent.layout;p((e=>t!==e.width||n!==e.height?{height:n,width:t}:e)),d.onLayout&&d.onLayout(e)}}))}const c=["colors","locations","start","end","dither"];class d extends a.Component{render(){const e=this.props,{colors:t,locations:n,start:a,end:i,dither:o}=e,l=(0,r.default)(e,c);let d=n;return n&&t.length!==n.length&&(console.warn("LinearGradient colors and locations props should be arrays of the same length"),d=n.slice(0,t.length)),(0,s.jsx)(u,Object.assign({},l,{colors:t,dither:void 0,locations:d,startPoint:h(a),endPoint:h(i)}))}}function h(e){if(e){if(!Array.isArray(e)||2===e.length)return Array.isArray(e)?e:[e.x,e.y];console.warn("start and end props for LinearGradient must be of the format [x,y] or {x, y}")}}},78848:(e,t,n)=>{"use strict";n.r(t),n.d(t,{addEventListener:()=>y,canOpenURL:()=>x,collectManifestSchemes:()=>p,createURL:()=>c,getInitialURL:()=>w,getLinkingURL:()=>F,hasConstantsManifest:()=>m,hasCustomScheme:()=>f,openSettings:()=>v,openURL:()=>k,parse:()=>d,parseInitialURLAsync:()=>_,resolveScheme:()=>g,sendIntent:()=>b,useLinkingURL:()=>S,useURL:()=>A});var r=n(28945),a=n(36665),i=n(60430),o=n.n(i);const s={addListener(e,t){o()("onURLReceived"===e,`Linking.addListener(): ${e} is not a valid event`);const n=e=>t({url:window.location.href,nativeEvent:e});return window.addEventListener("message",n,!1),{remove:()=>{window.removeEventListener("message",n)}}},getLinkingURL:()=>window.location.href},l=[],u={addEventListener(e,t){o()("url"===e,`Linking.addEventListener(): ${e} is not a valid event`);const n=e=>t({url:window.location.href,nativeEvent:e});return l.push({listener:t,nativeListener:n}),window.addEventListener("message",n,!1),{remove:()=>{this.removeEventListener(e,t)}}},removeEventListener(e,t){o()("url"===e,`Linking.addEventListener(): ${e} is not a valid event`);const n=l.findIndex((e=>e.listener===t));o()(-1!==n,"Linking.removeEventListener(): cannot remove an unregistered event listener.");const r=l[n].nativeListener;window.removeEventListener("message",r,!1),l.splice(n,1)},canOpenURL:async()=>!0,getInitialURL:async()=>window.location.href,async openURL(e){window.location=new URL(e,window.location).toString()}};function c(e,{queryParams:t={}}={}){const n=new URL(e,window.location.origin);return Object.entries(t).forEach((([e,t])=>{"string"===typeof t?n.searchParams.set(e,encodeURIComponent(t)):null!=t&&n.searchParams.set(e,t)})),n.toString().replace(/\/$/,"")}function d(e){let t;try{t=new URL(e)}catch{return{hostname:"localhost",path:e,queryParams:{},scheme:"http"}}const n={};return t.searchParams.forEach(((e,t)=>{n[t]=decodeURIComponent(e)})),{hostname:t.hostname||null,path:t.hostname||t.pathname?""===t.pathname?null:t.pathname.replace(/^\//,""):null,queryParams:n,scheme:t.protocol.replace(/:$/,"")}}function h(e){o()("string"===typeof e,"Invalid URL: should be a string. Was: "+e),o()(e,"Invalid URL: cannot be empty")}function f(){return!0}function p(){return[]}function m(){return!1}function g(){return"https"}function y(e,t){return u.addEventListener(e,t)}async function _(){const e=await u.getInitialURL();return e?d(e):{scheme:null,hostname:null,path:null,queryParams:null}}async function b(e,t){throw new r.UnavailabilityError("Linking","sendIntent")}async function v(){throw new r.UnavailabilityError("Linking","openSettings")}async function w(){return await u.getInitialURL()??null}function F(){return s.getLinkingURL()}async function k(e){return h(e),await u.openURL(e)}async function x(e){return h(e),await u.canOpenURL(e)}function A(){const[e,t]=(0,a.useState)(null);function n(e){t(e.url)}return(0,a.useEffect)((()=>{w().then((e=>t(e)));const e=y("url",n);return()=>e.remove()}),[]),e}function S(){const[e,t]=(0,a.useState)(s.getLinkingURL);function n(e){t(e.url)}return(0,a.useEffect)((()=>{const e=s.addListener("onURLReceived",n);return()=>e.remove()}),[]),e??null}},20356:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r}),(0,n(90620).ensureNativeModulesAreInstalled)();const r=globalThis.expo.NativeModule},7836:(e,t,n)=>{"use strict";n.r(t),n.d(t,{createPermissionHook:()=>o});var r=n(98587),a=n(36665);const i=["get","request"];function o(e){return t=>function(e,t){const n=(0,a.useRef)(!0),[o,s]=(0,a.useState)(null),l=t||{},{get:u=!0,request:c=!1}=l,d=(0,r.default)(l,i),h=(0,a.useCallback)((async()=>{const t=await e.getMethod(Object.keys(d).length>0?d:void 0);return n.current&&s(t),t}),[e.getMethod]),f=(0,a.useCallback)((async()=>{const t=await e.requestMethod(Object.keys(d).length>0?d:void 0);return n.current&&s(t),t}),[e.requestMethod]);return(0,a.useEffect)((function(){c&&f(),!c&&u&&h()}),[u,c,f,h]),(0,a.useEffect)((function(){return n.current=!0,()=>{n.current=!1}}),[]),[o,f,h]}(e,t)}},35992:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PermissionStatus:()=>r});let r=function(e){return e.GRANTED="granted",e.UNDETERMINED="undetermined",e.DENIED="denied",e}({})},40495:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(95991);const a=!!window.document?.createElement,i=a&&!(!window.addEventListener&&!window.attachEvent),o=a&&!!window.screen;const s={OS:"web",select:r.default.select,isDOMAvailable:a,canUseEventListeners:i,canUseViewport:o,isAsyncDebugging:!1}},25633:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r}),(0,n(90620).ensureNativeModulesAreInstalled)();const r=globalThis.expo.SharedRef},90620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ensureNativeModulesAreInstalled:()=>m});class r{addListener(e,t){this.listeners||(this.listeners=new Map),this.listeners?.has(e)||this.listeners?.set(e,new Set);const n=this.listenerCount(e);return this.listeners?.get(e)?.add(t),0===n&&1===this.listenerCount(e)&&this.startObserving(e),{remove:()=>{this.removeListener(e,t)}}}removeListener(e,t){const n=this.listeners?.get(e)?.delete(t);0===this.listenerCount(e)&&n&&this.stopObserving(e)}removeAllListeners(e){const t=this.listenerCount(e);this.listeners?.get(e)?.clear(),t>0&&this.stopObserving(e)}emit(e,...t){new Set(this.listeners?.get(e)).forEach((e=>{try{e(...t)}catch(n){console.error(n)}}))}listenerCount(e){return this.listeners?.get(e)?.size??0}startObserving(e){}stopObserving(e){}}class a extends r{}class i extends r{release(){}}class o extends i{nativeRefType="unknown"}function s(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r;default:return 0}}function l(e,t){return e<>>32-t}const u=function(e){const t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){const t=unescape(encodeURIComponent(e));e=new Array(t.length);for(let n=0;n>>0;d=c,c=u,u=l(a,30)>>>0,a=r,r=o}n[0]=n[0]+r>>>0,n[1]=n[1]+a>>>0,n[2]=n[2]+u>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+d>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]},c=[];for(let g=0;g<256;++g)c[g]=(g+256).toString(16).substr(1);const d=function(e,t){let n=t||0;const r=c;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")};let h=function(e){return e.dns="6ba7b810-9dad-11d1-80b4-00c04fd430c8",e.url="6ba7b811-9dad-11d1-80b4-00c04fd430c8",e.oid="6ba7b812-9dad-11d1-80b4-00c04fd430c8",e.x500="6ba7b814-9dad-11d1-80b4-00c04fd430c8",e}({});const f={v4:function(){return crypto.randomUUID()},v5:function(e,t,n){const r=function(e,r,a,i){const o=a&&i||0;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=new Array(e.length);for(let n=0;n(t.push(parseInt(e,16)),""))),t}(r)),!Array.isArray(e))throw TypeError("value must be an array of bytes");if(!Array.isArray(r)||16!==r.length)throw TypeError("namespace must be uuid string or an Array of 16 byte values");const s=n(r.concat(e));if(s[6]=15&s[6]|t,s[8]=63&s[8]|128,a)for(let t=0;t<16;++t)a[o+t]=s[t];return d(s)};try{r.name=e}catch{}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}("v5",80,u),namespace:h};function p(){globalThis.expo||(globalThis.expo={EventEmitter:r,NativeModule:a,SharedObject:i,SharedRef:o,modules:globalThis.ExpoDomWebView?.expoModulesProxy??{},uuidv4:f.v4,uuidv5:f.v5,getViewConfig:()=>{throw new Error("Method not implemented.")},reloadAppAsync:async()=>{window.location.reload()}})}function m(){if(!globalThis.expo)try{p()}catch(e){console.error(`Unable to install Expo modules: ${e}`)}}p()},91808:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CodedError:()=>r});class r extends Error{constructor(e,t){super(t),this.code=e}}},28945:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnavailabilityError:()=>a});var r=n(91808);class a extends r.CodedError{constructor(e,t){super("ERR_UNAVAILABLE",`The method or property ${e}.${t} is not available on web, are you sure you've linked all the native dependencies properly?`)}}},86254:(e,t,n)=>{"use strict";n.r(t),n.d(t,{registerWebModule:()=>a});var r=n(90620);function a(e){(0,r.ensureNativeModulesAreInstalled)();const t=e.name;if(!t)throw new Error("Module implementation must be a class");return globalThis?.expo?.modules||(globalThis.expo.modules={}),globalThis.expo.modules[t]||(globalThis.expo.modules[t]=new e),globalThis.expo.modules[t]}},64438:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Orientation:()=>l.Orientation,OrientationLock:()=>l.OrientationLock,SizeClassIOS:()=>l.SizeClassIOS,WebOrientation:()=>l.WebOrientation,WebOrientationLock:()=>l.WebOrientationLock,addOrientationChangeListener:()=>A,getOrientationAsync:()=>w,getOrientationLockAsync:()=>F,getPlatformOrientationLockAsync:()=>k,lockAsync:()=>_,lockPlatformAsync:()=>b,removeOrientationChangeListener:()=>E,removeOrientationChangeListeners:()=>S,supportsOrientationLockAsync:()=>x,unlockAsync:()=>v});var r=n(28945),a=n(26725),i=n(40495),o=n(20356),s=n(86254),l=n(90786);const u={[l.OrientationLock.DEFAULT]:l.WebOrientationLock.NATURAL,[l.OrientationLock.ALL]:l.WebOrientationLock.ANY,[l.OrientationLock.PORTRAIT]:l.WebOrientationLock.PORTRAIT,[l.OrientationLock.PORTRAIT_UP]:l.WebOrientationLock.PORTRAIT_PRIMARY,[l.OrientationLock.PORTRAIT_DOWN]:l.WebOrientationLock.PORTRAIT_SECONDARY,[l.OrientationLock.LANDSCAPE]:l.WebOrientationLock.LANDSCAPE,[l.OrientationLock.LANDSCAPE_LEFT]:l.WebOrientationLock.LANDSCAPE_PRIMARY,[l.OrientationLock.LANDSCAPE_RIGHT]:l.WebOrientationLock.LANDSCAPE_SECONDARY},c={[l.WebOrientation.PORTRAIT_PRIMARY]:l.Orientation.PORTRAIT_UP,[l.WebOrientation.PORTRAIT_SECONDARY]:l.Orientation.PORTRAIT_DOWN,[l.WebOrientation.LANDSCAPE_PRIMARY]:l.Orientation.LANDSCAPE_LEFT,[l.WebOrientation.LANDSCAPE_SECONDARY]:l.Orientation.LANDSCAPE_RIGHT},d=i.default.canUseViewport?window.screen:{};async function h(e){if(e===l.WebOrientationLock.UNKNOWN)throw new Error("expo-screen-orientation: WebOrientationLock.UNKNOWN is not a valid lock that can be applied to the device.");if(d.orientation&&d.orientation.lock)await d.orientation.lock(e);else{if(!(d.lockOrientation||d.mozLockOrientation||d.msLockOrientation))throw new Error("expo-screen-orientation: The browser doesn't support locking screen orientation.");{const t=function(e){switch(e){case l.WebOrientationLock.UNKNOWN:throw new Error("expo-screen-orientation: WebOrientationLock.UNKNOWN is not a valid lock to be converted.");case l.WebOrientationLock.ANY:return["portrait","landscape"];case l.WebOrientationLock.NATURAL:return"default";default:return e}}(e);if(!(d.lockOrientation||d.mozLockOrientation||d.msLockOrientation).call(d,t))throw new Error(`Applying orientation lock: ${JSON.stringify(e)} to device was denied`)}}}let f=l.WebOrientationLock.UNKNOWN;class p extends o.default{orientation=i.default.canUseViewport&&(d.orientation||d.msOrientation)||null;async emitOrientationEvent(){const[e,t]=await Promise.all([F(),w()]);this.emit("expoDidUpdateDimensions",{orientationLock:e,orientationInfo:{orientation:t}})}startObserving(){this.listener=()=>this.emitOrientationEvent(),i.default.canUseEventListeners&&(this.orientation&&this.orientation.addEventListener?this.orientation.addEventListener("change",this.listener):window.addEventListener("orientationchange",this.listener))}stopObserving(){i.default.canUseEventListeners&&(this.orientation&&this.orientation.removeEventListener?this.orientation.removeEventListener("change",this.listener):window.removeEventListener("orientationchange",this.listener))}async supportsOrientationLockAsync(e){return e in u}async getPlatformOrientationLockAsync(){return f}async getOrientationAsync(){const e=d.msOrientation||(d.orientation||d.mozOrientation||{}).type;return e?c[e]:l.Orientation.UNKNOWN}async lockAsync(e){const t=u[e];if(!t)throw new TypeError(`Invalid Orientation Lock: ${e}`);await h(t)}async lockPlatformAsync(e){await h(e),f=e}async unlockAsync(){if(d.orientation&&d.orientation.unlock)d.orientation.unlock();else{if(!(d.unlockOrientation||d.mozUnlockOrientation||d.msUnlockOrientation))throw new Error("expo-screen-orientation: The browser doesn't support unlocking screen orientation.");if(!(d.unlockOrientation||d.mozUnlockOrientation||d.msUnlockOrientation).call(d))throw new Error("Unlocking screen orientation on device was denied")}}}const m=(0,s.registerWebModule)(p);let g=[],y=l.OrientationLock.UNKNOWN;async function _(e){if(!m.lockAsync)throw new r.UnavailabilityError("ScreenOrientation","lockAsync");if(!Object.values(l.OrientationLock).includes(e))throw new TypeError(`Invalid Orientation Lock: ${e}`);e!==l.OrientationLock.OTHER&&(await m.lockAsync(e),y=e)}async function b(e){if(!m.lockPlatformAsync)throw new r.UnavailabilityError("ScreenOrientation","lockPlatformAsync");const{screenOrientationConstantAndroid:t,screenOrientationArrayIOS:n,screenOrientationLockWeb:a}=e;let i;if(a){if(!Object.values(l.WebOrientationLock).includes(a))throw new TypeError(`Invalid Web Orientation Lock: ${a}`);i=a}if(!i)throw new TypeError("lockPlatformAsync cannot be called with undefined option properties");await m.lockPlatformAsync(i),y=l.OrientationLock.OTHER}async function v(){if(!m.lockAsync)throw new r.UnavailabilityError("ScreenOrientation","lockAsync");await m.lockAsync(l.OrientationLock.DEFAULT)}async function w(){if(!m.getOrientationAsync)throw new r.UnavailabilityError("ScreenOrientation","getOrientationAsync");return await m.getOrientationAsync()}async function F(){return m.getOrientationLockAsync?await m.getOrientationLockAsync():y}async function k(){return{screenOrientationLockWeb:await m.getPlatformOrientationLockAsync()}}async function x(e){if(!m.supportsOrientationLockAsync)throw new r.UnavailabilityError("ScreenOrientation","supportsOrientationLockAsync");if(!Object.values(l.OrientationLock).includes(e))throw new TypeError(`Invalid Orientation Lock: ${e}`);return await m.supportsOrientationLockAsync(e)}function A(e){if("function"!==typeof e)throw new TypeError(`addOrientationChangeListener cannot be called with ${e}`);const t=function(e){return m.addListener("expoDidUpdateDimensions",(async t=>{e(t)}));return a.default.addEventListener("change",(async()=>{const[t,n]=await Promise.all([F(),w()]);e({orientationInfo:{orientation:n},orientationLock:t})}))}(e);return g.push(t),t}function S(){let e=g.length;for(;e--;){g[e].remove(),g.pop()}}function E(e){if(!e||!e.remove)throw new TypeError("Must pass in a valid subscription");e.remove(),g=g.filter((t=>t!==e))}},90786:(e,t,n)=>{"use strict";var r,a,i,o,s;n.r(t),n.d(t,{Orientation:()=>r,OrientationLock:()=>a,SizeClassIOS:()=>i,WebOrientation:()=>s,WebOrientationLock:()=>o}),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.PORTRAIT_UP=1]="PORTRAIT_UP",e[e.PORTRAIT_DOWN=2]="PORTRAIT_DOWN",e[e.LANDSCAPE_LEFT=3]="LANDSCAPE_LEFT",e[e.LANDSCAPE_RIGHT=4]="LANDSCAPE_RIGHT"}(r||(r={})),function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ALL=1]="ALL",e[e.PORTRAIT=2]="PORTRAIT",e[e.PORTRAIT_UP=3]="PORTRAIT_UP",e[e.PORTRAIT_DOWN=4]="PORTRAIT_DOWN",e[e.LANDSCAPE=5]="LANDSCAPE",e[e.LANDSCAPE_LEFT=6]="LANDSCAPE_LEFT",e[e.LANDSCAPE_RIGHT=7]="LANDSCAPE_RIGHT",e[e.OTHER=8]="OTHER",e[e.UNKNOWN=9]="UNKNOWN"}(a||(a={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.COMPACT=1]="COMPACT",e[e.REGULAR=2]="REGULAR"}(i||(i={})),function(e){e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary",e.PORTRAIT="portrait",e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary",e.LANDSCAPE="landscape",e.ANY="any",e.NATURAL="natural",e.UNKNOWN="unknown"}(o||(o={})),function(e){e.PORTRAIT_PRIMARY="portrait-primary",e.PORTRAIT_SECONDARY="portrait-secondary",e.LANDSCAPE_PRIMARY="landscape-primary",e.LANDSCAPE_SECONDARY="landscape-secondary"}(s||(s={}))},8787:(e,t,n)=>{"use strict";n.r(t),n.d(t,{WebBrowserPresentationStyle:()=>a,WebBrowserResultType:()=>r,coolDownAsync:()=>k,dismissAuthSession:()=>E,dismissBrowser:()=>A,getCustomTabsSupportingBrowsersAsync:()=>v,mayInitWithUrlAsync:()=>F,maybeCompleteAuthSession:()=>C,openAuthSessionAsync:()=>S,openBrowserAsync:()=>x,warmUpAsync:()=>w});var r,a,i=n(28945),o=n(55324),s=(n(79632),n(69e3)),l=n(91808);!function(e){e.CANCEL="cancel",e.DISMISS="dismiss",e.OPENED="opened",e.LOCKED="locked"}(r||(r={})),function(e){e.FULL_SCREEN="fullScreen",e.PAGE_SHEET="pageSheet",e.FORM_SHEET="formSheet",e.CURRENT_CONTEXT="currentContext",e.OVER_FULL_SCREEN="overFullScreen",e.OVER_CURRENT_CONTEXT="overCurrentContext",e.POPOVER="popover",e.AUTOMATIC="automatic"}(a||(a={}));let u=null;const c=new Map,d=e=>`ExpoWebBrowser_OriginUrl_${e}`,h=e=>`ExpoWebBrowser_RedirectUrl_${e}`;function f(e){return(e.origin.replace(e.protocol,"").replace(/^\/+/,"").replace(/\/+$/,"")+decodeURI(e.pathname.replace(/\/{2,}/g,"/"))).toLowerCase()}function p(){if(u&&(u.close(),c.has(u))){const{listener:e,appStateSubscription:t,interval:n}=c.get(u);clearInterval(n),window.removeEventListener("message",e),t.remove(),c.delete(u);const r=window.localStorage.getItem("ExpoWebBrowserRedirectHandle");r&&(window.localStorage.removeItem("ExpoWebBrowserRedirectHandle"),window.localStorage.removeItem(d(r)),window.localStorage.removeItem(h(r))),u=null}}const m={async openBrowserAsync(e,t={}){const{windowName:n="_blank",windowFeatures:a}=t,i=_(a);return window.open(e,n,i),{type:r.OPENED}},dismissAuthSession(){p()},maybeCompleteAuthSession({skipRedirectCheck:e}){const t=window.localStorage.getItem("ExpoWebBrowserRedirectHandle");if(!t)return{type:"failed",message:"No auth session is currently in progress"};const n=window.location.href;if(!0!==e){const e=window.localStorage.getItem(h(t)),n=f(window.location);if(e!==n)return{type:"failed",message:`Current URL "${n}" and original redirect URL "${e}" do not match.`}}window.localStorage.setItem(d(t),n);const r=window.opener??window.parent;if(!r)throw new l.CodedError("ERR_WEB_BROWSER_REDIRECT","The window cannot complete the redirect request because the invoking window doesn't have a reference to it's parent. This can happen if the parent window was reloaded.");return r.postMessage({url:n,expoSender:t},r.location.toString()),{type:"success",message:"Attempting to complete auth"}},async openAuthSessionAsync(e,t,n){if(t=t??function(e){const t=new URL(e);if(t.searchParams.has("redirect_uri")&&"string"===typeof t.searchParams.get("redirect_uri"))return t.searchParams.get("redirect_uri");return location.origin+location.pathname}(e),null==u||u?.closed){const t=_(n?.windowFeatures);if(u=window.open(e,n?.windowName,t),!u)throw new l.CodedError("ERR_WEB_BROWSER_BLOCKED","Popup window was blocked by the browser or failed to open. This can happen in mobile browsers when the window.open() method was invoked too long after a user input was fired.");try{u.focus()}catch{}}const a=await async function(e){const t=new URL(e);if(t.searchParams.has("state")&&"string"===typeof t.searchParams.get("state"))return t.searchParams.get("state");return await async function(){if(!g()||!window.crypto.subtle)throw new l.CodedError("ERR_WEB_BROWSER_CRYPTO","The current environment doesn't support crypto. Ensure you are running from a secure origin (localhost/https).");const e=new TextEncoder,t=function(e){let t=new Uint8Array(e);t.byteLength!==t.length&&(t=new Uint8Array(t.buffer));const n=new Uint8Array(t.length);if(g())window.crypto.getRandomValues(n);else for(let r=0;r{if(!t)return t;try{return f(new URL(t))}catch{return t}})();return window.localStorage.setItem(h(a),i),new Promise((async e=>{const t=t=>{if(!t.isTrusted)return;if(t.origin!==window.location.origin)return;const{data:n}=t,r=window.localStorage.getItem("ExpoWebBrowserRedirectHandle");n.expoSender===r&&(p(),e({type:"success",url:n.url}))};window.addEventListener("message",t,!1);const n=o.default.addEventListener("change",(t=>{if("active"!==t)return;const n=window.localStorage.getItem("ExpoWebBrowserRedirectHandle");if(n){const t=window.localStorage.getItem(d(n));t&&(p(),e({type:"success",url:t}))}})),a=setInterval((()=>{u?.closed&&(e&&e({type:r.DISMISS}),clearInterval(a),p())}),1e3);c.set(u,{listener:t,interval:a,appStateSubscription:n})}))}};function g(){return!!window?.crypto}const y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";function _(e){const t=function(e){let t={};if("string"===typeof e){const n=e.split(",");for(const e of n){const[n,r]=e.trim().split("=");n&&r&&(t[n]=r)}}else e&&(t=e);return t}(e),n=t.width??500,r=t.height??650,a=t.top??Math.max(0,.5*(window.screen.height-r)),i=t.left??Math.max(0,.5*(window.screen.width-n));return o=Object.assign({},t,{toolbar:t.toolbar??"no",menubar:t.menubar??"no",location:t.location??"yes",resizable:t.resizable??"yes",status:t.status??"no",scrollbars:t.scrollbars??"yes",top:a,left:i,width:n,height:r}),Object.keys(o).reduce(((e,t)=>{let n=o[t];return"boolean"===typeof n&&(n=n?"yes":"no"),t&&n?(e&&(e+=","),`${e}${t}=${n}`):e}),"");var o}const b={defaultBrowserPackage:void 0,preferredBrowserPackage:void 0,browserPackages:[],servicePackages:[]};async function v(){if(!m.getCustomTabsSupportingBrowsersAsync)throw new i.UnavailabilityError("WebBrowser","getCustomTabsSupportingBrowsersAsync");return b}async function w(e){if(!m.warmUpAsync)throw new i.UnavailabilityError("WebBrowser","warmUpAsync");return{}}async function F(e,t){if(!m.mayInitWithUrlAsync)throw new i.UnavailabilityError("WebBrowser","mayInitWithUrlAsync");return{}}async function k(e){if(!m.coolDownAsync)throw new i.UnavailabilityError("WebBrowser","coolDownAsync");return{}}async function x(e,t={}){if(!m.openBrowserAsync)throw new i.UnavailabilityError("WebBrowser","openBrowserAsync");let n;try{n=await m.openBrowserAsync(e,T(t))}catch{return{type:r.LOCKED}}return n}function A(){return m.dismissBrowser?.()}async function S(e,t,n={}){if(!m.openAuthSessionAsync)throw new i.UnavailabilityError("WebBrowser","openAuthSessionAsync");return["ios","web"].includes("web")?m.openAuthSessionAsync(e,t,T(n)):m.openAuthSessionAsync(e,t)}function E(){if(!m.dismissAuthSession)throw new i.UnavailabilityError("WebBrowser","dismissAuthSession");m.dismissAuthSession()}function C(e={}){return m.maybeCompleteAuthSession?m.maybeCompleteAuthSession(e):{type:"failed",message:"Not supported on this platform"}}function T(e){return Object.assign({},e,{controlsColor:(0,s.default)(e.controlsColor),toolbarColor:(0,s.default)(e.toolbarColor),secondaryToolbarColor:(0,s.default)(e.secondaryToolbarColor)})}o.default.currentState},24745:()=>{0},47401:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});n(24745);var r=n(76760);function a(e){let t=e;r.default.registerComponent("main",(()=>t));{const e=document.getElementById("root");0,r.default.runApplication("main",{rootTag:e,hydrate:globalThis.__EXPO_ROUTER_HYDRATE__})}}},71163:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Image:()=>et,Text:()=>Qe,View:()=>Ze,createAnimatableComponent:()=>Je,createAnimation:()=>k,initializeRegistryWithDefinitions:()=>S,registerAnimation:()=>A});var r={};n.r(r),n.d(r,{bounce:()=>N,bounceIn:()=>Y,bounceInDown:()=>X,bounceInLeft:()=>J,bounceInRight:()=>K,bounceInUp:()=>G,bounceOut:()=>Z,bounceOutDown:()=>ee,bounceOutLeft:()=>ne,bounceOutRight:()=>te,bounceOutUp:()=>Q,fadeIn:()=>ae,fadeInDown:()=>ie,fadeInDownBig:()=>ue,fadeInLeft:()=>se,fadeInLeftBig:()=>de,fadeInRight:()=>le,fadeInRightBig:()=>he,fadeInUp:()=>oe,fadeInUpBig:()=>ce,fadeOut:()=>pe,fadeOutDown:()=>me,fadeOutDownBig:()=>be,fadeOutLeft:()=>ye,fadeOutLeftBig:()=>we,fadeOutRight:()=>_e,fadeOutRightBig:()=>Fe,fadeOutUp:()=>ge,fadeOutUpBig:()=>ve,flash:()=>B,flipInX:()=>ke,flipInY:()=>xe,flipOutX:()=>Ae,flipOutY:()=>Se,jello:()=>j,lightSpeedIn:()=>Ee,lightSpeedOut:()=>Ce,pulse:()=>V,rotate:()=>z,rubberBand:()=>W,shake:()=>H,slideInDown:()=>De,slideInLeft:()=>Oe,slideInRight:()=>Pe,slideInUp:()=>Ie,slideOutDown:()=>Re,slideOutLeft:()=>Ne,slideOutRight:()=>Be,slideOutUp:()=>Le,swing:()=>U,tada:()=>q,wobble:()=>$,zoomIn:()=>Ve,zoomInDown:()=>ze,zoomInLeft:()=>Ue,zoomInRight:()=>We,zoomInUp:()=>He,zoomOut:()=>$e,zoomOutDown:()=>Ye,zoomOutLeft:()=>Xe,zoomOutRight:()=>Ke,zoomOutUp:()=>Ge});var a=n(73929),i=n(6283),o=n(60193),s=n(36665),l=n(94075),u=n.n(l),c=n(15009),d=n(95620);const h=["perspective","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","translateX","translateY"];function f(e){const t={};return Object.keys(e).forEach((n=>{-1!==h.indexOf(n)?(t.transform||(t.transform=[]),t.transform.push({[n]:e[n]})):t[n]=e[n]})),t}var p=n(75675);function m(e){const t=Object.assign({},p.default.flatten(e));return t.transform&&(t.transform.forEach((e=>{const n=Object.keys(e)[0];t[n]=e[n]})),delete t.transform),t}const g={Top:["Vertical",""],Bottom:["Vertical",""],Vertical:[""],Left:["Horizontal",""],Right:["Horizontal",""],Horizontal:[""]},y=Object.keys(g);function _(e,t){const n={},r=m(t);return("string"===typeof e?[e]:e).forEach((e=>{n[e]=e in r?r[e]:function(e,t){if("backgroundColor"===e)return"rgba(0,0,0,0)";if("color"===e||-1!==e.indexOf("Color"))return"rgba(0,0,0,1)";if(0===e.indexOf("rotate")||0===e.indexOf("skew"))return"0deg";if("opacity"===e||0===e.indexOf("scale"))return 1;if("fontSize"===e)return 14;if(0===e.indexOf("margin")||0===e.indexOf("padding"))for(let n,r=0;r1?null:t}const F={};function k(e){const t=JSON.stringify(e);if(F[t])return F[t];const n=Object.keys(e).map(w).filter(v);if(n.sort(b),n.length<2)throw new Error("Animation definitions must have at least two values.");const r={};e.easing&&(r.easing=e.easing),e.style&&(r.style=e.style);for(let a=0;a{e in r||(r[e]={inputRange:[],outputRange:[]}),r[e].inputRange.push(t),r[e].outputRange.push(i[e])}))}return F[t]=r,r}const x={};function A(e,t){x[e]=t}function S(e){Object.keys(e).forEach((t=>{A(t,k(e[t]))}))}const E={linear:d.default.linear,ease:d.default.bezier(.25,.1,.25,1),"ease-in":d.default.bezier(.42,0,1,1),"ease-out":d.default.bezier(0,0,.58,1),"ease-in-out":d.default.bezier(.42,0,.58,1),"ease-in-cubic":d.default.bezier(.55,.055,.675,.19),"ease-out-cubic":d.default.bezier(.215,.61,.355,1),"ease-in-out-cubic":d.default.bezier(.645,.045,.355,1),"ease-in-circ":d.default.bezier(.6,.04,.98,.335),"ease-out-circ":d.default.bezier(.075,.82,.165,1),"ease-in-out-circ":d.default.bezier(.785,.135,.15,.86),"ease-in-expo":d.default.bezier(.95,.05,.795,.035),"ease-out-expo":d.default.bezier(.19,1,.22,1),"ease-in-out-expo":d.default.bezier(1,0,0,1),"ease-in-quad":d.default.bezier(.55,.085,.68,.53),"ease-out-quad":d.default.bezier(.25,.46,.45,.94),"ease-in-out-quad":d.default.bezier(.455,.03,.515,.955),"ease-in-quart":d.default.bezier(.895,.03,.685,.22),"ease-out-quart":d.default.bezier(.165,.84,.44,1),"ease-in-out-quart":d.default.bezier(.77,0,.175,1),"ease-in-quint":d.default.bezier(.755,.05,.855,.06),"ease-out-quint":d.default.bezier(.23,1,.32,1),"ease-in-out-quint":d.default.bezier(.86,0,.07,1),"ease-in-sine":d.default.bezier(.47,0,.745,.715),"ease-out-sine":d.default.bezier(.39,.575,.565,1),"ease-in-out-sine":d.default.bezier(.445,.05,.55,.95),"ease-in-back":d.default.bezier(.6,-.28,.735,.045),"ease-out-back":d.default.bezier(.175,.885,.32,1.275),"ease-in-out-back":d.default.bezier(.68,-.55,.265,1.55)};var C=n(60397);const T=["rotate","rotateX","rotateY","rotateZ","skewX","skewY","transformMatrix","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","shadowColor","color","textDecorationColor","tintColor"],D=["width","height"];function I(e,t){switch(t){case"reverse":return 0;case"alternate":return e%2?0:1;case"alternate-reverse":return e%2?1:0;default:return 1}}function O(e,t){return I(e,t)?0:1}function P(e){if("string"===typeof e){const t=x[e];if(!t)throw new Error(`No animation registred by the name of ${e}`);return t}return k(e)}function M(e,t){const n={};return Object.keys(e).forEach((r=>{"style"===r?Object.assign(n,e.style):"easing"!==r&&(n[r]=t.interpolate(e[r]))})),f(n)}function R(e,t,n,r,a,i=!1,o,s,l){const u=r||a||o?c.default.timing(t,{toValue:n,delay:o,duration:r||1e3,easing:"function"===typeof a?a:E[a||"ease"],useNativeDriver:i}):c.default.spring(t,{toValue:n,useNativeDriver:i});setTimeout((()=>s(e)),o),u.start((()=>l(e)))}function L(e){const t=e.displayName||e.name||"Component",n=c.default.createAnimatedComponent(e);return class extends s.Component{static displayName=`withAnimatable(${t})`;static propTypes={animation:u().oneOfType([u().string,u().object]),duration:u().number,direction:u().oneOf(["normal","reverse","alternate","alternate-reverse"]),delay:u().number,easing:u().oneOfType([u().oneOf(Object.keys(E)),u().func]),iterationCount(e,t){const n=e[t];return"infinite"===n||"number"===typeof n&&n>=1?null:new Error('iterationCount must be a positive number or "infinite"')},iterationDelay:u().number,onAnimationBegin:u().func,onAnimationEnd:u().func,onTransitionBegin:u().func,onTransitionEnd:u().func,style:u().oneOfType([u().number,u().array,u().object]),transition:u().oneOfType([u().string,u().arrayOf(u().string)]),useNativeDriver:u().bool,isInteraction:u().bool};static defaultProps={animation:void 0,delay:0,direction:"normal",duration:void 0,easing:void 0,iterationCount:1,iterationDelay:0,onAnimationBegin(){},onAnimationEnd(){},onTransitionBegin(){},onTransitionEnd(){},style:void 0,transition:void 0,useNativeDriver:!1,isInteraction:void 0};constructor(e){super(e);const t=new c.default.Value(O(0,this.props.direction));let n={},r={};e.animation&&(r=P(e.animation),n=M(r,t)),this.state={animationValue:t,animationStyle:n,compiledAnimation:r,transitionStyle:{},transitionValues:{},currentTransitionValues:{}},e.transition&&(this.state=Object.assign({},this.state,this.initializeTransitionState(e.transition))),this.delayTimer=null,Object.keys(x).forEach((e=>{e in this||(this[e]=this.animate.bind(this,e))}))}initializeTransitionState(e){const t={},n={},r=_(e,this.props.style);return Object.keys(r).forEach((e=>{const a=r[e];if(-1!==T.indexOf(e)||"number"!==typeof a)t[e]=new c.default.Value(0),n[e]=a;else{const r=new c.default.Value(a);t[e]=r,n[e]=r}})),{currentTransitionValues:r,transitionStyle:n,transitionValues:t}}getTransitionState(e){const t="string"===typeof e?[e]:e;let{transitionValues:n,currentTransitionValues:r,transitionStyle:a}=this.state;const i=t.filter((e=>!this.state.transitionValues[e]));if(i.length){const e=this.initializeTransitionState(i);n=Object.assign({},n,e.transitionValues),r=Object.assign({},r,e.currentTransitionValues),a=Object.assign({},a,e.transitionStyle)}return{transitionValues:n,currentTransitionValues:r,transitionStyle:a}}ref=null;handleRef=e=>{this.ref=e};setNativeProps(e){this.ref&&this.ref.setNativeProps(e)}componentDidMount(){const{animation:e,duration:t,delay:n,onAnimationBegin:r,iterationDelay:a}=this.props;if(e){const e=()=>{r(),this.startAnimation(t,0,a,(e=>this.props.onAnimationEnd(e))),this.delayTimer=null};n?this.delayTimer=setTimeout(e,n):e()}}UNSAFE_componentWillReceiveProps(e){const{animation:t,delay:n,duration:r,easing:a,iterationDelay:i,transition:o,onAnimationBegin:s}=e;if(o){const t=_(o,e.style);this.transitionTo(t,r,a,n)}else l=t,u=this.props.animation,l!==u&&JSON.stringify(l)!==JSON.stringify(u)&&(t?this.delayTimer?this.setAnimation(t):(s(),this.animate(t,r,i).then((e=>this.props.onAnimationEnd(e)))):this.stopAnimation());var l,u}componentWillUnmount(){this.delayTimer&&clearTimeout(this.delayTimer)}setAnimation(e,t){const n=P(e);this.setState((e=>({animationStyle:M(n,e.animationValue),compiledAnimation:n})),t)}animate(e,t,n){return new Promise((r=>{this.setAnimation(e,(()=>{this.startAnimation(t,0,n,r)}))}))}stopAnimation(){this.setState({scheduledAnimation:!1,animationStyle:{}}),this.state.animationValue.stopAnimation(),this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}startAnimation(e,t,n,r){const{animationValue:a,compiledAnimation:i}=this.state,{direction:o,iterationCount:s,useNativeDriver:l,isInteraction:u}=this.props;let h=this.props.easing||i.easing||"ease",f=t||0;const p=O(f,o),m=I(f,o);a.setValue(p),"string"===typeof h&&(h=E[h]);("reverse"===o||"alternate"===o&&!m||"alternate-reverse"===o&&!m)&&(h=d.default.out(h));const g={toValue:m,easing:h,isInteraction:"undefined"!==typeof u?u:s<=1,duration:e||this.props.duration||1e3,useNativeDriver:l,delay:n&&f>0?n:0};c.default.timing(a,g).start((t=>{f+=1,t.finished&&this.props.animation&&("infinite"===s||f{const t=a[e],n=i[e];let r=s[e];r||(r=new c.default.Value(0));const o=-1!==T.indexOf(e)||"number"!==typeof value,d=-1!==D.indexOf(e);o?(r.setValue(0),u[e]=r.interpolate({inputRange:[0,1],outputRange:[t,n]}),l[e]=n,i[e]=1):(d?(u[e]=r.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolateLeft:"clamp"}),l[e]=n):u[e]=r,r.setValue(t))})),this.setState({transitionValues:s,transitionStyle:u,currentTransitionValues:l},(()=>{this.transitionToValues(i,n||this.props.duration,r,this.props.delay)}))}transitionTo(e,t,n,r){const{currentTransitionValues:a}=this.state,i=m(e),o={from:{},to:{}};Object.keys(i).forEach((e=>{const s=i[e],l=-1!==T.indexOf(e)||"number"!==typeof value,u=-1!==D.indexOf(e),c=this.state.transitionStyle[e],d=this.state.transitionValues[e];if(l||u||!c||c!==d){let t=a[e];if("undefined"===typeof t&&this.props.style){t=_(e,this.props.style)[e]}o.from[e]=t,o.to[e]=s}else R(e,d,s,t,n,this.props.useNativeDriver,r,(e=>this.props.onTransitionBegin(e)),(e=>this.props.onTransitionEnd(e)))})),Object.keys(o.from).length&&this.transition(o.from,o.to,t,n)}transitionToValues(e,t,n,r){Object.keys(e).forEach((a=>{R(a,this.state.transitionValues[a],e[a],t,n,this.props.useNativeDriver,r,(e=>this.props.onTransitionBegin(e)),(e=>this.props.onTransitionEnd(e)))}))}render(){const{style:e,animation:t,transition:r}=this.props;if(t&&r)throw new Error("You cannot combine animation and transition props");const a=function(e,t){const n={};return Object.keys(t).forEach((r=>{-1===e.indexOf(r)&&(n[r]=t[r])})),n}(["animation","duration","direction","delay","easing","iterationCount","iterationDelay","onAnimationBegin","onAnimationEnd","onTransitionBegin","onTransitionEnd","style","transition","useNativeDriver","isInteraction"],this.props);return(0,C.jsx)(n,Object.assign({ref:this.handleRef,style:[e,this.state.animationStyle,f(this.state.transitionStyle)]},a))}}}const N={0:{translateY:0},.2:{translateY:0},.4:{translateY:-30},.43:{translateY:-30},.53:{translateY:0},.7:{translateY:-15},.8:{translateY:0},.9:{translateY:-4},1:{translateY:0}},B={0:{opacity:1},.25:{opacity:0},.5:{opacity:1},.75:{opacity:0},1:{opacity:1}},j={0:{skewX:"0deg",skewY:"0deg"},.111:{skewX:"0deg",skewY:"0deg"},.222:{skewX:"-12.5deg",skewY:"-12.5deg"},.333:{skewX:"6.25deg",skewY:"6.25deg"},.444:{skewX:"-3.125deg",skewY:"-3.125deg"},.555:{skewX:"1.5625deg",skewY:"1.5625deg"},.666:{skewX:"-0.78125deg",skewY:"-0.78125deg"},.777:{skewX:"0.390625deg",skewY:"0.390625deg"},.888:{skewX:"-0.1953125deg",skewY:"-0.1953125deg"},1:{skewX:"0deg",skewY:"0deg"}},V={0:{scale:1},.5:{scale:1.05},1:{scale:1}},z={0:{rotate:"0deg"},.25:{rotate:"90deg"},.5:{rotate:"180deg"},.75:{rotate:"270deg"},1:{rotate:"360deg"}},H={0:{translateX:0},.1:{translateX:-10},.2:{translateX:10},.3:{translateX:-10},.4:{translateX:10},.5:{translateX:-10},.6:{translateX:10},.7:{translateX:-10},.8:{translateX:10},.9:{translateX:-10},1:{translateX:0}},U={0:{rotate:"0deg"},.2:{rotate:"15deg"},.4:{rotate:"-10deg"},.6:{rotate:"5deg"},.8:{rotate:"-5deg"},1:{rotate:"0deg"}},W={0:{scaleX:1,scaleY:1},.3:{scaleX:1.25,scaleY:.75},.4:{scaleX:.75,scaleY:1.25},.5:{scaleX:1.15,scaleY:.85},.65:{scaleX:.95,scaleY:1.05},.75:{scaleX:1.05,scaleY:.95},1:{scaleX:1,scaleY:1}},q={0:{scale:1,rotate:"0deg"},.1:{scale:.9,rotate:"-3deg"},.2:{scale:.9,rotate:"-3deg"},.3:{scale:1.1,rotate:"-3deg"},.4:{rotate:"3deg"},.5:{rotate:"-3deg"},.6:{rotate:"3deg"},.7:{rotate:"-3deg"},.8:{rotate:"3deg"},.9:{scale:1.1,rotate:"3deg"},1:{scale:1,rotate:"0deg"}},$={0:{translateX:0,rotate:"0deg"},.15:{translateX:-25,rotate:"-5deg"},.3:{translateX:20,rotate:"3deg"},.45:{translateX:-15,rotate:"-3deg"},.6:{translateX:10,rotate:"2deg"},.75:{translateX:-5,rotate:"-1deg"},1:{translateX:0,rotate:"0deg"}},Y={0:{opacity:0,scale:.3},.2:{scale:1.1},.4:{scale:.9},.6:{opacity:1,scale:1.03},.8:{scale:.97},1:{opacity:1,scale:1}},G={0:{opacity:0,translateY:800},.6:{opacity:1,translateY:-25},.75:{translateY:10},.9:{translateY:-5},1:{translateY:0}},X={0:{opacity:0,translateY:-800},.6:{opacity:1,translateY:25},.75:{translateY:-10},.9:{translateY:5},1:{translateY:0}},K={0:{opacity:0,translateX:600},.6:{opacity:1,translateX:-20},.75:{translateX:8},.9:{translateX:-4},1:{translateX:0}},J={0:{opacity:0,translateX:-600},.6:{opacity:1,translateX:20},.75:{translateX:-8},.9:{translateX:4},1:{translateX:0}},Z={0:{opacity:1,scale:1},.2:{scale:.9},.5:{opacity:1,scale:1.11},.55:{scale:1.11},1:{opacity:0,scale:.3}},Q={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:-10},.4:{translateY:20},.45:{translateY:20},.55:{opacity:1},1:{opacity:0,translateY:-800}},ee={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:10},.4:{translateY:-20},.45:{translateY:-20},.55:{opacity:1},1:{opacity:0,translateY:800}},te={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:10},.4:{translateX:-20},.45:{translateX:-20},.55:{opacity:1},1:{opacity:0,translateX:600}},ne={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:-10},.4:{translateX:20},.45:{translateX:20},.55:{opacity:1},1:{opacity:0,translateX:-600}};function re(e,t){return{from:{opacity:0,[e]:t},to:{opacity:1,[e]:0}}}const ae={from:{opacity:0},to:{opacity:1}},ie=re("translateY",-100),oe=re("translateY",100),se=re("translateX",-100),le=re("translateX",100),ue=re("translateY",-500),ce=re("translateY",500),de=re("translateX",-500),he=re("translateX",500);function fe(e,t){return{from:{opacity:1,[e]:0},to:{opacity:0,[e]:t}}}const pe={from:{opacity:1},to:{opacity:0}},me=fe("translateY",100),ge=fe("translateY",-100),ye=fe("translateX",-100),_e=fe("translateX",100),be=fe("translateY",500),ve=fe("translateY",-500),we=fe("translateX",-500),Fe=fe("translateX",500),ke={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateX:"90deg"},.4:{rotateX:"-20deg"},.6:{opacity:1,rotateX:"10deg"},.8:{rotateX:"-5deg"},1:{opacity:1,rotateX:"0deg"}},xe={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateY:"90deg"},.4:{rotateY:"-20deg"},.6:{opacity:1,rotateY:"10deg"},.8:{rotateY:"-5deg"},1:{opacity:1,rotateY:"0deg"}},Ae={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateX:"0deg"},.3:{opacity:1,rotateX:"-20deg"},1:{opacity:0,rotateX:"90deg"}},Se={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateY:"0deg"},.3:{opacity:1,rotateY:"-20deg"},1:{opacity:0,rotateY:"90deg"}},Ee={easing:"ease-out",0:{opacity:0,translateX:200,skewX:"-30deg"},.6:{opacity:1,translateX:0,skewX:"20deg"},.8:{skewX:"-5deg"},1:{opacity:1,translateX:0,skewX:"0deg"}},Ce={easing:"ease-in",0:{opacity:1,translateX:0,skewX:"0deg"},1:{opacity:0,translateX:200,skewX:"30deg"}};function Te(e,t){return{from:{[e]:t},to:{[e]:0}}}const De=Te("translateY",-100),Ie=Te("translateY",100),Oe=Te("translateX",-100),Pe=Te("translateX",100);function Me(e,t){return{from:{[e]:0},to:{[e]:t}}}const Re=Me("translateY",100),Le=Me("translateY",-100),Ne=Me("translateX",-100),Be=Me("translateX",100);function je(e,t){const n=Math.min(1,Math.max(-1,t));return{easing:d.default.bezier(.175,.885,.32,1),0:{opacity:0,scale:.1,[e]:-1e3*n},.6:{opacity:1,scale:.457,[e]:t},1:{scale:1,[e]:0}}}const Ve={from:{opacity:0,scale:.3},.5:{opacity:1},to:{opacity:1,scale:1}},ze=je("translateY",60),He=je("translateY",-60),Ue=je("translateX",10),We=je("translateX",-10);function qe(e,t){const n=Math.min(1,Math.max(-1,t));return{easing:d.default.bezier(.175,.885,.32,1),0:{opacity:1,scale:1,[e]:0},.4:{opacity:1,scale:.457,[e]:t},1:{opacity:0,scale:.1,[e]:-1e3*n}}}const $e={from:{opacity:1,scale:1},.5:{opacity:1,scale:.3},to:{opacity:0,scale:0}},Ye=qe("translateY",60),Ge=qe("translateY",-60),Xe=qe("translateX",10),Ke=qe("translateX",-10);S(r);const Je=L,Ze=L(a.default),Qe=L(i.default),et=L(o.default)},71243:(e,t,n)=>{"use strict";n.r(t),n.d(t,{formatNumbers:()=>m,generateDay:()=>k,getLocale:()=>x,getPartialWeekDates:()=>F,getWeekDates:()=>w,isDateNotInRange:()=>v,isGTE:()=>f,isLTE:()=>p,isPastDate:()=>d,isToday:()=>h,month:()=>y,onSameDateRange:()=>u,page:()=>b,sameDate:()=>l,sameMonth:()=>s,sameWeek:()=>c,weekDayNames:()=>_});const r=n(53483),{toMarkingFormat:a}=n(3729),i=/[0-9]/g;function o(e){return e&&e instanceof r}function s(e,t){return!(!o(e)||!o(t))&&(e?.getFullYear()===t?.getFullYear()&&e?.getMonth()===t?.getMonth())}function l(e,t){return!(!o(e)||!o(t))&&(e?.getFullYear()===t?.getFullYear()&&e?.getMonth()===t?.getMonth()&&e?.getDate()===t?.getDate())}function u({firstDay:e,secondDay:t,numberOfDays:n,firstDateInRange:a}){const i=new r(e),o=new r(t),s=new r(a),l=i.getTime()-s.getTime(),u=o.getTime()-s.getTime(),c=Math.ceil(l/864e5),d=Math.ceil(u/864e5);return Math.floor(c/n)===Math.floor(d/n)}function c(e,t,n){const a=w(e,n,"yyyy-MM-dd"),i=a instanceof r?new r(t):t;return a?.includes(i)}function d(e){const t=new r,n=new r(e);if(t.getFullYear()>n.getFullYear())return!0;if(t.getFullYear()===n.getFullYear()){if(t.getMonth()>n.getMonth())return!0;if(t.getMonth()===n.getMonth()&&t.getDate()>n.getDate())return!0}return!1}function h(e){return l(e instanceof r?e:new r(e),r.today())}function f(e,t){if(e&&t)return t.diffDays(e)>-1}function p(e,t){if(e&&t)return e.diffDays(t)>-1}function m(e){const t=x().numbers;return t?e.toString().replace(i,(e=>t[+e])):e}function g(e,t){const n=[];let a=+e;const i=+t;for(;a<=i;a=new r(a,!0).addDays(1).getTime())n.push(new r(a,!0));return n}function y(e){const t=e.getFullYear(),n=e.getMonth(),a=new r(t,n+1,0).getDate();return g(new r(t,n,1,0,0,0,!0),new r(t,n,a,0,0,0,!0))}function _(e=0){let t=x().dayNamesShort;const n=e%7;return n&&(t=t.slice(n).concat(t.slice(0,n))),t}function b(e,t=0,n=!1){const r=y(e);let a=[],i=[];const o=(7+t)%7||7,s=(o+6)%7;t=t||0;const l=r[0].clone(),u=l.getDay();l.getDay()!==o&&l.addDays(-(l.getDay()+7-o)%7);const c=r[r.length-1].clone(),d=c.getDay();d!==s&&c.addDays((s+7-d)%7);const h=(u+r.length)/6>=6;return n&&!h&&c.addDays(7),p(l,r[0])&&(a=g(l,r[0])),f(c,r[r.length-1])&&(i=g(r[r.length-1],c)),a.concat(r.slice(1,r.length-1),i)}function v(e,t,n){return t&&!f(e,new r(t))||n&&!p(e,new r(n))}function w(e,t=0,n){const a=new r(e);if(e&&a.valid()){const e=[a];let r=a.getDay()-t;r<0&&(r=7+r);let i=a,o=r-1;for(;o>=0;)i=i.clone().addDays(-1),e.unshift(i),o-=1;for(i=a,o=r+1;o<7;)i=i.clone().addDays(1),e.push(i),o+=1;return n?e.map((e=>e.toString(n))):e}}function F(e,t=7){let n=0;const a=[];for(;n{"use strict";n.r(t),n.d(t,{Agenda:()=>Tt,AgendaList:()=>An,Calendar:()=>ze,CalendarContext:()=>Ht,CalendarList:()=>Qe,CalendarProvider:()=>Dn,CalendarUtils:()=>we,ExpandableCalendar:()=>rn,LocaleConfig:()=>s(),NewCalendarList:()=>ut,Profiler:()=>hr,Timeline:()=>nr,TimelineList:()=>cr,WeekCalendar:()=>ln,asCalendarConsumer:()=>Pn});var r={};n.r(r),n.d(r,{default:()=>q});var a=n(94075),i=n.n(a),o=n(53483),s=n.n(o),l=n(11226),u=n.n(l),c=n(36665),d=n(73929),h=n(60444),f=n(60397);const p={SWIPE_UP:"SWIPE_UP",SWIPE_DOWN:"SWIPE_DOWN",SWIPE_LEFT:"SWIPE_LEFT",SWIPE_RIGHT:"SWIPE_RIGHT"},m={velocityThreshold:.3,directionalOffsetThreshold:80,gestureIsClickThreshold:5};function g(e,t,n,r){return Math.abs(e)>t&&Math.abs(n)0?n:t:this._isValidVerticalSwipe(e)?o>0?a:r:null}_isValidHorizontalSwipe(e){const{vx:t,dy:n}=e,{velocityThreshold:r,directionalOffsetThreshold:a}=this.swipeConfig;return g(t,r,n,a)}_isValidVerticalSwipe(e){const{vy:t,dx:n}=e,{velocityThreshold:r,directionalOffsetThreshold:a}=this.swipeConfig;return g(t,r,n,a)}render(){return(0,f.jsx)(d.default,Object.assign({},this.props,this._panResponder.panHandlers))}}const _=y;var b=n(26725),v=n(48623),w=n(95991);const{width:F,height:k}=b.default.get("window"),x=v.default.isRTL,A=!1,S=F=900,isAndroidRTL:false,isRN73:()=>w.default.constants.reactNativeVersion.minor>=73};var C=n(71243),T=n(3729);const{isToday:D,isDateNotInRange:I,sameMonth:O}=n(71243),{toMarkingFormat:P}=n(3729);function M(e,t,n,r){const{minDate:a,maxDate:i,disabledByDefault:o,disabledByWeekDays:s,context:l}=n;let u="";return r||(l?.date??P(t))!==P(e)?D(e)?u="today":o||I(e,a,i)?u="disabled":O(e,t)?s&&-1!==s.indexOf(e.getDay())&&(u="disabled"):u="disabled":u="selected",u}var R=n(98587);const L=["pastScrollRange","futureScrollRange","calendarWidth","calendarHeight","calendarStyle","staticHeader","showScrollIndicator","animateScroll","scrollEnabled","scrollsToTop","pagingEnabled","horizontal","keyboardShouldPersistTaps","keyExtractor","onEndReachedThreshold","onEndReached","nestedScrollEnabled"],N=["loadItemsForMonth","onCalendarToggled","renderKnob","selected","hideKnob","showClosingKnob","items","selectedDay","topDay","onDayChange","showOnlySelectedDayItems","renderEmptyData","reservationsKeyExtractor","date","item","rowHasChanged","renderItem","renderEmptyDate"];n(52555),n(23326),n(20415),n(37703),n(7878);function B(e){const{state:t,marking:n,markingType:r,theme:a,onPress:i,onLongPress:o,date:s,disableAllTouchEventsForDisabledDays:l,disableAllTouchEventsForInactiveDays:u,dayComponent:c,testID:d}=e;return{state:t,marking:n,markingType:r,theme:a,onPress:i,onLongPress:o,date:s,disableAllTouchEventsForDisabledDays:l,disableAllTouchEventsForInactiveDays:u,dayComponent:c,testID:d}}function j(e){const{month:t,addMonth:n,theme:r,firstDay:a,displayLoadingIndicator:i,showWeekNumbers:o,monthFormat:s,hideDayNames:l,hideArrows:u,renderArrow:c,onPressArrowLeft:d,onPressArrowRight:h,disableArrowLeft:f,disableArrowRight:p,disabledDaysIndexes:m,renderHeader:g,customHeaderTitle:y,webAriaLevel:_,numberOfDays:b,current:v,timelineLeftInset:w,testID:F}=e;return{month:t,addMonth:n,theme:r,firstDay:a,displayLoadingIndicator:i,showWeekNumbers:o,monthFormat:s,hideDayNames:l,hideArrows:u,renderArrow:c,onPressArrowLeft:d,onPressArrowRight:h,disableArrowLeft:f,disableArrowRight:p,disabledDaysIndexes:m,renderHeader:g,customHeaderTitle:y,webAriaLevel:_,numberOfDays:b,current:v,timelineLeftInset:w,testID:F}}function V(e){return(0,R.default)(e,L)}const z=(e,t)=>{const n=(0,c.useRef)(!1);(0,c.useEffect)((()=>{n.current?e():n.current=!0}),t)},H=(...e)=>{const t=c.useRef();return c.useEffect((()=>{e.forEach((e=>{e&&("function"===typeof e?e(t.current):e.current=t.current)}))}),[e]),t};var U=n(75675),W=n(24855);function q(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({container:{paddingLeft:5,paddingRight:5,backgroundColor:t.calendarBackground},dayContainer:{flex:1,alignItems:"center"},emptyDayContainer:{flex:1},monthView:{backgroundColor:t.calendarBackground},week:{marginVertical:t.weekVerticalMargin,flexDirection:"row",justifyContent:"space-around"}},e["stylesheet.calendar.main"]||{}))}var $=n(7878),Y=n.n($),G=n(20530),X=n(6283),K=n(15648),J=n(60193);function Z(e={}){const t=Object.assign({},W,e),n=E.isRTL?{transform:[{scaleX:-1}]}:void 0;return U.default.create(Object.assign({header:{flexDirection:"row",justifyContent:"space-between",paddingLeft:10,paddingRight:10,marginTop:6,alignItems:"center"},partialHeader:{paddingHorizontal:15},headerContainer:{flexDirection:"row"},monthText:{fontSize:t.textMonthFontSize,fontFamily:t.textMonthFontFamily,fontWeight:t.textMonthFontWeight,color:t.monthTextColor,margin:10},arrow:Object.assign({padding:10},t.arrowStyle),arrowImage:Object.assign({},n,{tintColor:t.arrowColor},{width:t.arrowWidth,height:t.arrowHeight}),disabledArrowImage:Object.assign({},n,{tintColor:t.disabledArrowColor}),week:{marginTop:7,flexDirection:"row",justifyContent:"space-around"},partialWeek:{paddingRight:0},dayHeader:{marginTop:2,marginBottom:7,width:32,textAlign:"center",fontSize:t.textDayHeaderFontSize,fontFamily:t.textDayHeaderFontFamily,fontWeight:t.textDayHeaderFontWeight,color:t.textSectionTitleColor},disabledDayHeader:{color:t.textSectionTitleDisabledColor}},e["stylesheet.calendar.header"]||{}))}const Q=[{name:"increment",label:"increment"},{name:"decrement",label:"decrement"}],ee=(0,c.forwardRef)(((e,t)=>{const{theme:r,style:a,addMonth:i,month:o,monthFormat:l,firstDay:u,hideDayNames:h,showWeekNumbers:p,hideArrows:m,renderArrow:g,onPressArrowLeft:y,onPressArrowRight:_,arrowsHitSlop:b=20,disableArrowLeft:v,disableArrowRight:w,disabledDaysIndexes:F,displayLoadingIndicator:k,customHeaderTitle:x,renderHeader:A,webAriaLevel:S,testID:E,accessibilityElementsHidden:T,importantForAccessibility:D,numberOfDays:I,current:O="",timelineLeftInset:P}=e,M=(0,c.useMemo)((()=>I&&I>1),[I]),R=(0,c.useRef)(Z(r)),L=(0,c.useMemo)((()=>[R.current.header,M?R.current.partialHeader:void 0]),[M]),N=(0,c.useMemo)((()=>[R.current.partialWeek,{paddingLeft:P}]),[P]),B=(0,c.useMemo)((()=>[R.current.week,M?N:void 0]),[M,N]),j=(0,c.useMemo)((()=>"number"===typeof b?{top:b,left:b,bottom:b,right:b}:b),[b]);(0,c.useImperativeHandle)(t,(()=>({onPressLeft:H,onPressRight:U})));const V=(0,c.useCallback)((()=>{i?.(1)}),[i]),z=(0,c.useCallback)((()=>{i?.(-1)}),[i]),H=(0,c.useCallback)((()=>"function"===typeof y?y(z,o):z()),[y,z,o]),U=(0,c.useCallback)((()=>"function"===typeof _?_(V,o):V()),[_,V,o]),W=(0,c.useCallback)((e=>{switch(e.nativeEvent.actionName){case"decrement":H();break;case"increment":U()}}),[H,U]),q=(0,c.useMemo)((()=>{const e=new(s())(O).getDay(),t=M?(0,C.weekDayNames)(e):(0,C.weekDayNames)(u);return(M?t.slice(0,I):t).map(((e,t)=>{const n=[R.current.dayHeader];Y()(F,t)&&n.push(R.current.disabledDayHeader);const r=`dayTextAtIndex${t}`;return R.current[r]&&n.push(R.current[r]),(0,f.jsx)(X.default,{allowFontScaling:!1,style:n,numberOfLines:1,accessibilityLabel:"",children:e},t)}))}),[u,O,M,I,F]),$=e=>{if(m)return(0,f.jsx)(d.default,{});const t="left"===e,r=t?"leftArrow":"rightArrow",a=t?v:w,i=a?void 0:t?H:U,o=n(t?9849:34229),s=t?"left":"right";return(0,f.jsx)(K.default,{onPress:i,disabled:a,style:R.current.arrow,hitSlop:j,testID:`${E}.${r}`,children:g?g(s):(0,f.jsx)(J.default,{source:o,style:a?R.current.disabledArrowImage:R.current.arrowImage})})};return(0,f.jsxs)(d.default,{testID:E,style:a,accessible:!0,accessibilityRole:"adjustable",accessibilityActions:Q,onAccessibilityAction:W,accessibilityElementsHidden:T,importantForAccessibility:D,children:[(0,f.jsxs)(d.default,{style:L,children:[$("left"),(0,f.jsxs)(d.default,{style:R.current.headerContainer,children:[(()=>{const e={"aria-level":S};return A?A(o):x||(0,f.jsx)(c.Fragment,{children:(0,f.jsx)(X.default,Object.assign({allowFontScaling:!1,style:R.current.monthText,testID:`${E}.title`},e,{children:(0,C.formatNumbers)(o?.toString(l))}))})})(),(()=>{if(k)return(0,f.jsx)(G.default,{color:r?.indicatorColor,testID:`${E}.loader`})})()]}),$("right")]}),(()=>{if(!h)return(0,f.jsxs)(d.default,{style:B,testID:`${E}.dayNames`,children:[p&&(0,f.jsx)(d.default,{style:R.current.dayHeader}),q]})})()]})})),te=ee;ee.displayName="CalendarHeader",ee.defaultProps={monthFormat:"MMMM yyyy",webAriaLevel:1,arrowsHitSlop:20};var ne=n(23326),re=n.n(ne),ae=n(37703),ie=n.n(ae),oe=n(97879),se=n.n(oe),le=n(24883),ue=n.n(le),ce=n(42291),de=n.n(ce),he=n(41002),fe=n.n(he),pe=n(46170),me=n.n(pe);const{getLocale:ge}=n(71243),{padNumber:ye,toMarkingFormat:_e}=n(3729);function be(e){if(!ue()(e)){if(de()(e)&&!isNaN(e.getFullYear()))return e.getFullYear()+"-"+ye(e.getMonth()+1)+"-"+ye(e.getDate());if(fe()(e))return _e(new(s())(e,!1));if(me()(e))return _e(new(s())(e,!0));throw"Invalid Date"}}function ve(){return ge()}const we={getCalendarDateString:be,getDefaultLocale:ve};var Fe=n(8493),ke=n.n(Fe);function xe(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({dot:Object.assign({width:4,height:4,marginTop:1,marginHorizontal:1,borderRadius:2,opacity:0},t.dotStyle),visibleDot:{opacity:1,backgroundColor:t.dotColor},selectedDot:{backgroundColor:t.selectedDotColor},disabledDot:{backgroundColor:t.disabledDotColor},inactiveDot:{backgroundColor:t.inactiveDotColor},todayDot:{backgroundColor:t.todayDotColor}},e["stylesheet.dot"]||{}))}const Ae=({theme:e,marked:t,disabled:n,inactive:r,color:a,today:i,selected:o})=>{const s=(0,c.useRef)(xe(e)),l=[s.current.dot];return t&&(l.push(s.current.visibleDot),i&&l.push(s.current.todayDot),n&&l.push(s.current.disabledDot),r&&l.push(s.current.inactiveDot),o&&l.push(s.current.selectedDot),a&&l.push({backgroundColor:a})),(0,f.jsx)(d.default,{style:l})};var Se;!function(e){e.DOT="dot",e.MULTI_DOT="multi-dot",e.PERIOD="period",e.MULTI_PERIOD="multi-period",e.CUSTOM="custom"}(Se||(Se={}));const Ee=e=>{const{theme:t,type:n,dots:a,periods:i,selected:o,dotColor:s}=e,l=(0,c.useRef)(function(e={}){const t=Object.assign({},r,e);return U.default.create(Object.assign({dots:{flexDirection:"row"},periods:{alignSelf:"stretch"},period:{height:4,marginVertical:1,backgroundColor:t.dotColor},startingDay:{borderTopLeftRadius:2,borderBottomLeftRadius:2,marginLeft:4},endingDay:{borderTopRightRadius:2,borderBottomRightRadius:2,marginRight:4}},e["stylesheet.marking"]||{}))}(t)),u=e=>{if(e&&Array.isArray(e)&&e.length>0){return ke()(e,(function(e){return e.color})).map(((e,t)=>n===Se.MULTI_DOT?m(t,e):p(t,e)))}},h=(e,t)=>(0,f.jsx)(d.default,{style:e,children:u(t)}),p=(e,t)=>{const{color:n,startingDay:r,endingDay:a}=t,i=[l.current.period,{backgroundColor:n}];return r&&i.push(l.current.startingDay),a&&i.push(l.current.endingDay),(0,f.jsx)(d.default,{style:i},e)},m=(t,n)=>{const r=function(e){const{theme:t,color:n,marked:r,selected:a,disabled:i,inactive:o,today:s}=e;return{theme:t,color:n,marked:r,selected:a,disabled:i,inactive:o,today:s}}(e);let a=t,i=s;return n&&(n.key&&(a=n.key),i=o&&n.selectedDotColor?n.selectedDotColor:n.color),(0,c.createElement)(Ae,Object.assign({},r,{key:a,color:i}))};return(()=>{switch(n){case Se.MULTI_DOT:return h(l.current.dots,a);case Se.MULTI_PERIOD:return h(l.current.periods,i);default:return m()}})()},Ce=Ee;function Te(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({container:{alignSelf:"stretch",alignItems:"center"},base:{width:32,height:32,alignItems:"center"},today:{backgroundColor:t.todayBackgroundColor,borderRadius:16},selected:{backgroundColor:t.selectedDayBackgroundColor,borderRadius:16},text:Object.assign({fontSize:t.textDayFontSize,fontFamily:t.textDayFontFamily,fontWeight:t.textDayFontWeight,color:t.dayTextColor,backgroundColor:"rgba(0, 0, 0, 0)",marginTop:E.isAndroid?4:6},t.textDayStyle),todayText:{color:t.todayTextColor},selectedText:{color:t.selectedDayTextColor},disabledText:{color:t.textDisabledColor},inactiveText:{color:t.textInactiveColor}},e["stylesheet.day.basic"]||{}))}Ee.displayName="Marking",Ee.markings=Se;const De=e=>{const{theme:t,date:n,onPress:r,onLongPress:a,markingType:i,marking:o,state:s,disableAllTouchEventsForDisabledDays:l,disableAllTouchEventsForInactiveDays:u,accessibilityLabel:h,children:p,testID:m}=e,g=n?(0,T.xdateToData)(n):void 0,y=(0,c.useRef)(Te(t)),_=o||{},b=_.selected||"selected"===s,v="undefined"!==typeof _.disabled?_.disabled:"disabled"===s,w="undefined"!==typeof o?.inactive?o.inactive:"inactive"===s,F="undefined"!==typeof o?.today?o.today:"today"===s,k=i===Ce.markings.MULTI_DOT,x=i===Ce.markings.MULTI_PERIOD,A=i===Ce.markings.CUSTOM,S=()=>{const{disableTouchEvent:e}=_;let t=!1;return"boolean"===typeof e?t=e:"boolean"===typeof l&&v?t=l:"boolean"===typeof u&&w&&(t=u),t},E=()=>{const{customStyles:e,selectedColor:t}=_,n=[y.current.base];return b?(n.push(y.current.selected),t&&n.push({backgroundColor:t})):F&&n.push(y.current.today),A&&e&&e.container&&(void 0===e.container.borderRadius&&(e.container.borderRadius=16),n.push(e.container)),n},C=()=>{const{customStyles:e,selectedTextColor:t}=_,n=[y.current.text];return b?(n.push(y.current.selectedText),t&&n.push({color:t})):v?n.push(y.current.disabledText):F?n.push(y.current.todayText):w&&n.push(y.current.inactiveText),A&&e&&e.text&&n.push(e.text),n},D=(0,c.useCallback)((()=>{r?.(g)}),[r,n]),I=(0,c.useCallback)((()=>{a?.(g)}),[a,n]),O=()=>{const{marked:e,dotColor:n,dots:r,periods:a}=_;return(0,f.jsx)(Ce,{type:i,theme:t,marked:!!k||e,selected:b,disabled:v,inactive:w,today:F,dotColor:n,dots:r,periods:a})},P=()=>(0,f.jsx)(X.default,{allowFontScaling:!1,style:C(),children:String(p)}),M=()=>{const{activeOpacity:e}=_;return(0,f.jsx)(K.default,{testID:m,style:E(),activeOpacity:e,disabled:S(),onPress:S()?void 0:D,onLongPress:S()?void 0:I,accessible:!0,accessibilityRole:v?void 0:"button",accessibilityLabel:h,children:x?P():(0,f.jsxs)(c.Fragment,{children:[P(),O()]})})};return x?(0,f.jsxs)(d.default,{style:y.current.container,children:[M(),O()]}):M()},Ie=De;De.displayName="BasicDay";var Oe=n(51950);function Pe(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({container:{alignSelf:"stretch",alignItems:"center"},base:{width:38,height:34,alignItems:"center",justifyContent:"center"},today:{backgroundColor:t.todayBackgroundColor,borderRadius:17},fillers:{position:"absolute",height:34,flexDirection:"row",left:0,right:0},leftFiller:{backgroundColor:t.calendarBackground,height:34,flex:1},rightFiller:{backgroundColor:t.calendarBackground,height:34,flex:1},text:{fontSize:t.textDayFontSize,fontFamily:t.textDayFontFamily,fontWeight:t.textDayFontWeight,color:t.dayTextColor,backgroundColor:"rgba(0, 0, 0, 0)"},todayText:{fontWeight:"500",color:e.todayTextColor},selectedText:{color:t.selectedDayTextColor},disabledText:{color:t.textDisabledColor},inactiveText:{color:t.textInactiveColor}},e["stylesheet.day.period"]||{}))}const Me=e=>{const{theme:t,date:n,onPress:r,onLongPress:a,marking:i,state:o,disableAllTouchEventsForDisabledDays:s,disableAllTouchEventsForInactiveDays:l,accessibilityLabel:u,children:h,testID:p}=e,m=n?(0,T.xdateToData)(n):void 0,g=(0,c.useRef)(Pe(t)),y="undefined"!==typeof i?.disabled?i.disabled:"disabled"===o,_="undefined"!==typeof i?.inactive?i.inactive:"inactive"===o,b="undefined"!==typeof i?.today?i.today:"today"===o,v=()=>{const{disableTouchEvent:e}=i||{};let t=!1;return"boolean"===typeof e?t=e:"boolean"===typeof s&&y?t=s:"boolean"===typeof l&&_&&(t=l),t},w=(0,c.useMemo)((()=>{const e={textStyle:{},containerStyle:{}};return i?(i.disabled?e.textStyle={color:g.current.disabledText.color}:i.inactive?e.textStyle={color:g.current.inactiveText.color}:i.selected&&(e.textStyle={color:g.current.selectedText.color}),i.startingDay&&(e.startingDay={backgroundColor:i.color}),i.endingDay&&(e.endingDay={backgroundColor:i.color}),i.startingDay||i.endingDay||(e.day={backgroundColor:i.color}),i.textColor&&(e.textStyle={color:i.textColor}),i.customTextStyle&&(e.textStyle=i.customTextStyle),i.customContainerStyle&&(e.containerStyle=i.customContainerStyle),e):e}),[i]),F=(0,c.useMemo)((()=>{const e=[g.current.base];if(b&&e.push(g.current.today),i){e.push({borderRadius:17,overflow:"hidden",paddingTop:5});const t=w.startingDay,n=w.endingDay;t&&!n?e.push({backgroundColor:w.startingDay?.backgroundColor}):(n&&!t||n&&t)&&e.push({backgroundColor:w.endingDay?.backgroundColor}),w.containerStyle&&e.push(w.containerStyle)}return e}),[i,y,_,b]),k=(0,c.useMemo)((()=>{const e=[g.current.text];return y?e.push(g.current.disabledText):_?e.push(g.current.inactiveText):b&&e.push(g.current.todayText),i&&w.textStyle&&e.push(w.textStyle),e}),[i,y,_,b]),x=(0,c.useMemo)((()=>{const e={backgroundColor:void 0},t={backgroundColor:void 0};let n={};const r=w.startingDay,a=w.endingDay;return r&&!a?t.backgroundColor=w.startingDay?.backgroundColor:a&&!r?e.backgroundColor=w.endingDay?.backgroundColor:w.day&&(e.backgroundColor=w.day?.backgroundColor,t.backgroundColor=w.day?.backgroundColor,n={backgroundColor:w.day?.backgroundColor}),{leftFillerStyle:e,rightFillerStyle:t,fillerStyle:n}}),[i]),A=(0,c.useCallback)((()=>{r?.(m)}),[r,n]),S=(0,c.useCallback)((()=>{a?.(m)}),[a,n]),E=i?Oe.default:K.default;return(0,f.jsx)(E,{testID:p,disabled:v(),onPress:v()?void 0:A,onLongPress:v()?void 0:S,accessible:!0,accessibilityRole:y?void 0:"button",accessibilityLabel:u,children:(0,f.jsxs)(d.default,{style:g.current.container,children:[(()=>{if(i)return(0,f.jsxs)(d.default,{style:[g.current.fillers,x.fillerStyle],children:[(0,f.jsx)(d.default,{style:[g.current.leftFiller,x.leftFillerStyle]}),(0,f.jsx)(d.default,{style:[g.current.rightFiller,x.rightFillerStyle]})]})})(),(0,f.jsxs)(d.default,{style:F,children:[(0,f.jsx)(X.default,{allowFontScaling:!1,style:k,children:String(h)}),(()=>{if(i){const{marked:e,dotColor:n}=i;return(0,f.jsx)(Ce,{type:"dot",theme:t,marked:e,disabled:y,inactive:_,today:b,dotColor:n})}})()]})]})})},Re=Me;Me.displayName="PeriodDay",Me.propTypes={state:i().oneOf(["selected","disabled","inactive","today",""]),marking:i().any,theme:i().object,onPress:i().func,onLongPress:i().func,date:i().string};const Le=c.memo((e=>{const{date:t,marking:n,dayComponent:r,markingType:a}=e,i=t?new(s())(t):void 0,o=(0,C.isToday)(i),l=(0,c.useMemo)((()=>{let e="";if(n){if(n.accessibilityLabel)return n.accessibilityLabel;n.selected&&(e+="selected ",n.marked||(e+="You have no entries for this day ")),n.marked&&(e+="You have entries for this day "),n.startingDay&&(e+="period start "),n.endingDay&&(e+="period end "),(n.disabled||n.disableTouchEvent)&&(e+="disabled ")}return e}),[n]),u=(0,c.useMemo)((()=>{const e=ve().today||"today",t=ve().formatAccessibilityLabel||"dddd d MMMM yyyy";return`${o?e:""} ${i?.toString(t)} ${l}`}),[i,n,o]),d=r||("period"===a?Re:Ie),h=r?{date:(0,T.xdateToData)(t||new(s()))}:void 0;return(0,f.jsx)(d,Object.assign({},e,{accessibilityLabel:u},h,{children:(0,C.formatNumbers)(i?.getDate())}))}),(function(e,t){const n=re()(e,"marking"),r=re()(t,"marking"),a=se()(n,(function(e,t){return e!==r[t]})),i=ie()(e.marking,t.marking);return!a&&i})),Ne=Le;Le.displayName="Day";var Be=n(60893),je=n(12103);const Ve=e=>{const{initialDate:t,current:r,theme:a,markedDates:i,minDate:o,maxDate:l,allowSelectionOutOfRange:h,onDayPress:m,onDayLongPress:g,onMonthChange:y,onVisibleMonthsChange:b,disableMonthChange:v,enableSwipeMonths:w,hideExtraDays:F,firstDay:k,showSixWeeks:x,displayLoadingIndicator:A,customHeader:S,headerStyle:D,accessibilityElementsHidden:I,importantForAccessibility:O,testID:P,style:R}=e,[L,N]=(0,c.useState)(r||t?(0,T.parseDate)(r||t):new(s())),V=(0,c.useRef)(q(a)),H=(0,c.useRef)(),U=(0,c.useRef)({disabled:!0,disableTouchEvent:!0});(0,c.useEffect)((()=>{t&&N((0,T.parseDate)(t))}),[t]),z((()=>{const e=L.clone();y?.((0,T.xdateToData)(e)),b?.([(0,T.xdateToData)(e)])}),[L]);const W=(0,c.useCallback)((e=>{(0,C.sameMonth)(e,L)||N(e)}),[L]),$=(0,c.useCallback)((e=>{const t=L.clone().addMonths(e,!0);W(t)}),[L,W]),Y=(0,c.useCallback)(((e,t)=>{const n=new(s())(e.dateString);!h&&(o&&!(0,C.isGTE)(n,new(s())(o))||l&&!(0,C.isLTE)(n,new(s())(l)))||(v||W(n),t&&t(e))}),[o,l,h,v,W]),G=(0,c.useCallback)((e=>{e&&Y(e,m)}),[Y,m]),X=(0,c.useCallback)((e=>{e&&Y(e,g)}),[Y,g]),K=(0,c.useCallback)((()=>{H.current?.onPressRight()}),[H]),J=(0,c.useCallback)((()=>{H.current?.onPressLeft()}),[H]),Z=(0,c.useCallback)((e=>{const{SWIPE_UP:t,SWIPE_DOWN:n,SWIPE_LEFT:r,SWIPE_RIGHT:a}=p;switch(e){case t:case n:break;case r:E.isRTL?J():K();break;case a:E.isRTL?K():J()}}),[K,J]),Q=(t,r)=>{const o=[];t.forEach(((t,r)=>{o.push(((t,r)=>{const a=B(e);if(!(0,C.sameMonth)(t,L)&&F)return(0,f.jsx)(d.default,{style:V.current.emptyDayContainer},r);const o=(0,T.toMarkingFormat)(t),s=u()(e.context);return(0,f.jsxs)(Be.LinearGradient,{colors:["transparent",i?.[o]?(()=>{if(i?.[o]){const e=i?.[o]?.periods?i?.[o]?.periods?.length:0,t=e?e/8*120:0;return`rgba(${255*Math.sin(t*Math.PI/180)}, ${255*Math.sin((t-120)*Math.PI/180)}, ${255*Math.sin((t-240)*Math.PI/180)}, 0.2)`}return"transparent"})():"transparent"],locations:i?.[o]?[.6,1]:[0,1],start:{x:0,y:0},end:{x:0,y:(()=>{if(i?.[o]){const e=i?.[o]?.periods?i?.[o]?.periods?.length:0;return e?1/e:0}})()},style:[V.current.dayContainer,{borderRadius:5,paddingBottom:2,borderWidth:.2,borderColor:"rgba(0,0,0,0.3)"}],children:["inactive"===i?.[o]?.status&&(0,f.jsx)(je.default,{autoPlay:!0,loop:!0,style:{position:"absolute",height:20,width:20,left:-2},source:n(94700)}),(0,f.jsx)(Ne,Object.assign({},a,{testID:`${P}.day_${o}`,date:o,state:M(t,L,e,s),marking:i?.[o],onPress:G,onLongPress:X}))]},r)})(t,r))}),void 0);const s=r%2===0?"transparent":"rgba(128, 128, 128, 0.2)";var l;return e.showWeekNumbers&&o.unshift((l=t[t.length-1].getWeek(),(0,f.jsx)(d.default,{style:V.current.dayContainer,children:(0,f.jsx)(Ie,{marking:U.current,theme:a,testID:`${P}.weekNumber_${l}`,children:l},`week-${l}`)},`week-container-${l}`))),(0,f.jsx)(d.default,{style:[V.current.week,{minWidth:e.showWeekNumbers?1.085*V.current.week.minWidth:V.current.week.minWidth,backgroundColor:s,minHeight:100}],children:o},r)},ee=(0,c.useMemo)((()=>{if(L){const e=(0,T.toMarkingFormat)(L.clone().addMonths(1,!0).setDate(1).addDays(-1));if(A&&!i?.[e])return!0}return!1}),[L,A,i]),ne=w?_:d.default,re=w?{onSwipe:e=>Z(e)}:void 0;return(0,f.jsx)(ne,Object.assign({},re,{children:(0,f.jsxs)(d.default,{style:[V.current.container,R],testID:P,accessibilityElementsHidden:I,importantForAccessibility:O,children:[(()=>{const t=j(e),n=S?void 0:H,r=S?S:te;return(0,f.jsx)(r,Object.assign({},t,{testID:`${P}.header`,style:D,ref:n,month:L,addMonth:$,displayLoadingIndicator:ee}))})(),(()=>{const e=x&&!F,t=(0,C.page)(L,k,e),n=[];for(;t.length;)n.push(Q(t.splice(0,7),n.length));return(0,f.jsx)(d.default,{style:V.current.monthView,children:n})})()]})}))},ze=Ve;Ve.displayName="Calendar",Ve.propTypes=Object.assign({},te.propTypes,Ne.propTypes,{theme:i().object,style:i().oneOfType([i().object,i().array,i().number]),current:i().string,initialDate:i().string,minDate:i().string,maxDate:i().string,markedDates:i().object,hideExtraDays:i().bool,showSixWeeks:i().bool,onDayPress:i().func,onDayLongPress:i().func,onMonthChange:i().func,onVisibleMonthsChange:i().func,disableMonthChange:i().bool,enableSwipeMonths:i().bool,disabledByDefault:i().bool,headerStyle:i().oneOfType([i().object,i().number,i().array]),customHeader:i().any,allowSelectionOutOfRange:i().bool});var He=n(56013),Ue=n.n(He),We=n(90932);function qe(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({flatListContainer:{flex:1},container:{backgroundColor:t.calendarBackground},placeholder:{backgroundColor:t.calendarBackground,alignItems:"center",justifyContent:"center"},placeholderText:{fontSize:20,fontWeight:"200",color:t.dayTextColor},calendar:{paddingLeft:15,paddingRight:15},staticHeader:{position:"absolute",left:0,right:0,top:0,backgroundColor:t.calendarBackground,paddingHorizontal:15}},e["stylesheet.calendar-list.main"]||{}))}const $e=c.memo((e=>{const{item:t,theme:n,scrollToMonth:r,horizontal:a,calendarHeight:i,calendarWidth:o,style:s,headerStyle:l,onPressArrowLeft:u,onPressArrowRight:d,visible:h}=e,p=(0,c.useRef)(qe(n)),m=V(e),g=(0,T.toMarkingFormat)(t),y=(0,c.useMemo)((()=>[{width:o,minHeight:i},p.current.calendar,s]),[o,i,s]),_=(0,c.useMemo)((()=>[y,p.current.placeholderText]),[y]),b=(0,c.useCallback)(((e,t)=>{const n=t?.clone();if(n)if(u)u(e,n);else if(r){const e=n.getMonth();for(n.addMonths(-1);n.getMonth()===e;)n.setDate(n.getDate()-1);r(n)}}),[u,r]),v=(0,c.useCallback)(((e,t)=>{const n=t?.clone();n&&(d?d(e,n):r&&(n.addMonths(1),r(n)))}),[d,r]);return h?(0,f.jsx)(ze,Object.assign({hideArrows:!0,hideExtraDays:!0},m,{current:g,style:y,headerStyle:a?l:void 0,disableMonthChange:!0,onPressArrowLeft:a?b:u,onPressArrowRight:a?v:d})):(0,f.jsx)(X.default,{style:_,children:g})})),Ye=$e;$e.displayName="CalendarListItem";const Ge=E.screenWidth,Xe=360,Ke=50,Je=50,Ze=(e,t)=>{(0,c.useImperativeHandle)(t,(()=>({scrollToDay:(e,t,n)=>{ue(e,t,n)},scrollToMonth:e=>{ce(e)}})));const{theme:n,current:r,firstDay:a,markedDates:i,headerStyle:o,onMonthChange:l,onVisibleMonthsChange:u,pastScrollRange:h=Ke,futureScrollRange:p=Je,calendarHeight:m=Xe,calendarWidth:g=Ge,calendarStyle:y,animateScroll:_=!1,showScrollIndicator:b=!1,staticHeader:v,testID:w,style:F,onLayout:k,removeClippedSubviews:x,horizontal:A=!1,pagingEnabled:S,scrollEnabled:D=!0,nestedScrollEnabled:I=!0,scrollsToTop:O=!1,keyExtractor:P=(e,t)=>String(t),keyboardShouldPersistTaps:M,onScrollBeginDrag:R,onScrollEndDrag:L,onMomentumScrollBegin:N,onMomentumScrollEnd:B,contentContainerStyle:H,onEndReachedThreshold:U,onEndReached:W}=e,q=V(e),$=j(e),Y=A?g:m,[G,X]=(0,c.useState)((0,T.parseDate)(r)),K=(0,c.useMemo)((()=>E.isAndroidRTL&&A),[A]),J=(0,c.useRef)(qe(n)),Z=(0,c.useRef)(),Q=(0,c.useRef)(A?1:3),ee=(0,c.useRef)((0,T.parseDate)(r)||new(s())),ne=(0,c.useRef)(G),re=(0,c.useMemo)((()=>{const e=[];for(let t=0;t<=h+p;t++){const n=ee.current?.clone().addMonths(t-h,!0);e.push(n)}return e}),[h,p]),ae=(0,c.useMemo)((()=>[J.current.staticHeader,o]),[o]),oe=(0,c.useMemo)((()=>[J.current.container,F]),[F]),se=(0,c.useMemo)((()=>Ue()(re,(function(e){return e.toString()===ee.current?.toString()}))),[re]),le=(0,c.useCallback)((e=>Ue()(re,(function(t){return t.toString()===e.toString()}))),[re]);(0,c.useEffect)((()=>{r&&ce(new(s())(r))}),[r]),z((()=>{const e=G?.clone();if(e){const t=(0,T.xdateToData)(e);l?.(t),u?.([t])}}),[G]);const ue=(e,t,n)=>{const r=(0,T.parseDate)(e),i=Math.round(ee?.current?.clone().setDate(1).diffMonths(r?.clone().setDate(1)));let o=Y*h+i*Y+(t||0);if(!A){let e=0;const t=(0,C.page)(r,a);for(let n=0;n{const t=(0,T.parseDate)(e),n=Math.round(ee?.current?.clone().setDate(1).diffMonths(t?.clone().setDate(1))),r=Y*(K?h-n:h+n);0!==r&&Z?.current?.scrollToOffset({offset:r,animated:_})}),[Y,K,h,_]),de=(0,c.useCallback)((e=>{const t=G?.clone().addMonths(e,!0);(0,C.sameMonth)(t,G)||-1===le(t)||(ce(t),X(t))}),[G,ce]),he=(0,c.useCallback)((e=>{if(i&&e)for(const[t,n]of Object.entries(i))if((0,C.sameMonth)(new(s())(t),new(s())(e)))return i}),[i]),fe=(0,c.useCallback)(((e,t)=>({length:Y,offset:Y*t,index:t})),[]),pe=(0,c.useCallback)((e=>{for(let t=-Q.current;t<=Q.current;t++){const n=G?.clone().addMonths(t,!0);if((0,C.sameMonth)(e,n))return!0}return!1}),[G]),me=(0,c.useCallback)((({item:e})=>{const t=(0,T.toMarkingFormat)(e),[n,r]=t.split("-"),a=`${w}.item_${n}-${r}`;return(0,f.jsx)(Ye,Object.assign({},q,{testID:a,markedDates:he(e),item:e,style:y,horizontal:A,calendarWidth:g,calendarHeight:m,scrollToMonth:ce,visible:pe(e)}))}),[A,y,g,w,he,pe,q]),ge=(0,c.useRef)({viewAreaCoveragePercentThreshold:20}),ye=(0,c.useCallback)((({viewableItems:e})=>{const t=(0,T.parseDate)(e[0]?.item);if(K){const e=re.findIndex((e=>ie()((0,T.parseDate)(r),e))),n=e-re.findIndex((e=>ie()(t,e)));ne.current=re[e+n],X(ne.current)}else(0,C.sameDate)(ne?.current,t)||(ne.current=t,X(ne.current))}),[re,K,r]),_e=(0,c.useRef)([{viewabilityConfig:ge.current,onViewableItemsChanged:ye}]);return(0,f.jsxs)(d.default,{style:J.current.flatListContainer,testID:w,children:[(0,f.jsx)(We.default,{ref:Z,windowSize:K?h+p+1:void 0,style:oe,showsVerticalScrollIndicator:b,showsHorizontalScrollIndicator:b,data:re,renderItem:me,getItemLayout:fe,initialNumToRender:Q.current,initialScrollIndex:se,viewabilityConfigCallbackPairs:_e.current,testID:`${w}.list`,onLayout:k,removeClippedSubviews:x,pagingEnabled:S,scrollEnabled:D,scrollsToTop:O,horizontal:A,keyboardShouldPersistTaps:M,keyExtractor:P,onEndReachedThreshold:U,onEndReached:W,nestedScrollEnabled:I,onMomentumScrollBegin:N,onMomentumScrollEnd:B,onScrollBeginDrag:R,onScrollEndDrag:L,contentContainerStyle:H}),(()=>{if(v&&A)return(0,f.jsx)(te,Object.assign({},$,{testID:`${w}.staticHeader`,style:ae,month:G,addMonth:de,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants"}))})()]})},Qe=(0,c.forwardRef)(Ze);Ze.displayName="CalendarList",Ze.propTypes=Object.assign({},ze.propTypes,{pastScrollRange:i().number,futureScrollRange:i().number,calendarWidth:i().number,calendarHeight:i().number,calendarStyle:i().oneOfType([i().object,i().number,i().array]),staticHeader:i().bool,showScrollIndicator:i().bool,animateScroll:i().bool,scrollEnabled:i().bool,scrollsToTop:i().bool,pagingEnabled:i().bool,horizontal:i().bool,keyboardShouldPersistTaps:i().oneOf(["never","always","handled"]),keyExtractor:i().func,onEndReachedThreshold:i().number,onEndReached:i().func,nestedScrollEnabled:i().bool});var et=n(38299),tt=n.n(et),nt=n(47344),rt=n.n(nt),at=n(15935),it=n.n(at),ot=n(20216);const st=(0,c.forwardRef)(((e,t)=>{const{isHorizontal:n,renderItem:r,data:a,reloadPages:i=it(),pageWidth:o=E.screenWidth,pageHeight:s=E.screenHeight,onPageChange:l,onReachEdge:u,onReachNearEdge:d,onReachNearEdgeThreshold:h,initialPageIndex:p=0,initialOffset:m,extendedState:g,scrollViewProps:y,positionIndex:_=0,disableScrollOnDataChange:b,onEndReachedThreshold:v,onVisibleIndicesChanged:w,layoutProvider:F,onScroll:k,onEndReached:x,renderFooter:A}=e,S=(0,c.useMemo)((()=>{return e=a,new ot.DataProvider(((e,t)=>e!==t)).cloneWithRows(e);var e}),[a]),C=(0,c.useRef)(new ot.LayoutProvider((()=>"page"),((e,t)=>{t.width=o,t.height=s}))),T=(0,c.useMemo)((()=>E.isAndroidRTL&&n),[]),D=H(t),I=(0,c.useRef)(),O=(0,c.useRef)(!1),P=(0,c.useRef)(!1),M=(0,c.useRef)(!1),R=(0,c.useCallback)(rt()(i,500,{leading:!1,trailing:!0}),[i]);(0,c.useEffect)((()=>{b||setTimeout((()=>{const e=n?E.isAndroidRTL?Math.floor(a.length/2)+1:Math.floor(a.length/2)*o:0,t=n?0:_*s;D.current?.scrollToOffset?.(e,t,!1)}),0)}),[a,b]);const L=(0,c.useCallback)(((e,t,r)=>{R?.cancel();const i=e.nativeEvent.contentOffset,u=i.y,c=T?o*a.length-i.x:i.x,d=Math.round(n?c/o:u/s);I.current!==d&&(void 0!==I.current&&(l?.(d,I.current,{scrolledByUser:M.current}),M.current=!1,O.current=!1,P.current=!1,0===d||d===a.length-1?O.current=!0:h&&!tt()(d,h,a.length-h)&&(P.current=!0)),n&&E.isAndroid&&setTimeout((()=>{N(e)}),100),I.current=d),k?.(e,t,r)}),[k,l,a.length,R]),N=(0,c.useCallback)((e=>{I.current&&(O.current?(u?.(I.current),R?.(I.current)):P.current&&(R?.(I.current),d?.(I.current)),y?.onMomentumScrollEnd?.(e))}),[y?.onMomentumScrollEnd,u,d,R]),B=(0,c.useCallback)((()=>{M.current=!0}),[]),j=(0,c.useMemo)((()=>Object.assign({pagingEnabled:n,bounces:!1},y,{onScrollBeginDrag:B,onMomentumScrollEnd:N})),[B,N,y,n]),V=(0,c.useMemo)((()=>({height:s})),[s]);return(0,f.jsx)(ot.RecyclerListView,{ref:D,isHorizontal:n,disableRecycling:T,rowRenderer:r,dataProvider:S,layoutProvider:F??C.current,extendedState:g,initialRenderIndex:m?void 0:p,initialOffset:m,renderAheadOffset:5*o,onScroll:L,style:V,scrollViewProps:j,onEndReached:x,onEndReachedThreshold:v,onVisibleIndicesChanged:w,renderFooter:A})})),lt=50,ut=e=>{const{initialDate:t,horizontal:n,scrollRange:r=lt,staticHeader:a,scrollViewProps:i,calendarProps:o,testID:l}=e,u=(0,c.useRef)(qe(o?.theme)),h=(0,c.useRef)(),[p,m]=(0,c.useState)(dt(t,r)),[g,y]=(0,c.useState)(r),[_,b]=(0,c.useState)(t||p[r]),v=a&&n,w=j(e),F=(0,c.useMemo)((()=>[u.current.staticHeader,o?.headerStyle]),[o?.headerStyle]);(0,c.useEffect)((()=>{x(_)}),[_]);const k=(0,c.useCallback)((e=>e?p.findIndex((t=>t.includes(e.toString("yyyy-MM")))):-1),[p]),x=(0,c.useCallback)((e=>{if(e){const t=k(new(s())(e));if(-1!==t){const e=!(E.isAndroid&&!n);h.current?.scrollToOffset?.(t*E.screenWidth,0,e)}}}),[k]),A=(0,c.useCallback)(((e,t)=>{if(t){const n=new(s())(t).addMonths(e,!0),r=new(s())(t).addMonths(2*e,!0);-1!==k(r)&&b((0,T.toMarkingFormat)(n))}}),[k]),S=(0,c.useCallback)(((e,t)=>{o?.onPressArrowLeft?o?.onPressArrowLeft?.(e,t):A(1,t)}),[A]),C=(0,c.useCallback)(((e,t)=>{o?.onPressArrowRight?o?.onPressArrowRight?.(e,t):A(-1,t)}),[A]),D=(0,c.useCallback)(((e,t,n)=>{v&&n.scrolledByUser&&b(p[e])}),[p]),I=(0,c.useCallback)((e=>{n?O(e):P(e)}),[p]),O=e=>{const t=dt(p[e],r);m(t)},P=e=>{const t=[...p],n=p[e],a=e>r;if(n){if(a)for(let e=2;e<=r;e++){const r=ct(n,e);t.push(r)}else for(let e=-1;e>-r;e--){const r=ct(n,e);t.unshift(r)}y(a?e:r-1),m(t)}},M=(0,c.useMemo)((()=>[u.current.flatListContainer,{flex:n?void 0:1}]),[u,n]),R=(0,c.useMemo)((()=>Object.assign({},i,{showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1})),[i]),L=(0,c.useCallback)(((e,t)=>(0,f.jsx)(ze,Object.assign({},o,w,{initialDate:t,disableMonthChange:!0,hideArrows:!n,onPressArrowRight:S,onPressArrowLeft:C,hideExtraDays:o?.hideExtraDays||!0,style:[u.current.calendar,o?.style],headerStyle:n?o?.headerStyle:void 0,testID:`${l}_${t}`}))),[o,S,C]);return(0,f.jsxs)(d.default,{style:M,children:[(0,f.jsx)(st,{ref:h,data:p,renderItem:L,reloadPages:I,onReachNearEdgeThreshold:Math.round(.4*lt),extendedState:o?.markedDates,isHorizontal:n,style:u.current.container,initialPageIndex:r,positionIndex:g,pageHeight:360,pageWidth:E.screenWidth,onPageChange:D,scrollViewProps:R},"calendar-list"),(()=>{if(v)return(0,f.jsx)(te,Object.assign({},w,{month:new(s())(_),onPressArrowRight:S,onPressArrowLeft:C,style:F,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants",testID:"static-header"}))})()]})};function ct(e,t){const n=new(s())(e);return n.addMonths(t,!0),n.setDate(1),(0,T.toMarkingFormat)(n)}function dt(e,t=lt){const n=e||(new(s())).toString(),r=[];for(let a=-t;a<=t;a++){const e=ct(n,a);r.push(e)}return r}var ht=n(67063),ft=n.n(ht),pt=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function mt(e,t){return e===t||!(!pt(e)||!pt(t))}function gt(e,t){if(e.length!==t.length)return!1;for(var n=0;nthis.lastTimestamp){const n=e-this.lastPosition;(n>.001||n<-.001)&&this.history.push(n/(t-this.lastTimestamp))}this.lastPosition=e,this.lastTimestamp=t}estimateSpeed(){const e=this.history.slice(-3);return e.reduce(((e,t)=>e+t),0)/e.length}reset(){this.history=[],this.lastPosition=void 0,this.lastTimestamp=void 0}}const wt=c.memo((({firstDay:e,style:t})=>(0,C.weekDayNames)(e).map(((e,n)=>(0,f.jsx)(X.default,{allowFontScaling:!1,style:t,numberOfLines:1,accessibilityLabel:"",children:e},n))))),Ft=wt;function kt(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({container:{flexDirection:"row"},innerContainer:{flex:1},dayNum:{fontSize:28,fontWeight:"200",fontFamily:t.textDayFontFamily,color:t.agendaDayNumColor},dayText:{fontSize:14,fontWeight:t.textDayFontWeight,fontFamily:t.textDayFontFamily,color:t.agendaDayTextColor,backgroundColor:"rgba(0,0,0,0)",marginTop:-5},day:{width:63,alignItems:"center",justifyContent:"flex-start",marginTop:32},today:{color:t.agendaTodayColor},indicator:{marginTop:80}},e["stylesheet.agenda.list"]||{}))}class xt extends c.Component{static displayName="Reservation";static propTypes={date:i().any,item:i().any,theme:i().object,rowHasChanged:i().func,renderDay:i().func,renderItem:i().func,renderEmptyDate:i().func};constructor(e){super(e),this.style=kt(e.theme)}shouldComponentUpdate(e){const t=this.props.date,n=e.date,r=this.props.item,a=e.item;let i=!0;return t||n?t&&n&&(t.getTime()!==n.getTime()?i=!0:r||a?r&&a&&(!t&&!n||t&&n)&&ft()(this.props.rowHasChanged)&&(i=this.props.rowHasChanged(r,a)):i=!1):i=!1,i}renderDate(){const{item:e,date:t,renderDay:n}=this.props;if(ft()(n))return n(t,e);const r=t&&(0,C.isToday)(t)?this.style.today:void 0,a=ve().dayNamesShort;return t?(0,f.jsxs)(d.default,{style:this.style.day,testID:bt.RESERVATION_DATE,children:[(0,f.jsx)(X.default,{allowFontScaling:!1,style:[this.style.dayNum,r],children:t.getDate()}),(0,f.jsx)(X.default,{allowFontScaling:!1,style:[this.style.dayText,r],children:a?a[t.getDay()]:void 0})]}):(0,f.jsx)(d.default,{style:this.style.day})}render(){const{item:e,date:t,renderItem:n,renderEmptyDate:r}=this.props;let a;if(e){const r=!!t;ft()(n)&&(a=n(e,r))}else ft()(r)&&(a=r(t));return(0,f.jsxs)(d.default,{style:this.style.container,children:[this.renderDate(),(0,f.jsx)(d.default,{style:this.style.innerContainer,children:a})]})}}const At=xt;class St extends c.Component{static displayName="ReservationList";static propTypes=Object.assign({},At.propTypes,{items:i().object,selectedDay:i().instanceOf(s()),topDay:i().instanceOf(s()),onDayChange:i().func,showOnlySelectedDayItems:i().bool,renderEmptyData:i().func,onScroll:i().func,onScrollBeginDrag:i().func,onScrollEndDrag:i().func,onMomentumScrollBegin:i().func,onMomentumScrollEnd:i().func,refreshControl:i().element,refreshing:i().bool,onRefresh:i().func,reservationsKeyExtractor:i().func});static defaultProps={refreshing:!1,selectedDay:new(s())(!0)};list=c.createRef();constructor(e){super(e),this.style=kt(e.theme),this.state={reservations:[]},this.heights=[],this.selectedDay=e.selectedDay,this.scrollOver=!0}componentDidMount(){this.updateDataSource(this.getReservations(this.props).reservations)}componentDidUpdate(e){this.props.topDay&&e.topDay&&e!==this.props&&((0,C.sameDate)(e.topDay,this.props.topDay)?this.updateReservations(this.props):this.setState({reservations:[]},(()=>this.updateReservations(this.props))))}updateDataSource(e){this.setState({reservations:e})}updateReservations(e){const{selectedDay:t,showOnlySelectedDayItems:n}=e,r=this.getReservations(e);if(!n&&this.list&&!(0,C.sameDate)(t,this.selectedDay)){let e=0;for(let t=0;t({reservation:e,date:t?void 0:n}))):!!r&&[{date:e.clone()}]}getReservations(e){const{selectedDay:t,showOnlySelectedDayItems:n}=e;if(!e.items||!t)return{reservations:[],scrollPosition:0};let r=[];if(this.state.reservations&&this.state.reservations.length){const n=this.state.reservations[0].date?.clone();if(n)for(;n.getTime(){const t=e.nativeEvent.contentOffset.y;this.props.onScroll?.(t);let n,r=0;for(n=0;n=t);n++)r+=this.heights[n];const a=this.state.reservations[n];if(!a)return;const i=a.date;i&&!(0,C.sameDate)(i,this.selectedDay)&&this.scrollOver&&(this.selectedDay=i.clone(),this.props.onDayChange?.(i.clone()))};onListTouch(){this.scrollOver=!0}onRowLayoutChange(e,t){this.heights[e]=t.nativeEvent.layout.height}onMoveShouldSetResponderCapture=()=>(this.onListTouch(),!1);renderRow=({item:e,index:t})=>{const n=function(e){const{date:t,item:n,theme:r,rowHasChanged:a,renderDay:i,renderItem:o,renderEmptyDate:s}=e;return{date:t,item:n,theme:r,rowHasChanged:a,renderDay:i,renderItem:o,renderEmptyDate:s}}(this.props);return(0,f.jsx)(d.default,{onLayout:this.onRowLayoutChange.bind(this,t),children:(0,f.jsx)(At,Object.assign({},n,{item:e.reservation,date:e.date}))})};keyExtractor=(e,t)=>this.props.reservationsKeyExtractor?.(e,t)||`${e?.reservation?.day}${t}`;render(){const{items:e,selectedDay:t,theme:n,style:r}=this.props;return!e||t&&!e[(0,T.toMarkingFormat)(t)]?ft()(this.props.renderEmptyData)?this.props.renderEmptyData?.():(0,f.jsx)(G.default,{style:this.style.indicator,color:n?.indicatorColor}):(0,f.jsx)(We.default,{ref:this.list,style:r,contentContainerStyle:this.style.content,data:this.state.reservations,renderItem:this.renderRow,keyExtractor:this.keyExtractor,showsVerticalScrollIndicator:!1,scrollEventThrottle:200,onMoveShouldSetResponderCapture:this.onMoveShouldSetResponderCapture,onScroll:this.onScroll,refreshControl:this.props.refreshControl,refreshing:this.props.refreshing,onRefresh:this.props.onRefresh,onScrollBeginDrag:this.props.onScrollBeginDrag,onScrollEndDrag:this.props.onScrollEndDrag,onMomentumScrollBegin:this.props.onMomentumScrollBegin,onMomentumScrollEnd:this.props.onMomentumScrollEnd})}}const Et=St,Ct=104;class Tt extends c.Component{static displayName="Agenda";static propTypes=Object.assign({},Qe.propTypes,Et.propTypes,{items:i().object,style:i().oneOfType([i().object,i().array,i().number]),loadItemsForMonth:i().func,onCalendarToggled:i().func,onDayChange:i().func,renderKnob:i().func,renderList:i().func,selected:i().any,hideKnob:i().bool,showClosingKnob:i().bool});scrollPad=c.createRef();calendar=c.createRef();knob=c.createRef();list=c.createRef();constructor(e){super(e),this.style=function(e={}){const t=Object.assign({},W,e),{knob:n,weekdays:r}=function(e){return{knob:{width:38,height:7,marginTop:10,borderRadius:3,backgroundColor:e.agendaKnobColor},weekdays:{position:"absolute",left:0,right:0,top:0,flexDirection:"row",justifyContent:"space-between",paddingLeft:24,paddingRight:24,paddingTop:15,paddingBottom:7,backgroundColor:e.calendarBackground}}}(t);return U.default.create(Object.assign({container:{flex:1,overflow:"hidden"},animatedContainer:{flex:1},knob:n,weekdays:r,header:{overflow:"hidden",justifyContent:"flex-end",position:"absolute",height:"100%",width:"100%"},knobContainer:{flex:1,position:"absolute",left:0,right:0,height:24,bottom:0,alignItems:"center",backgroundColor:t.calendarBackground},dayHeader:{width:32,textAlign:"center",fontSize:t.textDayHeaderFontSize,fontFamily:t.textDayHeaderFontFamily,fontWeight:t.textDayHeaderFontWeight,color:t.textSectionTitleColor},reservations:{flex:1,marginTop:104,backgroundColor:t.reservationsBackgroundColor||t.backgroundColor},scrollPadStyle:{position:"absolute",width:"100%",alignSelf:"center"}},e["stylesheet.agenda.main"]||{}))}(e.theme);const t=b.default.get("window");this.viewHeight=t.height,this.viewWidth=t.width,this.scrollTimeout=void 0,this.headerState="idle",this.state={scrollY:new _t.default.Value(0),calendarIsReady:!1,calendarScrollable:!1,firstReservationLoad:!1,selectedDay:this.getSelectedDate(e.selected),topDay:this.getSelectedDate(e.selected)},this.currentMonth=this.state.selectedDay.clone(),this.knobTracker=new vt,this.state.scrollY.addListener((({value:e})=>this.knobTracker.add(e)))}componentDidMount(){this._isMounted=!0,this.loadReservations(this.props)}componentWillUnmount(){this._isMounted=!1,this.state.scrollY.removeAllListeners()}componentDidUpdate(e,t){const n=this.getSelectedDate(this.props.selected);if((0,C.sameDate)(n,t.selectedDay))e.items||this.loadReservations(this.props);else{const t=this.getSelectedDate(e.selected);(0,C.sameDate)(n,t)||(this.setState({selectedDay:n}),this.calendar?.current?.scrollToDay(n,this.calendarOffset(),!0))}}static getDerivedStateFromProps(e){return e.items?{firstReservationLoad:!1}:null}getSelectedDate(e){return e?new(s())(e):new(s())(!0)}calendarOffset(){return 96-this.viewHeight/2}initialScrollPadPosition=()=>Math.max(0,this.viewHeight-Ct);setScrollPadPosition=(e,t)=>{this.scrollPad?.current?.scrollTo?this.scrollPad.current.scrollTo({x:0,y:e,animated:t}):this.scrollPad?.current?.getNode().scrollTo({x:0,y:e,animated:t})};toggleCalendarPosition=e=>{const t=this.initialScrollPadPosition();this.setScrollPadPosition(e?0:t,!0),this.enableCalendarScrolling(e)};enableCalendarScrolling(e=!0){this.setState({calendarScrollable:e}),this.props.onCalendarToggled?.(e),this.calendar?.current?.scrollToDay(this.state.selectedDay,this.calendarOffset()+1,!0)}loadReservations(e){e.items&&Object.keys(e.items).length||this.state.firstReservationLoad||this.setState({firstReservationLoad:!0},(()=>{this.props.loadItemsForMonth?.((0,T.xdateToData)(this.state.selectedDay))}))}onDayPress=e=>{this.chooseDay(e,!this.state.calendarScrollable)};chooseDay(e,t){const n=new(s())(e.dateString);this.setState({calendarScrollable:!1,selectedDay:n.clone()}),this.props.onCalendarToggled?.(!1),t||this.setState({topDay:n.clone()}),this.setScrollPadPosition(this.initialScrollPadPosition(),!0),this.calendar?.current?.scrollToDay(n,this.calendarOffset(),!0),this.props.loadItemsForMonth?.((0,T.xdateToData)(n)),this.props.onDayPress?.((0,T.xdateToData)(n))}generateMarkings=yt(((e,t,n)=>{t||(t={},n&&Object.keys(n).forEach((e=>{n[e]&&n[e].length&&(t[e]={marked:!0})})));const r=(0,T.toMarkingFormat)(e);return Object.assign({},t,{[r]:Object.assign({},t[r]||{},{selected:!0})})}));onScrollPadLayout=()=>{this.setScrollPadPosition(this.initialScrollPadPosition(),!1),setTimeout((()=>this.setState({calendarIsReady:!0})),0)};onCalendarListLayout=()=>{this.calendar?.current?.scrollToDay(this.state.selectedDay,this.calendarOffset(),!1)};onLayout=e=>{this.viewHeight=e.nativeEvent.layout.height,this.viewWidth=e.nativeEvent.layout.width,this.forceUpdate()};onTouchStart=()=>{this.headerState="touched",this.knob?.current?.setNativeProps({style:{opacity:.5}})};onTouchEnd=()=>{if(this.knob?.current?.setNativeProps({style:{opacity:1}}),"touched"===this.headerState){const e=this.state.calendarScrollable;this.toggleCalendarPosition(!e)}this.headerState="idle"};onStartDrag=()=>{this.headerState="dragged",this.knobTracker.reset()};onSnapAfterDrag=e=>{this.onTouchEnd();const t=e.nativeEvent.contentOffset.y;this.knobTracker.add(t);const n=t+250*this.knobTracker.estimateSpeed(),r=this.initialScrollPadPosition(),a=n>r/2?r:0;this.setScrollPadPosition(a,!0),this.enableCalendarScrolling(0===a)};onVisibleMonthsChange=e=>{this.props.onVisibleMonthsChange?.(e),this.props.items&&!this.state.firstReservationLoad&&(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{this._isMounted&&this.props.loadItemsForMonth?.(e[0])}),200))};onDayChange=e=>{const t=(0,C.sameMonth)(e,this.state.selectedDay);this.calendar?.current?.scrollToDay(e,this.calendarOffset(),t),this.setState({selectedDay:e}),this.props.onDayChange?.((0,T.xdateToData)(e))};renderReservations(){const e=function(e){const{items:t,selectedDay:n,topDay:r,onDayChange:a,showOnlySelectedDayItems:i,renderEmptyData:o,onScroll:s,onScrollBeginDrag:l,onScrollEndDrag:u,onMomentumScrollBegin:c,onMomentumScrollEnd:d,refreshControl:h,refreshing:f,onRefresh:p,reservationsKeyExtractor:m,date:g,item:y,theme:_,rowHasChanged:b,renderDay:v,renderItem:w,renderEmptyDate:F}=e;return{items:t,selectedDay:n,topDay:r,onDayChange:a,showOnlySelectedDayItems:i,renderEmptyData:o,onScroll:s,onScrollBeginDrag:l,onScrollEndDrag:u,onMomentumScrollBegin:c,onMomentumScrollEnd:d,refreshControl:h,refreshing:f,onRefresh:p,reservationsKeyExtractor:m,date:g,item:y,theme:_,rowHasChanged:b,renderDay:v,renderItem:w,renderEmptyDate:F}}(this.props);return ft()(this.props.renderList)?this.props.renderList(Object.assign({},e,{selectedDay:this.state.selectedDay,topDay:this.state.topDay,onDayChange:this.onDayChange})):(0,f.jsx)(Et,Object.assign({},e,{ref:this.list,selectedDay:this.state.selectedDay,topDay:this.state.topDay,onDayChange:this.onDayChange}))}renderCalendarList(){const{markedDates:e,items:t}=this.props,n=!!this.state.calendarScrollable&&this.props.hideExtraDays,r=(a=this.props,(0,R.default)(a,N));var a;return(0,f.jsx)(Qe,Object.assign({},r,{ref:this.calendar,current:be(this.currentMonth.toString()),markedDates:this.generateMarkings(this.state.selectedDay,e,t),calendarWidth:this.viewWidth,scrollEnabled:this.state.calendarScrollable,hideExtraDays:n,onLayout:this.onCalendarListLayout,onDayPress:this.onDayPress,onVisibleMonthsChange:this.onVisibleMonthsChange}))}renderKnob(){const{showClosingKnob:e,hideKnob:t,renderKnob:n}=this.props;let r=(0,f.jsx)(d.default,{style:this.style.knobContainer});if(!t){const t=n?n():(0,f.jsx)(d.default,{style:this.style.knob});r=!this.state.calendarScrollable||e?(0,f.jsx)(d.default,{style:this.style.knobContainer,children:(0,f.jsx)(d.default,{ref:this.knob,children:t})}):null}return r}renderWeekDaysNames=()=>(0,f.jsx)(Ft,{firstDay:this.props.firstDay,style:this.style.dayHeader});renderWeekNumbersSpace=()=>this.props.showWeekNumbers&&(0,f.jsx)(d.default,{style:this.style.dayHeader});render(){const{hideKnob:e,style:t,testID:n}=this.props,r=this.initialScrollPadPosition(),a=[this.style.weekdays,{opacity:this.state.scrollY.interpolate({inputRange:[r-Ct,r],outputRange:[0,1],extrapolate:"clamp"}),transform:[{translateY:this.state.scrollY.interpolate({inputRange:[Math.max(0,r-Ct),r],outputRange:[-104,0],extrapolate:"clamp"})}]}],i=this.state.scrollY.interpolate({inputRange:[0,r],outputRange:[r,0],extrapolate:"clamp"}),o=this.state.scrollY.interpolate({inputRange:[0,r],outputRange:[0,r/2],extrapolate:"clamp"}),s=[this.style.header,{bottom:r,transform:[{translateY:i}]}];this.state.calendarIsReady||(s.push({height:0}),a.push({height:Ct}));const l=!e&&this.state.calendarScrollable&&this.props.showClosingKnob?r+Ct:0,u={height:24,top:(!e&&!this.state.calendarScrollable?Ct:l)-24};return(0,f.jsxs)(d.default,{testID:n,onLayout:this.onLayout,style:[t,this.style.container],children:[(0,f.jsx)(d.default,{style:this.style.reservations,children:this.renderReservations()}),(0,f.jsxs)(_t.default.View,{style:s,children:[(0,f.jsx)(_t.default.View,{style:[this.style.animatedContainer,{transform:[{translateY:o}]}],children:this.renderCalendarList()}),this.renderKnob()]}),(0,f.jsxs)(_t.default.View,{style:a,children:[this.renderWeekNumbersSpace(),this.renderWeekDaysNames()]}),(0,f.jsx)(_t.default.ScrollView,{ref:this.scrollPad,style:[this.style.scrollPadStyle,u],overScrollMode:"never",showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,scrollEventThrottle:8,scrollsToTop:!1,onTouchStart:this.onTouchStart,onTouchEnd:this.onTouchEnd,onScrollBeginDrag:this.onStartDrag,onScrollEndDrag:this.onSnapAfterDrag,onScroll:_t.default.event([{nativeEvent:{contentOffset:{y:this.state.scrollY}}}],{useNativeDriver:!0}),children:(0,f.jsx)(d.default,{testID:bt.AGENDA_CALENDAR_KNOB,style:{height:r+24},onLayout:this.onScrollPadLayout})})]})}}var Dt=n(77337),It=n.n(Dt),Ot=n(59315),Pt=n.n(Ot),Mt=n(77900);function Rt(e={}){const t=Object.assign({},W,e);return U.default.create(Object.assign({containerShadow:Object.assign({backgroundColor:t.calendarBackground},void 0),containerWrapper:{paddingBottom:6},container:{backgroundColor:t.calendarBackground},knobContainer:{position:"absolute",left:0,right:0,height:24,bottom:0,alignItems:"center",justifyContent:"center",backgroundColor:t.calendarBackground},knob:{width:40,height:4,borderRadius:3,backgroundColor:t.expandableKnobColor},sectionText:{fontWeight:"bold",fontSize:12,lineHeight:16,color:"#7a92a5",paddingTop:24,paddingBottom:8,paddingLeft:20,paddingRight:20,backgroundColor:t.calendarBackground,textAlign:"left",textTransform:"uppercase"},header:{position:"absolute",left:0,right:0,backgroundColor:t.calendarBackground},headerTitle:{alignSelf:"center",paddingTop:13,paddingBottom:18,fontSize:t.textMonthFontSize,fontFamily:t.textMonthFontFamily,fontWeight:t.textMonthFontWeight,color:t.monthTextColor},weekDayNames:{flexDirection:"row",justifyContent:"space-between"},dayHeader:{width:32,textAlign:"center",fontSize:t.textDayHeaderFontSize,fontFamily:t.textDayHeaderFontFamily,fontWeight:t.textDayHeaderFontWeight,color:t.textSectionTitleColor},monthView:{backgroundColor:t.calendarBackground},weekContainer:{position:"absolute",left:0,right:0,top:68+(E.isAndroid?8:9)},hidden:{opacity:0},visible:{opacity:1},weekCalendar:{marginTop:12,marginBottom:-2},week:{marginTop:7,marginBottom:7,paddingRight:15,paddingLeft:15,flexDirection:"row",justifyContent:"space-around"},partialWeek:{paddingRight:0},dayContainer:{flex:1,alignItems:"center"},emptyDayContainer:{flex:1},arrowImage:{tintColor:t.arrowColor,transform:E.isRTL?[{scaleX:-1}]:void 0},contextWrapper:{flex:1},todayButtonContainer:{alignItems:"right"===t.todayButtonPosition?"flex-end":"flex-start",position:"absolute",left:20,right:20,bottom:0},todayButton:Object.assign({height:E.isTablet?40:28,paddingHorizontal:E.isTablet?20:12,borderRadius:E.isTablet?20:14,flexDirection:"right"===t.todayButtonPosition?"row-reverse":"row",justifyContent:"center",alignItems:"center",backgroundColor:"white"},void 0),todayButtonText:{color:t.todayButtonTextColor,fontSize:E.isTablet?t.todayButtonFontSize+2:t.todayButtonFontSize,fontWeight:t.todayButtonFontWeight,fontFamily:t.todayButtonFontFamily},todayButtonImage:{tintColor:t.todayButtonTextColor,marginLeft:"right"===t.todayButtonPosition?7:void 0,marginRight:"right"===t.todayButtonPosition?void 0:7}},e?.stylesheet?.expandable?.main||{}))}const Lt=["context","markedDates"],Nt=["context","markedDates"];const Bt=c.memo((e=>{const{theme:t,current:n,firstDay:r,hideExtraDays:a,markedDates:i,onDayPress:o,onDayLongPress:l,style:u,numberOfDays:h=1,timelineLeftInset:p,testID:m}=e,g=(0,c.useRef)(Rt(t)),y=(0,c.useMemo)((()=>!!h&&h>1),[h]),_=(0,c.useCallback)((e=>{if(e)return(0,C.getWeekDates)(e,r)}),[r]),b=(0,c.useMemo)((()=>[g.current.partialWeek,{paddingLeft:p}]),[p]),v=B(e),w=(0,c.useMemo)((()=>(0,T.parseDate)(n)),[n]);return(0,f.jsx)(d.default,{style:g.current.container,testID:`${m}.week_${n}`,children:(0,f.jsx)(d.default,{style:[g.current.week,h>1?b:void 0,u],children:(()=>{const t=h>1?(0,C.getPartialWeekDates)(n,h):_(n),r=[];if(t){const u=t?.indexOf((0,T.parseDate)(new Date))||-1,c=t.slice(u,h);(h>1&&u>-1?c:t).forEach(((t,u)=>{const c=t instanceof s()?t:new(s())(t);r.push(((t,r)=>{if(n&&a&&!(0,C.sameMonth)(t,w))return(0,f.jsx)(d.default,{style:g.current.emptyDayContainer},r);const s=(0,T.toMarkingFormat)(t);return(0,f.jsx)(d.default,{style:g.current.dayContainer,children:(0,f.jsx)(Ne,Object.assign({},v,{testID:`${m}.day_${s}`,date:s,state:M(t,w,e,y),marking:y?Object.assign({},i?.[s],{disableTouchEvent:!0}):i?.[s],onPress:o,onLongPress:l}))},r)})(c,u))}),void 0)}return r})()})})}),(function(e,t){const{context:n,markedDates:r}=e,a=(0,R.default)(e,Lt),{context:i,markedDates:o}=t,s=(0,R.default)(t,Nt);return ie()(n,i)&&ie()(r,o)&&ie()(a,s)})),jt=Bt;Bt.displayName="Week";const Vt="today";var zt;!function(e){e.CALENDAR_INIT="calendarInit",e.TODAY_PRESS="todayPress",e.LIST_DRAG="listDrag",e.DAY_PRESS="dayPress",e.PAGE_SCROLL="pageScroll",e.WEEK_SCROLL="weekScroll",e.PROP_UPDATE="propUpdate"}(zt||(zt={}));const Ht=c.createContext({}),Ut=["allowShadow"],Wt=["style","onDayPress","firstDay"],qt=e=>{const{calendarWidth:t,hideDayNames:n,current:r,theme:a,testID:i,markedDates:o}=e,s=(0,c.useContext)(Ht),{allowShadow:l=!0}=e,u=V((0,R.default)(e,Ut)),{style:h,onDayPress:p,firstDay:m=0}=u,g=(0,R.default)(u,Wt),{date:y,numberOfDays:_,updateSource:b,setDate:v,timelineLeftInset:w}=s,F=(0,c.useRef)(y),k=(0,c.useRef)(Rt(a)),x=(0,c.useRef)($t(r??y,m,_)),[A,S]=(0,c.useState)(x.current),D=(0,c.useRef)(E.isRTL),I=(0,c.useRef)(null),O=(0,c.useRef)(6);z((()=>{x.current=$t(y,m,_),S(x.current),F.current=y,I?.current?.scrollToIndex({index:6,animated:!1})}),[_]),z((()=>{if(b!==zt.WEEK_SCROLL){const e=x.current.findIndex((e=>Yt(_)?(0,C.onSameDateRange)({firstDay:e,secondDay:y,numberOfDays:_,firstDateInRange:e}):(0,C.sameWeek)(e,y,m)));if(e!==O.current){const t=E.isAndroidRTL&&!E.isRN73()?12-e:e;e>=0?(F.current=x.current[t],O.current=t):(F.current=y,O.current=6),e<=0?$():I?.current?.scrollToIndex({index:t,animated:!1})}}}),[y,b]);const P=(0,c.useMemo)((()=>t??E.screenWidth),[t]),M=(0,c.useCallback)((e=>{p?p(e):v?.(e.dateString,zt.DAY_PRESS)}),[p]),L=(0,c.useCallback)(((e,t)=>{if(!t)return;const n=(0,C.getWeekDates)(e,m);return n?.reduce(((e,n)=>{const r=(0,T.toMarkingFormat)(n);return Object.assign({},e,t[r]&&{[r]:t[r]})}),{})}),[]),N=(0,c.useMemo)((()=>[{width:P},h]),[P,h]),B=(0,c.useCallback)((({item:e})=>{const t=(0,C.sameWeek)(y,e,m)?s:void 0,n=L(e,o);return(0,f.jsx)(jt,Object.assign({},g,{markedDates:n,current:e,firstDay:m,style:N,context:t,onDayPress:M,numberOfDays:_,timelineLeftInset:w}))}),[m,M,s,y,o]),j=(0,c.useCallback)((e=>e),[]),H=(0,c.useMemo)((()=>(0,f.jsx)(Ft,{firstDay:m,style:k.current.dayHeader})),[m]),U=(0,c.useMemo)((()=>[l&&k.current.containerShadow,!n&&k.current.containerWrapper]),[l,n]),W=(0,c.useMemo)((()=>[k.current.week,k.current.weekCalendar]),[]),q=(0,c.useCallback)(((e,t)=>({length:P,offset:P*t,index:t})),[P]),$=(0,c.useCallback)((()=>{D.current=!0,x.current=$t(F.current,m,_),S(x.current),O.current=6,I?.current?.scrollToIndex({index:6,animated:!1})}),[m,_]),Y=(0,c.useCallback)((({viewableItems:e})=>{if(D.current||0===e.length)return void(D.current=!1);const t=x.current,n=e[0]?.item;if(n!==F.current)if(E.isAndroidRTL){const e=-1*(6-t.indexOf(n)),r=t[6-e];F.current=r,O.current=t.indexOf(r),v(r,zt.WEEK_SCROLL),F.current===t[t.length-1]&&$()}else O.current=t.indexOf(n),F.current=n,v(n,zt.WEEK_SCROLL),F.current===t[0]&&$()}),[$]),G=(0,c.useRef)([{viewabilityConfig:{itemVisiblePercentThreshold:20},onViewableItemsChanged:Y}]);return(0,f.jsxs)(d.default,{testID:i,style:U,children:[!n&&(0,f.jsx)(d.default,{style:W,children:H}),(0,f.jsx)(d.default,{style:k.current.container,children:(0,f.jsx)(We.default,{testID:`${i}.list`,ref:I,style:k.current.container,data:A,horizontal:!0,showsHorizontalScrollIndicator:!1,pagingEnabled:!0,scrollEnabled:!0,renderItem:B,keyExtractor:j,initialScrollIndex:6,getItemLayout:q,viewabilityConfigCallbackPairs:G.current,onEndReached:$,onEndReachedThreshold:1/13})})]})};function $t(e,t,n){return[...Array(13).keys()].map((r=>Yt(n)?function(e,t,n){const r=new(s())(e);return 0!==t&&r.addDays(n*t),(0,T.toMarkingFormat)(r)}(e,r-6,n):function(e,t,n,r){const a=new(s())(e);let i=a.getDay();i0&&(i=7+i),0!==n&&a.addDays(t-i);const o=r&&r>1?a.addDays(n*r):a.addWeeks(n),l=new(s()),u=o.diffDays(l),c=u>0&&u<(r??7);return(0,T.toMarkingFormat)(c?l:o)}(e,t,r-6)))}function Yt(e){return e&&e>1}qt.displayName="WeekCalendar";const Gt=qt,Xt=["initialPosition","onCalendarToggled","disablePan","hideKnob","leftArrowImageSource","rightArrowImageSource","allowShadow","disableWeekScroll","openThreshold","closeThreshold","closeOnDayPress","horizontal","calendarStyle","theme","style","firstDay","onDayPress","hideArrows","onPressArrowLeft","onPressArrowRight","renderArrow","testID"];var Kt;!function(e){e.CLOSED="closed",e.OPEN="open"}(Kt||(Kt={}));const Jt=70,Zt=n(9849),Qt=n(34229),en={left:10,right:10,top:10,bottom:10},tn={stylesheet:{calendar:{header:{week:{marginTop:7,marginBottom:-4,flexDirection:"row",justifyContent:"space-around"}}}}},nn=e=>{const{date:t,setDate:n,numberOfDays:r,timelineLeftInset:a}=(0,c.useContext)(Ht),{initialPosition:i=Kt.CLOSED,onCalendarToggled:o,disablePan:l,hideKnob:u=r&&r>1,leftArrowImageSource:p=Zt,rightArrowImageSource:m=Qt,allowShadow:g=!0,disableWeekScroll:y,openThreshold:_=Jt,closeThreshold:b=Jt,closeOnDayPress:v=!0,horizontal:w=!0,calendarStyle:F,theme:k,style:x,firstDay:A=0,onDayPress:S,hideArrows:D,onPressArrowLeft:I,onPressArrowRight:O,renderArrow:P,testID:M}=e,L=(0,R.default)(e,Xt),[N,B]=(0,c.useState)(!1),j=e=>new(s())(e).getFullYear(),V=e=>new(s())(e).getMonth()+1,z=(0,c.useRef)(V(t)),H=(0,c.useRef)(j(t));(0,c.useEffect)((()=>{xe(t)}),[t]);const U=e=>(0,C.page)(new(s())(e),A).length/7,W=(0,c.useRef)(U(t)),[q,$]=(0,c.useState)(r?Kt.CLOSED:i),Y=q===Kt.OPEN,G=()=>w?120+46*(W.current-1)+(u?100:24)+(E.isAndroid?3:0):Math.max(E.screenHeight,E.screenWidth),Z=(0,c.useRef)(G()),Q=(0,c.useMemo)((()=>120+(u||Number(r)>1?0:24)),[r,u]),ee=(0,c.useMemo)((()=>Y?Z.current:Q),[Q,Y]),te=(0,c.useRef)(ee),ne=(0,c.useMemo)((()=>new _t.default.Value(ee)),[ee]),re=(0,c.useRef)(new _t.default.Value(Y?-68:0));(0,c.useEffect)((()=>{te.current=ee,ne.setValue(ee)}),[ee]),(0,c.useEffect)((()=>{r&&$(Kt.CLOSED)}),[r]);const ae=(0,c.useRef)(),ie=(0,c.useRef)(),oe=(0,c.useRef)(),se=(0,c.useRef)(),le=(0,c.useRef)(Rt(k)),ue=Object.assign(tn,k),ce=(0,c.useRef)({style:{height:ee}}),de={style:{top:Y?-68:0}},he={style:{opacity:Y?0:1}},fe=!w||(D||!1),pe=()=>{ae?.current?.setNativeProps(ce.current),w?se?.current?.setNativeProps(he):oe?.current?.setNativeProps(de)},ge=(0,c.useMemo)((()=>{const e=F?.paddingLeft,t=F?.paddingRight;return[le.current.weekDayNames,{paddingLeft:me()(e)?e+6:2,paddingRight:me()(t)?t+6:2}]}),[F]),ye=(0,c.useMemo)((()=>[le.current.header,{height:78,top:re.current}]),[re.current]),_e=(0,c.useMemo)((()=>[le.current.weekContainer,Y?le.current.hidden:le.current.visible]),[Y]),be=(0,c.useMemo)((()=>[g&&le.current.containerShadow,x]),[g,x]),ve=(0,c.useMemo)((()=>({height:ne})),[ne]),we=(0,c.useMemo)((()=>{if(r&&r>1)return{paddingHorizontal:0}}),[r]),Fe=(0,c.useMemo)((()=>[we,e.headerStyle]),[e.headerStyle,we]);(0,c.useEffect)((()=>{Mt.default&&(Mt.default.isScreenReaderEnabled?Mt.default.isScreenReaderEnabled().then(ke):Mt.default.fetch&&Mt.default.fetch().then(ke))}),[]);const ke=e=>{B(e)},xe=e=>{w?j(e)===H.current&&V(e)===z.current||ie?.current?.scrollToMonth(e):ie?.current?.scrollToDay(e,0,!0)},Ae=(0,c.useCallback)((e=>{if(w){const a=(0,T.parseDate)(t);if(Y)a.setDate(1),a.addMonths(e?1:-1);else{let t=a.getDay();if(t0&&(t=7+t),r){const t=r<=1?7:r;a.addDays(e?t:-t)}else{const n=(e?7:-7)-t+A;a.addDays(n)}}n?.((0,T.toMarkingFormat)(a),zt.PAGE_SCROLL)}}),[w,Y,A,r,n,t]),Se=(e,t)=>!l&&(!(!w&&Y)&&(!(!Y&&t.dy<0)&&(t.dy>5||t.dy<-5))),Ee=(e,t)=>{ce.current.style.height=Math.min(Math.max(Q,te.current+t.dy),Z.current),w?Y?t.dy<0&&(he.style.opacity=Math.max(0,Math.min(Math.abs(t.dy/200),1))):he.style.opacity=Math.min(1,Math.max(1-t.dy/100,0)):de.style.top=Math.min(Math.max(-t.dy,-68),0),pe()},Ce=()=>{te.current=Number(ce.current.style.height),Ie()},Te=(0,c.useMemo)((()=>!r||r&&r<=1),[r]),De=(0,c.useMemo)((()=>Te?h.default.create({onMoveShouldSetPanResponder:Se,onPanResponderMove:Ee,onPanResponderRelease:Ce,onPanResponderTerminate:Ce}):h.default.create({})),[r,q]),Ie=(e=0)=>{if(!l){const t=Y?Z.current-b:Q+_;let n=te.current>=t;const r=n?Z.current:Q;ne.setValue(te.current),te.current=e||r,n=te.current>=t,Oe(n),_t.default.spring(ne,{toValue:te.current,speed:20,bounciness:6,useNativeDriver:!1}).start((()=>{o?.(n),$((()=>te.current===Q?Kt.CLOSED:Kt.OPEN))})),Pe(n)}},Oe=async e=>{he.style.opacity=e?0:1,pe()},Pe=e=>{re.current.setValue(Number(de.style.top)),w||e||_t.default.spring(re.current,{toValue:0,speed:2,bounciness:1,useNativeDriver:!1}).start()},Me=(0,c.useCallback)((()=>{setTimeout((()=>{Y&&Ie(Q)}),0)}),[Y,Q]),Re=(0,c.useCallback)((()=>{Ie(Y?Q:Z.current)}),[Y,Ie,Q]),Le=(0,c.useCallback)(((e,t)=>{I?.(e,t),Ae(!1)}),[I,Ae]),Ne=(0,c.useCallback)(((e,t)=>{O?.(e,t),Ae(!0)}),[O,Ae]),Be=(0,c.useCallback)((e=>{Te&&n?.(e.dateString,zt.DAY_PRESS),v&&Me(),S?.(e)}),[S,v,Me,Te]),je=(0,c.useCallback)(Pt()((e=>{const n=It()(e);if(n){const e=n.month;if(e&&z.current!==e){z.current=e;const r=n.year;if(r&&(H.current=r),z.current!==V(t)){const e=((e,t)=>{if(e&&t){if(e.year>j(t))return!0;if(e.year===j(t)&&e.month>V(t))return!0}return!1})(n,t);Ae(e)}setTimeout((()=>{const e=U(n.dateString);e!==W.current&&(W.current=e,Z.current=G(),Y&&Ie(Z.current))}),0)}}}),100,{trailing:!0,leading:!1}),[t,Ae]),Ve=(0,c.useCallback)((e=>ft()(P)?P(e):(0,f.jsx)(J.default,{source:"right"===e?m:p,style:le.current.arrowImage,testID:`${M}.${e}Arrow`})),[P,m,p,M]);return(0,f.jsx)(d.default,{testID:M,style:be,children:N?(0,f.jsx)(ze,Object.assign({testID:`${M}.calendarAccessible`},L,{theme:ue,onDayPress:Be,hideExtraDays:!0,renderArrow:Ve})):(0,f.jsxs)(_t.default.View,Object.assign({testID:`${M}.expandableContainer`,ref:ae,style:ve},De.panHandlers,{children:[(0,f.jsx)(Qe,Object.assign({testID:`${M}.calendarList`,horizontal:w,firstDay:A,calendarStyle:F},L,{current:t,theme:ue,ref:ie,onDayPress:Be,onVisibleMonthsChange:je,pagingEnabled:!0,scrollEnabled:Y,hideArrows:fe,onPressArrowLeft:Le,onPressArrowRight:Ne,hideExtraDays:!w&&Y,renderArrow:Ve,staticHeader:!0,numberOfDays:r,headerStyle:Fe,timelineLeftInset:a,context:(0,c.useContext)(Ht)})),(()=>{const e=y?jt:Gt;return(0,f.jsx)(_t.default.View,{ref:se,style:_e,pointerEvents:Y?"none":"auto",children:(0,f.jsx)(e,Object.assign({testID:`${M}.weekCalendar`,firstDay:A},L,{allowShadow:!!y&&void 0,current:y?t:void 0,theme:ue,style:F,hideDayNames:!0,onDayPress:Be,accessibilityElementsHidden:!0,importantForAccessibility:"no-hide-descendants"}))})})(),!u&&(0,f.jsx)(d.default,{style:le.current.knobContainer,pointerEvents:"box-none",children:(0,f.jsx)(K.default,{style:le.current.knob,testID:`${M}.knob`,onPress:Re,hitSlop:en})}),!w&&(()=>{const e=new(s())(t)?.toString("MMMM yyyy");return(0,f.jsxs)(_t.default.View,{ref:oe,style:ye,pointerEvents:"none",children:[(0,f.jsx)(X.default,{allowFontScaling:!1,style:le.current.headerTitle,children:e}),(0,f.jsx)(d.default,{style:ge,children:(0,f.jsx)(Ft,{firstDay:A,style:le.current.dayHeader})})]})})()]}))})},rn=nn;nn.displayName="ExpandableCalendar",nn.defaultProps={horizontal:!0,initialPosition:Kt.CLOSED,firstDay:0,leftArrowImageSource:Zt,rightArrowImageSource:Qt,allowShadow:!0,openThreshold:Jt,closeThreshold:Jt,closeOnDayPress:!0},nn.positions=Kt;var an=n(20454);const on=["allowShadow"],sn=48,ln=e=>{const{current:t,firstDay:n=0,markedDates:r,allowShadow:a=!0,hideDayNames:i,theme:o,calendarWidth:s,calendarHeight:l=sn,testID:u}=e,h=(0,c.useContext)(Ht),{date:p,updateSource:m}=h,g=(0,c.useRef)(Rt(o)),y=(0,c.useRef)(),[_,b]=(0,c.useState)(cn(t||p,n,50)),v={current:t,date:h.date,firstDay:n},w=s||E.screenWidth,F=(0,c.useMemo)((()=>[{width:w},e.style]),[w,e.style]);(0,c.useEffect)((()=>{if(m!==zt.WEEK_SCROLL){const e=_.findIndex((e=>(0,C.sameWeek)(e,p,n)));y.current?.scrollToOffset?.(e*w,0,!1)}}),[p]);const k=(0,c.useCallback)((t=>{h.setDate?.(t.dateString,zt.DAY_PRESS),e.onDayPress?.(t)}),[e.onDayPress]),x=(0,c.useCallback)(((e,t,{scrolledByUser:n})=>{n&&h?.setDate(_[e],zt.WEEK_SCROLL)}),[_]),A=(0,c.useCallback)((e=>{const t=_[e];b(cn(t,n,50))}),[_]),S=(0,c.useCallback)(((t,a)=>{const i=V((0,R.default)(e,on)),o=Object.assign({},((0,an.default)(i),i)),s=(0,C.sameWeek)(a,p,n);return(0,c.createElement)(jt,Object.assign({},o,{key:a,current:s?p:a,firstDay:n,style:F,markedDates:r,onDayPress:k,context:h}))}),[p,r]);return(0,f.jsxs)(d.default,{testID:u,style:[a&&g.current.containerShadow,!i&&g.current.containerWrapper],children:[!i&&(0,f.jsx)(d.default,{style:[g.current.week,g.current.weekCalendar],children:(0,f.jsx)(Ft,{firstDay:n,style:g.current.dayHeader})}),(0,f.jsx)(d.default,{children:(0,f.jsx)(st,{isHorizontal:!0,ref:y,data:_,renderItem:S,reloadPages:A,onReachNearEdgeThreshold:Math.round(20),extendedState:v,style:g.current.container,initialPageIndex:50,pageHeight:l,pageWidth:w,onPageChange:x,scrollViewProps:{showsHorizontalScrollIndicator:!1}},"week-list")})]})};function un(e,t,n){const r=new(s())(e);let a=r.getDay();a0&&(a=7+a);const i=(0===n?r:r.addDays(t-a)).addWeeks(n);return(0,T.toMarkingFormat)(i)}function cn(e,t,n=50){const r=[];for(let a=-n;a<=n;a++){const n=un(e,t,a);r.push(n)}return r}var dn=n(52555),hn=n.n(dn),fn=n(4521),pn=n.n(fn),mn=n(90494);let gn;const yn=()=>{if(!gn)try{gn=n(99164)}catch{}return gn};var _n=n(18791);const bn=c.memo((e=>(0,f.jsx)(X.default,{allowFontScaling:!1,style:e.style,onLayout:e.onLayout,children:e.title})),(function(e,t){return ie()(e.style,t.style)&&e.title===t.title})),vn=["theme","sections","scrollToNextEvent","avoidDateUpdates","onScroll","renderSectionHeader","sectionStyle","dayFormatter","dayFormat","useMoment","markToday","infiniteListProps","renderItem","onEndReached","onEndReachedThreshold"],wn=e=>{let{theme:t,sections:n,scrollToNextEvent:r,avoidDateUpdates:a,onScroll:i,renderSectionHeader:o,sectionStyle:l,dayFormatter:u,dayFormat:d="dddd, MMM d",useMoment:h,markToday:p=!0,infiniteListProps:m,renderItem:g,onEndReached:y,onEndReachedThreshold:_}=e,b=(0,R.default)(e,vn);const{date:v,updateSource:w,setDate:F}=(0,c.useContext)(Ht),k=(0,c.useRef)(Rt(t)),x=(0,c.useRef)(),A=(0,c.useRef)(n[0]?.title),S=(0,c.useRef)(!1),D=(0,c.useRef)(!1),[I,O]=(0,c.useState)([]),P=(0,c.useRef)(I);(0,c.useEffect)((()=>{const e=n.reduce(((e,t)=>[...e,{title:t.title,isTitle:!0},...t.data]),[]);O(e),P.current=e,v!==A.current&&setTimeout((()=>{L(v)}),500)}),[n]),z((()=>{w!==zt.LIST_DRAG&&w!==zt.CALENDAR_INIT&&L(v)}),[v]);const M=(0,c.useCallback)((e=>{if(!e)return;let t=e;if(u)t=u(e);else if(d)if(h){t=yn()(e).format(d)}else t=new(s())(e).toString(d);if(p){const n=ve().today||Vt;t=(0,C.isToday)(e)?`${n}, ${t}`:t}return t}),[]),L=(0,c.useCallback)(rt()((e=>{const t=r?(e=>{const t=new(s())(e);let r=0;for(let a=0;a{let t=0;for(let r=0;r{H()}),500))}),1e3,{leading:!1,trailing:!0}),[n]),N=(0,c.useMemo)((()=>new _n.LayoutProvider((e=>P.current[e]?.isTitle?"title":P.current[e]?.itemCustomHeightType??"page"),((e,t)=>{switch(t.width=E.screenWidth,e){case"title":t.height=m?.titleHeight??60;break;case"page":t.height=m?.itemHeight??80;break;default:t.height=m?.itemHeightByType?.[e]??m?.itemHeight??80}}))),[]),B=(0,c.useCallback)((e=>{S.current||(S.current=!0,L.cancel());const t={nativeEvent:{contentOffset:e.nativeEvent.contentOffset,layoutMeasurement:e.nativeEvent.layoutMeasurement,contentSize:e.nativeEvent.contentSize}};i?.(t)}),[i]),j=(0,c.useCallback)(rt()((e=>{if(e&&e.length&&!D.current){const t=e[0],n=I[V(t)];n&&n!==A.current&&(A.current=n.title,S.current&&!a&&F?.(n.title,zt.LIST_DRAG))}}),m?.visibleIndicesChangedDebounce??1e3,{leading:!1,trailing:!0}),[a,F,I]),V=(0,c.useCallback)((e=>{let t=e;for(;t>0&&!I[t]?.isTitle;)t--;return t}),[I]),H=(0,c.useCallback)((()=>{D.current=!1}),[]),U=(0,c.useMemo)((()=>[k.current.sectionText,l]),[l]),W=(0,c.useCallback)((e=>{const t=e?.section?.title;if(o)return o(t);const n=M(t);return(0,f.jsx)(bn,{title:n,style:U})}),[U]),q=(0,c.useCallback)(((e,t)=>t?.isTitle?W({section:t}):g?g({item:t}):(0,f.jsx)(f.Fragment,{})),[g]),$=(0,c.useCallback)((()=>{y&&y({distanceFromEnd:0})}),[y]);return(0,f.jsx)(st,{ref:x,renderItem:q,data:I,style:k.current.container,layoutProvider:N,onScroll:B,onVisibleIndicesChanged:j,scrollViewProps:Object.assign({nestedScrollEnabled:!0},b,{onMomentumScrollEnd:H}),onEndReached:$,onEndReachedThreshold:_,disableScrollOnDataChange:!0,renderFooter:m?.renderFooter})},Fn=wn;wn.displayName="InfiniteAgendaList",wn.propTypes={dayFormat:i().string,dayFormatter:i().func,useMoment:i().bool,markToday:i().bool,sectionStyle:i().oneOfType([i().object,i().number,i().array]),avoidDateUpdates:i().bool};const kn={itemVisiblePercentThreshold:20},xn=(0,c.forwardRef)(((e,t)=>{if(e.infiniteListProps)return(0,f.jsx)(Fn,Object.assign({},e));const{theme:n,sections:r,scrollToNextEvent:a,viewOffset:i=0,avoidDateUpdates:o,onScroll:l,onMomentumScrollBegin:u,onMomentumScrollEnd:d,onScrollToIndexFailed:h,renderSectionHeader:p,sectionStyle:m,keyExtractor:g,dayFormatter:y,dayFormat:_="dddd, MMM d",useMoment:b,markToday:v=!0,onViewableItemsChanged:w}=e,{date:F,updateSource:k,setDate:x,setDisabled:A}=(0,c.useContext)(Ht),S=(0,c.useRef)(Rt(n)),D=H(t),I=(0,c.useRef)(r[0]?.title),O=(0,c.useRef)(!1),P=(0,c.useRef)(!1),M=(0,c.useRef)(0);(0,c.useEffect)((()=>{F!==I.current&&setTimeout((()=>{L(F)}),500)}),[]),z((()=>{k!==zt.LIST_DRAG&&k!==zt.CALENDAR_INIT&&L(F)}),[F]);const R=(0,c.useCallback)((e=>{if(!e)return;let t=e;if(y)t=y(e);else if(_)if(b){t=yn()(e).format(_)}else t=new(s())(e).toString(_);if(v){const n=ve().today||Vt;t=(0,C.isToday)(e)?`${n}, ${t}`:t}return t}),[]),L=(0,c.useCallback)(rt()((e=>{const t=a?(e=>{let t=0;for(let n=1;n{let t;return pn()(r,((n,r)=>{n.title===e&&(t=r)})),t})(e);ue()(t)||D?.current&&void 0!==t&&(P.current=!0,I.current=r[t]?.title,D?.current.scrollToLocation({animated:!0,sectionIndex:t,itemIndex:1,viewPosition:0,viewOffset:(E.isAndroid?M.current:0)+i}))}),1e3,{leading:!1,trailing:!0}),[i,r]),N=(0,c.useCallback)((e=>{if(e?.viewableItems&&!P.current){const t=hn()(e?.viewableItems[0],"section.title");t&&t!==I.current&&(I.current=t,O.current&&!o&&x?.(I.current,zt.LIST_DRAG))}w?.(e)}),[o,x,w]),B=(0,c.useCallback)((e=>{O.current||(O.current=!0,L.cancel()),l?.(e)}),[l]),j=(0,c.useCallback)((e=>{A?.(!0),u?.(e)}),[u,A]),V=(0,c.useCallback)((e=>{P.current=!1,A?.(!1),d?.(e)}),[d,A]),U=(0,c.useMemo)((()=>[S.current.sectionText,m]),[m]),W=(0,c.useCallback)((e=>{h?h(e):console.log("onScrollToIndexFailed info: ",e)}),[h]),q=(0,c.useCallback)((e=>{M.current=e.nativeEvent.layout.height}),[]),$=(0,c.useCallback)((e=>{const t=e?.section?.title;if(p)return p(t);const n=R(t);return(0,f.jsx)(bn,{title:n,style:U,onLayout:q})}),[U]),Y=(0,c.useCallback)(((e,t)=>ft()(g)?g(e,t):String(t)),[g]);return(0,f.jsx)(mn.default,Object.assign({stickySectionHeadersEnabled:!0},e,{ref:D,keyExtractor:Y,showsVerticalScrollIndicator:!1,onViewableItemsChanged:N,viewabilityConfig:kn,renderSectionHeader:$,onScroll:B,onMomentumScrollBegin:j,onMomentumScrollEnd:V,onScrollToIndexFailed:W}))})),An=xn;xn.displayName="AgendaList",xn.propTypes={dayFormat:i().string,dayFormatter:i().func,useMoment:i().bool,markToday:i().bool,sectionStyle:i().oneOfType([i().object,i().number,i().array]),avoidDateUpdates:i().bool};const Sn=n(22307),En=n(22688),Cn=(0,c.forwardRef)(((e,t)=>{(0,c.useImperativeHandle)(t,(()=>({disable:e=>{g(e)}})));const{margin:n=0,disabledOpacity:r=.3,theme:a,style:i}=e,{date:o,setDate:l}=(0,c.useContext)(Ht),[u,d]=(0,c.useState)(!1),h=(0,c.useRef)(Rt(a)),p=(0,C.isToday)(o)?0:(0,C.isPastDate)(o)?-1:1,m=0!==p;(0,c.useEffect)((()=>{m&&v(_()),k()}),[p]),(0,c.useEffect)((()=>{m&&x()}),[u]);const g=e=>{e!==u&&d(e)},y=(0,c.useRef)((()=>{const e=ve().today||Vt;return e.charAt(0).toUpperCase()+e.slice(1)})()),_=()=>{if(m)return 1===p?En:Sn},[b,v]=(0,c.useState)(_()),w=(0,c.useRef)(new _t.default.Value(n?-n:-65)),F=(0,c.useRef)(new _t.default.Value(1)),k=()=>{const e={toValue:0===p?65:-n||-65,tension:30,friction:8,useNativeDriver:!0};_t.default.spring(w.current,Object.assign({},e)).start()},x=()=>{const e={toValue:u?r:1,duration:500,useNativeDriver:!0};_t.default.timing(F.current,Object.assign({},e)).start()},A=(0,c.useCallback)((()=>{l((0,T.toMarkingFormat)(new(s())),zt.TODAY_PRESS)}),[l]);return(0,f.jsx)(_t.default.View,{style:[h.current.todayButtonContainer,{transform:[{translateY:w.current}]}],children:(0,f.jsxs)(K.default,{style:[h.current.todayButton,i],onPress:A,disabled:u,children:[(0,f.jsx)(_t.default.Image,{style:[h.current.todayButtonImage,{opacity:F.current}],source:b}),(0,f.jsx)(_t.default.Text,{allowFontScaling:!1,style:[h.current.todayButtonText,{opacity:F.current}],children:y.current})]})})})),Tn=e=>{const{theme:t,date:n,onDateChanged:r,onMonthChange:a,showTodayButton:i=!1,disabledOpacity:o,todayBottomMargin:l,todayButtonStyle:u,style:h,numberOfDays:p,timelineLeftInset:m=72,children:g}=e,y=(0,c.useRef)(Rt(t)),_=(0,c.useRef)(),b=(0,c.useRef)(n),v=(0,c.useRef)(n),[w,F]=(0,c.useState)(n),[k,x]=(0,c.useState)(zt.CALENDAR_INIT),A=(0,c.useMemo)((()=>[y.current.contextWrapper,h]),[y,h]);z((()=>{n&&n!==w&&S(n,zt.PROP_UPDATE)}),[n]);const S=(0,c.useCallback)(((e,t)=>{b.current=v.current,v.current=e,F(e),x(t),r?.(e,t),(0,C.sameMonth)(new(s())(e),new(s())(b.current))||a?.((0,T.xdateToData)(new(s())(e)),t)}),[r,a]),E=(0,c.useCallback)((e=>{i&&_.current?.disable(e)}),[i]),D=(0,c.useMemo)((()=>({date:w,prevDate:b.current,updateSource:k,setDate:S,setDisabled:E,numberOfDays:p,timelineLeftInset:m})),[w,k,p,E]);return(0,f.jsxs)(Ht.Provider,{value:D,children:[(0,f.jsx)(d.default,{style:A,children:g},p),i&&(0,f.jsx)(Cn,{ref:_,disabledOpacity:o,margin:l,style:u,theme:t})]})},Dn=Tn;Tn.displayName="CalendarProvider";var In=n(3953),On=n.n(In);const Pn=function(e){class t extends c.Component{saveRef=e=>{this.contentRef=e};render(){return(0,f.jsx)(Ht.Consumer,{children:t=>(0,f.jsx)(e,Object.assign({ref:this.saveRef,context:t},this.props))})}}return On()(t,e),t};var Mn=n(96547),Rn=n.n(Mn),Ln=n(98401),Nn=n.n(Ln),Bn=n(24129),jn=n.n(Bn),Vn=n(2772);const zn="#D8D8D8",Hn="#615B73";const Un=100,Wn=10,qn=10;function $n(e,t){return e.end>t.start&&e.start{o.forEach((o=>{const u=r-a,c=function(e,t,n){let r=1;for(let a=t+1;a$n(e,t))))return r;r++}return r}(o,l,e),d=l/e.length*u;let h=u*(c/e.length);l+c<=e.length-1&&(h-=i),t.push(function(e,t,n,{dayStart:r=0,hourBlockHeight:a=Un}){const i=new(s())(e.start),o=e.end?new(s())(e.end):new(s())(i).addHours(1),l=new(s())(i).clearTime();return Object.assign({},e,{top:(l.diffHours(i)-r)*a,height:i.diffHours(o)*a,width:n,left:t})}(o,d,h,n))}))}))}function Gn(e=0,t=0,n=""){return`${n} ${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}:00`.trimStart()}function Xn(e,t,n){const r=new Date;return((t??r.getHours())+(n??r.getMinutes())/60)*e}var Kn=n(15198),Jn=n.n(Kn);const Zn=E.screenWidth,Qn=c.memo((e=>{const{format24h:t,start:n=0,end:r=24,date:a,unavailableHours:i,unavailableHoursColor:o,styles:l,onBackgroundLongPress:u,onBackgroundLongPressOut:h,width:p,numberOfDays:m=1,timelineLeftInset:g=0,testID:y}=e,_=(0,c.useRef)(),b=Un,v=function(e=[],t){const{hourBlockHeight:n=Un,dayStart:r=0,dayEnd:a=24}=t||{},i=a-r,o=(a-r)*n;return e.map((e=>{if(!tt()(e.start,0,25)||!tt()(e.end,0,25))return void console.error("Calendar Timeline unavailableHours is invalid. Hours should be between 0 and 24");if(e.start>=e.end)return void console.error("Calendar Timeline availableHours is invalid. start hour should be earlier than end hour");const t=Math.max(e.start,r),s=Math.min(e.end,a);return{top:(t-r)/i*o,height:(s-t)*n}})).filter(Boolean)}(i,{dayStart:n,dayEnd:r}),w=(0,c.useMemo)((()=>Jn()(n,r+1).map((e=>{let r;return r=e===n?"":e<12?t?`${e}:00`:`${e} AM`:12===e?t?`${e}:00`:`${e} PM`:24===e?t?"23:59":"12 AM":t?`${e}:00`:e-12+" PM",{timeText:r,time:e}}))),[n,r,t]),F=(0,c.useCallback)((e=>{const t=e.nativeEvent.locationY,n=e.nativeEvent.locationX,{hour:r,minutes:i}=function(e,t){let n=e/t;return n=Math.floor(2*n)/2,{hour:Math.floor(n),minutes:60*(n-Math.floor(n))}}(t,Un),o=function(e,t,n=1,r=new(s())){const a=(E.screenWidth-t)/n,i=Math.floor((e-t)/a);return(0,C.generateDay)(r,i)}(n,g,m,a);_.current={hour:r,minutes:i,date:o};const l=Gn(r,i,o);u?.(l,_.current)}),[u,a]),k=(0,c.useCallback)((()=>{if(_.current){const{hour:e,minutes:t,date:n}=_.current,r=Gn(e,t,n);h?.(r,_.current),_.current=void 0}}),[h,a]);return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Oe.default,{onLongPress:F,onPressOut:k,children:(0,f.jsx)(d.default,{style:U.default.absoluteFillObject})}),v.map(((e,t)=>(0,f.jsx)(d.default,{style:[l.unavailableHoursBlock,e,o?{backgroundColor:o}:void 0,{left:g}]},t))),w.map((({timeText:e,time:t},r)=>(0,f.jsxs)(c.Fragment,{children:[(0,f.jsx)(X.default,{style:[l.timeLabel,{top:b*r-6,width:g-16}],children:e},`timeLabel${t}`),t===n?null:(0,f.jsx)(d.default,{testID:`${y}.${t}.line`,style:[l.line,{top:b*r,width:Zn-20,left:g-16}]},`line${t}`),(0,f.jsx)(d.default,{testID:`${y}.${t}.lineHalf`,style:[l.line,{top:b*(r+.5),width:Zn-20,left:g-16}]},`lineHalf${t}`)]},t))),Nn()(m,(e=>(0,f.jsx)(d.default,{style:[l.verticalLine,{right:(e+1)*p/m}]},e)))]})})),er=e=>{const{index:t,event:n,renderEvent:r,onPress:a,format24h:i,styles:o}=e,l=Math.floor(n.height/17),u=i?"HH:mm":"hh:mm A",h=(0,c.useMemo)((()=>({left:n.left,height:n.height,width:n.width,top:n.top,backgroundColor:n.color?n.color:"#add8e6"})),[n]),p=(0,c.useCallback)((()=>{a(t)}),[t,a]);return(0,f.jsx)(K.default,{testID:e.testID,activeOpacity:.9,onPress:p,style:[o.event,h],children:r?r(n):(0,f.jsxs)(d.default,{children:[(0,f.jsx)(X.default,{numberOfLines:1,style:o.eventTitle,children:n.title||"Event"}),l>1?(0,f.jsx)(X.default,{numberOfLines:l-1,style:[o.eventSummary],children:n.summary||" "}):null,l>2?(0,f.jsxs)(X.default,{style:o.eventTimes,numberOfLines:1,children:[new(s())(n.start).toString(u)," - ",new(s())(n.end).toString(u)]}):null]})})},tr=e=>{const{styles:t,width:n,left:r}=e,a=Xn(Un),i=(0,c.useMemo)((()=>[t.nowIndicator,{top:a,left:r}]),[a,r]);return(0,f.jsxs)(d.default,{style:i,children:[(0,f.jsx)(d.default,{style:[t.nowIndicatorLine,{width:n}]}),(0,f.jsx)(d.default,{style:t.nowIndicatorKnob})]})},nr=c.memo((e=>{const{format24h:t=!0,start:n=0,end:r=24,date:a="",events:i,onEventPress:o,onBackgroundLongPress:s,onBackgroundLongPressOut:l,renderEvent:u,theme:h,scrollToFirst:p,scrollToNow:m,initialTime:g,showNowIndicator:y,scrollOffset:_,onChangeOffset:b,overlapEventsSpacing:v=0,rightEdgeSpacing:w=0,unavailableHours:F,unavailableHoursColor:k,eventTapped:x,numberOfDays:A=1,timelineLeftInset:S=0,testID:T}=e,D=(0,c.useMemo)((()=>"string"===typeof a?[a]:a),[a]),I=(0,c.useMemo)((()=>jn()(i,(e=>be(e.start)))),[i]),O=(0,c.useMemo)((()=>pn()(D,(e=>I[e]||[]))),[D,I]),P=(0,c.useRef)(),M=(0,c.useRef)((r-n)*Un),R=(0,c.useRef)(function(e={},t){const n=Object.assign({},W,e);return U.default.create({container:Object.assign({backgroundColor:n.calendarBackground},n.timelineContainer),contentStyle:Object.assign({backgroundColor:n.calendarBackground},n.contentStyle,{flexDirection:"row",height:t+10}),line:Object.assign({height:1,backgroundColor:zn},e.line,{position:"absolute"}),verticalLine:Object.assign({width:1,backgroundColor:zn},n.verticalLine,{position:"absolute",height:"105%"}),nowIndicator:{position:"absolute",right:0},nowIndicatorLine:Object.assign({height:1,backgroundColor:"red"},n.nowIndicatorLine,{position:"absolute",left:0,right:0}),nowIndicatorKnob:Object.assign({width:7,height:7,borderRadius:4,backgroundColor:"red"},n.nowIndicatorKnob,{position:"absolute",left:-3,top:-3}),timeLabel:Object.assign({color:"#AAAAAA",fontSize:10,fontWeight:"500",fontFamily:E.isIOS?"Helvetica Neue":"Roboto",paddingLeft:12,textAlign:"center"},n.timeLabel,{position:"absolute"}),unavailableHoursBlock:{position:"absolute",right:0,backgroundColor:"#F8F9FA"},event:Object.assign({opacity:1,paddingLeft:4,paddingTop:5,paddingBottom:0,backgroundColor:"#F0F4FF",borderColor:"#DDE5FD",borderWidth:1},n.event,{position:"absolute",flex:1,flexDirection:"column",alignItems:"flex-start",overflow:"hidden",minHeight:25}),eventTitle:Object.assign({color:Hn,fontWeight:"600"},n.eventTitle,{minHeight:15}),eventSummary:Object.assign({color:Hn,fontSize:12},n.eventSummary,{flexWrap:"wrap"}),eventTimes:Object.assign({marginTop:3,color:Hn,fontSize:10,fontWeight:"bold"},n.eventTimes,{flexWrap:"wrap"}),eventsContainer:{flex:1}})}(h||e.styles,M.current)),{scrollEvents:L}=(e=>{const{onChangeOffset:t,scrollOffset:n,scrollViewRef:r}=e;return(0,c.useEffect)((()=>{void 0!==n&&r?.current?.scrollTo({y:n,animated:!1})}),[n]),{scrollEvents:{onScrollEndDrag:(0,c.useCallback)((e=>{const n=e.nativeEvent.contentOffset.y,r=e.nativeEvent.velocity?.y;0===r&&t?.(n)}),[]),onMomentumScrollEnd:(0,c.useCallback)((e=>{t?.(e.nativeEvent.contentOffset.y)}),[])}}})({onChangeOffset:b,scrollOffset:_,scrollViewRef:P}),N=(0,c.useMemo)((()=>E.screenWidth-S),[S]),B=(0,c.useMemo)((()=>pn()(O,((e,t)=>function(e,t){let n=null,r=[];const a=[];return e.map(((e,t)=>Object.assign({},e,{index:t}))).sort((function(e,t){return e.startt.start?1:e.endt.end?1:0})).forEach((function(e){null!==n&&e.start>=n&&(Yn(r,a,t),r=[],n=null);let i=!1;for(let t=0;tn)&&(n=e.end)})),r.length>0&&Yn(r,a,t),a}(O[t],{screenWidth:N/A,dayStart:n,overlapEventsSpacing:v/A,rightEdgeSpacing:w/A})))),[O,n,A]);(0,c.useEffect)((()=>{let e=0;m?e=Xn(Un):p&&B[0].length>0?e=Rn()(pn()(B[0],"top"))??0:g&&(e=Xn(Un,g.hour,g.minutes)),e&&setTimeout((()=>{P?.current?.scrollTo({y:Math.max(0,e-Un),animated:!0})}),0)}),[]);const j=(0,c.useCallback)(((e,t)=>{const n=B[e][t];x?x(n):o?.(n)}),[o,x]),V=e=>{const n=B[e].map(((n,r)=>(0,f.jsx)(er,{index:r,event:n,styles:R.current,format24h:t,onPress:()=>j(e,r),renderEvent:u,testID:`${T}.event.${n.id}`},r)));return(0,f.jsx)(d.default,{pointerEvents:"box-none",style:[{marginLeft:0===e?S:void 0},R.current.eventsContainer],children:n})};return(0,f.jsxs)(Vn.default,Object.assign({ref:P,style:R.current.container,contentContainerStyle:[R.current.contentStyle,{width:E.screenWidth}],showsVerticalScrollIndicator:!1},L,{testID:T,children:[(0,f.jsx)(Qn,{start:n,end:r,date:D[0],format24h:t,styles:R.current,unavailableHours:F,unavailableHoursColor:k,onBackgroundLongPress:s,onBackgroundLongPressOut:l,width:N,numberOfDays:A,timelineLeftInset:S,testID:`${T}.hours`}),Nn()(A,(e=>{const t=D.indexOf((0,C.generateDay)((new Date).toString())),n=S+t*N/A;return(0,f.jsxs)(c.Fragment,{children:[V(e),-1!==t&&y&&(0,f.jsx)(tr,{width:N/A,left:n,styles:R.current})]},e)}))]}))}));var rr=n(94257),ar=n.n(rr),ir=n(9534),or=n.n(ir);const sr=100,lr=Math.floor(50),ur=({date:e,listRef:t,numberOfDays:n})=>{const r=(0,c.useRef)(Nn()(sr,(t=>(0,C.generateDay)(e,n*(t-Math.floor(50)))))),[a,i]=(0,c.useState)(r.current),o=(0,c.useRef)(!1);(0,c.useEffect)((()=>{const t=Nn()(sr,(t=>(0,C.generateDay)(e,n*(t-Math.floor(50)))));r.current=t,i(t)}),[n]);const s=(0,c.useCallback)((e=>!tt()(e,0,sr)),[]),l=(0,c.useCallback)((e=>!tt()(e,10,90)),[]),u=(0,c.useCallback)((e=>!tt()(e,1,99)),[]),d=e=>{t.current?.scrollToOffset(E.isAndroidRTL?(99-e)*E.screenWidth:e*E.screenWidth,0,!1)},h=e=>{r.current=Nn()(sr,(t=>(0,C.generateDay)(e,n*(t-Math.floor(50))))),i(r.current),setTimeout((()=>{d(lr),o.current=!1}),0)};return{resetPages:(0,c.useCallback)(h,[]),resetPagesDebounce:(0,c.useCallback)(rt()(h,500,{leading:!1,trailing:!0}),[]),scrollToPage:(0,c.useCallback)(d,[]),scrollToPageDebounce:(0,c.useCallback)(rt()(d,250,{leading:!1,trailing:!0}),[]),pagesRef:r,pages:a,shouldResetPages:o,isOutOfRange:s,isNearEdges:l,isOnEdgePages:u}},cr=e=>{const{timelineProps:t,events:n,renderItem:r,showNowIndicator:a,scrollToFirst:i,scrollToNow:o,initialTime:s}=e,{date:l,updateSource:u,setDate:d,numberOfDays:h=1,timelineLeftInset:p}=(0,c.useContext)(Ht),m=(0,c.useRef)(),g=(0,c.useRef)(l),[y,_]=(0,c.useState)(),{pages:b,pagesRef:v,resetPages:w,resetPagesDebounce:F,scrollToPageDebounce:k,shouldResetPages:x,isOutOfRange:A}=ur({date:l,listRef:m,numberOfDays:h}),S=(0,c.useCallback)((e=>{const t=v.current.indexOf(e);u!==zt.LIST_DRAG&&(A(t)?u===zt.DAY_PRESS?w(e):F(e):k(t)),g.current=e}),[u]),T=(0,c.useMemo)((()=>E.isAndroidRTL?E.screenWidth*(sr-lr-1):E.screenWidth*lr),[]);(0,c.useEffect)((()=>{l!==g.current&&S(l)}),[l]);const D=(0,c.useCallback)((()=>{x.current&&F.cancel()}),[]),I=(0,c.useCallback)((()=>{x.current&&F(g.current)}),[]),O=(0,c.useCallback)(Pt()((e=>{const t=b[E.isAndroidRTL?e-1:e];t!==g.current&&d(t,zt.LIST_DRAG)}),0),[b]),P=(0,c.useCallback)((()=>{x.current=!0}),[]),M=(0,c.useCallback)((e=>{_(e)}),[]),R=(0,c.useCallback)(((e,l,u)=>{const c=g.current===l,d=u===lr,m=(0,C.isToday)(l),_=[n[l]||[],n[(0,C.generateDay)(l,1)]||[],n[(0,C.generateDay)(l,2)]||[],n[(0,C.generateDay)(l,3)]||[],n[(0,C.generateDay)(l,4)]||[],n[(0,C.generateDay)(l,5)]||[],n[(0,C.generateDay)(l,6)]||[]],b=[l,(0,C.generateDay)(l,1),(0,C.generateDay)(l,2),(0,C.generateDay)(l,3),(0,C.generateDay)(l,4),(0,C.generateDay)(l,5),(0,C.generateDay)(l,6)],v=7-h,w=Object.assign({},t,{key:l,date:or()(b,v),events:ar()(or()(_,v)),scrollToNow:m&&d&&o,initialTime:!m&&d?s:void 0,scrollToFirst:!m&&d&&i,scrollOffset:y,onChangeOffset:M,showNowIndicator:m&&a,numberOfDays:h,timelineLeftInset:p});return r?r(w,{item:l,index:u,isCurrent:c,isInitialPage:d,isToday:m}):(0,f.jsx)(f.Fragment,{children:(0,f.jsx)(nr,Object.assign({},w))})}),[n,y,a,h]);return(0,f.jsx)(st,{isHorizontal:!0,ref:m,data:b,renderItem:R,onPageChange:O,onReachNearEdge:P,onReachNearEdgeThreshold:10,onScroll:D,extendedState:{todayEvents:n[l],pages:b},initialOffset:T,scrollViewProps:{onMomentumScrollEnd:I}})},dr={};class hr extends c.Component{onRender=(...e)=>{pr(fr(e))};render(){const{children:e,id:t}=this.props;return(0,f.jsx)(c.Profiler,{id:t,onRender:this.onRender,children:e})}}const fr=([e,t,n,r,a,i,o])=>(dr[e]=Number(((dr[e]??0)+n).toFixed(2)),{id:e,interactions:o,phase:t,actualDuration:Number(n.toFixed(2)),baseDuration:Number(r.toFixed(2)),commitTime:Number(i.toFixed(2)),cumulativeDuration:dr[e],startTime:Number(a.toFixed(2))}),pr=({id:e,actualDuration:t,cumulativeDuration:n,phase:r})=>{console.group(r),console.log(e,":",t,n),console.groupEnd()}},3729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{padNumber:()=>a,parseDate:()=>o,toMarkingFormat:()=>s,xdateToData:()=>i});const r=n(53483);function a(e){return e<10?"0"+e:e}function i(e){const t=e instanceof r?e:new r(e),n=s(t);return{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate(),timestamp:new r(n,!0).getTime(),dateString:n}}function o(e){if(e){if(e.timestamp)return new r(e.timestamp,!0);if(e instanceof r)return new r(s(e),!0);if(e.getTime){const t=e.getFullYear()+"-"+a(e.getMonth()+1)+"-"+a(e.getDate());return new r(t,!0)}if(e.year){const t=e.year+"-"+a(e.month)+"-"+a(e.day);return new r(t,!0)}return e?new r(e,!0):void 0}}function s(e){if(!isNaN(e.getTime())){const t=`${e.getFullYear()}`,n=e.getMonth()+1,r=n<10?`0${n}`:`${n}`,a=e.getDate();return t+"-"+r+"-"+(a<10?`0${a}`:`${a}`)}return"Invalid Date"}},24855:(e,t,n)=>{"use strict";n.r(t),n.d(t,{agendaDayNumColor:()=>W,agendaDayTextColor:()=>U,agendaKnobColor:()=>$,agendaTodayColor:()=>q,arrowColor:()=>j,arrowStyle:()=>k,backgroundColor:()=>G,calendarBackground:()=>x,dayTextColor:()=>I,disabledArrowColor:()=>V,disabledDotColor:()=>L,dotColor:()=>M,dotStyle:()=>F,expandableKnobColor:()=>Y,inactiveDotColor:()=>N,indicatorColor:()=>H,monthTextColor:()=>z,reservationsBackgroundColor:()=>X,selectedDayBackgroundColor:()=>E,selectedDayTextColor:()=>C,selectedDotColor:()=>R,textDayFontFamily:()=>u,textDayFontSize:()=>y,textDayFontWeight:()=>f,textDayHeaderFontFamily:()=>d,textDayHeaderFontSize:()=>b,textDayHeaderFontWeight:()=>m,textDayStyle:()=>w,textDisabledColor:()=>O,textInactiveColor:()=>P,textMonthFontFamily:()=>c,textMonthFontSize:()=>_,textMonthFontWeight:()=>p,textSectionTitleColor:()=>A,textSectionTitleDisabledColor:()=>S,todayBackgroundColor:()=>T,todayButtonFontFamily:()=>h,todayButtonFontSize:()=>v,todayButtonFontWeight:()=>g,todayButtonPosition:()=>J,todayButtonTextColor:()=>K,todayDotColor:()=>B,todayTextColor:()=>D,weekVerticalMargin:()=>Z});const r="white",a="#2d4150",i="#00BBF2",o="#7a92a5",s="#f2F4f5",l="#d9e1e8",u="System",c="System",d="System",h="System",f="300",p="300",m=void 0,g="600",y=16,_=16,b=13,v=14,w=void 0,F=void 0,k=void 0,x=r,A="#b6c1cd",S=l,E=i,C=r,T=void 0,D=i,I=a,O=l,P=l,M=i,R=r,L=l,N=l,B=i,j=i,V=l,z=a,H=void 0,U=o,W=o,q=i,$=s,Y="#e8ecf0",G=s,X=s,K=i,J=void 0,Z=7},3644:e=>{const t="native.calendar";e.exports={CHANGE_MONTH_LEFT_ARROW:`${t}.CHANGE_MONTH_LEFT_ARROW`,CHANGE_MONTH_RIGHT_ARROW:`${t}.CHANGE_MONTH_RIGHT_ARROW`,SELECT_DATE_SLOT:`${t}.SELECT_DATE_SLOT`,CALENDAR_KNOB:`${t}.CALENDAR_KNOB`,STATIC_HEADER:"STATIC_HEADER",AGENDA_CALENDAR_KNOB:`${t}.AGENDA_CALENDAR_KNOB`,HEADER_MONTH_NAME:"HEADER_MONTH_NAME",RESERVATION_DATE:`${t}.RESERVATION_DATE`,HEADER_DAY_NAMES:`${t}.DAY_NAMES`,WEEK_NUMBER:`${t}.WEEK_NUMBER`,HEADER_LOADING_INDICATOR:`${t}.HEADER_LOADING_INDICATOR`}},36093:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CodeField:()=>F,Cursor:()=>u,MaskSymbol:()=>x,isLastFilledCell:()=>m,useBlurOnFulfill:()=>S,useClearByFocusCell:()=>A});var r=n(36665);const a=(e,t)=>(n,a)=>{const i=(0,r.useRef)();(0,r.useEffect)((()=>{const r=()=>e(i.current);return r(),i.current=t(n,a),r}),[a])},i=a(clearInterval,setInterval),o=a(clearTimeout,setTimeout),s=500,l="|";function u({cursorSymbol:e=l,delay:t=s}){const[n,a]=(0,r.useState)(!0);return i((()=>a((e=>!e))),t),n?e:""}var c=n(98587),d=n(16773),h=n(73929);const f=(e,t)=>(new Array).concat(((e,t)=>e.substr(0,t).split(""))(e,t)).concat((e=>new Array(e).fill(""))(t)).slice(0,t),p=(e,t)=>t?[e,t]:e,m=({value:e,index:t})=>Boolean(e&&e.length-2===t),g=(e,t)=>(0,r.useCallback)((n=>{t(),"function"===typeof e&&e(n)}),[e]);var y=n(75675);const _=y.default.create({root:{justifyContent:"space-between",flexDirection:"row"},textInput:Object.assign({},y.default.absoluteFillObject,{opacity:.015,fontSize:1},{width:"100%",fontSize:16})});var b=n(60397);const v=["rootStyle","textInputStyle","onBlur","onFocus","value","renderCell","cellCount","RootProps","RootComponent","InputComponent"],w=4;const F=(0,r.forwardRef)((function(e,t){let{rootStyle:n,textInputStyle:a,onBlur:i,onFocus:o,value:s,renderCell:l,cellCount:u=w,RootProps:m={},RootComponent:y=h.default,InputComponent:F=d.default}=e,k=(0,c.default)(e,v);const x=((e,t)=>{const[n,a]=(0,r.useState)(!1);return{isFocused:n,onBlur:g(e,(()=>a(!1))),onFocus:g(t,(()=>a(!0)))}})(i,o),A=f(s||"",u).map(((e,t,n)=>{const r=n.indexOf("")===t;return l({index:t,symbol:e,isFocused:x.isFocused&&r})}));return(0,b.jsxs)(y,Object.assign({},m,{style:p(_.root,n),children:[A,(0,b.jsx)(F,Object.assign({disableFullscreenUI:!0,caretHidden:!0,spellCheck:!1,autoCorrect:!1,blurOnSubmit:!1,clearButtonMode:"never",autoCapitalize:"characters",underlineColorAndroid:"transparent",maxLength:u,autoComplete:"one-time-code"},k,{value:s,onBlur:x.onBlur,onFocus:x.onFocus,style:p(_.textInput,a),ref:t}))]}))})),k=500;function x({isLastFilledCell:e,children:t,maskSymbol:n,delay:a=k}){const[i,s]=(0,r.useState)(!0);return o((()=>s(!1)),a),(0,r.useEffect)((()=>{e&&s(!1)}),[e]),i?t:n}const A=e=>{const t=(0,r.useRef)(e),n=(0,r.useRef)({});t.current=e;const a=e=>{const r=(({locationX:e,locationY:t},n)=>{for(const[r,{x:a,y:i,xEnd:o,yEnd:s}]of Object.entries(n))if(a{const[t]=e.target.getClientRects(),n=e.clientX-t.left,r=e.clientY-t.top;a({locationX:n,locationY:r})};return[(0,r.useMemo)((()=>({onClick:i})),[]),e=>t=>{const{width:r,height:a,x:i,y:o}=t.nativeEvent.layout;n.current[`${e}`]={x:i,xEnd:i+r,y:o,yEnd:o+a}}]},S=({value:e,cellCount:t})=>{const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{if(e&&e.length===t){const e=n.current;e&&e.blur()}}),[e,t]),n}},53100:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Sn,getAndroidId:()=>D,getAndroidIdSync:()=>I,getApiLevel:()=>Y,getApiLevelSync:()=>G,getApplicationName:()=>Z,getAvailableLocationProviders:()=>ln,getAvailableLocationProvidersSync:()=>un,getBaseOs:()=>De,getBaseOsSync:()=>Ie,getBatteryLevel:()=>kt,getBatteryLevelSync:()=>xt,getBootloader:()=>ce,getBootloaderSync:()=>de,getBrand:()=>H,getBrightness:()=>cn,getBrightnessSync:()=>dn,getBuildId:()=>q,getBuildIdSync:()=>$,getBuildNumber:()=>Q,getBundleId:()=>X,getCarrier:()=>ut,getCarrierSync:()=>ct,getCodename:()=>Le,getCodenameSync:()=>Ne,getDevice:()=>he,getDeviceId:()=>B,getDeviceName:()=>ne,getDeviceNameSync:()=>re,getDeviceSync:()=>fe,getDeviceToken:()=>hn,getDeviceType:()=>Pt,getDeviceTypeSync:()=>Mt,getDisplay:()=>pe,getDisplaySync:()=>me,getFingerprint:()=>ge,getFingerprintSync:()=>ye,getFirstInstallTime:()=>tt,getFirstInstallTimeSync:()=>nt,getFontScale:()=>le,getFontScaleSync:()=>ue,getFreeDiskStorage:()=>bt,getFreeDiskStorageOld:()=>wt,getFreeDiskStorageOldSync:()=>Ft,getFreeDiskStorageSync:()=>vt,getHardware:()=>_e,getHardwareSync:()=>be,getHost:()=>ve,getHostNames:()=>Fe,getHostNamesSync:()=>ke,getHostSync:()=>we,getIncremental:()=>Be,getIncrementalSync:()=>je,getInstallReferrer:()=>rt,getInstallReferrerSync:()=>at,getInstallerPackageName:()=>K,getInstallerPackageNameSync:()=>J,getInstanceId:()=>S,getInstanceIdSync:()=>E,getIpAddress:()=>O,getIpAddressSync:()=>P,getLastUpdateTime:()=>it,getLastUpdateTimeSync:()=>ot,getMacAddress:()=>L,getMacAddressSync:()=>N,getManufacturer:()=>j,getManufacturerSync:()=>V,getMaxMemory:()=>ft,getMaxMemorySync:()=>pt,getModel:()=>z,getPhoneNumber:()=>st,getPhoneNumberSync:()=>lt,getPowerState:()=>At,getPowerStateSync:()=>St,getPreviewSdkInt:()=>Oe,getPreviewSdkIntSync:()=>Pe,getProduct:()=>xe,getProductSync:()=>Ae,getReadableVersion:()=>te,getSecurityPatch:()=>Me,getSecurityPatchSync:()=>Re,getSerialNumber:()=>C,getSerialNumberSync:()=>T,getSupportedMediaTypeList:()=>an,getSupportedMediaTypeListSync:()=>on,getSystemAvailableFeatures:()=>Wt,getSystemAvailableFeaturesSync:()=>qt,getSystemName:()=>U,getSystemVersion:()=>W,getTags:()=>Se,getTagsSync:()=>Ee,getTotalDiskCapacity:()=>mt,getTotalDiskCapacityOld:()=>yt,getTotalDiskCapacityOldSync:()=>_t,getTotalDiskCapacitySync:()=>gt,getTotalMemory:()=>dt,getTotalMemorySync:()=>ht,getType:()=>Ce,getTypeSync:()=>Te,getUniqueId:()=>F,getUniqueIdSync:()=>k,getUsedMemory:()=>ae,getUsedMemorySync:()=>ie,getUserAgent:()=>oe,getUserAgentSync:()=>se,getVersion:()=>ee,hasDynamicIsland:()=>Ke,hasGms:()=>Je,hasGmsSync:()=>Ze,hasHms:()=>Qe,hasHmsSync:()=>et,hasNotch:()=>Xe,hasSystemFeature:()=>zt,hasSystemFeatureSync:()=>Ht,isAirplaneMode:()=>It,isAirplaneModeSync:()=>Ot,isBatteryCharging:()=>Et,isBatteryChargingSync:()=>Ct,isBluetoothHeadphonesConnected:()=>Zt,isBluetoothHeadphonesConnectedSync:()=>Qt,isCameraPresent:()=>M,isCameraPresentSync:()=>R,isDisplayZoomed:()=>We,isEmulator:()=>Ve,isEmulatorSync:()=>ze,isHeadphonesConnected:()=>Gt,isHeadphonesConnectedSync:()=>Xt,isKeyboardConnected:()=>nn,isKeyboardConnectedSync:()=>rn,isLandscape:()=>Tt,isLandscapeSync:()=>Dt,isLocationEnabled:()=>$t,isLocationEnabledSync:()=>Yt,isLowBatteryLevel:()=>Ut,isLowRamDevice:()=>Ue,isMouseConnected:()=>en,isMouseConnectedSync:()=>tn,isPinOrFingerprintSet:()=>qe,isPinOrFingerprintSetSync:()=>$e,isTablet:()=>He,isTabletMode:()=>sn,isWiredHeadphonesConnected:()=>Kt,isWiredHeadphonesConnectedSync:()=>Jt,supported32BitAbis:()=>Nt,supported32BitAbisSync:()=>Bt,supported64BitAbis:()=>jt,supported64BitAbisSync:()=>Vt,supportedAbis:()=>Rt,supportedAbisSync:()=>Lt,syncUniqueId:()=>A,useBatteryLevel:()=>pn,useBatteryLevelIsLow:()=>mn,useBrightness:()=>An,useDeviceName:()=>wn,useFirstInstallTime:()=>vn,useHasSystemFeature:()=>Fn,useIsBluetoothHeadphonesConnected:()=>bn,useIsEmulator:()=>kn,useIsHeadphonesConnected:()=>yn,useIsWiredHeadphonesConnected:()=>_n,useManufacturer:()=>xn,usePowerState:()=>gn});var r=n(36665),a=n(26725),i=n(14177),o=n(45548);function s(e,t){const[n,a]=(0,r.useState)({loading:!0,result:t});return(0,r.useEffect)((()=>{(async()=>{const t=await e();a({loading:!1,result:t})})()}),[e]),n}const l=new i.default(o.default.RNDeviceInfo);function u(e,t,n){const{loading:a,result:i}=s(t,n),[o,u]=(0,r.useState)(n);return(0,r.useEffect)((()=>{u(i)}),[i]),(0,r.useEffect)((()=>{const t=l.addListener(e,u);return()=>t.remove()}),[e]),(0,r.useMemo)((()=>({loading:a,result:o})),[a,o])}const c=[{brand:"Apple",model:"iPhone 15"},{brand:"Apple",model:"iPhone 15 Plus"},{brand:"Apple",model:"iPhone 15 Pro"},{brand:"Apple",model:"iPhone 15 Pro Max"},{brand:"Apple",model:"iPhone 14 Pro"},{brand:"Apple",model:"iPhone 14 Pro Max"}],d=[{brand:"Apple",model:"iPhone 15"},{brand:"Apple",model:"iPhone 15 Plus"},{brand:"Apple",model:"iPhone 15 Pro"},{brand:"Apple",model:"iPhone 15 Pro Max"},{brand:"Apple",model:"iPhone 14"},{brand:"Apple",model:"iPhone 14 Plus"},{brand:"Apple",model:"iPhone 14 Pro"},{brand:"Apple",model:"iPhone 14 Pro Max"},{brand:"Apple",model:"iPhone 13 mini"},{brand:"Apple",model:"iPhone 13"},{brand:"Apple",model:"iPhone 13 Pro"},{brand:"Apple",model:"iPhone 13 Pro Max"},{brand:"Apple",model:"iPhone 12 mini"},{brand:"Apple",model:"iPhone 12"},{brand:"Apple",model:"iPhone 12 Pro"},{brand:"Apple",model:"iPhone 12 Pro Max"},{brand:"Apple",model:"iPhone 11"},{brand:"Apple",model:"iPhone 11 Pro"},{brand:"Apple",model:"iPhone 11 Pro Max"},{brand:"Apple",model:"iPhone X"},{brand:"Apple",model:"iPhone XS"},{brand:"Apple",model:"iPhone XS Max"},{brand:"Apple",model:"iPhone XR"},{brand:"Asus",model:"ZenFone 5"},{brand:"Asus",model:"ZenFone 5z"},{brand:"google",model:"Pixel 3 XL"},{brand:"google",model:"Pixel 4a"},{brand:"Huawei",model:"P20"},{brand:"Huawei",model:"P20 Plus"},{brand:"Huawei",model:"P20 Lite"},{brand:"Huawei",model:"ANE-LX1"},{brand:"Huawei",model:"INE-LX1"},{brand:"Huawei",model:"POT-LX1"},{brand:"Huawei",model:"Honor Play"},{brand:"Huawei",model:"Honor 10"},{brand:"Huawei",model:"Mate 20 Lite"},{brand:"Huawei",model:"Mate 20 Pro"},{brand:"Huawei",model:"ELE-L29"},{brand:"Huawei",model:"P30 Lite"},{brand:"Huawei",model:"P30 Pro"},{brand:"Huawei",model:"JNY-LX1"},{brand:"Huawei",model:"Nova 3"},{brand:"Huawei",model:"Nova 3i"},{brand:"Leagoo",model:"S9"},{brand:"LG",model:"G7"},{brand:"LG",model:"G7 ThinQ"},{brand:"LG",model:"G7+ ThinQ"},{brand:"LG",model:"LM-Q910"},{brand:"LG",model:"LM-G710"},{brand:"LG",model:"LM-V405"},{brand:"Motorola",model:"Moto g7 Play"},{brand:"Motorola",model:"Moto g7 Power"},{brand:"Motorola",model:"One"},{brand:"Motorola",model:"Motorola One Vision"},{brand:"Nokia",model:"5.1 Plus"},{brand:"Nokia",model:"Nokia 6.1 Plus"},{brand:"Nokia",model:"7.1"},{brand:"Nokia",model:"8.1"},{brand:"OnePlus",model:"6"},{brand:"OnePlus",model:"A6003"},{brand:"ONEPLUS",model:"A6000"},{brand:"OnePlus",model:"OnePlus A6003"},{brand:"OnePlus",model:"ONEPLUS A6010"},{brand:"OnePlus",model:"ONEPLUS A6013"},{brand:"OnePlus",model:"ONEPLUS A6000"},{brand:"Oppo",model:"R15"},{brand:"Oppo",model:"R15 Pro"},{brand:"Oppo",model:"F7"},{brand:"Oukitel",model:"U18"},{brand:"Redmi",model:"M2004J19C"},{brand:"Sharp",model:"Aquos S3"},{brand:"Vivo",model:"V9"},{brand:"Vivo",model:"X21"},{brand:"Vivo",model:"X21 UD"},{brand:"xiaomi",model:"MI 8"},{brand:"xiaomi",model:"MI 8 Explorer Edition"},{brand:"xiaomi",model:"MI 8 SE"},{brand:"xiaomi",model:"MI 8 UD"},{brand:"xiaomi",model:"MI 8 Lite"},{brand:"xiaomi",model:"Mi 9"},{brand:"xiaomi",model:"POCO F1"},{brand:"xiaomi",model:"POCOPHONE F1"},{brand:"xiaomi",model:"Redmi 6 Pro"},{brand:"xiaomi",model:"Redmi Note 7"},{brand:"xiaomi",model:"Redmi 7"},{brand:"xiaomi",model:"Redmi Note 8"},{brand:"xiaomi",model:"Redmi Note 8 Pro"},{brand:"xiaomi",model:"Mi A2 Lite"},{brand:"Blackview",model:"A30"},{brand:"Samsung",model:"SM-A202F"},{brand:"Samsung",model:"SM-A217F"},{brand:"Samsung",model:"SM-A715F"}];let h=o.default.RNDeviceInfo;if(h=n(14511),!h)throw new Error("react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:\n \u2022 For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.\n \u2022 Rebuild and re-run the app.\n \u2022 If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-device-info/react-native-device-info");const f=h;var p=n(98587),m=n(95991);const g=["syncGetter"];let y={};function _(e,t,n){let r={};return e.filter((e=>"web"==e)).forEach((e=>r[e]=t)),m.default.select(Object.assign({},r,{default:n}))}function b({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&void 0!=y[r])return y[r];{const a=_(t,e,(()=>n))();return r&&(y[r]=a),a}}async function v({getter:e,supportedPlatforms:t,defaultValue:n,memoKey:r}){if(r&&void 0!=y[r])return y[r];{const a=await _(t,e,(()=>Promise.resolve(n)))();return r&&(y[r]=a),a}}function w(e){let{syncGetter:t}=e,n=(0,p.default)(e,g);return[()=>v(n),()=>b(Object.assign({},n,{getter:t}))]}const[F,k]=w({memoKey:"uniqueId",supportedPlatforms:["android","ios","windows"],getter:()=>f.getUniqueId(),syncGetter:()=>f.getUniqueIdSync(),defaultValue:"unknown"});let x;async function A(){return x=await F(),x}const[S,E]=w({memoKey:"instanceId",supportedPlatforms:["android"],getter:()=>f.getInstanceId(),syncGetter:()=>f.getInstanceIdSync(),defaultValue:"unknown"}),[C,T]=w({memoKey:"serialNumber",supportedPlatforms:["android","windows"],getter:()=>f.getSerialNumber(),syncGetter:()=>f.getSerialNumberSync(),defaultValue:"unknown"}),[D,I]=w({memoKey:"androidId",supportedPlatforms:["android"],getter:()=>f.getAndroidId(),syncGetter:()=>f.getAndroidIdSync(),defaultValue:"unknown"}),[O,P]=w({supportedPlatforms:["android","ios","windows"],getter:()=>f.getIpAddress(),syncGetter:()=>f.getIpAddressSync(),defaultValue:"unknown"}),[M,R]=w({supportedPlatforms:["android","windows","web"],getter:()=>f.isCameraPresent(),syncGetter:()=>f.isCameraPresentSync(),defaultValue:!1});async function L(){return"unknown"}function N(){return"unknown"}const B=()=>b({defaultValue:"unknown",memoKey:"deviceId",getter:()=>f.deviceId,supportedPlatforms:["android","ios","windows"]}),[j,V]=w({memoKey:"manufacturer",supportedPlatforms:["android","ios","windows"],getter:()=>f.getSystemManufacturer(),syncGetter:()=>f.getSystemManufacturerSync(),defaultValue:"unknown"}),z=()=>b({memoKey:"model",defaultValue:"unknown",supportedPlatforms:["ios","android","windows"],getter:()=>f.model}),H=()=>b({memoKey:"brand",supportedPlatforms:["android","ios","windows"],defaultValue:"unknown",getter:()=>f.brand}),U=()=>b({defaultValue:"unknown",supportedPlatforms:["ios","android","windows"],memoKey:"systemName",getter:()=>"unknown"}),W=()=>b({defaultValue:"unknown",getter:()=>f.systemVersion,supportedPlatforms:["android","ios","windows"],memoKey:"systemVersion"}),[q,$]=w({memoKey:"buildId",supportedPlatforms:["android","ios","windows"],getter:()=>f.getBuildId(),syncGetter:()=>f.getBuildIdSync(),defaultValue:"unknown"}),[Y,G]=w({memoKey:"apiLevel",supportedPlatforms:["android"],getter:()=>f.getApiLevel(),syncGetter:()=>f.getApiLevelSync(),defaultValue:-1}),X=()=>b({memoKey:"bundleId",supportedPlatforms:["android","ios","windows"],defaultValue:"unknown",getter:()=>f.bundleId}),[K,J]=w({memoKey:"installerPackageName",supportedPlatforms:["android","windows","ios"],getter:()=>f.getInstallerPackageName(),syncGetter:()=>f.getInstallerPackageNameSync(),defaultValue:"unknown"}),Z=()=>b({memoKey:"appName",defaultValue:"unknown",getter:()=>f.appName,supportedPlatforms:["android","ios","windows"]}),Q=()=>b({memoKey:"buildNumber",supportedPlatforms:["android","ios","windows"],getter:()=>f.buildNumber,defaultValue:"unknown"}),ee=()=>b({memoKey:"version",defaultValue:"unknown",supportedPlatforms:["android","ios","windows"],getter:()=>f.appVersion});function te(){return ee()+"."+Q()}const[ne,re]=w({supportedPlatforms:["android","ios","windows"],getter:()=>f.getDeviceName(),syncGetter:()=>f.getDeviceNameSync(),defaultValue:"unknown"}),[ae,ie]=w({supportedPlatforms:["android","ios","windows","web"],getter:()=>f.getUsedMemory(),syncGetter:()=>f.getUsedMemorySync(),defaultValue:-1}),oe=()=>v({memoKey:"userAgent",defaultValue:"unknown",supportedPlatforms:["android","ios","web"],getter:()=>f.getUserAgent()}),se=()=>b({memoKey:"userAgentSync",defaultValue:"unknown",supportedPlatforms:["android","web"],getter:()=>f.getUserAgentSync()}),[le,ue]=w({supportedPlatforms:["android","ios","windows"],getter:()=>f.getFontScale(),syncGetter:()=>f.getFontScaleSync(),defaultValue:-1}),[ce,de]=w({memoKey:"bootloader",supportedPlatforms:["android"],getter:()=>f.getBootloader(),syncGetter:()=>f.getBootloaderSync(),defaultValue:"unknown"}),[he,fe]=w({getter:()=>f.getDevice(),syncGetter:()=>f.getDeviceSync(),defaultValue:"unknown",memoKey:"device",supportedPlatforms:["android"]}),[pe,me]=w({memoKey:"display",supportedPlatforms:["android"],getter:()=>f.getDisplay(),syncGetter:()=>f.getDisplaySync(),defaultValue:"unknown"}),[ge,ye]=w({memoKey:"fingerprint",supportedPlatforms:["android"],getter:()=>f.getFingerprint(),syncGetter:()=>f.getFingerprintSync(),defaultValue:"unknown"}),[_e,be]=w({memoKey:"hardware",supportedPlatforms:["android"],getter:()=>f.getHardware(),syncGetter:()=>f.getHardwareSync(),defaultValue:"unknown"}),[ve,we]=w({memoKey:"host",supportedPlatforms:["android","windows"],getter:()=>f.getHost(),syncGetter:()=>f.getHostSync(),defaultValue:"unknown"}),[Fe,ke]=w({memoKey:"hostNames",supportedPlatforms:["windows"],getter:()=>f.getHostNames(),syncGetter:()=>f.getHostNamesSync(),defaultValue:[]}),[xe,Ae]=w({memoKey:"product",supportedPlatforms:["android"],getter:()=>f.getProduct(),syncGetter:()=>f.getProductSync(),defaultValue:"unknown"}),[Se,Ee]=w({memoKey:"tags",supportedPlatforms:["android"],getter:()=>f.getTags(),syncGetter:()=>f.getTagsSync(),defaultValue:"unknown"}),[Ce,Te]=w({memoKey:"type",supportedPlatforms:["android"],getter:()=>f.getType(),syncGetter:()=>f.getTypeSync(),defaultValue:"unknown"}),[De,Ie]=w({memoKey:"baseOs",supportedPlatforms:["android","web","windows"],getter:()=>f.getBaseOs(),syncGetter:()=>f.getBaseOsSync(),defaultValue:"unknown"}),[Oe,Pe]=w({memoKey:"previewSdkInt",supportedPlatforms:["android"],getter:()=>f.getPreviewSdkInt(),syncGetter:()=>f.getPreviewSdkIntSync(),defaultValue:-1}),[Me,Re]=w({memoKey:"securityPatch",supportedPlatforms:["android"],getter:()=>f.getSecurityPatch(),syncGetter:()=>f.getSecurityPatchSync(),defaultValue:"unknown"}),[Le,Ne]=w({memoKey:"codeName",supportedPlatforms:["android"],getter:()=>f.getCodename(),syncGetter:()=>f.getCodenameSync(),defaultValue:"unknown"}),[Be,je]=w({memoKey:"incremental",supportedPlatforms:["android"],getter:()=>f.getIncremental(),syncGetter:()=>f.getIncrementalSync(),defaultValue:"unknown"}),[Ve,ze]=w({memoKey:"emulator",supportedPlatforms:["android","ios","windows"],getter:()=>f.isEmulator(),syncGetter:()=>f.isEmulatorSync(),defaultValue:!1}),He=()=>b({defaultValue:!1,supportedPlatforms:["android","ios","windows"],memoKey:"tablet",getter:()=>f.isTablet}),Ue=()=>b({defaultValue:!1,supportedPlatforms:["android"],memoKey:"lowRam",getter:()=>f.isLowRamDevice}),We=()=>b({defaultValue:!1,supportedPlatforms:["ios"],memoKey:"zoomed",getter:()=>f.isDisplayZoomed}),[qe,$e]=w({supportedPlatforms:["android","ios","windows"],getter:()=>f.isPinOrFingerprintSet(),syncGetter:()=>f.isPinOrFingerprintSetSync(),defaultValue:!1});let Ye,Ge;function Xe(){if(void 0===Ye){let e=H(),t=z();Ye=-1!==d.findIndex((n=>n.brand.toLowerCase()===e.toLowerCase()&&n.model.toLowerCase()===t.toLowerCase()))}return Ye}function Ke(){if(void 0===Ge){let e=H(),t=z();Ge=-1!==c.findIndex((n=>n.brand.toLowerCase()===e.toLowerCase()&&n.model.toLowerCase()===t.toLowerCase()))}return Ge}const[Je,Ze]=w({supportedPlatforms:["android"],getter:()=>f.hasGms(),syncGetter:()=>f.hasGmsSync(),defaultValue:!1}),[Qe,et]=w({supportedPlatforms:["android"],getter:()=>f.hasHms(),syncGetter:()=>f.hasHmsSync(),defaultValue:!1}),[tt,nt]=w({memoKey:"firstInstallTime",supportedPlatforms:["android","ios","windows"],getter:()=>f.getFirstInstallTime(),syncGetter:()=>f.getFirstInstallTimeSync(),defaultValue:-1}),[rt,at]=w({memoKey:"installReferrer",supportedPlatforms:["android","windows","web"],getter:()=>f.getInstallReferrer(),syncGetter:()=>f.getInstallReferrerSync(),defaultValue:"unknown"}),[it,ot]=w({memoKey:"lastUpdateTime",supportedPlatforms:["android"],getter:()=>f.getLastUpdateTime(),syncGetter:()=>f.getLastUpdateTimeSync(),defaultValue:-1}),[st,lt]=w({supportedPlatforms:["android"],getter:()=>f.getPhoneNumber(),syncGetter:()=>f.getPhoneNumberSync(),defaultValue:"unknown"}),[ut,ct]=w({supportedPlatforms:["android","ios"],getter:()=>f.getCarrier(),syncGetter:()=>f.getCarrierSync(),defaultValue:"unknown"}),[dt,ht]=w({memoKey:"totalMemory",supportedPlatforms:["android","ios","windows","web"],getter:()=>f.getTotalMemory(),syncGetter:()=>f.getTotalMemorySync(),defaultValue:-1}),[ft,pt]=w({memoKey:"maxMemory",supportedPlatforms:["android","windows","web"],getter:()=>f.getMaxMemory(),syncGetter:()=>f.getMaxMemorySync(),defaultValue:-1}),[mt,gt]=w({supportedPlatforms:["android","ios","windows","web"],getter:()=>f.getTotalDiskCapacity(),syncGetter:()=>f.getTotalDiskCapacitySync(),defaultValue:-1});async function yt(){return mt()}function _t(){return gt()}const[bt,vt]=w({supportedPlatforms:["android","ios","windows","web"],getter:()=>f.getFreeDiskStorage(),syncGetter:()=>f.getFreeDiskStorageSync(),defaultValue:-1});async function wt(){return bt()}function Ft(){return vt()}const[kt,xt]=w({supportedPlatforms:["android","ios","windows","web"],getter:()=>f.getBatteryLevel(),syncGetter:()=>f.getBatteryLevelSync(),defaultValue:-1}),[At,St]=w({supportedPlatforms:["ios","android","windows","web"],getter:()=>f.getPowerState(),syncGetter:()=>f.getPowerStateSync(),defaultValue:{}}),[Et,Ct]=w({supportedPlatforms:["android","ios","windows","web"],getter:()=>f.isBatteryCharging(),syncGetter:()=>f.isBatteryChargingSync(),defaultValue:!1});async function Tt(){return Promise.resolve(Dt())}function Dt(){const{height:e,width:t}=a.default.get("window");return t>=e}const[It,Ot]=w({supportedPlatforms:["android","web"],getter:()=>f.isAirplaneMode(),syncGetter:()=>f.isAirplaneModeSync(),defaultValue:!1}),Pt=()=>b({memoKey:"deviceType",supportedPlatforms:["android","ios","windows"],defaultValue:"unknown",getter:()=>f.deviceType}),Mt=()=>b({memoKey:"deviceType",supportedPlatforms:["android","ios","windows"],defaultValue:"unknown",getter:()=>f.deviceType}),[Rt,Lt]=w({memoKey:"_supportedAbis",supportedPlatforms:["android","ios","windows"],getter:()=>f.getSupportedAbis(),syncGetter:()=>f.getSupportedAbisSync(),defaultValue:[]}),[Nt,Bt]=w({memoKey:"_supported32BitAbis",supportedPlatforms:["android"],getter:()=>f.getSupported32BitAbis(),syncGetter:()=>f.getSupported32BitAbisSync(),defaultValue:[]}),[jt,Vt]=w({memoKey:"_supported64BitAbis",supportedPlatforms:["android"],getter:()=>f.getSupported64BitAbis(),syncGetter:()=>f.getSupported64BitAbisSync(),defaultValue:[]});async function zt(e){return!1}function Ht(e){return!1}function Ut(e){return e<.2}const[Wt,qt]=w({supportedPlatforms:["android"],getter:()=>f.getSystemAvailableFeatures(),syncGetter:()=>f.getSystemAvailableFeaturesSync(),defaultValue:[]}),[$t,Yt]=w({supportedPlatforms:["android","ios","web"],getter:()=>f.isLocationEnabled(),syncGetter:()=>f.isLocationEnabledSync(),defaultValue:!1}),[Gt,Xt]=w({supportedPlatforms:["android","ios"],getter:()=>f.isHeadphonesConnected(),syncGetter:()=>f.isHeadphonesConnectedSync(),defaultValue:!1}),[Kt,Jt]=w({supportedPlatforms:["android","ios"],getter:()=>f.isWiredHeadphonesConnected(),syncGetter:()=>f.isWiredHeadphonesConnectedSync(),defaultValue:!1}),[Zt,Qt]=w({supportedPlatforms:["android","ios"],getter:()=>f.isBluetoothHeadphonesConnected(),syncGetter:()=>f.isBluetoothHeadphonesConnectedSync(),defaultValue:!1}),[en,tn]=w({supportedPlatforms:["windows"],getter:()=>f.isMouseConnected(),syncGetter:()=>f.isMouseConnectedSync(),defaultValue:!1}),[nn,rn]=w({supportedPlatforms:["windows"],getter:()=>f.isKeyboardConnected(),syncGetter:()=>f.isKeyboardConnectedSync(),defaultValue:!1}),[an,on]=w({supportedPlatforms:["android"],getter:()=>f.getSupportedMediaTypeList(),syncGetter:()=>f.getSupportedMediaTypeListSync(),defaultValue:[]}),sn=()=>v({supportedPlatforms:["windows"],getter:()=>f.isTabletMode(),defaultValue:!1}),[ln,un]=w({supportedPlatforms:["android","ios"],getter:()=>f.getAvailableLocationProviders(),syncGetter:()=>f.getAvailableLocationProvidersSync(),defaultValue:{}}),[cn,dn]=w({supportedPlatforms:["ios"],getter:()=>f.getBrightness(),syncGetter:()=>f.getBrightnessSync(),defaultValue:-1});async function hn(){return"unknown"}const fn=new i.default(o.default.RNDeviceInfo);function pn(){const[e,t]=(0,r.useState)(null);return(0,r.useEffect)((()=>{(async()=>{const e=await kt();t(e)})();const e=fn.addListener("RNDeviceInfo_batteryLevelDidChange",(e=>{t(e)}));return()=>e.remove()}),[]),e}function mn(){const[e,t]=(0,r.useState)(null);return(0,r.useEffect)((()=>{(async()=>{const e=await kt();Ut(e)&&t(e)})();const e=fn.addListener("RNDeviceInfo_batteryLevelIsLow",(e=>{t(e)}));return()=>e.remove()}),[]),e}function gn(){const[e,t]=(0,r.useState)({});return(0,r.useEffect)((()=>{(async()=>{const e=await At();t(e)})();const e=fn.addListener("RNDeviceInfo_powerStateDidChange",(e=>{t(e)}));return()=>e.remove()}),[]),e}function yn(){return u("RNDeviceInfo_headphoneConnectionDidChange",Gt,!1)}function _n(){return u("RNDeviceInfo_headphoneWiredConnectionDidChange",Kt,!1)}function bn(){return u("RNDeviceInfo_headphoneBluetoothConnectionDidChange",Zt,!1)}function vn(){return s(tt,-1)}function wn(){return s(ne,"unknown")}function Fn(e){return s((0,r.useCallback)((()=>zt()),[e]),!1)}function kn(){return s(Ve,!1)}function xn(){return s(j,"unknown")}function An(){const[e,t]=(0,r.useState)(null);return(0,r.useEffect)((()=>{(async()=>{const e=await cn();t(e)})();const e=fn.addListener("RNDeviceInfo_brightnessDidChange",(e=>{t(e)}));return()=>e.remove()}),[]),e}const Sn={getAndroidId:D,getAndroidIdSync:I,getApiLevel:Y,getApiLevelSync:G,getApplicationName:Z,getAvailableLocationProviders:ln,getAvailableLocationProvidersSync:un,getBaseOs:De,getBaseOsSync:Ie,getBatteryLevel:kt,getBatteryLevelSync:xt,getBootloader:ce,getBootloaderSync:de,getBrand:H,getBuildId:q,getBuildIdSync:$,getBuildNumber:Q,getBundleId:X,getCarrier:ut,getCarrierSync:ct,getCodename:Le,getCodenameSync:Ne,getDevice:he,getDeviceId:B,getDeviceName:ne,getDeviceNameSync:re,getDeviceSync:fe,getDeviceToken:hn,getDeviceType:Pt,getDisplay:pe,getDisplaySync:me,getFingerprint:ge,getFingerprintSync:ye,getFirstInstallTime:tt,getFirstInstallTimeSync:nt,getFontScale:le,getFontScaleSync:ue,getFreeDiskStorage:bt,getFreeDiskStorageOld:wt,getFreeDiskStorageSync:vt,getFreeDiskStorageOldSync:Ft,getHardware:_e,getHardwareSync:be,getHost:ve,getHostSync:we,getHostNames:Fe,getHostNamesSync:ke,getIncremental:Be,getIncrementalSync:je,getInstallerPackageName:K,getInstallerPackageNameSync:J,getInstallReferrer:rt,getInstallReferrerSync:at,getInstanceId:S,getInstanceIdSync:E,getIpAddress:O,getIpAddressSync:P,getLastUpdateTime:it,getLastUpdateTimeSync:ot,getMacAddress:L,getMacAddressSync:N,getManufacturer:j,getManufacturerSync:V,getMaxMemory:ft,getMaxMemorySync:pt,getModel:z,getPhoneNumber:st,getPhoneNumberSync:lt,getPowerState:At,getPowerStateSync:St,getPreviewSdkInt:Oe,getPreviewSdkIntSync:Pe,getProduct:xe,getProductSync:Ae,getReadableVersion:te,getSecurityPatch:Me,getSecurityPatchSync:Re,getSerialNumber:C,getSerialNumberSync:T,getSystemAvailableFeatures:Wt,getSystemAvailableFeaturesSync:qt,getSystemName:U,getSystemVersion:W,getTags:Se,getTagsSync:Ee,getTotalDiskCapacity:mt,getTotalDiskCapacityOld:yt,getTotalDiskCapacitySync:gt,getTotalDiskCapacityOldSync:_t,getTotalMemory:dt,getTotalMemorySync:ht,getType:Ce,getTypeSync:Te,getUniqueId:F,getUniqueIdSync:k,getUsedMemory:ae,getUsedMemorySync:ie,getUserAgent:oe,getUserAgentSync:se,getVersion:ee,getBrightness:cn,getBrightnessSync:dn,hasGms:Je,hasGmsSync:Ze,hasHms:Qe,hasHmsSync:et,hasNotch:Xe,hasDynamicIsland:Ke,hasSystemFeature:zt,hasSystemFeatureSync:Ht,isAirplaneMode:It,isAirplaneModeSync:Ot,isBatteryCharging:Et,isBatteryChargingSync:Ct,isCameraPresent:M,isCameraPresentSync:R,isEmulator:Ve,isEmulatorSync:ze,isHeadphonesConnected:Gt,isHeadphonesConnectedSync:Xt,isWiredHeadphonesConnected:Kt,isWiredHeadphonesConnectedSync:Jt,isBluetoothHeadphonesConnected:Zt,isBluetoothHeadphonesConnectedSync:Qt,isLandscape:Tt,isLandscapeSync:Dt,isLocationEnabled:$t,isLocationEnabledSync:Yt,isPinOrFingerprintSet:qe,isPinOrFingerprintSetSync:$e,isMouseConnected:en,isMouseConnectedSync:tn,isKeyboardConnected:nn,isKeyboardConnectedSync:rn,isTabletMode:sn,isTablet:He,isLowRamDevice:Ue,isDisplayZoomed:We,supported32BitAbis:Nt,supported32BitAbisSync:Bt,supported64BitAbis:jt,supported64BitAbisSync:Vt,supportedAbis:Rt,supportedAbisSync:Lt,syncUniqueId:A,useBatteryLevel:pn,useBatteryLevelIsLow:mn,useDeviceName:wn,useFirstInstallTime:vn,useHasSystemFeature:Fn,useIsEmulator:kn,usePowerState:gn,useManufacturer:xn,useIsHeadphonesConnected:yn,useIsWiredHeadphonesConnected:_n,useIsBluetoothHeadphonesConnected:bn,useBrightness:An,getSupportedMediaTypeList:an,getSupportedMediaTypeListSync:on}},14511:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getBaseOs:()=>E,getBatteryLevel:()=>k,getBatteryLevelSync:()=>x,getFreeDiskStorage:()=>D,getFreeDiskStorageSync:()=>I,getInstallReferrer:()=>y,getInstallReferrerSync:()=>d,getMaxMemory:()=>O,getMaxMemorySync:()=>c,getPowerState:()=>R,getPowerStateSync:()=>L,getTotalDiskCapacity:()=>C,getTotalDiskCapacitySync:()=>T,getTotalMemory:()=>M,getTotalMemorySync:()=>m,getUsedMemory:()=>P,getUsedMemorySync:()=>g,getUserAgent:()=>_,getUserAgentSync:()=>f,isAirplaneMode:()=>S,isAirplaneModeSync:()=>h,isBatteryCharging:()=>b,isBatteryChargingSync:()=>v,isCameraPresent:()=>w,isCameraPresentSync:()=>F,isLocationEnabled:()=>A,isLocationEnabledSync:()=>p});var r=n(14177),a=n(45548);const i=new r.default(a.default.RNDeviceInfo);let o=!1,s=-1,l={};const u=e=>{const{level:t,charging:n,chargingtime:r,dischargingtime:a}=e;return{batteryLevel:t,lowPowerMode:!1,batteryState:1===t?"full":n?"charging":"unplugged",chargingtime:r,dischargingtime:a}},c=()=>window.performance&&window.performance.memory?window.performance.memory.jsHeapSizeLimit:-1,d=()=>document.referrer,h=()=>!!navigator.onLine,f=()=>window.navigator.userAgent,p=()=>!!navigator.geolocation,m=()=>navigator.deviceMemory?1e9*navigator.deviceMemory:-1,g=()=>window.performance&&window.performance.memory?window.performance.memory.usedJSHeapSize:-1;"undefined"!==typeof navigator&&navigator.getBattery&&navigator.getBattery().then((e=>{o=e.charging,e.addEventListener("chargingchange",(()=>{const{charging:t}=e;o=t,l=u(e),i.emit("RNDeviceInfo_powerStateDidChange",l)})),e.addEventListener("levelchange",(()=>{const{level:t}=e;s=t,l=u(e),i.emit("RNDeviceInfo_batteryLevelDidChange",t),t<.2&&i.emit("RNDeviceInfo_batteryLevelIsLow",t)}))}));const y=async()=>d(),_=async()=>f(),b=async()=>!!navigator.getBattery&&navigator.getBattery().then((e=>e.charging)),v=()=>o,w=async()=>!(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)&&navigator.mediaDevices.enumerateDevices().then((e=>!!e.find((e=>"videoinput"===e.kind)))),F=()=>(console.log("[react-native-device-info] isCameraPresentSync not supported - please use isCameraPresent"),!1),k=async()=>navigator.getBattery?navigator.getBattery().then((e=>e.level)):-1,x=()=>s,A=async()=>p(),S=async()=>h(),E=async()=>(()=>{const e=window.navigator.userAgent,t=window.navigator.platform;let n=t;return-1!==["Macintosh","MacIntel","MacPPC","Mac68K"].indexOf(t)?n="Mac OS":-1!==["iPhone","iPad","iPod"].indexOf(t)?n="iOS":-1!==["Win32","Win64","Windows","WinCE"].indexOf(t)?n="Windows":/Android/.test(e)?n="Android":!n&&/Linux/.test(t)&&(n="Linux"),n})(),C=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then((({quota:e})=>e)):-1,T=()=>(console.log("[react-native-device-info] getTotalDiskCapacitySync not supported - please use getTotalDiskCapacity"),-1),D=async()=>navigator.storage&&navigator.storage.estimate?navigator.storage.estimate().then((({quota:e,usage:t})=>e-t)):-1,I=()=>(console.log("[react-native-device-info] getFreeDiskStorageSync not supported - please use getFreeDiskStorage"),-1),O=async()=>c(),P=async()=>g(),M=async()=>m(),R=async()=>navigator.getBattery?navigator.getBattery().then((e=>u(e))):{},L=()=>l},80805:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(36665),a=n(73929),i=n(6283),o=n(60193),s=n(60444),l=n(15009),u=n(26725),c=n(15648),d=n(75675),h=n(60397);function f(e,t,n){return Math.max(t,Math.min(e,n))}function p(e){const{renderText:t,isCircle:n,renderSize:d,imageSource:p,renderColor:g,accelerationValue:y,children:_,shouldReverse:b,disabled:v,debug:w,animatedViewProps:F,touchableOpacityProps:k,onDrag:x,onShortPressRelease:A,onDragRelease:S,onLongPress:E,onPressIn:C,onPressOut:T,onRelease:D,x:I,y:O,z:P,minX:M,minY:R,maxX:L,maxY:N}=e,B=r.useRef(new l.default.ValueXY),j=r.useRef({x:0,y:0}),V=r.useRef({x:d,y:d}),z=r.useRef({top:0,bottom:0,left:0,right:0}),H=r.useRef(!1),U=r.useCallback((()=>{const e=I+j.current.x,t=O+j.current.y;return{left:e,top:t,right:e+V.current.x,bottom:t+V.current.y}}),[I,O]),W=r.useCallback((e=>!v&&(Math.abs(e.dx)>2||Math.abs(e.dy)>2)),[v]),q=r.useCallback((()=>{l.default.spring(B.current,{toValue:{x:0,y:0},useNativeDriver:!1}).start()}),[B]),$=r.useCallback(((e,t)=>{H.current=!1,S&&(S(e,t),D(e,!0)),b?q():B.current.flattenOffset()}),[S,b,D,q]),Y=r.useCallback(((e,t)=>{z.current=U(),H.current=!0,b||(B.current.setOffset(j.current),B.current.setValue({x:0,y:0}))}),[U,b]),G=r.useCallback(((e,t)=>{const{dx:n,dy:r}=t,{top:a,right:i,left:o,bottom:s}=z.current,l=999999999,u=f(n*(y||1),Number.isFinite(M)?M-o:-l,Number.isFinite(L)?L-i:l),c=f(r*(y||1),Number.isFinite(R)?R-a:-l,Number.isFinite(N)?N-s:l);B.current.setValue({x:u,y:c}),x(e,t)}),[y,L,N,M,R,x]),X=r.useMemo((()=>s.default.create({onMoveShouldSetPanResponder:(e,t)=>W(t),onMoveShouldSetPanResponderCapture:(e,t)=>W(t),onPanResponderGrant:Y,onPanResponderMove:l.default.event([],{listener:G,useNativeDriver:!1}),onPanResponderRelease:$})),[G,Y,$,W]);r.useEffect((()=>{const e=B.current;return b||e.addListener((e=>j.current=e)),()=>{e.removeAllListeners()}}),[b]);const K=r.useMemo((()=>{const e=u.default.get("window");return{position:"absolute",top:0,left:0,width:e.width,height:e.height}}),[]),J=r.useMemo((()=>{const e={top:O,left:I,elevation:P,zIndex:P};return g&&(e.backgroundColor=g),n&&(e.borderRadius=d),_?Object.assign({},e,{alignSelf:"baseline"}):Object.assign({},e,{justifyContent:"center",width:d,height:d})}),[_,n,g,d,I,O,P]),Z=r.useMemo((()=>_||(p?(0,h.jsx)(o.default,{style:{width:d,height:d},source:p}):(0,h.jsx)(i.default,{style:m.text,children:t}))),[_,p,d,t]),Q=r.useCallback((e=>{const{height:t,width:n}=e.nativeEvent.layout;V.current={x:n,y:t}}),[]),ee=r.useCallback((e=>{T(e),H.current||D(e,!1)}),[T,D]),te=r.useCallback((()=>{const{width:e,height:t}=u.default.get("window"),n=9999;if(!(M||L||R||N))return null;const r=M||-n,i=L?e-L:-n,o=R||-n,s=N?t-N:-n;return(0,h.jsx)(a.default,{pointerEvents:"box-none",style:Object.assign({left:r,right:i,top:o,bottom:s},m.debugView)})}),[L,N,M,R]);return(0,h.jsxs)(a.default,{pointerEvents:"box-none",style:K,children:[w&&te(),(0,h.jsx)(l.default.View,Object.assign({pointerEvents:"box-none"},F,X.panHandlers,{style:B.current.getLayout(),children:(0,h.jsx)(c.default,Object.assign({},k,{onLayout:Q,style:J,disabled:v,onPress:A,onLongPress:E,onPressIn:C,onPressOut:ee,children:Z}))}))]})}p.defaultProps={renderText:"\uff0b",renderSize:36,shouldReverse:!1,disabled:!1,debug:!1,accelerationValue:1,onDrag:()=>{},onShortPressRelease:()=>{},onDragRelease:()=>{},onLongPress:()=>{},onPressIn:()=>{},onPressOut:()=>{},onRelease:()=>{},x:0,y:0,z:1};const m=d.default.create({text:{color:"#fff",textAlign:"center"},debugView:{backgroundColor:"#ff000044",position:"absolute",borderColor:"#fced0ecc",borderWidth:4}}),g=p},91356:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>V});var r=n(48623);const a={EN:{PLACEHOLDER:"Select an item",SEARCH_PLACEHOLDER:"Type something...",SELECTED_ITEMS_COUNT_TEXT:{1:"An item has been selected",n:"{count} items have been selected"},NOTHING_TO_SHOW:"There's nothing to show!"},AR:{PLACEHOLDER:"\u062d\u062f\u062f \u0639\u0646\u0635\u0631",SEARCH_PLACEHOLDER:"\u064a\u0628\u062d\u062b...",SELECTED_ITEMS_COUNT_TEXT:"\u062a\u0645 \u0627\u062e\u062a\u06cc\u0627\u0631 {count} \u0639\u0646\u0635\u0631",NOTHING_TO_SHOW:"\u0644\u0627 \u064a\u0648\u062c\u062f \u0634\u064a\u0621 \u0644\u0639\u0631\u0636\u0647!"},FA:{PLACEHOLDER:"\u0622\u06cc\u062a\u0645\u06cc \u0627\u0646\u062a\u062e\u0627\u0628 \u06a9\u0646\u06cc\u062f",SEARCH_PLACEHOLDER:"\u0686\u06cc\u0632\u06cc \u062a\u0627\u06cc\u067e \u06a9\u0646\u06cc\u062f...",SELECTED_ITEMS_COUNT_TEXT:{1:"\u06cc\u06a9 \u0622\u06cc\u062a\u0645 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a",n:"{count} \u0622\u06cc\u062a\u0645 \u0627\u0646\u062a\u062e\u0627\u0628 \u0634\u062f\u0647 \u0627\u0633\u062a"},NOTHING_TO_SHOW:"\u0686\u06cc\u0632\u06cc \u0628\u0631\u0627\u06cc \u0646\u0645\u0627\u06cc\u0634 \u0648\u062c\u0648\u062f \u0646\u062f\u0627\u0631\u062f!"},TR:{PLACEHOLDER:"Bir se\xe7enek se\xe7in",SEARCH_PLACEHOLDER:"Arama...",SELECTED_ITEMS_COUNT_TEXT:{1:"Bir \xf6\u011fe se\xe7ildi",n:"{count} \xf6\u011fe se\xe7ildi"},NOTHING_TO_SHOW:"G\xf6sterecek hi\xe7bir \u015fey yok!"},RU:{PLACEHOLDER:"\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442",SEARCH_PLACEHOLDER:"\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0442\u0435\u043a\u0441\u0442...",SELECTED_ITEMS_COUNT_TEXT:"\u0412\u044b\u0431\u0440\u0430\u043d\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432: {count}",NOTHING_TO_SHOW:"\u042d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u044b!"},ES:{PLACEHOLDER:"Selecciona un elemento",SEARCH_PLACEHOLDER:"Escribe algo...",SELECTED_ITEMS_COUNT_TEXT:"Se han seleccionado {count} elemento(s)",NOTHING_TO_SHOW:"\xa1No hay nada que mostrar!"},ID:{PLACEHOLDER:"Pilih item",SEARCH_PLACEHOLDER:"Ketik sesuatu...",SELECTED_ITEMS_COUNT_TEXT:"{count} item telah dipilih",NOTHING_TO_SHOW:"Tidak ada yang bisa ditampilkan!"},IT:{PLACEHOLDER:"Seleziona un elemento",SEARCH_PLACEHOLDER:"Digita qualcosa...",SELECTED_ITEMS_COUNT_TEXT:{1:"Un elemento \xe8 stato selezionato",n:"{count} elementi sono stati selezionati"},NOTHING_TO_SHOW:"Non c'\xe8 nulla da mostrare!"},PT:{PLACEHOLDER:"Selecione um item",SEARCH_PLACEHOLDER:"Fa\xe7a sua busca...",SELECTED_ITEMS_COUNT_TEXT:{1:"Um item selecionado",n:"{count} alguns itens selecionados"},NOTHING_TO_SHOW:"Nada a ser mostrado!"},FR:{PLACEHOLDER:"S\xe9lectionnez un \xe9l\xe9ment",SEARCH_PLACEHOLDER:"Tapez quelque chose...",SELECTED_ITEMS_COUNT_TEXT:{1:"Un \xe9l\xe9ment a \xe9t\xe9 s\xe9lectionn\xe9",n:"{count} \xe9l\xe9ments ont \xe9t\xe9 s\xe9lectionn\xe9s"},NOTHING_TO_SHOW:"Il n'y a rien \xe0 montrer!"}};var i=n(29233);const o={label:"label",value:"value",icon:"icon",parent:"parent",selectable:"selectable",disabled:"disabled",testID:"testID",containerStyle:"containerStyle",labelStyle:"labelStyle"},s={DEFAULT:"SIMPLE",SIMPLE:"SIMPLE",BADGE:"BADGE"},l={DEFAULT:"FLATLIST",FLATLIST:"FLATLIST",SCROLLVIEW:"SCROLLVIEW",MODAL:"MODAL"},u={DEFAULT:"AUTO",TOP:"TOP",BOTTOM:"BOTTOM",AUTO:"AUTO"},c={DEFAULT:"EN",FALLBACK:"EN",ENGLISH:"EN",ARABIC:"AR",FARSI:"FA",TURKISH:"TR",RUSSIAN:"RU",SPANISH:"ES",INDONESIAN:"ID",ITALIAN:"IT"},d=e=>{switch(e){case u.AUTO:return"top";case u.TOP:return"bottom";default:return"top"}},h={marginStart:"marginRight",marginEnd:"marginLeft",paddingStart:"paddingRight",paddingEnd:"paddingLeft",marginLeft:"marginRight",marginRight:"marginLeft",paddingLeft:"paddingRight",paddingRight:"paddingLeft"},f=(e,t)=>{const n=Object.assign({},t);return e&&!r.default.isRTL&&(n.hasOwnProperty("flexDirection")?n.flexDirection="row"===n.flexDirection?"row-reverse":"row":n.flexDirection="row-reverse"),n},p=(e,t)=>{const n=Object.assign({},t);return e&&!r.default.isRTL&&Object.keys(t).map((e=>{h.hasOwnProperty(e)?(n[h[e]]=n[e],delete n[e]):n[e]=n[e]})),n},m=[i.default.ALTO],g=[i.default.GREY],y=e=>{let t=0;if(0===e.length)return t;for(let n=0;nd(r)),[d,r]),g=(0,b.useMemo)((()=>[f(e,h.badgeStyle),...[i].flat(),{backgroundColor:l(r)}]),[h,e,i,l]),y=(0,b.useMemo)((()=>[p(e,h.badgeDotStyle),...[s].flat(),{backgroundColor:u(r)}]),[h,e,s,u]),_=(0,b.useMemo)((()=>[...[a].flat(),...[o].flat()]),[a,o]);return(0,P.jsxs)(F.default,Object.assign({style:g},n,{onPress:m,children:[c&&(0,P.jsx)(v.default,{style:y}),(0,P.jsx)(k.default,{style:_,children:t})]}))}),((e,t)=>e.label===t.label&&(e.value===t.value&&(e.showBadgeDot===t.showBadgeDot&&(e.rtl===t.rtl&&e.theme===t.theme)))));const R=(0,b.memo)((function({rtl:e,item:t,label:n,value:r,parent:a,selectable:i,disabled:o,props:s,labelProps:l,custom:u,isSelected:c,IconComponent:d,TickIconComponent:h,listItemContainerStyle:f,listItemLabelStyle:p,listChildContainerStyle:m,listParentContainerStyle:g,listChildLabelStyle:y,listParentLabelStyle:_,customItemContainerStyle:v,customItemLabelStyle:w,selectedItemContainerStyle:x,selectedItemLabelStyle:A,disabledItemContainerStyle:S,disabledItemLabelStyle:E,containerStyle:C,labelStyle:T,categorySelectable:D,onPress:I,setPosition:O,THEME:M}){const R=(0,b.useMemo)((()=>c&&(0,P.jsx)(h,{})),[c,h]),L=(0,b.useMemo)((()=>null!==a?[M.listChildContainer,...[m].flat()]:[M.listParentContainer,...[g].flat()]),[M,e,m,g,a]),N=(0,b.useMemo)((()=>c&&x),[c,x]),B=(0,b.useMemo)((()=>o&&S),[o,S]),j=(0,b.useMemo)((()=>u&&[M.customItemContainer,...[v].flat()]),[M,u,v]),V=(0,b.useMemo)((()=>[...[f].flat(),...[L].flat(),...[C].flat(),...[N].flat(),...[j].flat(),...[B].flat()]),[f,L,N,j,B,C]),z=(0,b.useMemo)((()=>null!==a?[M.listChildLabel,...[y].flat()]:[M.listParentLabel,...[_].flat()]),[M,y,_,a]),H=(0,b.useMemo)((()=>c&&A),[c,A]),U=(0,b.useMemo)((()=>o&&E),[o,E]),W=(0,b.useMemo)((()=>u&&[M.customItemLabel,...[w].flat()]),[M,u,w]),q=(0,b.useMemo)((()=>[...[p].flat(),...[z].flat(),...[T].flat(),...[H].flat(),...[W].flat(),...[U].flat()]),[p,z,H,W,U,T]),$=(0,b.useCallback)((()=>{(null!==a||D||!0===i)&&I(t,u)}),[I,a,D,u]),Y=(0,b.useCallback)((({nativeEvent:{layout:{y:e}}})=>{O(r,e)}),[r]);return(0,P.jsxs)(F.default,Object.assign({style:V,onPress:$,onLayout:Y},s,{disabled:!1===i||o,testID:t.testID,children:[d,(0,P.jsx)(k.default,Object.assign({style:q},l,{children:n})),R]}))}),((e,t)=>e.label===t.label&&(e.value===t.value&&(e.parent===t.parent&&(e.selectable===t.selectable&&(e.disabled===t.disabled&&(e.custom===t.custom&&(e.isSelected===t.isSelected&&(e.categorySelectable===t.categorySelectable&&(e.rtl===t.rtl&&e.theme===t.theme))))))))));const L=(0,b.memo)((function({loading:e,message:t,ActivityIndicatorComponent:n,listMessageContainerStyle:r,listMessageTextStyle:a}){return(0,P.jsx)(v.default,{style:r,children:e?(0,P.jsx)(n,{}):(0,P.jsx)(k.default,{style:a,children:t})})})),{height:N}=E.default.get("window");const B=O.default.create({flex:{flex:1}}),j=(0,b.memo)((function({value:e=null,items:t=[],open:n,placeholder:r=null,closeAfterSelecting:h=!0,labelProps:E={},disabled:O=!1,disabledStyle:j={},placeholderStyle:V={},containerStyle:z={},style:H={},textStyle:U={},labelStyle:W={},arrowIconStyle:q={},tickIconStyle:$={},closeIconStyle:Y={},hideSelectedItemIcon:G=!1,badgeStyle:X={},badgeTextStyle:K={},badgeDotStyle:J={},iconContainerStyle:Z={},searchContainerStyle:Q={},searchTextInputStyle:ee={},searchPlaceholderTextColor:te=i.default.GREY,dropDownContainerStyle:ne={},modalContentContainerStyle:re={},modalAnimationType:ae="none",arrowIconContainerStyle:ie={},closeIconContainerStyle:oe={},tickIconContainerStyle:se={},listItemContainerStyle:le={},listItemLabelStyle:ue={},listChildContainerStyle:ce={},listChildLabelStyle:de={},listParentContainerStyle:he={},listParentLabelStyle:fe={},selectedItemContainerStyle:pe={},selectedItemLabelStyle:me={},disabledItemContainerStyle:ge={},disabledItemLabelStyle:ye={},customItemContainerStyle:_e={},customItemLabelStyle:be={},listMessageContainerStyle:ve={},listMessageTextStyle:we={},itemSeparatorStyle:Fe={},badgeSeparatorStyle:ke={},modalTitleStyle:xe={},listMode:Ae=l.DEFAULT,categorySelectable:Se=!0,searchable:Ee=!1,searchWithRegionalAccents:Ce=!1,searchPlaceholder:Te=null,modalTitle:De,schema:Ie={},language:Oe=c.DEFAULT,translation:Pe={},multiple:Me=!1,multipleText:Re=null,mode:Le=s.DEFAULT,itemKey:Ne=null,maxHeight:Be=200,renderBadgeItem:je=null,renderListItem:Ve=null,itemSeparator:ze=!1,bottomOffset:He=0,badgeColors:Ue=m,badgeDotColors:We=g,showArrowIcon:qe=!0,showBadgeDot:$e=!0,showTickIcon:Ye=!0,stickyHeader:Ge=!1,autoScroll:Xe=!1,ArrowUpIconComponent:Ke=null,ArrowDownIconComponent:Je=null,TickIconComponent:Ze=null,CloseIconComponent:Qe=null,ListEmptyComponent:et=null,ActivityIndicatorComponent:tt=null,activityIndicatorSize:nt=30,activityIndicatorColor:rt=i.default.GREY,props:at={},itemProps:it={},itemLabelProps:ot={},badgeProps:st={},modalProps:lt={},flatListProps:ut={},scrollViewProps:ct={},searchTextInputProps:dt={},loading:ht=!1,min:ft=null,max:pt=null,addCustomItem:mt=!1,setOpen:gt=()=>{},setItems:yt=()=>{},disableBorderRadius:_t=!0,containerProps:bt={},onLayout:vt=e=>{},onPress:wt=e=>{},onOpen:Ft=()=>{},onClose:kt=()=>{},setValue:xt=e=>{},onChangeValue:At=e=>{},onChangeSearchText:St=e=>{},onDirectionChanged:Et=e=>{},zIndex:Ct=5e3,zIndexInverse:Tt=6e3,rtl:Dt=!1,dropDownDirection:It=u.DEFAULT,disableLocalSearch:Ot=!1,theme:Pt=_.DEFAULT,testID:Mt,closeOnBackPressed:Rt=!1,extendableBadgeContainer:Lt=!1,onSelectItem:Nt=e=>{}}){const[Bt,jt]=(0,b.useState)([]),[Vt,zt]=(0,b.useState)(""),[Ht,Ut]=(0,b.useState)(0),[Wt,qt]=(0,b.useState)(d(It)),$t=(0,b.useRef)(),Yt=(0,b.useRef)(null),Gt=(0,b.useRef)(!1),Xt=(0,b.useRef)({}),Kt=(0,b.useRef)(),Jt=(0,b.useRef)(),Zt=(0,b.useRef)({value:null,items:[]}),Qt=(0,b.useMemo)((()=>_[Pt].default),[Pt]),en=(0,b.useMemo)((()=>_[Pt].ICONS),[Pt]),tn=(0,b.useMemo)((()=>Object.assign({},o,Ie)),[Ie]);(0,b.useEffect)((()=>{Zt.current.value=Me?Array.isArray(e)?e:[]:e;let n=[];null!==e&&Array.isArray(e)&&0!==e.length&&(n=Me?t.filter((t=>e.includes(t[tn.value]))):t.find((t=>t[tn.value]===e))),jt(n)}),[]),(0,b.useEffect)((()=>{if(Rt&&n){const e=()=>(gt(!1),!0),t=I.default.addEventListener("hardwareBackPress",e);return()=>t.remove()}}),[n]),(0,b.useEffect)((()=>{jt((e=>[...e].map((e=>{const n=t.find((t=>t[tn.value]===e[tn.value]));return n?Object.assign({},e,n):e}))))}),[t]),(0,b.useEffect)((()=>{if(Me)jt((n=>{if(null===e||Array.isArray(e)&&0===e.length)return[];let r=[...n].filter((t=>e.includes(t[tn.value])));const a=e.reduce(((e,n)=>{if(-1===r.findIndex((e=>e[tn.value]===n))){const r=t.find((e=>e[tn.value]===n));return r?[...e,r]:e}return e}),[]);return[...r,...a]}));else{let n=[];if(null!==e){const r=t.find((t=>t[tn.value]===e));r&&n.push(r)}jt(n)}Gt.current?At(e):Gt.current=!0}),[e,t]),(0,b.useEffect)((()=>{Zt.current.value=e}),[e]),(0,b.useEffect)((()=>{Zt.current.items=Bt}),[Bt]),(0,b.useEffect)((()=>{n&&Xe&&on()}),[n]),(0,b.useEffect)((()=>{qt(d(It))}),[It]),(0,b.useEffect)((()=>{Le===s.SIMPLE&&($t.current=null)}),[Le]);const nn=(0,b.useCallback)((()=>{gt(!1),zt(""),kt()}),[gt,kt]),rn=((0,b.useCallback)((()=>{gt(!0),Ft()}),[gt,Ft]),(0,b.useCallback)((()=>{const e=!n;return gt(e),zt(""),e?Ft():kt(),e}),[n,gt,Ft,kt])),an=(0,b.useMemo)((()=>{const e=t.filter((e=>void 0===e[tn.parent]||null===e[tn.parent]));return t.filter((e=>void 0!==e[tn.parent]&&null!==e[tn.parent])).forEach((t=>{const n=e.findIndex((e=>e[tn.parent]===t[tn.parent]||e[tn.value]===t[tn.parent]));n>-1&&e.splice(n+1,0,t)})),e}),[t,tn]),on=(0,b.useCallback)((()=>{setTimeout((()=>{if(Jt.current||Kt.current){const e=Array.isArray(Zt.current.value);if(null===Zt.current.value||e&&0===Zt.current.value.length)return;const t=e?Zt.current.value[0]:Zt.current.value;if(Jt.current&&Xt.current.hasOwnProperty(t))Jt.current?.scrollTo?.({x:0,y:Xt.current[t],animated:!0});else{const e=an.findIndex((e=>e[tn.value]===t));e>-1&&Kt.current?.scrollToIndex?.({index:e,animated:!0})}}}),200)}),[an]),sn=(0,b.useCallback)((({averageItemLength:e,index:t})=>{Kt.current.scrollToOffset?.({offset:e*t,animated:!0})}),[]),ln=(0,b.useMemo)((()=>{const e=[];if(Ge){an.filter((e=>void 0===e[tn.parent]||null===e[tn.parent])).forEach((t=>{const n=an.findIndex((e=>e[tn.value]===t[tn.value]));n>-1&&e.push(n)}))}return e}),[Ge,an]),un=(0,b.useMemo)((()=>{if(0===Vt.length)return an;{if(Ot)return an;const e=[],t=e=>e.normalize("NFD").replace(/[\u0300-\u036f]/g,"");let n=an.filter((n=>{const r=String(n[tn.label]).toLowerCase();return!!(r.includes(Vt.toLowerCase())||Ce&&t(r).includes(Vt.toLowerCase()))&&(e.push(n[tn.value]),!0)}));return n.forEach(((t,r)=>{if(void 0===t[tn.parent]||null===t[tn.parent]||e.includes(t[tn.parent]))return;const a=an.find((e=>e[tn.value]===t[tn.parent]));e.push(t[tn.parent]),n.splice(r,0,a)})),0!==n.length&&-1!==n.findIndex((e=>String(e[tn.label]).toLowerCase()===Vt.toLowerCase()))||!mt||n.push({[tn.label]:Vt,[tn.value]:Vt.replace(" ","-"),custom:!0}),n}}),[an,tn,Vt,mt]),cn=(0,b.useMemo)((()=>Me?null===e?[]:[...new Set(e)]:e),[e,Me]),dn=(0,b.useMemo)((()=>Me?Bt.filter((e=>cn.includes(e[tn.value]))):[]),[Bt,cn,tn,Me]),hn=(0,b.useMemo)((()=>a.hasOwnProperty(Oe)?Oe:c.FALLBACK),[Oe]),fn=(0,b.useCallback)((e=>((e,t=c.DEFAULT,n={})=>{try{const r=Object.assign({},a[t],n)[e];if("undefined"===typeof r)throw Error();return r}catch(r){return Object.assign({},a[c.FALLBACK],n)[e]}})(e,hn,Pe)),[hn,Pe]),pn=(0,b.useMemo)((()=>r??fn("PLACEHOLDER")),[r,fn]),mn=(0,b.useMemo)((()=>Re??fn("SELECTED_ITEMS_COUNT_TEXT")),[Re,fn]),gn=(0,b.useMemo)((()=>{try{return Le}catch(e){return s.SIMPLE}}),[Le]),yn=(0,b.useMemo)((()=>!!(null===cn||Array.isArray(cn)&&0===cn.length)||0===Bt.length),[Bt,cn]),_n=(0,b.useCallback)((()=>{if(Me)return cn;if(yn)return null;try{return Bt.find((e=>e[tn.value]===cn))}catch(e){return null}}),[cn,Bt,yn,Me]),bn=(0,b.useCallback)(((e=null)=>{const t=_n();if(Me){if(t.length>0){let e=mn;return"string"!==typeof e&&(e=e[t.length]??e.n),e.replace("{count}",t.length)}return e}try{return t[tn.label]}catch(n){return e}}),[_n,Me,mn,tn]),vn=(0,b.useMemo)((()=>bn(pn)),[bn,pn]),wn=(0,b.useCallback)((()=>{if(Me)return null;const e=_n();try{return e[tn.icon]??null}catch(t){return null}}),[_n,Me,tn]),Fn=(0,b.useCallback)((async()=>{const e=!n;if(wt(e),e&&It===u.AUTO){const[,e]=await new Promise((e=>Yt.current.measureInWindow(((...t)=>e(t))))),t=e+Be+Ht+He{vt(e),Ut(e.nativeEvent.layout.height)}),[vt]),xn=(0,b.useMemo)((()=>Ae===l.MODAL?null:_t&&n?"top"===Wt?{borderBottomLeftRadius:0,borderBottomRightRadius:0}:{borderTopLeftRadius:0,borderTopRightRadius:0}:{}),[_t,n,Wt,Ae]),An=(0,b.useMemo)((()=>Ae===l.MODAL?null:_t&&n?"top"===Wt?{borderTopLeftRadius:0,borderTopRightRadius:0}:{borderBottomLeftRadius:0,borderBottomRightRadius:0}:void 0),[_t,n,Wt,Ae]),Sn=(0,b.useMemo)((()=>O&&j),[O,j]),En=(0,b.useMemo)((()=>n?"top"===Wt?Ct:Tt:Ct),[Ct,Tt,Wt,n]),Cn=(0,b.useMemo)((()=>[f(Dt,Qt.style),{zIndex:En},...[H].flat(),...[Sn].flat(),xn]),[Dt,H,Sn,xn,En,Qt]),Tn=(0,b.useMemo)((()=>yn&&V),[yn,V]),Dn=(0,b.useMemo)((()=>[Qt.label,...[U].flat(),...[!yn&&W].flat(),...[Tn].flat()]),[U,Tn,W,yn,Qt]),In=(0,b.useMemo)((()=>[Qt.arrowIcon,...[q].flat()]),[q,Qt]),On=(0,b.useMemo)((()=>[Qt.dropDownContainer,{[Wt]:Ht-1,maxHeight:Be,zIndex:En},...[ne].flat(),An]),[ne,Ht,Be,An,Wt,En,Qt]),Pn=(0,b.useMemo)((()=>[Qt.modalContentContainer,...[re].flat()]),[re,Qt]),Mn=(0,b.useMemo)((()=>({zIndex:En})),[En]),Rn=(0,b.useMemo)((()=>[Qt.container,Mn,...[z].flat()]),[Mn,z,Qt]),Ln=(0,b.useMemo)((()=>[p(Dt,Qt.arrowIconContainer),...[ie].flat()]),[Dt,ie,Qt]),Nn=(0,b.useMemo)((()=>{if(!qe)return null;let e;return e=n&&null!==Ke?(0,P.jsx)(Ke,{style:In}):n||null===Je?(0,P.jsx)(x.default,{source:n?en.ARROW_UP:en.ARROW_DOWN,style:In}):(0,P.jsx)(Je,{style:In}),(0,P.jsx)(v.default,{style:Ln,children:e})}),[qe,n,Ke,Je,In,Ln,en]),Bn=(0,b.useMemo)((()=>[p(Dt,Qt.iconContainer),...[Z].flat()]),[Dt,Z,Qt]),jn=(0,b.useMemo)((()=>{const e=wn();return G?null:null!==e&&(0,P.jsx)(v.default,{style:Bn,children:(0,P.jsx)(e,{})})}),[wn,G,Bn]),Vn=(0,b.useMemo)((()=>(0,P.jsxs)(P.Fragment,{children:[jn,(0,P.jsx)(k.default,Object.assign({style:Dn},E,{children:vn}))]})),[jn,Dn,E,vn]),zn=(0,b.useCallback)((e=>{xt((t=>{let n=[...t];const r=n.findIndex((t=>t===e));return n.splice(r,1),n}))}),[xt]),Hn=(0,b.useMemo)((()=>"string"===typeof Ue?[Ue]:Ue),[Ue]),Un=(0,b.useMemo)((()=>"string"===typeof We?[We]:We),[We]),Wn=(0,b.useCallback)((e=>{e=`${e}`;const t=Math.abs(y(e))%Hn.length;return Hn[t]}),[Hn]),qn=(0,b.useCallback)((e=>{e=`${e}`;const t=Math.abs(y(e))%Un.length;return Un[t]}),[Un]),$n=(0,b.useMemo)((()=>null!==je?je:M),[je]),Yn=(0,b.useCallback)((({item:e})=>(0,P.jsx)($n,{props:st,rtl:Dt,label:e[tn.label],value:e[tn.value],IconComponent:e[tn.icon]??null,textStyle:U,badgeStyle:X,badgeTextStyle:K,badgeDotStyle:J,getBadgeColor:Wn,getBadgeDotColor:qn,showBadgeDot:$e,onPress:zn,theme:Pt,THEME:Qt})),[Dt,tn,U,X,K,J,Wn,qn,$e,zn,Pt,Qt]),Gn=(0,b.useMemo)((()=>null===Ne?tn.value:Ne),[Ne,tn]),Xn=(0,b.useCallback)((e=>`${e[Gn]}`),[Gn]),Kn=(0,b.useMemo)((()=>[Qt.badgeSeparator,...[ke].flat()]),[ke,Qt]),Jn=(0,b.useCallback)((()=>(0,P.jsx)(v.default,{style:Kn})),[Kn]),Zn=(0,b.useMemo)((()=>[Qt.labelContainer,Dt&&{transform:[{scaleX:-1}]}]),[Dt,Qt]),Qn=(0,b.useCallback)((()=>(0,P.jsx)(v.default,{style:Zn,children:(0,P.jsx)(k.default,Object.assign({style:Dn},E,{children:pn}))})),[Dn,Zn,E,pn]),er=(0,b.useCallback)((e=>{$t.current=e}),[]),tr=(0,b.useMemo)((()=>[f(Dt,Qt.extendableBadgeContainer)]),[Dt,Qt]),nr=(0,b.useMemo)((()=>[Qt.extendableBadgeItemContainer,Dt&&{marginEnd:0,marginStart:Qt.extendableBadgeItemContainer.marginEnd}]),[Dt,Qt]),rr=(0,b.useCallback)((({selectedItems:e})=>e.length>0?(0,P.jsx)(v.default,{style:tr,children:e.map(((e,t)=>(0,P.jsx)(v.default,{style:nr,children:(0,P.jsx)(Yn,{item:e})},t)))}):(0,P.jsx)(Qn,{})),[Yn,tr,nr]),ar=(0,b.useMemo)((()=>Lt?(0,P.jsx)(rr,{selectedItems:dn}):(0,P.jsx)(A.default,{ref:er,data:dn,renderItem:Yn,horizontal:!0,showsHorizontalScrollIndicator:!1,keyExtractor:Xn,ItemSeparatorComponent:Jn,ListEmptyComponent:Qn,style:Qt.listBody,contentContainerStyle:Qt.listBodyContainer,inverted:Dt})),[Dt,Lt,rr,dn,Yn,Xn,Jn,Qn,Qt]),ir=(0,b.useMemo)((()=>{switch(gn){case s.SIMPLE:return Vn;case s.BADGE:return Me?ar:Vn}}),[gn,Vn,ar,Me]),or=(0,b.useMemo)((()=>[f(Dt,Qt.listItemContainer),...[le].flat(),Ge&&{backgroundColor:Qt.style.backgroundColor}]),[Dt,le,Qt]),sr=(0,b.useMemo)((()=>[p(Dt,Qt.tickIconContainer),...[se].flat()]),[Dt,se,Qt]),lr=(0,b.useMemo)((()=>[Qt.listItemLabel,...[U].flat(),...[ue].flat()]),[U,ue,Qt]),ur=(0,b.useMemo)((()=>[Qt.tickIcon,...[$].flat()]),[$,Qt]),cr=(0,b.useMemo)((()=>[f(Dt,Qt.searchContainer),...[Q].flat(),!Ee&&!De&&Ae===l.MODAL&&{flexDirection:"row-reverse"}]),[Dt,Ae,Ee,De,Q,Qt]),dr=(0,b.useMemo)((()=>[U,Qt.searchTextInput,...[ee].flat()]),[U,ee,Qt]),hr=(0,b.useMemo)((()=>[p(Dt,Qt.closeIconContainer),...[oe].flat()]),[Dt,oe,Qt]),fr=(0,b.useMemo)((()=>[Qt.closeIcon,...[Y].flat()]),[Y,Qt]),pr=(0,b.useMemo)((()=>[Qt.listMessageContainer,...[ve].flat()]),[ve,Qt]),mr=(0,b.useMemo)((()=>[Qt.listMessageText,...[U].flat(),...[we].flat()]),[we,Qt]),gr=(0,b.useCallback)(((e,t=!1)=>{if(!1!==t&&(e.custom=!1,yt((t=>[...t,e]))),Me)if(Zt.current.value?.includes(e[tn.value])){const t=Zt.current.items.findIndex((t=>t[tn.value]===e[tn.value]));t>-1&&(Zt.current.items.splice(t,1),Nt(Zt.current.items.slice()))}else Nt([...Zt.current.items,e]);else Nt(e);xt((t=>{if(Me){let n=null!==t&&void 0!==t?[...t]:[];if(n.includes(e[tn.value])){if(Number.isInteger(ft)&&ft>=n.length)return t;const r=n.findIndex((t=>t===e[tn.value]));n.splice(r,1)}else{if(Number.isInteger(pt)&&pt<=n.length)return t;n.push(e[tn.value])}return n}return e[tn.value]})),jt((t=>{if(Me){const n=[...t];if(n.findIndex((t=>t[tn.value]===e[tn.value]))>-1){if(Number.isInteger(ft)&&ft>=n.length)return t;const r=n.findIndex((t=>t[tn.value]===e[tn.value]));return n.splice(r,1),n}return Number.isInteger(pt)&&pt<=n.length?t:(n.push(e),n)}return[e]})),h&&!Me&&nn()}),[xt,Me,ft,pt,nn,Nt,h,Me,yt,tn]),yr=(0,b.useCallback)((()=>{if(!Ye)return null;let e;return e=null!==Ze?(0,P.jsx)(Ze,{style:ur}):(0,P.jsx)(x.default,{source:en.TICK,style:ur}),(0,P.jsx)(v.default,{style:sr,children:e})}),[Ze,ur,sr,Ye,en]),_r=(0,b.useMemo)((()=>null!==Ve?Ve:R),[Ve]),br=(0,b.useMemo)((()=>[Qt.selectedItemContainer,pe]),[Qt,pe]),vr=(0,b.useMemo)((()=>[Qt.selectedItemLabel,me]),[Qt,me]),wr=(0,b.useMemo)((()=>[Qt.disabledItemContainer,ge]),[Qt,ge]),Fr=(0,b.useMemo)((()=>[Qt.disabledItemContainer,ye]),[Qt,ye]),kr=(0,b.useCallback)((({item:e})=>{let t,n=e[tn.icon]??null;return n&&(n=(0,P.jsx)(v.default,{style:Bn,children:(0,P.jsx)(n,{})})),t=Me?cn.includes(e[tn.value]):cn===e[tn.value],(0,P.jsx)(_r,{rtl:Dt,item:e,label:e[tn.label],value:e[tn.value],parent:e?.[tn.parent]??null,selectable:e?.[tn.selectable]??null,disabled:e?.[tn.disabled]??!1,custom:e.custom??!1,props:it,labelProps:ot,isSelected:t,IconComponent:n,TickIconComponent:yr,listItemContainerStyle:or,listItemLabelStyle:lr,listChildContainerStyle:ce,listChildLabelStyle:de,listParentContainerStyle:he,listParentLabelStyle:fe,customItemContainerStyle:_e,customItemLabelStyle:be,selectedItemContainerStyle:br,selectedItemLabelStyle:vr,disabledItemContainerStyle:wr,disabledItemLabelStyle:Fr,labelStyle:e?.[tn.labelStyle]??{},containerStyle:e?.[tn.containerStyle]??{},categorySelectable:Se,onPress:gr,setPosition:xr,theme:Pt,THEME:Qt})}),[Dt,_r,lr,Bn,ce,de,he,fe,or,lr,_e,be,br,vr,wr,Fr,yr,tn,cn,Me,it,ot,Se,gr,Pt,Qt]),xr=(0,b.useCallback)(((e,t)=>{Xe&&Ae===l.SCROLLVIEW&&(Xt.current[e]=t)}),[]),Ar=(0,b.useCallback)((()=>ze?(0,P.jsx)(v.default,{style:[Qt.itemSeparator,...[Fe].flat()]}):null),[ze,Fe,Qt]),Sr=(0,b.useMemo)((()=>null!==Te?Te:fn("SEARCH_PLACEHOLDER")),[Te,fn]),Er=(0,b.useCallback)((e=>{zt(e),St(e)}),[St]),Cr=(0,b.useMemo)((()=>{if(Ae!==l.MODAL)return null;let e;return e=null!==Qe?(0,P.jsx)(Qe,{style:fr}):(0,P.jsx)(x.default,{source:en.CLOSE,style:fr}),(0,P.jsx)(F.default,{style:hr,onPress:nn,children:e})}),[Ae,Qe,fr,hr,nn,en]),Tr=(0,b.useMemo)((()=>Ae===l.MODAL||Ee),[Ae,Ee]),Dr=(0,b.useMemo)((()=>[Qt.modalTitle,...[xe].flat(),...[U].flat()]),[U,xe,Qt]),Ir=(0,b.useMemo)((()=>Tr&&(0,P.jsxs)(v.default,{style:cr,children:[Ee?(0,P.jsx)(S.default,Object.assign({value:Vt,onChangeText:Er,style:dr,placeholder:Sr,placeholderTextColor:te},dt)):Ae===l.MODAL&&(0,P.jsx)(v.default,{style:B.flex,children:(0,P.jsx)(k.default,{style:Dr,children:De})}),Cr]})),[Ee,Ae,De,Tr,Er,Dr,cr,dr,Sr,te,Vt,dt]),Or=(0,b.useCallback)((e=>(0,P.jsxs)(v.default,{style:On,children:[Ir,e]})),[On,Ir]),Pr=(0,b.useCallback)((()=>{let e;return e=null!==tt?tt:D.default,(0,P.jsx)(e,{size:nt,color:rt})}),[tt,nt,rt]),Mr=(0,b.useCallback)((()=>{let e;const t=fn("NOTHING_TO_SHOW");return e=null!==et?et:L,(0,P.jsx)(e,{listMessageContainerStyle:pr,listMessageTextStyle:mr,ActivityIndicatorComponent:Pr,loading:ht,message:t})}),[fn,pr,mr,et,Pr,ht]),Rr=(0,b.useCallback)((()=>{gt(!1)}),[]),Lr=(0,b.useMemo)((()=>(0,P.jsx)(A.default,Object.assign({ref:Kt,style:B.flex,contentContainerStyle:Qt.flatListContentContainer,ListEmptyComponent:Mr,data:un,renderItem:kr,keyExtractor:Xn,extraData:cn,ItemSeparatorComponent:Ar,stickyHeaderIndices:ln,onScrollToIndexFailed:sn},ut))),[un,cn,kr,Xn,Ar,ut,Mr,Qt]),Nr=(0,b.useMemo)((()=>(0,P.jsxs)(C.default,Object.assign({ref:Jt,nestedScrollEnabled:!0,stickyHeaderIndices:ln},ct,{children:[un.map(((e,t)=>(0,P.jsxs)(b.Fragment,{children:[t>0&&Ar(),kr({item:e})]},e[Gn]))),0===un.length&&Mr()]}))),[kr,Gn,ct,Mr]),Br=(0,b.useMemo)((()=>(0,P.jsx)(T.default,Object.assign({animationType:ae,visible:n,presentationStyle:"fullScreen",onRequestClose:Rr},lt,{children:(0,P.jsxs)(w.default,{style:Pn,children:[Ir,Lr]})}))),[n,Ir,Pn,lt]),jr=(0,b.useMemo)((()=>{switch(Ae){case l.FLATLIST:return Or(Lr);case l.SCROLLVIEW:return Or(Nr);case l.MODAL:return Br}}),[Ae,Lr,Nr,Br,Or]),Vr=(0,b.useMemo)((()=>n||Ae===l.MODAL?jr:null),[n,Ae,jr]),zr=(0,b.useCallback)((e=>{Yt.current=e}),[]),Hr=(0,b.useMemo)((()=>O?"none":"auto"),[O]);return(0,P.jsx)(P.Fragment,{children:(0,P.jsxs)(v.default,Object.assign({style:Rn},bt,{children:[(0,P.jsxs)(F.default,Object.assign({style:Cn,onPress:Fn,onLayout:kn},at,{ref:zr,pointerEvents:Hr,disabled:O,testID:Mt,children:[ir,Nn]})),Vr]}))})}));j.MODE=s,j.setMode=e=>{j.MODE.DEFAULT=e},j.LIST_MODE=l,j.setListMode=e=>{j.LIST_MODE.DEFAULT=e},j.DROPDOWN_DIRECTION=u,j.setDropDownDirection=e=>{j.DROPDOWN_DIRECTION.DEFAULT=e},j.LANGUAGE=c,j.setLanguage=e=>{c.DEFAULT=e},j.addTranslation=(e,t)=>{a[e]=t},j.modifyTranslation=(e,t)=>{a.hasOwnProperty(e)&&(a[e]=Object.assign({},a[e],t))},j.THEMES=_,j.setTheme=e=>{j.THEMES.DEFAULT=e},j.addTheme=(e,t)=>{j.THEMES[e]=t};const V=j},29233:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={WHITE:"#fff",BLACK:"#000",ALTO:"#dfdfdf",GREY:"#808080",EBONY_CLAY:"#292d3e",HEATHER:"#bfc7d5",LYNCH:"#697098",SHARK:"#242526",SHUTTLE_GREY:"#565E67"}},73955:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ICONS:()=>i,default:()=>o});var r=n(75675),a=n(29233);const i={ARROW_DOWN:n(527),ARROW_UP:n(98260),TICK:n(18784),CLOSE:n(51947)},o=r.default.create({container:{width:"100%"},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",minHeight:50,borderRadius:8,borderWidth:1,borderColor:a.default.BLACK,paddingHorizontal:10,paddingVertical:3,backgroundColor:a.default.EBONY_CLAY},label:{flex:1,color:a.default.HEATHER},labelContainer:{flex:1,flexDirection:"row"},arrowIcon:{width:20,height:20},tickIcon:{width:20,height:20},closeIcon:{width:30,height:30},badgeStyle:{flexDirection:"row",alignItems:"center",borderRadius:10,backgroundColor:a.default.ALTO,paddingHorizontal:10,paddingVertical:5},badgeDotStyle:{width:10,height:10,borderRadius:5,marginRight:8,backgroundColor:a.default.GREY},badgeSeparator:{width:5},listBody:{height:"100%"},listBodyContainer:{flexGrow:1,alignItems:"center"},dropDownContainer:{position:"absolute",backgroundColor:a.default.EBONY_CLAY,borderRadius:8,borderColor:a.default.BLACK,borderWidth:1,width:"100%",overflow:"hidden",zIndex:1e3},modalContentContainer:{flexGrow:1,backgroundColor:a.default.EBONY_CLAY},listItemContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:10,height:40},listItemLabel:{flex:1,color:a.default.HEATHER},iconContainer:{marginRight:10},arrowIconContainer:{marginLeft:10},tickIconContainer:{marginLeft:10},closeIconContainer:{marginLeft:10},listParentLabel:{},listChildLabel:{},listParentContainer:{},listChildContainer:{paddingLeft:40},searchContainer:{flexDirection:"row",alignItems:"center",padding:10,borderBottomColor:a.default.SHUTTLE_GREY,borderBottomWidth:1},searchTextInput:{flexGrow:1,flexShrink:1,margin:0,paddingHorizontal:10,paddingVertical:5,borderRadius:8,borderColor:a.default.SHUTTLE_GREY,borderWidth:1,color:a.default.WHITE},itemSeparator:{height:1,backgroundColor:a.default.SHUTTLE_GREY},flatListContentContainer:{flexGrow:1},customItemContainer:{},customItemLabel:{fontStyle:"italic"},listMessageContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:10},listMessageText:{color:a.default.HEATHER},selectedItemContainer:{},selectedItemLabel:{},modalTitle:{fontSize:18,color:a.default.HEATHER},extendableBadgeContainer:{flexDirection:"row",flexWrap:"wrap",flex:1},extendableBadgeItemContainer:{marginVertical:3,marginEnd:7}})},51729:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ICONS:()=>i,default:()=>o});var r=n(75675),a=n(29233);const i={ARROW_DOWN:n(32191),ARROW_UP:n(98084),TICK:n(92400),CLOSE:n(16987)},o=r.default.create({container:{width:"100%"},style:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",width:"100%",minHeight:50,borderRadius:8,borderWidth:1,borderColor:a.default.BLACK,paddingHorizontal:10,paddingVertical:3,backgroundColor:a.default.WHITE},label:{flex:1,color:a.default.BLACK},labelContainer:{flex:1,flexDirection:"row"},arrowIcon:{width:20,height:20},tickIcon:{width:20,height:20},closeIcon:{width:30,height:30},badgeStyle:{flexDirection:"row",alignItems:"center",borderRadius:10,backgroundColor:a.default.ALTO,paddingHorizontal:10,paddingVertical:5},badgeDotStyle:{width:10,height:10,borderRadius:5,marginRight:8,backgroundColor:a.default.GREY},badgeSeparator:{width:5},listBody:{height:"100%"},listBodyContainer:{flexGrow:1,alignItems:"center"},dropDownContainer:{position:"absolute",backgroundColor:a.default.WHITE,borderRadius:8,borderColor:a.default.BLACK,borderWidth:1,width:"100%",overflow:"hidden",zIndex:1e3},modalContentContainer:{flexGrow:1},listItemContainer:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:10,height:40},listItemLabel:{flex:1,color:a.default.BLACK},iconContainer:{marginRight:10},arrowIconContainer:{marginLeft:10},tickIconContainer:{marginLeft:10},closeIconContainer:{marginLeft:10},listParentLabel:{},listChildLabel:{},listParentContainer:{},listChildContainer:{paddingLeft:40},searchContainer:{flexDirection:"row",alignItems:"center",padding:10,borderBottomColor:a.default.BLACK,borderBottomWidth:1},searchTextInput:{flexGrow:1,flexShrink:1,margin:0,paddingHorizontal:10,paddingVertical:5,borderRadius:8,borderColor:a.default.BLACK,borderWidth:1,color:a.default.BLACK},itemSeparator:{height:1,backgroundColor:a.default.BLACK},flatListContentContainer:{flexGrow:1},customItemContainer:{},customItemLabel:{fontStyle:"italic"},listMessageContainer:{flex:1,justifyContent:"center",alignItems:"center",padding:10},listMessageText:{},selectedItemContainer:{},selectedItemLabel:{},modalTitle:{fontSize:18,color:a.default.BLACK},extendableBadgeContainer:{flexDirection:"row",flexWrap:"wrap",flex:1},extendableBadgeItemContainer:{marginVertical:3,marginEnd:7}})},91850:function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),a=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";n.r(t),n.d(t,{Back:()=>f,Face:()=>h,default:()=>p});var r=n(36665),a=n(94075),i=n.n(a),o=n(73929),s=n(15648),l=n(15009);n(6155);const u=n(75675).default.create({flipCard:{flex:1},face:{flex:1},back:{flex:1}});var c=n(60397);class d extends r.Component{static propTypes={style:null};constructor(e){super(e);const t=this.props.alignHeight||this.props.alignWidth?!e.flip:e.flip;this.state={isFlipped:t,isFlipping:!1,rotate:new l.default.Value(Number(e.flip)),mesured:!1,height:0,width:0,face:{width:0,height:0},back:{width:0,height:0}}}static getDerivedStateFromProps(e,t){return t.isFlipped!==e.flip?{flip:e.flip}:null}componentDidUpdate(e){e.flip!==this.props.flip&&this._toggleCard()}_toggleCard(){this.setState({isFlipping:!0}),this.props.onFlipStart(this.state.isFlipped),this._animation(!this.state.isFlipped)}_animation(e){this.timer||(this.timer=setTimeout((()=>{this.setState({isFlipped:!this.state.isFlipped}),this.timer=null}),120)),l.default.spring(this.state.rotate,{toValue:Number(e),friction:this.props.friction,useNativeDriver:this.props.useNativeDriver}).start((e=>{this.setState({isFlipping:!1}),this.props.onFlipEnd(this.state.isFlipped)}))}componentDidMount(){(this.props.alignHeight||this.props.alignWidth)&&(this.measureOtherSideTimeout=setTimeout(this.measureOtherSide.bind(this),32))}componentWillUnmount(){clearTimeout(this.measureOtherSideTimeout)}measureOtherSide(){this.setState({isFlipped:!this.state.isFlipped,mesured:!0})}render(){var e=this.props.children,t=this.props.perspective?[{perspective:this.props.perspective}]:[],n=!1;if(this.props.flipHorizontal&&t.push({rotateY:this.state.rotate.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]})}),this.props.flipVertical&&t.push({rotateX:this.state.rotate.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]})}),n=this.state.isFlipped?(0,c.jsx)(f,{style:[this.state.height>0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],flipHorizontal:this.props.flipHorizontal,flipVertical:this.props.flipVertical,perspective:this.props.perspective,onLayout:e=>{var{x:t,y:n,width:r,height:a}=e.nativeEvent.layout,i=Object.assign(this.state.back,{width:r,height:a});this.setState({back:i}),this.state.mesured&&(this.props.alignHeight&&this.setState({height:Math.max(this.state.face.height,this.state.back.height)}),this.props.alignWidth&&this.setState({width:Math.max(this.state.face.width,this.state.back.width)}))},children:e[1]}):(0,c.jsx)(h,{style:[this.state.height>0&&{height:this.state.height},this.state.width>0&&{width:this.state.width}],onLayout:e=>{var{x:t,y:n,width:r,height:a}=e.nativeEvent.layout,i=Object.assign(this.state.face,{width:r,height:a});this.setState({face:i}),this.state.mesured&&(this.props.alignHeight&&this.setState({height:Math.max(this.state.face.height,this.state.back.height)}),this.props.alignWidth&&this.setState({width:Math.max(this.state.face.width,this.state.back.width)}))},children:e[0]}),this.props.clickable){let e=0;return((this.props.alignHeight||this.props.alignWidth)&&this.state.mesured||!this.props.alignHeight&&!this.props.alignWidth)&&(e=1),(0,c.jsx)(s.default,{style:{flex:1},testID:this.props.testID,activeOpacity:1,onPress:()=>{this._toggleCard()},children:(0,c.jsx)(l.default.View,Object.assign({},this.props,{style:[u.flipCard,{transform:t,opacity:e},this.props.style],children:n}))})}return(0,c.jsx)(l.default.View,Object.assign({},this.props,{style:[u.flipCard,{transform:t},this.props.style],children:n}))}}d.propTypes={flip:i().bool,friction:i().number,perspective:i().number,flipHorizontal:i().bool,flipVertical:i().bool,clickable:i().bool,onFlipEnd:i().func,onFlipStart:i().func,alignHeight:i().bool,alignWidth:i().bool,useNativeDriver:i().bool,children(e,t,n){const a=e[t];if(2!==r.Children.count(a))return new Error("`"+n+"` should contain exactly two children. The first child represents the front of the card. The second child represents the back of the card.")}},d.defaultProps={flip:!1,friction:6,perspective:1e3,flipHorizontal:!1,flipVertical:!0,clickable:!0,onFlipEnd:()=>{},onFlipStart:()=>{},alignHeight:!1,alignWidth:!1,useNativeDriver:!0};class h extends r.Component{render(){return(0,c.jsx)(o.default,{style:[u.face,this.props.style],onLayout:this.props.onLayout,children:this.props.children})}}h.propTypes={children(e,t,n){}};class f extends r.Component{render(){var e=[];return this.props.flipHorizontal&&e.push({scaleX:-1}),this.props.flipVertical&&e.push({scaleY:-1}),(0,c.jsx)(o.default,{style:[u.back,this.props.style,{transform:e}],onLayout:this.props.onLayout,children:this.props.children})}}f.defaultProps={flipHorizontal:!1,flipVertical:!0,perspective:1e3},f.propTypes={flipHorizontal:i().bool,flipVertical:i().bool,perspective:i().number,children(e,t,n){}};const p=d},89369:(e,t,n)=>{"use strict";var r=n(36194).NativeModules.RNFSManager,a=new(0,n(36194).NativeEventEmitter)(r),i=n(22608),o=n(58766),s="ios"===n(36194).Platform.OS,l=r.RNFSFileTypeRegular,u=r.RNFSFileTypeDirectory,c=0,d=()=>c+=1,h=e=>e.startsWith("file://")?e.slice(7):e;function f(e,t,n){var r={encoding:"utf8"};return t&&("string"===typeof t?r.encoding=t:"object"===typeof t&&(r=t)),n(h(e)).then((e=>{var t;if("utf8"===r.encoding)t=o.decode(i.decode(e));else if("ascii"===r.encoding)t=i.decode(e);else{if("base64"!==r.encoding)throw new Error('Invalid encoding type "'+String(r.encoding)+'"');t=e}return t}))}function p(e,t){return t(h(e)).then((e=>e.map((e=>({ctime:e.ctime&&new Date(1e3*e.ctime)||null,mtime:e.mtime&&new Date(1e3*e.mtime)||null,name:e.name,path:e.path,size:e.size,isFile:()=>e.type===l,isDirectory:()=>e.type===u})))))}var m={mkdir:(e,t={})=>r.mkdir(h(e),t).then((()=>{})),moveFile:(e,t,n={})=>r.moveFile(h(e),h(t),n).then((()=>{})),copyFile:(e,t,n={})=>r.copyFile(h(e),h(t),n).then((()=>{})),pathForBundle:e=>r.pathForBundle(e),pathForGroup:e=>r.pathForGroup(e),getFSInfo:()=>r.getFSInfo(),getAllExternalFilesDirs:()=>r.getAllExternalFilesDirs(),unlink:e=>r.unlink(h(e)).then((()=>{})),exists:e=>r.exists(h(e)),stopDownload(e){r.stopDownload(e)},resumeDownload(e){r.resumeDownload(e)},isResumable:e=>r.isResumable(e),stopUpload(e){r.stopUpload(e)},completeHandlerIOS:e=>r.completeHandlerIOS(e),readDir:e=>p(e,r.readDir),readDirAssets(e){if(!r.readDirAssets)throw new Error("readDirAssets is not available on this platform");return p(e,r.readDirAssets)},existsAssets(e){if(!r.existsAssets)throw new Error("existsAssets is not available on this platform");return r.existsAssets(e)},existsRes(e){if(!r.existsRes)throw new Error("existsRes is not available on this platform");return r.existsRes(e)},readdir:e=>m.readDir(h(e)).then((e=>e.map((e=>e.name)))),setReadable:(e,t,n)=>r.setReadable(e,t,n).then((e=>e)),stat:e=>r.stat(h(e)).then((t=>({path:e,ctime:new Date(1e3*t.ctime),mtime:new Date(1e3*t.mtime),size:t.size,mode:t.mode,originalFilepath:t.originalFilepath,isFile:()=>t.type===l,isDirectory:()=>t.type===u}))),readFile:(e,t)=>f(e,t,r.readFile),read(e,t=0,n=0,a){var s={encoding:"utf8"};return a&&("string"===typeof a?s.encoding=a:"object"===typeof a&&(s=a)),r.read(h(e),t,n).then((e=>{var t;if("utf8"===s.encoding)t=o.decode(i.decode(e));else if("ascii"===s.encoding)t=i.decode(e);else{if("base64"!==s.encoding)throw new Error('Invalid encoding type "'+String(s.encoding)+'"');t=e}return t}))},readFileAssets(e,t){if(!r.readFileAssets)throw new Error("readFileAssets is not available on this platform");return f(e,t,r.readFileAssets)},readFileRes(e,t){if(!r.readFileRes)throw new Error("readFileRes is not available on this platform");return f(e,t,r.readFileRes)},hash:(e,t)=>r.hash(h(e),t),copyFileAssets(e,t){if(!r.copyFileAssets)throw new Error("copyFileAssets is not available on this platform");return r.copyFileAssets(h(e),h(t)).then((()=>{}))},copyFileRes(e,t){if(!r.copyFileRes)throw new Error("copyFileRes is not available on this platform");return r.copyFileRes(e,h(t)).then((()=>{}))},copyAssetsFileIOS:(e,t,n,a,i=1,o=1,s="contain")=>r.copyAssetsFileIOS(e,t,n,a,i,o,s),copyAssetsVideoIOS:(e,t)=>r.copyAssetsVideoIOS(e,t),writeFile(e,t,n){var a,s={encoding:"utf8"};if(n&&("string"===typeof n?s.encoding=n:"object"===typeof n&&(s=Object.assign({},s,n))),"utf8"===s.encoding)a=i.encode(o.encode(t));else if("ascii"===s.encoding)a=i.encode(t);else{if("base64"!==s.encoding)throw new Error('Invalid encoding type "'+s.encoding+'"');a=t}return r.writeFile(h(e),a,s).then((()=>{}))},appendFile(e,t,n){var a,s={encoding:"utf8"};if(n&&("string"===typeof n?s.encoding=n:"object"===typeof n&&(s=n)),"utf8"===s.encoding)a=i.encode(o.encode(t));else if("ascii"===s.encoding)a=i.encode(t);else{if("base64"!==s.encoding)throw new Error('Invalid encoding type "'+s.encoding+'"');a=t}return r.appendFile(h(e),a)},write(e,t,n,a){var s,l={encoding:"utf8"};if(a&&("string"===typeof a?l.encoding=a:"object"===typeof a&&(l=a)),"utf8"===l.encoding)s=i.encode(o.encode(t));else if("ascii"===l.encoding)s=i.encode(t);else{if("base64"!==l.encoding)throw new Error('Invalid encoding type "'+l.encoding+'"');s=t}return void 0===n&&(n=-1),r.write(h(e),s,n).then((()=>{}))},downloadFile(e){if("object"!==typeof e)throw new Error("downloadFile: Invalid value for argument `options`");if("string"!==typeof e.fromUrl)throw new Error("downloadFile: Invalid value for property `fromUrl`");if("string"!==typeof e.toFile)throw new Error("downloadFile: Invalid value for property `toFile`");if(e.headers&&"object"!==typeof e.headers)throw new Error("downloadFile: Invalid value for property `headers`");if(e.background&&"boolean"!==typeof e.background)throw new Error("downloadFile: Invalid value for property `background`");if(e.progressDivider&&"number"!==typeof e.progressDivider)throw new Error("downloadFile: Invalid value for property `progressDivider`");if(e.progressInterval&&"number"!==typeof e.progressInterval)throw new Error("downloadFile: Invalid value for property `progressInterval`");if(e.readTimeout&&"number"!==typeof e.readTimeout)throw new Error("downloadFile: Invalid value for property `readTimeout`");if(e.connectionTimeout&&"number"!==typeof e.connectionTimeout)throw new Error("downloadFile: Invalid value for property `connectionTimeout`");if(e.backgroundTimeout&&"number"!==typeof e.backgroundTimeout)throw new Error("downloadFile: Invalid value for property `backgroundTimeout`");var t=d(),n=[];e.begin&&n.push(a.addListener("DownloadBegin",(n=>{n.jobId===t&&e.begin(n)}))),e.progress&&n.push(a.addListener("DownloadProgress",(n=>{n.jobId===t&&e.progress(n)}))),e.resumable&&n.push(a.addListener("DownloadResumable",(n=>{n.jobId===t&&e.resumable(n)})));var i={jobId:t,fromUrl:e.fromUrl,toFile:h(e.toFile),headers:e.headers||{},background:!!e.background,progressDivider:e.progressDivider||0,progressInterval:e.progressInterval||0,readTimeout:e.readTimeout||15e3,connectionTimeout:e.connectionTimeout||5e3,backgroundTimeout:e.backgroundTimeout||36e5,hasBeginCallback:e.begin instanceof Function,hasProgressCallback:e.progress instanceof Function,hasResumableCallback:e.resumable instanceof Function};return{jobId:t,promise:r.downloadFile(i).then((e=>(n.forEach((e=>e.remove())),e))).catch((e=>Promise.reject(e)))}},uploadFiles(e){if(!r.uploadFiles)return{jobId:-1,promise:Promise.reject(new Error("`uploadFiles` is unsupported on this platform"))};var t=d(),n=[];if("object"!==typeof e)throw new Error("uploadFiles: Invalid value for argument `options`");if("string"!==typeof e.toUrl)throw new Error("uploadFiles: Invalid value for property `toUrl`");if(!Array.isArray(e.files))throw new Error("uploadFiles: Invalid value for property `files`");if(e.headers&&"object"!==typeof e.headers)throw new Error("uploadFiles: Invalid value for property `headers`");if(e.fields&&"object"!==typeof e.fields)throw new Error("uploadFiles: Invalid value for property `fields`");if(e.method&&"string"!==typeof e.method)throw new Error("uploadFiles: Invalid value for property `method`");e.begin?n.push(a.addListener("UploadBegin",e.begin)):e.beginCallback&&n.push(a.addListener("UploadBegin",e.beginCallback)),e.progress?n.push(a.addListener("UploadProgress",e.progress)):e.progressCallback&&n.push(a.addListener("UploadProgress",e.progressCallback));var i={jobId:t,toUrl:e.toUrl,files:e.files,binaryStreamOnly:e.binaryStreamOnly||!1,headers:e.headers||{},fields:e.fields||{},method:e.method||"POST",hasBeginCallback:e.begin instanceof Function||e.beginCallback instanceof Function,hasProgressCallback:e.progress instanceof Function||e.progressCallback instanceof Function};return{jobId:t,promise:r.uploadFiles(i).then((e=>(n.forEach((e=>e.remove())),e)))}},touch(e,t,n){if(n&&!(n instanceof Date))throw new Error("touch: Invalid value for argument `ctime`");if(t&&!(t instanceof Date))throw new Error("touch: Invalid value for argument `mtime`");var a=0;return s&&(a=n&&n.getTime()),r.touch(h(e),t&&t.getTime(),a)},scanFile:e=>r.scanFile(e),MainBundlePath:r.RNFSMainBundlePath,CachesDirectoryPath:r.RNFSCachesDirectoryPath,ExternalCachesDirectoryPath:r.RNFSExternalCachesDirectoryPath,DocumentDirectoryPath:r.RNFSDocumentDirectoryPath,DownloadDirectoryPath:r.RNFSDownloadDirectoryPath,ExternalDirectoryPath:r.RNFSExternalDirectoryPath,ExternalStorageDirectoryPath:r.RNFSExternalStorageDirectoryPath,TemporaryDirectoryPath:r.RNFSTemporaryDirectoryPath,LibraryDirectoryPath:r.RNFSLibraryDirectoryPath,PicturesDirectoryPath:r.RNFSPicturesDirectoryPath,FileProtectionKeys:r.RNFSFileProtectionKeys};e.exports=m},22608:function(e,t,n){var r;e=n.nmd(e),function(){var a=t,i=(e&&e.exports,"object"==typeof n.g&&n.g);i.global!==i&&i.window;var o=function(e){this.message=e};(o.prototype=new Error).name="InvalidCharacterError";var s=function(e){throw new o(e)},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=/[\t\n\f\r ]/g,c={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&s("The string to be encoded contains characters outside of the Latin1 range.");for(var t,n,r,a,i=e.length%3,o="",u=-1,c=e.length-i;++u>18&63)+l.charAt(a>>12&63)+l.charAt(a>>6&63)+l.charAt(63&a);return 2==i?(t=e.charCodeAt(u)<<8,n=e.charCodeAt(++u),o+=l.charAt((a=t+n)>>10)+l.charAt(a>>4&63)+l.charAt(a<<2&63)+"="):1==i&&(a=e.charCodeAt(u),o+=l.charAt(a>>2)+l.charAt(a<<4&63)+"=="),o},decode:function(e){var t=(e=String(e).replace(u,"")).length;t%4==0&&(t=(e=e.replace(/==?$/,"")).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,r,a=0,i="",o=-1;++o>(-2*a&6)));return i},version:"0.1.0"};void 0===(r=function(){return c}.call(t,n,t,e))||(e.exports=r)}()},22137:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ActionType:()=>r});const r={REANIMATED_WORKLET:1,NATIVE_ANIMATED_EVENT:2,JS_FUNCTION_OLD_API:3,JS_FUNCTION_NEW_API:4}},8861:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DiagonalDirections:()=>a,Directions:()=>r});const r={RIGHT:1,LEFT:2,UP:4,DOWN:8},a={UP_RIGHT:5,DOWN_RIGHT:9,UP_LEFT:6,DOWN_LEFT:10}},86618:(e,t,n)=>{"use strict";n.r(t),n.d(t,{enableExperimentalWebImplementation:()=>o,enableLegacyWebImplementation:()=>s,isNewWebImplementationEnabled:()=>l});var r=n(1082);let a=!0,i=!1;function o(e=!0){console.warn((0,r.tagMessage)("New web implementation is enabled by default. This function will be removed in Gesture Handler 3."))}function s(e=!0){console.warn((0,r.tagMessage)("Legacy web implementation is deprecated. This function will be removed in Gesture Handler 3.")),a!==!e&&(i?console.error("Some parts of this application have already started using the new gesture handler implementation. No changes will be applied. You can try enabling legacy implementation earlier."):a=!e)}function l(){return i=!0,a}},81156:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r=n(36665).createContext(!1)},40094:(e,t,n)=>{"use strict";let r;n.r(t),n.d(t,{PointerType:()=>r}),function(e){e[e.TOUCH=0]="TOUCH",e[e.STYLUS=1]="STYLUS",e[e.MOUSE=2]="MOUSE",e[e.KEY=3]="KEY",e[e.OTHER=4]="OTHER"}(r||(r={}))},36963:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Yn});var r=n(36665),a=n(86618),i=n(98587),o=n(47154);const s=15;let l,u,c;!function(e){e[e.DOWN=0]="DOWN",e[e.ADDITIONAL_POINTER_DOWN=1]="ADDITIONAL_POINTER_DOWN",e[e.UP=2]="UP",e[e.ADDITIONAL_POINTER_UP=3]="ADDITIONAL_POINTER_UP",e[e.MOVE=4]="MOVE",e[e.ENTER=5]="ENTER",e[e.LEAVE=6]="LEAVE",e[e.CANCEL=7]="CANCEL"}(l||(l={})),function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.DOWN=1]="DOWN",e[e.MOVE=2]="MOVE",e[e.UP=3]="UP",e[e.CANCELLED=4]="CANCELLED"}(u||(u={})),function(e){e[e.UNDETERMINED=0]="UNDETERMINED",e[e.MOUSE=1]="MOUSE",e[e.TOUCHPAD=2]="TOUCHPAD"}(c||(c={}));var d=n(40094);function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class f{constructor(e){h(this,"capacity",void 0),h(this,"buffer",void 0),h(this,"index",void 0),h(this,"_size",void 0),this.capacity=e,this.buffer=new Array(e),this.index=0,this._size=0}push(e){this.buffer[this.index]=e,this.index=(this.index+1)%this.capacity,this._size=Math.min(this.size+1,this.capacity)}get(e){if(this._size===this.capacity){let t=(this.index+e)%this.capacity;return t<0&&(t+=this.capacity),this.buffer[t]}return this.buffer[e]}clear(){this.buffer=new Array(this.capacity),this.index=0,this._size=0}get size(){return this._size}}function p(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m{constructor(e){p(this,"offset",void 0),p(this,"length",void 0),p(this,"elements",void 0),this.offset=0,this.length=e,this.elements=new Array(e)}static fromVOL(e,t,n){const r=new m(0);return r.offset=t,r.length=n,r.elements=e,r}get(e){return this.elements[this.offset+e]}set(e,t){this.elements[this.offset+e]=t}dot(e){let t=0;for(let n=0;nthis.x.length)return null;const t=new y(e),n=this.x.length,r=e+1,a=new g(r,n);for(let l=0;l=0;l-=1){t.coefficients[l]=i.getRow(l).dot(s);for(let e=r-1;e>l;e-=1)t.coefficients[l]-=o.get(l,e)*t.coefficients[e];t.coefficients[l]/=o.get(l,l)}return t}}function b(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class v{constructor(){b(this,"assumePointerMoveStoppedMilliseconds",40),b(this,"historySize",20),b(this,"horizonMilliseconds",300),b(this,"minSampleSize",3),b(this,"samples",void 0),this.samples=new f(this.historySize)}add(e){this.samples.push(e)}getVelocityEstimate(){const e=[],t=[],n=[],r=[];let a=0,i=this.samples.size-1;const o=this.samples.get(i);if(!o)return null;let s=o;for(;athis.horizonMilliseconds||c>this.assumePointerMoveStoppedMilliseconds)break;e.push(l.x),t.push(l.y),n.push(1),r.push(-u),a++,i--}if(a>=this.minSampleSize){const a=new _(r,e,n).solve(2);if(null!==a){const e=new _(r,t,n).solve(2);if(null!==e){return[1e3*a.coefficients[1],1e3*e.coefficients[1]]}}}return null}get velocity(){const e=this.getVelocityEstimate();return null!==e?e:[0,0]}reset(){this.samples.clear()}}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class F{constructor(){w(this,"velocityTracker",new v),w(this,"_trackedPointers",new Map),w(this,"touchEventsIds",new Map),w(this,"lastMovedPointerId",void 0),w(this,"cachedAbsoluteAverages",{x:0,y:0}),w(this,"cachedRelativeAverages",{x:0,y:0}),this.lastMovedPointerId=NaN;for(let e=0;e<20;++e)this.touchEventsIds.set(e,NaN)}addToTracker(e){if(this.trackedPointers.has(e.pointerId))return;this.lastMovedPointerId=e.pointerId;const t={abosoluteCoords:{x:e.x,y:e.y},relativeCoords:{x:e.offsetX,y:e.offsetY},timestamp:e.time,velocityX:0,velocityY:0};this.trackedPointers.set(e.pointerId,t),this.mapTouchEventId(e.pointerId),this.cachedAbsoluteAverages=this.getAbsoluteCoordsAverage(),this.cachedRelativeAverages=this.getRelativeCoordsAverage()}removeFromTracker(e){this.trackedPointers.delete(e),this.removeMappedTouchId(e)}track(e){const t=this.trackedPointers.get(e.pointerId);if(!t)return;this.lastMovedPointerId=e.pointerId,this.velocityTracker.add(e);const[n,r]=this.velocityTracker.velocity;t.velocityX=n,t.velocityY=r,t.abosoluteCoords={x:e.x,y:e.y},t.relativeCoords={x:e.offsetX,y:e.offsetY},this.trackedPointers.set(e.pointerId,t),this.cachedAbsoluteAverages=this.getAbsoluteCoordsAverage(),this.cachedRelativeAverages=this.getRelativeCoordsAverage()}mapTouchEventId(e){for(const[t,n]of this.touchEventsIds)if(isNaN(n)){this.touchEventsIds.set(t,e);break}}removeMappedTouchId(e){const t=this.getMappedTouchEventId(e);isNaN(t)||this.touchEventsIds.set(t,NaN)}getMappedTouchEventId(e){for(const[t,n]of this.touchEventsIds.entries())if(n===e)return t;return NaN}getVelocity(e){var t,n;return{x:null===(t=this.trackedPointers.get(e))||void 0===t?void 0:t.velocityX,y:null===(n=this.trackedPointers.get(e))||void 0===n?void 0:n.velocityY}}getLastAbsoluteCoords(e){var t;return null===(t=this.trackedPointers.get(null!==e&&void 0!==e?e:this.lastMovedPointerId))||void 0===t?void 0:t.abosoluteCoords}getLastRelativeCoords(e){var t;return null===(t=this.trackedPointers.get(null!==e&&void 0!==e?e:this.lastMovedPointerId))||void 0===t?void 0:t.relativeCoords}getAbsoluteCoordsAverage(){const e=this.getAbsoluteCoordsSum(),t=e.x/this.trackedPointers.size,n=e.y/this.trackedPointers.size;return{x:isNaN(t)?this.cachedAbsoluteAverages.x:t,y:isNaN(n)?this.cachedAbsoluteAverages.y:n}}getRelativeCoordsAverage(){const e=this.getRelativeCoordsSum(),t=e.x/this.trackedPointers.size,n=e.y/this.trackedPointers.size;return{x:isNaN(t)?this.cachedRelativeAverages.x:t,y:isNaN(n)?this.cachedRelativeAverages.y:n}}getAbsoluteCoordsSum(e){const t={x:0,y:0};return this.trackedPointers.forEach(((n,r)=>{r!==e&&(t.x+=n.abosoluteCoords.x,t.y+=n.abosoluteCoords.y)})),t}getRelativeCoordsSum(e){const t={x:0,y:0};return this.trackedPointers.forEach(((n,r)=>{r!==e&&(t.x+=n.relativeCoords.x,t.y+=n.relativeCoords.y)})),t}resetTracker(){this.velocityTracker.reset(),this.trackedPointers.clear(),this.lastMovedPointerId=NaN;for(let e=0;e<20;++e)this.touchEventsIds.set(e,NaN)}static shareCommonPointers(e,t){return e.some((e=>t.includes(e)))}get trackedPointersCount(){return this.trackedPointers.size}get trackedPointersIDs(){const e=[];return this.trackedPointers.forEach(((t,n)=>{e.push(n)})),e}get trackedPointers(){return this._trackedPointers}}function k(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class x{constructor(){k(this,"gestureHandlers",[]),k(this,"awaitingHandlers",[]),k(this,"awaitingHandlersTags",new Set),k(this,"handlingChangeSemaphore",0),k(this,"activationIndex",0)}scheduleFinishedHandlersCleanup(){0===this.handlingChangeSemaphore&&this.cleanupFinishedHandlers()}cleanHandler(e){e.reset(),e.active=!1,e.awaiting=!1,e.activationIndex=Number.MAX_VALUE}removeHandlerFromOrchestrator(e){const t=this.gestureHandlers.indexOf(e),n=this.awaitingHandlers.indexOf(e);t>=0&&this.gestureHandlers.splice(t,1),n>=0&&(this.awaitingHandlers.splice(n,1),this.awaitingHandlersTags.delete(e.handlerTag))}cleanupFinishedHandlers(){const e=new Set;for(let t=this.gestureHandlers.length-1;t>=0;--t){const n=this.gestureHandlers[t];this.isFinished(n.state)&&!n.awaiting&&(this.cleanHandler(n),e.add(n))}this.gestureHandlers=this.gestureHandlers.filter((t=>!e.has(t)))}hasOtherHandlerToWaitFor(e){return this.gestureHandlers.some((t=>!this.isFinished(t.state)&&this.shouldHandlerWaitForOther(e,t)))}shouldBeCancelledByFinishedHandler(e){return this.gestureHandlers.some((t=>this.shouldHandlerWaitForOther(e,t)&&t.state===o.State.END))}tryActivate(e){if(this.shouldBeCancelledByFinishedHandler(e))return void e.cancel();if(this.hasOtherHandlerToWaitFor(e))return void this.addAwaitingHandler(e);const t=e.state;t!==o.State.CANCELLED&&t!==o.State.FAILED&&(this.shouldActivate(e)?this.makeActive(e):t!==o.State.ACTIVE?t===o.State.BEGAN&&e.cancel():e.fail())}shouldActivate(e){return!this.gestureHandlers.some((t=>this.shouldHandlerBeCancelledBy(e,t)))}cleanupAwaitingHandlers(e){const t=t=>!t.awaiting&&this.shouldHandlerWaitForOther(t,e);for(const n of this.awaitingHandlers)t(n)&&(this.cleanHandler(n),this.awaitingHandlersTags.delete(n.handlerTag));this.awaitingHandlers=this.awaitingHandlers.filter((e=>this.awaitingHandlersTags.has(e.handlerTag)))}onHandlerStateChange(e,t,n,r){if(e.enabled||r){if(this.handlingChangeSemaphore+=1,this.isFinished(t))for(const n of this.awaitingHandlers)this.shouldHandlerWaitForOther(n,e)&&this.awaitingHandlersTags.has(n.handlerTag)&&(t===o.State.END?(n.cancel(),n.state===o.State.END&&n.sendEvent(o.State.CANCELLED,o.State.BEGAN),n.awaiting=!1):this.tryActivate(n));t===o.State.ACTIVE?this.tryActivate(e):n===o.State.ACTIVE||n===o.State.END?e.active?e.sendEvent(t,n):n!==o.State.ACTIVE||t!==o.State.CANCELLED&&t!==o.State.FAILED||e.sendEvent(t,o.State.BEGAN):n===o.State.UNDETERMINED&&t===o.State.CANCELLED||e.sendEvent(t,n),this.handlingChangeSemaphore-=1,this.scheduleFinishedHandlersCleanup(),this.awaitingHandlers.includes(e)||this.cleanupAwaitingHandlers(e)}}makeActive(e){const t=e.state;e.active=!0,e.shouldResetProgress=!0,e.activationIndex=this.activationIndex++;for(let n=this.gestureHandlers.length-1;n>=0;--n)this.shouldHandlerBeCancelledBy(this.gestureHandlers[n],e)&&this.gestureHandlers[n].cancel();for(const n of this.awaitingHandlers)this.shouldHandlerBeCancelledBy(n,e)&&(n.awaiting=!1);e.sendEvent(o.State.ACTIVE,o.State.BEGAN),t!==o.State.ACTIVE&&(e.sendEvent(o.State.END,o.State.ACTIVE),t!==o.State.END&&e.sendEvent(o.State.UNDETERMINED,o.State.END)),e.awaiting&&(e.awaiting=!1,this.awaitingHandlers=this.awaitingHandlers.filter((t=>t!==e)))}addAwaitingHandler(e){this.awaitingHandlers.includes(e)||(this.awaitingHandlers.push(e),this.awaitingHandlersTags.add(e.handlerTag),e.awaiting=!0,e.activationIndex=this.activationIndex++)}recordHandlerIfNotPresent(e){this.gestureHandlers.includes(e)||(this.gestureHandlers.push(e),e.active=!1,e.awaiting=!1,e.activationIndex=Number.MAX_SAFE_INTEGER)}shouldHandlerWaitForOther(e,t){return e!==t&&(e.shouldWaitForHandlerFailure(t)||t.shouldRequireToWaitForFailure(e))}canRunSimultaneously(e,t){return e===t||e.shouldRecognizeSimultaneously(t)||t.shouldRecognizeSimultaneously(e)}shouldHandlerBeCancelledBy(e,t){if(this.canRunSimultaneously(e,t))return!1;if(e.awaiting||e.state===o.State.ACTIVE)return e.shouldBeCancelledByOther(t);const n=e.getTrackedPointersID(),r=t.getTrackedPointersID();return!(!F.shareCommonPointers(n,r)&&e.delegate.view!==t.delegate.view)||this.checkOverlap(e,t)}checkOverlap(e,t){return e.getTrackedPointersID().some((n=>{const r=e.tracker.getLastAbsoluteCoords(n);return e.delegate.isPointerInBounds(r)&&t.delegate.isPointerInBounds(r)}))}isFinished(e){return e===o.State.END||e===o.State.FAILED||e===o.State.CANCELLED}cancelMouseAndPenGestures(e){this.gestureHandlers.forEach((t=>{t.pointerType!==d.PointerType.MOUSE&&t.pointerType!==d.PointerType.STYLUS||(t!==e?t.cancel():t.tracker.resetTracker())}))}static get instance(){return x._instance||(x._instance=new x),x._instance}}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}k(x,"_instance",void 0);class S{constructor(){A(this,"waitForRelations",new Map),A(this,"simultaneousRelations",new Map),A(this,"blocksHandlersRelations",new Map)}configureInteractions(e,t){if(this.dropRelationsForHandlerWithTag(e.handlerTag),t.waitFor){const n=[];t.waitFor.forEach((e=>{"number"===typeof e?n.push(e):n.push(e.handlerTag)})),this.waitForRelations.set(e.handlerTag,n)}if(t.simultaneousHandlers){const n=[];t.simultaneousHandlers.forEach((e=>{"number"===typeof e?n.push(e):n.push(e.handlerTag)})),this.simultaneousRelations.set(e.handlerTag,n)}if(t.blocksHandlers){const n=[];t.blocksHandlers.forEach((e=>{"number"===typeof e?n.push(e):n.push(e.handlerTag)})),this.blocksHandlersRelations.set(e.handlerTag,n)}}shouldWaitForHandlerFailure(e,t){const n=this.waitForRelations.get(e.handlerTag);return void 0!==(null===n||void 0===n?void 0:n.find((e=>e===t.handlerTag)))}shouldRecognizeSimultaneously(e,t){const n=this.simultaneousRelations.get(e.handlerTag);return void 0!==(null===n||void 0===n?void 0:n.find((e=>e===t.handlerTag)))}shouldRequireHandlerToWaitForFailure(e,t){const n=this.blocksHandlersRelations.get(e.handlerTag);return void 0!==(null===n||void 0===n?void 0:n.find((e=>e===t.handlerTag)))}shouldHandlerBeCancelledBy(e,t){var n;const r="NativeViewGestureHandler"===t.constructor.name,a=t.active,i=!0===(null===(n=t.isButton)||void 0===n?void 0:n.call(t));return r&&a&&!i}dropRelationsForHandlerWithTag(e){this.waitForRelations.delete(e),this.simultaneousRelations.delete(e),this.blocksHandlersRelations.delete(e)}reset(){this.waitForRelations.clear(),this.simultaneousRelations.clear(),this.blocksHandlersRelations.clear()}static get instance(){return this._instance||(this._instance=new S),this._instance}}A(S,"_instance",void 0);var E=n(70637);const C=["enabled"];function T(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class D{constructor(e){T(this,"lastSentState",null),T(this,"_state",o.State.UNDETERMINED),T(this,"_shouldCancelWhenOutside",!1),T(this,"hasCustomActivationCriteria",!1),T(this,"_enabled",!1),T(this,"viewRef",void 0),T(this,"propsRef",void 0),T(this,"_handlerTag",void 0),T(this,"_config",{enabled:!1}),T(this,"_tracker",new F),T(this,"_activationIndex",0),T(this,"_awaiting",!1),T(this,"_active",!1),T(this,"_shouldResetProgress",!1),T(this,"_pointerType",d.PointerType.MOUSE),T(this,"_delegate",void 0),T(this,"sendEvent",((e,t)=>{const{onGestureHandlerEvent:n,onGestureHandlerStateChange:r}=this.propsRef.current,a=this.transformEventData(e,t);this.lastSentState!==e&&(this.lastSentState=e,I(r,a)),this.state===o.State.ACTIVE&&(a.nativeEvent.oldState=void 0,I(n,a))})),this._delegate=e}init(e,t){this.propsRef=t,this.viewRef=e,this.state=o.State.UNDETERMINED,this.delegate.init(e,this)}attachEventManager(e){e.setOnPointerDown(this.onPointerDown.bind(this)),e.setOnPointerAdd(this.onPointerAdd.bind(this)),e.setOnPointerUp(this.onPointerUp.bind(this)),e.setOnPointerRemove(this.onPointerRemove.bind(this)),e.setOnPointerMove(this.onPointerMove.bind(this)),e.setOnPointerEnter(this.onPointerEnter.bind(this)),e.setOnPointerLeave(this.onPointerLeave.bind(this)),e.setOnPointerCancel(this.onPointerCancel.bind(this)),e.setOnPointerOutOfBounds(this.onPointerOutOfBounds.bind(this)),e.setOnPointerMoveOver(this.onPointerMoveOver.bind(this)),e.setOnPointerMoveOut(this.onPointerMoveOut.bind(this)),e.setOnWheel(this.onWheel.bind(this)),e.registerListeners()}onCancel(){}onReset(){}resetProgress(){}reset(){this.tracker.resetTracker(),this.onReset(),this.resetProgress(),this.delegate.reset(),this.state=o.State.UNDETERMINED}moveToState(e,t){if(this.state===e)return;const n=this.state;this.state=e,this.tracker.trackedPointersCount>0&&this.config.needsPointerData&&this.isFinished()&&this.cancelTouches(),x.instance.onHandlerStateChange(this,e,n,t),this.onStateChange(e,n),!this.enabled&&this.isFinished()&&(this.state=o.State.UNDETERMINED)}onStateChange(e,t){}begin(){this.checkHitSlop()&&this.state===o.State.UNDETERMINED&&this.moveToState(o.State.BEGAN)}fail(e){this.state!==o.State.ACTIVE&&this.state!==o.State.BEGAN||(this.delegate.onFail(),this.moveToState(o.State.FAILED,e)),this.resetProgress()}cancel(e){this.state!==o.State.ACTIVE&&this.state!==o.State.UNDETERMINED&&this.state!==o.State.BEGAN||(this.onCancel(),this.delegate.onCancel(),this.moveToState(o.State.CANCELLED,e))}activate(e=!1){!0===this.config.manualActivation&&!e||this.state!==o.State.UNDETERMINED&&this.state!==o.State.BEGAN||(this.delegate.onActivate(),this.moveToState(o.State.ACTIVE))}end(){this.state!==o.State.BEGAN&&this.state!==o.State.ACTIVE||(this.delegate.onEnd(),this.moveToState(o.State.END)),this.resetProgress()}getShouldResetProgress(){return this.shouldResetProgress}setShouldResetProgress(e){this.shouldResetProgress=e}shouldWaitForHandlerFailure(e){return e!==this&&S.instance.shouldWaitForHandlerFailure(this,e)}shouldRequireToWaitForFailure(e){return e!==this&&S.instance.shouldRequireHandlerToWaitForFailure(this,e)}shouldRecognizeSimultaneously(e){return e===this||S.instance.shouldRecognizeSimultaneously(this,e)}shouldBeCancelledByOther(e){return e!==this&&S.instance.shouldHandlerBeCancelledBy(this,e)}onPointerDown(e){x.instance.recordHandlerIfNotPresent(this),this.pointerType=e.pointerType,this.pointerType===d.PointerType.TOUCH&&x.instance.cancelMouseAndPenGestures(this)}onPointerAdd(e){this.tryToSendTouchEvent(e)}onPointerUp(e){this.tryToSendTouchEvent(e)}onPointerRemove(e){this.tryToSendTouchEvent(e)}onPointerMove(e){this.tryToSendMoveEvent(!1,e)}onPointerLeave(e){if(this.shouldCancelWhenOutside)switch(this.state){case o.State.ACTIVE:this.cancel();break;case o.State.BEGAN:this.fail()}else this.tryToSendTouchEvent(e)}onPointerEnter(e){this.tryToSendTouchEvent(e)}onPointerCancel(e){this.tryToSendTouchEvent(e),this.cancel(),this.reset()}onPointerOutOfBounds(e){this.tryToSendMoveEvent(!0,e)}onPointerMoveOver(e){}onPointerMoveOut(e){}onWheel(e){}tryToSendMoveEvent(e,t){e&&this.shouldCancelWhenOutside||!this.enabled||(this.active&&this.sendEvent(this.state,this.state),this.tryToSendTouchEvent(t))}tryToSendTouchEvent(e){this.config.needsPointerData&&this.sendTouchEvent(e)}sendTouchEvent(e){if(!this.enabled)return;const{onGestureHandlerEvent:t}=this.propsRef.current,n=this.transformTouchEvent(e);n&&I(t,n)}transformEventData(e,t){return{nativeEvent:Object.assign({numberOfPointers:this.tracker.trackedPointersCount,state:e,pointerInside:this.delegate.isPointerInBounds(this.tracker.getAbsoluteCoordsAverage())},this.transformNativeEvent(),{handlerTag:this.handlerTag,target:this.viewRef,oldState:e!==t?t:void 0,pointerType:this.pointerType}),timeStamp:Date.now()}}transformTouchEvent(e){const t=this.delegate.measureView(),n=[],r=[],a=this.tracker.trackedPointers;if(0===a.size||!a.has(e.pointerId))return;a.forEach(((e,r)=>{const a=this.tracker.getMappedTouchEventId(r);n.push({id:a,x:e.abosoluteCoords.x-t.pageX,y:e.abosoluteCoords.y-t.pageY,absoluteX:e.abosoluteCoords.x,absoluteY:e.abosoluteCoords.y})})),e.eventType!==l.CANCEL?r.push({id:this.tracker.getMappedTouchEventId(e.pointerId),x:e.x-t.pageX,y:e.y-t.pageY,absoluteX:e.x,absoluteY:e.y}):a.forEach(((e,n)=>{const a=this.tracker.getMappedTouchEventId(n);r.push({id:a,x:e.abosoluteCoords.x-t.pageX,y:e.abosoluteCoords.y-t.pageY,absoluteX:e.abosoluteCoords.x,absoluteY:e.abosoluteCoords.y})}));let i=u.UNDETERMINED;switch(e.eventType){case l.DOWN:case l.ADDITIONAL_POINTER_DOWN:i=u.DOWN;break;case l.UP:case l.ADDITIONAL_POINTER_UP:i=u.UP;break;case l.MOVE:i=u.MOVE;break;case l.CANCEL:i=u.CANCELLED}let o=n.length;return e.eventType!==l.UP&&e.eventType!==l.ADDITIONAL_POINTER_UP||--o,{nativeEvent:{handlerTag:this.handlerTag,state:this.state,eventType:i,changedTouches:r,allTouches:n,numberOfTouches:o,pointerType:this.pointerType},timeStamp:Date.now()}}cancelTouches(){const e=this.delegate.measureView(),t=[],n=[],r=this.tracker.trackedPointers;if(0===r.size)return;r.forEach(((r,a)=>{const i=this.tracker.getMappedTouchEventId(a);t.push({id:i,x:r.abosoluteCoords.x-e.pageX,y:r.abosoluteCoords.y-e.pageY,absoluteX:r.abosoluteCoords.x,absoluteY:r.abosoluteCoords.y}),n.push({id:i,x:r.abosoluteCoords.x-e.pageX,y:r.abosoluteCoords.y-e.pageY,absoluteX:r.abosoluteCoords.x,absoluteY:r.abosoluteCoords.y})}));const a={nativeEvent:{handlerTag:this.handlerTag,state:this.state,eventType:u.CANCELLED,changedTouches:n,allTouches:t,numberOfTouches:t.length,pointerType:this.pointerType},timeStamp:Date.now()},{onGestureHandlerEvent:i}=this.propsRef.current;I(i,a)}transformNativeEvent(){const e=this.tracker.getAbsoluteCoordsAverage(),t=this.tracker.getRelativeCoordsAverage();return{x:t.x,y:t.y,absoluteX:e.x,absoluteY:e.y}}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,C);if(this._config=Object.assign({enabled:t},n),this.enabled=t,this.delegate.onEnabledChange(t),void 0!==this.config.shouldCancelWhenOutside&&(this.shouldCancelWhenOutside=this.config.shouldCancelWhenOutside),this.validateHitSlops(),!this.enabled)switch(this.state){case o.State.ACTIVE:this.fail(!0);break;case o.State.UNDETERMINED:x.instance.removeHandlerFromOrchestrator(this);break;default:this.cancel(!0)}}checkCustomActivationCriteria(e){for(const t in this.config)e.indexOf(t)>=0&&(this.hasCustomActivationCriteria=!0)}validateHitSlops(){if(this.config.hitSlop){if(void 0!==this.config.hitSlop.left&&void 0!==this.config.hitSlop.right&&void 0!==this.config.hitSlop.width)throw new Error("HitSlop Error: Cannot define left, right and width at the same time");if(void 0!==this.config.hitSlop.width&&void 0===this.config.hitSlop.left&&void 0===this.config.hitSlop.right)throw new Error("HitSlop Error: When width is defined, either left or right has to be defined");if(void 0!==this.config.hitSlop.height&&void 0!==this.config.hitSlop.top&&void 0!==this.config.hitSlop.bottom)throw new Error("HitSlop Error: Cannot define top, bottom and height at the same time");if(void 0!==this.config.hitSlop.height&&void 0===this.config.hitSlop.top&&void 0===this.config.hitSlop.bottom)throw new Error("HitSlop Error: When height is defined, either top or bottom has to be defined")}}checkHitSlop(){if(!this.config.hitSlop)return!0;const{width:e,height:t}=this.delegate.measureView();let n=0,r=0,a=e,i=t;void 0!==this.config.hitSlop.horizontal&&(n-=this.config.hitSlop.horizontal,a+=this.config.hitSlop.horizontal),void 0!==this.config.hitSlop.vertical&&(r-=this.config.hitSlop.vertical,i+=this.config.hitSlop.vertical),void 0!==this.config.hitSlop.left&&(n=-this.config.hitSlop.left),void 0!==this.config.hitSlop.right&&(a=e+this.config.hitSlop.right),void 0!==this.config.hitSlop.top&&(r=-this.config.hitSlop.top),void 0!==this.config.hitSlop.bottom&&(i=e+this.config.hitSlop.bottom),void 0!==this.config.hitSlop.width&&(void 0!==this.config.hitSlop.left?a=n+this.config.hitSlop.width:void 0!==this.config.hitSlop.right&&(n=a-this.config.hitSlop.width)),void 0!==this.config.hitSlop.height&&(void 0!==this.config.hitSlop.top?i=r+this.config.hitSlop.height:void 0!==this.config.hitSlop.bottom&&(r=i-this.config.hitSlop.height));const o=this.delegate.measureView(),{x:s,y:l}=this.tracker.getLastAbsoluteCoords(),u=s-o.pageX,c=l-o.pageY;return u>=n&&u<=a&&c>=r&&c<=i}isButtonInConfig(e){return!e||!this.config.mouseButton&&e===E.MouseButton.LEFT||this.config.mouseButton&&e&this.config.mouseButton}resetConfig(){}onDestroy(){this.delegate.destroy(this.config)}get handlerTag(){return this._handlerTag}set handlerTag(e){this._handlerTag=e}get config(){return this._config}get delegate(){return this._delegate}get tracker(){return this._tracker}get state(){return this._state}set state(e){this._state=e}get shouldCancelWhenOutside(){return this._shouldCancelWhenOutside}set shouldCancelWhenOutside(e){this._shouldCancelWhenOutside=e}get enabled(){return this._enabled}set enabled(e){this._enabled=e}get pointerType(){return this._pointerType}set pointerType(e){this._pointerType=e}get active(){return this._active}set active(e){this._active=e}get awaiting(){return this._awaiting}set awaiting(e){this._awaiting=e}get activationIndex(){return this._activationIndex}set activationIndex(e){this._activationIndex=e}get shouldResetProgress(){return this._shouldResetProgress}set shouldResetProgress(e){this._shouldResetProgress=e}getTrackedPointersID(){return this.tracker.trackedPointersIDs}isFinished(){return this.state===o.State.END||this.state===o.State.FAILED||this.state===o.State.CANCELLED}}function I(e,t){if(!e)return;if("function"===typeof e)return void e(t);if("__getHandler"in e&&"function"===typeof e.__getHandler){return void I(e.__getHandler(),t)}if(!("__nodeConfig"in e))return;const{argMapping:n}=e.__nodeConfig;if(Array.isArray(n))for(const[r,[a,i]]of n.entries()){if(!(a in t.nativeEvent))continue;const n=t.nativeEvent[a];null!==i&&void 0!==i&&i.setValue?i.setValue(n):e.__nodeConfig.argMapping[r]=[a,n]}}const O=["enabled"];function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const M=["enabled"];function R(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const L=["enabled"];function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class j{constructor(e){B(this,"onScaleBegin",void 0),B(this,"onScale",void 0),B(this,"onScaleEnd",void 0),B(this,"_focusX",void 0),B(this,"_focusY",void 0),B(this,"_currentSpan",void 0),B(this,"prevSpan",void 0),B(this,"initialSpan",void 0),B(this,"currentTime",void 0),B(this,"prevTime",void 0),B(this,"inProgress",!1),B(this,"spanSlop",void 0),B(this,"minSpan",void 0),this.onScaleBegin=e.onScaleBegin,this.onScale=e.onScale,this.onScaleEnd=e.onScaleEnd,this.spanSlop=30,this.minSpan=0}onTouchEvent(e,t){this.currentTime=e.time;const n=e.eventType,r=t.trackedPointersCount,a=n===l.UP||n===l.ADDITIONAL_POINTER_UP||n===l.CANCEL;if((n===l.DOWN||a)&&(this.inProgress&&(this.onScaleEnd(this),this.inProgress=!1,this.initialSpan=0),a))return!0;const i=n===l.DOWN||n===l.ADDITIONAL_POINTER_UP||n===l.ADDITIONAL_POINTER_DOWN,o=n===l.ADDITIONAL_POINTER_UP,s=o?e.pointerId:void 0,u=o?r-1:r,c=t.getAbsoluteCoordsSum(),d=c.x/u,h=c.y/u;let f=0,p=0;t.trackedPointers.forEach(((e,t)=>{t!==s&&(f+=Math.abs(e.abosoluteCoords.x-d),p+=Math.abs(e.abosoluteCoords.y-h))}));const m=2*(f/u),g=2*(p/u),y=Math.hypot(m,g),_=this.inProgress;return this._focusX=d,this._focusY=h,this.inProgress&&(y=this.minSpan&&(_||Math.abs(y-this.initialSpan)>this.spanSlop)&&(this.prevSpan=this._currentSpan=y,this.prevTime=this.currentTime,this.inProgress=this.onScaleBegin(this)),n!==l.MOVE||(this._currentSpan=y,this.inProgress&&!this.onScale(this)||(this.prevSpan=this.currentSpan,this.prevTime=this.currentTime),!0)}calculateScaleFactor(e){return e<2?1:this.prevSpan>0?this.currentSpan/this.prevSpan:1}get currentSpan(){return this._currentSpan}get focusX(){return this._focusX}get focusY(){return this._focusY}get timeDelta(){return this.currentTime-this.prevTime}}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class H{constructor(e){z(this,"onRotationBegin",void 0),z(this,"onRotation",void 0),z(this,"onRotationEnd",void 0),z(this,"currentTime",0),z(this,"previousTime",0),z(this,"previousAngle",0),z(this,"_rotation",0),z(this,"_anchorX",0),z(this,"_anchorY",0),z(this,"isInProgress",!1),z(this,"keyPointers",[NaN,NaN]),this.onRotationBegin=e.onRotationBegin,this.onRotation=e.onRotation,this.onRotationEnd=e.onRotationEnd}updateCurrent(e,t){this.previousTime=this.currentTime,this.currentTime=e.time;const[n,r]=this.keyPointers,a=t.getLastAbsoluteCoords(n),i=t.getLastAbsoluteCoords(r),o=i.x-a.x,s=i.y-a.y;this._anchorX=(a.x+i.x)/2,this._anchorY=(a.y+i.y)/2;const l=-Math.atan2(s,o);this._rotation=Number.isNaN(this.previousAngle)?0:this.previousAngle-l,this.previousAngle=l,this.rotation>Math.PI?this._rotation-=Math.PI:this.rotation<-Math.PI&&(this._rotation+=Math.PI),this.rotation>Math.PI/2?this._rotation-=Math.PI:this.rotation<-Math.PI/2&&(this._rotation+=Math.PI)}finish(){this.isInProgress&&(this.isInProgress=!1,this.keyPointers=[NaN,NaN],this.onRotationEnd(this))}setKeyPointers(e){if(this.keyPointers[0]&&this.keyPointers[1])return;const t=e.trackedPointers.keys();this.keyPointers[0]=t.next().value,this.keyPointers[1]=t.next().value}onTouchEvent(e,t){switch(e.eventType){case l.DOWN:this.isInProgress=!1;break;case l.ADDITIONAL_POINTER_DOWN:if(this.isInProgress)break;this.isInProgress=!0,this.previousTime=e.time,this.previousAngle=NaN,this.setKeyPointers(t),this.updateCurrent(e,t),this.onRotationBegin(this);break;case l.MOVE:if(!this.isInProgress)break;this.updateCurrent(e,t),this.onRotation(this);break;case l.ADDITIONAL_POINTER_UP:if(!this.isInProgress)break;this.keyPointers.indexOf(e.pointerId)>=0&&this.finish();break;case l.UP:this.isInProgress&&this.finish()}return!0}reset(){this.keyPointers=[NaN,NaN],this.isInProgress=!1}get anchorX(){return this._anchorX}get anchorY(){return this._anchorY}get rotation(){return this._rotation}get timeDelta(){return this.currentTime+this.previousTime}}function U(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const W=Math.PI/36;var q=n(8861);function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Y{constructor(e,t){$(this,"x",void 0),$(this,"y",void 0),$(this,"unitX",void 0),$(this,"unitY",void 0),$(this,"_magnitude",void 0),this.x=e,this.y=t,this._magnitude=Math.hypot(this.x,this.y);const n=this._magnitude>.1;this.unitX=n?this.x/this._magnitude:0,this.unitY=n?this.y/this._magnitude:0}static fromDirection(e){var t;return null!==(t=G.get(e))&&void 0!==t?t:new Y(0,0)}static fromVelocity(e,t){const n=e.getVelocity(t);return new Y(n.x,n.y)}get magnitude(){return this._magnitude}computeSimilarity(e){return this.unitX*e.unitX+this.unitY*e.unitY}isSimilar(e,t){return this.computeSimilarity(e)>t}}const G=new Map([[q.Directions.LEFT,new Y(-1,0)],[q.Directions.RIGHT,new Y(1,0)],[q.Directions.UP,new Y(0,-1)],[q.Directions.DOWN,new Y(0,1)],[q.DiagonalDirections.UP_RIGHT,new Y(1,-1)],[q.DiagonalDirections.DOWN_RIGHT,new Y(1,1)],[q.DiagonalDirections.UP_LEFT,new Y(-1,-1)],[q.DiagonalDirections.DOWN_LEFT,new Y(-1,1)]]);var X=n(56647);const K=["enabled"];function J(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Z=q.Directions.RIGHT,Q=(0,X.coneToDeviation)(30),ee=(0,X.coneToDeviation)(60);const te=["enabled"];function ne(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class re extends D{constructor(...e){super(...e),ne(this,"buttonRole",void 0),ne(this,"shouldActivateOnStart",!1),ne(this,"disallowInterruption",!1),ne(this,"startX",0),ne(this,"startY",0),ne(this,"minDistSq",225)}init(e,t){super.init(e,t),this.shouldCancelWhenOutside=!0;const n=this.delegate.view;this.restoreViewStyles(n),this.buttonRole="button"===n.getAttribute("role")}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,te);super.updateGestureConfig(Object.assign({enabled:t},n)),void 0!==this.config.shouldActivateOnStart&&(this.shouldActivateOnStart=this.config.shouldActivateOnStart),void 0!==this.config.disallowInterruption&&(this.disallowInterruption=this.config.disallowInterruption);const r=this.delegate.view;this.restoreViewStyles(r)}restoreViewStyles(e){e&&(e.style.touchAction="auto",e.style.WebkitTouchCallout="auto")}onPointerDown(e){this.tracker.addToTracker(e),super.onPointerDown(e),this.newPointerAction(),this.tryToSendTouchEvent(e)}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e),this.newPointerAction()}newPointerAction(){const e=this.tracker.getAbsoluteCoordsAverage();if(this.startX=e.x,this.startY=e.y,this.state!==o.State.UNDETERMINED)return;this.begin();const t=this.delegate.view.hasAttribute("rnghtext");(this.buttonRole||t)&&this.activate()}onPointerMove(e){this.tracker.track(e);const t=this.tracker.getAbsoluteCoordsAverage(),n=this.startX-t.x,r=this.startY-t.y;n*n+r*r>=this.minDistSq&&(this.buttonRole&&this.state===o.State.ACTIVE?this.cancel():this.buttonRole||this.state!==o.State.BEGAN||this.activate())}onPointerLeave(){this.state!==o.State.BEGAN&&this.state!==o.State.ACTIVE||this.cancel()}onPointerUp(e){super.onPointerUp(e),this.onUp(e)}onPointerRemove(e){super.onPointerRemove(e),this.onUp(e)}onUp(e){this.tracker.removeFromTracker(e.pointerId),0===this.tracker.trackedPointersCount&&(this.state===o.State.ACTIVE?this.end():this.fail())}shouldRecognizeSimultaneously(e){if(super.shouldRecognizeSimultaneously(e))return!0;if(e instanceof re&&e.state===o.State.ACTIVE&&e.disallowsInterruption())return!1;const t=!this.disallowInterruption;return(this.state!==o.State.ACTIVE||e.state!==o.State.ACTIVE||!t)&&(this.state===o.State.ACTIVE&&t&&e.handlerTag>0)}shouldBeCancelledByOther(e){return!this.disallowInterruption}disallowsInterruption(){return this.disallowInterruption}isButton(){return this.buttonRole}}function ae(){return ae=Object.assign||function(e){for(var t=1;t-1}var Le=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===ye&&(e=this.compute()),ge&&this.manager.element.style&&ke[e]&&(this.manager.element.style[me]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return Pe(this.manager.recognizers,(function(t){Me(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))})),function(e){if(Re(e,ve))return ve;var t=Re(e,we),n=Re(e,Fe);return t&&n?ve:t||n?t?we:Fe:Re(e,be)?be:_e}(e.join(" "))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,a=Re(r,ve)&&!ke[ve],i=Re(r,Fe)&&!ke[Fe],o=Re(r,we)&&!ke[we];if(a){var s=1===e.pointers.length,l=e.distance<2,u=e.deltaTime<250;if(s&&l&&u)return}if(!o||!i)return a||i&&6&n||o&&n&De?this.preventSrc(t):void 0}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function Ne(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function Be(e){var t=e.length;if(1===t)return{x:de(e[0].clientX),y:de(e[0].clientY)};for(var n=0,r=0,a=0;a=he(t)?e<0?2:4:t<0?8:Te}function Ue(e,t,n){return{x:t/e||0,y:n/e||0}}function We(e,t){var n=e.session,r=t.pointers,a=r.length;n.firstInput||(n.firstInput=je(t)),a>1&&!n.firstMultiple?n.firstMultiple=je(t):1===a&&(n.firstMultiple=!1);var i=n.firstInput,o=n.firstMultiple,s=o?o.center:i.center,l=t.center=Be(r);t.timeStamp=fe(),t.deltaTime=t.timeStamp-i.timeStamp,t.angle=ze(s,l),t.distance=Ve(s,l),function(e,t){var n=t.center,r=e.offsetDelta||{},a=e.prevDelta||{},i=e.prevInput||{};1!==t.eventType&&4!==i.eventType||(a=e.prevDelta={x:i.deltaX||0,y:i.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=a.x+(n.x-r.x),t.deltaY=a.y+(n.y-r.y)}(n,t),t.offsetDirection=He(t.deltaX,t.deltaY);var u,c,d=Ue(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=d.x,t.overallVelocityY=d.y,t.overallVelocity=he(d.x)>he(d.y)?d.x:d.y,t.scale=o?(u=o.pointers,Ve((c=r)[0],c[1],Oe)/Ve(u[0],u[1],Oe)):1,t.rotation=o?function(e,t){return ze(t[1],t[0],Oe)+ze(e[1],e[0],Oe)}(o.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,function(e,t){var n,r,a,i,o=e.lastInterval||t,s=t.timeStamp-o.timeStamp;if(8!==t.eventType&&(s>25||void 0===o.velocity)){var l=t.deltaX-o.deltaX,u=t.deltaY-o.deltaY,c=Ue(s,l,u);r=c.x,a=c.y,n=he(c.x)>he(c.y)?c.x:c.y,i=He(l,u),e.lastInterval=t}else n=o.velocity,r=o.velocityX,a=o.velocityY,i=o.direction;t.velocity=n,t.velocityX=r,t.velocityY=a,t.direction=i}(n,t);var h,f=e.element,p=t.srcEvent;Ne(h=p.composedPath?p.composedPath()[0]:p.path?p.path[0]:p.target,f)&&(f=h),t.target=f}function qe(e,t,n){var r=n.pointers.length,a=n.changedPointers.length,i=1&t&&r-a===0,o=12&t&&r-a===0;n.isFirst=!!i,n.isFinal=!!o,i&&(e.session={}),n.eventType=t,We(e,n),e.emit("hammer.input",n),e.recognize(n),e.session.prevInput=n}function $e(e){return e.trim().split(/\s+/g)}function Ye(e,t,n){Pe($e(t),(function(t){e.addEventListener(t,n,!1)}))}function Ge(e,t,n){Pe($e(t),(function(t){e.removeEventListener(t,n,!1)}))}function Xe(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var Ke=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){Me(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&Ye(this.element,this.evEl,this.domHandler),this.evTarget&&Ye(this.target,this.evTarget,this.domHandler),this.evWin&&Ye(Xe(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&Ge(this.element,this.evEl,this.domHandler),this.evTarget&&Ge(this.target,this.evTarget,this.domHandler),this.evWin&&Ge(Xe(this.element),this.evWin,this.domHandler)},e}();function Je(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;rn[t]})):r.sort()),r}var it={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ot=function(e){function t(){var n;return t.prototype.evTarget="touchstart touchmove touchend touchcancel",(n=e.apply(this,arguments)||this).targetIds={},n}return ie(t,e),t.prototype.handler=function(e){var t=it[e.type],n=st.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:Ee,srcEvent:e})},t}(Ke);function st(e,t){var n,r,a=rt(e.touches),i=this.targetIds;if(3&t&&1===a.length)return i[a[0].identifier]=!0,[a,a];var o=rt(e.changedTouches),s=[],l=this.target;if(r=a.filter((function(e){return Ne(e.target,l)})),1===t)for(n=0;n-1&&r.splice(e,1)}),2500)}}function dt(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,ct.call(this,t)):12&e&&ct.call(this,t)}function ht(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<8&&r(t.options.event+_t(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=8&&r(t.options.event+_t(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=mt},t.canEmit=function(){for(var e=0;et.threshold&&a&t.direction},n.attrTest=function(e){return wt.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=Ft(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(wt),xt=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ae({event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},t))||this}ie(t,e);var n=t.prototype;return n.getTouchAction=function(){return kt.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n,r=this.options.direction;return 30&r?n=t.overallVelocity:6&r?n=t.overallVelocityX:r&De&&(n=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&r&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&he(n)>this.options.velocity&&4&t.eventType},n.emit=function(e){var t=Ft(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(wt),At=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ae({event:"pinch",threshold:0,pointers:2},t))||this}ie(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ve]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},n.emit=function(t){if(1!==t.scale){var n=t.scale<1?"in":"out";t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(wt),St=function(e){function t(t){return void 0===t&&(t={}),e.call(this,ae({event:"rotate",threshold:0,pointers:2},t))||this}ie(t,e);var n=t.prototype;return n.getTouchAction=function(){return[ve]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)},t}(wt),Et=function(e){function t(t){var n;return void 0===t&&(t={}),(n=e.call(this,ae({event:"press",pointers:1,time:251,threshold:9},t))||this)._timer=null,n._input=null,n}ie(t,e);var n=t.prototype;return n.getTouchAction=function(){return[_e]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,a=e.distancen.time;if(this._input=e,!a||!r||12&e.eventType&&!i)this.reset();else if(1&e.eventType)this.reset(),this._timer=setTimeout((function(){t.state=8,t.tryEmit()}),n.time);else if(4&e.eventType)return 8;return mt},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=fe(),this.manager.emit(this.options.event,this._input)))},t}(bt),Ct={domEvents:!1,touchAction:ye,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},Tt=[[St,{enable:!1}],[At,{enable:!1},["rotate"]],[xt,{direction:6}],[kt,{direction:6},["swipe"]],[vt],[vt,{event:"doubletap",taps:2},["tap"]],[Et]];function Dt(e,t){var n,r=e.element;r.style&&(Pe(e.options.cssProps,(function(a,i){n=pe(r.style,i),t?(e.oldCssProps[n]=r.style[n],r.style[n]=a):r.style[n]=e.oldCssProps[n]||""})),t||(e.oldCssProps={}))}var It=function(){function e(e,t){var n,r=this;this.options=le({},Ct,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new((n=this).options.inputClass||(Ae?nt:Se?ot:xe?ft:ut))(n,qe),this.touchAction=new Le(this,this.options.touchAction),Dt(this,!0),Pe(this.options.recognizers,(function(e){var t=r.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])}),this)}var t=e.prototype;return t.set=function(e){return le(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?2:1},t.recognize=function(e){var t=this.session;if(!t.stopped){var n;this.touchAction.preventDefaults(e);var r=this.recognizers,a=t.curRecognizer;(!a||a&&8&a.state)&&(t.curRecognizer=null,a=null);for(var i=0;i\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,r,n),e.apply(this,arguments)}}var Lt=Rt((function(e,t,n){for(var r=Object.keys(t),a=0;a{if(Array.isArray(this.config.waitFor))for(const e of this.config.waitFor)e.removePendingGesture(this.id)})),en(this,"destroy",(()=>{this.clearSelfAsPending(),this.hammer&&(this.hammer.stop(!1),this.hammer.destroy()),this.hammer=null})),en(this,"isPointInView",(({x:e,y:t})=>{const n=this.view.getBoundingClientRect();return e>=n.left&&e<=n.right&&t>=n.top&&t<=n.bottom})),en(this,"sendEvent",(e=>{const{onGestureHandlerEvent:t,onGestureHandlerStateChange:n}=this.propsRef.current,r=this.transformEventData(e);nn(t,r),this.lastSentState!==r.nativeEvent.state&&(this.lastSentState=r.nativeEvent.state,nn(n,r))})),en(this,"sync",(()=>{const e=this.hammer.get(this.name);if(!e)return;const t=this.getHammerConfig();e.set(Object.assign({},t,{enable:(e,t)=>{if(!this.config.enabled)return this.isGestureRunning=!1,this.hasGestureFailed=!1,!1;if(!t||!e.options||"undefined"===typeof t.maxPointers)return this.shouldEnableGestureOnSetup;if(this.hasGestureFailed)return!1;if(!this.isDiscrete){if(this.isGestureRunning)return!0;if(this._stillWaiting=this._getPendingGestures(),this._stillWaiting.length){for(const e of this._stillWaiting)if(!e.isDiscrete&&e.isGestureRunning)return this.hasGestureFailed=!0,this.isGestureRunning=!1,!1;return!1}}if(!this.hasCustomActivationCriteria)return!0;const n=null==this.initialRotation?0:t.rotation-this.initialRotation,{success:r,failed:a}=this.isGestureEnabledForEvent(this.getConfig(),e,Object.assign({},t,{deltaRotation:n}));return a&&(this.simulateCancelEvent(t),this.hasGestureFailed=!0),r}}))})),this.gestureInstance=tn++,this.hasCustomActivationCriteria=!1}getConfig(){return this.config}onWaitingEnded(e){}removePendingGesture(e){delete this.pendingGestures[e]}addPendingGesture(e){this.pendingGestures[e.id]=e}isGestureEnabledForEvent(e,t,n){return{success:!0}}get NativeGestureClass(){throw new Error("Must override GestureHandler.NativeGestureClass")}updateHasCustomActivationCriteria(e){return!0}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,Qt);if(this.clearSelfAsPending(),this.config=this.ensureConfig(Object.assign({enabled:t},n)),this.hasCustomActivationCriteria=this.updateHasCustomActivationCriteria(this.config),Array.isArray(this.config.waitFor))for(const r of this.config.waitFor)r.addPendingGesture(this);return this.hammer&&this.sync(),this.config}getState(e){return 0==e?0:Wt[e]}transformEventData(e){const{eventType:t,maxPointers:n}=e,r=e.changedPointers[0],a=this.isPointInView({x:r.clientX,y:r.clientY}),i=this.getState(t);return i!==this.previousState&&(this.oldState=this.previousState,this.previousState=i),{nativeEvent:Object.assign({numberOfPointers:n,state:i,pointerInside:a},this.transformNativeEvent(e),{handlerTag:this.handlerTag,target:this.ref,oldState:i!==this.previousState||4!=i?this.oldState:void 0}),timeStamp:Date.now()}}transformNativeEvent(e){return{}}cancelPendingGestures(e){for(const t of Object.values(this.pendingGestures))t&&t.isGestureRunning&&(t.hasGestureFailed=!0,t.cancelEvent(e))}notifyPendingGestures(){for(const e of Object.values(this.pendingGestures))e&&e.onWaitingEnded(this)}onGestureEnded(e){this.isGestureRunning=!1,this.cancelPendingGestures(e)}forceInvalidate(e){this.isGestureRunning&&(this.hasGestureFailed=!0,this.cancelEvent(e))}cancelEvent(e){this.notifyPendingGestures(),this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_CANCEL,isFinal:!0})),this.onGestureEnded(e)}onRawEvent({isFirst:e}){e&&(this.hasGestureFailed=!1)}shouldUseTouchEvents(e){var t,n;return null!==(t=null===(n=e.simultaneousHandlers)||void 0===n?void 0:n.some((e=>e.isNative)))&&void 0!==t&&t}setView(e,t){if(null==e)return this.destroy(),void(this.view=null);const n="ontouchstart"in window;this.propsRef=t,this.ref=e,this.view=(0,Ht.default)(e),this.hammer=n&&this.shouldUseTouchEvents(this.config)?new zt.Manager(this.view,{inputClass:zt.TouchInput}):new zt.Manager(this.view),this.oldState=o.State.UNDETERMINED,this.previousState=o.State.UNDETERMINED,this.lastSentState=null;const{NativeGestureClass:r}=this,a=new r(this.getHammerConfig());this.hammer.add(a),this.hammer.on("hammer.input",(e=>{if(!this.config.enabled)return this.hasGestureFailed=!1,void(this.isGestureRunning=!1);this.onRawEvent(e),null===this.initialRotation&&0!==e.rotation&&(this.initialRotation=e.rotation),e.isFinal&&setTimeout((()=>{this.initialRotation=null,this.hasGestureFailed=!1}))})),this.setupEvents(),this.sync()}setupEvents(){this.isDiscrete||(this.hammer.on(`${this.name}start`,(e=>this.onStart(e))),this.hammer.on(`${this.name}end ${this.name}cancel`,(e=>{this.onGestureEnded(e)}))),this.hammer.on(this.name,(e=>this.onGestureActivated(e)))}onStart({deltaX:e,deltaY:t,rotation:n}){this.oldState=o.State.UNDETERMINED,this.previousState=o.State.UNDETERMINED,this.lastSentState=null,this.isGestureRunning=!0,this.__initialX=e,this.__initialY=t,this.initialRotation=n}onGestureActivated(e){this.sendEvent(e)}onSuccess(){}_getPendingGestures(){if(Array.isArray(this.config.waitFor)&&this.config.waitFor.length){return this.config.waitFor.filter((({hasGestureFailed:e})=>!1===e))}return[]}getHammerConfig(){return{pointers:this.config.minPointers===this.config.maxPointers?this.config.minPointers:0}}simulateCancelEvent(e){}ensureConfig(e){const t=Object.assign({},e);if("minDist"in e&&(t.minDist=e.minDist,t.minDistSq=t.minDist*t.minDist),"minVelocity"in e&&(t.minVelocity=e.minVelocity,t.minVelocitySq=t.minVelocity*t.minVelocity),"maxDist"in e&&(t.maxDist=e.maxDist,t.maxDistSq=e.maxDist*e.maxDist),t.waitFor="waitFor"in e?rn(e.waitFor).map((({handlerTag:e})=>Kt(e))).filter((e=>e)):null,"simultaneousHandlers"in e){const n=this.shouldUseTouchEvents(this.config);t.simultaneousHandlers=rn(e.simultaneousHandlers).map((e=>Kt("number"===typeof e?e:e.handlerTag))).filter((e=>e)),n!==this.shouldUseTouchEvents(t)&&(0,Zt.ghQueueMicrotask)((()=>{this.destroy(),this.setView(this.ref,this.propsRef)}))}else t.simultaneousHandlers=null;return["minPointers","maxPointers","minDist","maxDist","maxDistSq","minVelocitySq","minDistSq","minVelocity","failOffsetXStart","failOffsetYStart","failOffsetXEnd","failOffsetYEnd","activeOffsetXStart","activeOffsetXEnd","activeOffsetYStart","activeOffsetYEnd"].forEach((e=>{"undefined"===typeof t[e]&&(t[e]=Number.NaN)})),t}},on=e=>Number.isNaN(e),sn=e=>"number"===typeof e&&!Number.isNaN(e),ln=(e,t)=>!on(t)&&(t<0&&e<=t||t>=0&&e>=t),un=({x:e=0,y:t=0}={})=>e*e+t*t,cn=(e,t)=>!on(t)&&(t<0&&e=0&&e>t);function dn(e,t){return t?setTimeout((()=>e()),t):(e(),null)}const hn=class extends an{get isDiscrete(){return!0}get shouldEnableGestureOnSetup(){return!0}shouldFailUnderCustomCriteria({x:e,y:t,deltaX:n,deltaY:r},{maxDeltaX:a,maxDeltaY:i,maxDistSq:o,shouldCancelWhenOutside:s}){return!(!s||this.isPointInView({x:e,y:t}))||(cn(Math.abs(n),a)||cn(Math.abs(r),i)||cn(Math.abs(r*r+n*n),o))}transformNativeEvent({center:{x:e,y:t}}){const n=this.view.getBoundingClientRect();return{absoluteX:e,absoluteY:t,x:e-n.left,y:t-n.top}}isGestureEnabledForEvent({minPointers:e,maxPointers:t,maxDeltaX:n,maxDeltaY:r,maxDistSq:a,shouldCancelWhenOutside:i},o,{maxPointers:s,center:l,deltaX:u,deltaY:c}){const d=s>=e&&s<=t;return this.shouldFailUnderCustomCriteria(Object.assign({},l,{deltaX:u,deltaY:c}),{maxDeltaX:n,maxDeltaY:r,maxDistSq:a,shouldCancelWhenOutside:i})||!d&&this.isGestureRunning?{failed:!0}:{success:d}}},fn=["shouldActivateOnStart","disallowInterruption","shouldCancelWhenOutside","minDurationMs","maxDist","minPointers","maxPointers"];function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const mn=class extends hn{constructor(...e){super(...e),pn(this,"visualFeedbackTimer",void 0),pn(this,"initialEvent",null),pn(this,"shouldDelayTouches",!0)}get name(){return"press"}get minDurationMs(){return on(this.config.minDurationMs)?5:this.config.minDurationMs}get maxDist(){return on(this.config.maxDist)?9:this.config.maxDist}get NativeGestureClass(){return zt.Press}simulateCancelEvent(e){this.hasGestureFailed=!0,this.cancelEvent(e)}updateHasCustomActivationCriteria({shouldCancelWhenOutside:e,maxDistSq:t}){return e||!sn(t)}getState(e){return{[zt.INPUT_START]:o.State.BEGAN,[zt.INPUT_MOVE]:o.State.ACTIVE,[zt.INPUT_END]:o.State.END,[zt.INPUT_CANCEL]:o.State.CANCELLED}[e]}getConfig(){return this.hasCustomActivationCriteria?this.config:{shouldCancelWhenOutside:!0,maxDistSq:10}}getHammerConfig(){return Object.assign({},super.getHammerConfig(),{time:this.minDurationMs})}onGestureActivated(e){this.onGestureStart(e)}shouldDelayTouchForEvent({pointerType:e}){return this.shouldDelayTouches&&"touch"===e}onGestureStart(e){this.isGestureRunning=!0,clearTimeout(this.visualFeedbackTimer),this.initialEvent=e,this.visualFeedbackTimer=dn((()=>{this.sendGestureStartedEvent(this.initialEvent),this.initialEvent=null}),this.shouldDelayTouchForEvent(e)&&240)}sendGestureStartedEvent(e){clearTimeout(this.visualFeedbackTimer),this.visualFeedbackTimer=null,this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_MOVE,isFirst:!0}))}forceInvalidate(e){super.forceInvalidate(e),clearTimeout(this.visualFeedbackTimer),this.visualFeedbackTimer=null,this.initialEvent=null}onRawEvent(e){if(super.onRawEvent(e),this.isGestureRunning)if(e.isFinal){let t;this.visualFeedbackTimer&&(t=50,this.sendGestureStartedEvent(this.initialEvent),this.initialEvent=null),dn((()=>{this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_END,isFinal:!0})),this.onGestureEnded()}),t)}else this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_MOVE,isFinal:!1}))}updateGestureConfig(e){let{shouldActivateOnStart:t=!1,disallowInterruption:n=!1,shouldCancelWhenOutside:r=!0,minDurationMs:a=Number.NaN,maxDist:o=Number.NaN,minPointers:s=1,maxPointers:l=1}=e,u=(0,i.default)(e,fn);return super.updateGestureConfig(Object.assign({shouldActivateOnStart:t,disallowInterruption:n,shouldCancelWhenOutside:r,minDurationMs:a,maxDist:o,minPointers:s,maxPointers:l},u))}};const gn=class extends mn{get isNative(){return!0}onRawEvent(e){if(super.onRawEvent(e),!e.isFinal&&ln(un({x:e.deltaX,y:e.deltaY}),10)&&this.config.disallowInterruption){const t=Object.values(Jt()).filter((e=>{const{handlerTag:t,view:n,isGestureRunning:r}=e;return t!==this.handlerTag&&r&&e instanceof hn&&n&&this.view.contains(n)}));for(const n of t)n.forceInvalidate(e)}}};var yn=n(98943);const _n=class extends an{get shouldEnableGestureOnSetup(){return!0}transformNativeEvent({deltaX:e,deltaY:t,velocityX:n,velocityY:r,center:{x:a,y:i}}){const o=this.view.getBoundingClientRect(),s=yn.default.get();return{translationX:e-(this.__initialX||0),translationY:t-(this.__initialY||0),absoluteX:a,absoluteY:i,velocityX:n*s,velocityY:r*s,x:a-o.left,y:i-o.top}}};const bn=class extends _n{get name(){return"pan"}get NativeGestureClass(){return zt.Pan}getHammerConfig(){return Object.assign({},super.getHammerConfig(),{direction:this.getDirection()})}getState(e){const t=super.getState(e);return this.previousState===o.State.UNDETERMINED&&t===o.State.ACTIVE?o.State.BEGAN:t}getDirection(){const e=this.getConfig(),{activeOffsetXStart:t,activeOffsetXEnd:n,activeOffsetYStart:r,activeOffsetYEnd:a,minDist:i}=e;let o=[],s=[];if(!on(i))return zt.DIRECTION_ALL;on(t)||s.push(zt.DIRECTION_LEFT),on(n)||s.push(zt.DIRECTION_RIGHT),2===s.length&&(s=[zt.DIRECTION_HORIZONTAL]),o=o.concat(s);let l=[];return on(r)||l.push(zt.DIRECTION_UP),on(a)||l.push(zt.DIRECTION_DOWN),2===l.length&&(l=[zt.DIRECTION_VERTICAL]),o=o.concat(l),o.length?o[0]===zt.DIRECTION_HORIZONTAL&&o[1]===zt.DIRECTION_VERTICAL||s.length&&l.length?zt.DIRECTION_ALL:o[0]:zt.DIRECTION_NONE}getConfig(){return this.hasCustomActivationCriteria?this.config:{minDistSq:10}}shouldFailUnderCustomCriteria({deltaX:e,deltaY:t},n){return!on(n.failOffsetXStart)&&en.failOffsetXEnd||!on(n.failOffsetYStart)&&tn.failOffsetYEnd}shouldActivateUnderCustomCriteria({deltaX:e,deltaY:t,velocity:n},r){return!on(r.activeOffsetXStart)&&er.activeOffsetXEnd||!on(r.activeOffsetYStart)&&tr.activeOffsetYEnd||ln(un({x:e,y:t}),r.minDistSq)||ln(n.x,r.minVelocityX)||ln(n.y,r.minVelocityY)||ln(un(n),r.minVelocitySq)}shouldMultiFingerPanFail({pointerLength:e,scale:t,deltaRotation:n}){if(e<=1)return!1;const r=Math.abs(t-1),a=Math.abs(n);return r>.1||a>7}updateHasCustomActivationCriteria(e){return sn(e.minDistSq)||sn(e.minVelocityX)||sn(e.minVelocityY)||sn(e.minVelocitySq)||sn(e.activeOffsetXStart)||sn(e.activeOffsetXEnd)||sn(e.activeOffsetYStart)||sn(e.activeOffsetYEnd)}isGestureEnabledForEvent(e,t,n){if(this.shouldFailUnderCustomCriteria(n,e))return{failed:!0};const r={x:n.velocityX,y:n.velocityY};return this.hasCustomActivationCriteria&&this.shouldActivateUnderCustomCriteria({deltaX:n.deltaX,deltaY:n.deltaY,velocity:r},e)?this.shouldMultiFingerPanFail({pointerLength:n.maxPointers,scale:n.scale,deltaRotation:n.deltaRotation})?{failed:!0}:{success:!0}:{success:!1}}},vn=["shouldCancelWhenOutside","maxDeltaX","maxDeltaY","numberOfTaps","minDurationMs","maxDelayMs","maxDurationMs","maxDist","minPointers","maxPointers"];function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Fn=class extends hn{constructor(...e){super(...e),wn(this,"_shouldFireEndEvent",null),wn(this,"_timer",void 0),wn(this,"_multiTapTimer",void 0),wn(this,"onSuccessfulTap",(e=>{this._getPendingGestures().length?this._shouldFireEndEvent=e:(e.eventType===zt.INPUT_END&&this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_MOVE})),this.sendEvent(Object.assign({},e,{isFinal:!0})),this.onGestureEnded(e))}))}get name(){return"tap"}get NativeGestureClass(){return zt.Tap}get maxDelayMs(){return on(this.config.maxDelayMs)?300:this.config.maxDelayMs}simulateCancelEvent(e){this.isGestureRunning&&this.cancelEvent(e)}onGestureActivated(e){this.isGestureRunning&&this.onSuccessfulTap(e)}onRawEvent(e){if(super.onRawEvent(e),!this.hasGestureFailed&&!this.isGestureRunning&&!e.isFinal){const t=this.hammer.get(this.name);t.options.enable(t,e)&&(clearTimeout(this._multiTapTimer),this.onStart(e),this.sendEvent(e))}if(e.isFinal&&e.maxPointers>1&&setTimeout((()=>{this.isGestureRunning&&this.cancelEvent(e)})),!this.hasGestureFailed)if(e.isFinal)e.maxPointers>1&&setTimeout((()=>{this.isGestureRunning&&this.cancelEvent(e)})),clearTimeout(this._timer),this._timer=setTimeout((()=>{this.hasGestureFailed=!0,this.cancelEvent(e)}),this.maxDelayMs);else if(!this.hasGestureFailed&&!this.isGestureRunning){const t=this.hammer.get(this.name);t.options.enable(t,e)&&(clearTimeout(this._multiTapTimer),this.onStart(e),this.sendEvent(e))}}getHammerConfig(){return Object.assign({},super.getHammerConfig(),{event:this.name,taps:on(this.config.numberOfTaps)?1:this.config.numberOfTaps,interval:this.maxDelayMs,time:on(this.config.maxDurationMs)||null==this.config.maxDurationMs?250:this.config.maxDurationMs})}updateGestureConfig(e){let{shouldCancelWhenOutside:t=!0,maxDeltaX:n=Number.NaN,maxDeltaY:r=Number.NaN,numberOfTaps:a=1,minDurationMs:o=525,maxDelayMs:s=Number.NaN,maxDurationMs:l=Number.NaN,maxDist:u=2,minPointers:c=1,maxPointers:d=1}=e,h=(0,i.default)(e,vn);return super.updateGestureConfig(Object.assign({shouldCancelWhenOutside:t,numberOfTaps:a,maxDeltaX:n,maxDeltaY:r,minDurationMs:o,maxDelayMs:s,maxDist:u,minPointers:c,maxPointers:d},h))}onGestureEnded(...e){clearTimeout(this._timer),super.onGestureEnded(...e)}onWaitingEnded(e){this._shouldFireEndEvent&&(this.onSuccessfulTap(this._shouldFireEndEvent),this._shouldFireEndEvent=null)}};const kn=class extends mn{get minDurationMs(){return on(this.config.minDurationMs)?251:this.config.minDurationMs}get maxDist(){return on(this.config.maxDist)?9:this.config.maxDist}updateHasCustomActivationCriteria({maxDistSq:e}){return!sn(e)}getConfig(){return this.hasCustomActivationCriteria?this.config:{shouldCancelWhenOutside:!0,maxDistSq:10}}getHammerConfig(){return Object.assign({},super.getHammerConfig(),{time:this.minDurationMs})}getState(e){return{[zt.INPUT_START]:o.State.ACTIVE,[zt.INPUT_MOVE]:o.State.ACTIVE,[zt.INPUT_END]:o.State.END,[zt.INPUT_CANCEL]:o.State.FAILED}[e]}},xn=["minPointers","maxPointers"];const An=class extends an{get shouldEnableGestureOnSetup(){return!1}updateGestureConfig(e){let{minPointers:t=2,maxPointers:n=2}=e,r=(0,i.default)(e,xn);return super.updateGestureConfig(Object.assign({minPointers:t,maxPointers:n},r))}isGestureEnabledForEvent({minPointers:e,maxPointers:t},n,{maxPointers:r}){if(r>t)return{failed:!0};return{success:r>=e}}};const Sn=class extends An{get name(){return"pinch"}get NativeGestureClass(){return zt.Pinch}transformNativeEvent({scale:e,velocity:t,center:n}){return{focalX:n.x,focalY:n.y,velocity:t,scale:e}}};const En=class extends An{get name(){return"rotate"}get NativeGestureClass(){return zt.Rotate}transformNativeEvent({rotation:e,velocity:t,center:n}){var r;return{rotation:(e-(null!==(r=this.initialRotation)&&void 0!==r?r:0))*Ut,anchorX:n.x,anchorY:n.y,velocity:t}}};class Cn extends Error{constructor(e,t,n){super(`Invalid property \`${e}: ${t}\` expected \`${n}\``)}}const Tn=["numberOfPointers","direction"];const Dn=class extends _n{get name(){return"swipe"}get NativeGestureClass(){return zt.Swipe}onGestureActivated(e){this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_MOVE,isFinal:!1,isFirst:!0})),this.isGestureRunning=!1,this.hasGestureFailed=!1,this.sendEvent(Object.assign({},e,{eventType:zt.INPUT_END,isFinal:!0}))}onRawEvent(e){if(super.onRawEvent(e),!this.hasGestureFailed)if(e.isFinal)setTimeout((()=>{this.isGestureRunning&&this.cancelEvent(e)}));else if(!this.hasGestureFailed&&!this.isGestureRunning){const t=this.hammer.get(this.name);t.options.enable(t,e)&&(this.onStart(e),this.sendEvent(e))}}getHammerConfig(){return{pointers:this.config.numberOfPointers,direction:this.getDirection()}}getTargetDirections(e){const t=[];return e&qt&&t.push(zt.DIRECTION_RIGHT),e&$t&&t.push(zt.DIRECTION_LEFT),e&Yt&&t.push(zt.DIRECTION_UP),e&Gt&&t.push(zt.DIRECTION_DOWN),t}getDirection(){const{direction:e}=this.getConfig();let t=[];return e&qt&&t.push(zt.DIRECTION_HORIZONTAL),e&$t&&t.push(zt.DIRECTION_HORIZONTAL),e&Yt&&t.push(zt.DIRECTION_VERTICAL),e&Gt&&t.push(zt.DIRECTION_VERTICAL),t=[...new Set(t)],0===t.length?zt.DIRECTION_NONE:1===t.length?t[0]:zt.DIRECTION_ALL}isGestureEnabledForEvent({numberOfPointers:e},t,{maxPointers:n}){const r=n===e;return!r&&this.isGestureRunning?{failed:!0}:{success:r}}updateGestureConfig(e){let{numberOfPointers:t=1,direction:n}=e,r=(0,i.default)(e,Tn);if(on(n)||"number"!==typeof n)throw new Cn("direction",n,"number");return super.updateGestureConfig(Object.assign({numberOfPointers:t,direction:n},r))}},In={NativeViewGestureHandler:re,PanGestureHandler:class extends D{constructor(...e){super(...e),P(this,"customActivationProperties",["activeOffsetXStart","activeOffsetXEnd","failOffsetXStart","failOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetYStart","failOffsetYEnd","minVelocityX","minVelocityY","minVelocity"]),P(this,"velocityX",0),P(this,"velocityY",0),P(this,"minDistSq",225),P(this,"activeOffsetXStart",-Number.MAX_SAFE_INTEGER),P(this,"activeOffsetXEnd",Number.MIN_SAFE_INTEGER),P(this,"failOffsetXStart",Number.MIN_SAFE_INTEGER),P(this,"failOffsetXEnd",Number.MAX_SAFE_INTEGER),P(this,"activeOffsetYStart",Number.MAX_SAFE_INTEGER),P(this,"activeOffsetYEnd",Number.MIN_SAFE_INTEGER),P(this,"failOffsetYStart",Number.MIN_SAFE_INTEGER),P(this,"failOffsetYEnd",Number.MAX_SAFE_INTEGER),P(this,"minVelocityX",Number.MAX_SAFE_INTEGER),P(this,"minVelocityY",Number.MAX_SAFE_INTEGER),P(this,"minVelocitySq",Number.MAX_SAFE_INTEGER),P(this,"minPointers",1),P(this,"maxPointers",10),P(this,"startX",0),P(this,"startY",0),P(this,"offsetX",0),P(this,"offsetY",0),P(this,"lastX",0),P(this,"lastY",0),P(this,"stylusData",void 0),P(this,"activateAfterLongPress",0),P(this,"activationTimeout",0),P(this,"enableTrackpadTwoFingerGesture",!1),P(this,"endWheelTimeout",0),P(this,"wheelDevice",c.UNDETERMINED)}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,O);this.resetConfig(),super.updateGestureConfig(Object.assign({enabled:t},n)),this.checkCustomActivationCriteria(this.customActivationProperties),void 0!==this.config.minDist?this.minDistSq=this.config.minDist*this.config.minDist:this.hasCustomActivationCriteria&&(this.minDistSq=Number.MAX_SAFE_INTEGER),void 0!==this.config.minPointers&&(this.minPointers=this.config.minPointers),void 0!==this.config.maxPointers&&(this.maxPointers=this.config.maxPointers),void 0!==this.config.minVelocity&&(this.minVelocityX=this.config.minVelocity,this.minVelocityY=this.config.minVelocity),void 0!==this.config.minVelocityX&&(this.minVelocityX=this.config.minVelocityX),void 0!==this.config.minVelocityY&&(this.minVelocityY=this.config.minVelocityY),void 0!==this.config.activateAfterLongPress&&(this.activateAfterLongPress=this.config.activateAfterLongPress),void 0!==this.config.activeOffsetXStart&&(this.activeOffsetXStart=this.config.activeOffsetXStart,void 0===this.config.activeOffsetXEnd&&(this.activeOffsetXEnd=Number.MAX_SAFE_INTEGER)),void 0!==this.config.activeOffsetXEnd&&(this.activeOffsetXEnd=this.config.activeOffsetXEnd,void 0===this.config.activeOffsetXStart&&(this.activeOffsetXStart=Number.MIN_SAFE_INTEGER)),void 0!==this.config.failOffsetXStart&&(this.failOffsetXStart=this.config.failOffsetXStart,void 0===this.config.failOffsetXEnd&&(this.failOffsetXEnd=Number.MAX_SAFE_INTEGER)),void 0!==this.config.failOffsetXEnd&&(this.failOffsetXEnd=this.config.failOffsetXEnd,void 0===this.config.failOffsetXStart&&(this.failOffsetXStart=Number.MIN_SAFE_INTEGER)),void 0!==this.config.activeOffsetYStart&&(this.activeOffsetYStart=this.config.activeOffsetYStart,void 0===this.config.activeOffsetYEnd&&(this.activeOffsetYEnd=Number.MAX_SAFE_INTEGER)),void 0!==this.config.activeOffsetYEnd&&(this.activeOffsetYEnd=this.config.activeOffsetYEnd,void 0===this.config.activeOffsetYStart&&(this.activeOffsetYStart=Number.MIN_SAFE_INTEGER)),void 0!==this.config.failOffsetYStart&&(this.failOffsetYStart=this.config.failOffsetYStart,void 0===this.config.failOffsetYEnd&&(this.failOffsetYEnd=Number.MAX_SAFE_INTEGER)),void 0!==this.config.failOffsetYEnd&&(this.failOffsetYEnd=this.config.failOffsetYEnd,void 0===this.config.failOffsetYStart&&(this.failOffsetYStart=Number.MIN_SAFE_INTEGER)),void 0!==this.config.enableTrackpadTwoFingerGesture&&(this.enableTrackpadTwoFingerGesture=this.config.enableTrackpadTwoFingerGesture)}resetConfig(){super.resetConfig(),this.activeOffsetXStart=-Number.MAX_SAFE_INTEGER,this.activeOffsetXEnd=Number.MIN_SAFE_INTEGER,this.failOffsetXStart=Number.MIN_SAFE_INTEGER,this.failOffsetXEnd=Number.MAX_SAFE_INTEGER,this.activeOffsetYStart=Number.MAX_SAFE_INTEGER,this.activeOffsetYEnd=Number.MIN_SAFE_INTEGER,this.failOffsetYStart=Number.MIN_SAFE_INTEGER,this.failOffsetYEnd=Number.MAX_SAFE_INTEGER,this.minVelocityX=Number.MAX_SAFE_INTEGER,this.minVelocityY=Number.MAX_SAFE_INTEGER,this.minVelocitySq=Number.MAX_SAFE_INTEGER,this.minDistSq=225,this.minPointers=1,this.maxPointers=10,this.activateAfterLongPress=0}transformNativeEvent(){const e=this.getTranslationX(),t=this.getTranslationY();return Object.assign({},super.transformNativeEvent(),{translationX:isNaN(e)?0:e,translationY:isNaN(t)?0:t,velocityX:this.velocityX,velocityY:this.velocityY,stylusData:this.stylusData})}getTranslationX(){return this.lastX-this.startX+this.offsetX}getTranslationY(){return this.lastY-this.startY+this.offsetY}clearActivationTimeout(){clearTimeout(this.activationTimeout)}onPointerDown(e){if(!this.isButtonInConfig(e.button))return;this.tracker.addToTracker(e),this.stylusData=e.stylusData,super.onPointerDown(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=this.lastX,this.startY=this.lastY,this.tryBegin(e),this.checkBegan(),this.tryToSendTouchEvent(e)}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e),this.tryBegin(e),this.offsetX+=this.lastX-this.startX,this.offsetY+=this.lastY-this.startY;const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=this.lastX,this.startY=this.lastY,this.tracker.trackedPointersCount>this.maxPointers?this.state===o.State.ACTIVE?this.cancel():this.fail():this.checkBegan()}onPointerUp(e){if(this.stylusData=e.stylusData,super.onPointerUp(e),this.state===o.State.ACTIVE){const e=this.tracker.getAbsoluteCoordsAverage();this.lastX=e.x,this.lastY=e.y}this.tracker.removeFromTracker(e.pointerId),0===this.tracker.trackedPointersCount&&this.clearActivationTimeout(),this.state===o.State.ACTIVE?this.end():(this.resetProgress(),this.fail())}onPointerRemove(e){super.onPointerRemove(e),this.tracker.removeFromTracker(e.pointerId),this.offsetX+=this.lastX-this.startX,this.offsetY+=this.lastY-this.startY;const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=this.lastX,this.startY=this.lastY,this.state===o.State.ACTIVE&&this.tracker.trackedPointersCount{this.state===o.State.ACTIVE&&(this.end(),this.tracker.removeFromTracker(e.pointerId),this.state=o.State.UNDETERMINED),this.wheelDevice=c.UNDETERMINED}),30)}onWheel(e){if(this.wheelDevice===c.MOUSE||!this.enableTrackpadTwoFingerGesture)return;if(this.state===o.State.UNDETERMINED){if(this.wheelDevice=e.wheelDeltaY%120!==0?c.TOUCHPAD:c.MOUSE,this.wheelDevice===c.MOUSE)return void this.scheduleWheelEnd(e);this.tracker.addToTracker(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=this.lastX,this.startY=this.lastY,this.begin(),this.activate()}this.tracker.track(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y;const n=this.tracker.getVelocity(e.pointerId);this.velocityX=n.x,this.velocityY=n.y,this.tryToSendMoveEvent(!1,e),this.scheduleWheelEnd(e)}shouldActivate(){const e=this.getTranslationX();if(this.activeOffsetXStart!==Number.MAX_SAFE_INTEGER&&ethis.activeOffsetXEnd)return!0;const t=this.getTranslationY();if(this.activeOffsetYStart!==Number.MAX_SAFE_INTEGER&&tthis.activeOffsetYEnd)return!0;const n=e*e+t*t;if(this.minDistSq!==Number.MAX_SAFE_INTEGER&&n>=this.minDistSq)return!0;const r=this.velocityX;if(this.minVelocityX!==Number.MAX_SAFE_INTEGER&&(this.minVelocityX<0&&r<=this.minVelocityX||this.minVelocityX>=0&&this.minVelocityX<=r))return!0;const a=this.velocityY;if(this.minVelocityY!==Number.MAX_SAFE_INTEGER&&(this.minVelocityY<0&&a<=this.minVelocityY||this.minVelocityY>=0&&this.minVelocityY<=a))return!0;const i=r*r+a*a;return this.minVelocitySq!==Number.MAX_SAFE_INTEGER&&i>=this.minVelocitySq}shouldFail(){const e=this.getTranslationX(),t=this.getTranslationY(),n=e*e+t*t;return this.activateAfterLongPress>0&&n>225?(this.clearActivationTimeout(),!0):this.failOffsetXStart!==Number.MIN_SAFE_INTEGER&&ethis.failOffsetXEnd||(this.failOffsetYStart!==Number.MIN_SAFE_INTEGER&&tthis.failOffsetYEnd))}tryBegin(e){if(this.state===o.State.UNDETERMINED&&this.tracker.trackedPointersCount>=this.minPointers)this.resetProgress(),this.offsetX=0,this.offsetY=0,this.velocityX=0,this.velocityY=0,this.begin(),this.activateAfterLongPress>0&&(this.activationTimeout=setTimeout((()=>{this.activate()}),this.activateAfterLongPress));else{const t=this.tracker.getVelocity(e.pointerId);this.velocityX=t.x,this.velocityY=t.y}}checkBegan(){this.state===o.State.BEGAN&&(this.shouldFail()?this.fail():this.shouldActivate()&&this.activate())}activate(e=!1){this.state!==o.State.ACTIVE&&this.resetProgress(),super.activate(e)}onCancel(){this.clearActivationTimeout()}onReset(){this.clearActivationTimeout()}resetProgress(){this.state!==o.State.ACTIVE&&(this.startX=this.lastX,this.startY=this.lastY)}},TapGestureHandler:class extends D{constructor(...e){super(...e),R(this,"maxDeltaX",Number.MIN_SAFE_INTEGER),R(this,"maxDeltaY",Number.MIN_SAFE_INTEGER),R(this,"maxDistSq",Number.MIN_SAFE_INTEGER),R(this,"maxDurationMs",500),R(this,"maxDelayMs",500),R(this,"numberOfTaps",1),R(this,"minNumberOfPointers",1),R(this,"currentMaxNumberOfPointers",1),R(this,"startX",0),R(this,"startY",0),R(this,"offsetX",0),R(this,"offsetY",0),R(this,"lastX",0),R(this,"lastY",0),R(this,"waitTimeout",void 0),R(this,"delayTimeout",void 0),R(this,"tapsSoFar",0)}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,M);super.updateGestureConfig(Object.assign({enabled:t},n)),void 0!==this.config.numberOfTaps&&(this.numberOfTaps=this.config.numberOfTaps),void 0!==this.config.maxDurationMs&&(this.maxDurationMs=this.config.maxDurationMs),void 0!==this.config.maxDelayMs&&(this.maxDelayMs=this.config.maxDelayMs),void 0!==this.config.maxDeltaX&&(this.maxDeltaX=this.config.maxDeltaX),void 0!==this.config.maxDeltaY&&(this.maxDeltaY=this.config.maxDeltaY),void 0!==this.config.maxDist&&(this.maxDistSq=this.config.maxDist*this.config.maxDist),void 0!==this.config.minPointers&&(this.minNumberOfPointers=this.config.minPointers)}resetConfig(){super.resetConfig(),this.maxDeltaX=Number.MIN_SAFE_INTEGER,this.maxDeltaY=Number.MIN_SAFE_INTEGER,this.maxDistSq=Number.MIN_SAFE_INTEGER,this.maxDurationMs=500,this.maxDelayMs=500,this.numberOfTaps=1,this.minNumberOfPointers=1}clearTimeouts(){clearTimeout(this.waitTimeout),clearTimeout(this.delayTimeout)}startTap(){this.clearTimeouts(),this.waitTimeout=setTimeout((()=>this.fail()),this.maxDurationMs)}endTap(){this.clearTimeouts(),++this.tapsSoFar===this.numberOfTaps&&this.currentMaxNumberOfPointers>=this.minNumberOfPointers?this.activate():this.delayTimeout=setTimeout((()=>this.fail()),this.maxDelayMs)}onPointerDown(e){this.isButtonInConfig(e.button)&&(this.tracker.addToTracker(e),super.onPointerDown(e),this.trySettingPosition(e),this.startX=e.x,this.startY=e.y,this.lastX=e.x,this.lastY=e.y,this.updateState(e),this.tryToSendTouchEvent(e))}onPointerAdd(e){super.onPointerAdd(e),this.tracker.addToTracker(e),this.trySettingPosition(e),this.offsetX+=this.lastX-this.startX,this.offsetY+=this.lastY-this.startY;const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=t.x,this.startY=t.y,this.updateState(e)}onPointerUp(e){super.onPointerUp(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.tracker.removeFromTracker(e.pointerId),this.updateState(e)}onPointerRemove(e){super.onPointerRemove(e),this.tracker.removeFromTracker(e.pointerId),this.offsetX+=this.lastX-this.startX,this.offsetY+=this.lastY=this.startY;const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.startX=this.lastX,this.startY=this.lastY,this.updateState(e)}onPointerMove(e){this.trySettingPosition(e),this.tracker.track(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.updateState(e),super.onPointerMove(e)}onPointerOutOfBounds(e){this.trySettingPosition(e),this.tracker.track(e);const t=this.tracker.getAbsoluteCoordsAverage();this.lastX=t.x,this.lastY=t.y,this.updateState(e),super.onPointerOutOfBounds(e)}updateState(e){if(this.currentMaxNumberOfPointersthis.maxDeltaX)return!0;const t=this.lastY-this.startY+this.offsetY;if(this.maxDeltaY!==Number.MIN_SAFE_INTEGER&&Math.abs(t)>this.maxDeltaY)return!0;const n=t*t+e*e;return this.maxDistSq!==Number.MIN_SAFE_INTEGER&&n>this.maxDistSq}activate(){super.activate(),this.end()}onCancel(){this.resetProgress(),this.clearTimeouts()}resetProgress(){this.clearTimeouts(),this.tapsSoFar=0,this.currentMaxNumberOfPointers=0}},LongPressGestureHandler:class extends D{constructor(...e){super(...e),N(this,"minDurationMs",500),N(this,"defaultMaxDistSq",100),N(this,"maxDistSq",this.defaultMaxDistSq),N(this,"numberOfPointers",1),N(this,"startX",0),N(this,"startY",0),N(this,"startTime",0),N(this,"previousTime",0),N(this,"activationTimeout",void 0)}init(e,t){void 0===this.config.enableContextMenu&&(this.config.enableContextMenu=!1),super.init(e,t)}transformNativeEvent(){return Object.assign({},super.transformNativeEvent(),{duration:Date.now()-this.startTime})}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,L);super.updateGestureConfig(Object.assign({enabled:t},n)),void 0!==this.config.minDurationMs&&(this.minDurationMs=this.config.minDurationMs),void 0!==this.config.maxDist&&(this.maxDistSq=this.config.maxDist*this.config.maxDist),void 0!==this.config.numberOfPointers&&(this.numberOfPointers=this.config.numberOfPointers)}resetConfig(){super.resetConfig(),this.minDurationMs=500,this.maxDistSq=this.defaultMaxDistSq}onStateChange(e,t){clearTimeout(this.activationTimeout)}onPointerDown(e){this.isButtonInConfig(e.button)&&(this.tracker.addToTracker(e),super.onPointerDown(e),this.startX=e.x,this.startY=e.y,this.tryBegin(),this.tryActivate(),this.tryToSendTouchEvent(e))}onPointerAdd(e){if(super.onPointerAdd(e),this.tracker.addToTracker(e),this.tracker.trackedPointersCount>this.numberOfPointers)return void this.fail();const t=this.tracker.getAbsoluteCoordsAverage();this.startX=t.x,this.startY=t.y,this.tryActivate()}onPointerMove(e){super.onPointerMove(e),this.tracker.track(e),this.checkDistanceFail()}onPointerOutOfBounds(e){super.onPointerOutOfBounds(e),this.tracker.track(e),this.checkDistanceFail()}onPointerUp(e){super.onPointerUp(e),this.tracker.removeFromTracker(e.pointerId),this.state===o.State.ACTIVE?this.end():this.fail()}onPointerRemove(e){super.onPointerRemove(e),this.tracker.removeFromTracker(e.pointerId),this.tracker.trackedPointersCount0?this.activationTimeout=setTimeout((()=>{this.activate()}),this.minDurationMs):0===this.minDurationMs&&this.activate())}checkDistanceFail(){const e=this.tracker.getAbsoluteCoordsAverage(),t=e.x-this.startX,n=e.y-this.startY;t*t+n*n<=this.maxDistSq||(this.state===o.State.ACTIVE?this.cancel():this.fail())}},PinchGestureHandler:class extends D{constructor(...e){super(...e),V(this,"scale",1),V(this,"velocity",0),V(this,"startingSpan",0),V(this,"spanSlop",s),V(this,"scaleDetectorListener",{onScaleBegin:e=>(this.startingSpan=e.currentSpan,!0),onScale:e=>{const t=this.scale;this.scale*=e.calculateScaleFactor(this.tracker.trackedPointersCount);const n=e.timeDelta;return n>0&&(this.velocity=(this.scale-t)/n),Math.abs(this.startingSpan-e.currentSpan)>=this.spanSlop&&this.state===o.State.BEGAN&&this.activate(),!0},onScaleEnd:e=>{}}),V(this,"scaleGestureDetector",new j(this.scaleDetectorListener))}init(e,t){super.init(e,t),this.shouldCancelWhenOutside=!1}transformNativeEvent(){return{focalX:this.scaleGestureDetector.focusX,focalY:this.scaleGestureDetector.focusY,velocity:this.velocity,scale:this.scale}}onPointerDown(e){this.tracker.addToTracker(e),super.onPointerDown(e),this.tryToSendTouchEvent(e)}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e),this.tryBegin(),this.scaleGestureDetector.onTouchEvent(e,this.tracker)}onPointerUp(e){super.onPointerUp(e),this.tracker.removeFromTracker(e.pointerId),this.state===o.State.ACTIVE&&(this.scaleGestureDetector.onTouchEvent(e,this.tracker),this.state===o.State.ACTIVE?this.end():this.fail())}onPointerRemove(e){super.onPointerRemove(e),this.scaleGestureDetector.onTouchEvent(e,this.tracker),this.tracker.removeFromTracker(e.pointerId),this.state===o.State.ACTIVE&&this.tracker.trackedPointersCount<2&&this.end()}onPointerMove(e){this.tracker.trackedPointersCount<2||(this.tracker.track(e),this.scaleGestureDetector.onTouchEvent(e,this.tracker),super.onPointerMove(e))}onPointerOutOfBounds(e){this.tracker.trackedPointersCount<2||(this.tracker.track(e),this.scaleGestureDetector.onTouchEvent(e,this.tracker),super.onPointerOutOfBounds(e))}tryBegin(){this.state===o.State.UNDETERMINED&&(this.resetProgress(),this.begin())}activate(e){this.state!==o.State.ACTIVE&&this.resetProgress(),super.activate(e)}onReset(){this.resetProgress()}resetProgress(){this.state!==o.State.ACTIVE&&(this.velocity=0,this.scale=1)}},RotationGestureHandler:class extends D{constructor(...e){super(...e),U(this,"rotation",0),U(this,"velocity",0),U(this,"cachedAnchorX",0),U(this,"cachedAnchorY",0),U(this,"rotationGestureListener",{onRotationBegin:e=>!0,onRotation:e=>{const t=this.rotation;this.rotation+=e.rotation;const n=e.timeDelta;return n>0&&(this.velocity=(this.rotation-t)/n),Math.abs(this.rotation)>=W&&this.state===o.State.BEGAN&&this.activate(),!0},onRotationEnd:e=>{this.end()}}),U(this,"rotationGestureDetector",new H(this.rotationGestureListener))}init(e,t){super.init(e,t),this.shouldCancelWhenOutside=!1}transformNativeEvent(){return{rotation:this.rotation?this.rotation:0,anchorX:this.getAnchorX(),anchorY:this.getAnchorY(),velocity:this.velocity?this.velocity:0}}getAnchorX(){const e=this.rotationGestureDetector.anchorX;return e||this.cachedAnchorX}getAnchorY(){const e=this.rotationGestureDetector.anchorY;return e||this.cachedAnchorY}onPointerDown(e){this.tracker.addToTracker(e),super.onPointerDown(e),this.tryToSendTouchEvent(e)}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e),this.tryBegin(),this.rotationGestureDetector.onTouchEvent(e,this.tracker)}onPointerMove(e){this.tracker.trackedPointersCount<2||(this.getAnchorX()&&(this.cachedAnchorX=this.getAnchorX()),this.getAnchorY()&&(this.cachedAnchorY=this.getAnchorY()),this.tracker.track(e),this.rotationGestureDetector.onTouchEvent(e,this.tracker),super.onPointerMove(e))}onPointerOutOfBounds(e){this.tracker.trackedPointersCount<2||(this.getAnchorX()&&(this.cachedAnchorX=this.getAnchorX()),this.getAnchorY()&&(this.cachedAnchorY=this.getAnchorY()),this.tracker.track(e),this.rotationGestureDetector.onTouchEvent(e,this.tracker),super.onPointerOutOfBounds(e))}onPointerUp(e){super.onPointerUp(e),this.tracker.removeFromTracker(e.pointerId),this.rotationGestureDetector.onTouchEvent(e,this.tracker),this.state===o.State.ACTIVE&&(this.state===o.State.ACTIVE?this.end():this.fail())}onPointerRemove(e){super.onPointerRemove(e),this.rotationGestureDetector.onTouchEvent(e,this.tracker),this.tracker.removeFromTracker(e.pointerId)}tryBegin(){this.state===o.State.UNDETERMINED&&this.begin()}onReset(){this.state!==o.State.ACTIVE&&(this.rotation=0,this.velocity=0,this.rotationGestureDetector.reset())}},FlingGestureHandler:class extends D{constructor(...e){super(...e),J(this,"numberOfPointersRequired",1),J(this,"direction",Z),J(this,"maxDurationMs",800),J(this,"minVelocity",700),J(this,"delayTimeout",void 0),J(this,"maxNumberOfPointersSimultaneously",0),J(this,"keyPointer",NaN)}updateGestureConfig(e){let{enabled:t=!0}=e,n=(0,i.default)(e,K);super.updateGestureConfig(Object.assign({enabled:t},n)),this.config.direction&&(this.direction=this.config.direction),this.config.numberOfPointers&&(this.numberOfPointersRequired=this.config.numberOfPointers)}startFling(){this.begin(),this.maxNumberOfPointersSimultaneously=1,this.delayTimeout=setTimeout((()=>this.fail()),this.maxDurationMs)}tryEndFling(){const e=Y.fromVelocity(this.tracker,this.keyPointer),t=(t,n)=>(t&this.direction)===t&&e.isSimilar(Y.fromDirection(t),n),n=Object.values(q.Directions),r=Object.values(q.DiagonalDirections),a=n.map((e=>t(e,Q))),i=r.map((e=>t(e,ee))),o=a.some(Boolean)||i.some(Boolean),s=e.magnitude>this.minVelocity;return!(this.maxNumberOfPointersSimultaneously!==this.numberOfPointersRequired||!o||!s)&&(clearTimeout(this.delayTimeout),this.activate(),!0)}endFling(){this.tryEndFling()||this.fail()}onPointerDown(e){this.isButtonInConfig(e.button)&&(this.tracker.addToTracker(e),this.keyPointer=e.pointerId,super.onPointerDown(e),this.newPointerAction(),this.tryToSendTouchEvent(e))}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e),this.newPointerAction()}newPointerAction(){this.state===o.State.UNDETERMINED&&this.startFling(),this.state===o.State.BEGAN&&(this.tryEndFling(),this.tracker.trackedPointersCount>this.maxNumberOfPointersSimultaneously&&(this.maxNumberOfPointersSimultaneously=this.tracker.trackedPointersCount))}pointerMoveAction(e){this.tracker.track(e),this.state===o.State.BEGAN&&this.tryEndFling()}onPointerMove(e){this.pointerMoveAction(e),super.onPointerMove(e)}onPointerOutOfBounds(e){this.pointerMoveAction(e),super.onPointerOutOfBounds(e)}onPointerUp(e){super.onPointerUp(e),this.onUp(e),this.keyPointer=NaN}onPointerRemove(e){super.onPointerRemove(e),this.onUp(e)}onUp(e){this.state===o.State.BEGAN&&this.endFling(),this.tracker.removeFromTracker(e.pointerId)}activate(e){super.activate(e),this.end()}resetConfig(){super.resetConfig(),this.numberOfPointersRequired=1,this.direction=Z}},ManualGestureHandler:class extends D{onPointerDown(e){this.tracker.addToTracker(e),super.onPointerDown(e),this.begin(),this.tryToSendTouchEvent(e)}onPointerAdd(e){this.tracker.addToTracker(e),super.onPointerAdd(e)}onPointerMove(e){this.tracker.track(e),super.onPointerMove(e)}onPointerOutOfBounds(e){this.tracker.track(e),super.onPointerOutOfBounds(e)}onPointerUp(e){super.onPointerUp(e),this.tracker.removeFromTracker(e.pointerId)}onPointerRemove(e){super.onPointerRemove(e),this.tracker.removeFromTracker(e.pointerId)}},HoverGestureHandler:class extends D{constructor(...e){super(...e),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"stylusData",void 0)}transformNativeEvent(){return Object.assign({},super.transformNativeEvent(),{stylusData:this.stylusData})}onPointerMoveOver(e){x.instance.recordHandlerIfNotPresent(this),this.tracker.addToTracker(e),this.stylusData=e.stylusData,super.onPointerMoveOver(e),this.state===o.State.UNDETERMINED&&(this.begin(),this.activate())}onPointerMoveOut(e){this.tracker.removeFromTracker(e.pointerId),this.stylusData=e.stylusData,super.onPointerMoveOut(e),this.end()}onPointerMove(e){this.tracker.track(e),this.stylusData=e.stylusData,super.onPointerMove(e)}onPointerCancel(e){super.onPointerCancel(e),this.reset()}}},On={NativeViewGestureHandler:gn,PanGestureHandler:bn,TapGestureHandler:Fn,LongPressGestureHandler:kn,PinchGestureHandler:Sn,RotationGestureHandler:En,FlingGestureHandler:Dn};var Pn=n(78293),Mn=n(60154);function Rn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ln{constructor(e){Rn(this,"view",void 0),Rn(this,"pointersInBounds",[]),Rn(this,"activePointersCounter",void 0),this.view=e,this.activePointersCounter=0}onPointerDown(e){}onPointerAdd(e){}onPointerUp(e){}onPointerRemove(e){}onPointerMove(e){}onPointerLeave(e){}onPointerEnter(e){}onPointerCancel(e){}onPointerOutOfBounds(e){}onPointerMoveOver(e){}onPointerMoveOut(e){}onWheel(e){}setOnPointerDown(e){this.onPointerDown=e}setOnPointerAdd(e){this.onPointerAdd=e}setOnPointerUp(e){this.onPointerUp=e}setOnPointerRemove(e){this.onPointerRemove=e}setOnPointerMove(e){this.onPointerMove=e}setOnPointerLeave(e){this.onPointerLeave=e}setOnPointerEnter(e){this.onPointerEnter=e}setOnPointerCancel(e){this.onPointerCancel=e}setOnPointerOutOfBounds(e){this.onPointerOutOfBounds=e}setOnPointerMoveOver(e){this.onPointerMoveOver=e}setOnPointerMoveOut(e){this.onPointerMoveOut=e}setOnWheel(e){this.onWheel=e}markAsInBounds(e){this.pointersInBounds.indexOf(e)>=0||this.pointersInBounds.push(e)}markAsOutOfBounds(e){const t=this.pointersInBounds.indexOf(e);t<0||this.pointersInBounds.splice(t,1)}resetManager(){this.activePointersCounter=0,this.pointersInBounds=[]}}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bn=new Set(["SELECT","INPUT"]);class jn extends Ln{constructor(e){super(e),Nn(this,"trackedPointers",new Set),Nn(this,"mouseButtonsMapper",new Map),Nn(this,"lastPosition",void 0),Nn(this,"pointerDownCallback",(e=>{if(!(0,X.isPointerInBounds)(this.view,{x:e.clientX,y:e.clientY}))return;const t=this.mapEvent(e,l.DOWN),n=e.target;Bn.has(n.tagName)||n.setPointerCapture(t.pointerId),this.markAsInBounds(t.pointerId),this.trackedPointers.add(t.pointerId),++this.activePointersCounter>1?(t.eventType=l.ADDITIONAL_POINTER_DOWN,this.onPointerAdd(t)):this.onPointerDown(t)})),Nn(this,"pointerUpCallback",(e=>{if(0===this.activePointersCounter)return;const t=this.mapEvent(e,l.UP),n=e.target;Bn.has(n.tagName)||n.releasePointerCapture(t.pointerId),this.markAsOutOfBounds(t.pointerId),this.trackedPointers.delete(t.pointerId),--this.activePointersCounter>0?(t.eventType=l.ADDITIONAL_POINTER_UP,this.onPointerRemove(t)):this.onPointerUp(t)})),Nn(this,"pointerMoveCallback",(e=>{const t=this.mapEvent(e,l.MOVE),n=e.target;n.hasPointerCapture(e.pointerId)||Bn.has(n.tagName)||n.setPointerCapture(e.pointerId);const r=(0,X.isPointerInBounds)(this.view,{x:t.x,y:t.y}),a=this.pointersInBounds.indexOf(t.pointerId);r?a<0?(t.eventType=l.ENTER,this.onPointerEnter(t),this.markAsInBounds(t.pointerId)):this.onPointerMove(t):a>=0?(t.eventType=l.LEAVE,this.onPointerLeave(t),this.markAsOutOfBounds(t.pointerId)):this.onPointerOutOfBounds(t),this.lastPosition.x=e.x,this.lastPosition.y=e.y})),Nn(this,"pointerCancelCallback",(e=>{const t=this.mapEvent(e,l.CANCEL);this.onPointerCancel(t),this.markAsOutOfBounds(t.pointerId),this.activePointersCounter=0,this.trackedPointers.clear()})),Nn(this,"pointerEnterCallback",(e=>{const t=this.mapEvent(e,l.ENTER);this.onPointerMoveOver(t)})),Nn(this,"pointerLeaveCallback",(e=>{const t=this.mapEvent(e,l.LEAVE);this.onPointerMoveOut(t)})),Nn(this,"lostPointerCaptureCallback",(e=>{const t=this.mapEvent(e,l.CANCEL);this.trackedPointers.has(t.pointerId)&&(this.onPointerCancel(t),this.activePointersCounter=0,this.trackedPointers.clear())})),this.mouseButtonsMapper.set(0,E.MouseButton.LEFT),this.mouseButtonsMapper.set(1,E.MouseButton.MIDDLE),this.mouseButtonsMapper.set(2,E.MouseButton.RIGHT),this.mouseButtonsMapper.set(3,E.MouseButton.BUTTON_4),this.mouseButtonsMapper.set(4,E.MouseButton.BUTTON_5),this.lastPosition={x:-1/0,y:-1/0}}registerListeners(){this.view.addEventListener("pointerdown",this.pointerDownCallback),this.view.addEventListener("pointerup",this.pointerUpCallback),this.view.addEventListener("pointermove",this.pointerMoveCallback),this.view.addEventListener("pointercancel",this.pointerCancelCallback),this.view.addEventListener("pointerenter",this.pointerEnterCallback),this.view.addEventListener("pointerleave",this.pointerLeaveCallback),this.view.addEventListener("lostpointercapture",this.lostPointerCaptureCallback)}unregisterListeners(){this.view.removeEventListener("pointerdown",this.pointerDownCallback),this.view.removeEventListener("pointerup",this.pointerUpCallback),this.view.removeEventListener("pointermove",this.pointerMoveCallback),this.view.removeEventListener("pointercancel",this.pointerCancelCallback),this.view.removeEventListener("pointerenter",this.pointerEnterCallback),this.view.removeEventListener("pointerleave",this.pointerLeaveCallback),this.view.removeEventListener("lostpointercapture",this.lostPointerCaptureCallback)}mapEvent(e,t){var n;const r=this.view.getBoundingClientRect(),{scaleX:a,scaleY:i}=(0,X.calculateViewScale)(this.view);return{x:e.clientX,y:e.clientY,offsetX:(e.clientX-r.left)/a,offsetY:(e.clientY-r.top)/i,pointerId:e.pointerId,eventType:t,pointerType:null!==(n=X.PointerTypeMapping.get(e.pointerType))&&void 0!==n?n:d.PointerType.OTHER,button:this.mouseButtonsMapper.get(e.button),time:e.timeStamp,stylusData:(0,X.tryExtractStylusData)(e)}}resetManager(){super.resetManager(),this.trackedPointers.clear()}}function Vn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class zn extends Ln{constructor(...e){super(...e),Vn(this,"activationKeys",["Enter"," "]),Vn(this,"cancelationKeys",["Tab"]),Vn(this,"isPressed",!1),Vn(this,"keyDownCallback",(e=>{-1!==this.cancelationKeys.indexOf(e.key)&&this.isPressed?this.dispatchEvent(e,l.CANCEL):-1!==this.activationKeys.indexOf(e.key)&&this.dispatchEvent(e,l.DOWN)})),Vn(this,"keyUpCallback",(e=>{-1!==this.activationKeys.indexOf(e.key)&&this.isPressed&&this.dispatchEvent(e,l.UP)}))}dispatchEvent(e,t){if(!(e.target instanceof HTMLElement))return;const n=this.mapEvent(e,t);switch(t){case l.UP:this.isPressed=!1,this.onPointerUp(n);break;case l.DOWN:this.isPressed=!0,this.onPointerDown(n);break;case l.CANCEL:this.isPressed=!1,this.onPointerCancel(n)}}registerListeners(){this.view.addEventListener("keydown",this.keyDownCallback),this.view.addEventListener("keyup",this.keyUpCallback)}unregisterListeners(){this.view.removeEventListener("keydown",this.keyDownCallback),this.view.removeEventListener("keyup",this.keyUpCallback)}mapEvent(e,t){const n=e.target.getBoundingClientRect(),r={x:(null===n||void 0===n?void 0:n.x)+(null===n||void 0===n?void 0:n.width)/2,y:(null===n||void 0===n?void 0:n.y)+(null===n||void 0===n?void 0:n.height)/2},a={x:(null===n||void 0===n?void 0:n.width)/2,y:(null===n||void 0===n?void 0:n.height)/2};return{x:r.x,y:r.y,offsetX:a.x,offsetY:a.y,pointerId:0,eventType:t,pointerType:d.PointerType.KEY,time:e.timeStamp}}}function Hn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Un extends Ln{constructor(...e){super(...e),Hn(this,"wheelDelta",{x:0,y:0}),Hn(this,"resetDelta",(e=>{this.wheelDelta={x:0,y:0}})),Hn(this,"wheelCallback",(e=>{this.wheelDelta.x+=e.deltaX,this.wheelDelta.y+=e.deltaY;const t=this.mapEvent(e);this.onWheel(t)}))}registerListeners(){this.view.addEventListener("pointermove",this.resetDelta),this.view.addEventListener("wheel",this.wheelCallback)}unregisterListeners(){this.view.removeEventListener("pointermove",this.resetDelta),this.view.removeEventListener("wheel",this.wheelCallback)}mapEvent(e){return{x:e.clientX+this.wheelDelta.x,y:e.clientY+this.wheelDelta.y,offsetX:e.offsetX-e.deltaX,offsetY:e.offsetY-e.deltaY,pointerId:-1,eventType:l.MOVE,pointerType:d.PointerType.OTHER,time:e.timeStamp,wheelDeltaY:e.wheelDeltaY}}resetManager(){super.resetManager()}}function Wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class qn{constructor(){Wn(this,"isInitialized",!1),Wn(this,"_view",void 0),Wn(this,"gestureHandler",void 0),Wn(this,"eventManagers",[]),Wn(this,"defaultViewStyles",{userSelect:"",touchAction:""})}init(e,t){if(!e)throw new Error(`Cannot find HTML Element for handler ${t.handlerTag}`);this.isInitialized=!0,this.gestureHandler=t,this.view=(0,Mn.default)(e),this.defaultViewStyles={userSelect:this.view.style.userSelect,touchAction:this.view.style.touchAction};const n=t.config;this.setUserSelect(n.enabled),this.setTouchAction(n.enabled),this.setContextMenu(n.enabled),this.eventManagers.push(new jn(this.view)),this.eventManagers.push(new zn(this.view)),this.eventManagers.push(new Un(this.view)),this.eventManagers.forEach((e=>this.gestureHandler.attachEventManager(e)))}isPointerInBounds({x:e,y:t}){return(0,X.isPointerInBounds)(this.view,{x:e,y:t})}measureView(){const e=this.view.getBoundingClientRect();return{pageX:e.left,pageY:e.top,width:e.width,height:e.height}}reset(){this.eventManagers.forEach((e=>e.resetManager()))}tryResetCursor(){const e=this.gestureHandler.config;e.activeCursor&&"auto"!==e.activeCursor&&this.gestureHandler.state===o.State.ACTIVE&&(this.view.style.cursor="auto")}shouldDisableContextMenu(e){return void 0===e.enableContextMenu&&this.gestureHandler.isButtonInConfig(E.MouseButton.RIGHT)||!1===e.enableContextMenu}addContextMenuListeners(e){this.shouldDisableContextMenu(e)?this.view.addEventListener("contextmenu",this.disableContextMenu):e.enableContextMenu&&this.view.addEventListener("contextmenu",this.enableContextMenu)}removeContextMenuListeners(e){this.shouldDisableContextMenu(e)?this.view.removeEventListener("contextmenu",this.disableContextMenu):e.enableContextMenu&&this.view.removeEventListener("contextmenu",this.enableContextMenu)}disableContextMenu(e){e.preventDefault()}enableContextMenu(e){e.stopPropagation()}setUserSelect(e){const{userSelect:t}=this.gestureHandler.config;this.view.style.userSelect=e?null!==t&&void 0!==t?t:"none":this.defaultViewStyles.userSelect,this.view.style.webkitUserSelect=e?null!==t&&void 0!==t?t:"none":this.defaultViewStyles.userSelect}setTouchAction(e){const{touchAction:t}=this.gestureHandler.config;this.view.style.touchAction=e?null!==t&&void 0!==t?t:"none":this.defaultViewStyles.touchAction,this.view.style.WebkitTouchCallout=e?null!==t&&void 0!==t?t:"none":this.defaultViewStyles.touchAction}setContextMenu(e){const t=this.gestureHandler.config;e?this.addContextMenuListeners(t):this.removeContextMenuListeners(t)}onEnabledChange(e){this.isInitialized&&(this.setUserSelect(e),this.setTouchAction(e),this.setContextMenu(e),e?this.eventManagers.forEach((e=>{e.registerListeners()})):this.eventManagers.forEach((e=>{e.unregisterListeners()})))}onBegin(){}onActivate(){const e=this.gestureHandler.config;this.view.style.cursor&&"auto"!==this.view.style.cursor||!e.activeCursor||(this.view.style.cursor=e.activeCursor)}onEnd(){this.tryResetCursor()}onCancel(){this.tryResetCursor()}onFail(){this.tryResetCursor()}destroy(e){this.removeContextMenuListeners(e),this.eventManagers.forEach((e=>{e.unregisterListeners()}))}get view(){return this._view}set view(e){this._view=e}}let $n=!1;const Yn={handleSetJSResponder(e,t){console.warn("handleSetJSResponder: ",e,t)},handleClearJSResponder(){console.warn("handleClearJSResponder: ")},createGestureHandler(e,t,n){if((0,a.isNewWebImplementationEnabled)()){if(!(e in In))throw new Error(`react-native-gesture-handler: ${e} is not supported on web.`);const r=In[e];Pn.default.createGestureHandler(t,new r(new qn)),S.instance.configureInteractions(Pn.default.getHandler(t),n)}else{if(!(e in On))throw new Error(`react-native-gesture-handler: ${e} is not supported on web.`);!function(e,t){if(e in Xt)throw new Error(`Handler with tag ${e} already exists`);Xt[e]=t,Xt[e].handlerTag=e}(t,new(0,On[e]))}this.updateGestureHandler(t,n)},attachGestureHandler(e,t,n,i){if(!(t instanceof Element||t instanceof r.Component)){$n=!0;const t=((0,a.isNewWebImplementationEnabled)()?Pn.default.getHandler(e):Kt(e)).constructor.name;throw new Error(`${t} with tag ${e} received child that is not valid HTML element.`)}(0,a.isNewWebImplementationEnabled)()?Pn.default.getHandler(e).init(t,i):Kt(e).setView(t,i)},updateGestureHandler(e,t){(0,a.isNewWebImplementationEnabled)()?(Pn.default.getHandler(e).updateGestureConfig(t),S.instance.configureInteractions(Pn.default.getHandler(e),t)):Kt(e).updateGestureConfig(t)},getGestureHandlerNode:e=>(0,a.isNewWebImplementationEnabled)()?Pn.default.getHandler(e):Kt(e),dropGestureHandler(e){$n||((0,a.isNewWebImplementationEnabled)()?Pn.default.dropGestureHandler(e):function(e){e in Xt&&(Kt(e).destroy(),delete Xt[e])}(e))},flushOperations(){}}},47154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{State:()=>r});const r={UNDETERMINED:0,FAILED:1,BEGAN:2,CANCELLED:3,ACTIVE:4,END:5}},74826:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(36665),a=n(15009),i=n(75675),o=n(73929),s=n(48623),l=n(97827),u=n(18917),c=n(47154);function d(){return d=Object.assign||function(e){for(var t=1;t{const{friction:n,overshootFriction:r}=e,{dragX:i,rowTranslation:o,leftWidth:s=0,rowWidth:l=0}=t,{rightOffset:u=l}=t,c=Math.max(0,l-u),{overshootLeft:d=s>0,overshootRight:h=c>0}=e,f=a.default.add(o,i.interpolate({inputRange:[0,n],outputRange:[0,1]})).interpolate({inputRange:[-c-1,-c,s,s+1],outputRange:[-c-(h?1/r:0),-c,s,s+(d?1/r:0)]});this.transX=f,this.showLeftAction=s>0?f.interpolate({inputRange:[-1,0,s],outputRange:[0,0,1]}):new a.default.Value(0),this.leftActionTranslate=this.showLeftAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:"clamp"}),this.showRightAction=c>0?f.interpolate({inputRange:[-c,0,1],outputRange:[1,0,0]}):new a.default.Value(0),this.rightActionTranslate=this.showRightAction.interpolate({inputRange:[0,Number.MIN_VALUE],outputRange:[-1e4,0],extrapolate:"clamp"})})),h(this,"onTapHandlerStateChange",(({nativeEvent:e})=>{e.oldState===c.State.ACTIVE&&this.close()})),h(this,"onHandlerStateChange",(e=>{if(e.nativeEvent.oldState===c.State.ACTIVE&&this.handleRelease(e),e.nativeEvent.state===c.State.ACTIVE){const{velocityX:i,translationX:o}=e.nativeEvent,{rowState:s}=this.state,{friction:l}=this.props,u=-1===s?"right":1===s||(o+.05*i)/l>0?"left":"right";var t,n,r,a;if(0===s)null===(t=(n=this.props).onSwipeableOpenStartDrag)||void 0===t||t.call(n,u);else null===(r=(a=this.props).onSwipeableCloseStartDrag)||void 0===r||r.call(a,u)}})),h(this,"handleRelease",(e=>{const{velocityX:t,translationX:n}=e.nativeEvent,{leftWidth:r=0,rowWidth:a=0,rowState:i}=this.state,{rightOffset:o=a}=this.state,s=a-o,{friction:l,leftThreshold:u=r/2,rightThreshold:c=s/2}=this.props,d=this.currentOffset()+n/l,h=(n+.05*t)/l;let f=0;0===i?h>u?f=r:h<-c&&(f=-s):1===i?h>-u&&(f=r):h{const{dragX:r,rowTranslation:i}=this.state;var o,s,l,u;if(r.setValue(0),i.setValue(e),this.setState({rowState:Math.sign(t)}),a.default.spring(i,Object.assign({restSpeedThreshold:1.7,restDisplacementThreshold:.4,velocity:n,bounciness:0,toValue:t,useNativeDriver:this.props.useNativeAnimations},this.props.animationOptions)).start((({finished:n})=>{var r,a,i,o;if(n)if(t>0)null===(r=(a=this.props).onSwipeableLeftOpen)||void 0===r||r.call(a),null===(i=(o=this.props).onSwipeableOpen)||void 0===i||i.call(o,"left",this);else if(t<0){var s,l,u,c;null===(s=(l=this.props).onSwipeableRightOpen)||void 0===s||s.call(l),null===(u=(c=this.props).onSwipeableOpen)||void 0===u||u.call(c,"right",this)}else{var d,h;const t=e>0?"left":"right";null===(d=(h=this.props).onSwipeableClose)||void 0===d||d.call(h,t,this)}})),t>0)null===(o=(s=this.props).onSwipeableLeftWillOpen)||void 0===o||o.call(s),null===(l=(u=this.props).onSwipeableWillOpen)||void 0===l||l.call(u,"left");else if(t<0){var c,d,h,f;null===(c=(d=this.props).onSwipeableRightWillOpen)||void 0===c||c.call(d),null===(h=(f=this.props).onSwipeableWillOpen)||void 0===h||h.call(f,"right")}else{var p,m;const t=e>0?"left":"right";null===(p=(m=this.props).onSwipeableWillClose)||void 0===p||p.call(m,t)}})),h(this,"onRowLayout",(({nativeEvent:e})=>{this.setState({rowWidth:e.layout.width})})),h(this,"currentOffset",(()=>{const{leftWidth:e=0,rowWidth:t=0,rowState:n}=this.state,{rightOffset:r=t}=this.state;return 1===n?e:-1===n?-(t-r):0})),h(this,"close",(()=>{this.animateRow(this.currentOffset(),0)})),h(this,"openLeft",(()=>{const{leftWidth:e=0}=this.state;this.animateRow(this.currentOffset(),e)})),h(this,"openRight",(()=>{const{rowWidth:e=0}=this.state,{rightOffset:t=e}=this.state,n=e-t;this.animateRow(this.currentOffset(),-n)})),h(this,"reset",(()=>{const{dragX:e,rowTranslation:t}=this.state;e.setValue(0),t.setValue(0),this.setState({rowState:0})}));const t=new a.default.Value(0);this.state={dragX:t,rowTranslation:new a.default.Value(0),rowState:0,leftWidth:void 0,rightOffset:void 0,rowWidth:void 0},this.updateAnimatedEvent(e,this.state),this.onGestureEvent=a.default.event([{nativeEvent:{translationX:t}}],{useNativeDriver:e.useNativeAnimations})}shouldComponentUpdate(e,t){return this.props.friction===e.friction&&this.props.overshootLeft===e.overshootLeft&&this.props.overshootRight===e.overshootRight&&this.props.overshootFriction===e.overshootFriction&&this.state.leftWidth===t.leftWidth&&this.state.rightOffset===t.rightOffset&&this.state.rowWidth===t.rowWidth||this.updateAnimatedEvent(e,t),!0}render(){const{rowState:e}=this.state,{children:t,renderLeftActions:n,renderRightActions:i,dragOffsetFromLeftEdge:s=10,dragOffsetFromRightEdge:c=10}=this.props,h=n&&r.createElement(a.default.View,{style:[p.leftActions,{transform:[{translateX:this.leftActionTranslate}]}]},n(this.showLeftAction,this.transX,this),r.createElement(o.default,{onLayout:({nativeEvent:e})=>this.setState({leftWidth:e.layout.x})})),f=i&&r.createElement(a.default.View,{style:[p.rightActions,{transform:[{translateX:this.rightActionTranslate}]}]},i(this.showRightAction,this.transX,this),r.createElement(o.default,{onLayout:({nativeEvent:e})=>this.setState({rightOffset:e.layout.x})}));return r.createElement(l.PanGestureHandler,d({activeOffsetX:[-c,s],touchAction:"pan-y"},this.props,{onGestureEvent:this.onGestureEvent,onHandlerStateChange:this.onHandlerStateChange}),r.createElement(a.default.View,{onLayout:this.onRowLayout,style:[p.container,this.props.containerStyle]},h,f,r.createElement(u.TapGestureHandler,{enabled:0!==e,touchAction:"pan-y",onHandlerStateChange:this.onTapHandlerStateChange},r.createElement(a.default.View,{pointerEvents:0===e?"auto":"box-only",style:[{transform:[{translateX:this.transX}]},this.props.childrenContainerStyle]},t))))}}h(f,"defaultProps",{friction:1,overshootFriction:1,useNativeAnimations:!0});const p=i.default.create({container:{overflow:"hidden"},leftActions:Object.assign({},i.default.absoluteFillObject,{flexDirection:s.default.isRTL?"row-reverse":"row"}),rightActions:Object.assign({},i.default.absoluteFillObject,{flexDirection:s.default.isRTL?"row":"row-reverse"})})},60154:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});var r=n(90932),a=n(56647);function i(e){if(e instanceof r.default)return e._listRef._scrollRef.firstChild;if(void 0!==(null===e||void 0===e?void 0:e.viewTag))return i(e.viewTag);if(e instanceof Element)return"contents"===e.style.display?i(e.firstChild):e;if((0,a.isRNSVGElement)(e))return e.elementRef.current;let t=null===e||void 0===e?void 0:e.current;for(;t&&"contents"===t.style.display;)t=t.firstChild;return t}},72944:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ghQueueMicrotask:()=>r});const r="function"===typeof setImmediate?setImmediate.bind(null):"function"===typeof requestAnimationFrame?requestAnimationFrame.bind(null):queueMicrotask.bind(null)},97827:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PanGestureHandler:()=>l,managePanProps:()=>u,panGestureHandlerCustomNativeProps:()=>o,panGestureHandlerProps:()=>i,panHandlerName:()=>s});var r=n(53976),a=n(70637);const i=["activeOffsetY","activeOffsetX","failOffsetY","failOffsetX","minDist","minVelocity","minVelocityX","minVelocityY","minPointers","maxPointers","avgTouches","enableTrackpadTwoFingerGesture","activateAfterLongPress"],o=["activeOffsetYStart","activeOffsetYEnd","activeOffsetXStart","activeOffsetXEnd","failOffsetYStart","failOffsetYEnd","failOffsetXStart","failOffsetXEnd"],s="PanGestureHandler",l=(0,r.default)({name:s,allowedProps:[...a.baseGestureHandlerProps,...i],config:{},transformProps:u,customNativeProps:o});function u(e){return function(e){const t=Object.assign({},e);return void 0!==e.activeOffsetX&&(delete t.activeOffsetX,Array.isArray(e.activeOffsetX)?(t.activeOffsetXStart=e.activeOffsetX[0],t.activeOffsetXEnd=e.activeOffsetX[1]):e.activeOffsetX<0?t.activeOffsetXStart=e.activeOffsetX:t.activeOffsetXEnd=e.activeOffsetX),void 0!==e.activeOffsetY&&(delete t.activeOffsetY,Array.isArray(e.activeOffsetY)?(t.activeOffsetYStart=e.activeOffsetY[0],t.activeOffsetYEnd=e.activeOffsetY[1]):e.activeOffsetY<0?t.activeOffsetYStart=e.activeOffsetY:t.activeOffsetYEnd=e.activeOffsetY),void 0!==e.failOffsetX&&(delete t.failOffsetX,Array.isArray(e.failOffsetX)?(t.failOffsetXStart=e.failOffsetX[0],t.failOffsetXEnd=e.failOffsetX[1]):e.failOffsetX<0?t.failOffsetXStart=e.failOffsetX:t.failOffsetXEnd=e.failOffsetX),void 0!==e.failOffsetY&&(delete t.failOffsetY,Array.isArray(e.failOffsetY)?(t.failOffsetYStart=e.failOffsetY[0],t.failOffsetYEnd=e.failOffsetY[1]):e.failOffsetY<0?t.failOffsetYStart=e.failOffsetY:t.failOffsetYEnd=e.failOffsetY),t}(e)}},18917:(e,t,n)=>{"use strict";n.r(t),n.d(t,{TapGestureHandler:()=>s,tapGestureHandlerProps:()=>i,tapHandlerName:()=>o});var r=n(53976),a=n(70637);const i=["maxDurationMs","maxDelayMs","numberOfTaps","maxDeltaX","maxDeltaY","maxDist","minPointers"],o="TapGestureHandler",s=(0,r.default)({name:o,allowedProps:[...a.baseGestureHandlerProps,...i],config:{shouldCancelWhenOutside:!0}})},53976:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>T});var r=n(36665),a=n(97640),i=n(40668);var o,s=n(36963),l=n(47154),u=n(55891),c=n(49e3),d=n(55604),h=n(60154),f=n(1082),p=n(22137),m=n(81156),g=n(72944),y=n(3453);function _(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const b=a.default,v=Object.assign({onGestureHandlerEvent:{registrationName:"onGestureHandlerEvent"},onGestureHandlerStateChange:{registrationName:"onGestureHandlerStateChange"}},(0,f.isFabric)()&&!1);b.genericDirectEventTypes=Object.assign({},b.genericDirectEventTypes,v);const w=null===(o=b.getViewManagerConfig)||void 0===o?void 0:o.call(b,"getConstants");w&&(w.genericDirectEventTypes=Object.assign({},w.genericDirectEventTypes,v));const{setJSResponder:F=()=>{},clearJSResponder:k=()=>{}}=b;b.setJSResponder=(e,t)=>{s.default.handleSetJSResponder(e,t),F(e,t)},b.clearJSResponder=()=>{s.default.handleClearJSResponder(),k()};let x=!0;const A=!1;function S(e){const t=e=>Array.isArray(e)?e.some((e=>e&&null===e.current)):e&&null===e.current;return t(e.simultaneousHandlers)||t(e.waitFor)}A&&i.default.addListener("toggleElementInspector",(()=>{x=!x}));const E={[l.State.UNDETERMINED]:void 0,[l.State.BEGAN]:"onBegan",[l.State.FAILED]:"onFailed",[l.State.CANCELLED]:"onCancelled",[l.State.ACTIVE]:"onActivated",[l.State.END]:"onEnded"},C=1;function T({name:e,allowedProps:t=[],config:n={},transformProps:a,customNativeProps:o=[]}){class l extends r.Component{constructor(t){if(super(t),_(this,"handlerTag",-1),_(this,"config",void 0),_(this,"propsRef",void 0),_(this,"isMountedRef",void 0),_(this,"viewNode",void 0),_(this,"viewTag",void 0),_(this,"inspectorToggleListener",void 0),_(this,"onGestureHandlerEvent",(e=>{var t,n,r,a;e.nativeEvent.handlerTag===this.handlerTag?"function"===typeof this.props.onGestureEvent&&(null===(t=(n=this.props).onGestureEvent)||void 0===t||t.call(n,e)):null===(r=(a=this.props).onGestureHandlerEvent)||void 0===r||r.call(a,e)})),_(this,"onGestureHandlerStateChange",(e=>{if(e.nativeEvent.handlerTag===this.handlerTag){var t,n;if("function"===typeof this.props.onHandlerStateChange)null===(t=(n=this.props).onHandlerStateChange)||void 0===t||t.call(n,e);const r=e.nativeEvent.state,a=E[r],i=a&&this.props[a];i&&"function"===typeof i&&i(e)}else{var r,a;null===(r=(a=this.props).onGestureHandlerStateChange)||void 0===r||r.call(a,e)}})),_(this,"refHandler",(e=>{var t;this.viewNode=e;const n=r.Children.only(this.props.children),a=(0,f.isReact19)()?null===(t=n.props)||void 0===t?void 0:t.ref:null===n||void 0===n?void 0:n.ref;a&&("function"===typeof a?a(e):a.current=e)})),_(this,"createGestureHandler",(t=>{this.handlerTag=(0,c.getNextHandlerTag)(),this.config=t,s.default.createGestureHandler(e,this.handlerTag,t)})),_(this,"attachGestureHandler",(e=>{this.viewTag=e,s.default.attachGestureHandler(this.handlerTag,e,p.ActionType.JS_FUNCTION_OLD_API,this.propsRef),(0,d.scheduleFlushOperations)(),(0,g.ghQueueMicrotask)((()=>{y.MountRegistry.gestureHandlerWillMount(this)}))})),_(this,"updateGestureHandler",(e=>{this.config=e,s.default.updateGestureHandler(this.handlerTag,e),(0,d.scheduleFlushOperations)()})),this.config={},this.propsRef=r.createRef(),this.isMountedRef=r.createRef(),this.state={allowTouches:x},t.id){if(void 0!==u.handlerIDToTag[t.id])throw new Error(`Handler with ID "${t.id}" already registered`);u.handlerIDToTag[t.id]=this.handlerTag}}componentDidMount(){const e=this.props;if(this.isMountedRef.current=!0,A&&(this.inspectorToggleListener=i.default.addListener("toggleElementInspector",(()=>{this.setState((e=>({allowTouches:x}))),this.update(C)}))),S(e)&&(0,g.ghQueueMicrotask)((()=>{this.update(C)})),this.createGestureHandler((0,d.filterConfig)(a?a(this.props):this.props,[...t,...o],n)),!this.viewNode)throw new Error(`[Gesture Handler] Failed to obtain view for ${l.displayName}. Note that old API doesn't support functional components.`);this.attachGestureHandler((0,h.default)(this.viewNode))}componentDidUpdate(){const e=(0,h.default)(this.viewNode);this.viewTag!==e&&this.attachGestureHandler(e),this.update(C)}componentWillUnmount(){var e;null===(e=this.inspectorToggleListener)||void 0===e||e.remove(),this.isMountedRef.current=!1,s.default.dropGestureHandler(this.handlerTag),(0,d.scheduleFlushOperations)();const t=this.props.id;t&&delete u.handlerIDToTag[t],y.MountRegistry.gestureHandlerWillUnmount(this)}update(e){if(!this.isMountedRef.current)return;if(S(this.props)&&e>0)(0,g.ghQueueMicrotask)((()=>{this.update(e-1)}));else{const e=(0,d.filterConfig)(a?a(this.props):this.props,[...t,...o],n);(0,f.deepEqual)(this.config,e)||this.updateGestureHandler(e)}}setNativeProps(e){const r=Object.assign({},this.props,e),i=(0,d.filterConfig)(a?a(r):r,[...t,...o],n);this.updateGestureHandler(i)}render(){var t;let n=this.onGestureHandlerEvent;const{onGestureEvent:a,onGestureHandlerEvent:i}=this.props;if(a&&"function"!==typeof a){if(i)throw new Error("Nesting touch handlers with native animated driver is not supported yet");n=a}else if(i&&"function"!==typeof i)throw new Error("Nesting touch handlers with native animated driver is not supported yet");let o=this.onGestureHandlerStateChange;const{onHandlerStateChange:s,onGestureHandlerStateChange:l}=this.props;if(s&&"function"!==typeof s){if(l)throw new Error("Nesting touch handlers with native animated driver is not supported yet");o=s}else if(l&&"function"!==typeof l)throw new Error("Nesting touch handlers with native animated driver is not supported yet");const u={onGestureHandlerEvent:this.state.allowTouches?n:void 0,onGestureHandlerStateChange:this.state.allowTouches?o:void 0};this.propsRef.current=u;let c=null;try{c=r.Children.only(this.props.children)}catch(h){throw new Error((0,f.tagMessage)(`${e} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`))}let d=c.props.children;return r.cloneElement(c,Object.assign({ref:this.refHandler,collapsable:!1},(0,f.isTestEnv)()?{handlerType:e,handlerTag:this.handlerTag,enabled:this.props.enabled}:{},{testID:null!==(t=this.props.testID)&&void 0!==t?t:c.props.testID},u),d)}}return _(l,"displayName",e),_(l,"contextType",m.default),l}},70637:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MouseButton:()=>o,baseGestureHandlerProps:()=>a,baseGestureHandlerWithDetectorProps:()=>i});const r=["id","enabled","shouldCancelWhenOutside","hitSlop","cancelsTouchesInView","userSelect","activeCursor","mouseButton","enableContextMenu","touchAction"],a=[...r,"waitFor","simultaneousHandlers","blocksHandlers","onBegan","onFailed","onCancelled","onActivated","onEnded","onGestureEvent","onHandlerStateChange"],i=[...r,"needsPointerData","manualActivation"];let o;!function(e){e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.MIDDLE=4]="MIDDLE",e[e.BUTTON_4=8]="BUTTON_4",e[e.BUTTON_5=16]="BUTTON_5",e[e.ALL=31]="ALL"}(o||(o={}))},49e3:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getNextHandlerTag:()=>a});let r=1;function a(){return r++}},55891:(e,t,n)=>{"use strict";n.r(t),n.d(t,{findHandler:()=>h,findHandlerByTestID:()=>p,findOldGestureHandler:()=>f,handlerIDToTag:()=>a,registerHandler:()=>l,registerOldGestureHandler:()=>u,unregisterHandler:()=>d,unregisterOldGestureHandler:()=>c});var r=n(1082);const a={},i=new Map,o=new Map,s=new Map;function l(e,t,n){i.set(e,t),(0,r.isTestEnv)()&&n&&s.set(n,e)}function u(e,t){o.set(e,t)}function c(e){o.delete(e)}function d(e,t){i.delete(e),(0,r.isTestEnv)()&&t&&s.delete(t)}function h(e){return i.get(e)}function f(e){return o.get(e)}function p(e){const t=s.get(e);var n;return void 0!==t&&null!==(n=h(t))&&void 0!==n?n:null}},55604:(e,t,n)=>{"use strict";n.r(t),n.d(t,{filterConfig:()=>o,findNodeHandle:()=>l,scheduleFlushOperations:()=>c,transformIntoHandlerTags:()=>s});n(97901),n(55891);var r=n(1082),a=n(36963),i=n(72944);function o(e,t,n={}){const r=Object.assign({},n);for(const o of t){let t=e[o];i=o,void 0===(a=t)||a===Object(a)&&"__isNative"in a||"onHandlerStateChange"===i||"onGestureEvent"===i||("simultaneousHandlers"===o||"waitFor"===o?t=s(e[o]):"hitSlop"===o&&"object"!==typeof t&&(t={top:t,left:t,bottom:t,right:t}),r[o]=t)}var a,i;return r}function s(e){return(e=(0,r.toArray)(e)).map((({current:e})=>e)).filter((e=>e))}function l(e){return e}let u=!1;function c(){u||(u=!0,(0,i.ghQueueMicrotask)((()=>{a.default.flushOperations(),u=!1})))}},959:(e,t,n)=>{"use strict";n.r(t),n.d(t,{BaseButton:()=>Et,BorderlessButton:()=>Pt,Directions:()=>_.Directions,DrawerLayout:()=>zn,DrawerLayoutAndroid:()=>sn,FlatList:()=>un,FlingGestureHandler:()=>$,ForceTouchGestureHandler:()=>j,Gesture:()=>ft,GestureDetector:()=>He,GestureHandlerRootView:()=>T,HoverEffect:()=>xe,LongPressGestureHandler:()=>z,MouseButton:()=>P.MouseButton,NativeViewGestureHandler:()=>X,PanGestureHandler:()=>H.PanGestureHandler,PinchGestureHandler:()=>U,PointerType:()=>b.PointerType,Pressable:()=>In,PureNativeButton:()=>yt,RawButton:()=>kt,RectButton:()=>It,RefreshControl:()=>ln,RotationGestureHandler:()=>W,ScrollView:()=>rn,State:()=>a.State,Swipeable:()=>pn.default,Switch:()=>an,TapGestureHandler:()=>M.TapGestureHandler,Text:()=>fn,TextInput:()=>on,TouchableHighlight:()=>Zt,TouchableNativeFeedback:()=>Mt,TouchableOpacity:()=>Gt,TouchableWithoutFeedback:()=>Ut,createNativeWrapper:()=>Z,enableExperimentalWebImplementation:()=>Ce.enableExperimentalWebImplementation,enableLegacyWebImplementation:()=>Ce.enableLegacyWebImplementation,gestureHandlerRootHOC:()=>I});var r=n(40668),a=n(47154);const i={UNDETERMINED:0,TOUCHES_DOWN:1,TOUCHES_MOVE:2,TOUCHES_UP:3,TOUCHES_CANCELLED:4};var o=n(55891),s=n(78293);const l={create:e=>({begin:()=>{s.default.getHandler(e).begin()},activate:()=>{s.default.getHandler(e).activate(!0)},fail:()=>{s.default.getHandler(e).fail()},end:()=>{s.default.getHandler(e).end()}})};let u=null,c=null;const d=new Map,h=[];function f(e){return null!=e.oldState}function p(e){var t,n,r,s,u,c,p,m;const g=(0,o.findHandler)(e.handlerTag);if(g){var y,_;if(f(e))if(e.oldState===a.State.UNDETERMINED&&e.state===a.State.BEGAN)null===(y=(_=g.handlers).onBegin)||void 0===y||y.call(_,e);else if(e.oldState!==a.State.BEGAN&&e.oldState!==a.State.UNDETERMINED||e.state!==a.State.ACTIVE){if(e.oldState!==e.state&&e.state===a.State.END){var b,v,w,F;if(e.oldState===a.State.ACTIVE)null===(w=(F=g.handlers).onEnd)||void 0===w||w.call(F,e,!0);null===(b=(v=g.handlers).onFinalize)||void 0===b||b.call(v,e,!0),h[g.handlers.handlerTag]=void 0}else if((e.state===a.State.FAILED||e.state===a.State.CANCELLED)&&e.oldState!==e.state){var k,x,A,S;if(e.oldState===a.State.ACTIVE)null===(A=(S=g.handlers).onEnd)||void 0===A||A.call(S,e,!1);null===(k=(x=g.handlers).onFinalize)||void 0===k||k.call(x,e,!1),d.delete(e.handlerTag),h[g.handlers.handlerTag]=void 0}}else{var E,C;null===(E=(C=g.handlers).onStart)||void 0===E||E.call(C,e),h[g.handlers.handlerTag]=e}else if(function(e){return null!=e.eventType}(e)){d.has(e.handlerTag)||d.set(e.handlerTag,l.create(e.handlerTag));const a=d.get(e.handlerTag);switch(e.eventType){case i.TOUCHES_DOWN:null===(t=g.handlers)||void 0===t||null===(n=t.onTouchesDown)||void 0===n||n.call(t,e,a);break;case i.TOUCHES_MOVE:null===(r=g.handlers)||void 0===r||null===(s=r.onTouchesMove)||void 0===s||s.call(r,e,a);break;case i.TOUCHES_UP:null===(u=g.handlers)||void 0===u||null===(c=u.onTouchesUp)||void 0===c||c.call(u,e,a);break;case i.TOUCHES_CANCELLED:null===(p=g.handlers)||void 0===p||null===(m=p.onTouchesCancelled)||void 0===m||m.call(p,e,a)}}else{var T,D,I,O,P,M;if(null===(T=(D=g.handlers).onUpdate)||void 0===T||T.call(D,e),g.handlers.onChange&&g.handlers.changeEventCalculator)null===(I=(O=g.handlers).onChange)||void 0===I||I.call(O,null===(P=(M=g.handlers).changeEventCalculator)||void 0===P?void 0:P.call(M,e,h[g.handlers.handlerTag])),h[g.handlers.handlerTag]=e}}else{const t=(0,o.findOldGestureHandler)(e.handlerTag);if(t){const n={nativeEvent:e};return void(f(e)?t.onGestureStateChange(n):t.onGestureEvent(n))}}}function m(){!function(){u&&(u.remove(),u=null);c&&(c.remove(),c=null)}(),u=r.default.addListener("onGestureHandlerEvent",p),c=r.default.addListener("onGestureHandlerStateChange",p)}var g=n(36963),y=n(1082);var _=n(8861),b=n(40094),v=n(36665),w=n(75675),F=n(3953),k=n.n(F),x=n(98587),A=n(73929),S=n(81156);const E=["style"];function C(){return C=Object.assign||function(e){for(var t=1;t{const{gestureHandlerProps:a,childProps:i}=Object.keys(n).reduce(((e,t)=>(J.includes(t)?e.gestureHandlerProps[t]=n[t]:e.childProps[t]=n[t],e)),{gestureHandlerProps:Object.assign({},t),childProps:{enabled:n.enabled,hitSlop:n.hitSlop,testID:n.testID}}),o=(0,v.useRef)(null),s=(0,v.useRef)(null);return(0,v.useImperativeHandle)(r,(()=>{const e=s.current;return o.current&&e?(o.current.handlerTag=e.handlerTag,o.current):null}),[o,s]),v.createElement(X,K({},a,{ref:s}),v.createElement(e,K({},i,{ref:o})))}));return r.displayName=(null===e||void 0===e?void 0:e.displayName)||(null===e||void 0===e||null===(n=e.render)||void 0===n?void 0:n.name)||"string"===typeof e&&e||"ComponentWrapper",r}var Q=n(60154),ee=n(49e3);function te(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ne={UNDEFINED:0,BEGAN:1,START:2,UPDATE:3,CHANGE:4,END:5,FINALIZE:6,TOUCHES_DOWN:7,TOUCHES_MOVE:8,TOUCHES_UP:9,TOUCHES_CANCELLED:10};class re{}let ae=0;class ie extends re{constructor(){super(),te(this,"gestureId",-1),te(this,"handlerTag",-1),te(this,"handlerName",""),te(this,"config",{}),te(this,"handlers",{gestureId:-1,handlerTag:-1,isWorklet:[]}),this.gestureId=ae++,this.handlers.gestureId=this.gestureId}addDependency(e,t){const n=this.config[e];this.config[e]=n?Array().concat(n,t):[t]}withRef(e){return this.config.ref=e,this}isWorklet(e){return void 0!==e.__workletHash}onBegin(e){return this.handlers.onBegin=e,this.handlers.isWorklet[ne.BEGAN]=this.isWorklet(e),this}onStart(e){return this.handlers.onStart=e,this.handlers.isWorklet[ne.START]=this.isWorklet(e),this}onEnd(e){return this.handlers.onEnd=e,this.handlers.isWorklet[ne.END]=this.isWorklet(e),this}onFinalize(e){return this.handlers.onFinalize=e,this.handlers.isWorklet[ne.FINALIZE]=this.isWorklet(e),this}onTouchesDown(e){return this.config.needsPointerData=!0,this.handlers.onTouchesDown=e,this.handlers.isWorklet[ne.TOUCHES_DOWN]=this.isWorklet(e),this}onTouchesMove(e){return this.config.needsPointerData=!0,this.handlers.onTouchesMove=e,this.handlers.isWorklet[ne.TOUCHES_MOVE]=this.isWorklet(e),this}onTouchesUp(e){return this.config.needsPointerData=!0,this.handlers.onTouchesUp=e,this.handlers.isWorklet[ne.TOUCHES_UP]=this.isWorklet(e),this}onTouchesCancelled(e){return this.config.needsPointerData=!0,this.handlers.onTouchesCancelled=e,this.handlers.isWorklet[ne.TOUCHES_CANCELLED]=this.isWorklet(e),this}enabled(e){return this.config.enabled=e,this}shouldCancelWhenOutside(e){return this.config.shouldCancelWhenOutside=e,this}hitSlop(e){return this.config.hitSlop=e,this}activeCursor(e){return this.config.activeCursor=e,this}mouseButton(e){return this.config.mouseButton=e,this}runOnJS(e){return this.config.runOnJS=e,this}simultaneousWithExternalGesture(...e){for(const t of e)this.addDependency("simultaneousWith",t);return this}requireExternalGestureToFail(...e){for(const t of e)this.addDependency("requireToFail",t);return this}blocksExternalGesture(...e){for(const t of e)this.addDependency("blocksHandlers",t);return this}withTestId(e){return this.config.testId=e,this}cancelsTouchesInView(e){return this.config.cancelsTouchesInView=e,this}initialize(){this.handlerTag=(0,ee.getNextHandlerTag)(),this.handlers=Object.assign({},this.handlers,{handlerTag:this.handlerTag}),this.config.ref&&(this.config.ref.current=this)}toGestureArray(){return[this]}prepare(){}get shouldUseReanimated(){return!0!==this.config.runOnJS&&!this.handlers.isWorklet.includes(!1)&&!(0,y.isRemoteDebuggingEnabled)()}}class oe extends ie{onUpdate(e){return this.handlers.onUpdate=e,this.handlers.isWorklet[ne.UPDATE]=this.isWorklet(e),this}onChange(e){return this.handlers.onChange=e,this.handlers.isWorklet[ne.CHANGE]=this.isWorklet(e),this}manualActivation(e){return this.config.manualActivation=e,this}}var se;let le;try{le=n(94763)}catch(Un){le=void 0}null!==(se=le)&&void 0!==se&&se.useSharedValue||(le=void 0);const ue={code:"function reactNativeGestureHandler_reanimatedWrapperJs1(){const{tagMessage}=this.__closure;console.warn(tagMessage('Please use newer version of react-native-reanimated in order to control state of the gestures.'));}"};void 0===le||le.setGestureState||(le.setGestureState=function(){const e=function(){console.warn((0,y.tagMessage)("Please use newer version of react-native-reanimated in order to control state of the gestures."))};return e.__closure={tagMessage:y.tagMessage},e.__workletHash=7298969188432,e.__initData=ue,e}());const ce={code:"function getHandler_reactNativeGestureHandler_useAnimatedGestureJs1(type,gesture){const{CALLBACK_TYPE}=this.__closure;switch(type){case CALLBACK_TYPE.BEGAN:return gesture.onBegin;case CALLBACK_TYPE.START:return gesture.onStart;case CALLBACK_TYPE.UPDATE:return gesture.onUpdate;case CALLBACK_TYPE.CHANGE:return gesture.onChange;case CALLBACK_TYPE.END:return gesture.onEnd;case CALLBACK_TYPE.FINALIZE:return gesture.onFinalize;case CALLBACK_TYPE.TOUCHES_DOWN:return gesture.onTouchesDown;case CALLBACK_TYPE.TOUCHES_MOVE:return gesture.onTouchesMove;case CALLBACK_TYPE.TOUCHES_UP:return gesture.onTouchesUp;case CALLBACK_TYPE.TOUCHES_CANCELLED:return gesture.onTouchesCancelled;}}"},de=function(){const e=function(e,t){switch(e){case ne.BEGAN:return t.onBegin;case ne.START:return t.onStart;case ne.UPDATE:return t.onUpdate;case ne.CHANGE:return t.onChange;case ne.END:return t.onEnd;case ne.FINALIZE:return t.onFinalize;case ne.TOUCHES_DOWN:return t.onTouchesDown;case ne.TOUCHES_MOVE:return t.onTouchesMove;case ne.TOUCHES_UP:return t.onTouchesUp;case ne.TOUCHES_CANCELLED:return t.onTouchesCancelled}};return e.__closure={CALLBACK_TYPE:ne},e.__workletHash=4317557963300,e.__initData=ce,e}(),he={code:"function touchEventTypeToCallbackType_reactNativeGestureHandler_useAnimatedGestureJs2(eventType){const{TouchEventType,CALLBACK_TYPE}=this.__closure;switch(eventType){case TouchEventType.TOUCHES_DOWN:return CALLBACK_TYPE.TOUCHES_DOWN;case TouchEventType.TOUCHES_MOVE:return CALLBACK_TYPE.TOUCHES_MOVE;case TouchEventType.TOUCHES_UP:return CALLBACK_TYPE.TOUCHES_UP;case TouchEventType.TOUCHES_CANCELLED:return CALLBACK_TYPE.TOUCHES_CANCELLED;}return CALLBACK_TYPE.UNDEFINED;}"},fe=function(){const e=function(e){switch(e){case i.TOUCHES_DOWN:return ne.TOUCHES_DOWN;case i.TOUCHES_MOVE:return ne.TOUCHES_MOVE;case i.TOUCHES_UP:return ne.TOUCHES_UP;case i.TOUCHES_CANCELLED:return ne.TOUCHES_CANCELLED}return ne.UNDEFINED};return e.__closure={TouchEventType:i,CALLBACK_TYPE:ne},e.__workletHash=2039840524711,e.__initData=he,e}(),pe={code:"function runWorklet_reactNativeGestureHandler_useAnimatedGestureJs3(type,gesture,event,...args){const{getHandler,tagMessage}=this.__closure;const handler=getHandler(type,gesture);if(gesture.isWorklet[type]){handler===null||handler===void 0?void 0:handler(event,...args);}else if(handler){console.warn(tagMessage('Animated gesture callback must be a worklet'));}}"},me=function(){const e=function(e,t,n,...r){const a=de(e,t);t.isWorklet[e]?null===a||void 0===a||a(n,...r):a&&console.warn((0,y.tagMessage)("Animated gesture callback must be a worklet"))};return e.__closure={getHandler:de,tagMessage:y.tagMessage},e.__workletHash=0xfd590d2cb89,e.__initData=pe,e}(),ge={code:"function isStateChangeEvent_reactNativeGestureHandler_useAnimatedGestureJs4(event){return event.oldState!=null;}"},ye=function(){const e=function(e){return null!=e.oldState};return e.__closure={},e.__workletHash=7889847699524,e.__initData=ge,e}(),_e={code:"function isTouchEvent_reactNativeGestureHandler_useAnimatedGestureJs5(event){return event.eventType!=null;}"},be=function(){const e=function(e){return null!=e.eventType};return e.__closure={},e.__workletHash=0xbe72c4143d5,e.__initData=_e,e}(),ve={code:"function reactNativeGestureHandler_useAnimatedGestureJs6(event){const{sharedHandlersCallbacks,isStateChangeEvent,State,runWorklet,CALLBACK_TYPE,lastUpdateEvent,isTouchEvent,stateControllers,GestureStateManager,TouchEventType,touchEventTypeToCallbackType}=this.__closure;const currentCallback=sharedHandlersCallbacks.value;if(!currentCallback){return;}for(let i=0;ie>0)))&&void 0!==t?t:[]}function Oe(e){return{waitFor:Ie(e.config.requireToFail),simultaneousHandlers:Ie(e.config.simultaneousWith),blocksHandlers:Ie(e.config.blocksHandlers)}}var Pe=n(3453);function Me({preparedGesture:e,gestureConfig:t,gesturesToAttach:n,viewTag:r,webEventHandlersRef:a}){t.initialize(),(0,ke.ghQueueMicrotask)((()=>{e.isMounted&&t.prepare()}));for(const i of n)g.default.createGestureHandler(i.handlerName,i.handlerTag,(0,we.filterConfig)(i.config,Te)),(0,o.registerHandler)(i.handlerTag,i,i.config.testId);(0,ke.ghQueueMicrotask)((()=>{if(e.isMounted){for(const e of n)g.default.updateGestureHandler(e.handlerTag,(0,we.filterConfig)(e.config,Te,Oe(e)));(0,we.scheduleFlushOperations)()}}));for(const i of n){i.shouldUseReanimated?Fe.ActionType.REANIMATED_WORKLET:Fe.ActionType.JS_FUNCTION_NEW_API;g.default.attachGestureHandler(i.handlerTag,r,Fe.ActionType.JS_FUNCTION_OLD_API,a),Pe.MountRegistry.gestureWillMount(i)}if(e.attachedGestures=n,e.animatedHandlers){const t=e=>e.shouldUseReanimated;e.animatedHandlers.value=n.filter(t).map((e=>e.handlers))}}function Re(e,t){if(t.length!==e.attachedGestures.length)return!0;for(let n=0;n{try{const n=v.Children.only(e);if((0,Ne.isRNSVGNode)(n)){return v.cloneElement(n,{ref:t},n.props.children)}return v.createElement("div",{ref:t,style:{display:"contents"}},n)}catch(Un){throw new Error((0,y.tagMessage)("GestureDetector got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view."))}})),je=Be;function Ve(e,t,n,r,a){const i=function(){const[e,t]=(0,v.useState)(!1);return(0,v.useCallback)((()=>{t(!e)}),[e,t])}(),s=(0,v.useCallback)((s=>{const l=(0,Q.default)(e.viewRef),u=l!==e.previousViewTag;u||Re(t,n)?(e.viewRef,Le(t),Me({preparedGesture:t,gestureConfig:r,gesturesToAttach:n,webEventHandlersRef:a,viewTag:l}),u&&(e.previousViewTag=l,e.forceRebuildReanimatedEvent=!0,i())):s||function(e,t,n){t.prepare();for(let a=0;a{if(!e.isMounted)return;if(r!==e.attachedGestures)return;let t=r.length!==n.length;for(let e=0;ee.shouldUseReanimated)).map((e=>e.handlers));e.animatedHandlers.value=t}(0,we.scheduleFlushOperations)()}))}(t,r,n)}),[i,r,n,t,e,a]);return s}function ze(e,t){if(void 0===e)return!1;for(const n of(0,we.transformIntoHandlerTags)(e))if(n===t.handlerTag)return!0;return!1}const He=e=>{(0,v.useContext)(S.default);const t=e.gesture;!function(e,t){const n=["userSelect","enableContextMenu","touchAction"];for(const r of n){const n=e[r];if(void 0!==n)for(const e of t.toGestureArray())e.config[r]=n}}(e,t);const n=(0,v.useMemo)((()=>t.toGestureArray()),[t]),r=n.some((e=>e.shouldUseReanimated)),o=(0,v.useRef)({onGestureHandlerEvent:e=>{p(e.nativeEvent)},onGestureHandlerStateChange:(0,Ce.isNewWebImplementationEnabled)()?e=>{p(e.nativeEvent)}:void 0}),s=(0,v.useRef)({firstRender:!0,viewRef:null,previousViewTag:-1,forceRebuildReanimatedEvent:!1}).current,u=v.useRef({attachedGestures:[],animatedEventHandler:null,animatedHandlers:null,shouldUseReanimated:r,isMounted:!1}).current,c=Ve(s,u,n,t,o),d=function(e,t){return(0,v.useCallback)((n=>{null!==n&&(e.viewRef=n,-1===e.previousViewTag&&(e.previousViewTag=(0,Q.default)(e.viewRef)),e.firstRender||t(!0))}),[e,t])}(s,c),h=s.firstRender||s.forceRebuildReanimatedEvent||Re(u,n);return s.forceRebuildReanimatedEvent=!1,function(e,t){if(!le)return;const n=le.useSharedValue(null),r=le.useSharedValue([]),o=[],s=function(){const e=function(e){const t=n.value;if(t)for(let n=0;n{const e=(0,Q.default)(s.viewRef);return u.isMounted=!0,Me({preparedGesture:u,gestureConfig:t,gesturesToAttach:n,webEventHandlersRef:o,viewTag:e}),()=>{u.isMounted=!1,Le(u)}}),[]),(0,v.useEffect)((()=>{s.firstRender?s.firstRender=!1:c()}),[e]),function(e,t){(0,v.useEffect)((()=>Pe.MountRegistry.addMountListener((n=>{for(const r of t.attachedGestures){const t=r.config.blocksHandlers,a=r.config.requireToFail,i=r.config.simultaneousWith;if(ze(t,n)||ze(a,n)||ze(i,n))return void e()}}))),[e,t])}(c,u),r?v.createElement(je,{ref:d,onGestureHandlerEvent:u.animatedEventHandler},e.children):v.createElement(Be,{ref:d},e.children)};class Ue extends ie{constructor(){super(),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"config",{}),this.handlerName="FlingGestureHandler"}numberOfPointers(e){return this.config.numberOfPointers=e,this}direction(e){return this.config.direction=e,this}}const We={code:"function changeEventCalculator_reactNativeGestureHandler_forceTouchGestureJs1(current,previous){let changePayload;if(previous===undefined){changePayload={forceChange:current.force};}else{changePayload={forceChange:current.force-previous.force};}return{...current,...changePayload};}"},qe=function(){const e=function(e,t){let n;return n=void 0===t?{forceChange:e.force}:{forceChange:e.force-t.force},Object.assign({},e,n)};return e.__closure={},e.__workletHash=6555184671956,e.__initData=We,e}();class $e extends oe{constructor(){super(),function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"config",{}),this.handlerName="ForceTouchGestureHandler"}minForce(e){return this.config.minForce=e,this}maxForce(e){return this.config.maxForce=e,this}feedbackOnActivation(e){return this.config.feedbackOnActivation=e,this}onChange(e){return this.handlers.changeEventCalculator=qe,super.onChange(e)}}function Ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e,t){return void 0===e?[...t]:[...e,...t]}class Xe extends re{constructor(...e){super(),Ye(this,"gestures",[]),Ye(this,"simultaneousGestures",[]),Ye(this,"requireGesturesToFail",[]),this.gestures=e}prepareSingleGesture(e,t,n){if(e instanceof ie){const r=Object.assign({},e.config);r.simultaneousWith=Ge(r.simultaneousWith,t),r.requireToFail=Ge(r.requireToFail,n),e.config=r}else e instanceof Xe&&(e.simultaneousGestures=t,e.requireGesturesToFail=n,e.prepare())}prepare(){for(const e of this.gestures)this.prepareSingleGesture(e,this.simultaneousGestures,this.requireGesturesToFail)}initialize(){for(const e of this.gestures)e.initialize()}toGestureArray(){return this.gestures.flatMap((e=>e.toGestureArray()))}}class Ke extends Xe{prepare(){const e=this.gestures.map((e=>this.gestures.filter((t=>t!==e)).flatMap((e=>e.toGestureArray()))));for(let t=0;te.toGestureArray()));let t=[];for(let n=0;nnew lt,Pan:()=>new tt,Pinch:()=>new at,Rotation:()=>new st,Fling:()=>new Ue,LongPress:()=>new Ze,ForceTouch:()=>new $e,Native:()=>new ut,Manual:()=>new ht,Hover:()=>new Ee,Race:(...e)=>new Xe(...e),Simultaneous:(...e)=>new Ke(...e),Exclusive:(...e)=>new Je(...e)};var pt=n(15009),mt=n(69e3);function gt(){return gt=Object.assign||function(e){for(var t=1;tv.createElement(A.default,gt({ref:t,accessibilityRole:"button"},e)))),_t=["rippleColor","style"],bt=["children","style"],vt=["children","style","innerRef"];function wt(){return wt=Object.assign||function(e){for(var t=1;t{const{state:t,oldState:n,pointerInside:r}=e,i=r&&t===a.State.ACTIVE;i!==this.lastActive&&this.props.onActiveStateChange&&this.props.onActiveStateChange(i),!this.longPressDetected&&n===a.State.ACTIVE&&t!==a.State.CANCELLED&&this.lastActive&&this.props.onPress&&this.props.onPress(r),!this.lastActive&&t===a.State.ACTIVE&&r?(this.longPressDetected=!1,this.props.onLongPress&&(this.longPressTimeout=setTimeout(this.onLongPress,this.props.delayLongPress))):(t!==a.State.ACTIVE||r||void 0===this.longPressTimeout)&&(void 0===this.longPressTimeout||t!==a.State.END&&t!==a.State.CANCELLED&&t!==a.State.FAILED)||(clearTimeout(this.longPressTimeout),this.longPressTimeout=void 0),this.lastActive=i})),Ft(this,"onLongPress",(()=>{var e,t;this.longPressDetected=!0,null===(e=(t=this.props).onLongPress)||void 0===e||e.call(t)})),Ft(this,"onHandlerStateChange",(e=>{var t,n;null===(t=(n=this.props).onHandlerStateChange)||void 0===t||t.call(n,e),this.handleEvent(e)})),Ft(this,"onGestureEvent",(e=>{var t,n;null===(t=(n=this.props).onGestureEvent)||void 0===t||t.call(n,e),this.handleEvent(e)})),this.lastActive=!1,this.longPressDetected=!1}render(){const e=this.props,{rippleColor:t,style:n}=e,r=(0,x.default)(e,_t);null===xt&&(xt=(0,y.isFabric)());const a=xt?t:(0,mt.default)(null!==t&&void 0!==t?t:void 0);return v.createElement(kt,wt({ref:this.props.innerRef,rippleColor:a,style:[n,!1]},r,{onGestureEvent:this.onGestureEvent,onHandlerStateChange:this.onHandlerStateChange}))}}Ft(At,"defaultProps",{delayLongPress:600});const St=pt.default.createAnimatedComponent(At),Et=v.forwardRef(((e,t)=>v.createElement(At,wt({innerRef:t},e)))),Ct=v.forwardRef(((e,t)=>v.createElement(St,wt({innerRef:t},e)))),Tt=w.default.create({underlay:{position:"absolute",left:0,right:0,bottom:0,top:0}});class Dt extends v.Component{constructor(e){super(e),Ft(this,"opacity",void 0),Ft(this,"onActiveStateChange",(e=>{var t,n;this.opacity.setValue(e?this.props.activeOpacity:0),null===(t=(n=this.props).onActiveStateChange)||void 0===t||t.call(n,e)})),this.opacity=new pt.default.Value(0)}render(){const e=this.props,{children:t,style:n}=e,r=(0,x.default)(e,bt),a=w.default.flatten(null!==n&&void 0!==n?n:{});return v.createElement(Et,wt({},r,{ref:this.props.innerRef,style:a,onActiveStateChange:this.onActiveStateChange}),v.createElement(pt.default.View,{style:[Tt.underlay,{opacity:this.opacity,backgroundColor:this.props.underlayColor,borderRadius:a.borderRadius,borderTopLeftRadius:a.borderTopLeftRadius,borderTopRightRadius:a.borderTopRightRadius,borderBottomLeftRadius:a.borderBottomLeftRadius,borderBottomRightRadius:a.borderBottomRightRadius}]}),t)}}Ft(Dt,"defaultProps",{activeOpacity:.105,underlayColor:"black"});const It=v.forwardRef(((e,t)=>v.createElement(Dt,wt({innerRef:t},e))));class Ot extends v.Component{constructor(e){super(e),Ft(this,"opacity",void 0),Ft(this,"onActiveStateChange",(e=>{var t,n;this.opacity.setValue(e?this.props.activeOpacity:1),null===(t=(n=this.props).onActiveStateChange)||void 0===t||t.call(n,e)})),this.opacity=new pt.default.Value(1)}render(){const e=this.props,{children:t,style:n,innerRef:r}=e,a=(0,x.default)(e,vt);return v.createElement(Ct,wt({},a,{innerRef:r,onActiveStateChange:this.onActiveStateChange,style:[n,!1]}),t)}}Ft(Ot,"defaultProps",{activeOpacity:.3,borderless:!0});const Pt=v.forwardRef(((e,t)=>v.createElement(Ot,wt({innerRef:t},e))));const Mt=n(50259).default;function Rt(){return Rt=Object.assign||function(e){for(var t=1;t{this.pointerInside!==e&&(e?this.onMoveIn():this.onMoveOut()),this.pointerInside=e})),Lt(this,"onHandlerStateChange",(({nativeEvent:e})=>{const{state:t}=e;if(t===a.State.CANCELLED||t===a.State.FAILED)this.moveToState(Nt);else if(t===a.State.ACTIVE&&this.STATE===Nt)this.handlePressIn();else if(t===a.State.END){const e=!this.longPressDetected&&this.STATE!==jt&&null===this.pressOutTimeout;var n,r;if(this.handleGoToUndetermined(),e)null===(n=(r=this.props).onPress)||void 0===n||n.call(r)}})),Lt(this,"onLongPressDetected",(()=>{var e,t;this.longPressDetected=!0,null===(e=(t=this.props).onLongPress)||void 0===e||e.call(t)}))}handlePressIn(){if(this.props.delayPressIn?this.pressInTimeout=setTimeout((()=>{this.moveToState(Bt),this.pressInTimeout=null}),this.props.delayPressIn):this.moveToState(Bt),this.props.onLongPress){const e=(this.props.delayPressIn||0)+(this.props.delayLongPress||0);this.longPressTimeout=setTimeout(this.onLongPressDetected,e)}}handleMoveOutside(){this.props.delayPressOut?this.pressOutTimeout=this.pressOutTimeout||setTimeout((()=>{this.moveToState(jt),this.pressOutTimeout=null}),this.props.delayPressOut):this.moveToState(jt)}handleGoToUndetermined(){clearTimeout(this.pressOutTimeout),this.props.delayPressOut?this.pressOutTimeout=setTimeout((()=>{this.STATE===Nt&&this.moveToState(Bt),this.moveToState(Nt),this.pressOutTimeout=null}),this.props.delayPressOut):(this.STATE===Nt&&this.moveToState(Bt),this.moveToState(Nt))}componentDidMount(){this.reset()}reset(){this.longPressDetected=!1,this.pointerInside=!0,clearTimeout(this.pressInTimeout),clearTimeout(this.pressOutTimeout),clearTimeout(this.longPressTimeout),this.pressOutTimeout=null,this.longPressTimeout=null,this.pressInTimeout=null}moveToState(e){var t,n;if(e!==this.STATE){var r,a;if(e===Bt)null===(r=(a=this.props).onPressIn)||void 0===r||r.call(a);else if(e===jt){var i,o;null===(i=(o=this.props).onPressOut)||void 0===i||i.call(o)}else if(e===Nt){var s,l;if(this.reset(),this.STATE===Bt)null===(s=(l=this.props).onPressOut)||void 0===s||s.call(l)}null===(t=(n=this.props).onStateChange)||void 0===t||t.call(n,this.STATE,e),this.STATE=e}}componentWillUnmount(){this.reset()}onMoveIn(){this.STATE===jt&&this.moveToState(Bt)}onMoveOut(){clearTimeout(this.longPressTimeout),this.longPressTimeout=null,this.STATE===Bt&&this.handleMoveOutside()}render(){var e,t;const n=null!==(e="number"===typeof this.props.hitSlop?{top:this.props.hitSlop,left:this.props.hitSlop,bottom:this.props.hitSlop,right:this.props.hitSlop}:this.props.hitSlop)&&void 0!==e?e:void 0,r={accessible:!1!==this.props.accessible,accessibilityLabel:this.props.accessibilityLabel,accessibilityHint:this.props.accessibilityHint,accessibilityRole:this.props.accessibilityRole,accessibilityState:this.props.accessibilityState,accessibilityActions:this.props.accessibilityActions,onAccessibilityAction:this.props.onAccessibilityAction,nativeID:this.props.nativeID,onLayout:this.props.onLayout};return v.createElement(Et,Rt({style:this.props.containerStyle,onHandlerStateChange:this.props.disabled?void 0:this.onHandlerStateChange,onGestureEvent:this.onGestureEvent,hitSlop:n,userSelect:this.props.userSelect,shouldActivateOnStart:this.props.shouldActivateOnStart,disallowInterruption:this.props.disallowInterruption,testID:this.props.testID,touchSoundDisabled:null!==(t=this.props.touchSoundDisabled)&&void 0!==t&&t,enabled:!this.props.disabled},this.props.extraButtonProps),v.createElement(pt.default.View,Rt({},r,{style:this.props.style}),this.props.children))}}Lt(Vt,"defaultProps",{delayLongPress:600,extraButtonProps:{rippleColor:"transparent",exclusive:!0}});const zt=["delayLongPress","extraButtonProps"];function Ht(){return Ht=Object.assign||function(e){for(var t=1;t{let{delayLongPress:n=600,extraButtonProps:r={rippleColor:"transparent",exclusive:!0}}=e,a=(0,x.default)(e,zt);return v.createElement(Vt,Ht({ref:t,delayLongPress:n,extraButtonProps:r},a))}));var Wt=n(95620);const qt=["style"];function $t(){return $t=Object.assign||function(e){for(var t=1;t{const e=w.default.flatten(this.props.style)||{};return null==e.opacity?1:e.opacity.valueOf()})),Yt(this,"opacity",new pt.default.Value(this.getChildStyleOpacityWithDefault())),Yt(this,"setOpacityTo",((e,t)=>{var n;pt.default.timing(this.opacity,{toValue:e,duration:t,easing:Wt.default.inOut(Wt.default.quad),useNativeDriver:null===(n=this.props.useNativeAnimations)||void 0===n||n}).start()})),Yt(this,"onStateChange",((e,t)=>{t===Bt?this.setOpacityTo(this.props.activeOpacity,0):t!==Nt&&t!==jt||this.setOpacityTo(this.getChildStyleOpacityWithDefault(),150)}))}render(){const e=this.props,{style:t={}}=e,n=(0,x.default)(e,qt);return v.createElement(Vt,$t({},n,{style:[t,{opacity:this.opacity}],onStateChange:this.onStateChange}),this.props.children?this.props.children:v.createElement(A.default,null))}}Yt(Gt,"defaultProps",Object.assign({},Vt.defaultProps,{activeOpacity:.2}));const Xt=["style"];function Kt(){return Kt=Object.assign||function(e){for(var t=1;t{var e,t;this.hasPressHandler()&&(this.setState({extraChildStyle:{opacity:this.props.activeOpacity},extraUnderlayStyle:{backgroundColor:this.props.underlayColor}}),null===(e=(t=this.props).onShowUnderlay)||void 0===e||e.call(t))})),Jt(this,"hasPressHandler",(()=>this.props.onPress||this.props.onPressIn||this.props.onPressOut||this.props.onLongPress)),Jt(this,"hideUnderlay",(()=>{var e,t;this.setState({extraChildStyle:null,extraUnderlayStyle:null}),null===(e=(t=this.props).onHideUnderlay)||void 0===e||e.call(t)})),Jt(this,"onStateChange",((e,t)=>{t===Bt?this.showUnderlay():t!==Nt&&t!==jt||this.hideUnderlay()})),this.state={extraChildStyle:null,extraUnderlayStyle:null}}renderChildren(){if(!this.props.children)return v.createElement(A.default,null);const e=v.Children.only(this.props.children);return v.cloneElement(e,{style:w.default.compose(e.props.style,this.state.extraChildStyle)})}render(){const e=this.props,{style:t={}}=e,n=(0,x.default)(e,Xt),{extraUnderlayStyle:r}=this.state;return v.createElement(Vt,Kt({},n,{style:[t,r],onStateChange:this.onStateChange}),this.renderChildren())}}Jt(Zt,"defaultProps",Object.assign({},Vt.defaultProps,{activeOpacity:.85,delayPressOut:100,underlayColor:"black"}));var Qt=n(90932),en=n(74037),tn=n(16773);function nn(){return nn=Object.assign||function(e){for(var t=1;t(console.warn("DrawerLayoutAndroid is not supported on web!"),v.createElement(A.default,null)),ln=Z(A.default),un=v.forwardRef(((e,t)=>v.createElement(Qt.default,nn({ref:t},e,{renderScrollComponent:e=>v.createElement(rn,e)}))));var cn=n(6283);const dn=["onPress","onLongPress"];function hn(){return hn=Object.assign||function(e){for(var t=1;t{const{onPress:n,onLongPress:r}=e,a=(0,x.default)(e,dn),i=(0,v.useRef)(null),o=ft.Native().runOnJS(!0),s=e=>{i.current=e,null!==t&&("function"===typeof t?t(e):t.current=e)};return s.rngh=!0,(0,v.useEffect)((()=>{const e=t?t.current:i.current;null===e||void 0===e||e.setAttribute("rnghtext","true")}),[]),n||r?v.createElement(He,{gesture:o},v.createElement(cn.default,hn({onPress:n,onLongPress:r,ref:s},a))):v.createElement(cn.default,hn({ref:t},a))}));var pn=n(74826),mn=n(95991);const gn=e=>({left:e,right:e,top:e,bottom:e}),yn=(e,t,n)=>({identifier:e.id,locationX:e.x,locationY:e.y,pageX:e.absoluteX,pageY:e.absoluteY,target:n,timestamp:t,touches:[],changedTouches:[]}),_n=e=>{const t=Date.now(),n=((e,t,n)=>({identifier:e.handlerTag,locationX:e.x,locationY:e.y,pageX:e.absoluteX,pageY:e.absoluteY,target:n,timestamp:t,touches:[],changedTouches:[]}))(e,t,0);return{nativeEvent:{touches:[n],changedTouches:[n],identifier:n.identifier,locationX:e.x,locationY:e.y,pageX:e.absoluteX,pageY:e.absoluteY,target:0,timestamp:t,force:void 0}}},bn=e=>{var t,n,r,a,i,o,s,l;const u=Date.now();return{nativeEvent:{touches:e.allTouches.map((e=>yn(e,u,0))),changedTouches:e.changedTouches.map((e=>yn(e,u,0))),identifier:e.handlerTag,locationX:null!==(t=null===(n=e.allTouches.at(0))||void 0===n?void 0:n.x)&&void 0!==t?t:-1,locationY:null!==(r=null===(a=e.allTouches.at(0))||void 0===a?void 0:a.y)&&void 0!==r?r:-1,pageX:null!==(i=null===(o=e.allTouches.at(0))||void 0===o?void 0:o.absoluteX)&&void 0!==i?i:-1,pageY:null!==(s=null===(l=e.allTouches.at(0))||void 0===l?void 0:l.absoluteY)&&void 0!==s?s:-1,target:0,timestamp:u,force:void 0}}},vn=["testOnly_pressed","hitSlop","pressRetentionOffset","delayHoverIn","onHoverIn","delayHoverOut","onHoverOut","delayLongPress","unstable_pressDelay","onPress","onPressIn","onPressOut","onLongPress","style","children","android_disableSound","android_ripple","disabled","accessible"];function wn(){return wn=Object.assign||function(e){for(var t=1;tevent.changedTouches.length){return;}pressOutHandler(gestureTouchToPressableEvent(event));}"},Tn={code:"function reactNativeGestureHandler_PressableJs6(){const{Platform,isTouchPropagationAllowed}=this.__closure;if(Platform.OS==='android'||Platform.OS==='macos'){isTouchPropagationAllowed.current=true;}}"},Dn={code:"function reactNativeGestureHandler_PressableJs7(){const{Platform,isTouchPropagationAllowed,deferredEventPayload,hasPassedBoundsChecks,pressInHandler,pressOutHandler,shouldPreventNativeEffects,handlingOnTouchesDown}=this.__closure;if(Platform.OS==='web'){isTouchPropagationAllowed.current=true;}if(Platform.OS!=='ios'){return;}if(deferredEventPayload.current){isTouchPropagationAllowed.current=true;if(hasPassedBoundsChecks.current){pressInHandler(deferredEventPayload.current);deferredEventPayload.current=null;}else{pressOutHandler(deferredEventPayload.current);isTouchPropagationAllowed.current=false;}return;}if(hasPassedBoundsChecks.current){isTouchPropagationAllowed.current=true;return;}if(shouldPreventNativeEffects.current){shouldPreventNativeEffects.current=false;if(!handlingOnTouchesDown.current){return;}}isTouchPropagationAllowed.current=true;}"},In=(0,v.forwardRef)(((e,t)=>{var n;const{testOnly_pressed:r,hitSlop:a,pressRetentionOffset:i,delayHoverIn:o,onHoverIn:s,delayHoverOut:l,onHoverOut:u,delayLongPress:c,unstable_pressDelay:d,onPress:h,onPressIn:f,onPressOut:p,onLongPress:m,style:g,children:_,android_disableSound:b,android_ripple:w,disabled:F,accessible:k}=e,A=(0,x.default)(e,vn),[S,E]=(0,v.useState)(null!==r&&void 0!==r&&r),C=(0,v.useRef)(!0),T=(0,v.useRef)(!1),D=(0,v.useRef)(!1),I=(0,v.useMemo)((()=>"number"===typeof a?gn(a):null!==a&&void 0!==a?a:{}),[a]),O=(0,v.useMemo)((()=>"number"===typeof i?gn(i):null!==i&&void 0!==i?i:{}),[i]),P=(0,v.useRef)(null),M=(0,v.useRef)(null),R=(0,v.useMemo)((()=>ft.Hover().manualActivation(!0).cancelsTouchesInView(!1).onBegin(function(){const e=function(e){M.current&&clearTimeout(M.current),o?P.current=setTimeout((()=>null===s||void 0===s?void 0:s(_n(e))),o):null===s||void 0===s||s(_n(e))};return e.__closure={hoverOutTimeout:M,clearTimeout:clearTimeout,delayHoverIn:o,hoverInTimeout:P,setTimeout:setTimeout,onHoverIn:s,gestureToPressableEvent:_n},e.__workletHash=0xbd4d2d6e1a5,e.__initData=xn,e}()).onFinalize(function(){const e=function(e){P.current&&clearTimeout(P.current),l?M.current=setTimeout((()=>null===u||void 0===u?void 0:u(_n(e))),l):null===u||void 0===u||u(_n(e))};return e.__closure={hoverInTimeout:P,clearTimeout:clearTimeout,delayHoverOut:l,hoverOutTimeout:M,setTimeout:setTimeout,onHoverOut:u,gestureToPressableEvent:_n},e.__workletHash=4962952881647,e.__initData=An,e}())),[o,l,s,u]),L=(0,v.useRef)(null),N=(0,v.useRef)(!1),B=(0,v.useRef)(null),j=(0,v.useCallback)((e=>{z.current&&(B.current=e),N.current&&(B.current=null,null===f||void 0===f||f(e),C.current=!0,L.current=null,E(!0))}),[f]),V=(0,v.useCallback)((e=>{if(!N.current)return T.current=!1,C.current=!0,B.current=null,q.current&&(clearTimeout(q.current),q.current=null),void(L.current&&(clearTimeout(L.current),L.current=null));!T.current||e.nativeEvent.touches.length>e.nativeEvent.changedTouches.length||(d&&null!==L.current&&(clearTimeout(L.current),j(e)),B.current&&(null===f||void 0===f||f(B.current),B.current=null),null===p||void 0===p||p(e),C.current&&(null===h||void 0===h||h(e)),q.current&&(clearTimeout(q.current),q.current=null),N.current=!1,T.current=!1,C.current=!0,E(!1))}),[h,f,p,j,d]),z=(0,v.useRef)(!1),H=(0,v.useRef)(null),U=(0,v.useRef)(!1),W=(0,v.useCallback)((e=>{N.current&&(T.current&&(null===m||void 0===m||m(bn(e)),C.current=!1),q.current&&(clearTimeout(q.current),q.current=null))}),[m]),q=(0,v.useRef)(null),$=(null!==c&&void 0!==c?c:500)+(null!==d&&void 0!==d?d:0),Y=(0,v.useRef)(null),G=(0,v.useCallback)(((e,t,n)=>{var r;if(!((e,t,n)=>{var r,a,i,o,s,l,u,c;return(null!==(r=null===n||void 0===n?void 0:n.x)&&void 0!==r?r:0)<(null!==(a=t.right)&&void 0!==a?a:0)+e.width&&(null!==(i=null===n||void 0===n?void 0:n.y)&&void 0!==i?i:0)<(null!==(o=t.bottom)&&void 0!==o?o:0)+e.height&&(null!==(s=null===n||void 0===n?void 0:n.x)&&void 0!==s?s:0)>-(null!==(l=t.left)&&void 0!==l?l:0)&&(null!==(u=null===n||void 0===n?void 0:n.y)&&void 0!==u?u:0)>-(null!==(c=t.top)&&void 0!==c?c:0)})({width:e,height:t},I,n.changedTouches.at(-1))||T.current||U.current)return U.current=!1,H.current=null,void(z.current=!1);T.current=!0,null===q.current&&(q.current=setTimeout((()=>W(n)),$)),d?L.current=setTimeout((()=>{j(bn(n))}),d):j(bn(n)),null===(r=H.current)||void 0===r||r.call(H),H.current=null,z.current=!1}),[W,$,I,j,d]),X=(0,v.useMemo)((()=>ft.LongPress().minDuration(y.INT32_MAX).maxDistance(y.INT32_MAX).cancelsTouchesInView(!1).onTouchesDown(function(){const e=function(e){var n,r;(z.current=!0,t)?null===(n=t.current)||void 0===n||n.measure(((t,n,r,a)=>{G(r,a,e)})):null===(r=Y.current)||void 0===r||r.measure(((t,n,r,a)=>{G(r,a,e)}))};return e.__closure={handlingOnTouchesDown:z,pressableRef:t,measureCallback:G,innerPressableRef:Y},e.__workletHash=2925435967634,e.__initData=Sn,e}()).onTouchesUp(function(){const e=function(e){z.current?H.current=()=>V(bn(e)):(null!==B.current&&(D.current=!0),V(bn(e)))};return e.__closure={handlingOnTouchesDown:z,onEndHandlingTouchesDown:H,pressOutHandler:V,gestureTouchToPressableEvent:bn,deferredEventPayload:B,shouldPreventNativeEffects:D},e.__workletHash=0xf0686e7b785,e.__initData=En,e}()).onTouchesCancelled(function(){const e=function(e){if(C.current=!1,z.current)return U.current=!0,void(H.current=()=>V(bn(e)));!T.current||e.allTouches.length>e.changedTouches.length||V(bn(e))};return e.__closure={isPressCallbackEnabled:C,handlingOnTouchesDown:z,cancelledMidPress:U,onEndHandlingTouchesDown:H,pressOutHandler:V,gestureTouchToPressableEvent:bn,hasPassedBoundsChecks:T},e.__workletHash=5577263905475,e.__initData=Cn,e}())),[t,G,V]),K=(0,v.useMemo)((()=>ft.Native().onBegin(function(){const e=function(){0};return e.__closure={Platform:mn.default,isTouchPropagationAllowed:N},e.__workletHash=0xdd500e11318,e.__initData=Tn,e}()).onStart(function(){const e=function(){N.current=!0};return e.__closure={Platform:mn.default,isTouchPropagationAllowed:N,deferredEventPayload:B,hasPassedBoundsChecks:T,pressInHandler:j,pressOutHandler:V,shouldPreventNativeEffects:D,handlingOnTouchesDown:z},e.__workletHash=4306736824039,e.__initData=Dn,e}())),[j,V]),J=((e,t)=>{var n,r,a,i,o,s,l,u;return{left:(null!==(n=e.left)&&void 0!==n?n:0)+(null!==(r=t.left)&&void 0!==r?r:0),right:(null!==(a=e.right)&&void 0!==a?a:0)+(null!==(i=t.right)&&void 0!==i?i:0),top:(null!==(o=e.top)&&void 0!==o?o:0)+(null!==(s=t.top)&&void 0!==s?s:0),bottom:(null!==(l=e.bottom)&&void 0!==l?l:0)+(null!==(u=t.bottom)&&void 0!==u?u:0)}})(I,O),Z=!0!==F,Q=[K,X,R];for(const y of Q)y.enabled(Z),y.runOnJS(!0),y.hitSlop(J),y.shouldCancelWhenOutside(!1);K.hitSlop(I);const ee=ft.Simultaneous(...Q),te={cursor:"pointer"},ne="function"===typeof g?g({pressed:S}):g,re="function"===typeof _?_({pressed:S}):_,ae=(0,v.useMemo)((()=>{var e;null===kn&&(kn=(0,y.isFabric)());const t=w?void 0:"transparent",n=null!==(e=null===w||void 0===w?void 0:w.color)&&void 0!==e?e:t;return kn?n:(0,mt.default)(n)}),[w]);return v.createElement(He,{gesture:ee},v.createElement(yt,wn({},A,{ref:null!==t&&void 0!==t?t:Y,accessible:!1!==k,hitSlop:J,enabled:Z,touchSoundDisabled:null!==b&&void 0!==b?b:void 0,rippleColor:ae,rippleRadius:null!==(n=null===w||void 0===w?void 0:w.radius)&&void 0!==n?n:void 0,style:[te,ne],testOnly_onPress:Fn?h:void 0,testOnly_onPressIn:Fn?f:void 0,testOnly_onPressOut:Fn?p:void 0,testOnly_onLongPress:Fn?m:void 0}),re,null))}));var On=n(60430),Pn=n.n(On),Mn=n(92365),Rn=n(21815),Ln=n(48623);function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Bn="Idle",jn="Dragging",Vn="Settling";class zn extends v.Component{constructor(e){super(e),Nn(this,"openValue",void 0),Nn(this,"onGestureEvent",void 0),Nn(this,"accessibilityIsModalView",v.createRef()),Nn(this,"pointerEventsView",v.createRef()),Nn(this,"panGestureHandler",v.createRef()),Nn(this,"drawerShown",!1),Nn(this,"updateAnimatedEvent",((e,t)=>{const{drawerPosition:n,drawerWidth:r,drawerType:a}=e,{dragX:i,touchX:o,drawerTranslation:s,containerWidth:l}=t;let u=i,c=o;"left"!==n?(u=pt.default.multiply(new pt.default.Value(-1),i),c=pt.default.add(new pt.default.Value(l),pt.default.multiply(new pt.default.Value(-1),o)),o.setValue(l)):o.setValue(0);let d=u;if("front"===a){const e=pt.default.add(c,pt.default.multiply(new pt.default.Value(-1),u)).interpolate({inputRange:[r-1,r,r+1],outputRange:[0,0,1]});d=pt.default.add(u,e)}this.openValue=pt.default.add(d,s).interpolate({inputRange:[0,r],outputRange:[0,1],extrapolate:"clamp"});const h={useNativeDriver:e.useNativeAnimations};this.props.onDrawerSlide&&(h.listener=e=>{var t,n;const r=Math.floor(Math.abs(e.nativeEvent.translationX))/this.state.containerWidth;null===(t=(n=this.props).onDrawerSlide)||void 0===t||t.call(n,r)}),this.onGestureEvent=pt.default.event([{nativeEvent:{translationX:i,x:o}}],h)})),Nn(this,"handleContainerLayout",(({nativeEvent:e})=>{this.setState({containerWidth:e.layout.width})})),Nn(this,"emitStateChanged",((e,t)=>{var n,r;null===(n=(r=this.props).onDrawerStateChanged)||void 0===n||n.call(r,e,t)})),Nn(this,"openingHandlerStateChange",(({nativeEvent:e})=>{e.oldState===a.State.ACTIVE?this.handleRelease({nativeEvent:e}):e.state===a.State.ACTIVE&&(this.emitStateChanged(jn,!1),this.setState({drawerState:jn}),"on-drag"===this.props.keyboardDismissMode&&Mn.default.dismiss(),this.props.hideStatusBar&&Rn.default.setHidden(!0,this.props.statusBarAnimation||"slide"))})),Nn(this,"onTapHandlerStateChange",(({nativeEvent:e})=>{this.drawerShown&&e.oldState===a.State.ACTIVE&&"locked-open"!==this.props.drawerLockMode&&this.closeDrawer()})),Nn(this,"handleRelease",(({nativeEvent:e})=>{const{drawerWidth:t,drawerPosition:n,drawerType:r}=this.props,{containerWidth:a}=this.state;let{translationX:i,velocityX:o,x:s}=e;"left"!==n&&(i=-i,s=a-s,o=-o);const l=s-i;let u=0;"front"===r&&(u=l>t?l-t:0);const c=i+u+(this.drawerShown?t:0);c+.05*o>t/2?this.animateDrawer(c,t,o):this.animateDrawer(c,0,o)})),Nn(this,"updateShowing",(e=>{var t,n,r;this.drawerShown=e,null===(t=this.accessibilityIsModalView.current)||void 0===t||t.setNativeProps({accessibilityViewIsModal:e}),null===(n=this.pointerEventsView.current)||void 0===n||n.setNativeProps({pointerEvents:e?"auto":"none"});const{drawerPosition:a,minSwipeDistance:i,edgeWidth:o}=this.props,s="left"===a,l=(s?1:-1)*(this.drawerShown?-1:1),u=s?{left:0,width:e?void 0:o}:{right:0,width:e?void 0:o};null===(r=this.panGestureHandler.current)||void 0===r||r.setNativeProps({hitSlop:u,activeOffsetX:l*i})})),Nn(this,"animateDrawer",((e,t,n,r)=>{if(this.state.dragX.setValue(0),this.state.touchX.setValue("left"===this.props.drawerPosition?0:this.state.containerWidth),null!=e){let r=e;this.props.useNativeAnimations&&(e0?r=Math.min(e+n/60,t):e>t&&n<0&&(r=Math.max(e+n/60,t))),this.state.drawerTranslation.setValue(r)}const a=0!==t;this.updateShowing(a),this.emitStateChanged(Vn,a),this.setState({drawerState:Vn}),this.props.hideStatusBar&&Rn.default.setHidden(a,this.props.statusBarAnimation||"slide"),pt.default.spring(this.state.drawerTranslation,{velocity:n,bounciness:0,toValue:t,useNativeDriver:this.props.useNativeAnimations,speed:null!==r&&void 0!==r?r:void 0}).start((({finished:e})=>{var t,n,r,i;e&&(this.emitStateChanged(Bn,a),this.setState({drawerOpened:a}),this.state.drawerState!==jn&&this.setState({drawerState:Bn}),a?null===(t=(n=this.props).onDrawerOpen)||void 0===t||t.call(n):null===(r=(i=this.props).onDrawerClose)||void 0===r||r.call(i))}))})),Nn(this,"openDrawer",((e={})=>{this.animateDrawer(void 0,this.props.drawerWidth,e.velocity?e.velocity:0,e.speed),this.forceUpdate()})),Nn(this,"closeDrawer",((e={})=>{this.animateDrawer(void 0,0,e.velocity?e.velocity:0,e.speed),this.forceUpdate()})),Nn(this,"renderOverlay",(()=>{let e;Pn()(this.openValue,"should be set"),e=this.state.drawerState!==Bn?this.openValue:this.state.drawerOpened?1:0;const t={opacity:e,backgroundColor:this.props.overlayColor};return v.createElement(M.TapGestureHandler,{onHandlerStateChange:this.onTapHandlerStateChange},v.createElement(pt.default.View,{pointerEvents:this.drawerShown?"auto":"none",ref:this.pointerEventsView,style:[Hn.overlay,t]}))})),Nn(this,"renderDrawer",(()=>{const{drawerBackgroundColor:e,drawerWidth:t,drawerPosition:n,drawerType:r,drawerContainerStyle:a,contentContainerStyle:i}=this.props,o="left"===n,s="back"!==r,l="front"!==r,u=Ln.default.isRTL?o:!o,c={backgroundColor:e,width:t},d=this.openValue;let h;if(Pn()(d,"should be set"),l){h={transform:[{translateX:d.interpolate({inputRange:[0,1],outputRange:o?[0,t]:[0,-t],extrapolate:"clamp"})}]}}let f=0;if(s){const e=o?-t:t;f=this.state.drawerState!==Bn?d.interpolate({inputRange:[0,1],outputRange:[e,0],extrapolate:"clamp"}):this.state.drawerOpened?0:e}const p={transform:[{translateX:f}],flexDirection:u?"row-reverse":"row"};return v.createElement(pt.default.View,{style:Hn.main,onLayout:this.handleContainerLayout},v.createElement(pt.default.View,{style:["front"===r?Hn.containerOnBack:Hn.containerInFront,h,i],importantForAccessibility:this.drawerShown?"no-hide-descendants":"yes"},"function"===typeof this.props.children?this.props.children(this.openValue):this.props.children,this.renderOverlay()),v.createElement(pt.default.View,{pointerEvents:"box-none",ref:this.accessibilityIsModalView,accessibilityViewIsModal:this.drawerShown,style:[Hn.drawerContainer,p,a]},v.createElement(A.default,{style:c},this.props.renderNavigationView(this.openValue))))})),Nn(this,"setPanGestureRef",(e=>{var t,n;this.panGestureHandler.current=e,null===(t=(n=this.props).onGestureRef)||void 0===t||t.call(n,e)}));const t=new pt.default.Value(0),n=new pt.default.Value(0),r=new pt.default.Value(0);this.state={dragX:t,touchX:n,drawerTranslation:r,containerWidth:0,drawerState:Bn,drawerOpened:!1},this.updateAnimatedEvent(e,this.state)}shouldComponentUpdate(e,t){return this.props.drawerPosition===e.drawerPosition&&this.props.drawerWidth===e.drawerWidth&&this.props.drawerType===e.drawerType&&this.state.containerWidth===t.containerWidth||this.updateAnimatedEvent(e,t),!0}render(){const{drawerPosition:e,drawerLockMode:t,edgeWidth:n,minSwipeDistance:r}=this.props,a="left"===e,i=(a?1:-1)*(this.drawerShown?-1:1),o=a?{left:0,width:this.drawerShown?void 0:n}:{right:0,width:this.drawerShown?void 0:n};return v.createElement(H.PanGestureHandler,{userSelect:this.props.userSelect,activeCursor:this.props.activeCursor,mouseButton:this.props.mouseButton,enableContextMenu:this.props.enableContextMenu,ref:this.setPanGestureRef,hitSlop:o,activeOffsetX:i*r,failOffsetY:[-15,15],onGestureEvent:this.onGestureEvent,onHandlerStateChange:this.openingHandlerStateChange,enableTrackpadTwoFingerGesture:this.props.enableTrackpadTwoFingerGesture,enabled:"locked-closed"!==t&&"locked-open"!==t},this.renderDrawer())}}Nn(zn,"defaultProps",{drawerWidth:200,drawerPosition:"left",useNativeAnimations:!0,drawerType:"front",edgeWidth:20,minSwipeDistance:3,overlayColor:"rgba(0, 0, 0, 0.7)",drawerLockMode:"unlocked",enableTrackpadTwoFingerGesture:!1}),Nn(zn,"positions",{Left:"left",Right:"right"});const Hn=w.default.create({drawerContainer:Object.assign({},w.default.absoluteFillObject,{zIndex:1001,flexDirection:"row"}),containerInFront:Object.assign({},w.default.absoluteFillObject,{zIndex:1002}),containerOnBack:Object.assign({},w.default.absoluteFillObject),main:{flex:1,zIndex:0,overflow:"hidden"},overlay:Object.assign({},w.default.absoluteFillObject,{zIndex:1e3})});m()},3453:(e,t,n)=>{"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,{MountRegistry:()=>a});class a{static addMountListener(e){return this.mountListeners.add(e),()=>{this.mountListeners.delete(e)}}static addUnmountListener(e){return this.unmountListeners.add(e),()=>{this.unmountListeners.delete(e)}}static gestureHandlerWillMount(e){this.mountListeners.forEach((t=>t(e)))}static gestureHandlerWillUnmount(e){this.unmountListeners.forEach((t=>t(e)))}static gestureWillMount(e){this.mountListeners.forEach((t=>t(e)))}static gestureWillUnmount(e){this.unmountListeners.forEach((t=>t(e)))}}r(a,"mountListeners",new Set),r(a,"unmountListeners",new Set)},1082:(e,t,n)=>{"use strict";n.r(t),n.d(t,{INT32_MAX:()=>f,deepEqual:()=>h,hasProperty:()=>o,isFabric:()=>u,isReact19:()=>c,isRemoteDebuggingEnabled:()=>d,isTestEnv:()=>s,tagMessage:()=>l,toArray:()=>a,withPrevAndCurrent:()=>i});var r=n(36665);function a(e){return Array.isArray(e)?e:[e]}function i(e,t){const n=[null],r=[...e],a=[];return r.forEach(((e,r)=>{const i=n[r],o=t(i,e);n.push(o),a.push(o)})),a}function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function s(){return o(n.g,"process")&&!1}function l(e){return`[react-native-gesture-handler] ${e}`}function u(){var e;return!(null===(e=n.g)||void 0===e||!e.nativeFabricUIManager)}function c(){return r.version.startsWith("19.")}function d(){const e=n.g;return(!e.nativeCallSyncHook||!!e.__REMOTEDEV__)&&!e.RN$Bridgeless}function h(e,t){if(e===t)return!0;if("object"!==typeof e||"object"!==typeof t||null===e||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n)if(!r.includes(a)||!h(e[a],t[a]))return!1;return!0}const f=2**31-1},78293:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});class r{static getHandler(e){if(e in this.gestures)return this.gestures[e];throw new Error(`No handler for tag ${e}`)}static createGestureHandler(e,t){if(e in this.gestures)throw new Error(`Handler with tag ${e} already exists. Please ensure that no Gesture instance is used across multiple GestureDetectors.`);this.gestures[e]=t,this.gestures[e].handlerTag=e}static dropGestureHandler(e){e in this.gestures&&(this.gestures[e].onDestroy(),delete this.gestures[e])}static get nodes(){return Object.assign({},this.gestures)}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(r,"gestures",{})},56647:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PointerTypeMapping:()=>i,RNSVGElements:()=>c,calculateViewScale:()=>l,coneToDeviation:()=>s,degToRad:()=>o,isPointerInBounds:()=>a,isRNSVGElement:()=>d,isRNSVGNode:()=>h,tryExtractStylusData:()=>u});var r=n(40094);function a(e,{x:t,y:n}){const r=e.getBoundingClientRect();return t>=r.left&&t<=r.right&&n>=r.top&&n<=r.bottom}const i=new Map([["mouse",r.PointerType.MOUSE],["touch",r.PointerType.TOUCH],["pen",r.PointerType.STYLUS],["none",r.PointerType.OTHER]]),o=e=>e*Math.PI/180,s=e=>Math.cos(o(e/2));function l(e){var t;const n=getComputedStyle(e),r={scaleX:1,scaleY:1};if(void 0!==n.scale&&"none"!==n.scale){const e=n.scale.split(" ");e[0]&&(r.scaleX=parseFloat(e[0])),r.scaleY=e[1]?parseFloat(e[1]):parseFloat(e[0])}const a=null===(t=new RegExp(/matrix\((.+)\)/).exec(n.transform))||void 0===t?void 0:t[1];if(a){const e=a.split(", ");r.scaleX*=parseFloat(e[0]),r.scaleY*=parseFloat(e[3])}return r}function u(e){if(i.get(e.pointerType)!==r.PointerType.STYLUS)return;const t=e.azimuthAngle,n=e.altitudeAngle;if(0===e.tiltX&&0===e.tiltY){if(void 0===t||void 0===n)return{tiltX:0,tiltY:0,azimuthAngle:Math.PI/2,altitudeAngle:Math.PI/2,pressure:e.pressure};const{tiltX:r,tiltY:a}=function(e,t){const n=180/Math.PI;let r=0,a=0;0===e&&(0!==t&&t!==2*Math.PI||(r=Math.PI/2),t===Math.PI/2&&(a=Math.PI/2),t===Math.PI&&(r=-Math.PI/2),t===3*Math.PI/2&&(a=-Math.PI/2),t>0&&tMath.PI/2&&tMath.PI&&t<3*Math.PI/2&&(r=-Math.PI/2,a=-Math.PI/2),t>3*Math.PI/2&&t<2*Math.PI&&(r=Math.PI/2,a=-Math.PI/2));if(0!==e){const n=Math.tan(e);r=Math.atan(Math.cos(t)/n),a=Math.atan(Math.sin(t)/n)}const i=Math.round(r*n),o=Math.round(a*n);return{tiltX:i,tiltY:o}}(n,t);return{tiltX:r,tiltY:a,azimuthAngle:t,altitudeAngle:n,pressure:e.pressure}}const{altitudeAngle:a,azimuthAngle:o}=function(e,t){const n=e*Math.PI/180,r=t*Math.PI/180;let a=0;if(0===e)t>0?a=Math.PI/2:t<0&&(a=3*Math.PI/2);else if(0===t)e<0&&(a=Math.PI);else if(90===Math.abs(e)||90===Math.abs(t))a=0;else{const e=Math.tan(n),t=Math.tan(r);a=Math.atan2(t,e),a<0&&(a+=2*Math.PI)}let i=0;i=90===Math.abs(e)||90===Math.abs(t)?0:0===e?Math.PI/2-Math.abs(r):0===t?Math.PI/2-Math.abs(n):Math.atan(1/Math.sqrt(Math.pow(Math.tan(n),2)+Math.pow(Math.tan(r),2)));return{altitudeAngle:i,azimuthAngle:a}}(e.tiltX,e.tiltY);return{tiltX:e.tiltX,tiltY:e.tiltY,azimuthAngle:o,altitudeAngle:a,pressure:e.pressure}}const c=new Set(["Circle","ClipPath","Ellipse","ForeignObject","G","Image","Line","Marker","Mask","Path","Pattern","Polygon","Polyline","Rect","Svg","Symbol","TSpan","Text","TextPath","Use"]);function d(e){const t=Object.getPrototypeOf(e).constructor.name;return c.has(t)&&Object.hasOwn(e,"elementRef")}function h(e){var t,n,r;return(null===(t=e.ref)||void 0===t||!t.rngh)&&("WebShape"===(null===(n=Object.getPrototypeOf(null===e||void 0===e?void 0:e.type))||void 0===n?void 0:n.name)||c.has(null===e||void 0===e||null===(r=e.type)||void 0===r?void 0:r.displayName))}},5433:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GooglePlacesAutocomplete:()=>P,default:()=>M});var r=n(98587),a=n(78136),i=n.n(a),o=n(94075),s=n.n(o),l=n(84221),u=n.n(l);const c={randomUUID:"undefined"!==typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var d,h=new Uint8Array(16);function f(){if(!d&&!(d="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return d(h)}for(var p=[],m=0;m<256;++m)p.push((m+256).toString(16).slice(1));function g(e,t=0){return(p[e[t+0]]+p[e[t+1]]+p[e[t+2]]+p[e[t+3]]+"-"+p[e[t+4]]+p[e[t+5]]+"-"+p[e[t+6]]+p[e[t+7]]+"-"+p[e[t+8]]+p[e[t+9]]+"-"+p[e[t+10]]+p[e[t+11]]+p[e[t+12]]+p[e[t+13]]+p[e[t+14]]+p[e[t+15]]).toLowerCase()}const y=function(e,t,n){if(c.randomUUID&&!t&&!e)return c.randomUUID();var r=(e=e||{}).random||(e.rng||f)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=r[a];return t}return g(r)};var _=n(36665),b=n(20530),v=n(90932),w=n(60193),F=n(92365),k=n(35708),x=n(2772),A=n(75675),S=n(6283),E=n(16773),C=n(73929),T=n(60397);const D=["key","locationbias","types"],I=["onFocus","onBlur","onChangeText","clearButtonMode","InputComp"],O={container:{flex:1},textInputContainer:{flexDirection:"row"},textInput:{backgroundColor:"#FFFFFF",height:44,borderRadius:5,paddingVertical:5,paddingHorizontal:10,fontSize:15,flex:1,marginBottom:5},listView:{},row:{backgroundColor:"#FFFFFF",padding:13,minHeight:44,flexDirection:"row"},loader:{flexDirection:"row",justifyContent:"flex-end",height:20},description:{},separator:{height:A.default.hairlineWidth,backgroundColor:"#c8c7cc"},poweredContainer:{justifyContent:"flex-end",alignItems:"center",borderBottomRightRadius:5,borderBottomLeftRadius:5,borderColor:"#c8c7cc",borderTopWidth:.5},powered:{}},P=(0,_.forwardRef)(((e,t)=>{let a=[],o=[];const s=(0,_.useCallback)(((t,n)=>{let r=[];return((n?0===t.length&&0===n.length:0===t.length)||!0===e.predefinedPlacesAlwaysVisible)&&(r=[...e.predefinedPlaces.filter((e=>e?.description.length))],!0===e.currentLocation&&(navigator?.geolocation||(console.warn("If you are using React Native v0.60.0+ you must follow these instructions to enable currentLocation: https://git.io/Jf4AR"),0))&&r.unshift({description:e.currentLocationLabel,isCurrentLocation:!0})),r=r.map((e=>Object.assign({},e,{isPredefinedPlace:!0}))),[...r,...t]}),[e.currentLocation,e.currentLocationLabel,e.predefinedPlaces,e.predefinedPlacesAlwaysVisible]),l=(0,_.useCallback)((e=>e?"all"===e.useOnPlatform||"web"===e.useOnPlatform?e.url:void 0:"https://maps.googleapis.com/maps/api"),[]),c=e=>e?.headers||{},d=(e,t)=>{Object.keys(t).map((n=>e.setRequestHeader(n,t[n])))},[h,f]=(0,_.useState)(""),[p,m]=(0,_.useState)(s([])),[g,A]=(0,_.useState)("auto"!==e.listViewDisplayed&&e.listViewDisplayed),[P,M]=(0,_.useState)(l(e.requestUrl)),[R,L]=(0,_.useState)(!1),N=(0,_.useRef)(),[B,j]=(0,_.useState)(y());(0,_.useEffect)((()=>{M(l(e.requestUrl))}),[l,e.requestUrl]),(0,_.useEffect)((()=>(J(h),()=>{z()})),[e.query]),(0,_.useEffect)((()=>{m(s([]))}),[s,e.predefinedPlaces]),(0,_.useImperativeHandle)(t,(()=>({setAddressText:e=>{f(e)},getAddressText:()=>h,blur:()=>N.current.blur(),focus:()=>N.current.focus(),isFocused:()=>N.current.isFocused(),clear:()=>N.current.clear(),getCurrentLocation:U})));const V=()=>"https://maps.googleapis.com/maps/api"===P,z=()=>{o.map((e=>{e.onreadystatechange=null,e.abort()})),o=[]},H=()=>!!e.requestUrl||(console.warn("This library cannot be used for the web unless you specify the requestUrl prop. See https://git.io/JflFv for more for details."),!1),U=()=>{e.enableHighAccuracyLocation;const t=navigator.geolocation.getCurrentPosition||navigator.geolocation.default.getCurrentPosition;t&&t((t=>{if("None"===e.nearbyPlacesAPI){let n={description:e.currentLocationLabel,geometry:{location:{lat:t.coords.latitude,lng:t.coords.longitude}}};q(),e.onPress(n,n)}else G(t.coords.latitude,t.coords.longitude)}),(e=>{q(),console.error(e.message)}),{enableHighAccuracy:!1,timeout:2e4,maximumAge:1e3})},W=e=>{let t=s(a);for(let n=0;n{for(let e=0;e{if(!0!==t.isPredefinedPlace)return t;for(let n=0;n{if(0===t.length)return e;const n=[];for(let r=0;r{if(z(),void 0!==t&&void 0!==n&&null!==t&&null!==n){const r=new XMLHttpRequest;o.push(r),r.timeout=e.timeout,r.ontimeout=e.onTimeout,r.onreadystatechange=()=>{if(4===r.readyState){if(L(!1),200===r.status){const n=JSON.parse(r.responseText);if(q(),"undefined"!==typeof n.results){var t=[];t="GoogleReverseGeocoding"===e.nearbyPlacesAPI?Y(n.results,e.filterReverseGeocodingByTypes):n.results,m(s(t))}"undefined"!==typeof n.error_message&&(e.onFail?e.onFail(n.error_message):console.warn("google places autocomplete: "+n.error_message))}}else L(!0)};let a="";a="GoogleReverseGeocoding"===e.nearbyPlacesAPI?`${P}/geocode/json?`+u().stringify(Object.assign({latlng:t+","+n,key:e.query.key},e.GoogleReverseGeocodingQuery)):`${P}/place/nearbysearch/json?`+u().stringify(Object.assign({location:t+","+n,key:e.query.key},e.GooglePlacesSearchQuery)),r.open("GET",a),r.withCredentials=V(),d(r,c(e.requestUrl)),r.send()}else a=[],m(s([]))},X=t=>{if(z(),P)if(H()&&t&&t.length>=e.minLength){const n=new XMLHttpRequest;if(o.push(n),n.timeout=e.timeout,n.ontimeout=e.onTimeout,n.onreadystatechange=()=>{if(4===n.readyState){if(L(!1),200===n.status){const r=JSON.parse(n.responseText);if("undefined"!==typeof r.predictions){const n="GoogleReverseGeocoding"===e.nearbyPlacesAPI?Y(r.predictions,e.filterReverseGeocodingByTypes):r.predictions;a=n,m(s(n,t))}if("undefined"!==typeof r.suggestions){const e=(e=>{const t=[];for(let n=0;ni()(X,e.debounce)),[e.query,P]),J=t=>{(e=>{f(e),K(e)})(t);const n=e?.textInputProps?.onChangeText;n&&n(t)},Z=(t,n)=>e.renderRow?e.renderRow(t,n):(0,T.jsx)(S.default,{style:[e.suppressDefaultStyles?{}:O.description,e.styles.description,t.isPredefinedPlace?e.styles.predefinedPlacesDescription:{}],numberOfLines:e.numberOfLines,children:Q(t)}),Q=t=>e.renderDescription?e.renderDescription(t):t.description||t.formatted_address||t.name,ee=t=>!0===t.isLoading?(0,T.jsx)(C.default,{style:[e.suppressDefaultStyles?{}:O.loader,e.styles.loader],children:(0,T.jsx)(b.default,{animating:!0,size:"small"})}):null,te=(t={},n)=>(0,T.jsx)(x.default,{contentContainerStyle:e.isRowScrollable?{minWidth:"100%"}:{width:"100%"},scrollEnabled:e.isRowScrollable,keyboardShouldPersistTaps:e.keyboardShouldPersistTaps,horizontal:!0,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,children:(0,T.jsx)(k.default,{style:({hovered:t,pressed:n})=>[e.isRowScrollable?{minWidth:"100%"}:{width:"100%"},{backgroundColor:n?e.listUnderlayColor:t?e.listHoverColor:void 0}],onPress:()=>(t=>{if(!0!==t.isPredefinedPlace&&!0===e.fetchDetails){if(!0===t.isLoading)return;F.default.dismiss(),z(),W(t);const n=new XMLHttpRequest;o.push(n),n.timeout=e.timeout,n.ontimeout=e.onTimeout,n.onreadystatechange=()=>{if(4===n.readyState)if(200===n.status){const r=JSON.parse(n.responseText);if("OK"===r.status||e.isNewPlacesAPI&&r.id){const n=e.isNewPlacesAPI?r:r.result;q(),re(),f(Q(t)),delete t.isLoading,e.onPress(t,n)}else q(),e.autoFillOnNotFound&&(f(Q(t)),delete t.isLoading),e.onNotFound?e.onNotFound(r):console.warn("google places autocomplete: "+r.status)}else q(),e.onFail?e.onFail("request could not be completed or has been aborted"):console.warn("google places autocomplete: request could not be completed or has been aborted")},e.isNewPlacesAPI?(n.open("GET",`${P}/v1/places/${t.place_id}?`+u().stringify({key:e.query.key,sessionToken:B,fields:e.fields})),j(y())):n.open("GET",`${P}/place/details/json?`+u().stringify(Object.assign({key:e.query.key,placeid:t.place_id,language:e.query.language},e.GooglePlacesDetailsQuery))),n.withCredentials=V(),d(n,c(e.requestUrl)),n.send()}else if(!0===t.isCurrentLocation)W(t),f(Q(t)),delete t.isLoading,U();else{f(Q(t)),re(),delete t.isLoading;let n=$(t);e.onPress(n,n)}})(t),onBlur:re,children:(0,T.jsxs)(C.default,{style:[e.suppressDefaultStyles?{}:O.row,e.styles.row,t.isPredefinedPlace?e.styles.specialItemRow:{}],children:[ee(t),Z(t,n)]})})}),ne=(t,n)=>n===p.length-1?null:(0,T.jsx)(C.default,{style:[e.suppressDefaultStyles?{}:O.separator,e.styles.separator]},`${t}-${n}`),re=t=>{t&&(({relatedTarget:e,currentTarget:t})=>{if(!e)return!1;for(var n=e.parentNode;n;){if("result-list-id"===n.id)return!0;n=n.parentNode}return!1})(t)||(e.keepResultsAfterBlur||A(!1),N?.current?.blur())},ae=()=>A(!0),ie=()=>oe()?(0,T.jsx)(C.default,{style:[e.suppressDefaultStyles?{}:O.row,O.poweredContainer,e.styles.poweredContainer],children:(0,T.jsx)(w.default,{style:[e.suppressDefaultStyles?{}:O.powered,e.styles.powered],resizeMode:"contain",source:n(68809)})}):null,oe=()=>{if(!e.enablePoweredByContainer||0===p.length)return!1;for(let e=0;e{if(e.renderLeftButton)return e.renderLeftButton()})(),(0,T.jsx)(fe,Object.assign({ref:N,style:[e.suppressDefaultStyles?{}:O.textInput,e.styles.textInput],value:h,placeholder:e.placeholder,onFocus:le?e=>{ae(),le(e)}:ae,onBlur:ue?e=>{re(e),ue(e)}:re,clearButtonMode:ce||"while-editing",onChangeText:J},he)),(()=>{if(e.renderRightButton)return e.renderRightButton()})()]}),e.inbetweenCompo,(()=>{const t=()=>Math.random().toString(36).substr(2,10);return H()&&(""!==h||e.predefinedPlaces.length>0||!0===e.currentLocation)&&!0===g?(0,T.jsx)(v.default,Object.assign({nativeID:"result-list-id",scrollEnabled:!e.disableScroll,style:[e.suppressDefaultStyles?{}:O.listView,e.styles.listView],data:p,keyExtractor:t,extraData:[p,e],ItemSeparatorComponent:ne,renderItem:({item:e,index:t})=>te(e,t),ListEmptyComponent:R?e.listLoaderComponent:h.length>e.minLength&&e.listEmptyComponent,ListHeaderComponent:e.renderHeaderComponent&&e.renderHeaderComponent(h),ListFooterComponent:ie},e)):null})(),e.children]})}));P.propTypes={autoFillOnNotFound:s().bool,currentLocation:s().bool,currentLocationLabel:s().string,debounce:s().number,disableScroll:s().bool,enableHighAccuracyLocation:s().bool,enablePoweredByContainer:s().bool,fetchDetails:s().bool,filterReverseGeocodingByTypes:s().array,GooglePlacesDetailsQuery:s().object,GooglePlacesSearchQuery:s().object,GoogleReverseGeocodingQuery:s().object,inbetweenCompo:s().object,isRowScrollable:s().bool,keyboardShouldPersistTaps:s().oneOf(["never","always","handled"]),listEmptyComponent:s().element,listLoaderComponent:s().element,listHoverColor:s().string,listUnderlayColor:s().string,listViewDisplayed:s().oneOfType([s().bool,s().oneOf(["auto"])]),keepResultsAfterBlur:s().bool,minLength:s().number,nearbyPlacesAPI:s().string,numberOfLines:s().number,onFail:s().func,onNotFound:s().func,onPress:s().func,onTimeout:s().func,placeholder:s().string,predefinedPlaces:s().array,predefinedPlacesAlwaysVisible:s().bool,preProcess:s().func,query:s().object,renderDescription:s().func,renderHeaderComponent:s().func,renderLeftButton:s().func,renderRightButton:s().func,renderRow:s().func,requestUrl:s().shape({url:s().string,useOnPlatform:s().oneOf(["web","all"]),headers:s().objectOf(s().string)}),styles:s().object,suppressDefaultStyles:s().bool,textInputHide:s().bool,textInputProps:s().object,timeout:s().number,isNewPlacesAPI:s().bool,fields:s().string},P.defaultProps={autoFillOnNotFound:!1,currentLocation:!1,currentLocationLabel:"Current location",debounce:0,disableScroll:!1,enableHighAccuracyLocation:!0,enablePoweredByContainer:!0,fetchDetails:!1,filterReverseGeocodingByTypes:[],GooglePlacesDetailsQuery:{},GooglePlacesSearchQuery:{rankby:"distance",type:"restaurant"},GoogleReverseGeocodingQuery:{},isRowScrollable:!0,keyboardShouldPersistTaps:"always",listHoverColor:"#ececec",listUnderlayColor:"#c8c7cc",listViewDisplayed:"auto",keepResultsAfterBlur:!1,minLength:0,nearbyPlacesAPI:"GooglePlacesSearch",numberOfLines:1,onFail:()=>{},onNotFound:()=>{},onPress:()=>{},onTimeout:()=>console.warn("google places autocomplete: request timeout"),placeholder:"",predefinedPlaces:[],predefinedPlacesAlwaysVisible:!1,query:{key:"missing api key",language:"en",types:"geocode"},styles:{},suppressDefaultStyles:!1,textInputHide:!1,textInputProps:{},timeout:2e4,isNewPlacesAPI:!1,fields:"*"},P.displayName="GooglePlacesAutocomplete";const M={GooglePlacesAutocomplete:P}},79229:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:r,RFC3986:a}},84221:(e,t,n)=>{"use strict";var r=n(99868),a=n(22434),i=n(79229);e.exports={formats:i,parse:a,stringify:r}},22434:(e,t,n)=>{"use strict";var r=n(92456),a=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"===typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),u=s?i.slice(0,s.index):i,c=[];if(u){if(!n.plainObjects&&a.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var d=0;n.depth>0&&null!==(s=o.exec(i))&&d=0;--i){var o,s=e[i];if("[]"===s&&n.parseArrays)o=[].concat(a);else{o=n.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(o=[])[c]=a:"__proto__"!==u&&(o[u]=a):o={0:a}}a=o}return a}(c,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!==typeof e.decoder)throw new TypeError("Decoder has to be a function.");if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t="undefined"===typeof e.charset?o.charset:e.charset;return{allowDots:"undefined"===typeof e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"===typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"===typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"===typeof e.comma?e.comma:o.comma,decoder:"function"===typeof e.decoder?e.decoder:o.decoder,delimiter:"string"===typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"===typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"===typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"===typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"===typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}}(t);if(""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var c="string"===typeof e?function(e,t){var n,u={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),f=-1,p=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(g=i(g)?[g]:g),a.call(u,m)?u[m]=r.combine(u[m],g):u[m]=g}return u}(e,n):e,d=n.plainObjects?Object.create(null):{},h=Object.keys(c),f=0;f{"use strict";var r=n(92456),a=n(79229),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,l=String.prototype.split,u=Array.prototype.push,c=function(e,t){u.apply(e,s(t)?t:[t])},d=Date.prototype.toISOString,h=a.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:h,formatter:a.formatters[h],indices:!1,serializeDate:function(e){return d.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,n,a,i,o,u,d,h,p,m,g,y,_,b){var v,w=t;if("function"===typeof d?w=d(n,w):w instanceof Date?w=m(w):"comma"===a&&s(w)&&(w=r.maybeMap(w,(function(e){return e instanceof Date?m(e):e}))),null===w){if(i)return u&&!_?u(n,f.encoder,b,"key",g):n;w=""}if("string"===typeof(v=w)||"number"===typeof v||"boolean"===typeof v||"symbol"===typeof v||"bigint"===typeof v||r.isBuffer(w)){if(u){var F=_?n:u(n,f.encoder,b,"key",g);if("comma"===a&&_){for(var k=l.call(String(w),","),x="",A=0;A0?w.join(",")||null:void 0}];else if(s(d))S=d;else{var C=Object.keys(w);S=h?C.sort(h):C}for(var T=0;T0?_+y:""}},92456:(e,t,n)=>{"use strict";var r=n(79229),a=Object.prototype.hasOwnProperty,i=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],a=0;a=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||i===r.RFC1738&&(40===c||41===c)?l+=s.charAt(u):c<128?l+=o[c]:c<2048?l+=o[192|c>>6]+o[128|63&c]:c<55296||c>=57344?l+=o[224|c>>12]+o[128|c>>6&63]+o[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&s.charCodeAt(u)),l+=o[240|c>>18]+o[128|c>>12&63]+o[128|c>>6&63]+o[128|63&c])}return l},isBuffer:function(e){return!(!e||"object"!==typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r{"use strict";n.r(t),n.d(t,{AstRenderer:()=>P,FitImage:()=>S(),MarkdownIt:()=>R(),default:()=>z,getUniqueID:()=>u,hasParents:()=>v,openUrl:()=>F,parser:()=>b,removeTextStyleProps:()=>L,renderRules:()=>D,stringToTokens:()=>p,styles:()=>B,textStyleProps:()=>E,tokensToAST:()=>f});var r=n(36665),a=n(6283),i=n(75675),o=n(94075),s=n.n(o);let l=(new Date).getTime();function u(){return l++,`rnmr_${l.toString(16)}`}const c=/_open|_close/g;function d(e){let t="unknown";if(e.type&&(t=e.type.replace(c,"")),"heading"===t)t=`${t}${e.tag.substr(1)}`;return t}function h(e,t){const n=d(e),r=e.content;let a={};return e.attrs&&(a=e.attrs.reduce(((e,t)=>{const[n,r]=t;return Object.assign({},e,{[n]:r})}),{})),{type:n,sourceType:e.type,sourceInfo:e.info,sourceMeta:e.meta,block:e.block,markup:e.markup,key:u()+"_"+n,content:r,tokenIndex:t,index:0,attributes:a,children:f(e.children)}}function f(e){let t=[],n=[];if(!e||0===e.length)return[];for(let r=0;r{if("inline"===t.type&&t.children&&t.children.length>0){const n=m(t.children);for(;n.length;)e.push(n.shift())}else e.push(t);return e}),[])}function g(e){for(var t="",n=0,r=e.length;n{e.type=d(e),"image"!==e.type&&"hardbreak"!==e.type||(e.block=!0),"image"===e.type&&(e.attrs[e.attrIndex("alt")][1]=g(e.children))}));const t=[];return e=e.reduce(((e,n,r)=>{if("link"===n.type&&1===n.nesting)t.push(n);else if(t.length>0&&"link"===n.type&&-1===n.nesting)for(t.some((e=>e.block))&&(t[0].type="blocklink",t[0].block=!0,n.type="blocklink",n.block=!0),t.push(n);t.length;)e.push(t.shift());else t.length>0?t.push(n):e.push(n);return e}),[])}class _{constructor(e,t=0,n=null,r=!1){this.type=e,this.nesting=t,this.children=n,this.block=r}}function b(e,t,n){if(Array.isArray(e))return t(e);let r=p(e,n);r=y(r),r=function(e){const t=[];let n=!1;return e.forEach(((e,r)=>{e.block||n?!e.block&&n?t.push(e):e.block&&n?(n=!1,t.push(new _("textgroup",-1)),t.push(e)):t.push(e):(n=!0,t.push(new _("textgroup",1)),t.push(e))})),t}(r),r=function(e){let t=null;return e.filter(((n,r)=>{if(null!==t&&(t+=n.nesting),"list_item"===n.type&&1===n.nesting&&null===t){const n=r+1 in e?e[r+1]:null;if(n&&"paragraph"===n.type&&1===n.nesting)return t=0,!0}else if("paragraph"===n.type){if(1===n.nesting&&1===t)return!1;if(-1===n.nesting&&0===t)return t=null,!1}return!0}))}(r);return t(f(r))}function v(e,t){return e.findIndex((e=>e.type===t))>-1}var w=n(79632);function F(e,t){if(t){const n=t(e);e&&n&&"boolean"===typeof n&&w.default.openURL(e)}else e&&w.default.openURL(e)}var k=n(51950),x=n(73929),A=n(91850),S=n.n(A);const E=["textShadowOffset","color","fontSize","fontStyle","fontWeight","lineHeight","textAlign","textDecorationLine","textShadowColor","fontFamily","textShadowRadius","includeFontPadding","textAlignVertical","fontVariant","letterSpacing","textDecorationColor","textDecorationStyle","textTransform","writingDirection"];var C=n(60397);const T={unknown:(e,t,n,r)=>null,body:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_body,children:t},e.key),heading1:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading1,children:t},e.key),heading2:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading2,children:t},e.key),heading3:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading3,children:t},e.key),heading4:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading4,children:t},e.key),heading5:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading5,children:t},e.key),heading6:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_heading6,children:t},e.key),hr:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_hr},e.key),strong:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.strong,children:t},e.key),em:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.em,children:t},e.key),s:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.s,children:t},e.key),blockquote:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_blockquote,children:t},e.key),bullet_list:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_bullet_list,children:t},e.key),ordered_list:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_ordered_list,children:t},e.key),list_item:(e,t,n,r,o={})=>{const s=Object.assign({},o,i.default.flatten(r.list_item)),l=Object.keys(s),u={};for(let a=0;a"ordered_list"===e.type)),o=n[i];let s;return s=o.attributes&&o.attributes.start?o.attributes.start+e.index:e.index+1,(0,C.jsxs)(x.default,{style:r._VIEW_SAFE_list_item,children:[(0,C.jsxs)(a.default,{style:[u,r.ordered_list_icon],children:[s,e.markup]}),(0,C.jsx)(x.default,{style:r._VIEW_SAFE_ordered_list_content,children:t})]},e.key)}return(0,C.jsx)(x.default,{style:r._VIEW_SAFE_list_item,children:t},e.key)},code_inline:(e,t,n,r,i={})=>(0,C.jsx)(a.default,{style:[i,r.code_inline],children:e.content},e.key),code_block:(e,t,n,r,i={})=>{let{content:o}=e;return"string"===typeof e.content&&"\n"===e.content.charAt(e.content.length-1)&&(o=e.content.substring(0,e.content.length-1)),(0,C.jsx)(a.default,{style:[i,r.code_block],children:o},e.key)},fence:(e,t,n,r,i={})=>{let{content:o}=e;return"string"===typeof e.content&&"\n"===e.content.charAt(e.content.length-1)&&(o=e.content.substring(0,e.content.length-1)),(0,C.jsx)(a.default,{style:[i,r.fence],children:o},e.key)},table:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_table,children:t},e.key),thead:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_thead,children:t},e.key),tbody:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_tbody,children:t},e.key),th:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_th,children:t},e.key),tr:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_tr,children:t},e.key),td:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_td,children:t},e.key),link:(e,t,n,r,i)=>(0,C.jsx)(a.default,{style:r.link,onPress:()=>F(e.attributes.href,i),children:t},e.key),blocklink:(e,t,n,r,a)=>(0,C.jsx)(k.default,{onPress:()=>F(e.attributes.href,a),style:r.blocklink,children:(0,C.jsx)(x.default,{style:r.image,children:t})},e.key),image:(e,t,n,r,a,i)=>{const{src:o,alt:s}=e.attributes,l=a.filter((e=>o.toLowerCase().startsWith(e.toLowerCase()))).length>0;if(!1===l&&null===i)return null;const u={indicator:!0,key:e.key,style:r._VIEW_SAFE_image,source:{uri:!0===l?o:`${i}${o}`}};return s&&(u.accessible=!0,u.accessibilityLabel=s),(0,C.jsx)(S(),Object.assign({},u))},text:(e,t,n,r,i={})=>(0,C.jsx)(a.default,{style:[i,r.text],children:e.content},e.key),textgroup:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.textgroup,children:t},e.key),paragraph:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_paragraph,children:t},e.key),hardbreak:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.hardbreak,children:"\n"},e.key),softbreak:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.softbreak,children:"\n"},e.key),pre:(e,t,n,r)=>(0,C.jsx)(x.default,{style:r._VIEW_SAFE_pre,children:t},e.key),inline:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.inline,children:t},e.key),span:(e,t,n,r)=>(0,C.jsx)(a.default,{style:r.span,children:t},e.key)},D=T;var I=n(77341);function O(e){const t=e.split(";").map((e=>{let[t,n]=e.split(":");return t&&n?(t=t.trim(),n=n.trim(),[t,n]):null})).filter((e=>null!=e));return(0,I.default)(t)}class P{constructor(e,t,n,r,a,i,o,s){this._renderRules=e,this._style=t,this._onLinkPress=n,this._maxTopLevelChildren=r,this._topLevelMaxExceededItem=a,this._allowedImageHandlers=i,this._defaultImageHandler=o,this._debugPrintTree=s}getRenderFunction=e=>{const t=this._renderRules[e];return t||(console.warn(`Warning, unknown render rule encountered: ${e}. 'unknown' render rule used (by default, returns null - nothing rendered)`),this._renderRules.unknown)};renderNode=(e,t,n=!1)=>{const r=this.getRenderFunction(e.type),a=[...t];if(!0===this._debugPrintTree){let t="";for(let e=0;ethis.renderNode(e,a)));if("link"===e.type||"blocklink"===e.type)return r(e,o,t,this._style,this._onLinkPress);if("image"===e.type)return r(e,o,t,this._style,this._allowedImageHandlers,this._defaultImageHandler);if(0===o.length||"list_item"===e.type){const n={};for(let e=t.length-1;e>-1;e--){let r={};if(t[e].attributes&&t[e].attributes.style&&"string"===typeof t[e].attributes.style&&(r=O(t[e].attributes.style)),this._style[t[e].type]&&(r=Object.assign({},r,i.default.flatten(this._style[t[e].type])),"list_item"===t[e].type)){let n={};"bullet_list"===t[e+1].type?n=this._style.bullet_list_content:"ordered_list"===t[e+1].type&&(n=this._style.ordered_list_content),r=Object.assign({},r,i.default.flatten(n))}const a=Object.keys(r);for(let e=0;ethis._maxTopLevelChildren&&(o=o.slice(0,this._maxTopLevelChildren),o.push(this._topLevelMaxExceededItem)),r(e,o,t,this._style)};render=e=>{const t={type:"body",key:u(),children:e};return this.renderNode(t,[],!0)}}var M=n(31515),R=n.n(M);function L(e){const t=E.filter((t=>Object.keys(e).includes(t))),n=Object.assign({},e);return t.forEach((e=>{delete n[e]})),n}var N=n(95991);const B={body:{},heading1:{flexDirection:"row",fontSize:32},heading2:{flexDirection:"row",fontSize:24},heading3:{flexDirection:"row",fontSize:18},heading4:{flexDirection:"row",fontSize:16},heading5:{flexDirection:"row",fontSize:13},heading6:{flexDirection:"row",fontSize:11},hr:{backgroundColor:"#000000",height:1},strong:{fontWeight:"bold"},em:{fontStyle:"italic"},s:{textDecorationLine:"line-through"},blockquote:{backgroundColor:"#F5F5F5",borderColor:"#CCC",borderLeftWidth:4,marginLeft:5,paddingHorizontal:5},bullet_list:{},ordered_list:{},list_item:{flexDirection:"row",justifyContent:"flex-start"},bullet_list_icon:{marginLeft:10,marginRight:10},bullet_list_content:{flex:1},ordered_list_icon:{marginLeft:10,marginRight:10},ordered_list_content:{flex:1},code_inline:Object.assign({borderWidth:1,borderColor:"#CCCCCC",backgroundColor:"#f5f5f5",padding:10,borderRadius:4},N.default.select({ios:{fontFamily:"Courier"},android:{fontFamily:"monospace"}})),code_block:Object.assign({borderWidth:1,borderColor:"#CCCCCC",backgroundColor:"#f5f5f5",padding:10,borderRadius:4},N.default.select({ios:{fontFamily:"Courier"},android:{fontFamily:"monospace"}})),fence:Object.assign({borderWidth:1,borderColor:"#CCCCCC",backgroundColor:"#f5f5f5",padding:10,borderRadius:4},N.default.select({ios:{fontFamily:"Courier"},android:{fontFamily:"monospace"}})),table:{borderWidth:1,borderColor:"#000000",borderRadius:3},thead:{},tbody:{},th:{flex:1,padding:5},tr:{borderBottomWidth:1,borderColor:"#000000",flexDirection:"row"},td:{flex:1,padding:5},link:{textDecorationLine:"underline"},blocklink:{flex:1,borderColor:"#000000",borderBottomWidth:1},image:{flex:1},text:{},textgroup:{},paragraph:{marginTop:10,marginBottom:10,flexWrap:"wrap",flexDirection:"row",alignItems:"flex-start",justifyContent:"flex-start",width:"100%"},hardbreak:{width:"100%",height:1},softbreak:{},pre:{},inline:{},span:{}},j=(e,t,n,r,a,o,s,l,u,c)=>{if(e&&t&&console.warn("react-native-markdown-display you are using renderer and rules at the same time. This is not possible, props.rules is ignored"),e&&n&&console.warn("react-native-markdown-display you are using renderer and style at the same time. This is not possible, props.style is ignored"),e){if("function"!==typeof e||e instanceof P)return e;throw new Error("Provided renderer is not compatible with function or AstRenderer. please change")}{let e=((e,t)=>{let n={};return!0===e&&null!==t?(Object.keys(t).forEach((e=>{n[e]=Object.assign({},i.default.flatten(t[e]))})),Object.keys(B).forEach((e=>{n[e]=Object.assign({},B[e],i.default.flatten(t[e]))}))):(n=Object.assign({},B),null!==t&&Object.keys(t).forEach((e=>{n[e]=Object.assign({},i.default.flatten(t[e]))}))),Object.keys(n).forEach((e=>{n["_VIEW_SAFE_"+e]=L(n[e])})),i.default.create(n)})(r,n);return new P(Object.assign({},D,t||{}),e,a,o,s,l,u,c)}},V=r.memo((({children:e,renderer:t=null,rules:n=null,style:i=null,mergeStyle:o=!0,markdownit:s=R()({typographer:!0}),onLinkPress:l,maxTopLevelChildren:u=null,topLevelMaxExceededItem:c=(0,C.jsx)(a.default,{children:"..."},"dotdotdot"),allowedImageHandlers:d=["data:image/png;base64","data:image/gif;base64","data:image/jpeg;base64","https://","http://"],defaultImageHandler:h="https://",debugPrintTree:f=!1})=>{const p=(0,r.useMemo)((()=>j(t,n,i,o,l,u,c,d,h,f)),[u,l,t,n,i,o,c,d,h,f]),m=(0,r.useMemo)((()=>s),[s]);return b(e,p.render,m)}));V.propTypes={children:s().oneOfType([s().node,s().array]).isRequired,renderer:s().oneOfType([s().func,s().instanceOf(P)]),onLinkPress:s().func,maxTopLevelChildren:s().number,topLevelMaxExceededItem:s().any,rules:(e,t,n)=>{let r=[];const a=e[t];if(a)return"object"===typeof a&&(r=Object.keys(a).filter((e=>"function"!==typeof a[e]))),"object"!==typeof a?new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Must be of shape {[index:string]:function} `):r.length>0?new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. These props are not of type function \`${r.join(", ")}\` `):void 0},markdownit:s().instanceOf(R()),style:s().any,mergeStyle:s().bool,allowedImageHandlers:s().arrayOf(s().string),defaultImageHandler:s().string,debugPrintTree:s().bool};const z=V},63545:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ReactNativeModal:()=>yt,default:()=>_t});var r={};n.r(r),n.d(r,{bounce:()=>q,bounceIn:()=>te,bounceInDown:()=>re,bounceInLeft:()=>ie,bounceInRight:()=>ae,bounceInUp:()=>ne,bounceOut:()=>oe,bounceOutDown:()=>le,bounceOutLeft:()=>ce,bounceOutRight:()=>ue,bounceOutUp:()=>se,fadeIn:()=>he,fadeInDown:()=>fe,fadeInDownBig:()=>ye,fadeInLeft:()=>me,fadeInLeftBig:()=>be,fadeInRight:()=>ge,fadeInRightBig:()=>ve,fadeInUp:()=>pe,fadeInUpBig:()=>_e,fadeOut:()=>Fe,fadeOutDown:()=>ke,fadeOutDownBig:()=>Ee,fadeOutLeft:()=>Ae,fadeOutLeftBig:()=>Te,fadeOutRight:()=>Se,fadeOutRightBig:()=>De,fadeOutUp:()=>xe,fadeOutUpBig:()=>Ce,flash:()=>$,flipInX:()=>Ie,flipInY:()=>Oe,flipOutX:()=>Pe,flipOutY:()=>Me,jello:()=>Y,lightSpeedIn:()=>Re,lightSpeedOut:()=>Le,pulse:()=>G,rotate:()=>X,rubberBand:()=>Z,shake:()=>K,slideInDown:()=>Be,slideInLeft:()=>Ve,slideInRight:()=>ze,slideInUp:()=>je,slideOutDown:()=>Ue,slideOutLeft:()=>qe,slideOutRight:()=>$e,slideOutUp:()=>We,swing:()=>J,tada:()=>Q,wobble:()=>ee,zoomIn:()=>Ge,zoomInDown:()=>Xe,zoomInLeft:()=>Je,zoomInRight:()=>Ze,zoomInUp:()=>Ke,zoomOut:()=>et,zoomOutDown:()=>tt,zoomOutLeft:()=>rt,zoomOutRight:()=>at,zoomOutUp:()=>nt});var a=n(98587),i=n(36665),o=n(15009),s=n(40668),l=n(26725),u=n(93816),c=n(44767),d=n(78264),h=n(60444),f=n(51950),p=n(73929),m=n(94075),g=n.n(m),y=n(6283),_=n(60193),b=n(95620);const v=["perspective","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","skewX","skewY","translateX","translateY"];function w(e){const t={};return Object.keys(e).forEach((n=>{-1!==v.indexOf(n)?(t.transform||(t.transform=[]),t.transform.push({[n]:e[n]})):t[n]=e[n]})),t}var F=n(75675);function k(e){const t=Object.assign({},F.default.flatten(e));return t.transform&&(t.transform.forEach((e=>{const n=Object.keys(e)[0];t[n]=e[n]})),delete t.transform),t}const x={Top:["Vertical",""],Bottom:["Vertical",""],Vertical:[""],Left:["Horizontal",""],Right:["Horizontal",""],Horizontal:[""]},A=Object.keys(x);function S(e,t){const n={},r=k(t);return("string"===typeof e?[e]:e).forEach((e=>{n[e]=e in r?r[e]:function(e,t){if("backgroundColor"===e)return"rgba(0,0,0,0)";if("color"===e||-1!==e.indexOf("Color"))return"rgba(0,0,0,1)";if(0===e.indexOf("rotate")||0===e.indexOf("skew"))return"0deg";if("opacity"===e||0===e.indexOf("scale"))return 1;if("fontSize"===e)return 14;if(0===e.indexOf("margin")||0===e.indexOf("padding"))for(let n,r=0;r1?null:t}const D={};function I(e){const t=JSON.stringify(e);if(D[t])return D[t];const n=Object.keys(e).map(T).filter(C);if(n.sort(E),n.length<2)throw new Error("Animation definitions must have at least two values.");const r={};e.easing&&(r.easing=e.easing),e.style&&(r.style=e.style);for(let a=0;a{e in r||(r[e]={inputRange:[],outputRange:[]}),r[e].inputRange.push(t),r[e].outputRange.push(i[e])}))}return D[t]=r,r}const O={};function P(e,t){O[e]=t}function M(e){Object.keys(e).forEach((t=>{P(t,I(e[t]))}))}const R={linear:b.default.linear,ease:b.default.bezier(.25,.1,.25,1),"ease-in":b.default.bezier(.42,0,1,1),"ease-out":b.default.bezier(0,0,.58,1),"ease-in-out":b.default.bezier(.42,0,.58,1),"ease-in-cubic":b.default.bezier(.55,.055,.675,.19),"ease-out-cubic":b.default.bezier(.215,.61,.355,1),"ease-in-out-cubic":b.default.bezier(.645,.045,.355,1),"ease-in-circ":b.default.bezier(.6,.04,.98,.335),"ease-out-circ":b.default.bezier(.075,.82,.165,1),"ease-in-out-circ":b.default.bezier(.785,.135,.15,.86),"ease-in-expo":b.default.bezier(.95,.05,.795,.035),"ease-out-expo":b.default.bezier(.19,1,.22,1),"ease-in-out-expo":b.default.bezier(1,0,0,1),"ease-in-quad":b.default.bezier(.55,.085,.68,.53),"ease-out-quad":b.default.bezier(.25,.46,.45,.94),"ease-in-out-quad":b.default.bezier(.455,.03,.515,.955),"ease-in-quart":b.default.bezier(.895,.03,.685,.22),"ease-out-quart":b.default.bezier(.165,.84,.44,1),"ease-in-out-quart":b.default.bezier(.77,0,.175,1),"ease-in-quint":b.default.bezier(.755,.05,.855,.06),"ease-out-quint":b.default.bezier(.23,1,.32,1),"ease-in-out-quint":b.default.bezier(.86,0,.07,1),"ease-in-sine":b.default.bezier(.47,0,.745,.715),"ease-out-sine":b.default.bezier(.39,.575,.565,1),"ease-in-out-sine":b.default.bezier(.445,.05,.55,.95),"ease-in-back":b.default.bezier(.6,-.28,.735,.045),"ease-out-back":b.default.bezier(.175,.885,.32,1.275),"ease-in-out-back":b.default.bezier(.68,-.55,.265,1.55)};var L=n(60397);const N=["rotate","rotateX","rotateY","rotateZ","skewX","skewY","transformMatrix","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","shadowColor","color","textDecorationColor","tintColor"],B=["width","height"];function j(e,t){switch(t){case"reverse":return 0;case"alternate":return e%2?0:1;case"alternate-reverse":return e%2?1:0;default:return 1}}function V(e,t){return j(e,t)?0:1}function z(e){if("string"===typeof e){const t=O[e];if(!t)throw new Error(`No animation registred by the name of ${e}`);return t}return I(e)}function H(e,t){const n={};return Object.keys(e).forEach((r=>{"style"===r?Object.assign(n,e.style):"easing"!==r&&(n[r]=t.interpolate(e[r]))})),w(n)}function U(e,t,n,r,a,i=!1,s,l,u){const c=r||a||s?o.default.timing(t,{toValue:n,delay:s,duration:r||1e3,easing:"function"===typeof a?a:R[a||"ease"],useNativeDriver:i}):o.default.spring(t,{toValue:n,useNativeDriver:i});setTimeout((()=>l(e)),s),c.start((()=>u(e)))}function W(e){const t=e.displayName||e.name||"Component",n=o.default.createAnimatedComponent(e);return class extends i.Component{static displayName=`withAnimatable(${t})`;static propTypes={animation:g().oneOfType([g().string,g().object]),duration:g().number,direction:g().oneOf(["normal","reverse","alternate","alternate-reverse"]),delay:g().number,easing:g().oneOfType([g().oneOf(Object.keys(R)),g().func]),iterationCount(e,t){const n=e[t];return"infinite"===n||"number"===typeof n&&n>=1?null:new Error('iterationCount must be a positive number or "infinite"')},iterationDelay:g().number,onAnimationBegin:g().func,onAnimationEnd:g().func,onTransitionBegin:g().func,onTransitionEnd:g().func,style:g().oneOfType([g().number,g().array,g().object]),transition:g().oneOfType([g().string,g().arrayOf(g().string)]),useNativeDriver:g().bool};static defaultProps={animation:void 0,delay:0,direction:"normal",duration:void 0,easing:void 0,iterationCount:1,iterationDelay:0,onAnimationBegin(){},onAnimationEnd(){},onTransitionBegin(){},onTransitionEnd(){},style:void 0,transition:void 0,useNativeDriver:!1};constructor(e){super(e);const t=new o.default.Value(V(0,this.props.direction));let n={},r={};e.animation&&(r=z(e.animation),n=H(r,t)),this.state={animationValue:t,animationStyle:n,compiledAnimation:r,transitionStyle:{},transitionValues:{},currentTransitionValues:{}},e.transition&&(this.state=Object.assign({},this.state,this.initializeTransitionState(e.transition))),this.delayTimer=null,Object.keys(O).forEach((e=>{e in this||(this[e]=this.animate.bind(this,e))}))}initializeTransitionState(e){const t={},n={},r=S(e,this.props.style);return Object.keys(r).forEach((e=>{const a=r[e];if(-1!==N.indexOf(e)||"number"!==typeof a)t[e]=new o.default.Value(0),n[e]=a;else{const r=new o.default.Value(a);t[e]=r,n[e]=r}})),{currentTransitionValues:r,transitionStyle:n,transitionValues:t}}getTransitionState(e){const t="string"===typeof e?[e]:e;let{transitionValues:n,currentTransitionValues:r,transitionStyle:a}=this.state;const i=t.filter((e=>!this.state.transitionValues[e]));if(i.length){const e=this.initializeTransitionState(i);n=Object.assign({},n,e.transitionValues),r=Object.assign({},r,e.currentTransitionValues),a=Object.assign({},a,e.transitionStyle)}return{transitionValues:n,currentTransitionValues:r,transitionStyle:a}}ref=null;handleRef=e=>{this.ref=e};setNativeProps(e){this.ref&&this.ref.setNativeProps(e)}componentDidMount(){const{animation:e,duration:t,delay:n,onAnimationBegin:r,iterationDelay:a}=this.props;if(e){const e=()=>{r(),this.startAnimation(t,0,a,(e=>this.props.onAnimationEnd(e))),this.delayTimer=null};n?this.delayTimer=setTimeout(e,n):e()}}UNSAFE_componentWillReceiveProps(e){const{animation:t,delay:n,duration:r,easing:a,iterationDelay:i,transition:o,onAnimationBegin:s}=e;if(o){const t=S(o,e.style);this.transitionTo(t,r,a,n)}else l=t,u=this.props.animation,l!==u&&JSON.stringify(l)!==JSON.stringify(u)&&(t?this.delayTimer?this.setAnimation(t):(s(),this.animate(t,r,i).then((e=>this.props.onAnimationEnd(e)))):this.stopAnimation());var l,u}componentWillUnmount(){this.delayTimer&&clearTimeout(this.delayTimer)}setAnimation(e,t){const n=z(e);this.setState((e=>({animationStyle:H(n,e.animationValue),compiledAnimation:n})),t)}animate(e,t,n){return new Promise((r=>{this.setAnimation(e,(()=>{this.startAnimation(t,0,n,r)}))}))}stopAnimation(){this.setState({scheduledAnimation:!1,animationStyle:{}}),this.state.animationValue.stopAnimation(),this.delayTimer&&(clearTimeout(this.delayTimer),this.delayTimer=null)}startAnimation(e,t,n,r){const{animationValue:a,compiledAnimation:i}=this.state,{direction:s,iterationCount:l,useNativeDriver:u}=this.props;let c=this.props.easing||i.easing||"ease",d=t||0;const h=V(d,s),f=j(d,s);a.setValue(h),"string"===typeof c&&(c=R[c]);("reverse"===s||"alternate"===s&&!f||"alternate-reverse"===s&&!f)&&(c=b.default.out(c));const p={toValue:f,easing:c,isInteraction:l<=1,duration:e||this.props.duration||1e3,useNativeDriver:u,delay:n||0};o.default.timing(a,p).start((t=>{d+=1,t.finished&&this.props.animation&&("infinite"===l||d{const t=a[e],n=i[e];let r=l[e];r||(r=new o.default.Value(0));const s=-1!==N.indexOf(e)||"number"!==typeof value,d=-1!==B.indexOf(e);s?(r.setValue(0),c[e]=r.interpolate({inputRange:[0,1],outputRange:[t,n]}),u[e]=n,i[e]=1):(d?(c[e]=r.interpolate({inputRange:[0,1],outputRange:[0,1],extrapolateLeft:"clamp"}),u[e]=n):c[e]=r,r.setValue(t))})),this.setState({transitionValues:l,transitionStyle:c,currentTransitionValues:u},(()=>{this.transitionToValues(i,n||this.props.duration,r,this.props.delay)}))}transitionTo(e,t,n,r){const{currentTransitionValues:a}=this.state,i=k(e),o={from:{},to:{}};Object.keys(i).forEach((e=>{const s=i[e],l=-1!==N.indexOf(e)||"number"!==typeof value,u=-1!==B.indexOf(e),c=this.state.transitionStyle[e],d=this.state.transitionValues[e];if(l||u||!c||c!==d){let t=a[e];if("undefined"===typeof t&&this.props.style){t=S(e,this.props.style)[e]}o.from[e]=t,o.to[e]=s}else U(e,d,s,t,n,this.props.useNativeDriver,r,(e=>this.props.onTransitionBegin(e)),(e=>this.props.onTransitionEnd(e)))})),Object.keys(o.from).length&&this.transition(o.from,o.to,t,n)}transitionToValues(e,t,n,r){Object.keys(e).forEach((a=>{U(a,this.state.transitionValues[a],e[a],t,n,this.props.useNativeDriver,r,(e=>this.props.onTransitionBegin(e)),(e=>this.props.onTransitionEnd(e)))}))}render(){const{style:e,animation:t,transition:r}=this.props;if(t&&r)throw new Error("You cannot combine animation and transition props");const a=function(e,t){const n={};return Object.keys(t).forEach((r=>{-1===e.indexOf(r)&&(n[r]=t[r])})),n}(["animation","duration","direction","delay","easing","iterationCount","iterationDelay","onAnimationBegin","onAnimationEnd","onTransitionBegin","onTransitionEnd","style","transition","useNativeDriver"],this.props);return(0,L.jsx)(n,Object.assign({ref:this.handleRef,style:[e,this.state.animationStyle,w(this.state.transitionStyle)]},a))}}}const q={0:{translateY:0},.2:{translateY:0},.4:{translateY:-30},.43:{translateY:-30},.53:{translateY:0},.7:{translateY:-15},.8:{translateY:0},.9:{translateY:-4},1:{translateY:0}},$={0:{opacity:1},.25:{opacity:0},.5:{opacity:1},.75:{opacity:0},1:{opacity:1}},Y={0:{skewX:"0deg",skewY:"0deg"},.111:{skewX:"0deg",skewY:"0deg"},.222:{skewX:"-12.5deg",skewY:"-12.5deg"},.333:{skewX:"6.25deg",skewY:"6.25deg"},.444:{skewX:"-3.125deg",skewY:"-3.125deg"},.555:{skewX:"1.5625deg",skewY:"1.5625deg"},.666:{skewX:"-0.78125deg",skewY:"-0.78125deg"},.777:{skewX:"0.390625deg",skewY:"0.390625deg"},.888:{skewX:"-0.1953125deg",skewY:"-0.1953125deg"},1:{skewX:"0deg",skewY:"0deg"}},G={0:{scale:1},.5:{scale:1.05},1:{scale:1}},X={0:{rotate:"0deg"},.25:{rotate:"90deg"},.5:{rotate:"180deg"},.75:{rotate:"270deg"},1:{rotate:"360deg"}},K={0:{translateX:0},.1:{translateX:-10},.2:{translateX:10},.3:{translateX:-10},.4:{translateX:10},.5:{translateX:-10},.6:{translateX:10},.7:{translateX:-10},.8:{translateX:10},.9:{translateX:-10},1:{translateX:0}},J={0:{rotate:"0deg"},.2:{rotate:"15deg"},.4:{rotate:"-10deg"},.6:{rotate:"5deg"},.8:{rotate:"-5deg"},1:{rotate:"0deg"}},Z={0:{scaleX:1,scaleY:1},.3:{scaleX:1.25,scaleY:.75},.4:{scaleX:.75,scaleY:1.25},.5:{scaleX:1.15,scaleY:.85},.65:{scaleX:.95,scaleY:1.05},.75:{scaleX:1.05,scaleY:.95},1:{scaleX:1,scaleY:1}},Q={0:{scale:1,rotate:"0deg"},.1:{scale:.9,rotate:"-3deg"},.2:{scale:.9,rotate:"-3deg"},.3:{scale:1.1,rotate:"-3deg"},.4:{rotate:"3deg"},.5:{rotate:"-3deg"},.6:{rotate:"3deg"},.7:{rotate:"-3deg"},.8:{rotate:"3deg"},.9:{scale:1.1,rotate:"3deg"},1:{scale:1,rotate:"0deg"}},ee={0:{translateX:0,rotate:"0deg"},.15:{translateX:-25,rotate:"-5deg"},.3:{translateX:20,rotate:"3deg"},.45:{translateX:-15,rotate:"-3deg"},.6:{translateX:10,rotate:"2deg"},.75:{translateX:-5,rotate:"-1deg"},1:{translateX:0,rotate:"0deg"}},te={0:{opacity:0,scale:.3},.2:{scale:1.1},.4:{scale:.9},.6:{opacity:1,scale:1.03},.8:{scale:.97},1:{opacity:1,scale:1}},ne={0:{opacity:0,translateY:800},.6:{opacity:1,translateY:-25},.75:{translateY:10},.9:{translateY:-5},1:{translateY:0}},re={0:{opacity:0,translateY:-800},.6:{opacity:1,translateY:25},.75:{translateY:-10},.9:{translateY:5},1:{translateY:0}},ae={0:{opacity:0,translateX:600},.6:{opacity:1,translateX:-20},.75:{translateX:8},.9:{translateX:-4},1:{translateX:0}},ie={0:{opacity:0,translateX:-600},.6:{opacity:1,translateX:20},.75:{translateX:-8},.9:{translateX:4},1:{translateX:0}},oe={0:{opacity:1,scale:1},.2:{scale:.9},.5:{opacity:1,scale:1.11},.55:{scale:1.11},1:{opacity:0,scale:.3}},se={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:-10},.4:{translateY:20},.45:{translateY:20},.55:{opacity:1},1:{opacity:0,translateY:-800}},le={0:{opacity:1,translateY:0},.2:{opacity:1,translateY:10},.4:{translateY:-20},.45:{translateY:-20},.55:{opacity:1},1:{opacity:0,translateY:800}},ue={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:10},.4:{translateX:-20},.45:{translateX:-20},.55:{opacity:1},1:{opacity:0,translateX:600}},ce={0:{opacity:1,translateX:0},.2:{opacity:1,translateX:-10},.4:{translateX:20},.45:{translateX:20},.55:{opacity:1},1:{opacity:0,translateX:-600}};function de(e,t){return{from:{opacity:0,[e]:t},to:{opacity:1,[e]:0}}}const he={from:{opacity:0},to:{opacity:1}},fe=de("translateY",-100),pe=de("translateY",100),me=de("translateX",-100),ge=de("translateX",100),ye=de("translateY",-500),_e=de("translateY",500),be=de("translateX",-500),ve=de("translateX",500);function we(e,t){return{from:{opacity:1,[e]:0},to:{opacity:0,[e]:t}}}const Fe={from:{opacity:1},to:{opacity:0}},ke=we("translateY",100),xe=we("translateY",-100),Ae=we("translateX",-100),Se=we("translateX",100),Ee=we("translateY",500),Ce=we("translateY",-500),Te=we("translateX",-500),De=we("translateX",500),Ie={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateX:"90deg"},.4:{rotateX:"-20deg"},.6:{opacity:1,rotateX:"10deg"},.8:{rotateX:"-5deg"},1:{opacity:1,rotateX:"0deg"}},Oe={easing:"ease-in",style:{backfaceVisibility:"visible",perspective:400},0:{opacity:0,rotateY:"90deg"},.4:{rotateY:"-20deg"},.6:{opacity:1,rotateY:"10deg"},.8:{rotateY:"-5deg"},1:{opacity:1,rotateY:"0deg"}},Pe={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateX:"0deg"},.3:{opacity:1,rotateX:"-20deg"},1:{opacity:0,rotateX:"90deg"}},Me={style:{backfaceVisibility:"visible",perspective:400},0:{opacity:1,rotateY:"0deg"},.3:{opacity:1,rotateY:"-20deg"},1:{opacity:0,rotateY:"90deg"}},Re={easing:"ease-out",0:{opacity:0,translateX:200,skewX:"-30deg"},.6:{opacity:1,translateX:0,skewX:"20deg"},.8:{skewX:"-5deg"},1:{opacity:1,translateX:0,skewX:"0deg"}},Le={easing:"ease-in",0:{opacity:1,translateX:0,skewX:"0deg"},1:{opacity:0,translateX:200,skewX:"30deg"}};function Ne(e,t){return{from:{[e]:t},to:{[e]:0}}}const Be=Ne("translateY",-100),je=Ne("translateY",100),Ve=Ne("translateX",-100),ze=Ne("translateX",100);function He(e,t){return{from:{[e]:0},to:{[e]:t}}}const Ue=He("translateY",100),We=He("translateY",-100),qe=He("translateX",-100),$e=He("translateX",100);function Ye(e,t){const n=Math.min(1,Math.max(-1,t));return{easing:b.default.bezier(.175,.885,.32,1),0:{opacity:0,scale:.1,[e]:-1e3*n},.6:{opacity:1,scale:.457,[e]:t},1:{scale:1,[e]:0}}}const Ge={from:{opacity:0,scale:.3},.5:{opacity:1},to:{opacity:1,scale:1}},Xe=Ye("translateY",60),Ke=Ye("translateY",-60),Je=Ye("translateX",10),Ze=Ye("translateX",-10);function Qe(e,t){const n=Math.min(1,Math.max(-1,t));return{easing:b.default.bezier(.175,.885,.32,1),0:{opacity:1,scale:1,[e]:0},.4:{opacity:1,scale:.457,[e]:t},1:{opacity:0,scale:.1,[e]:-1e3*n}}}const et={from:{opacity:1,scale:1},.5:{opacity:1,scale:.3},to:{opacity:0,scale:0}},tt=Qe("translateY",60),nt=Qe("translateY",-60),rt=Qe("translateX",10),at=Qe("translateX",-10);M(r);const it=W(p.default),{height:ot,width:st}=(W(y.default),W(_.default),l.default.get("window")),lt=(e,t,n)=>({from:{[e]:t},to:{[e]:n}}),ut=({animationIn:e,animationOut:t})=>{let n,r;if(ht(e)){const t=JSON.stringify(e);dt(t,e),n=t}else n=e;if(ht(t)){const e=JSON.stringify(t);dt(e,t),r=e}else r=t;return{animationIn:n,animationOut:r}},ct=e=>-(e-1),dt=(e,t)=>{P(e,I(t))},ht=e=>null!==e&&"object"===typeof e,ft=F.default.create({backdrop:{position:"absolute",top:0,bottom:0,left:0,right:0,opacity:0,backgroundColor:"black"},content:{flex:1,justifyContent:"center"},containerBox:{zIndex:2,opacity:1,backgroundColor:"transparent"}}),pt=["animationIn","animationInTiming","animationOut","animationOutTiming","avoidKeyboard","coverScreen","hasBackdrop","backdropColor","backdropOpacity","backdropTransitionInTiming","backdropTransitionOutTiming","customBackdrop","children","isVisible","onModalShow","onBackButtonPress","useNativeDriver","propagateSwipe","style"],mt=["testID"];M({slideInDown:lt("translateY",-ot,0),slideInUp:lt("translateY",ot,0),slideInLeft:lt("translateX",-st,0),slideInRight:lt("translateX",st,0),slideOutDown:lt("translateY",0,ot),slideOutUp:lt("translateY",0,-ot),slideOutLeft:lt("translateX",0,-st),slideOutRight:lt("translateX",0,st)});const gt=e=>({animationIn:e.animationIn,animationOut:e.animationOut});class yt extends i.Component{constructor(e){super(e),this.state={showContent:!0,isVisible:!1,deviceWidth:l.default.get("window").width,deviceHeight:l.default.get("window").height,isSwipeable:!!this.props.swipeDirection,pan:null},this.isTransitioning=!1,this.inSwipeClosingState=!1,this.currentSwipingDirection=null,this.panResponder=null,this.didUpdateDimensionsEmitter=null,this.interactionHandle=null,this.getDeviceHeight=()=>this.props.deviceHeight||this.state.deviceHeight,this.getDeviceWidth=()=>this.props.deviceWidth||this.state.deviceWidth,this.onBackButtonPress=()=>!(!this.props.onBackButtonPress||!this.props.isVisible)&&(this.props.onBackButtonPress(),!0),this.shouldPropagateSwipe=(e,t)=>"function"===typeof this.props.propagateSwipe?this.props.propagateSwipe(e,t):this.props.propagateSwipe,this.buildPanResponder=()=>{let e=null;this.panResponder=h.default.create({onMoveShouldSetPanResponder:(t,n)=>{if(!this.shouldPropagateSwipe(t,n)){const t=Math.abs(n.dx)>=this.props.panResponderThreshold||Math.abs(n.dy)>=this.props.panResponderThreshold;return t&&this.props.onSwipeStart&&this.props.onSwipeStart(n),this.currentSwipingDirection=this.getSwipingDirection(n),e=this.createAnimationEventForSwipe(),t}return!1},onStartShouldSetPanResponder:(e,t)=>!(e._dispatchInstances&&e._dispatchInstances.some((e=>/scrollview|flatlist/i.test(e.type)))&&this.shouldPropagateSwipe(e,t)&&this.props.scrollTo&&this.props.scrollOffset>0)&&(this.props.onSwipeStart&&this.props.onSwipeStart(t),this.currentSwipingDirection=null,!0),onPanResponderMove:(t,n)=>{if(!this.currentSwipingDirection){if(0===n.dx&&0===n.dy)return;this.currentSwipingDirection=this.getSwipingDirection(n),e=this.createAnimationEventForSwipe()}if(this.isSwipeDirectionAllowed(n)){const r=1-this.calcDistancePercentage(n);this.backdropRef&&this.backdropRef.transitionTo({opacity:this.props.backdropOpacity*r}),e(t,n),this.props.onSwipeMove&&this.props.onSwipeMove(r,n)}else if(this.props.scrollTo)if(this.props.scrollHorizontal){let e=-n.dx;e>this.props.scrollOffsetMax&&(e-=(e-this.props.scrollOffsetMax)/2),this.props.scrollTo({x:e,animated:!1})}else{let e=-n.dy;e>this.props.scrollOffsetMax&&(e-=(e-this.props.scrollOffsetMax)/2),this.props.scrollTo({y:e,animated:!1})}},onPanResponderRelease:(e,t)=>{if(this.getAccDistancePerDirection(t)>this.props.swipeThreshold&&this.isSwipeDirectionAllowed(t)){if(this.props.onSwipeComplete)return this.inSwipeClosingState=!0,void this.props.onSwipeComplete({swipingDirection:this.getSwipingDirection(t)},t);if(this.props.onSwipe)return this.inSwipeClosingState=!0,void this.props.onSwipe()}this.props.onSwipeCancel&&this.props.onSwipeCancel(t),this.backdropRef&&this.backdropRef.transitionTo({opacity:this.props.backdropOpacity}),o.default.spring(this.state.pan,{toValue:{x:0,y:0},bounciness:0,useNativeDriver:!1}).start(),this.props.scrollTo&&this.props.scrollOffset>this.props.scrollOffsetMax&&this.props.scrollTo({y:this.props.scrollOffsetMax,animated:!0})}})},this.getAccDistancePerDirection=e=>{switch(this.currentSwipingDirection){case"up":return-e.dy;case"down":return e.dy;case"right":return e.dx;case"left":return-e.dx;default:return 0}},this.getSwipingDirection=e=>Math.abs(e.dx)>Math.abs(e.dy)?e.dx>0?"right":"left":e.dy>0?"down":"up",this.calcDistancePercentage=e=>{switch(this.currentSwipingDirection){case"down":return(e.moveY-e.y0)/((this.props.deviceHeight||this.state.deviceHeight)-e.y0);case"up":return ct(e.moveY/e.y0);case"left":return ct(e.moveX/e.x0);case"right":return(e.moveX-e.x0)/((this.props.deviceWidth||this.state.deviceWidth)-e.x0);default:return 0}},this.createAnimationEventForSwipe=()=>"right"===this.currentSwipingDirection||"left"===this.currentSwipingDirection?o.default.event([null,{dx:this.state.pan.x}],{useNativeDriver:!1}):o.default.event([null,{dy:this.state.pan.y}],{useNativeDriver:!1}),this.isDirectionIncluded=e=>Array.isArray(this.props.swipeDirection)?this.props.swipeDirection.includes(e):this.props.swipeDirection===e,this.isSwipeDirectionAllowed=({dy:e,dx:t})=>{const n=e>0,r=e<0,a=t<0,i=t>0;return!("up"!==this.currentSwipingDirection||!this.isDirectionIncluded("up")||!r)||(!("down"!==this.currentSwipingDirection||!this.isDirectionIncluded("down")||!n)||(!("right"!==this.currentSwipingDirection||!this.isDirectionIncluded("right")||!i)||!("left"!==this.currentSwipingDirection||!this.isDirectionIncluded("left")||!a)))},this.handleDimensionsUpdate=()=>{if(!this.props.deviceHeight&&!this.props.deviceWidth){const e=l.default.get("window").width,t=l.default.get("window").height;e===this.state.deviceWidth&&t===this.state.deviceHeight||this.setState({deviceWidth:e,deviceHeight:t})}},this.open=()=>{this.isTransitioning||(this.isTransitioning=!0,this.backdropRef&&this.backdropRef.transitionTo({opacity:this.props.backdropOpacity},this.props.backdropTransitionInTiming),this.state.isSwipeable&&this.state.pan.setValue({x:0,y:0}),this.contentRef&&(this.props.onModalWillShow&&this.props.onModalWillShow(),null==this.interactionHandle&&(this.interactionHandle=u.default.createInteractionHandle()),this.contentRef.animate(this.animationIn,this.props.animationInTiming).then((()=>{this.isTransitioning=!1,this.interactionHandle&&(u.default.clearInteractionHandle(this.interactionHandle),this.interactionHandle=null),this.props.isVisible?this.props.onModalShow():this.close()}))))},this.close=()=>{if(this.isTransitioning)return;this.isTransitioning=!0,this.backdropRef&&this.backdropRef.transitionTo({opacity:0},this.props.backdropTransitionOutTiming);let e=this.animationOut;this.inSwipeClosingState&&(this.inSwipeClosingState=!1,"up"===this.currentSwipingDirection?e="slideOutUp":"down"===this.currentSwipingDirection?e="slideOutDown":"right"===this.currentSwipingDirection?e="slideOutRight":"left"===this.currentSwipingDirection&&(e="slideOutLeft")),this.contentRef&&(this.props.onModalWillHide&&this.props.onModalWillHide(),null==this.interactionHandle&&(this.interactionHandle=u.default.createInteractionHandle()),this.contentRef.animate(e,this.props.animationOutTiming).then((()=>{this.isTransitioning=!1,this.interactionHandle&&(u.default.clearInteractionHandle(this.interactionHandle),this.interactionHandle=null),this.props.isVisible?this.open():this.setState({showContent:!1},(()=>{this.setState({isVisible:!1},(()=>{this.props.onModalHide()}))}))})))},this.makeBackdrop=()=>{if(!this.props.hasBackdrop)return null;this.props.customBackdrop&&!i.isValidElement(this.props.customBackdrop)&&console.warn("Invalid customBackdrop element passed to Modal. You must provide a valid React element.");const{customBackdrop:e,backdropColor:t,useNativeDriver:n,useNativeDriverForBackdrop:r,onBackdropPress:a}=this.props,o=!!this.props.customBackdrop,s=[{width:this.getDeviceWidth(),height:this.getDeviceHeight(),backgroundColor:this.state.showContent&&!o?t:"transparent"}],l=i.createElement(it,{ref:e=>this.backdropRef=e,useNativeDriver:void 0!==r?r:n,style:[ft.backdrop,s]},o&&e);return o?l:i.createElement(f.default,{onPress:a},l)};const{animationIn:t,animationOut:n}=ut(gt(e));this.animationIn=t,this.animationOut=n,this.state.isSwipeable&&(this.state=Object.assign({},this.state,{pan:new o.default.ValueXY}),this.buildPanResponder()),e.isVisible&&(this.state=Object.assign({},this.state,{isVisible:!0,showContent:!0}))}static getDerivedStateFromProps(e,t){return!t.isVisible&&e.isVisible?{isVisible:!0,showContent:!0}:null}componentDidMount(){this.props.onSwipe&&console.warn('`` is deprecated and will be removed starting from 13.0.0. Use `` instead.'),this.didUpdateDimensionsEmitter=s.default.addListener("didUpdateDimensions",this.handleDimensionsUpdate),this.state.isVisible&&this.open()}componentWillUnmount(){this.didUpdateDimensionsEmitter&&this.didUpdateDimensionsEmitter.remove(),this.interactionHandle&&(u.default.clearInteractionHandle(this.interactionHandle),this.interactionHandle=null)}componentDidUpdate(e){if(this.props.animationIn!==e.animationIn||this.props.animationOut!==e.animationOut){const{animationIn:e,animationOut:t}=ut(gt(this.props));this.animationIn=e,this.animationOut=t}this.props.backdropOpacity!==e.backdropOpacity&&this.backdropRef&&this.backdropRef.transitionTo({opacity:this.props.backdropOpacity},this.props.backdropTransitionInTiming),this.props.isVisible&&!e.isVisible?this.open():!this.props.isVisible&&e.isVisible&&this.close()}render(){const e=this.props,{avoidKeyboard:t,coverScreen:n,children:r,onBackButtonPress:o,useNativeDriver:s,style:l}=e,u=(0,a.default)(e,pt),h=(0,a.default)(u,mt),f=[{margin:.05*this.getDeviceWidth(),transform:[{translateY:0}]},ft.content,l];let m={},g={};this.state.isSwipeable&&(m=Object.assign({},this.panResponder.panHandlers),g=s?{transform:this.state.pan.getTranslateTransform()}:this.state.pan.getLayout());const y=this.props.hideModalContentWhileAnimating&&this.props.useNativeDriver&&!this.state.showContent?i.createElement(it,null):r,_=i.createElement(it,Object.assign({},m,{ref:e=>this.contentRef=e,style:[g,f],pointerEvents:"box-none",useNativeDriver:s},h),y);return!n&&this.state.isVisible?i.createElement(p.default,{pointerEvents:"box-none",style:[ft.backdrop,ft.containerBox]},this.makeBackdrop(),_):i.createElement(d.default,Object.assign({transparent:!0,animationType:"none",visible:this.state.isVisible,onRequestClose:o},u),this.makeBackdrop(),t?i.createElement(c.default,{behavior:void 0,pointerEvents:"box-none",style:f.concat([{margin:0}])},_):_)}}yt.propTypes={animationIn:m.oneOfType([m.string,m.object]),animationInTiming:m.number,animationOut:m.oneOfType([m.string,m.object]),animationOutTiming:m.number,avoidKeyboard:m.bool,coverScreen:m.bool,hasBackdrop:m.bool,backdropColor:m.string,backdropOpacity:m.number,backdropTransitionInTiming:m.number,backdropTransitionOutTiming:m.number,customBackdrop:m.node,children:m.node.isRequired,deviceHeight:m.number,deviceWidth:m.number,isVisible:m.bool.isRequired,hideModalContentWhileAnimating:m.bool,propagateSwipe:m.oneOfType([m.bool,m.func]),onModalShow:m.func,onModalWillShow:m.func,onModalHide:m.func,onModalWillHide:m.func,onBackButtonPress:m.func,onBackdropPress:m.func,panResponderThreshold:m.number,onSwipeStart:m.func,onSwipeMove:m.func,onSwipeComplete:m.func,onSwipeCancel:m.func,swipeThreshold:m.number,swipeDirection:m.oneOfType([m.arrayOf(m.oneOf(["up","down","left","right"])),m.oneOf(["up","down","left","right"])]),useNativeDriver:m.bool,useNativeDriverForBackdrop:m.bool,style:m.any,scrollTo:m.func,scrollOffset:m.number,scrollOffsetMax:m.number,scrollHorizontal:m.bool,supportedOrientations:m.arrayOf(m.oneOf(["portrait","portrait-upside-down","landscape","landscape-left","landscape-right"]))},yt.defaultProps={animationIn:"slideInUp",animationInTiming:300,animationOut:"slideOutDown",animationOutTiming:300,avoidKeyboard:!1,coverScreen:!0,hasBackdrop:!0,backdropColor:"black",backdropOpacity:.7,backdropTransitionInTiming:300,backdropTransitionOutTiming:300,customBackdrop:null,useNativeDriver:!1,deviceHeight:null,deviceWidth:null,hideModalContentWhileAnimating:!1,propagateSwipe:!1,isVisible:!1,panResponderThreshold:4,swipeThreshold:100,onModalShow:()=>null,onModalWillShow:()=>null,onModalHide:()=>null,onModalWillHide:()=>null,onBackdropPress:()=>null,onBackButtonPress:()=>null,scrollTo:null,scrollOffset:0,scrollOffsetMax:0,scrollHorizontal:!1,statusBarTranslucent:!1,supportedOrientations:["portrait","landscape"]};const _t=yt},12686:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>f});var r=n(98587),a=n(36665),i=n(15009),o=n(95620),s=n(75675),l=n(73929),u=n(16204);const c=["animating","color","hidesWhenStopped","size","style","theme"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;let{animating:n=!0,color:s,hidesWhenStopped:f=!0,size:p="small",style:m,theme:g}=e,y=(0,r.default)(e,c);const _=(0,u.useInternalTheme)(g),{current:b}=a.useRef(new i.default.Value(0)),{current:v}=a.useRef(new i.default.Value(!n&&f?0:1)),w=a.useRef(void 0),{animation:{scale:F}}=_,k=a.useCallback((()=>{i.default.timing(v,{duration:200*F,toValue:1,isInteraction:!1,useNativeDriver:!0}).start(),w.current&&(b.setValue(0),i.default.loop(w.current).start())}),[F,v,b]),x=()=>{w.current&&w.current.stop()};a.useEffect((()=>{void 0===w.current&&(w.current=i.default.timing(b,{duration:2400,easing:o.default.linear,useNativeDriver:!1,toValue:1,isInteraction:!1})),n?k():f?i.default.timing(v,{duration:200*F,toValue:0,useNativeDriver:!0,isInteraction:!1}).start(x):x()}),[n,v,f,k,F,b]);const A=s||(null===(t=_.colors)||void 0===t?void 0:t.primary),S="string"===typeof p?"small"===p?24:48:p||24,E=144,C=o.default.bezier(.4,0,.7,1),T={width:S,height:S/2,overflow:"hidden"};return a.createElement(l.default,d({style:[h.container,m]},y,{accessible:!0,accessibilityRole:"progressbar",accessibilityState:{busy:n}}),a.createElement(i.default.View,{style:[{width:S,height:S,opacity:v}],collapsable:!1},[0,1].map((e=>{const t=Array.from(new Array(E),((e,t)=>t/143)),n=Array.from(new Array(E),((t,n)=>{let r=2*n/143;const a=e?345:-165;r>1&&(r=2-r);return`${150*(e?-1:1)*C(r)+a}deg`})),r={width:S,height:S,transform:[{rotate:b.interpolate({inputRange:[0,1],outputRange:["45deg","765deg"]})}]},o={width:S,height:S,transform:[{translateY:e?-S/2:0},{rotate:b.interpolate({inputRange:t,outputRange:n})}]},s=e?{top:S/2}:null,l={width:S,height:S,borderColor:A,borderWidth:S/10,borderRadius:S/2};return a.createElement(i.default.View,{key:e,style:[h.layer]},a.createElement(i.default.View,{style:r},a.createElement(i.default.View,{style:[T,s],collapsable:!1},a.createElement(i.default.View,{style:o},a.createElement(i.default.View,{style:T,collapsable:!1},a.createElement(i.default.View,{style:l}))))))}))))}},87329:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(98587),a=n(36665),i=n(15009),o=n(75675),s=n(40558),l=n(16204),u=n(85792),c=n(17993),d=n.n(c);const h=["children","size","style","theme","visible"],f=["backgroundColor"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;let{children:n,size:c=m,style:g,theme:_,visible:b=!0}=e,v=(0,r.default)(e,h);const w=(0,l.useInternalTheme)(_),{current:F}=a.useRef(new i.default.Value(b?1:0)),{fontScale:k}=(0,s.default)(),x=a.useRef(!0),{animation:{scale:A}}=w;a.useEffect((()=>{x.current?x.current=!1:i.default.timing(F,{toValue:b?1:0,duration:150*A,useNativeDriver:!0}).start()}),[b,F,A]);const S=o.default.flatten(g)||{},{backgroundColor:E=(w.isV3?w.colors.error:null===(t=w.colors)||void 0===t?void 0:t.notification)}=S,C=(0,r.default)(S,f),T=w.isV3?w.colors.onError:(D=E,I=u.white,O=u.black,"string"===typeof D&&d()(D).isLight()?O:I);var D,I,O;const P=c/2,M=w.isV3?3:4;return a.createElement(i.default.Text,p({numberOfLines:1,style:[Object.assign({opacity:F,backgroundColor:E,color:T,fontSize:.5*c},!w.isV3&&w.fonts.regular,{lineHeight:c/k,height:c,minWidth:c,borderRadius:P,paddingHorizontal:M}),y.container,C]},v),n)},y=o.default.create({container:{alignSelf:"flex-end",textAlign:"center",textAlignVertical:"center",overflow:"hidden"}})},47514:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(98587),a=n(36665),i=n(15009),o=n(75675),s=n(73929),l=n(17993),u=n.n(l),c=n(85792);const d=e=>{let{dark:t,backgroundColor:n}=e;return"boolean"===typeof t?t:"transparent"!==n&&("transparent"!==n&&!u()(n).isLight())},h=e=>{let{theme:t,mode:n,customButtonColor:r,customTextColor:a,disabled:i,dark:s}=e;const l=e=>n===e,h=(e=>{let{isMode:t,theme:n,disabled:r,customButtonColor:a}=e;if(a&&!r)return a;if(n.isV3){if(r)return t("outlined")||t("text")?"transparent":n.colors.surfaceDisabled;if(t("elevated"))return n.colors.elevation.level1;if(t("contained"))return n.colors.primary;if(t("contained-tonal"))return n.colors.secondaryContainer}return t("contained")?r?u()(n.dark?c.white:c.black).alpha(.12).rgb().string():n.colors.primary:"transparent"})({isMode:l,theme:t,disabled:i,customButtonColor:r}),f=(e=>{let{isMode:t,theme:n,disabled:r,customTextColor:a,backgroundColor:i,dark:o}=e;if(a&&!r)return a;if(n.isV3){if(r)return n.colors.onSurfaceDisabled;if("boolean"===typeof o&&(t("contained")||t("contained-tonal")||t("elevated")))return d({dark:o,backgroundColor:i})?c.white:c.black;if(t("outlined")||t("text")||t("elevated"))return n.colors.primary;if(t("contained"))return n.colors.onPrimary;if(t("contained-tonal"))return n.colors.onSecondaryContainer}return r?u()(n.dark?c.white:c.black).alpha(.32).rgb().string():t("contained")?d({dark:o,backgroundColor:i})?c.white:c.black:n.colors.primary})({isMode:l,theme:t,disabled:i,customTextColor:a,backgroundColor:h,dark:s}),p=(e=>{let{isMode:t,disabled:n,theme:r}=e;if(r.isV3){if(n&&t("outlined"))return r.colors.surfaceDisabled;if(t("outlined"))return r.colors.outline}return t("outlined")?u()(r.dark?c.white:c.black).alpha(.29).rgb().string():"transparent"})({isMode:l,theme:t,disabled:i}),m=(e=>{let{isMode:t,theme:n}=e;return n.isV3&&t("outlined")?1:t("outlined")?o.default.hairlineWidth:0})({isMode:l,theme:t});return{backgroundColor:h,borderColor:p,textColor:f,borderWidth:m}};var f=n(16204),p=n(66255),m=n(23248),g=n(36979),y=n(12686),_=n(28983),b=n(6667),v=n(53116),w=n(18885);const F=["disabled","compact","mode","dark","loading","icon","buttonColor","textColor","rippleColor","children","accessibilityLabel","accessibilityHint","accessibilityRole","onPress","onPressIn","onPressOut","onLongPress","delayLongPress","style","theme","uppercase","contentStyle","labelStyle","testID","accessible","background","maxFontSizeMultiplier","touchableRef"];function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n;let{disabled:l,compact:c,mode:d="text",dark:p,loading:A,icon:S,buttonColor:E,textColor:C,rippleColor:T,children:D,accessibilityLabel:I,accessibilityHint:O,accessibilityRole:P="button",onPress:M,onPressIn:R,onPressOut:L,onLongPress:N,delayLongPress:B,style:j,theme:V,uppercase:z,contentStyle:H,labelStyle:U,testID:W="button",accessible:q,background:$,maxFontSizeMultiplier:Y,touchableRef:G}=e,X=(0,r.default)(e,F);const K=(0,f.useInternalTheme)(V),J=a.useCallback((e=>d===e),[d]),{roundness:Z,isV3:Q,animation:ee}=K,te=z??!K.isV3,ne=(0,m.default)({onPress:M,onPressIn:R,onPressOut:L,onLongPress:N}),re=!l&&J(Q?"elevated":"contained"),ae=Q?1:2,ie=Q?2:8,{current:oe}=a.useRef(new i.default.Value(re?ae:0));a.useEffect((()=>{i.default.timing(oe,{toValue:re?ae:0,duration:0,useNativeDriver:!0})}),[re,oe,ae]);const se=o.default.flatten(j)||{},[,le]=(0,g.splitStyles)(se,(e=>e.startsWith("border")&&e.endsWith("Radius"))),ue=(Q?5:1)*Z,ce=Q?18:16,{backgroundColor:de,borderColor:he,textColor:fe,borderWidth:pe}=h({customButtonColor:E,customTextColor:C,theme:K,mode:d,disabled:l,dark:p}),me=T||u()(fe).alpha(.12).rgb().string(),ge=Object.assign({},le,{borderRadius:le.borderRadius??ue}),ye=Object.assign({backgroundColor:de,borderColor:he,borderWidth:pe},ge),{color:_e,fontSize:be}=o.default.flatten(U)||{},ve=Q?K.fonts.labelLarge:K.fonts.medium,we=Object.assign({color:fe},ve),Fe="row-reverse"===(null===(n=o.default.flatten(H))||void 0===n?void 0:n.flexDirection)?[x.iconReverse,Q&&x["md3IconReverse"+(c?"Compact":"")],Q&&J("text")&&x["md3IconReverseTextMode"+(c?"Compact":"")]]:[x.icon,Q&&x["md3Icon"+(c?"Compact":"")],Q&&J("text")&&x["md3IconTextMode"+(c?"Compact":"")]];return a.createElement(b.default,k({},X,{ref:t,testID:`${W}-container`,style:[x.button,c&&x.compact,ye,j,!Q&&!l&&{elevation:oe}]},Q&&{elevation:oe}),a.createElement(v.default,{borderless:!0,background:$,onPress:M,onLongPress:N,onPressIn:ne?e=>{if(null===R||void 0===R||R(e),J(Q?"elevated":"contained")){const{scale:e}=ee;i.default.timing(oe,{toValue:ie,duration:200*e,useNativeDriver:!0}).start()}}:void 0,onPressOut:ne?e=>{if(null===L||void 0===L||L(e),J(Q?"elevated":"contained")){const{scale:e}=ee;i.default.timing(oe,{toValue:ae,duration:150*e,useNativeDriver:!0}).start()}}:void 0,delayLongPress:B,accessibilityLabel:I,accessibilityHint:O,accessibilityRole:P,accessibilityState:{disabled:l},accessible:q,disabled:l,rippleColor:me,style:ge,testID:W,theme:K,ref:G},a.createElement(s.default,{style:[x.content,H]},S&&!0!==A?a.createElement(s.default,{style:Fe,testID:`${W}-icon-container`},a.createElement(_.default,{source:S,size:be??ce,color:"string"===typeof _e?_e:fe})):null,A?a.createElement(y.default,{size:be??ce,color:"string"===typeof _e?_e:fe,style:Fe}):null,a.createElement(w.default,{variant:"labelLarge",selectable:!1,numberOfLines:1,testID:`${W}-text`,style:[x.label,!Q&&x.md2Label,Q&&(J("text")?S||A?x.md3LabelTextAddons:x.md3LabelText:x.md3Label),c&&x.compactLabel,te&&x.uppercaseLabel,we,U],maxFontSizeMultiplier:Y},D))))}))},54744:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var r=n(98587),a=n(36665),i=n(15009),o=n(75675),s=n(73929),l=n(80033),u=n(16204),c=n(75215),d=n(53116);const h=["status","theme","disabled","onPress","testID"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{status:t,theme:n,disabled:p,onPress:g,testID:y}=e,_=(0,r.default)(e,h);const b=(0,u.useInternalTheme)(n),{current:v}=a.useRef(new i.default.Value(1)),w=a.useRef(!0),{animation:{scale:F}}=b;a.useEffect((()=>{if(w.current)return void(w.current=!1);const e="checked"===t;i.default.sequence([i.default.timing(v,{toValue:.85,duration:e?100*F:0,useNativeDriver:!1}),i.default.timing(v,{toValue:1,duration:e?100*F:100*F*1.75,useNativeDriver:!1})]).start()}),[t,v,F]);const k="checked"===t,x="indeterminate"===t,{rippleColor:A,selectionControlColor:S}=(0,l.getAndroidSelectionControlColor)({theme:b,disabled:p,checked:k,customColor:_.color,customUncheckedColor:_.uncheckedColor}),E=v.interpolate({inputRange:[.8,1],outputRange:[7,0]}),C=x?"minus-box":k?"checkbox-marked":"checkbox-blank-outline";return a.createElement(d.default,f({},_,{borderless:!0,rippleColor:A,onPress:g,disabled:p,accessibilityRole:"checkbox",accessibilityState:{disabled:p,checked:k},accessibilityLiveRegion:"polite",style:m.container,testID:y,theme:b}),a.createElement(i.default.View,{style:{transform:[{scale:v}]}},a.createElement(c.default,{allowFontScaling:!1,name:C,size:24,color:S,direction:"ltr"}),a.createElement(s.default,{style:[o.default.absoluteFill,m.fillContainer]},a.createElement(i.default.View,{style:[m.fill,{borderColor:S},{borderWidth:E}]}))))};p.displayName="Checkbox.Android";const m=o.default.create({container:{borderRadius:18,width:36,height:36,padding:6},fillContainer:{alignItems:"center",justifyContent:"center"},fill:{height:14,width:14}}),g=p,y=["theme"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{theme:t}=e,n=(0,r.default)(e,y);const i=(0,u.useInternalTheme)(t);return a.createElement(g,_({},n,{theme:i}))},v=b,w=["status","disabled","onPress","theme","testID"];function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{status:t,disabled:n,onPress:i,theme:o,testID:h}=e,f=(0,r.default)(e,w);const p=(0,u.useInternalTheme)(o),m="checked"===t,g="indeterminate"===t,{checkedColor:y,rippleColor:_}=(0,l.getSelectionControlIOSColor)({theme:p,disabled:n,customColor:f.color}),b=g?"minus":"check",v=g||m?1:0;return a.createElement(d.default,F({},f,{borderless:!0,rippleColor:_,onPress:i,disabled:n,accessibilityRole:"checkbox",accessibilityState:{disabled:n,checked:m},accessibilityLiveRegion:"polite",style:x.container,testID:h,theme:p}),a.createElement(s.default,{style:{opacity:v}},a.createElement(c.default,{allowFontScaling:!1,name:b,size:24,color:y,direction:"ltr"})))};k.displayName="Checkbox.IOS";const x=o.default.create({container:{borderRadius:18,padding:6}}),A=k;var S=n(18885);const E=["style","status","label","onPress","onLongPress","labelStyle","theme","testID","mode","position","accessibilityLabel","disabled","labelVariant","labelMaxFontSizeMultiplier","rippleColor","background"],C=e=>{let{style:t,status:n,label:i,onPress:o,onLongPress:l,labelStyle:c,theme:h,testID:f,mode:p,position:m="trailing",accessibilityLabel:y=i,disabled:_,labelVariant:b="bodyLarge",labelMaxFontSizeMultiplier:w=1.5,rippleColor:F,background:k}=e,x=(0,r.default)(e,E);const C=(0,u.useInternalTheme)(h),T=Object.assign({},x,{status:n,theme:C,disabled:_}),I="leading"===m;let O;O="android"===p?a.createElement(g,T):"ios"===p?a.createElement(A,T):a.createElement(v,T);const P=C.isV3?C.colors.onSurface:C.colors.text,M=C.isV3?C.colors.onSurfaceDisabled:C.colors.disabled,R={color:_?M:P,textAlign:I?"right":"left"};return a.createElement(d.default,{accessibilityLabel:y,accessibilityRole:"checkbox",accessibilityState:{checked:"checked"===n,disabled:_},onPress:o,onLongPress:l,testID:f,disabled:_,rippleColor:F,theme:C,background:k},a.createElement(s.default,{style:[D.container,t],pointerEvents:"none",importantForAccessibility:"no-hide-descendants"},I&&O,a.createElement(S.default,{variant:b,testID:`${f}-text`,maxFontSizeMultiplier:w,style:[D.label,!C.isV3&&D.font,R,c]},i),!I&&O))};C.displayName="Checkbox.Item";const T=C,D=o.default.create({container:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:8,paddingHorizontal:16},label:{flexShrink:1,flexGrow:1},font:{fontSize:16}}),I=Object.assign(v,{Item:T,Android:g,IOS:A})},80033:(e,t,n)=>{"use strict";n.r(t),n.d(t,{getAndroidSelectionControlColor:()=>s,getSelectionControlIOSColor:()=>u});var r=n(17993),a=n.n(r);const i=e=>{let{theme:t,checkedColor:n,disabled:r}=e;return r?t.isV3?a()(t.colors.onSurface).alpha(.16).rgb().string():a()(t.colors.text).alpha(.16).rgb().string():a()(n).fade(.32).rgb().string()},o=e=>{let{theme:t,checked:n,disabled:r,checkedColor:a,uncheckedColor:i}=e;return r?t.isV3?t.colors.onSurfaceDisabled:t.colors.disabled:n?a:i},s=e=>{let{theme:t,disabled:n,checked:r,customColor:s,customUncheckedColor:l}=e;const u=(e=>{let{theme:t,customColor:n}=e;return n||(t.isV3?t.colors.primary:t.colors.accent)})({theme:t,customColor:s}),c=(e=>{let{theme:t,customUncheckedColor:n}=e;return n||(t.isV3?t.colors.onSurfaceVariant:t.dark?a()(t.colors.text).alpha(.7).rgb().string():a()(t.colors.text).alpha(.54).rgb().string())})({theme:t,customUncheckedColor:l});return{rippleColor:i({theme:t,checkedColor:u,disabled:n}),selectionControlColor:o({theme:t,disabled:n,checked:r,checkedColor:u,uncheckedColor:c})}},l=e=>{let{theme:t,checkedColor:n,disabled:r}=e;return r?t.isV3?a()(t.colors.onSurface).alpha(.16).rgb().string():a()(t.colors.text).alpha(.16).rgb().string():a()(n).fade(.32).rgb().string()},u=e=>{let{theme:t,disabled:n,customColor:r}=e;const a=(e=>{let{theme:t,disabled:n,customColor:r}=e;return n?t.isV3?t.colors.onSurfaceDisabled:t.colors.disabled:r||(t.isV3?t.colors.primary:t.colors.accent)})({theme:t,disabled:n,customColor:r});return{checkedColor:a,rippleColor:l({theme:t,checkedColor:a,disabled:n})}}},55837:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>Me});var r=n(98587),a=n(36665),i=n(75675),o=n(73929),s=n(53116),l=n(18885);const u=["children","textStyle","style","numeric","maxFontSizeMultiplier","testID"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,textStyle:n,style:i,numeric:o,maxFontSizeMultiplier:l,testID:d}=e,p=(0,r.default)(e,u);return a.createElement(s.default,c({},p,{testID:d,style:[f.container,o&&f.right,i]}),a.createElement(h,{textStyle:n,testID:d,maxFontSizeMultiplier:l},t))},h=e=>{let{children:t,textStyle:n,maxFontSizeMultiplier:r,testID:i}=e;return a.isValidElement(t)?t:a.createElement(l.default,{style:n,numberOfLines:1,maxFontSizeMultiplier:r,testID:`${i}-text-container`},t)};d.displayName="DataTable.Cell";const f=i.default.create({container:{flex:1,flexDirection:"row",alignItems:"center"},right:{justifyContent:"flex-end"}}),p=d;var m=n(17993),g=n.n(m),y=n(16204),_=n(85792);const b=["children","style","theme"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,style:n,theme:i}=e,s=(0,r.default)(e,b);const l=(0,y.useInternalTheme)(i),u=l.isV3?l.colors.surfaceVariant:g()(l.dark?_.white:_.black).alpha(.12).rgb().string();return a.createElement(o.default,v({},s,{style:[F.header,{borderBottomColor:u},n]}),t)};w.displayName="DataTable.Header";const F=i.default.create({header:{flexDirection:"row",paddingHorizontal:16,borderBottomWidth:2*i.default.hairlineWidth}}),k=w;var x=n(48623),A=n(47514),S=n(61457),E=n(75215),C=n(15009),T=n(26725),D=n(95620),I=n(97901),O=n(92365),P=n(2772),M=n(35708);const R=280,L=e=>e.isV3?e.colors.onSurfaceDisabled:g()(e.dark?_.white:_.black).alpha(.32).rgb().string(),N=e=>{let{theme:t,disabled:n}=e;return n?L(t):t.isV3?t.colors.onSurface:g()(t.colors.text).alpha(.87).rgb().string()},B=e=>{let{theme:t,disabled:n}=e;return n?L(t):t.isV3?t.colors.onSurfaceVariant:g()(t.colors.text).alpha(.54).rgb().string()},j=e=>{let{theme:t,customRippleColor:n}=e;return n||(t.isV3?g()(t.colors.onSurfaceVariant).alpha(.12).rgb().string():void 0)};var V=n(28983);const z=e=>{let{leadingIcon:t,trailingIcon:n,dense:r,title:i,disabled:u,background:c,onPress:d,style:h,contentStyle:f,titleStyle:p,rippleColor:m,testID:g="menu-item",accessibilityLabel:_,accessibilityState:b,theme:v,titleMaxFontSizeMultiplier:w=1.5}=e;const F=(0,y.useInternalTheme)(v),{titleColor:k,iconColor:x,rippleColor:A}=(e=>{let{theme:t,disabled:n,customRippleColor:r}=e;return{titleColor:N({theme:t,disabled:n}),iconColor:B({theme:t,disabled:n}),rippleColor:j({theme:t,customRippleColor:r})}})({theme:F,disabled:u,customRippleColor:m}),{isV3:S}=F,E=S?12:8,C=S?24:40,T=112-(S?12:16),D=(e=>{let{isV3:t,iconWidth:n,leadingIcon:r,trailingIcon:a}=e;return t?r&&a?R-(2*n+24):r||a?R-(n+24):268:r?R-(n+48):264})({isV3:S,iconWidth:C,leadingIcon:t,trailingIcon:n}),I=Object.assign({color:k},S?F.fonts.bodyLarge:{}),O=Object.assign({},b,{disabled:u});return a.createElement(s.default,{style:[H.container,{paddingHorizontal:E},r&&H.md3DenseContainer,h],onPress:d,disabled:u,testID:g,background:c,accessibilityLabel:_,accessibilityRole:"menuitem",accessibilityState:O,rippleColor:A},a.createElement(o.default,{style:H.row},t?a.createElement(o.default,{style:[!S&&H.item,{width:C}],pointerEvents:"box-none"},a.createElement(V.default,{source:t,size:24,color:x})):null,a.createElement(o.default,{style:[!S&&H.item,H.content,{minWidth:T,maxWidth:D},S&&(t?H.md3LeadingIcon:H.md3WithoutLeadingIcon),f],pointerEvents:"none"},a.createElement(l.default,{variant:"bodyLarge",selectable:!1,numberOfLines:1,testID:`${g}-title`,style:[!S&&H.title,I,p],maxFontSizeMultiplier:w},i)),S&&n?a.createElement(o.default,{style:[!S&&H.item,{width:C}],pointerEvents:"box-none"},a.createElement(V.default,{source:n,size:24,color:x})):null))};z.displayName="Menu.Item";const H=i.default.create({container:{minWidth:112,maxWidth:R,height:48,justifyContent:"center"},md3DenseContainer:{height:32},row:{flexDirection:"row"},title:{fontSize:16},item:{marginHorizontal:8},content:{justifyContent:"center"},md3LeadingIcon:{marginLeft:12},md3WithoutLeadingIcon:{marginLeft:4}}),U=z;var W;null===(W=n(45548).default.NativeUnimoduleProxy)||void 0===W||null===(W=W.modulesConstants)||void 0===W||null===(W=W.ExponentConstants)||void 0===W||W.statusBarHeight;const q=void 0;!function(e){e.displayLarge="displayLarge",e.displayMedium="displayMedium",e.displaySmall="displaySmall",e.headlineLarge="headlineLarge",e.headlineMedium="headlineMedium",e.headlineSmall="headlineSmall",e.titleLarge="titleLarge",e.titleMedium="titleMedium",e.titleSmall="titleSmall",e.labelLarge="labelLarge",e.labelMedium="labelMedium",e.labelSmall="labelSmall",e.bodyLarge="bodyLarge",e.bodyMedium="bodyMedium",e.bodySmall="bodySmall"}({});let $=function(e){return e[e.level0=0]="level0",e[e.level1=1]="level1",e[e.level2=2]="level2",e[e.level3=3]="level3",e[e.level4=4]="level4",e[e.level5=5]="level5",e}({});var Y=n(71232);function G(){}const X={exitApp:G,addEventListener:()=>({remove:G}),removeEventListener:G};class K extends a.Component{componentDidMount(){this.checkManager(),this.key=this.props.manager.mount(this.props.children)}componentDidUpdate(){this.checkManager(),this.props.manager.update(this.key,this.props.children)}componentWillUnmount(){this.checkManager(),this.props.manager.unmount(this.key)}checkManager(){if(!this.props.manager)throw new Error("Looks like you forgot to wrap your root component with `Provider` component from `react-native-paper`.\n\nPlease read our getting-started guide and make sure you've followed all the required steps.\n\nhttps://callstack.github.io/react-native-paper/docs/guides/getting-started")}render(){return null}}var J=n(32424),Z=n(93570);class Q extends a.Component{static Host=J.default;render(){const{children:e,theme:t}=this.props;return a.createElement(Z.Consumer,null,(n=>a.createElement(J.PortalContext.Consumer,null,(r=>a.createElement(K,{manager:r},a.createElement(Z.Provider,{value:n},a.createElement(y.ThemeProvider,{theme:t},e)))))))}}const ee=(0,y.withInternalTheme)(Q);var te=n(6667);function ne(){return ne=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(e){const t=(0,I.default)(e).querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');null===t||void 0===t||t.focus()}},ue=e=>!a.isValidElement(e)&&"number"===typeof(null===e||void 0===e?void 0:e.x)&&"number"===typeof(null===e||void 0===e?void 0:e.y),ce=e=>{let{visible:t,statusBarHeight:r=q,overlayAccessibilityLabel:i="Close menu",testID:s="menu",anchor:l,onDismiss:u,anchorPosition:c,contentStyle:d,style:h,elevation:f=ie,mode:p=se,children:m,theme:g,keyboardShouldPersistTaps:_}=e;const b=(0,y.useInternalTheme)(g),[v,w]=a.useState(t),[F,k]=a.useState(0),[A,S]=a.useState(0),[E,D]=a.useState({width:0,height:0}),[I,R]=a.useState({width:0,height:0}),[L,N]=a.useState({width:ae.width,height:ae.height}),B=a.useRef(new C.default.Value(0)),j=a.useRef(new C.default.ValueXY({x:0,y:0})),V=a.useRef(0),z=a.useRef(null),H=a.useRef(null),U=a.useRef(null),W=a.useRef(!1),$=a.useCallback((e=>{const t=e.endCoordinates.height;V.current=t}),[]),G=a.useCallback((()=>{V.current=0}),[]),K=a.useRef(),J=a.useRef(),Z=a.useRef(),Q=a.useRef(),ce=a.useCallback((()=>{t&&(null===u||void 0===u||u())}),[u,t]),he=a.useCallback((e=>{"Escape"===e.key&&(null===u||void 0===u||u())}),[u]),fe=a.useCallback((()=>{var e,t;null===(e=Z.current)||void 0===e||e.remove(),null===(t=Q.current)||void 0===t||t.remove(),"document"in n.g&&document.removeEventListener("keyup",he)}),[he]),pe=a.useCallback((()=>{Z.current=(0,Y.addEventListener)(X,"hardwareBackPress",ce),Q.current=(0,Y.addEventListener)(T.default,"change",ce),document.addEventListener("keyup",he)}),[ce,he]),me=a.useCallback((()=>new Promise((e=>{ue(l)?e({x:l.x,y:l.y,width:0,height:0}):H.current&&H.current.measureInWindow(((t,n,r,a)=>{e({x:t,y:n,width:r,height:a})}))}))),[l]),ge=a.useCallback((async()=>{const e=T.default.get("window"),[t,n]=await Promise.all([new Promise((e=>{U.current&&U.current.measureInWindow(((t,n,r,a)=>{e({x:t,y:n,width:r,height:a})}))})),me()]);if(!e.width||!e.height||!t.width||!t.height||!n.width&&!ue(l)||!n.height&&!ue(l))return void requestAnimationFrame(ge);k(n.x),S(n.y),R({height:n.height,width:n.width}),D({height:t.height,width:t.width}),N({height:e.height-V.current,width:e.width}),pe();const{animation:r}=b;C.default.parallel([C.default.timing(j.current,{toValue:{x:t.width,y:t.height},duration:250*r.scale,easing:re,useNativeDriver:!0}),C.default.timing(B.current,{toValue:1,duration:250*r.scale,easing:re,useNativeDriver:!0})]).start((e=>{let{finished:t}=e;t&&(le(U.current),W.current=!0)}))}),[l,pe,me,b]),ye=a.useCallback((()=>{fe();const{animation:e}=b;C.default.timing(B.current,{toValue:0,duration:250*e.scale,easing:re,useNativeDriver:!0}).start((e=>{let{finished:t}=e;t&&(D({width:0,height:0}),w(!1),W.current=!1,le(H.current))}))}),[fe,b]),_e=a.useCallback((async e=>{await Promise.resolve().then((()=>{e&&!W.current?ge():v&&ye()}))}),[ye,ge,v]);a.useEffect((()=>{const e=B.current,t=j.current;return K.current=O.default.addListener("keyboardDidShow",$),J.current=O.default.addListener("keyboardDidHide",G),()=>{var n,r;fe(),null===(n=K.current)||void 0===n||n.remove(),null===(r=J.current)||void 0===r||r.remove(),t.removeAllListeners(),null===e||void 0===e||e.removeAllListeners()}}),[fe,G,$]),a.useEffect((()=>{z.current!==t&&(z.current=t,t!==v&&w(t))}),[t,v]),a.useEffect((()=>{_e(v)}),[v,_e]);const be=[];let ve=F,we=ue(H.current)||"bottom"!==c?A:A+I.height;if(F<=L.width-E.width-8)be.push({translateX:j.current.x.interpolate({inputRange:[0,E.width],outputRange:[-E.width/2,0]})}),ve<8&&(ve=8);else{be.push({translateX:j.current.x.interpolate({inputRange:[0,E.width],outputRange:[E.width/2,0]})}),ve+=I.width-E.width;ve+E.width>L.width-8&&(ve=L.width-8-E.width)}let Fe=0;if(we>=L.height-E.height-8-0&&we<=L.height-we?Fe=L.height-we-8-0:we>=L.height-E.height-8-0&&we>=L.height-A&&we<=E.height-I.height+8-0&&(Fe=we+I.height-8+0),Fe=Fe>L.height-16?L.height-16:Fe,we<=L.height-E.height-8-0||we>=L.height-E.height-8-0&&we<=L.height-we)be.push({translateY:j.current.y.interpolate({inputRange:[0,E.height],outputRange:[-(Fe||E.height)/2,0]})}),we<8&&(we=8);else{be.push({translateY:j.current.y.interpolate({inputRange:[0,E.height],outputRange:[(Fe||E.height)/2,0]})}),we+=I.height-(Fe||E.height);we+(Fe||E.height)+0>L.height-8&&(we=Fe===L.height-16?-16:L.height-E.height-8-0)}const ke=Object.assign({opacity:B.current,transform:[{scaleX:j.current.x.interpolate({inputRange:[0,E.width],outputRange:[0,1]})},{scaleY:j.current.y.interpolate({inputRange:[0,E.height],outputRange:[0,1]})}],borderRadius:b.roundness},!b.isV3&&{elevation:8},Fe?{height:Fe}:{}),xe=Object.assign({top:ue(l)?we:we+0},x.default.getConstants().isRTL?{right:ve}:{left:ve}),Ae=t?"box-none":"none";return a.createElement(o.default,{ref:e=>H.current=e,collapsable:!1},ue(l)?null:l,v?a.createElement(ee,null,a.createElement(M.default,{accessibilityLabel:i,accessibilityRole:"button",onPress:u,style:de.pressableOverlay}),a.createElement(o.default,{ref:e=>U.current=e,collapsable:!1,accessibilityViewIsModal:t,style:[de.wrapper,xe,h],pointerEvents:Ae,onAccessibilityEscape:u,testID:`${s}-view`},a.createElement(C.default.View,{pointerEvents:Ae,style:{transform:be}},a.createElement(te.default,ne({mode:p,pointerEvents:Ae,style:[de.shadowMenuContainer,ke,b.isV3&&{backgroundColor:b.colors.elevation[oe[f]]},d]},b.isV3&&{elevation:f},{testID:`${s}-surface`,theme:b}),Fe&&a.createElement(P.default,{keyboardShouldPersistTaps:_},m)||a.createElement(a.Fragment,null,m))))):null)};ce.Item=U;const de=i.default.create({wrapper:{position:"absolute"},shadowMenuContainer:{opacity:0,paddingVertical:8},pressableOverlay:Object.assign({},{cursor:"auto"},i.default.absoluteFillObject,{width:"100%"})}),he=ce,fe=["label","accessibilityLabel","page","numberOfPages","onPageChange","style","showFastPaginationControls","numberOfItemsPerPageList","numberOfItemsPerPage","onItemsPerPageChange","selectPageDropdownLabel","selectPageDropdownAccessibilityLabel","selectPageDropdownRippleColor","dropdownItemRippleColor","theme"];function pe(){return pe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{page:t,numberOfPages:n,onPageChange:r,showFastPaginationControls:i,theme:o,paginationControlRippleColor:s}=e;const l=(0,y.useInternalTheme)(o),u=l.isV3?l.colors.onSurface:l.colors.text;return a.createElement(a.Fragment,null,i?a.createElement(S.default,{icon:e=>{let{size:t,color:n}=e;return a.createElement(E.default,{name:"page-first",color:n,size:t,direction:x.default.getConstants().isRTL?"rtl":"ltr"})},iconColor:u,rippleColor:s,disabled:0===t,onPress:()=>r(0),accessibilityLabel:"page-first",theme:l}):null,a.createElement(S.default,{icon:e=>{let{size:t,color:n}=e;return a.createElement(E.default,{name:"chevron-left",color:n,size:t,direction:x.default.getConstants().isRTL?"rtl":"ltr"})},iconColor:u,rippleColor:s,disabled:0===t,onPress:()=>r(t-1),accessibilityLabel:"chevron-left",theme:l}),a.createElement(S.default,{icon:e=>{let{size:t,color:n}=e;return a.createElement(E.default,{name:"chevron-right",color:n,size:t,direction:x.default.getConstants().isRTL?"rtl":"ltr"})},iconColor:u,rippleColor:s,disabled:0===n||t===n-1,onPress:()=>r(t+1),accessibilityLabel:"chevron-right",theme:l}),i?a.createElement(S.default,{icon:e=>{let{size:t,color:n}=e;return a.createElement(E.default,{name:"page-last",color:n,size:t,direction:x.default.getConstants().isRTL?"rtl":"ltr"})},iconColor:u,rippleColor:s,disabled:0===n||t===n-1,onPress:()=>r(n-1),accessibilityLabel:"page-last",theme:l}):null)},ge=e=>{let{numberOfItemsPerPageList:t,numberOfItemsPerPage:n,onItemsPerPageChange:r,theme:i,selectPageDropdownRippleColor:o,dropdownItemRippleColor:s}=e;const l=(0,y.useInternalTheme)(i),{colors:u}=l,[c,d]=a.useState(!1);return a.createElement(he,{visible:c,onDismiss:()=>d(!c),theme:l,anchor:a.createElement(A.default,{mode:"outlined",onPress:()=>d(!0),style:_e.button,icon:"menu-down",contentStyle:_e.contentStyle,theme:l,rippleColor:o},`${n}`)},null===t||void 0===t?void 0:t.map((e=>a.createElement(he.Item,{key:e,titleStyle:e===n&&{color:null===u||void 0===u?void 0:u.primary},onPress:()=>{null===r||void 0===r||r(e),d(!1)},rippleColor:s,title:e,theme:l}))))},ye=e=>{let{label:t,accessibilityLabel:n,page:i,numberOfPages:s,onPageChange:u,style:c,showFastPaginationControls:d=!1,numberOfItemsPerPageList:h,numberOfItemsPerPage:f,onItemsPerPageChange:p,selectPageDropdownLabel:m,selectPageDropdownAccessibilityLabel:_,selectPageDropdownRippleColor:b,dropdownItemRippleColor:v,theme:w}=e,F=(0,r.default)(e,fe);const k=(0,y.useInternalTheme)(w),x=g()(k.isV3?k.colors.onSurface:null===k||void 0===k?void 0:k.colors.text).alpha(.6).rgb().string();return a.createElement(o.default,pe({},F,{style:[_e.container,c],accessibilityLabel:"pagination-container"}),h&&f&&p&&a.createElement(o.default,{accessibilityLabel:"Options Select",style:_e.optionsContainer},a.createElement(l.default,{style:[_e.label,{color:x}],numberOfLines:3,accessibilityLabel:_||"selectPageDropdownLabel"},m),a.createElement(ge,{numberOfItemsPerPageList:h,numberOfItemsPerPage:f,onItemsPerPageChange:p,selectPageDropdownRippleColor:b,dropdownItemRippleColor:v,theme:k})),a.createElement(l.default,{style:[_e.label,{color:x}],numberOfLines:3,accessibilityLabel:n||"label"},t),a.createElement(o.default,{style:_e.iconsContainer},a.createElement(me,{showFastPaginationControls:d,onPageChange:u,page:i,numberOfPages:s,theme:k})))};ye.displayName="DataTable.Pagination";const _e=i.default.create({container:{justifyContent:"flex-end",flexDirection:"row",alignItems:"center",paddingLeft:16,flexWrap:"wrap"},optionsContainer:{flexDirection:"row",alignItems:"center",marginVertical:6},label:{fontSize:12,marginRight:16},button:{textAlign:"center",marginRight:16},iconsContainer:{flexDirection:"row"},contentStyle:{flexDirection:"row-reverse"}}),be=ye,ve=["onPress","style","children","pointerEvents","theme"];function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{onPress:t,style:n,children:i,pointerEvents:l,theme:u}=e,c=(0,r.default)(e,ve);const d=(0,y.useInternalTheme)(u),h=d.isV3?d.colors.surfaceVariant:g()(d.dark?_.white:_.black).alpha(.12).rgb().string();return a.createElement(s.default,we({},c,{onPress:t,style:[ke.container,{borderBottomColor:h},n]}),a.createElement(o.default,{style:ke.content,pointerEvents:l},i))};Fe.displayName="DataTable.Row";const ke=i.default.create({container:{borderStyle:"solid",borderBottomWidth:i.default.hairlineWidth,minHeight:48,paddingHorizontal:16},content:{flex:1,flexDirection:"row"}}),xe=Fe,Ae=["numeric","children","onPress","sortDirection","textStyle","style","theme","numberOfLines","maxFontSizeMultiplier"];function Se(){return Se=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;let{numeric:n,children:i,onPress:o,sortDirection:s,textStyle:u,style:c,theme:d,numberOfLines:h=1,maxFontSizeMultiplier:f}=e,p=(0,r.default)(e,Ae);const m=(0,y.useInternalTheme)(d),{current:_}=a.useRef(new C.default.Value("ascending"===s?0:1));a.useEffect((()=>{C.default.timing(_,{toValue:"ascending"===s?0:1,duration:150,useNativeDriver:!0}).start()}),[s,_]);const b=m.isV3?m.colors.onSurface:null===m||void 0===m||null===(t=m.colors)||void 0===t?void 0:t.text,v=g()(b).alpha(.6).rgb().string(),w=_.interpolate({inputRange:[0,1],outputRange:["0deg","180deg"]}),F=s?a.createElement(C.default.View,{style:[Ce.icon,{transform:[{rotate:w}]}]},a.createElement(E.default,{name:"arrow-up",size:16,color:b,direction:x.default.getConstants().isRTL?"rtl":"ltr"})):null;return a.createElement(M.default,Se({disabled:!o,onPress:o},p,{style:[Ce.container,n&&Ce.right,c]}),F,a.createElement(l.default,{style:[Ce.cell,{maxHeight:24*h},h>1?n?x.default.getConstants().isRTL?Ce.leftText:Ce.rightText:Ce.centerText:{},s?Ce.sorted:{color:v},u],numberOfLines:h,maxFontSizeMultiplier:f},i))};Ee.displayName="DataTable.Title";const Ce=i.default.create({container:{flex:1,flexDirection:"row",alignContent:"center",paddingVertical:12},rightText:{textAlign:"right"},leftText:{textAlign:"left"},centerText:{textAlign:"center"},right:{justifyContent:"flex-end"},cell:{lineHeight:24,fontSize:12,fontWeight:"500",alignItems:"center"},sorted:{marginLeft:8},icon:{height:24,justifyContent:"center"}}),Te=Ee,De=["children","style"];function Ie(){return Ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{children:t,style:n}=e,i=(0,r.default)(e,De);return a.createElement(o.default,Ie({},i,{style:[Pe.container,n]}),t)};Oe.Header=k,Oe.Title=Te,Oe.Row=xe,Oe.Cell=p,Oe.Pagination=be;const Pe=i.default.create({container:{width:"100%"}}),Me=Oe},28983:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g,isEqualIcon:()=>m,isValidIcon:()=>p});var r=n(98587),a=n(36665),i=n(48623),o=n(60193),s=n(75215),l=n(93570),u=n(16204);const c=["source","color","size","theme","testID"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t"object"===typeof e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"uri")&&"string"===typeof e.uri||"number"===typeof e||"string"===typeof e&&(e.startsWith("data:image")||/\.(bmp|jpg|jpeg|png|gif|svg)$/.test(e)),f=e=>"object"===typeof e&&null!==e&&Object.prototype.hasOwnProperty.call(e,"uri")&&"string"===typeof e.uri?e.uri:e,p=e=>"string"===typeof e||"function"===typeof e||h(e),m=(e,t)=>e===t||f(e)===f(t),g=e=>{let{source:t,color:n,size:f,theme:p,testID:m}=e,g=(0,r.default)(e,c);const y=(0,u.useInternalTheme)(p),_="object"===typeof t&&t.direction&&t.source?"auto"===t.direction?i.default.getConstants().isRTL?"rtl":"ltr":t.direction:null,b="object"===typeof t&&t.direction&&t.source?t.source:t,v=n||(y.isV3?y.colors.onSurface:y.colors.text);return h(b)?a.createElement(o.default,d({},g,{testID:m,source:b,style:[{transform:[{scaleX:"rtl"===_?-1:1}]},{width:f,height:f,tintColor:n,resizeMode:"contain"}]},s.accessibilityProps,{accessibilityIgnoresInvertColors:!0})):"string"===typeof b?a.createElement(l.Consumer,null,(e=>{let{icon:t}=e;return null===t||void 0===t?void 0:t({name:b,color:v,size:f,direction:_,testID:m})})):"function"===typeof b?b({color:v,size:f,direction:_,testID:m}):null}},61457:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>A});var r=n(98587),a=n(36665),i=n(75675),o=n(17993),s=n.n(o);const l=e=>{let{theme:t,disabled:n}=e;if(t.isV3)return n?t.colors.surfaceDisabled:t.colors.outline},u=e=>{let{theme:t,isMode:n,disabled:r,selected:a,customContainerColor:i}=e;if(t.isV3){if(r&&(n("contained")||n("contained-tonal")))return t.colors.surfaceDisabled;if("undefined"!==typeof i)return i;if(n("contained"))return a?t.colors.primary:t.colors.surfaceVariant;if(n("contained-tonal"))return a?t.colors.secondaryContainer:t.colors.surfaceVariant;if(n("outlined")&&a)return t.colors.inverseSurface}if("undefined"!==typeof i)return i},c=e=>{let{theme:t,iconColor:n,customRippleColor:r}=e;return r||(t.isV3?s()(n).alpha(.12).rgb().string():s()(n).alpha(.32).rgb().string())};var d=n(16204),h=n(66255),f=n(12686),p=n(15009),m=n(73929),g=n(28983);const y=e=>{let{color:t,size:n,source:r,theme:i,testID:o="cross-fade-icon"}=e;const s=(0,d.useInternalTheme)(i),[l,u]=a.useState((()=>r)),[c,h]=a.useState(null),{current:f}=a.useRef(new p.default.Value(1)),{scale:y}=s.animation;l!==r&&(h((()=>l)),u((()=>r))),a.useEffect((()=>{(0,g.isValidIcon)(c)&&!(0,g.isEqualIcon)(c,l)&&(f.setValue(1),p.default.timing(f,{duration:200*y,toValue:0,useNativeDriver:!0}).start())}),[l,c,f,y]);const b=f,v=c?f.interpolate({inputRange:[0,1],outputRange:[1,0]}):1,w=f.interpolate({inputRange:[0,1],outputRange:["-90deg","0deg"]}),F=c?f.interpolate({inputRange:[0,1],outputRange:["0deg","-180deg"]}):"0deg";return a.createElement(m.default,{style:[_.content,{height:n,width:n}]},c?a.createElement(p.default.View,{style:[_.icon,{opacity:b,transform:[{rotate:w}]}],testID:`${o}-previous`},a.createElement(g.default,{source:c,size:n,color:t,theme:s})):null,a.createElement(p.default.View,{style:[_.icon,{opacity:v,transform:[{rotate:F}]}],testID:`${o}-current`},a.createElement(g.default,{source:l,size:n,color:t,theme:s})))},_=i.default.create({content:{alignItems:"center",justifyContent:"center"},icon:{position:"absolute",top:0,left:0,right:0,bottom:0}});var b=n(6667),v=n(53116);const w=["icon","iconColor","containerColor","rippleColor","size","accessibilityLabel","disabled","onPress","selected","animated","mode","style","theme","testID","loading"];function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{icon:n,iconColor:o,containerColor:s,rippleColor:h,size:p=24,accessibilityLabel:m,disabled:_,onPress:k,selected:A=!1,animated:S=!1,mode:E,style:C,theme:T,testID:D="icon-button",loading:I=!1}=e,O=(0,r.default)(e,w);const P=(0,d.useInternalTheme)(T),{isV3:M}=P,R=S?y:g.default,{iconColor:L,rippleColor:N,backgroundColor:B,borderColor:j}=(e=>{let{theme:t,disabled:n,mode:r,selected:a,customIconColor:i,customContainerColor:o,customRippleColor:s}=e;const d={theme:t,isMode:e=>r===e,disabled:n,selected:a},h=(e=>{let{theme:t,isMode:n,disabled:r,selected:a,customIconColor:i}=e;return t.isV3?r?t.colors.onSurfaceDisabled:"undefined"!==typeof i?i:n("contained")?a?t.colors.onPrimary:t.colors.primary:n("contained-tonal")?a?t.colors.onSecondaryContainer:t.colors.onSurfaceVariant:n("outlined")?a?t.colors.inverseOnSurface:t.colors.onSurfaceVariant:a?t.colors.primary:t.colors.onSurfaceVariant:"undefined"!==typeof i?i:t.colors.text})(Object.assign({},d,{customIconColor:i}));return{iconColor:h,backgroundColor:u(Object.assign({},d,{customContainerColor:o})),rippleColor:c({theme:t,iconColor:h,customRippleColor:s}),borderColor:l({theme:t,disabled:n})}})({theme:P,disabled:_,selected:A,mode:E,customIconColor:o,customContainerColor:s,customRippleColor:h}),V=M?p+16:1.5*p,{borderWidth:z=(M&&"outlined"===E&&!A?1:0),borderRadius:H=V/2}=i.default.flatten(C)||{},U={borderWidth:z,borderRadius:H,borderColor:j};return a.createElement(b.default,F({ref:t,testID:`${D}-container`,style:[{backgroundColor:B,width:V,height:V},x.container,U,!M&&_&&x.disabled,C]},M&&{elevation:0}),a.createElement(v.default,F({borderless:!0,centered:!0,onPress:k,rippleColor:N,accessibilityLabel:m,style:[x.touchable,{borderRadius:H}],accessibilityTraits:_?["button","disabled"]:"button",accessibilityComponentType:"button",accessibilityRole:"button",accessibilityState:{disabled:_},disabled:_,hitSlop:v.default.supported?{top:10,left:10,bottom:10,right:10}:{top:6,left:6,bottom:6,right:6},testID:D},O),I?a.createElement(f.default,{size:p,color:L}):a.createElement(R,{color:L,source:n,size:p})))})),x=i.default.create({container:{overflow:"hidden",margin:6,elevation:0},touchable:{flexGrow:1,justifyContent:"center",alignItems:"center"},disabled:{opacity:.32}}),A=k},75215:(e,t,n)=>{"use strict";n.r(t),n.d(t,{accessibilityProps:()=>d,default:()=>f});var r=n(98587),a=n(36665),i=n(75675),o=n(6283),s=n(85792);const l=["name","color","size"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{name:n,color:i,size:s}=t,c=(0,r.default)(t,l);return e||(/(Cannot find module|Module not found|Cannot resolve module)/.test(p.message)||console.error(p),console.warn(`Tried to use the icon '${n}' in a component from 'react-native-paper', but 'react-native-vector-icons/MaterialCommunityIcons' could not be loaded.`,"To remove this warning, try installing 'react-native-vector-icons' or use another method to specify icon: https://callstack.github.io/react-native-paper/docs/guides/icons"),e=!0),a.createElement(o.default,u({},c,{style:[h.icon,{color:i,fontSize:s}],pointerEvents:"none",selectable:!1}),"\u25a1")}}const d={role:"img",focusable:!1},h=i.default.create({icon:{backgroundColor:"transparent"}}),f=e=>{let{name:t,color:n=s.black,size:r,direction:i,allowFontScaling:o,testID:l}=e;return a.createElement(c,u({allowFontScaling:o,name:t,color:n,size:r,style:[{transform:[{scaleX:"rtl"===i?-1:1}],lineHeight:r},h.icon],pointerEvents:"none",selectable:!1,testID:l},d))}},32424:(e,t,n)=>{"use strict";n.r(t),n.d(t,{PortalContext:()=>s,default:()=>l});var r=n(36665),a=n(73929),i=n(75675);class o extends r.PureComponent{state={portals:[]};mount=(e,t)=>{this.setState((n=>({portals:[...n.portals,{key:e,children:t}]})))};update=(e,t)=>this.setState((n=>({portals:n.portals.map((n=>n.key===e?Object.assign({},n,{children:t}):n))})));unmount=e=>this.setState((t=>({portals:t.portals.filter((t=>t.key!==e))})));render(){return this.state.portals.map((e=>{let{key:t,children:n}=e;return r.createElement(a.default,{key:t,collapsable:!1,pointerEvents:"box-none",style:i.default.absoluteFill},n)}))}}const s=r.createContext(null);class l extends r.Component{static displayName="Portal.Host";componentDidMount(){const e=this.manager,t=this.queue;for(;t.length&&e;){const n=t.pop();if(n)switch(n.type){case"mount":e.mount(n.key,n.children);break;case"update":e.update(n.key,n.children);break;case"unmount":e.unmount(n.key)}}}setManager=e=>{this.manager=e};mount=e=>{const t=this.nextKey++;return this.manager?this.manager.mount(t,e):this.queue.push({type:"mount",key:t,children:e}),t};update=(e,t)=>{if(this.manager)this.manager.update(e,t);else{const n={type:"mount",key:e,children:t},r=this.queue.findIndex((t=>"mount"===t.type||"update"===t.type&&t.key===e));r>-1?this.queue[r]=n:this.queue.push(n)}};unmount=e=>{this.manager?this.manager.unmount(e):this.queue.push({type:"unmount",key:e})};nextKey=0;queue=[];render(){return r.createElement(s.Provider,{value:{mount:this.mount,update:this.update,unmount:this.unmount}},r.createElement(a.default,{style:u.container,collapsable:!1,pointerEvents:"box-none"},this.props.children),r.createElement(o,{ref:this.setManager}))}}const u=i.default.create({container:{flex:1}})},53172:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(98587),a=n(36665),i=n(15009),o=n(48623),s=n(75675),l=n(73929),u=n(17993),c=n.n(u),d=n(16204);const h=["color","indeterminate","progress","visible","theme","animatedValue","style","fillStyle","testID"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t;let{color:n,indeterminate:o,progress:s=0,visible:u=!0,theme:g,animatedValue:y,style:_,fillStyle:b,testID:v="progress-bar"}=e,w=(0,r.default)(e,h);const F=!0,k=(0,d.useInternalTheme)(g),{current:x}=a.useRef(new i.default.Value(0)),{current:A}=a.useRef(new i.default.Value(0)),S=a.useRef(y),[E,C]=a.useState(0),[T,D]=a.useState(0),I=a.useRef(null),{scale:O}=k.animation;a.useEffect((()=>{S.current=y}));const P=a.useCallback((()=>{i.default.timing(A,{duration:200*O,toValue:1,useNativeDriver:!0,isInteraction:!1}).start();"undefined"!==typeof S.current&&S.current>=0||(o?(I.current||(I.current=i.default.timing(x,{duration:2e3,toValue:1,useNativeDriver:!1,isInteraction:!1})),x.setValue(0),i.default.loop(I.current).start()):i.default.timing(x,{duration:200*O,toValue:s||0,useNativeDriver:!0,isInteraction:!1}).start())}),[A,O,o,x,s,F]),M=a.useCallback((()=>{I.current&&I.current.stop(),i.default.timing(A,{duration:200*O,toValue:0,useNativeDriver:!0,isInteraction:!1}).start()}),[A,O]);a.useEffect((()=>{u?P():M()}),[u,P,M]),a.useEffect((()=>{y&&y>=0&&x.setValue(y)}),[y,x]),a.useEffect((()=>{u&&0===T&&P()}),[T,P,u]);const R=n||(null===(t=k.colors)||void 0===t?void 0:t.primary),L=k.isV3?k.colors.surfaceVariant:c()(R).alpha(.38).rgb().string();return a.createElement(l.default,f({onLayout:e=>{D(E),C(e.nativeEvent.layout.width)}},w,{accessible:!0,accessibilityRole:"progressbar",accessibilityState:{busy:u},accessibilityValue:o?{}:{min:0,max:100,now:Math.round(100*s)},style:m.webContainer,testID:v}),a.createElement(i.default.View,{style:[m.container,{backgroundColor:L,opacity:A},_]},E?a.createElement(i.default.View,{testID:`${v}-fill`,style:[m.progressBar,{width:E,backgroundColor:R,transform:[{translateX:x.interpolate(o?{inputRange:[0,.5,1],outputRange:[.5*(p?1:-1)*E,.5*(p?1:-1)*.6*E,.7*(p?-1:1)*E]}:{inputRange:[0,1],outputRange:[.5*(p?1:-1)*E,0]})},{scaleX:x.interpolate(o?{inputRange:[0,.5,1],outputRange:[1e-4,.6,1e-4]}:{inputRange:[0,1],outputRange:[1e-4,1]})}]},b]}):null))}},6667:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>k});var r=n(98587),a=n(36665),i=n(15009),o=n(75675),s=n(16204),l=n(6722),u=n(45856),c=n(66255),d=n(36979);const h=["style","theme"],f=["elevation","style","backgroundColor","testID","children","mode"],p=["elevation","children","theme","style","testID","mode"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,theme:c}=e,d=(0,r.default)(e,h);const{elevation:f=4}=o.default.flatten(n)||{},{dark:p,mode:g,colors:y}=(0,s.useInternalTheme)(c);return a.createElement(i.default.View,m({ref:t},d,{style:[{backgroundColor:p&&"adaptive"===g?(0,l.default)(f,null===y||void 0===y?void 0:y.surface):null===y||void 0===y?void 0:y.surface},f?(0,u.default)(f):null,n]}))})),y=["position","alignSelf","top","right","bottom","left","start","end","flex","flexShrink","flexGrow","width","height","transform","opacity"],_="#000",b=[{shadowOpacity:.15,height:[0,1,2,4,6,8],shadowRadius:[0,3,6,8,10,12]},{shadowOpacity:.3,height:[0,1,1,1,2,4],shadowRadius:[0,1,2,3,3,4]}],v=[0,1,2,3,4,5];function w(e,t){return(0,l.isAnimatedValue)(e)?{shadowColor:_,shadowOpacity:e.interpolate({inputRange:[0,1],outputRange:[0,b[t].shadowOpacity],extrapolate:"clamp"}),shadowOffset:{width:0,height:e.interpolate({inputRange:v,outputRange:b[t].height})},shadowRadius:e.interpolate({inputRange:v,outputRange:b[t].shadowRadius})}:{shadowColor:_,shadowOpacity:e?b[t].shadowOpacity:0,shadowOffset:{width:0,height:b[t].height[e]},shadowRadius:b[t].shadowRadius[e]}}(0,c.forwardRef)(((e,t)=>{let{elevation:n,style:s,backgroundColor:l,testID:u,children:c,mode:h="elevated"}=e,p=(0,r.default)(e,f);const[g,_]=a.useMemo((()=>{const e=o.default.flatten(s)||{},[t,r,a]=(0,d.splitStyles)(e,(e=>y.includes(e)||e.startsWith("margin")),(e=>e.startsWith("border")&&e.endsWith("Radius")));const i=e.backgroundColor||l,u="elevated"===h;return[Object.assign({},u&&w(n,0),r,a,{backgroundColor:i}),Object.assign({},u&&w(n,1),t,a,{flex:e.height?1:void 0,backgroundColor:i})]}),[s,n,l,h]);return a.createElement(i.default.View,{ref:t,style:g,testID:`${u}-outer-layer`},a.createElement(i.default.View,m({},p,{style:_,testID:u}),c))}));const F=(0,c.forwardRef)(((e,t)=>{let{elevation:n=1,children:o,theme:c,style:d,testID:h="surface",mode:f="elevated"}=e,y=(0,r.default)(e,p);const _=(0,s.useInternalTheme)(c);if(!_.isV3)return a.createElement(g,m({},y,{theme:_,style:d,ref:t}),o);const{colors:b}=_,v=[0,1,2,3,4,5],w=(0,l.isAnimatedValue)(n)?n.interpolate({inputRange:v,outputRange:v.map((e=>{var t;return null===(t=b.elevation)||void 0===t?void 0:t[`level${e}`]}))}):null===(F=b.elevation)||void 0===F?void 0:F[`level${n}`];var F;const k="elevated"===f;{const{pointerEvents:e="auto"}=y;return a.createElement(i.default.View,m({},y,{pointerEvents:e,ref:t,testID:h,style:[{backgroundColor:w},n&&k?(0,u.default)(n,_.isV3):null,d]}),o)}})),k=F},99599:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>g});var r=n(98587),a=n(36665),i=n(45548),o=n(74037),s=n(17993),l=n.n(s),u=n(85792);const c=e=>{let{theme:t,disabled:n,value:r,checkedColor:a}=e;return n?t.dark?u.grey800:u.grey400:r?a:t.dark?u.grey400:u.grey50},d=e=>{let{theme:t,disabled:n,value:r,checkedColor:a}=e;return n?t.dark?t.isV3?l()(u.white).alpha(.06).rgb().string():l()(u.white).alpha(.1).rgb().string():l()(u.black).alpha(.12).rgb().string():r?l()(a).alpha(.5).rgb().string():t.dark?u.grey700:"rgb(178, 175, 177)"};var h=n(16204);const f=["value","disabled","onValueChange","color","theme"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{value:t,disabled:n,onValueChange:i,color:s,theme:l}=e,u=(0,r.default)(e,f);const g=(0,h.useInternalTheme)(l),{checkedColor:y,onTintColor:_,thumbTintColor:b}=(e=>{let{theme:t,disabled:n,value:r,color:a}=e;const i=(e=>{let{theme:t,color:n}=e;return n||(t.isV3?t.colors.primary:t.colors.accent)})({theme:t,color:a});return{onTintColor:d({theme:t,disabled:n,value:r,checkedColor:i}),thumbTintColor:c({theme:t,disabled:n,value:r,checkedColor:i}),checkedColor:i}})({theme:g,disabled:n,value:t,color:s}),v=m&&0===m.major&&m.minor<=56?{onTintColor:_,thumbTintColor:b}:{activeTrackColor:_,thumbColor:b,activeThumbColor:y};return a.createElement(o.default,p({value:t,disabled:n,onValueChange:n?void 0:i},v,u))}},61092:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>xe});var r=n(98587),a=n(36665),i=n(15009),o=n(16773),s=n(35708),l=n(75675),u=n(6283);let c=function(e){return e.Icon="icon",e.Affix="affix",e}({}),d=function(e){return e.Right="right",e.Left="left",e}({}),h=function(e){return e.Outlined="outlined",e.Flat="flat",e}({});var f=n(17993),p=n.n(f);var m=n(16204);const g=24,y=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=t>0?t:0;return Math.floor((r-e)/2+n)},_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2?arguments[2]:void 0;const r=t>0?t:e;return t>0?t:r{const{height:t,multiline:n=!1}=e;let r=0;return n&&(r=t&&n?v(e):w(e)),Math.max(0,r)},v=e=>{const{dense:t}=e;return t?10:20},w=e=>{let{topPosition:t,fontSize:n,multiline:r,scale:a,dense:i,offset:o,isAndroid:s}=e;const l=a*n;let u=Math.floor(t/2);return u=u+Math.floor((l-n)/2)-(a<1?o/2:0),r&&s&&(u=Math.min(i?o/2:o,u)),u};function F(e){let{height:t,paddingTop:n,paddingBottom:r,affixHeight:a}=e;return n+(t-n-r-a)/2}function k(e){let{height:t,affixHeight:n,labelYOffset:r}=e;return(t-n+r)/2}const x=e=>{let{theme:t,textColor:n,disabled:r}=e;return n||(t.isV3?r?t.colors.onSurfaceDisabled:t.colors.onSurface:r?p()(t.colors.text).alpha(.54).rgb().string():t.colors.text)},A=e=>{let{theme:t,disabled:n,error:r,activeUnderlineColor:a,activeOutlineColor:i,mode:o}=e;const s="flat"===o?a:i;return r?t.colors.error:s||(n?t.isV3?t.colors.onSurfaceDisabled:p()(t.colors.text).alpha(.54).rgb().string():t.colors.primary)},S=e=>{let{theme:t,disabled:n}=e;return t.isV3?n?t.colors.onSurfaceDisabled:t.colors.onSurfaceVariant:n?t.colors.disabled:t.colors.placeholder},E=e=>{let{activeColor:t,customSelectionColor:n}=e;return"undefined"!==typeof n?n:t},C=e=>{var t,n;let{theme:r,disabled:a}=e;return r.isV3?a?p()(r.colors.onSurface).alpha(.04).rgb().string():r.colors.surfaceVariant:a?void 0:r.dark?p()(null===(t=r.colors)||void 0===t?void 0:t.background).lighten(.24).rgb().string():p()(null===(n=r.colors)||void 0===n?void 0:n.background).darken(.06).rgb().string()},T=e=>{let{theme:t,disabled:n,underlineColor:r}=e;return!n&&r?r:t.isV3?n?t.colors.onSurfaceDisabled:t.colors.onSurfaceVariant:n?"transparent":t.colors.disabled},D=e=>{let{theme:t,disabled:n,customOutlineColor:r}=e;const a=0===p()(r).alpha();return!n&&r?r:t.isV3?n?t.dark?"transparent":t.colors.surfaceDisabled:t.colors.outline:n?a?r:t.colors.disabled:t.colors.placeholder},I=e=>{let t,n,r,a,i,o,s,l,u;return e?(t=16,n=16,r=26,a=16,i=16,o=56,s=16,l=16,u=16):(t=12,n=12,r=30,a=12,i=8,o=64,s=14,l=12,u=8),{AFFIX_OFFSET:t,ICON_OFFSET:n,LABEL_PADDING_TOP:r,LABEL_PADDING_HORIZONTAL:a,FLAT_INPUT_OFFSET:i,MIN_HEIGHT:o,INPUT_PADDING_HORIZONTAL:s,ADORNMENT_OFFSET:l,OUTLINED_INPUT_OFFSET:u,MIN_WIDTH:100}},O=a.createContext({textStyle:{fontFamily:"",color:""},topPosition:null,side:d.Left}),P=e=>{let{affix:t,side:n,textStyle:r,topPosition:i,onLayout:o,visible:s,paddingHorizontal:l,maxFontSizeMultiplier:u,testID:c,disabled:d}=e;return a.createElement(O.Provider,{value:{side:n,textStyle:r,topPosition:i,onLayout:o,visible:s,paddingHorizontal:l,maxFontSizeMultiplier:u,testID:c,disabled:d}},t)},M=e=>{let{text:t,textStyle:n,theme:r,onLayout:o,onPress:l,accessibilityLabel:c=t}=e;const d=(0,m.useInternalTheme)(r),{AFFIX_OFFSET:h}=I(d.isV3),{textStyle:f,onLayout:g,topPosition:y,side:_,visible:b,paddingHorizontal:v,maxFontSizeMultiplier:w,testID:F,disabled:k}=a.useContext(O),x="number"===typeof v?v:h,A={top:y,[_]:x},S=function(e){var t;let{theme:n,disabled:r}=e;return n.isV3?r?n.colors.onSurfaceDisabled:n.colors.onSurfaceVariant:p()(null===(t=n.colors)||void 0===t?void 0:t.text).alpha(n.dark?.7:.54).rgb().string()}({theme:d,disabled:k}),E=a.createElement(u.default,{maxFontSizeMultiplier:w,style:[{color:S},f,n],onLayout:o,testID:`${F}-text`},t);return a.createElement(i.default.View,{style:[R.container,A,{opacity:(null===b||void 0===b?void 0:b.interpolate({inputRange:[0,1],outputRange:[1,0]}))||1}],onLayout:g,testID:F},l?a.createElement(s.default,{onPress:l,accessibilityRole:"button",accessibilityLabel:c},E):E)};M.displayName="TextInput.Affix";const R=l.default.create({container:{position:"absolute",justifyContent:"center",alignItems:"center"}}),L=M;var N=n(73929),B=n(61457);const j=["icon","onPress","forceTextInputFocus","color","theme","rippleColor"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t{},testID:""}),H=e=>{let{icon:t,topPosition:n,side:r,isTextInputFocused:i,forceFocus:o,testID:s,theme:l,disabled:u}=e;const{isV3:c}=(0,m.useInternalTheme)(l),{ICON_OFFSET:d}=I(c),h={style:{top:n,[r]:d},isTextInputFocused:i,forceFocus:o,testID:s,disabled:u};return a.createElement(z.Provider,{value:h},t)},U=e=>{let{icon:t,onPress:n,forceTextInputFocus:i=!0,color:o,theme:s,rippleColor:l}=e,u=(0,r.default)(e,j);const{style:c,isTextInputFocused:d,forceFocus:h,testID:f,disabled:p}=a.useContext(z),g=a.useCallback((e=>{i&&!d&&h(),null===n||void 0===n||n(e)}),[i,h,d,n]),y=function(e){let{theme:t,isTextInputFocused:n,disabled:r,customColor:a}=e;return"function"===typeof a?a(n):a||(t.isV3?r?t.colors.onSurfaceDisabled:t.colors.onSurfaceVariant:t.colors.text)}({theme:(0,m.useInternalTheme)(s),disabled:p,isTextInputFocused:d,customColor:o});return a.createElement(N.default,{style:[W.container,c]},a.createElement(B.default,V({icon:t,style:W.iconButton,size:24,onPress:g,iconColor:y,testID:f,theme:s,rippleColor:l},u)))};U.displayName="TextInput.Icon";const W=l.default.create({container:{position:"absolute",width:24,height:24,justifyContent:"center",alignItems:"center"},iconButton:{margin:0}}),q=U;var $=n(48623);const Y=e=>{let{parentState:t,error:n,colors:r,activeColor:o,underlineColorCustom:s,hasActiveOutline:l,style:u,theme:c}=e;const{isV3:d}=(0,m.useInternalTheme)(c);let h=t.focused?o:s;n&&(h=null===r||void 0===r?void 0:r.error);const f=d?2:1;return a.createElement(i.default.View,{testID:"text-input-underline",style:[G.underline,d&&G.md3Underline,{backgroundColor:h,transform:[{scaleY:(d?l:t.focused)?f:.5}]},u]})},G=l.default.create({underline:{position:"absolute",left:0,right:0,bottom:0,height:2,zIndex:1},md3Underline:{height:1}});function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{side:t,adornment:n}=e;if(n&&a.isValidElement(n)){let e;n.type===L?e=c.Affix:n.type===q&&(e=c.Icon),r.push({side:t,type:e})}})),r}function J(e){let{adornmentConfig:t,leftAffixWidth:n,rightAffixWidth:r,paddingHorizontal:a,inputOffset:i=0,mode:o,isV3:s}=e;const{OUTLINED_INPUT_OFFSET:l,ADORNMENT_OFFSET:u}=I(s);if(t.length){return t.map((e=>{let{type:t,side:s}=e;const f=s===d.Left,p=o===h.Outlined?u+l:u,m=`padding${Z(s)}`,g=(f?n:r)+("number"===typeof a?a:p),y=t===c.Affix,_=`margin${Z(s)}`;return{[_]:y?0:g,[m]:y?g:i}})).reduce(((e,t)=>Object.assign({},e,t)),{})}return[{}]}const Z=e=>e.charAt(0).toUpperCase()+e.slice(1),Q=e=>{let{adornmentConfig:t,left:n,right:r,onAffixChange:i,textStyle:o,visible:s,topPosition:l,isTextInputFocused:u,forceFocus:h,paddingHorizontal:f,maxFontSizeMultiplier:p,theme:m,disabled:g}=e;return t.length?a.createElement(a.Fragment,null,t.map((e=>{let t,{type:y,side:_}=e;_===d.Left?t=n:_===d.Right&&(t=r);const b={side:_,testID:`${_}-${y}-adornment`,isTextInputFocused:u,paddingHorizontal:f,disabled:g};return y===c.Icon?a.createElement(H,X({},b,{theme:m,key:_,icon:t,topPosition:l[c.Icon],forceFocus:h})):y===c.Affix?a.createElement(P,X({},b,{key:_,topPosition:l[c.Affix][_],affix:t,textStyle:o,onLayout:i[_],visible:s,maxFontSizeMultiplier:p})):null}))):null};var ee=n(40558),te=n(66220);const ne=l.default.create({overflow:{overflow:"hidden"},labelContainer:{zIndex:3}}),re=a.memo((e=>{const{labeled:t,wiggle:n,error:r,focused:o,opacity:s,labelLayoutWidth:u,labelLayoutHeight:c,labelBackground:d,label:h,labelError:f,onLayoutAnimatedText:p,onLabelTextLayout:m,hasActiveOutline:g,activeColor:y,placeholderStyle:_,baseLabelTranslateX:b,baseLabelTranslateY:v,font:w,fontSize:F,lineHeight:k,fontWeight:x,placeholderOpacity:A,wiggleOffsetX:S,labelScale:E,topPosition:C,paddingLeft:T,paddingRight:D,backgroundColor:O,roundness:P,placeholderColor:M,errorColor:R,labelTranslationXOffset:L,maxFontSizeMultiplier:B,testID:j,isV3:V,inputContainerLayout:z,scaledLabel:H}=e,{INPUT_PADDING_HORIZONTAL:U}=I(V),{width:W}=(0,ee.default)(),q=T&&D?{paddingLeft:T,paddingRight:D}:{},$={transform:[{translateX:t.interpolate({inputRange:[0,1],outputRange:[b,L||0]})}]},Y=Object.assign({},w,{fontSize:F,lineHeight:k,fontWeight:x,opacity:t.interpolate({inputRange:[0,1],outputRange:[g?1:0,0]}),transform:[{translateX:n?r.interpolate({inputRange:[0,.5,1],outputRange:[0,S,0]}):0},{translateY:0!==v?t.interpolate({inputRange:[0,1],outputRange:[v,0]}):0},{scale:0!==E?t.interpolate({inputRange:[0,1],outputRange:[E,1]}):t}]}),G=(z.width+U/2)/(H?E:1),X=[_,{top:C},{maxWidth:G},Y,q||{}],K=f&&R?R:M;return a.createElement(N.default,{pointerEvents:"none",style:[l.default.absoluteFill,ne.overflow]},a.createElement(i.default.View,{pointerEvents:"none",style:[l.default.absoluteFill,ne.labelContainer,!1,{opacity:s},$]},a.createElement(N.default,{style:{width:G}},null===d||void 0===d?void 0:d({labeled:t,labelLayoutWidth:u,labelLayoutHeight:c,labelStyle:Y,placeholderStyle:_,baseLabelTranslateX:b,topPosition:C,label:h,backgroundColor:O,roundness:P,maxFontSizeMultiplier:B,testID:j}),a.createElement(te.default,{variant:"bodySmall",onLayout:p,onTextLayout:m,style:[X,{color:y}],numberOfLines:1,maxFontSizeMultiplier:B,testID:`${j}-label-active`},h),a.createElement(te.default,{variant:o?"bodyLarge":"bodySmall",style:[X,{color:K,opacity:A}],numberOfLines:1,maxFontSizeMultiplier:B,testID:`${j}-label-inactive`},h))))})),ae=["disabled","editable","label","error","selectionColor","cursorColor","underlineColor","underlineStyle","activeUnderlineColor","textColor","dense","style","theme","render","multiline","parentState","innerRef","onFocus","forceFocus","onBlur","onChangeText","onLayoutAnimatedText","onLabelTextLayout","onLeftAffixLayoutChange","onRightAffixLayoutChange","onInputLayout","left","right","placeholderTextColor","testID","contentStyle","scaledLabel"],ie=["fontSize","lineHeight","fontWeight","height","paddingHorizontal","textAlign"];function oe(){return oe=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{disabled:t=!1,editable:n=!0,label:s,error:u=!1,selectionColor:f,cursorColor:p,underlineColor:m,underlineStyle:v,activeUnderlineColor:w,textColor:k,dense:D,style:O,theme:P,render:M=e=>a.createElement(o.default,e),multiline:R=!1,parentState:L,innerRef:B,onFocus:j,forceFocus:V,onBlur:z,onChangeText:H,onLayoutAnimatedText:U,onLabelTextLayout:W,onLeftAffixLayoutChange:q,onRightAffixLayoutChange:G,onInputLayout:X,left:Z,right:ee,placeholderTextColor:te,testID:ne="text-input-flat",contentStyle:se,scaledLabel:ue}=e,ce=(0,r.default)(e,ae);const de=!1,{colors:he,isV3:fe,roundness:pe}=P,me=fe?P.fonts.bodyLarge:P.fonts.regular,ge=L.focused||u,{LABEL_PADDING_TOP:ye,FLAT_INPUT_OFFSET:_e,MIN_HEIGHT:be,MIN_WIDTH:ve}=I(fe),we=l.default.flatten(O)||{},{fontSize:Fe,lineHeight:ke,fontWeight:xe,height:Ae,paddingHorizontal:Se,textAlign:Ee}=we,Ce=(0,r.default)(we,ie),Te=Fe||16,De=ke||1.2*Te,Ie=void 0!==Se&&"number"===typeof Se,Oe=K({left:Z,right:ee});let{paddingLeft:Pe,paddingRight:Me}=(e=>{let{adornmentConfig:t,isV3:n}=e;const{LABEL_PADDING_HORIZONTAL:r,ADORNMENT_OFFSET:a,FLAT_INPUT_OFFSET:i}=I(n);let o=r,s=r;return t.forEach((e=>{let{type:t,side:n}=e;t===c.Icon&&n===d.Left?o=g+a+i:n===d.Right&&(t===c.Affix||t===c.Icon)&&(s=g+a+i)})),{paddingLeft:o,paddingRight:s}})({adornmentConfig:Oe,isV3:fe});Ie&&(Pe=Se,Me=Se);const{leftLayout:Re,rightLayout:Le}=L,Ne=J({adornmentConfig:Oe,rightAffixWidth:ee&&Le.width||g,leftAffixWidth:Z&&Re.width||g,paddingHorizontal:Se,inputOffset:_e,mode:h.Flat,isV3:fe}),{inputTextColor:Be,activeColor:je,underlineColorCustom:Ve,placeholderColor:ze,errorColor:He,backgroundColor:Ue,selectionColor:We}=(e=>{let{underlineColor:t,activeUnderlineColor:n,customSelectionColor:r,textColor:a,disabled:i,error:o,theme:s}=e;const l={theme:s,disabled:i},u=A(Object.assign({},l,{error:o,activeUnderlineColor:n,mode:"flat"}));return{inputTextColor:x(Object.assign({},l,{textColor:a})),activeColor:u,underlineColorCustom:T(Object.assign({},l,{underlineColor:t})),placeholderColor:S(l),selectionColor:E({activeColor:u,customSelectionColor:r}),errorColor:s.colors.error,backgroundColor:C(l)}})({underlineColor:m,activeUnderlineColor:w,customSelectionColor:f,textColor:k,disabled:t,error:u,theme:P}),qe={backgroundColor:Ue,borderTopLeftRadius:P.roundness,borderTopRightRadius:P.roundness},$e=12/Te,Ye=16/Te,Ge=L.labelLayout.width,Xe=L.labelLayout.height,Ke=Ge/2,Je=Xe/2,Ze=($.default.getConstants().isRTL?1:-1)*(Ke-$e*Ge/2)+(1-$e)*($.default.getConstants().isRTL?-1:1)*Pe,Qe=D?(s?52:40)-24:be-ye,et=_(Xe,Ae,Qe),tt=y(Xe,et,R&&Ae||Ae?0:Qe/2);Ae&&"number"!==typeof Ae&&console.warn("Currently we support only numbers in height prop");const nt={height:Ae?+Ae:null,labelHalfHeight:Je,offset:_e,multiline:R||null,dense:D||null,topPosition:tt,fontSize:Te,lineHeight:De,label:s,scale:Ye,isAndroid:de,styles:l.default.flatten(D?le.inputFlatDense:le.inputFlat)},rt=b(nt),at=(e=>{let{pad:t,scale:n,multiline:r,label:a,height:i,offset:o,dense:s,fontSize:l,isAndroid:u,styles:c}=e,d=t,h=d,f=d;const{paddingTop:p,paddingBottom:m}=c,g=n*l;if(!r)return a?{paddingTop:p,paddingBottom:m}:{paddingTop:d,paddingBottom:d};if(a)h=p,f=m,u||(s&&(h+=Math.min(d,g*n)-d/2),s||(h+=n<1?Math.min(o/2,g*n):Math.min(d,g*n)-o/2)),h=Math.floor(h);else{if(i)return{paddingTop:Math.max(0,(i-l)/2),paddingBottom:Math.max(0,(i-l)/2)};u||(s&&(d+=n<1?Math.min(o/2,l/2*n):Math.min(o/2,n)),s||(d+=n<1?Math.min(o,l*n):Math.min(l,o/2*n)),d=Math.floor(d),h=d,f=d)}return{paddingTop:Math.max(0,h),paddingBottom:Math.max(0,f)}})(Object.assign({},nt,{pad:rt})),it=-Je-(tt+-18),{current:ot}=a.useRef([new i.default.Value(0),new i.default.Value(1)]),st=ge?L.labeled:ot[L.labelLayout.measured?1:0],lt=L.displayPlaceholder?te??ze:"transparent",ut=Ae||(D?s?52:40:be),ct=et+(Ae?0:D?24:ye),dt=(ct-g)/2,ht=Re.height?F(Object.assign({height:ct},at,{affixHeight:Re.height})):null,ft=Le.height?F(Object.assign({height:ct},at,{affixHeight:Le.height})):null,pt={label:s,onLayoutAnimatedText:U,onLabelTextLayout:W,placeholderOpacity:st,labelError:u,placeholderStyle:le.placeholder,baseLabelTranslateY:it,baseLabelTranslateX:Ze,font:me,fontSize:Te,lineHeight:De,fontWeight:xe,labelScale:$e,wiggleOffsetX:4,topPosition:tt,paddingLeft:Pe,paddingRight:Me,hasActiveOutline:ge,activeColor:je,placeholderColor:ze,errorColor:He,roundness:pe,maxFontSizeMultiplier:ce.maxFontSizeMultiplier,testID:ne,contentStyle:se,inputContainerLayout:L.inputContainerLayout,labelTextLayout:L.labelTextLayout,opacity:L.value||L.focused?L.labelLayout.measured?1:0:1,isV3:fe},mt={[d.Left]:ht,[d.Right]:ft},gt={[d.Left]:q,[d.Right]:G};let yt={paddingHorizontal:Se,adornmentConfig:Oe,forceFocus:V,topPosition:{[c.Affix]:mt,[c.Icon]:dt},onAffixChange:gt,isTextInputFocused:L.focused,maxFontSizeMultiplier:ce.maxFontSizeMultiplier,disabled:t};return Oe.length&&(yt=Object.assign({},yt,{left:Z,right:ee,textStyle:Object.assign({},me,{fontSize:Te,lineHeight:De,fontWeight:xe}),visible:L.labeled})),a.createElement(N.default,{style:[qe,Ce]},a.createElement(Y,{style:v,hasActiveOutline:ge,parentState:L,underlineColorCustom:Ve,error:u,colors:he,activeColor:je,theme:P}),a.createElement(N.default,{onLayout:X,style:[le.labelContainer,{minHeight:ut}]},R&&!!s&&!t&&a.createElement(N.default,{testID:"patch-container",pointerEvents:"none",style:[l.default.absoluteFill,D?le.densePatchContainer:le.patchContainer,{backgroundColor:Ce.backgroundColor||qe.backgroundColor,left:Pe,right:Me}]}),s?a.createElement(re,oe({labeled:L.labeled,error:L.error,focused:L.focused,scaledLabel:ue,wiggle:Boolean(L.value&&pt.labelError),labelLayoutMeasured:L.labelLayout.measured,labelLayoutWidth:L.labelLayout.width,labelLayoutHeight:L.labelLayout.height},pt)):null,null===M||void 0===M?void 0:M(Object.assign({},ce,{ref:B,onChangeText:H,placeholder:ce.placeholder,editable:!t&&n,selectionColor:We,cursorColor:"undefined"===typeof p?je:p,placeholderTextColor:lt,onFocus:j,onBlur:z,underlineColorAndroid:"transparent",multiline:R,style:[le.input,R&&Ae?{height:ct}:{},at,Object.assign({paddingLeft:Pe,paddingRight:Me},me,{fontSize:Te,lineHeight:De,fontWeight:xe,color:Be,textAlignVertical:R?"top":"center",textAlign:Ee||($.default.getConstants().isRTL?"right":"left"),minWidth:Math.min(L.labelTextLayout.width+2*_e,ve)}),{outline:"none"},Ne,se],testID:ne}))),a.createElement(Q,yt))},le=l.default.create({placeholder:{position:"absolute",left:0},labelContainer:{paddingTop:0,paddingBottom:0,flexGrow:1},input:{margin:0,flexGrow:1},inputFlat:{paddingTop:24,paddingBottom:4},inputFlatDense:{paddingTop:22,paddingBottom:2},patchContainer:{height:24,zIndex:2},densePatchContainer:{height:22,zIndex:2}}),ue=e=>{let{isV3:t,label:n,activeColor:r,backgroundColor:i,hasActiveOutline:o,focused:s,outlineColor:l,roundness:u,style:c}=e;return a.createElement(N.default,{testID:"text-input-outline",pointerEvents:"none",style:[ce.outline,!n&&ce.noLabelOutline,{backgroundColor:i,borderRadius:u,borderWidth:(t?o:s)?2:1,borderColor:o?r:l},c]})},ce=l.default.create({outline:{position:"absolute",left:0,right:0,top:6,bottom:0},noLabelOutline:{top:0}}),de=e=>{let{labeled:t,labelLayoutWidth:n,labelLayoutHeight:r,placeholderStyle:o,baseLabelTranslateX:s,topPosition:u,backgroundColor:c,roundness:d,labelStyle:h,maxFontSizeMultiplier:f,testID:p}=e;const m=t.interpolate({inputRange:[0,.6],outputRange:[1,0]}),g={translateX:t.interpolate({inputRange:[0,1],outputRange:[-s,0]})},y={scaleY:t.interpolate({inputRange:[0,1],outputRange:[.2,1]})},_=[...h.transform,y];return[d>6?a.createElement(i.default.View,{key:"labelBackground-view",pointerEvents:"none",style:[l.default.absoluteFill,he.view,{backgroundColor:c,maxHeight:Math.max(d/3,2),bottom:Math.max(d,2),transform:[g],opacity:m}]}):null,a.createElement(te.default,{key:"labelBackground-text",testID:`${p}-label-background`,style:[o,h,he.outlinedLabel,{top:u+1,width:n-o.paddingHorizontal,height:r,backgroundColor:c,opacity:m,transform:_}],numberOfLines:1,maxFontSizeMultiplier:f})]},he=l.default.create({view:{position:"absolute",top:6,left:10,width:12},outlinedLabel:{position:"absolute",left:8,paddingHorizontal:0,color:"transparent"}}),fe=["disabled","editable","label","error","selectionColor","cursorColor","underlineColor","outlineColor","activeOutlineColor","outlineStyle","textColor","dense","style","theme","render","multiline","parentState","innerRef","onFocus","forceFocus","onBlur","onChangeText","onLayoutAnimatedText","onLabelTextLayout","onLeftAffixLayoutChange","onRightAffixLayoutChange","onInputLayout","onLayout","left","right","placeholderTextColor","testID","contentStyle","scaledLabel"],pe=["fontSize","fontWeight","lineHeight","height","backgroundColor","textAlign"];function me(){return me=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{disabled:t=!1,editable:n=!0,label:s,error:u=!1,selectionColor:h,cursorColor:f,outlineColor:p,activeOutlineColor:m,outlineStyle:v,textColor:w,dense:F,style:C,theme:T,render:O=e=>a.createElement(o.default,e),multiline:P=!1,parentState:M,innerRef:R,onFocus:L,forceFocus:B,onBlur:j,onChangeText:V,onLayoutAnimatedText:z,onLabelTextLayout:H,onLeftAffixLayoutChange:U,onRightAffixLayoutChange:W,onInputLayout:q,onLayout:Y,left:G,right:X,placeholderTextColor:Z,testID:ee="text-input-outlined",contentStyle:te,scaledLabel:ne}=e,ae=(0,r.default)(e,fe);const ie=K({left:G,right:X}),{colors:oe,isV3:se,roundness:le}=T,ce=se?T.fonts.bodyLarge:T.fonts.regular,he=M.focused||u,{INPUT_PADDING_HORIZONTAL:ge,MIN_HEIGHT:_e,ADORNMENT_OFFSET:be,MIN_WIDTH:ve}=I(se),we=l.default.flatten(C)||{},{fontSize:Fe,fontWeight:ke,lineHeight:xe,height:Ae,backgroundColor:Se=(null===oe||void 0===oe?void 0:oe.background),textAlign:Ee}=we,Ce=(0,r.default)(we,pe),Te=Fe||16,De=xe||1.2*Te,{inputTextColor:Ie,activeColor:Oe,outlineColor:Pe,placeholderColor:Me,errorColor:Re,selectionColor:Le}=(e=>{let{activeOutlineColor:t,customOutlineColor:n,customSelectionColor:r,textColor:a,disabled:i,error:o,theme:s}=e;const l={theme:s,disabled:i},u=A(Object.assign({},l,{error:o,activeOutlineColor:t,mode:"outlined"}));return{inputTextColor:x(Object.assign({},l,{textColor:a})),activeColor:u,outlineColor:D(Object.assign({},l,{customOutlineColor:n})),placeholderColor:S(l),selectionColor:E({activeColor:u,customSelectionColor:r}),errorColor:s.colors.error}})({activeOutlineColor:m,customOutlineColor:p,customSelectionColor:h,textColor:w,disabled:t,error:u,theme:T}),Ne=s?24:0,Be=s?8:0,je=s?-6:0,Ve=12/Te,ze=16/Te,He=M.labelLayout.width,Ue=M.labelLayout.height,We=He/2,qe=Ue/2,$e=($.default.getConstants().isRTL?1:-1)*(We-Ve*He/2-(Te-12)*Ve);let Ye=0;const Ge=ie.some((e=>{let{side:t,type:n}=e;return t===d.Left&&n===c.Icon})),Xe=ie.some((e=>{let{side:t,type:n}=e;return t===d.Right&&n===c.Icon}));Ge&&(Ye=($.default.getConstants().isRTL?-1:1)*(g+be-(se?0:8)));const Ke=_(Ue,Ae,(F?48:_e)-Be),Je=y(Ue,Ke,Be);Ae&&"number"!==typeof Ae&&console.warn("Currently we support only numbers in height prop");const Ze={height:Ae?+Ae:null,labelHalfHeight:qe,offset:Be,multiline:P||null,dense:F||null,topPosition:Je,fontSize:Te,lineHeight:De,label:s,scale:ze,isAndroid:!1,styles:l.default.flatten(F?ye.inputOutlinedDense:ye.inputOutlined)},Qe=b(Ze),et=(e=>{let{pad:t,multiline:n,label:r,scale:a,height:i,fontSize:o,lineHeight:s,dense:l,offset:u,isAndroid:c}=e;const d=s??o,h=a*o;let f=t;return c||!i||n?(!c&&n&&(l&&(f+=r&&a<1?Math.min(u,h/2*a):0),l||(f+=r?a<1?Math.min(u,h*a):Math.min(u/2,h*a):a<1?Math.min(u/2,h*a):0),f=Math.floor(f)),{paddingTop:f,paddingBottom:f}):{paddingTop:Math.max(0,(i-d)/2),paddingBottom:Math.max(0,(i-d)/2)}})(Object.assign({},Ze,{pad:Qe})),tt=-qe-(Je+je),{current:nt}=a.useRef([new i.default.Value(0),new i.default.Value(1)]),rt=he?M.labeled:nt[M.labelLayout.measured?1:0],at={position:"absolute",left:0,paddingHorizontal:ge},it=M.displayPlaceholder?Z??Me:"transparent",ot={label:s,onLayoutAnimatedText:z,onLabelTextLayout:H,placeholderOpacity:rt,labelError:u,placeholderStyle:at,baseLabelTranslateY:tt,baseLabelTranslateX:$e,font:ce,fontSize:Te,lineHeight:De,fontWeight:ke,labelScale:Ve,wiggleOffsetX:4,topPosition:Je,hasActiveOutline:he,activeColor:Oe,placeholderColor:Me,backgroundColor:"transparent"===Se?T.colors.background:Se,errorColor:Re,labelTranslationXOffset:Ye,roundness:le,maxFontSizeMultiplier:ae.maxFontSizeMultiplier,testID:ee,contentStyle:te,inputContainerLayout:{width:M.inputContainerLayout.width+(Xe||Ge?ge:0)},opacity:M.value||M.focused?M.labelLayout.measured?1:0:1,isV3:se},st=a.useCallback((e=>{q(e),null===Y||void 0===Y||Y(e)}),[Y,q]),lt=Ae||(F?48:_e),ut=Ke+(F?Ne/2:Be),{leftLayout:ct,rightLayout:dt}=M,ht=k({height:ut,affixHeight:ct.height||0,labelYOffset:-je}),ft=k({height:ut,affixHeight:dt.height||0,labelYOffset:-je}),pt=k({height:ut,affixHeight:g,labelYOffset:-je}),mt=J({adornmentConfig:ie,rightAffixWidth:X&&dt.width||g,leftAffixWidth:G&&ct.width||g,mode:"outlined",isV3:se}),gt={[d.Left]:ht,[d.Right]:ft},yt={[d.Left]:U,[d.Right]:W};let _t={adornmentConfig:ie,forceFocus:B,topPosition:{[c.Icon]:pt,[c.Affix]:gt},onAffixChange:yt,isTextInputFocused:M.focused,maxFontSizeMultiplier:ae.maxFontSizeMultiplier,disabled:t};return ie.length&&(_t=Object.assign({},_t,{left:G,right:X,textStyle:Object.assign({},ce,{fontSize:Te,lineHeight:De,fontWeight:ke}),visible:M.labeled})),a.createElement(N.default,{style:Ce},a.createElement(ue,{isV3:se,style:v,label:s,roundness:le,hasActiveOutline:he,focused:M.focused,activeColor:Oe,outlineColor:Pe,backgroundColor:Se}),a.createElement(N.default,{style:[ye.labelContainer,{paddingTop:Be,minHeight:lt}]},s?a.createElement(re,me({labeled:M.labeled,error:M.error,focused:M.focused,scaledLabel:ne,wiggle:Boolean(M.value&&ot.labelError),labelLayoutMeasured:M.labelLayout.measured,labelLayoutWidth:M.labelLayout.width,labelLayoutHeight:M.labelLayout.height},ot,{labelBackground:de,maxFontSizeMultiplier:ae.maxFontSizeMultiplier})):null,null===O||void 0===O?void 0:O(Object.assign({},ae,{ref:R,onLayout:st,onChangeText:V,placeholder:ae.placeholder,editable:!t&&n,selectionColor:Le,cursorColor:"undefined"===typeof f?Oe:f,placeholderTextColor:it,onFocus:L,onBlur:j,underlineColorAndroid:"transparent",multiline:P,style:[ye.input,!P||P&&Ae?{height:Ke}:{},et,Object.assign({},ce,{fontSize:Te,lineHeight:De,fontWeight:ke,color:Ie,textAlignVertical:P?"top":"center",textAlign:Ee||($.default.getConstants().isRTL?"right":"left"),paddingHorizontal:ge,minWidth:Math.min(M.labelTextLayout.width+2*ge,ve)}),{outline:"none"},mt,te],testID:ee}))),a.createElement(Q,_t))},ye=l.default.create({labelContainer:{paddingBottom:0,flexGrow:1},input:{margin:0,flexGrow:1},inputOutlined:{paddingTop:8,paddingBottom:8},inputOutlinedDense:{paddingTop:4,paddingBottom:4}});var _e=n(66255);const be=e=>Math.round(1e3*e)/1e3,ve=["mode","dense","disabled","error","multiline","editable","contentStyle","render","theme"];function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;ta.createElement(o.default,e),ke=(0,_e.forwardRef)(((e,t)=>{let{mode:n="flat",dense:o=!1,disabled:s=!1,error:l=!1,multiline:u=!1,editable:c=!0,contentStyle:d,render:h=Fe,theme:f}=e,p=(0,r.default)(e,ve);const g=(0,m.useInternalTheme)(f),y=void 0!==p.value,_=y?p.value:p.defaultValue,{current:b}=a.useRef(new i.default.Value(_?0:1)),{current:v}=a.useRef(new i.default.Value(l?1:0)),[w,F]=a.useState(!1),[k,x]=a.useState(!1),[A,S]=a.useState(_),E=y?p.value:A,[C,T]=a.useState({width:33}),[D,I]=a.useState({width:65}),[O,P]=a.useState({measured:!1,width:0,height:0}),[M,R]=a.useState({width:null,height:null}),[L,N]=a.useState({width:null,height:null}),B=a.useRef(),j=a.useRef(),{scale:V}=g.animation;a.useImperativeHandle(t,(()=>({focus:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.focus()},clear:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.clear()},setNativeProps:e=>{var t;return null===(t=j.current)||void 0===t?void 0:t.setNativeProps(e)},isFocused:()=>{var e;return(null===(e=j.current)||void 0===e?void 0:e.isFocused())||!1},blur:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.blur()},forceFocus:()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.focus()}}))),a.useEffect((()=>{l?i.default.timing(v,{toValue:1,duration:150*V,useNativeDriver:!0}).start():i.default.timing(v,{toValue:0,duration:180*V,useNativeDriver:!0}).start()}),[l,V,v]),a.useEffect((()=>(w||!p.label?p.placeholder&&(B.current=setTimeout((()=>x(!0)),50)):x(!1),()=>{B.current&&clearTimeout(B.current)})),[w,p.label,p.placeholder]),a.useEffect((()=>{b.stopAnimation(),E||w?i.default.timing(b,{toValue:0,duration:180*V,useNativeDriver:!0}).start():i.default.timing(b,{toValue:1,duration:150*V,useNativeDriver:!0}).start()}),[w,E,b,V]);const z=a.useCallback((e=>{const t=be(e.nativeEvent.layout.height),n=be(e.nativeEvent.layout.width);n===M.width&&t===M.height||R({width:n,height:t})}),[M.height,M.width]),H=a.useCallback((e=>{const t=be(e.nativeEvent.layout.width),n=be(e.nativeEvent.layout.height);t===L.width&&n===L.height||N({width:t,height:n})}),[L.height,L.width]),U=e=>{var t;!s&&c&&(F(!0),null===(t=p.onFocus)||void 0===t||t.call(p,e))},W=e=>{var t;c&&(F(!1),null===(t=p.onBlur)||void 0===t||t.call(p,e))},q=e=>{var t;c&&!s&&(y||S(e),null===(t=p.onChangeText)||void 0===t||t.call(p,e))},$=a.useCallback((e=>{const t=be(e.nativeEvent.layout.width),n=be(e.nativeEvent.layout.height);t===O.width&&n===O.height||P({width:t,height:n,measured:!0})}),[O.height,O.width]),Y=a.useCallback((e=>{let{nativeEvent:t}=e;T({width:t.lines.reduce(((e,t)=>e+Math.ceil(t.width)),0)})}),[]),G=a.useCallback((e=>{let{nativeEvent:{layout:t}}=e;I({width:t.width})}),[]),X=a.useCallback((()=>{var e;return null===(e=j.current)||void 0===e?void 0:e.focus()}),[]),{maxFontSizeMultiplier:K=1.5}=p,J=!(!E&&!w);return"outlined"===n?a.createElement(ge,we({dense:o,disabled:s,error:l,multiline:u,editable:c,render:h},p,{theme:g,value:E,parentState:{labeled:b,error:v,focused:w,displayPlaceholder:k,value:E,labelTextLayout:C,labelLayout:O,leftLayout:M,rightLayout:L,inputContainerLayout:D},innerRef:e=>{j.current=e},onFocus:U,forceFocus:X,onBlur:W,onChangeText:q,onLayoutAnimatedText:$,onInputLayout:G,onLabelTextLayout:Y,onLeftAffixLayoutChange:z,onRightAffixLayoutChange:H,maxFontSizeMultiplier:K,contentStyle:d,scaledLabel:J})):a.createElement(se,we({dense:o,disabled:s,error:l,multiline:u,editable:c,render:h},p,{theme:g,value:E,parentState:{labeled:b,error:v,focused:w,displayPlaceholder:k,value:E,labelTextLayout:C,labelLayout:O,leftLayout:M,rightLayout:L,inputContainerLayout:D},innerRef:e=>{j.current=e},onFocus:U,forceFocus:X,onBlur:W,onInputLayout:G,onChangeText:q,onLayoutAnimatedText:$,onLabelTextLayout:Y,onLeftAffixLayoutChange:z,onRightAffixLayoutChange:H,maxFontSizeMultiplier:K,contentStyle:d,scaledLabel:J}))}));ke.Icon=q,ke.Affix=L;const xe=ke},53116:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>b});var r=n(98587),a=n(36665),i=n(75675),o=n(17993),s=n.n(o);const l=n(35708).default,u=e=>{let{theme:t,calculatedRippleColor:n,underlayColor:r}=e;return null!=r?r:t.isV3?s()(n).rgb().string():s()(n).fade(.5).rgb().string()},c=e=>{let{theme:t,rippleColor:n,underlayColor:r}=e;const a=(e=>{let{theme:t,rippleColor:n}=e;return n||(t.isV3?s()(t.colors.onSurface).alpha(.12).rgb().string():t.dark?s()(t.colors.text).alpha(.32).rgb().string():s()(t.colors.text).alpha(.2).rgb().string())})({theme:t,rippleColor:n});return{calculatedRippleColor:a,calculatedUnderlayColor:u({theme:t,calculatedRippleColor:a,underlayColor:r})}};var d=n(93570),h=n(16204),f=n(66255),p=n(23248);const m=["style","background","borderless","disabled","rippleColor","underlayColor","children","theme"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,borderless:i=!1,disabled:o,rippleColor:u,children:f,theme:y}=e,b=(0,r.default)(e,m);const v=(0,h.useInternalTheme)(y),{calculatedRippleColor:w}=c({theme:v,rippleColor:u}),F=s()(w).fade(.5).rgb().string(),{rippleEffectEnabled:k}=a.useContext(d.SettingsContext),{onPress:x,onLongPress:A,onPressIn:S,onPressOut:E}=b,C=a.useCallback((e=>{if(null===S||void 0===S||S(e),k){const{centered:t}=b,n=e.currentTarget,r=window.getComputedStyle(n),a=n.getBoundingClientRect();let i,o;const{changedTouches:s,touches:l}=e.nativeEvent,u=(null===l||void 0===l?void 0:l[0])??(null===s||void 0===s?void 0:s[0]);t||!u?(i=a.width/2,o=a.height/2):(i=u.locationX??e.pageX,o=u.locationY??e.pageY);const c=t?1.25*Math.min(a.width,a.height):2*Math.max(a.width,a.height),d=document.createElement("span");d.setAttribute("data-paper-ripple",""),Object.assign(d.style,{position:"absolute",pointerEvents:"none",top:"0",left:"0",right:"0",bottom:"0",borderTopLeftRadius:r.borderTopLeftRadius,borderTopRightRadius:r.borderTopRightRadius,borderBottomRightRadius:r.borderBottomRightRadius,borderBottomLeftRadius:r.borderBottomLeftRadius,overflow:t?"visible":"hidden"});const h=document.createElement("span");Object.assign(h.style,{position:"absolute",pointerEvents:"none",backgroundColor:w,borderRadius:"50%",transitionProperty:"transform opacity",transitionDuration:`${Math.min(1.5*c,350)}ms`,transitionTimingFunction:"linear",transformOrigin:"center",transform:"translate3d(-50%, -50%, 0) scale3d(0.1, 0.1, 0.1)",opacity:"0.5",left:`${i}px`,top:`${o}px`,width:`${c}px`,height:`${c}px`}),d.appendChild(h),n.appendChild(d),requestAnimationFrame((()=>{requestAnimationFrame((()=>{Object.assign(h.style,{transform:"translate3d(-50%, -50%, 0) scale3d(1, 1, 1)",opacity:"1"})}))}))}}),[S,b,k,w]),T=a.useCallback((e=>{if(null===E||void 0===E||E(e),k){const t=e.currentTarget.querySelectorAll("[data-paper-ripple]");requestAnimationFrame((()=>{requestAnimationFrame((()=>{t.forEach((e=>{const t=e.firstChild;Object.assign(t.style,{transitionDuration:"250ms",opacity:0}),setTimeout((()=>{const{parentNode:t}=e;t&&t.removeChild(e)}),500)}))}))}))}}),[E,k]),D=(0,p.default)({onPress:x,onLongPress:A,onPressIn:S,onPressOut:E}),I=o||!D;return a.createElement(l,g({},b,{ref:t,onPressIn:C,onPressOut:T,disabled:I,style:e=>[_.touchable,i&&_.borderless,e.hovered&&{backgroundColor:F},"function"===typeof n?n(e):n]}),(e=>a.Children.only("function"===typeof f?f(e):f)))};y.supported=!0;const _=i.default.create({touchable:Object.assign({position:"relative"},{cursor:"pointer",transition:"150ms background-color"}),borderless:{overflow:"hidden"}}),b=(0,f.forwardRef)(y)},66220:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customAnimatedText:()=>f,default:()=>p});var r=n(98587),a=n(36665),i=n(15009),o=n(48623),s=n(75675),l=n(16204);const u=["style","theme","variant"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;td,p=d},18885:(e,t,n)=>{"use strict";n.r(t),n.d(t,{customText:()=>g,default:()=>y});var r=n(98587),a=n(36665),i=n(48623),o=n(75675),s=n(6283),l=n(66220),u=n(36589),c=n(16204),d=n(66255);const h=["style","variant","theme"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{style:n,variant:o,theme:d}=e,g=(0,r.default)(e,h);const y=a.useRef(null),_=(0,c.useInternalTheme)(d),b=i.default.getConstants().isRTL?"rtl":"ltr";if(a.useImperativeHandle(t,(()=>({setNativeProps:e=>{var t;return null===(t=y.current)||void 0===t?void 0:t.setNativeProps(e)}}))),_.isV3&&o){let e=_.fonts[o],t=[e,n];if(a.isValidElement(g.children)&&(g.children.type===m||g.children.type===l.default||g.children.type===u.default)){const{props:r}=g.children;r.variant&&(e=_.fonts[r.variant],t=[n,e]),r.variant||(t=[n,r.style])}if("object"!==typeof e)throw new Error(`Variant ${o} was not provided properly. Valid variants are ${Object.keys(_.fonts).join(", ")}.`);return a.createElement(s.default,f({ref:y,style:[p.text,{writingDirection:b,color:_.colors.onSurface},t]},g))}{var v,w;const e=_.isV3?_.fonts.default:null===(v=_.fonts)||void 0===v?void 0:v.regular,t=Object.assign({},e,{color:_.isV3?null===(w=_.colors)||void 0===w?void 0:w.onSurface:_.colors.text});return a.createElement(s.default,f({},g,{ref:y,style:[p.text,t,{writingDirection:b},n]}))}})),g=()=>m,y=m},36589:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>b});var r=n(98587),a=n(36665),i=n(48623),o=n(75675),s=n(17993),l=n.n(s),u=n(6283),c=n(16204),d=n(66255);const h=["style","theme"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var n,i;let{style:o,theme:s}=e,l=(0,r.default)(e,h);const d=a.useRef(null),m=(0,c.useInternalTheme)(s);return a.useImperativeHandle(t,(()=>({setNativeProps:e=>{var t;return null===(t=d.current)||void 0===t?void 0:t.setNativeProps(e)}}))),a.createElement(u.default,f({},l,{ref:d,style:[Object.assign({},!m.isV3&&(null===(n=m.fonts)||void 0===n?void 0:n.regular),{color:m.isV3?null===(i=m.colors)||void 0===i?void 0:i.onSurface:m.colors.text}),p.text,o]}))})),g=["alpha","family","style","theme"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var t,n;let{alpha:o=1,family:s,style:u,theme:d}=e,h=(0,r.default)(e,g);const f=(0,c.useInternalTheme)(d),p=l()(f.isV3?f.colors.onSurface:null===(t=f.colors)||void 0===t?void 0:t.text).alpha(o).rgb().string(),b=i.default.getConstants().isRTL?"rtl":"ltr";return a.createElement(m,y({},h,{style:[_.text,Object.assign({color:p},!f.isV3&&(null===(n=f.fonts)||void 0===n?void 0:n[s]),{writingDirection:b}),u]}))}},21055:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>s});var r=n(36665),a=n(75675),i=n(36589);function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;tr.createElement(i.default,o({},e,{alpha:.87,family:"medium",style:[l.text,e.style]})),l=a.default.create({text:{fontSize:20,lineHeight:30,marginVertical:2,letterSpacing:.15}})},8218:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>v});var r=n(36665),a=n(77900),i=n(70414),o=n(26725),s=n(75675),l=n(73929),u=n(78833);const{width:c=0,height:d=0}=o.default.get("window"),h={frame:{x:0,y:0,width:c,height:d},insets:{top:0,left:0,right:0,bottom:0}};function f(e){let{children:t,style:n}=e;return r.createElement(u.SafeAreaInsetsContext.Consumer,null,(e=>e?r.createElement(l.default,{style:[p.container,n]},t):r.createElement(u.SafeAreaProvider,{initialMetrics:h,style:n},t)))}f.initialMetrics=h;const p=s.default.create({container:{flex:1}});var m=n(93570),g=n(16204),y=n(75215),_=n(32424),b=n(71232);const v=e=>{const t=e.theme&&1===Object.keys(e.theme).length&&e.theme.version,n=(!e.theme||t)&&(null===i.default||void 0===i.default?void 0:i.default.getColorScheme())||"light",[o,s]=r.useState(!1),[l,u]=r.useState(n),c=e=>{const{colorScheme:t}=e;u(t)};r.useEffect((()=>{let t;return e.theme||(t=(0,b.addEventListener)(a.default,"reduceMotionChanged",s)),()=>{var n;e.theme||(null===(n=t)||void 0===n||n.remove())}}),[e.theme]),r.useEffect((()=>{let n;return e.theme&&!t||(n=null===i.default||void 0===i.default?void 0:i.default.addChangeListener(c)),()=>{e.theme&&!t||(n?n.remove():null===i.default||void 0===i.default||i.default.removeChangeListener(c))}}),[e.theme,t]);const{children:d,settings:h}=e;return r.createElement(f,null,r.createElement(_.default,null,r.createElement(m.Provider,{value:Object.assign({icon:y.default,rippleEffectEnabled:!0},h)},r.createElement(g.ThemeProvider,{theme:(()=>{var t,n;const r=(null===(t=e.theme)||void 0===t?void 0:t.version)||3,a=l||"light",i=g.defaultThemesByVersion[r][a],s=Object.assign({},i,e.theme,{version:r,animation:Object.assign({},null===(n=e.theme)||void 0===n?void 0:n.animation,{scale:o?0:1})});return Object.assign({},s,{isV3:3===s.version})})()},d))))}},93570:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Consumer:()=>s,Provider:()=>o,SettingsContext:()=>i});var r=n(36665),a=n(75215);const i=r.createContext({icon:a.default,rippleEffectEnabled:!0}),{Provider:o,Consumer:s}=i},16204:(e,t,n)=>{"use strict";n.r(t),n.d(t,{DefaultTheme:()=>g,ThemeProvider:()=>y,adaptNavigationTheme:()=>A,defaultThemesByVersion:()=>k,getDynamicThemeElevations:()=>S,getTheme:()=>x,useAppTheme:()=>b,useInternalTheme:()=>w,useTheme:()=>v,withInternalTheme:()=>F,withTheme:()=>_});var r=n(71204),a=n(17993),i=n.n(a),o=n(17659),s=n(45e3);const{palette:l,opacity:u}=o.tokens.md.ref,c={dark:!1,roundness:4,version:3,isV3:!0,colors:{primary:l.primary40,primaryContainer:l.primary90,secondary:l.secondary40,secondaryContainer:l.secondary90,tertiary:l.tertiary40,tertiaryContainer:l.tertiary90,surface:l.neutral99,surfaceVariant:l.neutralVariant90,surfaceDisabled:i()(l.neutral10).alpha(u.level2).rgb().string(),background:l.neutral99,error:l.error40,errorContainer:l.error90,onPrimary:l.primary100,onPrimaryContainer:l.primary10,onSecondary:l.secondary100,onSecondaryContainer:l.secondary10,onTertiary:l.tertiary100,onTertiaryContainer:l.tertiary10,onSurface:l.neutral10,onSurfaceVariant:l.neutralVariant30,onSurfaceDisabled:i()(l.neutral10).alpha(u.level4).rgb().string(),onError:l.error100,onErrorContainer:l.error10,onBackground:l.neutral10,outline:l.neutralVariant50,outlineVariant:l.neutralVariant80,inverseSurface:l.neutral20,inverseOnSurface:l.neutral95,inversePrimary:l.primary80,shadow:l.neutral0,scrim:l.neutral0,backdrop:i()(o.MD3Colors.neutralVariant20).alpha(.4).rgb().string(),elevation:{level0:"transparent",level1:"rgb(247, 243, 249)",level2:"rgb(243, 237, 246)",level3:"rgb(238, 232, 244)",level4:"rgb(236, 230, 243)",level5:"rgb(233, 227, 241)"}},fonts:(0,s.default)(),animation:{scale:1}};var d=n(31333),h=n(20787);const{palette:f,opacity:p}=o.tokens.md.ref,m=Object.assign({},c,{dark:!0,mode:"adaptive",version:3,isV3:!0,colors:{primary:f.primary80,primaryContainer:f.primary30,secondary:f.secondary80,secondaryContainer:f.secondary30,tertiary:f.tertiary80,tertiaryContainer:f.tertiary30,surface:f.neutral10,surfaceVariant:f.neutralVariant30,surfaceDisabled:i()(f.neutral90).alpha(p.level2).rgb().string(),background:f.neutral10,error:f.error80,errorContainer:f.error30,onPrimary:f.primary20,onPrimaryContainer:f.primary90,onSecondary:f.secondary20,onSecondaryContainer:f.secondary90,onTertiary:f.tertiary20,onTertiaryContainer:f.tertiary90,onSurface:f.neutral90,onSurfaceVariant:f.neutralVariant80,onSurfaceDisabled:i()(f.neutral90).alpha(p.level4).rgb().string(),onError:f.error20,onErrorContainer:f.error80,onBackground:f.neutral90,outline:f.neutralVariant60,outlineVariant:f.neutralVariant30,inverseSurface:f.neutral90,inverseOnSurface:f.neutral20,inversePrimary:f.primary40,shadow:f.neutral0,scrim:f.neutral0,backdrop:i()(o.MD3Colors.neutralVariant20).alpha(.4).rgb().string(),elevation:{level0:"transparent",level1:"rgb(37, 35, 42)",level2:"rgb(44, 40, 49)",level3:"rgb(49, 44, 56)",level4:"rgb(51, 46, 58)",level5:"rgb(52, 49, 63)"}}}),g=c,{ThemeProvider:y,withTheme:_,useTheme:b}=(0,r.createTheming)(c);function v(e){return b(e)}const w=e=>b(e),F=e=>_(e),k={2:{light:d.MD2LightTheme,dark:h.MD2DarkTheme},3:{light:c,dark:m}},x=function(){const e=arguments.length>0&&void 0!==arguments[0]&&arguments[0]?"dark":"light";return k[!(arguments.length>1&&void 0!==arguments[1])||arguments[1]?3:2][e]};function A(e){const{reactNavigationLight:t,reactNavigationDark:n,materialLight:r,materialDark:a}=e,i=(e,t)=>Object.assign({},e,{colors:Object.assign({},e.colors,{primary:t.colors.primary,background:t.colors.background,card:t.colors.elevation.level2,text:t.colors.onSurface,border:t.colors.outline,notification:t.colors.error})}),o={light:r||c,dark:a||m};if(t&&n){const e=["light","dark"],r={light:t,dark:n},{light:a,dark:s}=e.reduce(((e,t)=>Object.assign({},e,{[t]:i(r[t],o[t])})),{light:t,dark:n});return{LightTheme:a,DarkTheme:s}}return n?{DarkTheme:i(n,o.dark)}:{LightTheme:i(t,o.light)}}const S=e=>["transparent",.05,.08,.11,.12,.14].reduce(((t,n,r)=>Object.assign({},t,{[`level${r}`]:0===r?n:i()(e.surface).mix(i()(e.primary),n).rgb().string()})),{})},45e3:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o,fontConfig:()=>i});var r=n(95991),a=n(17659);const i={web:{regular:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"400"},medium:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"500"},light:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"300"},thin:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"100"}},ios:{regular:{fontFamily:"System",fontWeight:"400"},medium:{fontFamily:"System",fontWeight:"500"},light:{fontFamily:"System",fontWeight:"300"},thin:{fontFamily:"System",fontWeight:"100"}},default:{regular:{fontFamily:"sans-serif",fontWeight:"normal"},medium:{fontFamily:"sans-serif-medium",fontWeight:"normal"},light:{fontFamily:"sans-serif-light",fontWeight:"normal"},thin:{fontFamily:"sans-serif-thin",fontWeight:"normal"}}};function o(e){const{isV3:t=!0,config:n}=e||{};return t?function(e){return e?Object.keys(e).every((t=>"object"!==typeof e[t]))?Object.fromEntries(Object.entries(a.typescale).map((t=>{let[n,r]=t;return[n,Object.assign({},r,e)]}))):Object.assign({},a.typescale,...Object.entries(e).map((e=>{let[t,n]=e;return{[t]:Object.assign({},a.typescale[t],n)}}))):a.typescale}(n):function(e){return r.default.select(Object.assign({},i,e))}(n)}},6722:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,isAnimatedValue:()=>s});var r=n(15009),a=n(17993),i=n.n(a),o=n(20787);const s=e=>e instanceof r.default.Value;function l(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=o.MD2DarkTheme.colors)||void 0===t?void 0:t.surface;if(s(e)){const t=[0,1,2,3,8,24];return e.interpolate({inputRange:t,outputRange:t.map((e=>u(n,e)))})}return u(n,e)}function u(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return t=n>=1&&n<=24?c[n]:n>24?c[24]:c[1],i()(e).mix(i()("white"),.01*t).hex()}const c={1:5,2:7,3:8,4:9,5:10,6:11,7:11.5,8:12,9:12.5,10:13,11:13.5,12:14,13:14.25,14:14.5,15:14.75,16:15,17:15.12,18:15.24,19:15.36,20:15.48,21:15.6,22:15.72,23:15.84,24:16}},45856:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>c});var r=n(15009),a=n(85792),i=n(17659);const o=a.black,s=.24,l=.3,u=i.MD3Colors.primary0;function c(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]?function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const t=[0,1,2,3,4,5],n=[0,1,2,4,6,8],a=[0,3,6,8,10,12];return e instanceof r.default.Value?{shadowColor:u,shadowOffset:{width:new r.default.Value(0),height:e.interpolate({inputRange:t,outputRange:n})},shadowOpacity:e.interpolate({inputRange:[0,1],outputRange:[0,l],extrapolate:"clamp"}),shadowRadius:e.interpolate({inputRange:t,outputRange:a})}:{shadowColor:u,shadowOpacity:e?l:0,shadowOffset:{width:0,height:n[e]},shadowRadius:a[e]}}(e):function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e instanceof r.default.Value){const t=[0,1,2,3,8,24];return{shadowColor:o,shadowOffset:{width:new r.default.Value(0),height:e.interpolate({inputRange:t,outputRange:[0,.5,.75,2,7,23]})},shadowOpacity:e.interpolate({inputRange:[0,1],outputRange:[0,s],extrapolate:"clamp"}),shadowRadius:e.interpolate({inputRange:t,outputRange:[0,.75,1.5,3,8,24]})}}{if(0===e)return{};let t,n;switch(e){case 1:t=.5,n=.75;break;case 2:t=.75,n=1.5;break;default:t=e-1,n=e}return{shadowColor:o,shadowOffset:{width:0,height:t},shadowOpacity:s,shadowRadius:n}}}(e)}},20787:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MD2DarkTheme:()=>l});var r=n(17993),a=n.n(r),i=n(85792),o=n(31333),s=n(45e3);const l=Object.assign({},o.MD2LightTheme,{dark:!0,mode:"adaptive",version:2,isV3:!1,colors:Object.assign({},o.MD2LightTheme.colors,{primary:"#BB86FC",accent:"#03dac6",background:"#121212",surface:"#121212",error:"#CF6679",onSurface:"#FFFFFF",text:i.white,disabled:a()(i.white).alpha(.38).rgb().string(),placeholder:a()(i.white).alpha(.54).rgb().string(),backdrop:a()(i.black).alpha(.5).rgb().string(),notification:i.pinkA100,tooltip:"rgba(230, 225, 229, 1)"}),fonts:(0,s.default)({isV3:!1})})},31333:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MD2LightTheme:()=>s});var r=n(17993),a=n.n(r),i=n(85792),o=n(45e3);const s={dark:!1,roundness:4,version:2,isV3:!1,colors:{primary:"#6200ee",accent:"#03dac4",background:"#f6f6f6",surface:i.white,error:"#B00020",text:i.black,onSurface:"#000000",disabled:a()(i.black).alpha(.26).rgb().string(),placeholder:a()(i.black).alpha(.54).rgb().string(),backdrop:a()(i.black).alpha(.5).rgb().string(),notification:i.pinkA400,tooltip:"rgba(28, 27, 31, 1)"},fonts:(0,o.default)({isV3:!1}),animation:{scale:1}}},85792:(e,t,n)=>{"use strict";n.r(t),n.d(t,{amber100:()=>Sn,amber200:()=>En,amber300:()=>Cn,amber400:()=>Tn,amber50:()=>An,amber500:()=>Dn,amber600:()=>In,amber700:()=>On,amber800:()=>Pn,amber900:()=>Mn,amberA100:()=>Rn,amberA200:()=>Ln,amberA400:()=>Nn,amberA700:()=>Bn,black:()=>Ur,blue100:()=>we,blue200:()=>Fe,blue300:()=>ke,blue400:()=>xe,blue50:()=>ve,blue500:()=>Ae,blue600:()=>Se,blue700:()=>Ee,blue800:()=>Ce,blue900:()=>Te,blueA100:()=>De,blueA200:()=>Ie,blueA400:()=>Oe,blueA700:()=>Pe,blueGrey100:()=>xr,blueGrey200:()=>Ar,blueGrey300:()=>Sr,blueGrey400:()=>Er,blueGrey50:()=>kr,blueGrey500:()=>Cr,blueGrey600:()=>Tr,blueGrey700:()=>Dr,blueGrey800:()=>Ir,blueGrey900:()=>Or,brown100:()=>pr,brown200:()=>mr,brown300:()=>gr,brown400:()=>yr,brown50:()=>fr,brown500:()=>_r,brown600:()=>br,brown700:()=>vr,brown800:()=>wr,brown900:()=>Fr,cyan100:()=>Xe,cyan200:()=>Ke,cyan300:()=>Je,cyan400:()=>Ze,cyan50:()=>Ge,cyan500:()=>Qe,cyan600:()=>et,cyan700:()=>tt,cyan800:()=>nt,cyan900:()=>rt,cyanA100:()=>at,cyanA200:()=>it,cyanA400:()=>ot,cyanA700:()=>st,deepOrange100:()=>er,deepOrange200:()=>tr,deepOrange300:()=>nr,deepOrange400:()=>rr,deepOrange50:()=>Qn,deepOrange500:()=>ar,deepOrange600:()=>ir,deepOrange700:()=>or,deepOrange800:()=>sr,deepOrange900:()=>lr,deepOrangeA100:()=>ur,deepOrangeA200:()=>cr,deepOrangeA400:()=>dr,deepOrangeA700:()=>hr,deepPurple100:()=>Y,deepPurple200:()=>G,deepPurple300:()=>X,deepPurple400:()=>K,deepPurple50:()=>$,deepPurple500:()=>J,deepPurple600:()=>Z,deepPurple700:()=>Q,deepPurple800:()=>ee,deepPurple900:()=>te,deepPurpleA100:()=>ne,deepPurpleA200:()=>re,deepPurpleA400:()=>ae,deepPurpleA700:()=>ie,green100:()=>kt,green200:()=>xt,green300:()=>At,green400:()=>St,green50:()=>Ft,green500:()=>Et,green600:()=>Ct,green700:()=>Tt,green800:()=>Dt,green900:()=>It,greenA100:()=>Ot,greenA200:()=>Pt,greenA400:()=>Mt,greenA700:()=>Rt,grey100:()=>Mr,grey200:()=>Rr,grey300:()=>Lr,grey400:()=>Nr,grey50:()=>Pr,grey500:()=>Br,grey600:()=>jr,grey700:()=>Vr,grey800:()=>zr,grey900:()=>Hr,indigo100:()=>se,indigo200:()=>le,indigo300:()=>ue,indigo400:()=>ce,indigo50:()=>oe,indigo500:()=>de,indigo600:()=>he,indigo700:()=>fe,indigo800:()=>pe,indigo900:()=>me,indigoA100:()=>ge,indigoA200:()=>ye,indigoA400:()=>_e,indigoA700:()=>be,lightBlue100:()=>Re,lightBlue200:()=>Le,lightBlue300:()=>Ne,lightBlue400:()=>Be,lightBlue50:()=>Me,lightBlue500:()=>je,lightBlue600:()=>Ve,lightBlue700:()=>ze,lightBlue800:()=>He,lightBlue900:()=>Ue,lightBlueA100:()=>We,lightBlueA200:()=>qe,lightBlueA400:()=>$e,lightBlueA700:()=>Ye,lightGreen100:()=>Nt,lightGreen200:()=>Bt,lightGreen300:()=>jt,lightGreen400:()=>Vt,lightGreen50:()=>Lt,lightGreen500:()=>zt,lightGreen600:()=>Ht,lightGreen700:()=>Ut,lightGreen800:()=>Wt,lightGreen900:()=>qt,lightGreenA100:()=>$t,lightGreenA200:()=>Yt,lightGreenA400:()=>Gt,lightGreenA700:()=>Xt,lime100:()=>Jt,lime200:()=>Zt,lime300:()=>Qt,lime400:()=>en,lime50:()=>Kt,lime500:()=>tn,lime600:()=>nn,lime700:()=>rn,lime800:()=>an,lime900:()=>on,limeA100:()=>sn,limeA200:()=>ln,limeA400:()=>un,limeA700:()=>cn,orange100:()=>Vn,orange200:()=>zn,orange300:()=>Hn,orange400:()=>Un,orange50:()=>jn,orange500:()=>Wn,orange600:()=>qn,orange700:()=>$n,orange800:()=>Yn,orange900:()=>Gn,orangeA100:()=>Xn,orangeA200:()=>Kn,orangeA400:()=>Jn,orangeA700:()=>Zn,pink100:()=>b,pink200:()=>v,pink300:()=>w,pink400:()=>F,pink50:()=>_,pink500:()=>k,pink600:()=>x,pink700:()=>A,pink800:()=>S,pink900:()=>E,pinkA100:()=>C,pinkA200:()=>T,pinkA400:()=>D,pinkA700:()=>I,purple100:()=>P,purple200:()=>M,purple300:()=>R,purple400:()=>L,purple50:()=>O,purple500:()=>N,purple600:()=>B,purple700:()=>j,purple800:()=>V,purple900:()=>z,purpleA100:()=>H,purpleA200:()=>U,purpleA400:()=>W,purpleA700:()=>q,red100:()=>i,red200:()=>o,red300:()=>s,red400:()=>l,red50:()=>a,red500:()=>u,red600:()=>c,red700:()=>d,red800:()=>h,red900:()=>f,redA100:()=>p,redA200:()=>m,redA400:()=>g,redA700:()=>y,teal100:()=>ut,teal200:()=>ct,teal300:()=>dt,teal400:()=>ht,teal50:()=>lt,teal500:()=>ft,teal600:()=>pt,teal700:()=>mt,teal800:()=>gt,teal900:()=>yt,tealA100:()=>_t,tealA200:()=>bt,tealA400:()=>vt,tealA700:()=>wt,transparent:()=>r,white:()=>Wr,yellow100:()=>hn,yellow200:()=>fn,yellow300:()=>pn,yellow400:()=>mn,yellow50:()=>dn,yellow500:()=>gn,yellow600:()=>yn,yellow700:()=>_n,yellow800:()=>bn,yellow900:()=>vn,yellowA100:()=>wn,yellowA200:()=>Fn,yellowA400:()=>kn,yellowA700:()=>xn});const r="rgba(255, 255, 255, 0)",a="#ffebee",i="#ffcdd2",o="#ef9a9a",s="#e57373",l="#ef5350",u="#f44336",c="#e53935",d="#d32f2f",h="#c62828",f="#b71c1c",p="#ff8a80",m="#ff5252",g="#ff1744",y="#d50000",_="#fce4ec",b="#f8bbd0",v="#f48fb1",w="#f06292",F="#ec407a",k="#e91e63",x="#d81b60",A="#c2185b",S="#ad1457",E="#880e4f",C="#ff80ab",T="#ff4081",D="#f50057",I="#c51162",O="#f3e5f5",P="#e1bee7",M="#ce93d8",R="#ba68c8",L="#ab47bc",N="#9c27b0",B="#8e24aa",j="#7b1fa2",V="#6a1b9a",z="#4a148c",H="#ea80fc",U="#e040fb",W="#d500f9",q="#aa00ff",$="#ede7f6",Y="#d1c4e9",G="#b39ddb",X="#9575cd",K="#7e57c2",J="#673ab7",Z="#5e35b1",Q="#512da8",ee="#4527a0",te="#311b92",ne="#b388ff",re="#7c4dff",ae="#651fff",ie="#6200ea",oe="#e8eaf6",se="#c5cae9",le="#9fa8da",ue="#7986cb",ce="#5c6bc0",de="#3f51b5",he="#3949ab",fe="#303f9f",pe="#283593",me="#1a237e",ge="#8c9eff",ye="#536dfe",_e="#3d5afe",be="#304ffe",ve="#e3f2fd",we="#bbdefb",Fe="#90caf9",ke="#64b5f6",xe="#42a5f5",Ae="#2196f3",Se="#1e88e5",Ee="#1976d2",Ce="#1565c0",Te="#0d47a1",De="#82b1ff",Ie="#448aff",Oe="#2979ff",Pe="#2962ff",Me="#e1f5fe",Re="#b3e5fc",Le="#81d4fa",Ne="#4fc3f7",Be="#29b6f6",je="#03a9f4",Ve="#039be5",ze="#0288d1",He="#0277bd",Ue="#01579b",We="#80d8ff",qe="#40c4ff",$e="#00b0ff",Ye="#0091ea",Ge="#e0f7fa",Xe="#b2ebf2",Ke="#80deea",Je="#4dd0e1",Ze="#26c6da",Qe="#00bcd4",et="#00acc1",tt="#0097a7",nt="#00838f",rt="#006064",at="#84ffff",it="#18ffff",ot="#00e5ff",st="#00b8d4",lt="#e0f2f1",ut="#b2dfdb",ct="#80cbc4",dt="#4db6ac",ht="#26a69a",ft="#009688",pt="#00897b",mt="#00796b",gt="#00695c",yt="#004d40",_t="#a7ffeb",bt="#64ffda",vt="#1de9b6",wt="#00bfa5",Ft="#e8f5e9",kt="#c8e6c9",xt="#a5d6a7",At="#81c784",St="#66bb6a",Et="#4caf50",Ct="#43a047",Tt="#388e3c",Dt="#2e7d32",It="#1b5e20",Ot="#b9f6ca",Pt="#69f0ae",Mt="#00e676",Rt="#00c853",Lt="#f1f8e9",Nt="#dcedc8",Bt="#c5e1a5",jt="#aed581",Vt="#9ccc65",zt="#8bc34a",Ht="#7cb342",Ut="#689f38",Wt="#558b2f",qt="#33691e",$t="#ccff90",Yt="#b2ff59",Gt="#76ff03",Xt="#64dd17",Kt="#f9fbe7",Jt="#f0f4c3",Zt="#e6ee9c",Qt="#dce775",en="#d4e157",tn="#cddc39",nn="#c0ca33",rn="#afb42b",an="#9e9d24",on="#827717",sn="#f4ff81",ln="#eeff41",un="#c6ff00",cn="#aeea00",dn="#fffde7",hn="#fff9c4",fn="#fff59d",pn="#fff176",mn="#ffee58",gn="#ffeb3b",yn="#fdd835",_n="#fbc02d",bn="#f9a825",vn="#f57f17",wn="#ffff8d",Fn="#ffff00",kn="#ffea00",xn="#ffd600",An="#fff8e1",Sn="#ffecb3",En="#ffe082",Cn="#ffd54f",Tn="#ffca28",Dn="#ffc107",In="#ffb300",On="#ffa000",Pn="#ff8f00",Mn="#ff6f00",Rn="#ffe57f",Ln="#ffd740",Nn="#ffc400",Bn="#ffab00",jn="#fff3e0",Vn="#ffe0b2",zn="#ffcc80",Hn="#ffb74d",Un="#ffa726",Wn="#ff9800",qn="#fb8c00",$n="#f57c00",Yn="#ef6c00",Gn="#e65100",Xn="#ffd180",Kn="#ffab40",Jn="#ff9100",Zn="#ff6d00",Qn="#fbe9e7",er="#ffccbc",tr="#ffab91",nr="#ff8a65",rr="#ff7043",ar="#ff5722",ir="#f4511e",or="#e64a19",sr="#d84315",lr="#bf360c",ur="#ff9e80",cr="#ff6e40",dr="#ff3d00",hr="#dd2c00",fr="#efebe9",pr="#d7ccc8",mr="#bcaaa4",gr="#a1887f",yr="#8d6e63",_r="#795548",br="#6d4c41",vr="#5d4037",wr="#4e342e",Fr="#3e2723",kr="#eceff1",xr="#cfd8dc",Ar="#b0bec5",Sr="#90a4ae",Er="#78909c",Cr="#607d8b",Tr="#546e7a",Dr="#455a64",Ir="#37474f",Or="#263238",Pr="#fafafa",Mr="#f5f5f5",Rr="#eeeeee",Lr="#e0e0e0",Nr="#bdbdbd",Br="#9e9e9e",jr="#757575",Vr="#616161",zr="#424242",Hr="#212121",Ur="#000000",Wr="#ffffff"},17659:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MD3Colors:()=>l,tokens:()=>s,typescale:()=>o});const r={palette:{primary100:"rgba(255, 255, 255, 1)",primary99:"rgba(255, 251, 254, 1)",primary95:"rgba(246, 237, 255, 1)",primary90:"rgba(234, 221, 255, 1)",primary80:"rgba(208, 188, 255, 1)",primary70:"rgba(182, 157, 248, 1)",primary60:"rgba(154, 130, 219, 1)",primary50:"rgba(127, 103, 190, 1)",primary40:"rgba(103, 80, 164, 1)",primary30:"rgba(79, 55, 139, 1)",primary20:"rgba(56, 30, 114, 1)",primary10:"rgba(33, 0, 93, 1)",primary0:"rgba(0, 0, 0, 1)",secondary100:"rgba(255, 255, 255, 1)",secondary99:"rgba(255, 251, 254, 1)",secondary95:"rgba(246, 237, 255, 1)",secondary90:"rgba(232, 222, 248, 1)",secondary80:"rgba(204, 194, 220, 1)",secondary70:"rgba(176, 167, 192, 1)",secondary60:"rgba(149, 141, 165, 1)",secondary50:"rgba(122, 114, 137, 1)",secondary40:"rgba(98, 91, 113, 1)",secondary30:"rgba(74, 68, 88, 1)",secondary20:"rgba(51, 45, 65, 1)",secondary10:"rgba(29, 25, 43, 1)",secondary0:"rgba(0, 0, 0, 1)",tertiary100:"rgba(255, 255, 255, 1)",tertiary99:"rgba(255, 251, 250, 1)",tertiary95:"rgba(255, 236, 241, 1)",tertiary90:"rgba(255, 216, 228, 1)",tertiary80:"rgba(239, 184, 200, 1)",tertiary70:"rgba(210, 157, 172, 1)",tertiary60:"rgba(181, 131, 146, 1)",tertiary50:"rgba(152, 105, 119, 1)",tertiary40:"rgba(125, 82, 96, 1)",tertiary30:"rgba(99, 59, 72, 1)",tertiary20:"rgba(73, 37, 50, 1)",tertiary10:"rgba(49, 17, 29, 1)",tertiary0:"rgba(0, 0, 0, 1)",neutral100:"rgba(255, 255, 255, 1)",neutral99:"rgba(255, 251, 254, 1)",neutral95:"rgba(244, 239, 244, 1)",neutral90:"rgba(230, 225, 229, 1)",neutral80:"rgba(201, 197, 202, 1)",neutral70:"rgba(174, 170, 174, 1)",neutral60:"rgba(147, 144, 148, 1)",neutral50:"rgba(120, 117, 121, 1)",neutral40:"rgba(96, 93, 98, 1)",neutral30:"rgba(72, 70, 73, 1)",neutral20:"rgba(49, 48, 51, 1)",neutral10:"rgba(28, 27, 31, 1)",neutral0:"rgba(0, 0, 0, 1)",neutralVariant100:"rgba(255, 255, 255, 1)",neutralVariant99:"rgba(255, 251, 254, 1)",neutralVariant95:"rgba(245, 238, 250, 1)",neutralVariant90:"rgba(231, 224, 236, 1)",neutralVariant80:"rgba(202, 196, 208, 1)",neutralVariant70:"rgba(174, 169, 180, 1)",neutralVariant60:"rgba(147, 143, 153, 1)",neutralVariant50:"rgba(121, 116, 126, 1)",neutralVariant40:"rgba(96, 93, 102, 1)",neutralVariant30:"rgba(73, 69, 79, 1)",neutralVariant20:"rgba(50, 47, 55, 1)",neutralVariant10:"rgba(29, 26, 34, 1)",neutralVariant0:"rgba(0, 0, 0, 1)",error100:"rgba(255, 255, 255, 1)",error99:"rgba(255, 251, 249, 1)",error95:"rgba(252, 238, 238, 1)",error90:"rgba(249, 222, 220, 1)",error80:"rgba(242, 184, 181, 1)",error70:"rgba(236, 146, 142, 1)",error60:"rgba(228, 105, 98, 1)",error50:"rgba(220, 54, 46, 1)",error40:"rgba(179, 38, 30, 1)",error30:"rgba(140, 29, 24, 1)",error20:"rgba(96, 20, 16, 1)",error10:"rgba(65, 14, 11, 1)",error0:"rgba(0, 0, 0, 1)"},typeface:{brandRegular:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',weightRegular:"400",plainMedium:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',weightMedium:"500"},opacity:{level1:.08,level2:.12,level3:.16,level4:.38}},a={fontFamily:r.typeface.brandRegular,letterSpacing:0,fontWeight:r.typeface.weightRegular},i={fontFamily:r.typeface.plainMedium,letterSpacing:.15,fontWeight:r.typeface.weightMedium},o={displayLarge:Object.assign({},a,{lineHeight:64,fontSize:57}),displayMedium:Object.assign({},a,{lineHeight:52,fontSize:45}),displaySmall:Object.assign({},a,{lineHeight:44,fontSize:36}),headlineLarge:Object.assign({},a,{lineHeight:40,fontSize:32}),headlineMedium:Object.assign({},a,{lineHeight:36,fontSize:28}),headlineSmall:Object.assign({},a,{lineHeight:32,fontSize:24}),titleLarge:Object.assign({},a,{lineHeight:28,fontSize:22}),titleMedium:Object.assign({},i,{lineHeight:24,fontSize:16}),titleSmall:Object.assign({},i,{letterSpacing:.1,lineHeight:20,fontSize:14}),labelLarge:Object.assign({},i,{letterSpacing:.1,lineHeight:20,fontSize:14}),labelMedium:Object.assign({},i,{letterSpacing:.5,lineHeight:16,fontSize:12}),labelSmall:Object.assign({},i,{letterSpacing:.5,lineHeight:16,fontSize:11}),bodyLarge:Object.assign({},i,{fontWeight:r.typeface.weightRegular,fontFamily:r.typeface.brandRegular,lineHeight:24,fontSize:16}),bodyMedium:Object.assign({},i,{fontWeight:r.typeface.weightRegular,fontFamily:r.typeface.brandRegular,letterSpacing:.25,lineHeight:20,fontSize:14}),bodySmall:Object.assign({},i,{fontWeight:r.typeface.weightRegular,fontFamily:r.typeface.brandRegular,letterSpacing:.4,lineHeight:16,fontSize:12}),default:Object.assign({},a)},s={md:{ref:r,sys:{typescale:o}}},l=r.palette},71232:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{var t,n;o||(null===(t=e.removeEventListener)||void 0===t||t.call(e,a,i),null===(n=e.remove)||void 0===n||n.call(e,a,i),o=!0)}}}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{o||(e.removeEventListener(a,i),o=!0)}}}n.r(t),n.d(t,{addEventListener:()=>r,addListener:()=>a})},66255:(e,t,n)=>{"use strict";n.r(t),n.d(t,{forwardRef:()=>r});const r=n(36665).forwardRef},23248:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});const r=["onPress","onLongPress","onPressIn","onPressOut"];function a(e){return r.some((t=>Boolean(e[t])))}},36979:(e,t,n)=>{"use strict";function r(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r[])),i=[];e:for(const o of Object.entries(e)){for(let e=0;eObject.fromEntries(e)))}n.r(t),n.d(t,{splitStyles:()=>r})},99942:(e,t,n)=>{var r=n(42731),a={};for(var i in r)r.hasOwnProperty(i)&&(a[r[i]]=i);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var s in o)if(o.hasOwnProperty(s)){if(!("channels"in o[s]))throw new Error("missing channels property: "+s);if(!("labels"in o[s]))throw new Error("missing channel labels property: "+s);if(o[s].labels.length!==o[s].channels)throw new Error("channel and label counts mismatch: "+s);var l=o[s].channels,u=o[s].labels;delete o[s].channels,delete o[s].labels,Object.defineProperty(o[s],"channels",{value:l}),Object.defineProperty(o[s],"labels",{value:u})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,a=e[1]/255,i=e[2]/255,o=Math.min(r,a,i),s=Math.max(r,a,i),l=s-o;return s===o?t=0:r===s?t=(a-i)/l:a===s?t=2+(i-r)/l:i===s&&(t=4+(r-a)/l),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?l/(s+o):l/(2-s-o)),100*n]},o.rgb.hsv=function(e){var t,n,r,a,i,o=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),d=function(e){return(u-e)/6/c+.5};return 0===c?a=i=0:(i=c/u,t=d(o),n=d(s),r=d(l),o===u?a=r-n:s===u?a=1/3+t-r:l===u&&(a=2/3+n-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*i,100*u]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-a)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-a-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=a[e];if(t)return t;var n,i,o,s=1/0;for(var l in r)if(r.hasOwnProperty(l)){var u=r[l],c=(i=e,o=u,Math.pow(i[0]-o[0],2)+Math.pow(i[1]-o[1],2)+Math.pow(i[2]-o[2],2));c.04045?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],a=t[2];return r/=100,a/=108.883,n=(n/=95.047)>.008856?Math.pow(n,1/3):7.787*n+16/116,[116*(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(a=a>.008856?Math.pow(a,1/3):7.787*a+16/116))]},o.hsl.rgb=function(e){var t,n,r,a,i,o=e[0]/360,s=e[1]/100,l=e[2]/100;if(0===s)return[i=255*l,i,i];t=2*l-(n=l<.5?l*(1+s):l+s-l*s),a=[0,0,0];for(var u=0;u<3;u++)(r=o+1/3*-(u-1))<0&&r++,r>1&&r--,i=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[u]=255*i;return a},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,a=n,i=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,a*=i<=1?i:2-i,[t,100*(0===r?2*a/(i+a):2*n/(r+n)),100*((r+n)/2)]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,a=Math.floor(t)%6,i=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*i),l=255*r*(1-n*(1-i));switch(r*=255,a){case 0:return[r,l,o];case 1:return[s,r,o];case 2:return[o,r,l];case 3:return[o,s,r];case 4:return[l,o,r];case 5:return[r,o,s]}},o.hsv.hsl=function(e){var t,n,r,a=e[0],i=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-i)*o,n=i*s,[a,100*(n=(n/=(t=(2-i)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,a,i,o,s,l=e[0]/360,u=e[1]/100,c=e[2]/100,d=u+c;switch(d>1&&(u/=d,c/=d),r=6*l-(t=Math.floor(6*l)),0!==(1&t)&&(r=1-r),a=u+r*((n=1-c)-u),t){default:case 6:case 0:i=n,o=a,s=u;break;case 1:i=a,o=n,s=u;break;case 2:i=u,o=n,s=a;break;case 3:i=u,o=a,s=n;break;case 4:i=a,o=u,s=n;break;case 5:i=n,o=u,s=a}return[255*i,255*o,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a))]},o.xyz.rgb=function(e){var t,n,r,a=e[0]/100,i=e[1]/100,o=e[2]/100;return n=-.9689*a+1.8758*i+.0415*o,r=.0557*a+-.204*i+1.057*o,t=(t=3.2406*a+-1.5372*i+-.4986*o)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=(t/=95.047)>.008856?Math.pow(t,1/3):7.787*t+16/116,[116*(n=n>.008856?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=r>.008856?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,a=e[0];t=e[1]/500+(n=(a+16)/116),r=n-e[2]/200;var i=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=i>.008856?i:(n-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,r=s>.008856?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],a=e[2];return(t=360*Math.atan2(a,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+a*a),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],a=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(a=Math.round(a/50)))return 30;var i=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===a&&(i+=60),i},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(e>50));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(e>=232){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map((function(e){return e+e})).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,a=e[2]/255,i=Math.max(Math.max(n,r),a),o=Math.min(Math.min(n,r),a),s=i-o;return t=s<=0?0:i===n?(r-a)/s%6:i===r?2+(a-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,a=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(a=(n-.5*r)/(1-r)),[e[0],100*r,100*a]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var a,i=[0,0,0],o=t%1*6,s=o%1,l=1-s;switch(Math.floor(o)){case 0:i[0]=1,i[1]=s,i[2]=0;break;case 1:i[0]=l,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=s;break;case 3:i[0]=0,i[1]=l,i[2]=1;break;case 4:i[0]=s,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=l}return a=(1-n)*r,[255*(n*i[0]+a),255*(n*i[1]+a),255*(n*i[2]+a)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return n>0&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return n>0&&n<.5?r=t/(2*n):n>=.5&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,a=0;return r<1&&(a=(n-r)/(1-r)),[e[0],100*r,100*a]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}},35871:(e,t,n)=>{var r=n(99942),a=n(73162),i={};Object.keys(r).forEach((function(e){i[e]={},Object.defineProperty(i[e],"channels",{value:r[e].channels}),Object.defineProperty(i[e],"labels",{value:r[e].labels});var t=a(e);Object.keys(t).forEach((function(n){var r=t[n];i[e][n]=function(e){var t=function(t){if(void 0===t||null===t)return t;arguments.length>1&&(t=Array.prototype.slice.call(arguments));var n=e(t);if("object"===typeof n)for(var r=n.length,a=0;a1&&(t=Array.prototype.slice.call(arguments)),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(r)}))})),e.exports=i},73162:(e,t,n)=>{var r=n(99942);function a(e){var t=function(){for(var e={},t=Object.keys(r),n=t.length,a=0;a{"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},17993:(e,t,n)=>{"use strict";var r=n(43621),a=n(35871),i=[].slice,o=["keyword","gray","hex"],s={};Object.keys(a).forEach((function(e){s[i.call(a[e].labels).sort().join("")]=e}));var l={};function u(e,t){if(!(this instanceof u))return new u(e,t);if(t&&t in o&&(t=null),t&&!(t in a))throw new Error("Unknown model: "+t);var n,c;if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof u)this.model=e.model,this.color=e.color.slice(),this.valpha=e.valpha;else if("string"===typeof e){var d=r.get(e);if(null===d)throw new Error("Unable to parse color from string: "+e);this.model=d.model,c=a[this.model].channels,this.color=d.value.slice(0,c),this.valpha="number"===typeof d.value[c]?d.value[c]:1}else if(e.length){this.model=t||"rgb",c=a[this.model].channels;var f=i.call(e,0,c);this.color=h(f,c),this.valpha="number"===typeof e[c]?e[c]:1}else if("number"===typeof e)e&=16777215,this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;var p=Object.keys(e);"alpha"in e&&(p.splice(p.indexOf("alpha"),1),this.valpha="number"===typeof e.alpha?e.alpha:0);var m=p.sort().join("");if(!(m in s))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=s[m];var g=a[this.model].labels,y=[];for(n=0;nn?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},isDark:function(){var e=this.rgb().color;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},isLight:function(){return!this.isDark()},negate:function(){for(var e=this.rgb(),t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten:function(e){var t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken:function(e){var t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate:function(e){var t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate:function(e){var t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten:function(e){var t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken:function(e){var t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale:function(){var e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return u.rgb(t,t,t)},fade:function(e){return this.alpha(this.valpha-this.valpha*e)},opaquer:function(e){return this.alpha(this.valpha+this.valpha*e)},rotate:function(e){var t=this.hsl(),n=t.color[0];return n=(n=(n+e)%360)<0?360+n:n,t.color[0]=n,t},mix:function(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);var n=e.rgb(),r=this.rgb(),a=void 0===t?.5:t,i=2*a-1,o=n.alpha()-r.alpha(),s=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,l=1-s;return u.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*a+r.alpha()*(1-a))}},Object.keys(a).forEach((function(e){if(-1===o.indexOf(e)){var t=a[e].channels;u.prototype[e]=function(){if(this.model===e)return new u(this);if(arguments.length)return new u(arguments,e);var n,r="number"===typeof arguments[t]?t:this.valpha;return new u((n=a[this.model][e].raw(this.color),Array.isArray(n)?n:[n]).concat(r),e)},u[e]=function(n){return"number"===typeof n&&(n=h(i.call(arguments),t)),new u(n,e)}}})),e.exports=u},42038:(e,t,n)=>{"use strict";n.r(t),n.d(t,{RichEditor:()=>C,RichToolbar:()=>M,actions:()=>o,createHTML:()=>A,defaultActions:()=>P,getContentCSS:()=>x});var r=n(98587),a=n(36665),i=n(91173);const o={content:"content",updateHeight:"UPDATE_HEIGHT",setBold:"bold",setItalic:"italic",setUnderline:"underline",heading1:"heading1",heading2:"heading2",heading3:"heading3",heading4:"heading4",heading5:"heading5",heading6:"heading6",insertLine:"line",setParagraph:"paragraph",removeFormat:"removeFormat",alignLeft:"justifyLeft",alignCenter:"justifyCenter",alignRight:"justifyRight",alignFull:"justifyFull",insertBulletsList:"unorderedList",insertOrderedList:"orderedList",checkboxList:"checkboxList",insertLink:"link",insertText:"text",insertHTML:"html",insertImage:"image",insertVideo:"video",fontSize:"fontSize",fontName:"fontName",setSubscript:"subscript",setSuperscript:"superscript",setStrikethrough:"strikeThrough",setHR:"horizontalRule",indent:"indent",outdent:"outdent",undo:"undo",redo:"redo",code:"code",table:"table",line:"line",foreColor:"foreColor",hiliteColor:"hiliteColor",blockquote:"quote",keyboard:"keyboard",setTitlePlaceholder:"SET_TITLE_PLACEHOLDER",setContentPlaceholder:"SET_CONTENT_PLACEHOLDER",setTitleFocusHandler:"SET_TITLE_FOCUS_HANDLER",setContentFocusHandler:"SET_CONTENT_FOCUS_HANDLER",prepareInsert:"PREPARE_INSERT",restoreSelection:"RESTORE_SELECTION",setCustomCSS:"SET_CUSTOM_CSS",setTextColor:"SET_TEXT_COLOR",setBackgroundColor:"SET_BACKGROUND_COLOR",init:"init",setEditorHeight:"SET_EDITOR_HEIGHT",setFooterHeight:"SET_FOOTER_HEIGHT",setPlatform:"SET_PLATFORM"},s="CONTENT_HTML_RESPONSE",l="LOG",u="CONTENT_FOCUSED",c="CONTENT_BLUR",d="SELECTION_CHANGE",h="CONTENT_CHANGE",f="CONTENT_PASTED",p="CONTENT_KEYUP",m="CONTENT_KEYDOWN",g="LINK_TOUCHED",y="OFFSET_HEIGHT",_="OFFSET_Y",b="ON_INPUT";var v=n(92365),w=n(75675),F=n(73929),k=n(79632);function x(){return"\n \n "}function A(e={}){const{backgroundColor:t="#FFF",color:n="#000033",caretColor:r="",placeholderColor:a="#a9a9a9",contentCSSText:i="",cssText:o="",initialCSSText:s="",pasteAsPlainText:l=!1,pasteListener:u=!1,keyDownListener:c=!1,keyUpListener:d=!1,inputListener:h=!1,autoCapitalize:f="off",enterKeyHint:p="",initialFocus:m=!1,autoCorrect:g=!1,defaultParagraphSeparator:y="div",firstFocusEnd:_=!0,useContainer:b=!0,styleWithCSS:v=!1}=e;return`\n\n\n\n RN Rich Text Editor\n \n \n \n \n \n \n \n\n\n
\n