1import{a as ni}from"./chunk-ZNFNG7CS.js";import{a as ei,b as ti,c as ii}from"./chunk-5CXO6WYO.js";import{a as Jt}from"./chunk-FWRCH2KY.js";import{a as Ze}from"./chunk-QQUHJTMO.js";import{a as Yt,b as $t,c as Ie,d as qt}from"./chunk-EZDX6ABS.js";import{e as Zt}from"./chunk-N6AVC6IW.js";import{a as Xt}from"./chunk-O5XXPDIR.js";import"./chunk-JDMXKIRH.js";import{a as Qt}from"./chunk-5EEOQKNF.js";import{b as zt,c as jt,j as Kt}from"./chunk-HOYSCUVE.js";import"./chunk-NDGIHWD7.js";import"./chunk-UZBBDQ6D.js";import"./chunk-MRVVTN3M.js";import"./chunk-NZHJC434.js";import{d as Vt}from"./chunk-ZJNJ2YV4.js";import"./chunk-3TWW43VM.js";import{a as Ut,k as Wt}from"./chunk-X2CDRPV2.js";import{b as Ft}from"./chunk-Z4U2QIWV.js";import{Ja as Nt,Ma as Lt,aa as Ae,da as Bt,oa as Ht,q as Rt,s as kt,u as ve}from"./chunk-C6MMI4UH.js";import{m as Qe}from"./chunk-AHPCJ4WC.js";import"./chunk-MVIE6R26.js";import"./chunk-TLTR6JIE.js";import"./chunk-CWKS2JZF.js";import"./chunk-XTWGI42R.js";import{Ab as xe,Db as ce,Kb as yt,N as je,P as Ke,a as ze,dc as Dt,h as Et,ib as W,kb as q,kc as Gt,lb as F,n as wt,zb as Me}from"./chunk-2CB67CRE.js";import{Y as Ot,e as At,o as It,q as Pe,s as Xe}from"./chunk-AH2GBE4P.js";import{$c as V,Aa as b,Ac as S,Ad as Se,Ba as lt,Bc as H,C as st,Ca as pt,Cc as N,Dc as pe,Ea as mt,Ec as Tt,Ed as xt,Fa as _t,Fb as se,Fc as Ct,Gc as ee,J as Ge,Jc as E,Kc as bt,Kd as We,La as f,Lb as y,Ld as me,Mb as gt,Na as re,Nb as Be,Oc as g,Pc as be,Pd as M,Qb as ht,Qc as p,Qd as P,Rb as Q,Rc as He,Rd as fe,Sa as ke,Sc as Ne,Uc as St,Vc as ft,Wc as Pt,Xa as ut,Yc as Le,Yd as vt,Zc as Ve,_c as te,ad as de,bd as Fe,cd as $,dd as m,e as Ce,ed as D,fa as Re,fd as v,ga as O,j as we,ld as Ue,n as ye,oa as dt,od as Mt,p as De,pa as ct,qb as K,qc as h,qd as ie,rd as G,sc as T,ta as x,u as rt,uc as ge,vc as Z,wb as r,wc as Y,xc as _,yc as d,yd as A,za as C,zc as c,zd as w}from"./chunk-BKBETLCE.js";import{a as k,b as ue}from"./chunk-3SYEH6ZZ.js";var _e={UKNOWN:"Unknown"},tt={CHROME:"Chrome",FIREFOX:"Firefox",SAFARI:"Safari",OPERA:"Opera",IE:"IE",MS_EDGE:"MS-Edge",MS_EDGE_CHROMIUM:"MS-Edge-Chromium",FB_MESSANGER:"FB-Messanger",SAMSUNG:"Samsung",UCBROWSER:"UC-Browser",UNKNOWN:_e.UKNOWN},Oe={HTC:/HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\bEVO\b|T-Mobile G1|Z520m|Android [0-9.]+; Pixel/,NEXUS_PHONE:/Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6/,DELL:/Dell;? (Streak|Aero|Venue|Venue Pro|Flash|Smoke|Mini 3iX)|XCD28|XCD35|\b001DL\b|\b101DL\b|\bGS01\b/,MOTOROLA:new RegExp("Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b|XT1068|XT1092|XT1052"),SAMSUNG:new RegExp("\\bSamsung\\b|SM-G950F|SM-G955F|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B33
110|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SM-N900T|SGH-I317|SGH-T999L|GT-S5360B|GT-
1I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350|SM-J120F|SM-G920F|SM-G920V|SM-G930F|SM-N910C|SM-A310F|GT-I9190|SM-J500FN|SM-G903F|SM-J330F"),LG:new RegExp("\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323|M257)"),SONY:/SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533/,ASUS:/Asus.*Galaxy|PadFone.*Mobile/,NOKIA_LUMIA:/Lumia [0-9]{3,4}/,MICROMAX:/Micromax.*\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\b/,PALM:/PalmSource|Palm/,VERTU:/Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature/,PANTECH:new RegExp("PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790"),FLY:/IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ256|IQ236|IQ255|IQ235|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250/,WIKO:new RegExp("KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA(?!nna)|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX 2|CINK SLI
1M 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM"),I_MOBILE:/i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)/,SIMVALLEY:/\b(SP-80|SX-340|XT-930|SX-310|SP-360|SP60|SP-120|SPT-800|SP-140|SPX-5|SP-100|SPX-8|SPX-12)\b/,WOLFGANG:/AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q/,ALCATEL:/Alcatel|Mobile; rv:49.0|Mobile; ALCATEL 4052R; rv:48.0/,NINTENDO:/Nintendo (3DS|Switch)/,AMOI:/Amoi/,INQ:/INQ/,VITA:/\bVita\b/,BLACKBERRY:/\bBlackBerry\b|\bBB10\b|rim[0-9]+/,FIREFOX_OS:/\bFirefox-OS\b/,IPHONE:/\biPhone\b/,iPod:/\biPod\b/,ANDROID:/\bAndroid\b/,WINDOWS_PHONE:/\bWindows-Phone\b/,GENERIC_PHONE:new RegExp("Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser")},he={iPad:/iPad|iPad.*Mobile/,NexusTablet:/Android.*Nexus\s+(7|9|10)/,GoogleTablet:/Android.*Pixel C/,SamsungTablet:new RegExp("SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SM-T865|SM-T290|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T385M|SM-P585M|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P615|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T510|SM-T515|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T500|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-T116BU|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561|SM-T713|SM-T719|SM-T725|SM-T813|SM-T819|SM-T580|SM-T590|SM-T355Y?|SM-T280|SM-T817A|SM-T820|SM-W700|SM-P580|SM-T587|SM-P350|SM-P555M|SM-P355M|SM-T113NU|SM-T815Y|SM-T585|SM-T285|SM-T825|SM-W708|SM-T835|SM-P585Y|SM-X200|SM-T970"),Kindle:new RegExp("Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI|KFARWI|KFFOWI|KFGIWI|KFMEWI)\\b|Android.*Silk/[0-9.]+ like Chrome/[0-9.]+ (?!Mobile)"),SurfaceTablet:/Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)/,HPTablet:/HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10/,AsusTablet:new RegExp("^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K011 | K017 | K01E |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C|P01Y|PO1MA|P01Z|\\bP027\\b|\\bP024\\b|\\bP00C\\b"),BlackBerryTablet:/PlayBook|RIM Tablet/,HTCtablet:/HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410/,MotorolaTablet:/xoom|sholest|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617/,NookTablet:/Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2/,AcerTablet:new RegExp("Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b|\\bA3-A20\\b|\\bA3-A30"),ToshibaTablet:/Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO/,LGTablet:/\bL-06C|
1LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\b/,FujitsuTablet:/Android.*\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\b/,PrestigioTablet:new RegExp("PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002"),LenovoTablet:new RegExp("Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad( +)?Tablet|YT3-850M|YT3-X90L|YT3-X90F|YT3-X90X|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)|TB-X606F|TB-X103F|TB-X304F|TB-X304L|TB-X704F|TB-8703F|Tab2A7-10F|TB2-X30L|TB-8504F"),DellTablet:/Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7/,YarvikTablet:new RegExp("Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b"),MedionTablet:/Android.*\bOYO\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB/,ArnovaTablet:/97G4|AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2/,IntensoTablet:/INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004/,IRUTablet:/M702pro/,MegafonTablet:/MegaFon V9|\bZTE V9\b|Android.*\bMT7A\b/,EbodaTablet:/E-Boda (Supreme|Impresspeed|Izzycomm|Essential)/,AllViewTablet:/Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)/,ArchosTablet:new RegExp("\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|c|)(G10|Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b"),AinolTablet:/NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark/,NokiaLumiaTablet:/Lumia 2520/,SonyTablet:new RegExp("Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP641|SGP612|SOT31|SGP771|SGP611|SGP612|SGP712"),PhilipsTablet:/\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\b/,CubeTablet:/Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT/,CobyTablet:new RegExp("MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010"),MIDTablet:new RegExp("M9701|M9000|M9100|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10"),MSITablet:new RegExp("MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b"),SMiTTablet:/Android.*(\bMID\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)/,RockChipTablet:/Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A/,FlyTablet:/IQ310|Fly Vision/,bqTablet:new RegExp("Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris ([E|M]10|M8))|Maxwell.*Lite|Maxwell.*Plus"),HuaweiTablet:new RegExp("MediaPad|MediaPad 7 Youth|MediaPad T3 10|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim|M2-A01L|BAH-L09|BAH-W09|AGS-W09|AGS-L09|BAH3-W09"),NecTablet:/\bN-06D|\bN-08D/,PantechTablet:/Pantech.*P4100/,BronchoTablet:/Broncho.*(N701|N708|N802|a710)/,VersusTablet:/TOUCHPAD.*[78910]|\bTOUCHTAB\b/,ZyncTablet:/z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900/,PositivoTablet:/TB07STA|TB10STA|TB07FTA|TB10FTA/,NabiTablet:/Android.*\b
1Nabi/,KoboTablet:/Kobo Touch|\bK080\b|\bVox\b Build|\bArc\b Build/,DanewTablet:/DSlide.*\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\b/,TexetTablet:new RegExp("NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE"),PlaystationTablet:/Playstation.*(Portable|Vita)/,TrekstorTablet:/ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab/,PyleAudioTablet:/\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\b/,AdvanTablet:new RegExp("Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b"),DanyTechTablet:`Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II| 2 Genius TAB GII|Genius TAB GIII|Genius Tab S1`,GalapadTablet:/Android.*\bG1\b(?!\))/,MicromaxTablet:/Funbook|Micromax.*\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\b/,KarbonnTablet:/Android.*\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\b/,AllFineTablet:/Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide/,PROSCANTablet:new RegExp("\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b"),YONESTablet:/BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026/,ChangJiaTablet:new RegExp("TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503"),GUTablet:/TX-A1301|TX-M9002|Q702|kf026/,PointOfViewTablet:new RegExp("TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10"),OvermaxTablet:new RegExp("OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)|Qualcore 1027"),HCLTablet:/HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync/,DPSTablet:/DPS Dream 9|DPS Dual 7/,VistureTablet:/V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10/,CrestaTablet:/CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989/,MediatekTablet:/\bMT8125|MT8389|MT8135|MT8377\b/,ConcordeTablet:/Concorde( +)?Tab|ConCorde ReadMan/,GoCleverTablet:new RegExp("GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042"),ModecomTablet:new RegExp("FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003"),VoninoTablet:new RegExp("\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b"),ECSTablet:/V07OT2|TM105A|S10OT1|TR10CS1/,StorexTablet:/eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab/,VodafoneTablet:/SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7|VF-1497/,EssentielBTablet:/Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2/,RossMoorTablet:/RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711/,iMobileTablet:/i-mobile i-note/,TolinoTablet:/tolino tab [0-9.]+|tolino shine/,AudioSonicTablet:/\bC-22Q|T7-QC|T-17B|T-17P\b/,AMPETablet:/Android.* A78 /,SkkTablet:/Android.* (SKYPAD|PHOENIX|CYCLOPS)/,TecnoTablet:/TECNO P9|TECNO DP8D/,JXDTablet:new RegExp("Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b"),iJoyTablet:new RegExp("Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Biox|Rebel|Rebel 8GB|Draco 7|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)"),FX2Tablet:/FX2 PAD7|FX2 PAD10/,XoroTablet:new RegExp("KidsPAD 701|PAD ?712|PAD ?714|PAD ?716|PAD ?717|PAD ?718|PAD ?720|PAD ?721|PAD ?722|PAD ?790|PAD ?792|PAD ?900|PAD ?9715D|PAD ?9716DR|PAD ?9718DR|PAD ?9719QR|PAD ?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151"),ViewsonicTablet:/ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a/,VerizonTablet:/QTAQZ3|QTAIR7|QTAQTZ3|QTASUN1|QTASUN2|QTAXIA1/,OdysTablet:/LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\bXELIO\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10/,CaptivaTablet:/CAPTIVA PAD/,IconbitTablet:new RegExp("NetTAB|NT-3702|NT-3702S|NT-3603P|NT-0704S|NT-3805C|NT-0806C|NT-0909T|NT-0907S|NT-0902S"),TeclastTablet:new RegExp("T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi"),OndaTablet:new RegExp("\b(V975i|Vi30|VX530|V701|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|VX580W|Vi10|V711s|V813|V820|Vi20|VI30W|V891w|V972|V819w|Vi60|V820w|V711|V813s|V975s|V801|V819|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\bs+|V10 \b4G\b"),JaytechTablet:/TPC-PA762/,BlaupunktTablet:/Endeavour 800NG|Endeavour 1010/,DigmaTablet:/\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\b/,EvolioTablet:/ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\bEvotab\b|\bNeura\b/,LavaTablet:/QPAD E704|\bIvoryS\b|E-TAB IVORY|\bE-TAB\b/,AocTablet:/MW0811|MW0812|MW0922|MTK8382|MW1031|MW0831|MW0821|MW0931|MW0712/,MpmanTablet:new RegExp("MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010"),CelkonTablet:/CT695|CT888|CT\s?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\bCT-1\b/,WolderTablet:new RegExp("miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b"),MediacomTablet:"M-MPI10C3G|M-SP10EG|M-SP10EGP|M-SP10HXAH|M-SP7HXAH|M-SP10HXBH|M-SP8HXAH|M-SP8MXA",MiTablet:/\bMI PAD\b|\bHM NOTE 1W\b/,NibiruTablet:/Nibiru M1|Nibiru Jupiter One/,NexoTablet:/NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI/,LeaderTablet:new RegExp("TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100"),UbislateTablet:/UbiSlate\s?7C/,PocketBookTablet:/Pocketbook/,KocasoTablet:/\b(TB-1207)\b/,HisenseTablet:/\b(F5281|E2371)\b/,Hudl:/Hudl HT7S3|Hudl 2/,TelstraTablet:/T-Hub2/,Honeywell:/RT10A/,GenericTablet:new RegExp("Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bTP750\\b|\\bQTAQZ3\\b|WVT101|TM1088|KT107")}
2,X={BLACKBERRY:"Blackberry",FIREFOX_OS:"Firefox-OS",CHROME_BOOK:"Chrome-Book",WINDOWS_PHONE:"Windows-Phone",VITA:"Vita",PS4:"PS4",MAC:"Macintosh",CHROMECAST:"Chromecast",APPLE_TV:"Apple-TV",GOOGLE_TV:"Google-TV",ANDROID:"Android",Tesla:"Tesla",iPad:"iPad",IPHONE:"iPhone",iPod:"iPod",UNKNOWN:_e.UKNOWN,HTC:"HTC",NEXUS_PHONE:"Nexus Phone",NexusTablet:"Nexus Tablet",DELL:"Dell",MOTOROLA:"Motorola",SAMSUNG:"Samsung",LG:"LG",SONY:"Sony",ASUS:"Asus",NOKIA_LUMIA:"Nokia Lumia",MICROMAX:"Micromax",PALM:"Palm",VERTU:"Vertu",PANTECH:"PANTECH",FLY:"Fly",WIKO:"WIKO",I_MOBILE:"i-mobile",SIMVALLEY:"Simvalley",WOLFGANG:"Wolfgang",ALCATEL:"Alcatel",HONEYWELL:"Honeywell",NINTENDO:"Nintendo",AMOI:"Amoi",INQ:"INQ",GENERIC_PHONE:"Generic Phone",MI_SE_9:"Mi SE 9"},ai=[X.PS4,X.CHROME_BOOK,X.MAC,X.DELL,X.ASUS,X.UNKNOWN],Ii={WINDOWS:"Windows",MAC:"Mac",IOS:"iOS",ANDROID:"Android",LINUX:"Linux",UNIX:"Unix",FIREFOX_OS:"Firefox-OS",CHROME_OS:"Chrome-OS",WINDOWS_PHONE:"Windows-Phone",UNKNOWN:_e.UKNOWN},Oi={WINDOWS_3_11:"windows-3-11",WINDOWS_95:"windows-95",WINDOWS_ME:"windows-me",WINDOWS_98:"windows-98",WINDOWS_CE:"windows-ce",WINDOWS_2000:"windows-2000",WINDOWS_XP:"windows-xp",WINDOWS_SERVER_2003:"windows-server-2003",WINDOWS_VISTA:"windows-vista",WINDOWS_7:"windows-7",WINDOWS_8_1:"windows-8-1",WINDOWS_8:"windows-8",WINDOWS_10:"windows-10",WINDOWS_PHONE_7_5:"windows-phone-7-5",WINDOWS_PHONE_8_1:"windows-phone-8-1",WINDOWS_PHONE_10:"windows-phone-10",WINDOWS_NT_4_0:"windows-nt-4-0",MACOSX_11_0:"mac-os-x-11-0",MACOSX_16:"mac-os-x-16",MACOSX_15:"mac-os-x-15",MACOSX_14:"mac-os-x-14",MACOSX_13:"mac-os-x-13",MACOSX_12:"mac-os-x-12",MACOSX_11:"mac-os-x-11",MACOSX_10:"mac-os-x-10",MACOSX_9:"mac-os-x-9",MACOSX_8:"mac-os-x-8",MACOSX_7:"mac-os-x-7",MACOSX_6:"mac-os-x-6",MACOSX_5:"mac-os-x-5",MACOSX_4:"mac-os-x-4",MACOSX_3:"mac-os-x-3",MACOSX_2:"mac-os-x-2",MACOSX:"mac-os-x",iOS:"iOS",ANDROID_9:"android-9",UNKNOWN:_e.UKNOWN.toLowerCase()},ri={WINDOWS:{and:[{or:[/\bWindows|(Win\d\d)\b/,/\bWin 9x\b/]},{not:/\bWindows Phone\b/}]},MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]},IOS:{and:[{or:[/\biPad\b/,/\biPhone\b/,/\biPod\b/]},{not:/\bWindows Phone\b/}]},ANDROID:{and:[/\bAndroid\b/,{not:/\bWindows Phone\b/}]},LINUX:/\bLinux\b/,UNIX:/\bUNIX\b/,FIREFOX_OS:{and:[/\bFirefox\b/,/Mobile\b/]},CHROME_OS:/\bCrOS\b/,WINDOWS_PHONE:{or:[/\bIEMobile\b/,/\bWindows Phone\b/]},PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play([Ss])tation Vita\b/},Ei={CHROME:{and:[{or:[/\bChrome\b/,/\bCriOS\b/,/\bHeadlessChrome\b/]},{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},FIREFOX:{or:[/\bFirefox\b/,/\bFxiOS\b/]},SAFARI:{and:[/^((?!CriOS).)*\Safari\b.*$/,{not:{or:[/\bOPR\b/,/\bEdg(e|A|iOS)\b/,/\bEdg\/\b/,/\bWindows Phone\b/,/\bSamsungBrowser\b/,/\bUCBrowser\b/]}}]},OPERA:{or:[/Opera\b/,/\bOPR\b/]},IE:{or:[/\bMSIE\b/,/\bTrident\b/,/^Mozilla\/5\.0 \(Windows NT 10\.0; Win64; x64\)$/]},MS_EDGE:{or:[/\bEdg(e|A|iOS)\b/]},MS_EDGE_CHROMIUM:/\bEdg\/\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,VITA:/\bMozilla\/5.0 \(Play([Ss])tation Vita\b/,FB_MESSANGER:/\bFBAN\/MessengerForiOS\b/,SAMSUNG:/\bSamsungBrowser\b/,UCBROWSER:/\bUCBrowser\b/},si=ue(k(k(k({},Oe),he),ri),{FIREFOX_OS:{and:[/\bFirefox\b/,/\bMobile\b/]},CHROME_BOOK:/\bCrOS\b/,PS4:/\bMozilla\/5.0 \(PlayStation 4\b/,CHROMECAST:/\bCrKey\b/,APPLE_TV:/^iTunes-AppleTV\/4.1$/,GOOGLE_TV:/\bGoogleTV\b/,Tesla:/Tesla\/([0-9]{4}.[0-9]{1,2}.?[0-9]{0,2}.?[0-9]{0,2})-(.{7})/,MI_SE_9:/\bXiaomi\b/,MAC:{and:[/\bMac OS\b/,{not:{or:[/\biPhone\b/,/\biPad\b/,/\biPod\b/,/\bWindows Phone\b/]}}]}}),$e={WINDOWS_3_11:/Win16/,WINDOWS_95:/(Windows 95|Win95|Windows_95)/,WINDOWS_ME:/(Win 9x 4.90|Windows ME)/,WINDOWS_98:/(Windows 98|Win98)/,WINDOWS_CE:/Windows CE/,WINDOWS_2000:/(Windows NT 5.0|Windows 2000)/,WINDOWS_XP:/(Windows NT 5.1|Windows XP)/,WINDOWS_SERVER_2003:/Windows NT 5.2/,WINDOWS_VISTA:/Windows NT 6.0/,WINDOWS_7:/(Windows 7|Windows NT 6.1)/,WINDOWS_8_1:/(Windows 8.1|Windows NT 6.3)/,WINDOWS_8:/(Windows 8|Windows NT 6.2)/,WINDOWS_10:/(Windows NT 10.0)/,WINDOWS_PHONE_7_5:/(Windows Phone OS 7.5)/,WINDOWS_PHONE_8_1:/(Windows Phone 8.1)/,WINDOWS_PHONE_10:/(Windows Phone 10)/,WINDOWS_NT_4_0:{and:[/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/,{not:/Windows NT 10.0/}]},MACOSX:/(MAC OS X\s*[^ 0-9])/,MACOSX_3:/(Darwin 10.3|Mac OS X 10.3)/,MACOSX_4:/(Darwin 10.4|Mac OS X 10.4)/,MACOSX_5:/(Mac OS X 10.5)/,MACOSX_6:/(Mac OS X 10.6)/,MACOSX_7:/(Mac OS X 10.7)/,MACOSX_8:/(Mac OS X 10.8)/,MACOSX_9:/(Mac OS X 10.9)/,MACOSX_10:/(Mac OS X 10.10)/,MACOSX_11:/(Mac OS X 10.11)/,MACOSX_12:/(Mac OS X 10.12)/,MACOSX_13:/(Mac OS X 10.13)/,MACOSX_14:/(Mac OS X 10.14)/,MACOSX_15:/(Mac OS X 10.15)/,MACOSX_16:/(Mac OS X 10.16)/,MACOSX_11_0:{or:[/11_0 like Mac OS X/,/Mac OS X 11/]},iOS:/(iPhone OS\s*[0-9_]+)/,ANDROID_9:/(Android 9)/},qe={CHROME:[/\bChrome\/([\d.]+)\b/,/\bCriOS\/([\d.]+)\b/,/\bHeadlessChrome\/([\d.]+)\b/],FIREFOX:[/\bFirefox\/([\d.]+)\b/,/\bFxiOS\/([\d.]+)\b/],SAFARI:[/\bVersion\/([\d.]+)\b/,/\bSafari\/([\d.]+)\b/],OPERA:[/\bVersion\/([\d.]+)\b/,/\bOPR\/([\d.]+)\b/],IE:[/\bMSIE ([\d.]+\w?)\b/,/\brv:([\d.]+\w?)\b/],MS_EDGE:/\bEdg(?:e|A|iOS)\/([\d.]+)\b/,MS_EDGE_CHROMIUM:/\bEdg\/([\d.]+)\b/,SAMSUNG:/\bSamsungBrowser\/([\d.]+)\b/,UCBROWSER:/\bUCBrowser\/([\d.]+)\b/},wi=Object.keys($e).reduce((n,a)=>(n[a]=$e[a],n),{}),di=Object.keys(qe).reduce((n,a)=>(n[tt[a]]=qe[a],n),{}
2),oi=Object.freeze({__proto__:null,BROWSERS:tt,BROWSERS_RE:Ei,BROWSER_VERSIONS_RE:di,BROWSER_VERSIONS_RE_MAP:qe,DESKTOP_DEVICES:ai,DEVICES:X,DEVICES_RE:si,GENERAL:_e,MOBILES_RE:Oe,OS:Ii,OS_RE:ri,OS_VERSIONS:Oi,OS_VERSIONS_RE:wi,OS_VERSIONS_RE_MAP:$e,TABLETS_RE:he}),Je=class{constructor(){this.regexCache=new Map}getRegex(a){let o=this.regexCache.get(a);if(!o){let e=new RegExp(a);return this.regexCache.set(a,e),e}return o}test(a,o){if(typeof o=="string"&&(o=this.getRegex(o)),o instanceof RegExp)return o.test(a);if(o&&typeof o=="object"){if("and"in o&&Array.isArray(o.and))return o.and.every(e=>this.test(a,e));if("or"in o&&Array.isArray(o.or))return o.or.some(e=>this.test(a,e));if("not"in o)return!this.test(a,o.not)}return!1}exec(a,o){return typeof o=="string"&&(o=this.getRegex(o)),o instanceof RegExp?o.exec(a):o&&Array.isArray(o)?o.reduce((e,t)=>e??this.exec(a,t),null):null}},ne=(function(n){return n.Mobile="mobile",n.Tablet="tablet",n.Desktop="desktop",n.Unknown="unknown",n})(ne||{}),et=(function(n){return n.Portrait="portrait",n.Landscape="landscape",n.Unknown="Unknown",n})(et||{}),Ye="iPad",ci=(()=>{let a=class a{constructor(){this._ua=f(""),this._userAgent=f(""),this._os=f(""),this._browser=f(""),this._device=f(""),this._os_version=f(""),this._browser_version=f(""),this._deviceType=f(ne.Unknown),this._orientation=f(void 0),this._isDesktopMode=f(!1),this.reTree=f(new Je),this.platformId=x(ut),Pe(this.platformId)&&this._userAgent.set(globalThis.navigator.userAgent),this.setDeviceInfo(this._userAgent()),this.deviceInfo=me(()=>({userAgent:this._userAgent(),os:this._os(),browser:this._browser(),device:this._device(),os_version:this._os_version(),browser_version:this._browser_version(),deviceType:this._deviceType(),orientation:this._orientation(),isDesktopMode:this._isDesktopMode()}))}get ua(){return this._ua}get browser(){return this._browser}get device(){return this._device}get userAgent(){return this._userAgent}get os(){return this._os}get os_version(){return this._os_version}get browser_version(){return this._browser_version}get deviceType(){return this._deviceType}get orientation(){return this._orientation}get isDesktopMode(){return this._isDesktopMode}detectFromMapping(e,t){let i=oi[t.const],s=oi[`${t.const}_RE`];if(i.device&&i.device==="device"&&Pe(this.platformId)&&(this.reTree().test(this._userAgent(),he[Ye])||typeof navigator<"u"&&navigator.platform&&navigator.platform.includes("Mac")&&navigator.maxTouchPoints>1))return Ye;for(let l of Object.keys(i)){let u=s[l];if(u&&this.reTree().test(e,u))return i[l]}return i.UNKNOWN||_e.UKNOWN}detectDesktopMode(e){if(!Pe(this.platformId)||!globalThis||this._deviceType()===ne.Mobile||this.deviceType()===ne.Tablet||this._deviceType()===ne.Desktop)return!1;let t={hasTouch:"ontouchstart"in globalThis||navigator.maxTouchPoints&&navigator.maxTouchPoints>0,hasMobileScreenSize:this.hasMobileScreenDimensions(),hasMobileBrowserSignatures:this.hasMobileBrowserSignatures(e),hasOrientationSupport:"orientation"in globalThis||"onorientationchange"in globalThis,hasDeviceMotion:"DeviceMotionEvent"in globalThis||"DeviceOrientationEvent"in globalThis};return t.hasTouch?!0:Object.values(t).filter(Boolean).length>=2}hasMobileScreenDimensions(){if(!globalThis||!window.screen)return!1;let{width:e,height:t}=window.screen,i=Math.max(e,t),s=Math.min(e,t);return i<=1024&&s<=768}hasMobileBrowserSignatures(e){return[/Mobile.*Safari/,/Chrome.*Mobile/,/Android.*Chrome/,/iPhone.*CriOS/,/iPad.*CriOS/,/Mobile.*Firefox/,/FxiOS/].some(i=>i.test(e))}setDeviceInfo(e=this._userAgent()){if(e!==this._userAgent()&&this._userAgent.set(e),this._os.set(this.detectFromMapping(e,{const:"OS",prop:"os"})),this._browser.set(this.detectFromMapping(e,{const:"BROWSERS",prop:"browser"})),this._device.set(this.detectFromMapping(e,{const:"DEVICES",prop:"device"})),this._device()===X.ANDROID){let t=X;for(let i of Object.keys(t)){let s=si[i];if(s&&this.reTree().test(e,s)&&t[i]!==X.ANDROID){this._device.set(t[i]);break}}}if(this._os_version.set(this.detectFromMapping(e,{const:"OS_VERSIONS",prop:"os_version"})),this._browser_version.set("0"),this.browser()!==tt.UNKNOWN){let t=di[this.browser()];if(t){let i=this.reTree().exec(e,t);i&&this._browser_version.set(i[1])}}globalThis!=null&&globalThis.matchMedia?this._orientation.set(globalThis.matchMedia("(orientation: landscape)").matches?et.Landscape:et.Portrait):this._orientation.set(_e.UKNOWN),this.isTablet()?this._deviceType.set(ne.Tablet):this.isMobile()?this._deviceType.set(ne.Mobile):this.isDesktop()?this._deviceType.set(ne.Desktop):this._deviceType.set(ne.Unknown),this._isDesktopMode.set(this.detectDesktopMode(e))}getDeviceInfo(){return{userAgent:this.userAgent(),os:this.os(),browser:this.browser(),device:this.device(),os_version:this.os_version(),browser_version:this.browser_version(),deviceType:this.deviceType(),orientation:this.orientation(),isDesktopMode:this.isDesktopMode()}}isMobile(e=this.userAgent()){if(this.isTablet(e))return!1;for(let t of Object.keys(Oe))if(this.reTree().test(e,Oe[t]))return!0;return!1}isTablet(e=this.userAgent()){if(Pe(this.platformId)&&(this.reTree().test(this.userAgent(),he[Ye])||typeof navigator<"u"&&navigator.platform&&navigator.platform.includes("Mac")&&navigator.maxTouchPoints>1))return!0;for(let t of Object.keys(he))if(this.reTree().test(e,he[t]))return!0;return!1}isDesktop(e=this.userAgent()){return this.device()===X.UNKNOWN&&(this.isMobile(e)||this.isTablet(e))?!1:ai.includes(this.device()
2)}isDesktopModeEnabled(){return this.isDesktopMode()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275prov=dt({token:a,factory:a.\u0275fac,providedIn:"root"});let n=a;return n})();function Gi(n,a){if(n&1&&(d(0,"li"),m(1),A(2,"translate"),c()),n&2){let o=a.$implicit;r(),D(w(2,1,o))}}var li=["*"],nt=()=>({height:"100%","aspect-ratio":"1.82 / 1"}),le=n=>({style:n}),pi=()=>({height:"100%","aspect-ratio":"0.71 / 1"}),Ri=()=>({height:"100%","aspect-ratio":"0.65 / 1"}),mi=n=>({height:n,padding:"0"});function ki(n,a){n&1&&ee(0)}function Bi(n,a){if(n&1&&(d(0,"md-horizontal-card-camera-frame",2),A(1,"translate"),Q(2,ki,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"KTP_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,nt)))}}function Hi(n,a){n&1&&ee(0)}function Ni(n,a){if(n&1&&(d(0,"md-horizontal-card-camera-frame",3),A(1,"translate"),Q(2,Hi,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"KTP_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,nt)))}}function Li(n,a){n&1&&ee(0)}function Vi(n,a){if(n&1&&(d(0,"md-horizontal-card-camera-frame",4),A(1,"translate"),Q(2,Li,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"NPWP_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,nt)))}}function Fi(n,a){n&1&&ee(0)}function Ui(n,a){if(n&1&&(d(0,"md-vertical-card-camera-frame",5),A(1,"translate"),Q(2,Fi,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"SIA_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,pi)))}}function Wi(n,a){n&1&&ee(0)}function Xi(n,a){if(n&1&&(d(0,"md-vertical-card-camera-frame",6),A(1,"translate"),Q(2,Wi,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"SIPA_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,pi)))}}function zi(n,a){n&1&&ee(0)}function ji(n,a){if(n&1&&(d(0,"md-vertical-card-camera-frame",7),A(1,"translate"),Q(2,zi,1,0,"ng-container",16),c()),n&2){p();let o=te(19);_("title",w(1,3,"Tebus resepmu, pastikan resep masuk ke dalam bingkai")),r(2),_("ngTemplateOutlet",o)("ngTemplateOutletContext",G(6,le,ie(5,Ri)))}}function Ki(n,a){n&1&&ee(0)}function Qi(n,a){if(n&1&&(S(0,"md-selfie-ktp-camera-frame",17),A(1,"translate"),Q(2,Ki,1,0,"ng-container",16)),n&2){let o=p(),e=te(19);_("title",w(1,3,"SELFIE_KTP_UPLOAD_INSTRUCTION_TITLE")),r(2),_("ngTemplateOutlet",e)("ngTemplateOutletContext",G(7,le,G(5,mi,o.isDesktop?"70vh":"100%")))}}function Zi(n,a){n&1&&ee(0)}function Yi(n,a){if(n&1&&Q(0,Zi,1,0,"ng-container",16),n&2){let o=p(),e=te(19);_("ngTemplateOutlet",e)("ngTemplateOutletContext",G(4,le,G(2,mi,o.isDesktop?"100vh":"100%")))}}function $i(n,a){if(n&1){let o=E();d(0,"div",8)(1,"span",18),m(2,"\u2212"),c(),d(3,"input",19),g("input",function(t){C(o);let i=p();return b(i.onZoomSliderChange(t))}),c(),d(4,"span",20),m(5,"+"),c()()}if(n&2){let o=p();r(3),_("min",o.zoomCapabilities().min)("max",o.zoomCapabilities().max)("step",o.zoomCapabilities().step)("value",o.zoomLevel())}}function qi(n,a){if(n&1&&S(0,"div",21),n&2){let o=p();V("left",o.focusRingX(),"px")("top",o.focusRingY(),"px")}}function Ji(n,a){n&1&&(d(0,"div",10),m(1,"Tap to focus"),c())}function en(n,a){if(n&1){let o=E();Tt(0),d(1,"div",22)(2,"div",23)(3,"label",24)(4,"input",25),g("change",function(t){C(o);let i=p();return b(i.onFileUpload(t))}),c(),S(5,"img",26),c()(),d(6,"div",27)(7,"div",28),g("click",function(){C(o);let t=p();return b(t.takePicture())}),S(8,"img",29),c()(),d(9,"div",30)(10,"div",28),g("click",function(){C(o);let t=p();return b(t.onBackBtnClick())}),m(11,"Cancel"),c()()(),Ct()}}function tn(n,a){if(n&1){let o=E();d(0,"div",33),g("click",function(){C(o);let t=p(2);return b(t.takePicture())}),S(1,"img",34),c()}}function nn(n,a){if(n&1){let o=E();d(0,"div",35),g("click",function(){C(o);let t=p(2);return b(t.onCameraFlipForPhotoCaptureClick())}),S(1,"img",36),c()}}function on(n,a){if(n&1&&(d(0,"div",11),h(1,tn,2,0,"div",31),h(2,nn,2,0,"div",32),c()),n&2){let o=p();r(),T(!o.isPhotoCaptured&&!o.hideNativeCaptureBtn()?1:-1),r(),T(o.isPhotoCaptured?-1:2)}}function an(n,a){if(n&1){let o=E();d(0,"div",13)(1,"div",37),g("click",function(){C(o);let t=p();return b(t.onRetakeBtnClick())}),m(2),A(3,"translate"),c(),d(4,"div")(5,"button",38),g("click",function(){C(o);let t=p();return b(t.onUploadBtnClick())}),d(6,"div",39)(7,"div")(8,"b"),m(9),A(10,"translate"),c()()()()()()}if(n&2){let o=p();r(),V("color",o.customStyle().btnColor),r(),v(" ",w(3,6,"RETAKE")," "),r(3),V("background",o.customStyle().btnColor),r(4),D(w(10,8,"UPLOAD"))}}function rn(n,a){n&1&&(d(0,"div",14),S(1,"div",40),c())}function sn(n,a){if(n&1&&(d(0,"div",15)(1,"div",41),m(2),c(),d(3,"div",42),m(4),c()()),n&2){let o=p();r(2),D(o.cameraErrorMessageTitle),r(2),v(" ",o.cameraErrorMessageSubtitle," ")}}function dn(n,a){if(n&1){let o=E();d(0,"video",45),g("initError",function(t){C(o);let i=p(2);return b(i.onCameraError(t))})("cameraReady",function(){C(o);let t=p(2);return b(t.onCameraReady())}),c()}if(n&2){let o=p(),e=o.class,t=o.style,i=p();Fe(t),$(e),_("facingMode",i.facingModeValue())}}function cn(n,a){if(n&1&&S(0,"img",46),n&2){let o=p(),e=o.class,t=o.style,i=p();Fe(t),$(e),_("src",i.capturedImgUrl,K)}}function ln(n,a){if(n&1&&h(0,dn,1,5,"video",43)(1,cn,1,5,"img",44),n&2){let o=p();T(o.isPhotoCaptured?1:0)}}var pn=["videoStream"],mn=["recordedVideo"],_n=n=>({hidden:n});function un(n,a){if(n&1&&(d(0,"div",5),m(1),c()),n&2){let o=p(2);r(),v(" ",o.getRecordingTime()," ")}}function gn(n,a){if(n&1){let o=E();d(0,"div",21),g("click",function(){C(o);let t=p(3);return b(t.onRecordBtnClick())}),S(1,"img",22),c()}}function hn(n,a){if(n&1){let o=E();d(0,"div",23),g("click",function(){C(o);let t=p(3);return b(t.onRecordBtnClick())}),c()}}function Tn(n,a){if(n&1){let o=E();d(0,"div",24),g("click",function(){C(o);let t=p(3);return b(t.onCameraFlipForVideoRecordClick())}),S(1,"img",25),c()}}function Cn(n,a){if(n&1&&(d(0,"div",12),h(1,gn,2,0,"div",18),h(2,hn,1,0,"div",19),h(3,Tn,2,0,"div",20),c()),n&2){let o=p(2);r(),T(!o.recordingStarted&&!o.isVideoRecorded?1:-1),r(),T(o.recordingStarted&&!o.isVideoRecorded?2:-1),r(),T(o.isVideoRecorded?-1:3)}}function bn(n,a){if(n&1){let o=E();d(0,"div",13)(1,"div",26),g("click",function(){C(o);let t=p(2);return b(t.onRetakeBtnClick())}),m(2),A(3,"translate"),c(),d(4,"div")(5,"button",27),g("click",function(){C(o);let t=p(2);return b(t.onUploadBtnClick())}),d(6,"div",28)(7,"div")(8,"b"),m(9),A(10,"translate"),c()()()()()()}if(n&2){let o=p(2);r(),V("color",o.customStyle().btnColor),r(),v(" ",w(3,6,"RETAKE_VIDEO")," "),r(3),V("background",o.customStyle().btnColor),r(4),D(w(10,8,"UPLOAD"))}}function Sn(n,a){n&1&&S(0,"div",14)}function fn(n,a){n&1&&(d(0,"div",15),S(1,"div",29),c())}function Pn(n,a){if(n&1&&(d(0,"div",16)(1,"div",30),m(2),c(),d(3,"div",31),m(4),c()()),n&2){let o=p(2);r(2),D(o.cameraErrorMessageTitle),r(2),v(" ",o.cameraErrorMessageSubtitle," ")}}function Mn(n,a){n&1&&(d(0,"div",17),S(1,"md-video-recording-instruction"),c())}function xn(n,a){if(n&1){let o=E();d(0,"div",2)(1,"div",4),m(2),A(3,"translate"),c(),h(4,un,2,1,"div",5),d(5,"div",6)(6,"div",7),g("click",function(){C(o);let t=p();return b(t.onBackBtnClick())}),d(7,"mat-icon",8),m(8,"keyboard_backspace"),c()(),d(9,"div",9),m(10),A(11,"translate"),c()(),d(12,"video",10,0),g("initError",function(t){C(o);let i=p();return b(i.onCameraError(t))})("cameraReady",function(){C(o);let t=p();return b(t.onCameraReady())})("recordedVideo",function(t){C(o);let i=p();return b(i.onVideoRecorded(t))}),c(),S(14,"video",11,1),h(16,Cn,4,3,"div",12),h(17,bn,11,10,"div",13),h(18,Sn,1,0,"div",14),h(19,fn,2,0,"div",15),h(20,Pn,5,2,"div",16),h(21,Mn,2,0,"div",17),c()}if(n&2){let o=p();
2r(2),v(" ",w(3,12,"VIDEO_RECORD_SUG")," "),r(2),T(o.recordingTime>0?4:-1),r(6),v(" ",w(11,14,"RECORD_VIDEO")," "),r(2),$(G(16,_n,o.isCameraLoading||o.isCameraError)),_("facingMode",o.facingModeValue()),r(4),T(!o.isCameraLoading&&!o.isCameraError?16:-1),r(),T(o.isVideoRecorded?17:-1),r(),T(o.isCameraLoading?18:-1),r(),T(o.isCameraLoading?19:-1),r(),T(o.isCameraError?20:-1),r(),T(o.isCameraLoading?-1:21)}}function vn(n,a){if(n&1){let o=E();d(0,"div",3)(1,"md-camera-frame",32),g("handleImageCaptured",function(t){C(o);let i=p();return b(i.handleImageCaptured.emit(t))})("uploadUserMedia",function(t){C(o);let i=p();return b(i.uploadUserMedia.emit(t))})("backBtnClick",function(){C(o);let t=p();return b(t.onBackBtnClick())})("retakeBtnClicked",function(){C(o);let t=p();return b(t.retakeBtnClicked.emit())}),c()()}if(n&2){let o=p();r(),_("docType",o.docType())("customStyle",o.customStyle())("showPicturePreview",o.showPicturePreview())("facingMode",o.facingMode())("enableZoom",o.enableZoom())("enableFocus",o.enableFocus())("hideNativeCaptureBtn",o.hideNativeCaptureBtn())("triggerCapture",o.triggerCapture())}}var An="@keyframes _ngcontent-%COMP%_ghost-lines{0%{background-position:-100px}40%{background-position:40vw}to{background-position:60vw}}@keyframes _ngcontent-%COMP%_ghost-avatar{0%{background-position:-32px}40%,to{background-position:208px}}.on-camera__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:0;height:inherit;width:inherit;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;margin:0}.on-camera__btn-capture__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:50%;height:48px;width:48px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.on-camera__error[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;text-align:center}.on-camera__error[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:16px}.on-camera__error[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:12px}.on-camera__camera-flip[_ngcontent-%COMP%]{position:absolute;right:1rem}.on-camera[_ngcontent-%COMP%] .caution-msg[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:400;background:#e9f4f9;padding:10px;top:65px;width:95%;margin-left:10px;margin-right:10px}.on-camera[_ngcontent-%COMP%] .video-timer[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:600;background:#e9f4f9;padding:10px;top:65px;width:15%;text-align:center;margin-left:10px;right:8px}.on-camera__video[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 400px)}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:red;margin-right:115px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .captured-img[_ngcontent-%COMP%]{width:100vw;height:100vh;max-width:1280px;max-height:calc(100vh - 380px)}.on-camera[_ngcontent-%COMP%] .recorded-file[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;
2max-height:calc(100vh - 410px)}.on-camera__btn-capture-container[_ngcontent-%COMP%]{justify-content:center;align-items:center;position:absolute;bottom:0;display:flex;height:100px;width:100%;z-index:10}.on-camera__btn-capture[_ngcontent-%COMP%]{cursor:pointer}.on-camera[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:16px;font-weight:600;position:fixed;top:14px;padding:12px;z-index:2;display:flex;background:#f8f7f7}.on-camera[_ngcontent-%COMP%] .video-inst[_ngcontent-%COMP%]{position:absolute;width:95%;bottom:15%;align-items:center;justify-content:center}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .upload-btn-container[_ngcontent-%COMP%]{position:absolute;bottom:0;height:100px;width:100%;padding-left:2rem;padding-right:2rem}.on-camera[_ngcontent-%COMP%] .upload-btn[_ngcontent-%COMP%]{color:#fff}@media screen and (min-width:960px){.on-camera__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:0;height:inherit;width:inherit;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;margin:0}.on-camera__btn-capture__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:50%;height:48px;width:48px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.on-camera__error[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;text-align:center}.on-camera__error[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:16px}.on-camera__error[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:12px}.on-camera__video[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px);margin-top:50px}.on-camera[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:16px;font-weight:600;position:fixed;top:150px;padding:10px;z-index:2;display:flex;background:#f8f7f7}.on-camera[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{font-size:16px;font-weight:600}.on-camera[_ngcontent-%COMP%] .captured-img[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px)}.on-camera[_ngcontent-%COMP%] .caution-msg[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:400;background:#e9f4f9;padding:10px;top:22%;width:70%;margin-left:10px;margin-right:10px;border-radius:4px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:red;margin-right:115px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .video-timer[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:600;background:#e9f4f9;padding:10px;top:22%;width:10%;text-align:center;margin-left:10px;right:20%}.on-camera[_ngcontent-%COMP%] .recorded-file[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px);margin-top:50px}.on-camera__btn-capture-container[_ngcontent-%COMP%]{justify-content:center;align-items:center;position:absolute;bottom:0;display:flex;left:0;height:100px;width:100%;z-index:10}.on-camera__btn-capture[_ngcontent-%COMP%], .on-camera[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .video-inst[_ngcontent-%COMP%]{position:absolute;width:70%;bottom:10%;align-items:center;justify-content:center}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.on-camera[_ngcontent-%COMP%] .upload-btn-container[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;padding-left:16px;padding-right:16px;max-width:1280px;margin:0 auto}.on-camera[_ngcontent-%COMP%] .upload-btn[_ngcontent-%COMP%]{color:#fff}}",In=(()=>
2{let a=class a{constructor(){this.subInstructions=["VIDEO_RECORD_1","VIDEO_RECORD_2","VIDEO_RECORD_3"]}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["md-video-recording-instruction"]],standalone:!1,decls:14,vars:9,consts:[[1,"flex","flex-col","sub-instruction","sub-ins-list","ml-10","px-6","py-6"],["data-testid","video-instr-footnote"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div"),m(2),A(3,"translate"),c(),d(4,"div")(5,"ul"),Z(6,Gi,3,3,"li",null,ge),c()(),d(8,"div",1),m(9),A(10,"translate"),d(11,"b"),m(12),A(13,"translate"),c()()()),t&2&&(r(2),D(w(3,3,"VIDEO_RECORD_INSTR")),r(4),Y(i.subInstructions),r(3),v(" ",w(10,5,"END_NOTE_1")," "),r(3),D(w(13,7,"END_NOTE_2")))},dependencies:[q],styles:[".sub-instruction[_ngcontent-%COMP%]{background:#e9f4f9;border-radius:4px;width:100%}.sub-ins-list[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#1f91bf}@media screen and (min-width:960px){.sub-instruction[_ngcontent-%COMP%]{background:#e9f4f9;border-radius:4px;width:100%}.sub-ins-list[_ngcontent-%COMP%]{font-size:14px;font-weight:400;color:#1f91bf}}"]});let n=a;return n})(),On=(()=>{let a=class a{};a.\u0275fac=function(t){return new(t||a)},a.\u0275mod=gt({type:a}),a.\u0275inj=ct({imports:[It,F]});let n=a;return n})(),En=(()=>{let a=class a{constructor(){this.title=P(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["md-selfie-ktp-camera-frame"]],inputs:{title:[1,"title"]},decls:5,vars:1,consts:[[1,"absolute","w-full","h-[85%]","z-10","flex","flex-col","justify-around","items-center","gap-4","gt-sm:w-1/2"],[1,"face-visual","z-10"],[1,"ktp-visual"],[1,"text-center","text-[#0BDA92]","font-semibold","z-10"]],template:function(t,i){t&1&&(H(0,"div",0),pe(1,"div",1)(2,"div",2),H(3,"div",3),m(4),N()()),t&2&&(r(4),v(" ",i.title()," "))},styles:['[_nghost-%COMP%]{display:flex;justify-content:center}.face-visual[_ngcontent-%COMP%]{width:50%;aspect-ratio:1/1.2;border:4px dashed #fff;border-radius:50%;background:transparent;box-shadow:0 0 0 9999px #00000080}.ktp-visual[_ngcontent-%COMP%]{width:50%;aspect-ratio:1.82/1;border:.57px solid #ffffff;border-radius:9px;background:transparent;box-shadow:0 0 0 9999px #00000080;position:relative}.ktp-visual[_ngcontent-%COMP%]:before{--s: 40px;position:absolute;content:" ";display:block;width:calc(100% + 2px);height:calc(100% + 2px);border:1.72px solid #ffffff;border-radius:8px;-webkit-mask:conic-gradient(at var(--s) var(--s),rgba(0,0,0,0) 75%,#000 0) 0 0/calc(100% - var(--s)) calc(100% - var(--s)),linear-gradient(#000 0 0) content-box}']});let n=a;return n})(),wn=(()=>{let a=class a{constructor(){this.title=P(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["md-horizontal-card-camera-frame"]],inputs:{title:[1,"title"]},ngContentSelectors:li,decls:6,vars:1,consts:[[1,"w-full","gt-sm:w-1/2"],[1,"text-center","!text-[#0BDA92]","font-semibold","mb-5"],[1,"z-10","w-full"],[1,"frame","w-full"]],template:function(t,i){t&1&&(He(),H(0,"div",0)(1,"div",1),m(2),N(),H(3,"div",2)(4,"div",3),Ne(5),N()()()),t&2&&(r(2),v(" ",i.title()," "))},styles:['[_nghost-%COMP%]{position:absolute;width:100%;height:100%;background:#333;display:flex;flex-direction:column;padding-top:50%;padding-left:1rem;padding-right:1rem}@media(min-width:992px){[_nghost-%COMP%]{padding-top:5%;align-items:center;position:relative;width:100%;height:70vh}}.frame[_ngcontent-%COMP%]{border:.57px solid #ffffff;border-radius:9px;position:relative}.frame[_ngcontent-%COMP%]:before{--s: 40px;position:absolute;content:" ";display:block;width:calc(100% + 2px);height:calc(100% + 2px);border:1.72px solid #ffffff;border-radius:8px;-webkit-mask:conic-gradient(at var(--s) var(--s),rgba(0,0,0,0) 75%,#000 0) 0 0/calc(100% - var(--s)) calc(100% - var(--s)),linear-gradient(#000 0 0) content-box}']});let n=a;return n})(),yn=(()=>{let a=class a{constructor(){this.title=P(void 0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["md-vertical-card-camera-frame"]],inputs:{title:[1,"title"]},ngContentSelectors:li,decls:6,vars:1,consts:[[1,"w-full","gt-sm:w-1/3"],[1,"text-center","text-[#0BDA92]","font-semibold","mb-5"],[1,"z-10","w-full"],[1,"frame","w-full"]],template:function(t,i){t&1&&(He(),H(0,"div",0)(1,"div",1),m(2),N(),H(3,"div",2)(4,"div",3),Ne(5),N()()()),t&2&&(r(2),v(" ",i.title()," "))},styles:['[_nghost-%COMP%]{position:absolute;width:100%;height:100%;background:#333;display:flex;flex-direction:column;padding-top:20%;padding-left:1rem;padding-right:1rem}@media(min-width:992px){[_nghost-%COMP%]{padding-top:1%;align-items:center;position:relative;width:100%;height:80vh}}.frame[_ngcontent-%COMP%]{border:.57px solid #ffffff;border-radius:9px;position:relative}.frame[_ngcontent-%COMP%]:before{--s: 40px;position:absolute;content:" ";display:block;width:calc(100% + 2px);height:calc(100% + 2px);border:1.72px solid #ffffff;border-radius:8px;-webkit-mask:conic-gradient(at var(--s) var(--s),rgba(0,0,0,0) 75%,#000 0) 0 0/calc(100% - var(--s)) calc(100% - var(--s)),linear-gradient(#000 0 0) content-box}']}
2);let n=a;return n})(),Dn=(()=>{let a=class a{constructor(e){this.element=e.nativeElement}};a.\u0275fac=function(t){return new(t||a)(se(ke))},a.\u0275dir=Be({type:a,selectors:[["video"]]});let n=a;return n})(),Te=(()=>{let a=class a extends Dn{constructor(e,t,i){super(e),this.document=t,this.platform=i,this.config=P(void 0,{alias:"mediaStream"}),this.facingMode=P("user"),this.initError=M(),this.mediaStreamRef=M(),this.videoRecorded=M(),this.cameraReady=M(),this.recordedVideo=M(),this.mediaDevices=navigator.mediaDevices,this.isRecording=!1,this.destroyRef=x(_t)}ngAfterViewInit(){if(this.platform.isBrowser&&this.element.autoplay){let e=this.getFacingModeFromConfig()||this.facingMode();this.play(e)}}getFacingModeFromConfig(){let e=this.config();if(e!=null&&e.video&&typeof e.video=="object"){let t=e.video;if(t.facingMode){if(typeof t.facingMode=="string")return t.facingMode;if(typeof t.facingMode=="object"&&"exact"in t.facingMode)return t.facingMode.exact;if(typeof t.facingMode=="object"&&"ideal"in t.facingMode)return t.facingMode.ideal}}}play(e){if(!this.mediaStream){this.userMediaObsForPhoto(this.config(),e).pipe(ze(this.destroyRef),Ge(i=>(this.initError.emit(i),we))).subscribe(i=>{this.mediaStream=i,this.mediaStreamRef.emit(this.mediaStream),this.play(e)});return}this.element.srcObject||(this.element.srcObject=this.mediaStream);let t=this.document.querySelector(".video");t&&(t.setAttribute("autoplay",""),t.setAttribute("muted",""),t.setAttribute("playsinline","")),this.element.play(),this.element.onplaying=()=>this.cameraReady.emit()}pause(){this.element.pause()}stop(){var e;(e=this.mediaStream)==null||e.getTracks().forEach(t=>t.stop()),this.mediaStream=void 0,this.element.pause(),this.element.srcObject=null}getZoomCapabilities(){var i,s;let e=(i=this.mediaStream)==null?void 0:i.getVideoTracks()[0];if(!e)return null;let t=(s=e.getCapabilities)==null?void 0:s.call(e);return t!=null&&t.zoom?{min:t.zoom.min??1,max:t.zoom.max??1,step:t.zoom.step??.1}:null}applyZoom(e){var i,s;let t=(i=this.mediaStream)==null?void 0:i.getVideoTracks()[0];t&&((s=t.applyConstraints)==null||s.call(t,{advanced:[{zoom:e}]}).catch(()=>{}))}getFocusCapabilities(){var i,s,l;let e=(i=this.mediaStream)==null?void 0:i.getVideoTracks()[0];if(!e)return null;let t=(s=e.getCapabilities)==null?void 0:s.call(e);return(l=t==null?void 0:t.focusMode)!=null&&l.length?{modes:t.focusMode}:null}applyTapToFocus(e,t){var u,I;let i=(u=this.mediaStream)==null?void 0:u.getVideoTracks()[0];if(!i)return;let s=window.ImageCapture;if(!s)return;let l=new s(i);(I=l.setOptions)==null||I.call(l,{focusMode:"single-shot",focusPointsOfInterest:[{x:e,y:t}]}).catch(()=>{})}capture(e){let t=this.document.createElement("canvas");t.width=(e==null?void 0:e.width)||this.element.clientWidth,t.height=(e==null?void 0:e.height)||this.element.clientHeight;let i=t.getContext("2d"),s=Math.max(t.width/this.element.videoWidth,t.height/this.element.videoHeight),l=t.width/2-this.element.videoWidth/2*s,u=t.height/2-this.element.videoHeight/2*s;return i==null||i.drawImage(this.element,l,u,this.element.videoWidth*s,this.element.videoHeight*s),t.toDataURL(e==null?void 0:e.type,e==null?void 0:e.encoderOptions)}playVideo(e){if(!this.mediaStream){this.userMediaObsForVideo(this.config(),e).pipe(ze(this.destroyRef),Ge(t=>(this.initError.emit(t),we))).subscribe(t=>{this.mediaStream=t,this.mediaStreamRef.emit(this.mediaStream),this.playVideo(e)});return}this.element.srcObject||(this.element.srcObject=this.mediaStream),this.element.play(),this.element.onplaying=()=>this.cameraReady.emit()}startRecording(){this.recordedBlobs=[];let t={mimeType:this.getSupportedMediaType()};try{this.mediaRecorder=new MediaRecorder(this.mediaStream,t)}catch(i){console.log(i),this.initError.emit(i)}this.mediaRecorder.start(),this.isRecording=!this.isRecording,this.onDataAvailableEvent(),this.onStopRecordingEvent()}getSupportedMediaType(){let e="",t=["video/webm","video/webm;codecs=vp8","video/webm;codecs=vp9","video/mp4;codecs:h264","video/webm;codecs=h264","audio/webm","video/x-matroska;codecs=avc1"];for(let i=0;i<t.length;
2i++)if(this.isTypeSupported(t[i])){e=t[i];break}return e}isTypeSupported(e){return MediaRecorder.isTypeSupported(e)}stopRecording(){this.mediaRecorder.stop(),this.isRecording=!this.isRecording}onDataAvailableEvent(){try{this.mediaRecorder.ondataavailable=e=>{e.data&&e.data.size>0&&this.recordedBlobs.push(e.data)}}catch(e){console.log(e)}}onStopRecordingEvent(){try{this.mediaRecorder.onstop=()=>{let e=new Blob(this.recordedBlobs,{type:"video/webm"}),t=new File([e],"recordedFile",{type:"application/x-matroska"}),i=window.URL.createObjectURL(e);i&&(this.recordedVideo.emit({videoUrl:i,videoFile:t}),this.stop())}}catch(e){console.log(e)}}buildMediaConstraints(e,t,i){let s={video:{facingMode:t},audio:i},l=e??{},u=typeof l.video=="object"?l.video:void 0,I=s.video,B;return u?B=k(k({},I),u):l.video!==void 0?B=l.video:B=s.video,ue(k(k({},s),l),{video:B,audio:l.audio??s.audio})}userMediaObsForPhoto(e,t){return this.mediaDevices?ye(this.mediaDevices.getUserMedia(this.buildMediaConstraints(e,t,!1))):De(()=>new ReferenceError("Camera access requires a secure context (HTTPS or localhost)."))}userMediaObsForVideo(e,t){return this.mediaDevices?ye(this.mediaDevices.getUserMedia(this.buildMediaConstraints(e,t,!0))):De(()=>new ReferenceError("Camera access requires a secure context (HTTPS or localhost)."))}};a.\u0275fac=function(t){return new(t||a)(se(ke),se(mt),se(Et))},a.\u0275dir=Be({type:a,selectors:[["video","mediaStream",""]],inputs:{config:[1,"mediaStream","config"],facingMode:[1,"facingMode"]},outputs:{initError:"initError",mediaStreamRef:"mediaStreamRef",videoRecorded:"videoRecorded",cameraReady:"cameraReady",recordedVideo:"recordedVideo"},features:[ht]});let n=a;return n})(),Gn=(()=>{let a=class a{constructor(e,t){this.translate=e,this.deviceService=t,this.mediaType=P("image"),this.docType=P(void 0),this.customStyle=P(void 0),this.showPicturePreview=P(!0),this.facingMode=P("user"),this.enableZoom=P(!1),this.enableFocus=P(!1),this.hideNativeCaptureBtn=P(!1),this.triggerCapture=P(0),this.facingModeValue=f("user"),this.mediaStream=fe(Te),this.uploadUserMedia=M(),this.backBtnClick=M(),this.handleImageCaptured=M(),this.retakeBtnClicked=M(),this.isCameraLoading=!0,this.isCameraError=!1,this.cameraErrorMessageTitle="",this.cameraErrorMessageSubtitle="",this.countForCameraClick=0,this.isVideoRecorded=!1,this.isPhotoCaptured=!1,this.recordingTime=0,this.recordingStarted=!1,this.isDesktop=!1,this.zoomLevel=f(1),this.zoomCapabilities=f(null),this.focusCapabilities=f(null),this.focusRingX=f(0),this.focusRingY=f(0),this.showFocusRing=f(!1),this.pinchStartDistance=0,this.pinchStartZoom=1,re(()=>{this.triggerCapture()>
20&&this.takePicture()})}ngOnInit(){this.facingModeValue.set(this.facingMode()),this.startCameraForPhotoCapture(this.facingModeValue()),this.isDesktop=this.deviceService.isDesktop()}ngOnDestroy(){clearTimeout(this.focusRingTimer);let e=this.mediaStream();e&&e.stop()}onBackBtnClick(){let e=this.mediaStream();e&&e.stop(),this.backBtnClick.emit()}onCameraFlipForPhotoCaptureClick(){this.isCameraLoading=!0,this.mediaStream().stop(),this.resetZoom(),this.resetFocus(),this.facingModeValue.set(this.facingModeValue()==="user"?"environment":"user"),this.startCameraForPhotoCapture(this.facingModeValue())}startCameraForPhotoCapture(e){setTimeout(()=>{this.mediaStream().play(e)},100)}onRetakeBtnClick(){this.isCameraLoading=!0,this.isPhotoCaptured=!1,this.resetZoom(),this.resetFocus(),this.startCameraForPhotoCapture(this.facingModeValue()),this.retakeBtnClicked.emit()}onCameraError(e){this.isCameraError=!0,this.isCameraLoading=!1,this.generateErrorMessage(e.name)}onCameraReady(){var e,t;if(this.isCameraLoading=!1,this.enableZoom()){let i=(e=this.mediaStream())==null?void 0:e.getZoomCapabilities();i&&(this.zoomCapabilities.set(i),this.zoomLevel.set(i.min))}if(this.enableFocus()){let i=(t=this.mediaStream())==null?void 0:t.getFocusCapabilities();this.focusCapabilities.set(i??null)}}generateErrorMessage(e){e==="NotAllowedError"?(this.cameraErrorMessageTitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_NOT_ALLOWED_TITLE"),this.cameraErrorMessageSubtitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_NOT_ALLOWED_SUBTITLE")):(this.cameraErrorMessageTitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_DEVICE_ERROR_TITLE"),this.cameraErrorMessageSubtitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_DEVICE_ERROR_SUBTITLE"))}takePicture(){this.capturedImgUrl=this.mediaStream().capture(),this.isPhotoCaptured=!0,this.capturedImgFile=this.dataURLtoFile(this.capturedImgUrl,this.docType()),this.mediaStream().stop(),this.handleImageCaptured.emit({file:this.capturedImgFile,fileUrl:this.capturedImgUrl}),this.showPicturePreview()||this.onUploadBtnClick()}onFileUpload(e){let t=e.target;if(t.files&&t.files.length>0){let i=t.files[0],s=new FileReader;s.onload=l=>{var I;let u=(I=l.target)==null?void 0:I.result;this.capturedImgUrl=u,this.isPhotoCaptured=!0,this.capturedImgFile=i,this.handleImageCaptured.emit({file:this.capturedImgFile,fileUrl:this.capturedImgUrl}),this.showPicturePreview()||this.onUploadBtnClick()},s.readAsDataURL(i)}}onZoomSliderChange(e){var i;if(!this.enableZoom())return;let t=parseFloat(e.target.value);this.zoomLevel.set(t),(i=this.mediaStream())==null||i.applyZoom(t)}onPinchStart(e){!this.enableZoom()||e.touches.length!==2||(this.pinchStartDistance=this.getTouchDistance(e.touches),this.pinchStartZoom=this.zoomLevel())}onPinchMove(e){var u;if(!this.enableZoom()||e.touches.length!==2)return;e.preventDefault();let t=this.zoomCapabilities();if(!t)return;let s=this.getTouchDistance(e.touches)/this.pinchStartDistance,l=Math.min(t.max,Math.max(t.min,this.pinchStartZoom*s));this.zoomLevel.set(l),(u=this.mediaStream())==null||u.applyZoom(l)}onTapToFocus(e){var l;if(!this.enableFocus()||!this.focusCapabilities()||this.isPhotoCaptured)return;let t=e.currentTarget.getBoundingClientRect(),i=e.clientX-t.left,s=e.clientY-t.top;this.focusRingX.set(i),this.focusRingY.set(s),this.showFocusRing.set(!0),clearTimeout(this.focusRingTimer),this.focusRingTimer=setTimeout(()=>
2this.showFocusRing.set(!1),1500),(l=this.mediaStream())==null||l.applyTapToFocus(i/t.width,s/t.height)}dataURLtoFile(e,t){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],l=atob(i[1]),u=l.length,I=new Uint8Array(u);for(;u--;)I[u]=l.charCodeAt(u);return new File([I],t,{type:s})}onUploadBtnClick(){this.uploadUserMedia.emit({mediaType:this.mediaType(),mediaUrl:this.capturedImgUrl,mediaFile:this.capturedImgFile})}resetZoom(){this.zoomLevel.set(1),this.zoomCapabilities.set(null)}resetFocus(){this.focusCapabilities.set(null),this.showFocusRing.set(!1),clearTimeout(this.focusRingTimer)}getTouchDistance(e){let t=e[0].clientX-e[1].clientX,i=e[0].clientY-e[1].clientY;return Math.sqrt(t*t+i*i)}};a.\u0275fac=function(t){return new(t||a)(se(W),se(ci))},a.\u0275cmp=y({type:a,selectors:[["md-camera-frame"]],viewQuery:function(t,i){t&1&&Le(i.mediaStream,Te,5),t&2&&Ve()},inputs:{mediaType:[1,"mediaType"],docType:[1,"docType"],customStyle:[1,"customStyle"],showPicturePreview:[1,"showPicturePreview"],facingMode:[1,"facingMode"],enableZoom:[1,"enableZoom"],enableFocus:[1,"enableFocus"],hideNativeCaptureBtn:[1,"hideNativeCaptureBtn"],triggerCapture:[1,"triggerCapture"]},outputs:{uploadUserMedia:"uploadUserMedia",backBtnClick:"backBtnClick",handleImageCaptured:"handleImageCaptured",retakeBtnClicked:"retakeBtnClicked"},decls:20,vars:13,consts:[["cameraFrame",""],[1,"on-camera","w-full","relative","overflow-hidden",3,"touchstart","touchmove","click"],["data-testid","camera-frame-ktp-owner",3,"title"],["data-testid","camera-frame-ktp-pharmacist",3,"title"],["data-testid","camera-frame-npwp-owner",3,"title"],["data-testid","camera-frame-sia",3,"title"],["data-testid","camera-frame-sipa-pharmacist",3,"title"],["data-testid","camera-frame-prescription-upload",3,"title"],[1,"zoom-controls"],[1,"focus-ring",3,"left","top"],[1,"focus-hint"],[1,"on-camera","flex","flex-row","justify-between","z-30","gt-sm:bg-white","mb-[30px]"],[1,"flex","justify-center"],[1,"upload-btn-container","flex","flex-row","justify-between","items-center","z-30"],[1,"on-camera__btn-capture-container"],[1,"on-camera__video","on-camera__error"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["data-testid","camera-frame-selfie-ktp",3,"title"],["data-testid","camera-frame-zoom-decrease",1,"zoom-icon"],["type","range","data-testid","camera-frame-zoom-slider",1,"zoom-slider",3,"input","min","max","step","value"],["data-testid","camera-frame-zoom-increase",1,"zoom-icon"],[1,"focus-ring"],[1,"flex","flex-row","justify-between","items-center","z-30","w-full","px-5","absolute","bottom-0","left-0","mb-[15px]"],[1,"flex-1","flex","justify-start"],[1,"file-upload-label","cursor-pointer","flex","items-center"],["type","file","accept","image/*,application/pdf",2,"display","none",3,"change"],["ngSrc","/assets/images/file-upload.png","width","27","height","27"],[1,"flex-1","flex","justify-center"],[3,"click"],["ngSrc","/assets/images/capture.png","width","72","height","72"],[1,"flex-1","flex","justify-end","font-semibold","text-[#ffffff]","text-[12px]"],[1,"on-camera__btn-capture"],[1,"on-camera__camera-flip","lt-sm:block"],[1,"on-camera__btn-capture",3,"click"],["ngSrc","/assets/images/capture.png","width","48","height","48"],[1,"on-camera__camera-flip","lt-sm:block",3,"click"],["ngSrc","/assets/images/camera-flip.png","width","35","height","35"],[1,"retake-btn","text-red",3,"click"],["mat-button","",1,"upload-btn","bg-red",3,"click"],[1,"flex","flex-row"],[1,"on-camera__btn-capture__loading"],["data-testid","camera-frame-error-title",1,"title"],["data-testid","camera-frame-error-subtitle",1,"subtitle"],[1,"on-camera__video","video","!w-full","p-1","-mb-1",3,"mediaStream","facingMode","class","style"],[1,"on-camera__video","video","!w-full","p-1",3,"class","style","src"],[1,"on-camera__video","video","!w-full","p-1","-mb-1",3,"initError","cameraReady","mediaStream","facingMode"],[1,"on-camera__video","video","!w-full","p-1",3,"src"]],template:function(t,i){if(t&1&&(d(0,"div",1),g("touchstart",function(l){return i.onPinchStart(l)})("touchmove",function(l){return i.onPinchMove(l)})("click",function(l){return i.onTapToFocus(l)}),h(1,Bi,3,8,"md-horizontal-card-camera-frame",2)(2,Ni,3,8,"md-horizontal-card-camera-frame",3)(3,Vi,3,8,"md-horizontal-card-camera-frame",4)(4,Ui,3,8,"md-vertical-card-camera-frame",5)(5,Xi,3,8,"md-vertical-card-camera-frame",6)(6,ji,3,8,"md-vertical-card-camera-frame",7)(7,Qi,3,9)(8,Yi,1,6,"ng-container"),h(9,$i,6,4,"div",8),h(10,qi,1,4,"div",9),h(11,Ji,2,0,"div",10),h(12,en,12,0,"ng-container"),h(13,on,3,2,"div",11),d(14,"div",12),h(15,an,11,10,"div",13),c(),h(16,rn,2,0,"div",14),h(17,sn,5,2,"div",15),c(),Q(18,ln,2,1,"ng-template",null,0,xt)),t&2){let s,l,u;$((s=i.customStyle())!=null&&s.headerHeight?"":"full-height"),V("height",(l=i.customStyle())!=null&&l.headerHeight?"calc(100vh - "+i.customStyle().headerHeight+")":"calc(100vh - 60px)"),r(),T((u=i.docType())==="KTP_OWNER"?1:u==="KTP_PHARMACIST"?2:u==="NPWP_OWNER"?3:u==="SIA"?4:u==="SIPA_PHARMACIST"?5:u==="PRESCRIPTION_UPLOAD"?6:u==="SELFIE_KTP_PHARMACIST"?7:8),r(8),T(i.enableZoom()&&i.zoomCapabilities()&&!i.isPhotoCaptured&&!i.isCameraLoading&&!i.isCameraError?9:-1),r(),T(i.enableFocus()&&i.showFocusRing()?10:-1),r(),T(i.enableFocus()&&i.focusCapabilities()&&!i.isPhotoCaptured&&!i.isCameraLoading?11:-1),r(),T(i.docType()==="PRESCRIPTION_UPLOAD"&&!i.isPhotoCaptured&&!i.isCameraLoading&&!i.isCameraError?12:-1),r(),T(!(i.docType()==="PRESCRIPTION_UPLOAD"&&!i.isPhotoCaptured)&&
2!i.isCameraLoading&&!i.isCameraError?13:-1),r(2),T(i.isPhotoCaptured?15:-1),r(),T(i.isCameraLoading?16:-1),r(),T(i.isCameraError?17:-1)}},dependencies:[F,At,Xe,Ke,je,wn,yn,En,Te,q],styles:["@keyframes _ngcontent-%COMP%_ghost-lines{0%{background-position:-100px}40%{background-position:40vw}to{background-position:60vw}}@keyframes _ngcontent-%COMP%_ghost-avatar{0%{background-position:-32px}40%,to{background-position:208px}}.on-camera__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:0;height:inherit;width:inherit;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;margin:0}.on-camera__btn-capture__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:50%;height:48px;width:48px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.on-camera__error[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;text-align:center}.on-camera__error[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:16px}.on-camera__error[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:12px}.on-camera__camera-flip[_ngcontent-%COMP%]{position:absolute;right:1rem}.on-camera[_ngcontent-%COMP%] .caution-msg[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:400;background:#e9f4f9;padding:10px;top:65px;width:95%;margin-left:10px;margin-right:10px}.on-camera[_ngcontent-%COMP%] .video-timer[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:600;background:#e9f4f9;padding:10px;top:65px;width:15%;text-align:center;margin-left:10px;right:8px}.on-camera__video[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 400px)}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:red;margin-right:115px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .captured-img[_ngcontent-%COMP%]{width:100vw;height:100vh;max-width:1280px;max-height:calc(100vh - 380px)}.on-camera[_ngcontent-%COMP%] .recorded-file[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;
2max-height:calc(100vh - 410px)}.on-camera__btn-capture-container[_ngcontent-%COMP%]{justify-content:center;align-items:center;position:absolute;bottom:0;display:flex;height:100px;width:100%;z-index:10}.on-camera__btn-capture[_ngcontent-%COMP%]{cursor:pointer}.on-camera[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:16px;font-weight:600;position:fixed;top:14px;padding:12px;z-index:2;display:flex;background:#f8f7f7}.on-camera[_ngcontent-%COMP%] .video-inst[_ngcontent-%COMP%]{position:absolute;width:95%;bottom:15%;align-items:center;justify-content:center}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .upload-btn-container[_ngcontent-%COMP%]{position:absolute;bottom:0;height:100px;width:100%;padding-left:2rem;padding-right:2rem}.on-camera[_ngcontent-%COMP%] .upload-btn[_ngcontent-%COMP%]{color:#fff}@media screen and (min-width:960px){.on-camera__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:0;height:inherit;width:inherit;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;margin:0}.on-camera__btn-capture__loading[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:50%;height:48px;width:48px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:inline-block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.on-camera__error[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-direction:column;text-align:center}.on-camera__error[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:16px}.on-camera__error[_ngcontent-%COMP%] .subtitle[_ngcontent-%COMP%]{font-weight:400;font-size:12px}.on-camera__video[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px);margin-top:50px}.on-camera[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{font-size:16px;font-weight:600;position:fixed;top:150px;padding:10px;z-index:2;display:flex;background:#f8f7f7}.on-camera[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{font-size:16px;font-weight:600}.on-camera[_ngcontent-%COMP%] .captured-img[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px)}.on-camera[_ngcontent-%COMP%] .caution-msg[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:400;background:#e9f4f9;padding:10px;top:22%;width:70%;margin-left:10px;margin-right:10px;border-radius:4px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]{width:30px;height:30px;background:red;margin-right:115px}.on-camera[_ngcontent-%COMP%] .record-stop-btn[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .video-timer[_ngcontent-%COMP%]{position:fixed;z-index:2;color:#135773;font-size:12px;font-weight:600;background:#e9f4f9;padding:10px;top:22%;width:10%;text-align:center;margin-left:10px;right:20%}.on-camera[_ngcontent-%COMP%] .recorded-file[_ngcontent-%COMP%]{width:100vw;height:100vh;object-fit:cover;max-width:1280px;max-height:calc(100vh - 470px);margin-top:50px}.on-camera__btn-capture-container[_ngcontent-%COMP%]{justify-content:center;align-items:center;position:absolute;bottom:0;display:flex;left:0;height:100px;width:100%;z-index:10}.on-camera__btn-capture[_ngcontent-%COMP%], .on-camera[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]:hover{cursor:pointer}.on-camera[_ngcontent-%COMP%] .video-inst[_ngcontent-%COMP%]{position:absolute;width:70%;bottom:10%;align-items:center;justify-content:center}.on-camera[_ngcontent-%COMP%] .retake-btn[_ngcontent-%COMP%]{font-weight:600;font-size:16px}.on-camera[_ngcontent-%COMP%] .upload-btn-container[_ngcontent-%COMP%]{position:absolute;bottom:0;left:0;right:0;width:100%;padding-left:16px;padding-right:16px;max-width:1280px;margin:0 auto}.on-camera[_ngcontent-%COMP%] .upload-btn[_ngcontent-%COMP%]{color:#fff}}","[_nghost-%COMP%]{display:flex;justify-content:center}.on-camera[_ngcontent-%COMP%]{max-width:1280px}.on-camera__video[_ngcontent-%COMP%]{max-height:100vh;margin-top:0}@media(min-width:992px){.on-camera__video[_ngcontent-%COMP%]{height:100%}}.full-height[_ngcontent-%COMP%]{height:calc(100vh - 118px)}@media(min-width:992px){.full-height[_ngcontent-%COMP%]{height:calc(100vh - 175px)}} .merchant-profile-kyc-container:has(.full-height){margin-top:0;padding-bottom:0}
2.zoom-controls[_ngcontent-%COMP%]{position:absolute;bottom:90px;left:50%;transform:translate(-50%);display:flex;align-items:center;gap:8px;z-index:40;background:#00000059;border-radius:20px;padding:6px 12px}.zoom-controls[_ngcontent-%COMP%] .zoom-icon[_ngcontent-%COMP%]{color:#fff;font-size:18px;font-weight:600;line-height:1;-webkit-user-select:none;user-select:none}.zoom-controls[_ngcontent-%COMP%] .zoom-slider[_ngcontent-%COMP%]{-webkit-appearance:none;appearance:none;width:140px;height:4px;border-radius:2px;background:#fff6;outline:none}.zoom-controls[_ngcontent-%COMP%] .zoom-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:18px;border-radius:50%;background:#fff;cursor:pointer;box-shadow:0 1px 4px #0006}.zoom-controls[_ngcontent-%COMP%] .zoom-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#fff;cursor:pointer;border:none;box-shadow:0 1px 4px #0006}.focus-ring[_ngcontent-%COMP%]{position:absolute;width:64px;height:64px;border:2px solid #fff;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:50;animation:_ngcontent-%COMP%_focus-ring-pulse 1.5s ease-out forwards}.focus-hint[_ngcontent-%COMP%]{position:absolute;top:12px;left:50%;transform:translate(-50%);color:#fffc;font-size:12px;background:#0000004d;padding:3px 10px;border-radius:10px;pointer-events:none;z-index:40}@keyframes _ngcontent-%COMP%_focus-ring-pulse{0%{opacity:1;transform:translate(-50%,-50%) scale(1.3)}25%{opacity:1;transform:translate(-50%,-50%) scale(1)}80%{opacity:1;transform:translate(-50%,-50%) scale(1)}to{opacity:0;transform:translate(-50%,-50%) scale(1)}}"]});let n=a;return n})(),_i=(()=>{let a=class a{constructor(e){this.translate=e,this.mediaType=P("image"),this.docType=P(void 0),this.customStyle=P(void 0),this.facingMode=P("user"),this.showPicturePreview=P(!0),this.enableZoom=P(!1),this.enableFocus=P(!1),this.hideNativeCaptureBtn=P(!1),this.triggerCapture=P(0),this.facingModeValue=f("user"),this.mediaStream=fe(Te),this.videoStream=fe("videoStream"),this.recordedVideo=fe("recordedVideo"),this.uploadUserMedia=M(),this.backBtnClick=M(),this.handleImageCaptured=M(),this.retakeBtnClicked=M(),this.isCameraLoading=!0,this.isCameraError=!1,this.cameraErrorMessageTitle="",this.cameraErrorMessageSubtitle="",this.countForCameraClick=0,this.isVideoRecorded=!1,this.isPhotoCaptured=!1,this.cameraFlipCountForImage=0,this.recordingTime=0,this.recordingStarted=!1}ngOnInit(){this.facingModeValue.set(this.facingMode()),this.mediaType()==="video"&&this.startCameraForVideoRecording(this.facingModeValue())}ngAfterViewInit(){var t,i;let e=typeof this.recordedVideo=="function"?this.recordedVideo():this.recordedVideo;(i=(t=e==null?void 0:e.nativeElement)==null?void 0:t.classList)==null||i.toggle("hidden")}ngOnDestroy(){let e=typeof this.mediaStream=="function"?this.mediaStream():this.mediaStream;e&&e.stop()}startCameraForVideoRecording(e){setTimeout(()=>{let t=typeof this.mediaStream=="function"?this.mediaStream():this.mediaStream;t==null||t.playVideo(e)},100)}onBackBtnClick(){let e=typeof this.mediaStream=="function"?this.mediaStream():this.mediaStream;e&&e.stop(),this.backBtnClick.emit()}onCameraFlipForVideoRecordClick(){this.isCameraLoading=!0;let e=typeof this.mediaStream=="function"?this.mediaStream():this.mediaStream;e==null||e.stop(),this.facingModeValue.set(this._flipMode(this.facingModeValue())),this.startCameraForVideoRecording(this.facingModeValue())}_flipMode(e){return e==="user"?"environment":"user"}onRecordBtnClick(){this.countForCameraClick++,this.countForCameraClick<=1?this.starVideoRecording():this.stopVideoRecording()}starVideoRecording(){this.isVideoRecorded=!1,this.recordingStarted=!0,setTimeout(()=>{this.mediaStream().startRecording()},100),this.startTimer(),this.interval=setTimeout(()=>{this.stopVideoRecording()},3e4)}startTimer(){this.recordingTimeInterval=setInterval(()=>{this.recordingTime+=1,this.recordingTime===30&&(this.recordingTime=0,clearInterval(this.recordingTimeInterval))},1e3)}onRetakeBtnClick(){this.isCameraLoading=!0,this.isVideoRecorded=!1,this.recordingTime=0,this.videoStream().nativeElement.classList.toggle("hidden"),this.recordedVideo().nativeElement.classList.toggle("hidden"),this.startCameraForVideoRecording(this.facingModeValue())}stopVideoRecording(){clearInterval(this.interval),clearInterval(this.recordingTimeInterval),this.mediaStream().stopRecording(),this.isVideoRecorded=!0,this.recordingStarted=!1}onCameraError(e){this.isCameraError=!0,this.isCameraLoading=!1,this.generateErrorMessage(e.name)}
2onVideoRecorded(e){this.recordedFileUrl=e.videoUrl,this.capturedVideoFile=e.videoFile,this.countForCameraClick=0,this.videoStream().nativeElement.classList.toggle("hidden"),this.recordedVideo().nativeElement.classList.toggle("hidden"),this.recordedVideo().nativeElement.src=this.recordedFileUrl}onCameraReady(){this.isCameraLoading=!1}generateErrorMessage(e){e==="NotAllowedError"?(this.cameraErrorMessageTitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_NOT_ALLOWED_TITLE"),this.cameraErrorMessageSubtitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_NOT_ALLOWED_SUBTITLE")):(this.cameraErrorMessageTitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_DEVICE_ERROR_TITLE"),this.cameraErrorMessageSubtitle=this.translate.instant("PHARMACIST_DETAILS.CAMERA_DEVICE_ERROR_SUBTITLE"))}onUploadBtnClick(){this.uploadUserMedia.emit({mediaType:this.mediaType(),mediaUrl:this.recordedFileUrl,mediaFile:this.capturedVideoFile})}getRecordingTime(){return`00:${String(this.recordingTime).padStart(2,"0")}`}};a.\u0275fac=function(t){return new(t||a)(se(W))},a.\u0275cmp=y({type:a,selectors:[["md-user-media"]],viewQuery:function(t,i){t&1&&Le(i.mediaStream,Te,5)(i.videoStream,pn,5)(i.recordedVideo,mn,5),t&2&&Ve(3)},inputs:{mediaType:[1,"mediaType"],docType:[1,"docType"],customStyle:[1,"customStyle"],facingMode:[1,"facingMode"],showPicturePreview:[1,"showPicturePreview"],enableZoom:[1,"enableZoom"],enableFocus:[1,"enableFocus"],hideNativeCaptureBtn:[1,"hideNativeCaptureBtn"],triggerCapture:[1,"triggerCapture"]},outputs:{uploadUserMedia:"uploadUserMedia",backBtnClick:"backBtnClick",handleImageCaptured:"handleImageCaptured",retakeBtnClicked:"retakeBtnClicked"},decls:2,vars:1,consts:[["videoStream",""],["recordedVideo",""],[1,"on-camera"],[1,"w-[100%]"],["data-testid","video-caution-msg",1,"caution-msg"],["data-testid","video-timer",1,"video-timer"],[1,"header"],[1,"flex","mr-[10px]",3,"click"],[1,"icon","primary-color"],["data-testid","video-header-title",1,"header-content","mt-[3px]"],[1,"on-camera__video","video",3,"initError","cameraReady","recordedVideo","mediaStream","facingMode"],["controls","",1,"recorded-file"],[1,"on-camera__btn-capture-container","flex","flex-row","justify-between"],[1,"upload-btn-container","flex","flex-row","justify-between"],[1,"on-camera__video","on-camera__loading"],[1,"on-camera__btn-capture-container"],[1,"on-camera__video","on-camera__error"],[1,"video-inst"],[1,"on-camera__btn-capture"],[1,"record-stop-btn"],[1,"on-camera__camera-flip"],[1,"on-camera__btn-capture",3,"click"],["ngSrc","/assets/images/record.png","width","38","height","38"],[1,"record-stop-btn",3,"click"],[1,"on-camera__camera-flip",3,"click"],["ngSrc","/assets/images/camera-flip.png","width","35","height","35"],[1,"text-red",3,"click"],["mat-button","",1,"upload-btn","bg-red",3,"click"],[1,"flex","flex-row"],[1,"on-camera__btn-capture__loading"],["data-testid","video-error-title",1,"title"],["data-testid","video-error-subtitle",1,"subtitle"],[1,"w-[100%]",3,"handleImageCaptured","uploadUserMedia","backBtnClick","retakeBtnClicked","docType","customStyle","showPicturePreview","facingMode","enableZoom","enableFocus","hideNativeCaptureBtn","triggerCapture"]],template:function(t,i){t&1&&h(0,xn,22,18,"div",2)(1,vn,2,8,"div",3),t&2&&T(i.mediaType()==="video"?0:1)},dependencies:[Ke,je,On,In,xe,Me,F,Xe,Gn,Te,q],styles:[An]});let n=a;return n})();var ui=(()=>{let a=class a{constructor(){this.fileUploaded=M(),this.backBtnClick=M(),this.customCameraClass={btnColor:"#e0004d",headerHeight:"0px"}}onUserMediaUpload(e){this.fileUploaded.emit(e.mediaFile)}onBackBtnClick(){this.backBtnClick.emit(!0)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-upload"]],outputs:{fileUploaded:"fileUploaded",backBtnClick:"backBtnClick"},decls:2,vars:7,consts:[[1,"h-[100%]"],[1,"h-[100%]","flex","w-[100%]",3,"uploadUserMedia","backBtnClick","customStyle","mediaType","docType","showPicturePreview","enableZoom","enableFocus","facingMode"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"md-user-media",1),g("uploadUserMedia",function(l){return i.onUserMediaUpload(l)})("backBtnClick",function(){return i.onBackBtnClick()}),c()()),t&2&&(r(),_("customStyle",i.customCameraClass)("mediaType","image")("docType","PRESCRIPTION_UPLOAD")("showPicturePreview",!1)("enableZoom",!0)("enableFocus",!0)("facingMode","environment"))},dependencies:[_i],encapsulation:2});let n=a;return n})();var gi={document_uploaded:{state:"document_uploaded",stepLabel:"Proses 1 dari 2",heading:"Membaca Gambar",description:"Sistem sedang mencocokkan rincian pada resep kamu dengan produk
2yang tersedia.",estimatedDurationMs:3e4,infoItems:[{icon:"assets/svg/male-icon.svg",title:"Pastikan Profil Sesuai",body:"Gunakan profil yg sesuai dengan data pada resep."},{icon:"assets/svg/rx-icon.svg",title:"Tentang Resep",body:"Sistem akan memproses sesuai resep yang diunggah. Jika ada pertanyaan terkait dosis atau aturan pakai, silahkan konfirmasi dengan dokter di resep asli."}]},validation_started:{state:"validation_started",stepLabel:"Proses 2 dari 2",heading:"Memvalidasi Gambar",description:"Proses ini biasanya memakan waktu sekitar 2 menit. Mohon tunggu sebentar.",estimatedDurationMs:12e4,infoItems:[{icon:"assets/svg/male-icon.svg",title:"Pastikan Profil Sesuai",body:"Gunakan profil yg sesuai dengan data pada resep."},{icon:"assets/svg/rx-icon.svg",title:"Tentang Resep",body:"Sistem akan memproses sesuai resep yang diunggah. Jika ada pertanyaan terkait dosis atau aturan pakai, silahkan konfirmasi dengan dokter di resep asli."}]}},Ee=85,ot=1e3,hi=2e3,Ti=12e4;var Rn=(n,a)=>a.title;function kn(n,a){if(n&1){let o=E();d(0,"div",2)(1,"button",18),g("click",function(){C(o);let t=p();return b(t.onCancel())}),S(2,"img",19),c()()}n&2&&(r(),_("dataTestId","cancel"))}function Bn(n,a){if(n&1){let o=E();d(0,"div",3)(1,"div",20)(2,"p",21),m(3,"Mohon tunggu sebentar..."),c(),d(4,"p",22),m(5," Proses validasi membutuhkan waktu lebih lama dari perkiraan. Resep masih dalam pemeriksaan. "),c()(),d(6,"button",23),g("click",function(){C(o);let t=p();return b(t.dismissLateNotice())}),S(7,"img",24),c()()}}function Hn(n,a){if(n&1&&(d(0,"div",5),S(1,"img",25)(2,"img",26),c()),n&2){let o=p();r(),de("rx-img--visible",o.uploadImageIndex()===0),r(),de("rx-img--visible",o.uploadImageIndex()===1)}}function Nn(n,a){if(n&1&&(d(0,"div",5),S(1,"img",27)(2,"img",28),c()),n&2){let o=p();r(),de("rx-img--visible",o.validateImageIndex()===0),r(),de("rx-img--visible",o.validateImageIndex()===1)}}function Ln(n,a){if(n&1&&(d(0,"div",14)(1,"div",29),S(2,"img",30),c(),d(3,"div",31)(4,"p",32),m(5),c(),d(6,"p",33),m(7),c()()()),n&2){let o=a.$implicit,e=a.$index;r(2),_("src",o.icon,K)("alt",o.title),r(2),_("dataTestId","info-title-"+e),r(),D(o.title),r(),_("dataTestId","info-body-"+e),r(),D(o.body)}}var Ci=(()=>{let a=class a{constructor(){this.currentState=P.required(),this.isStateComplete=P(!1),this.cancelled=M(),this.stateCompleted=M(),this.progressPercentMap=f({document_uploaded:0,validation_started:0}),this.uploadImageIndex=f(0),this.validateImageIndex=f(0),this.stepData=f(void 0),this.currentStep=me(()=>this.stepData()),this.elapsedMsByState={},this.progressTimer=null,this.imageTimer=null,this.fillInterval=null,this.showLateNotice=f(!1),this.lateNoticeTimer=null,re(()=>{let e=this.currentState();if(e===this.prevState)return;this.prevState=e;let t=gi[e];this.stepData.set(t),t&&this.resetAndStartProgress(e,t.estimatedDurationMs)}),re(()=>{let e=this.isStateComplete(),t=this.currentState();e&&(!this.prevIsStateComplete||this.prevState!==t)?(this.prevIsStateComplete=e,this.prevState=t,this.animateToCompletion(t)):e||(this.prevIsStateComplete=e)})}ngOnInit(){this.currentState()=="validation_started"&&this.setProgressPercent("document_uploaded",100),this.startImageTimer(),this.lateNoticeTimer=setTimeout(()=>this.showLateNotice.set(!0),Ti)}ngOnDestroy(){this.clearTimers(),this.fillInterval&&(clearInterval(this.fillInterval),this.fillInterval=null)}onCancel(){this.clearTimers(),this.cancelled.emit()}setProgressPercent(e,t){let i=k({},this.progressPercentMap());i[e]=t,this.progressPercentMap.set(i)}resetAndStartProgress(e,t){this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=null),this.fillInterval&&(clearInterval(this.fillInterval),this.fillInterval=null),this.elapsedMsByState[e]=0,this.setProgressPercent(e,0),this.progressTimer=setInterval(()=>{this.elapsedMsByState[e]+=ot;let i=this.elapsedMsByState[e]/t*Ee;i>=Ee?(this.setProgressPercent(e,Ee),clearInterval(this.progressTimer),this.progressTimer=null):this.setProgressPercent(e,Math.round(i*10)/10)},ot)}animateToCompletion(e){this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=null),this.fillInterval&&(clearInterval(this.fillInterval),this.fillInterval=null);let t=80,i=3;this.fillInterval=setInterval(()=>{let s=this.progressPercentMap()[e]??0,l=Math.min(s+i,100);this.setProgressPercent(e,l),l>=100&&(clearInterval(this.fillInterval),this.fillInterval=null,setTimeout(()=>this.stateCompleted.emit(this.currentState()),300))},t)}startImageTimer(){this.imageTimer=setInterval(()=>{this.currentState()==="document_uploaded"?this.uploadImageIndex.update(e=>e===0?1:0):this.validateImageIndex.update(e=>e===0?1:0)},hi)}dismissLateNotice(){this.showLateNotice.set(!1)}clearTimers(){this.progressTimer&&(clearInterval(this.progressTimer),this.progressTimer=null),this.imageTimer&&(clearInterval(this.imageTimer),this.imageTimer=null),this.fillInterval&&(clearInterval(this.fillInterval),this.fillInterval=null),this.lateNoticeTimer&&(clearTimeout(this.lateNoticeTimer),this.lateNoticeTimer=null)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-validation"]],inputs:{currentState:[1,"currentState"],isStateComplete:[1,"isStateComplete"]},outputs:{cancelled:"cancelled",stateCompleted:"stateCompleted"},decls:25,vars:13,consts:[[1,"rx-validation","px-3","pt-3","pb-4"],[1,"flex","flex-col","h-full"],[1,"flex","justify-end","mb-[10px]"],[1,"rx-late-notice","flex","items-start","gap-3","rounded-[4px]","border","border-[#
2E0E0E0]p-3","mb-3","shadow-sm","bg-[#E9F4F9]","p-4"],[1,"rx-illustration-wrapper","flex"],[1,"rx-image-pair"],[1,"flex","gap-[10px]","mb-[10px]"],[1,"rx-progress-track","w-[50%]"],[1,"rx-progress-fill"],[1,"rx-progress-fill","rx-progress-fill--validate"],[1,"rx-step-label","my-[5px]",3,"dataTestId"],[1,"rx-heading","my-[10px]"],[1,"rx-description","my-[10px]",3,"dataTestId"],[1,"rx-info-list","my-[10px]"],[1,"rx-info-item"],[1,"flex","flex-col","items-center","mb-[10px]"],[1,"rx-powered-by"],["src","assets/svg/powered-by-halodoc-ai.svg","alt","halodoc-ai","width","107","height","16",1,""],["type","button","tabindex","-1","aria-label","Cancel",1,"pl-4",3,"click","dataTestId"],["loading","lazy","src","/assets/svg/close-grey-icon.svg","alt","close"],[1,"flex-1"],[1,"rx-late-notice__title","text-[14px]","font-semibold","text-[#135773]"],[1,"rx-late-notice__body","text-[12px]","text-[#135773]","mt-1"],["type","button","id","dismiss-late-notice-btn","aria-label","Tutup notifikasi",1,"shrink-0","mt-0.5",3,"click"],["src","/assets/svg/close-icon.svg","alt","close","width","16","height","16"],["src","assets/svg/rx-scan-a.png","alt","Scanning prescription",1,"rx-img"],["src","assets/svg/rx-scan-b.png","alt","Reading prescription",1,"rx-img"],["src","assets/svg/rx-scan-c.svg","alt","Validating prescription",1,"rx-img"],["src","assets/svg/rx-scan-d.png","alt","Checking prescription",1,"rx-img"],[1,"rx-info-icon"],["width","36","height","36",3,"src","alt"],[1,"rx-info-text"],[1,"rx-info-title",3,"dataTestId"],[1,"rx-info-body",3,"dataTestId"]],template:function(t,i){if(t&1&&(d(0,"div",0)(1,"div",1),h(2,kn,3,1,"div",2),h(3,Bn,8,0,"div",3),d(4,"div",4),h(5,Hn,3,4,"div",5),h(6,Nn,3,4,"div",5),c(),d(7,"div",6)(8,"div",7),S(9,"div",8),c(),d(10,"div",7),S(11,"div",9),c()(),d(12,"p",10),m(13),c(),d(14,"h2",11),m(15),c(),d(16,"p",12),m(17),c(),d(18,"div",13),Z(19,Ln,8,6,"div",14,Rn),c(),d(21,"div",15)(22,"p",16),m(23,"Powered by :"),c(),S(24,"img",17),c()()()),t&2){let s,l,u,I;r(2),T(i.currentState()==="document_uploaded"?2:-1),r(),T(i.showLateNotice()?3:-1),r(2),T(i.currentState()==="document_uploaded"?5:-1),r(),T(i.currentState()==="validation_started"?6:-1),r(3),V("width",i.progressPercentMap().document_uploaded??0,"%"),r(2),V("width",i.progressPercentMap().validation_started??0,"%"),r(),_("dataTestId","step-label"),r(),D((s=i.stepData())==null?null:s.stepLabel),r(2),D((l=i.stepData())==null?null:l.heading),r(),_("dataTestId","step-description"),r(),D((u=i.stepData())==null?null:u.description),r(2),Y((I=i.stepData())==null?null:I.infoItems)}},dependencies:[ce],styles:['@charset "UTF-8";.rx-validation[_ngcontent-%COMP%]{height:calc(100% - 57px)}.rx-illustration-wrapper[_ngcontent-%COMP%]{width:100%;height:180px;display:flex;align-items:center;justify-content:center;margin-bottom:24px;margin-top:24px}.rx-image-pair[_ngcontent-%COMP%]{position:relative;width:100%;height:100%}.rx-img[_ngcontent-%COMP%]{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;transition:opacity 1.2s ease-in-out}.rx-img--visible[_ngcontent-%COMP%]{opacity:1}.rx-progress-track[_ngcontent-%COMP%]{width:100%;height:6px;background:#e5e7eb;border-radius:999px;overflow:hidden;margin-bottom:10px}.rx-progress-fill[_ngcontent-%COMP%]{height:100%;border-radius:999px;background:linear-gradient(90deg,#6b21a8,#db2777);transition:width .5s linear}.rx-progress-fill--validate[_ngcontent-%COMP%]{background:linear-gradient(90deg,#7c3aed,#db2777)}.rx-step-label[_ngcontent-%COMP%]{font-size:16px;color:#6b7280;text-align:center;margin:0 0 6px;letter-spacing:.02em}.rx-heading[_ngcontent-%COMP%]{font-size:24px;font-weight:700;color:#111827;text-align:center;margin:0 0 10px;line-height:1.25}.rx-description[_ngcontent-%COMP%]{font-size:16px;color:#6b7280;text-align:center;margin:0 0 22px;line-height:1.55}.rx-info-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.rx-info-item[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px}.rx-info-icon[_ngcontent-%COMP%]{flex-shrink:0;width:48px;height:48px;border-radius:50%;background:#f3f4f6;display:flex;align-items:center;justify-content:center;overflow:hidden}.rx-info-icon[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:36px;height:36px;object-fit:contain}.rx-info-title[_ngcontent-%COMP%]{font-size:14px;font-weight:600;color:#111827;margin:0 0 3px}.rx-info-body[_ngcontent-%COMP%]{font-size:14px;color:#6b7280;line-height:1.5;margin:0}.rx-powered-by[_ngcontent-%COMP%]{font-size:12px;color:#9ca3af;text-align:center;margin:24px 0 12px}']});let n=a;return n})();var bi=(()=>{let a=class a{constructor(){this.routeTo=M()}onUnderstood(){this.routeTo.emit(["/"])}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-manual-prescription-screen"]],outputs:{routeTo:"routeTo"},decls:11,vars:1,consts:[[1,"relative","flex","flex-col","items-center","min-h-[100%]","bg-white","px-6","pt-12","pb-28"],[1,"relative","flex","justify-center","items-center","mb-10"],["src","assets/svg/manual-processing.svg","alt","Customer support agent",1,"w-52","h-52","object-contain"],[1,"text-center","px-4"],[1,"text-2xl","font-extrabold","text-gray-900","leading-snug","mb-4"],[1,"text-gray-500","text-base","leading-relaxed"],[1,"fixed","bottom-0","left-0","right-0","px-[12px]","py-[12px]","bg-white","border-t","border-gray-200","shadow-[0_-4px_20px_rgba(0,0,0,0.08)]"],[1,"w-full","bg-[#E0004D]","active:scale-95","transition-all","duration-150","text-white","font-bold","text-lg","py-4","rounded-[4px]",3,"click","dataTestId"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1),S(2,"img",2),c(),d(3,"div",3)(4,"h1",4),m(5,"Tim Kami Akan Segera Menghubungi Kamu"),c(),d(6,"p",5),m(7," Tim kami sedang memproses permintaanmu. Cek WhatsApp kamu, kami akan segera menghubungimu perihal penebusan resepmu. "),c()()(),d(8,"div",6)(9,"button",7),g("click",function(){return i.onUnderstood()}),m(10," Baik, Mengerti "),c()()),t&2&&(r(9),_("dataTestId","understood"))},dependencies:[ce],encapsulation:2});let n=a;return n})();var Vn=()=>[1,2,3];function Fn(n,a){if(n&1&&m(0),n&2){let o=p();v(" ","Dokter perlu melakukan tinjauan lebih lanjut karena, "+o.rejectReason()+" Kamu akan diarahkan untuk konsultasi obat setelah pembayaran."," ")}}function Un(n,a){n&1&&m(0),n&2&&v(" ","Ada beberapa hal yang ingin dokter konfirmasi mengenai resepmu. Tambahkan ke keranjang, selesaikan pembayaran, dan kamu akan terhubung untuk konsultasi obat singkat dengan dokter."," ")}function Wn(n,a){n&1&&(S(0,"hd-base-divider",14),d(1,"div",15),S(2,"div",16),d(3,"div",17),S(4,"div",18)(5,"div",19),c()()),n&2&&_("thick","1px")("gap","16px")}function Xn(n,a){n&1&&Z(0,Wn,6,2,null,null,ge),n&2&&Y(ie(0,Vn))}function zn(n,a){if(n&1&&(S(0,"hd-base-divider",14),d(1,"div",20)(2,"div",21),S(3,"hd-base-image-mapper",22),A(4,"imageByType"),A(5,"imageByType"),c(),d(6,"div",23)(7,"p",24),m(8),c(),d(9,"p",25),m(10),c()()()),n&2){let o=a.$implicit;_("thick","1px")("gap","16px"),r(3),_("webpImage",Se(4,9,o==null||o.images_map==null?null:o.images_map.image_url,"webp"))("fallbackImage",w(5,12,o==null||o.images_map==null?null:o.images_map.image_url)||(o==null?null:o.image_url))("alt",o.name)("imgHeight","48px")("imgWidth","48"),r(5),v(" ",o.name," "),r(2),D(o==null||o.product_details==null||o.product_details.product_attributes==null?null:o.product_details.product_attributes.selling_unit)}}function jn(n,a){if(n&1&&Z(0,zn,11,14,null,null,ge),n&2){let o=p();Y(o._halodocProductDetails())}}function Kn(n,a){if(n&1&&(S(0,"hd-base-divider",14),d(1,"div",20)(2,"div",23)(3,"p",24),m(4),c()()()),n&2){let o=a.$implicit;_("thick","1px")("gap","16px"),r(4),v(" ",o.item," ")}}function Qn(n,a){if(n&1&&(d(0,"div",26)(1,"div",27)(2,"span",28)(3,"mat-icon",29),m(4,"error"),c()(),d(5,"span",30),m(6),c()()(),d(7,"div",6)(8,"div",31)(9,"span",32),m(10),c()(),d(11,"div",11),Z(12,Kn,5,3,null,null,ge),c()()),n&2){let o=p();r(3),_("dataTestId","non-halodoc-products"),r(2),_("dataTestId","non-halodoc-warning-text"),r(),v(" ","Beberapa obat dalam resep kamu tidak tersedia."," "),r(3),_("dataTestId","non-halodoc-heading"),r(),v(" ","Diluar Layanan Halodoc"," "),r(2),Y(o.nonHalodocDocumentItems())}}var Si=(()=>{let a=class a{constructor(){this.leadData=P(null),this.nonHalodocDocumentItems=P([]),this.halodocProductDetails=P([]),this.rejectReason=P(""),this.addToCart=M(),this.hasNonHalodocProducts=me(()=>{var e;return((e=this.nonHalodocDocumentItems())==null?void 0:e.length)>0}
2),this._halodocProductDetails=me(()=>this.halodocProductDetails())}onAddToCart(){this.addToCart.emit()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-confirmation"]],inputs:{leadData:[1,"leadData"],nonHalodocDocumentItems:[1,"nonHalodocDocumentItems"],halodocProductDetails:[1,"halodocProductDetails"],rejectReason:[1,"rejectReason"]},outputs:{addToCart:"addToCart"},decls:22,vars:10,consts:[[1,"relative","flex","h-full","min-h-0","flex-col","bg-[#F7F7F7]"],[1,"flex","flex-1","flex-col","gap-4","overflow-y-auto","px-4","pb-32","mt-4"],[1,"rounded-[8px]","border","border-[#1F91BF]","bg-[#E9F4F9]","p-3","text-sm","text-[#1A1F36]"],[1,"flex","items-start","gap-3"],[1,"w-[20px]",3,"webpImage","fallbackImage"],["id","reject-reason",1,"text-[#135773]","text-[12px]"],[1,"border","border-gray-200","bg-white","p-4"],[1,"flex","items-center","font-[700]","text-[#53565a]","gap-[8px]","py-1","mt-1"],[1,"inline-flex","items-center","justify-center","rounded-[6px]","overflow-hidden"],["width","24","height","24",3,"src","alt"],[1,"font-bold","text-[18px]","leading-[120%]",3,"dataTestId"],[1,"flex","flex-col"],[1,"fixed","bottom-0","left-0","right-0","px-[12px]","py-[12px]","bg-white","border-t","border-gray-200","shadow-[0_-4px_20px_rgba(0,0,0,0.08)]"],[1,"w-full","bg-[#E0004D]","active:scale-95","transition-all","duration-150","text-white","font-bold","text-lg","py-4","rounded-[4px]",3,"click","dataTestId"],[3,"thick","gap"],[1,"flex","gap-2","animate-pulse"],[1,"h-[48px]","w-[48px]","rounded-lg","bg-gray-200"],[1,"flex","flex-1","flex-col","gap-2","justify-center"],[1,"h-3","w-3/4","rounded","bg-gray-200"],[1,"h-3","w-1/2","rounded","bg-gray-200"],[1,"flex","gap-2"],[1,"flex","flex-row","items-center","justify-center","overflow-hidden","rounded-lg","bg-gray-100"],[1,"article-card--horizontal__image",3,"webpImage","fallbackImage","alt","imgHeight","imgWidth"],[1,"flex","flex-1","flex-col","gap-1"],["data-testid","product-article-title",1,"m-0","text-[14px]","font-[400]","leading-5","text-[#424242]"],[1,"m-0","text-[14px]","text-[#999999]","font-[400]"],[1,"rounded-[8px]","border","border-[#C5771D]","bg-[#F9F1E8]","p-3","text-sm","text-[#764711]"],[1,"h-full","flex","items-start","gap-3"],[1,"h-full","flex","flex-col","justify-center"],[1,"text-[#764711]","text-[20px]","flex","justify-center",3,"dataTestId"],[1,"text-[#764711]","text-[12px]",3,"dataTestId"],[1,"flex","items-center","py-1","mt-1"],[1,"font-bold","text-[16px]","text-[#424242]","leading-[120%]",3,"dataTestId"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"span"),S(5,"hd-base-image-mapper",4),c(),d(6,"span",5),h(7,Fn,1,1)(8,Un,1,1),c()()(),d(9,"div",6)(10,"div",7)(11,"span",8),S(12,"img",9),c(),d(13,"span",10),m(14),c()(),d(15,"div",11),h(16,Xn,2,1)(17,jn,2,0),c()(),h(18,Qn,14,5),c(),d(19,"div",12)(20,"button",13),g("click",function(){return i.onAddToCart()}),m(21," Tambahkan ke Keranjang "),c()()()),t&2&&(r(5),_("webpImage","assets/icon/info-blue.webp")("fallbackImage","assets/icon/info-blue.png"),r(2),T(i.rejectReason()?7:8),r(5),_("src","/assets/svg/prescription.svg",K)("alt","rx"),r(),_("dataTestId","obat-resep-heading"),r(),v(" ","Obat Resep "," "),r(2),T(i._halodocProductDetails().length===0?16:17),r(2),T(i.hasNonHalodocProducts()?18:-1),r(2),_("dataTestId","add to cart"))},dependencies:[Dt,yt,xe,Me,ce,Zt],encapsulation:2});let n=a;return n})();var Zn=n=>({"overflow-y-hidden":n}),Yn=n=>({"pb-4":n}),$n=n=>({"show-address-search-panel":n});function qn(n,a){if(n&1&&(d(0,"span",14),m(1),c()),n&2){let o=p();r(),D(o.selectedAddress==null?null:o.selectedAddress.premise)}}function Jn(n,a){if(n&1&&(d(0,"span"),m(1),c()),n&2){let o=p();r(),v(" ",o.selectedAddress==null?null:o.selectedAddress.fullAddress," ")}}function eo(n,a){n&1&&S(0,"magneto-shimmer-multi-line",18),n&2&&_("rowCount",3)("isLastRowHalf",!0)}function to(n,a){if(n&1&&(d(0,"p",19),m(1),c()),n&2){let o=p();r(),v(" ",o.selectedAddress.note," ")}}function io(n,a){n&1&&(d(0,"div",20),lt(),d(1,"svg",29),S(2,"path",30),c(),pt(),d(3,"span",31),m(4," Layanan belum tersedia di lokasi ini. Cek ulang lokasi yang dipilih atau ubah lokasi. "),c()())}var fi=(()=>{let a=class a{constructor(){this.geoLocationService=x(Ze),this.orderApi=x(jt),this.utilitiesService=x(Ae),this.breakpointObserver=x(wt),this.translate=x(W),this.addressSelectionService=x(ii),this.cdr=x(vt),this.dataService=x(ve),this.ngUnsubscribe$=new Ce,this.addressConfirmed=M(),this.cancelled=M(),this.mapHeight=278,this.isAddressInvalid=!1,this.disableDefaultMapUI=!0,this.locateMeIconUrl="/assets/svg/map/map-marker-red.svg",this.selectedAddress=this.addressSelectionService.getDefaultAddress(),this.isDesktop=!1,this.zoom=15,this.isChangeAddress=!1,this.savedAddresses=[],this.isLoading=!0,this.isInitialShimmer=!0,this.initialAddress=""}ngOnInit(){this._configureTranslation(),this.breakpointObserver.observe(["(min-width: 768px)"]).pipe(O(this.ngUnsubscribe$)).subscribe(e=>{this.isDesktop=e.matches}
2),this.utilitiesService.isBrowser()?this.getSavedAddressesByCurrentUser():(this.selectedAddress=this.addressSelectionService.getDefaultAddress(),this.isLoading=!1,this.isInitialShimmer=!1)}onChangeAddress(){this.isChangeAddress=!0}onAddressUpdateViaMap(e){var i,s;this.isLoading=!0;let t=this.geoLocationService.getSavedAddressNearLocation(this.savedAddresses,e);if(t){this.selectedAddress=ue(k({},t),{isCurrentLocation:!0,fullAddress:t.full_address,formattedAddress:t.formatted_address,route:(i=t==null?void 0:t.formatted_address)==null?void 0:i.route,premise:(s=t==null?void 0:t.formatted_address)==null?void 0:s.premise}),this.isAddressInvalid=!1,this.isLoading=!1;return}this.geoLocationService.getAddressFromLatLong(e.latitude,e.longitude).pipe(O(this.ngUnsubscribe$)).subscribe(l=>{var u,I,B,oe,ae,z,U,j,R;if((u=l==null?void 0:l.results)!=null&&u.length){let L=l.results[0];this.selectedAddress={isCurrentLocation:e==null?void 0:e.isCurrentLocation,route:(I=L.address)==null?void 0:I.street,premise:((B=L.address)==null?void 0:B.name)||((oe=L.address)==null?void 0:oe.street),note:"",fullAddress:(ae=L.address)==null?void 0:ae.formatted_address,latitude:((U=(z=L.address)==null?void 0:z.location)==null?void 0:U.lat)||e.latitude,longitude:((R=(j=L.address)==null?void 0:j.location)==null?void 0:R.lng)||e.longitude,formattedAddress:this.geoLocationService.getFormattedAddress(L.address)},this.isAddressInvalid=!1}this.isLoading=!1},()=>{this.isLoading=!1})}onSelectAddressViaSearchPanel(e){var t,i,s,l,u;e&&(this.selectedAddress={id:e.label?e.id:"",label:e.label,route:((t=e.formatted_address)==null?void 0:t.route)||e.street,premise:((i=e.formatted_address)==null?void 0:i.premise)||e.name,note:e.note||"",fullAddress:e.full_address||e.shipping_address||e.formatted_address,latitude:e.latitude||((s=e.location)==null?void 0:s.lat),longitude:e.longitude||((l=e.location)==null?void 0:l.lng)},(u=e.formatted_address)!=null&&u.country?this.selectedAddress.formattedAddress=e.formatted_address:this.selectedAddress.formattedAddress=this.geoLocationService.getFormattedAddress(e)),this.isLoading=!1,this.isChangeAddress=!1,this.isAddressInvalid=!1}onCloseAddressSearchPanel(){this.isChangeAddress=!1}onClickOk(){var i,s;let e=(i=this.selectedAddress)==null?void 0:i.latitude,t=(s=this.selectedAddress)==null?void 0:s.longitude;typeof e!="number"||typeof t!="number"||this.orderApi.geoValidate(e,t).pipe(O(this.ngUnsubscribe$)).subscribe(()=>{this.isAddressInvalid=!1,this.addressConfirmed.emit(k({},this.selectedAddress))},l=>{var u,I;((u=l==null?void 0:l.error)==null?void 0:u.status_code)===404&&((I=l==null?void 0:l.error)==null?void 0:I.header)==="Unserviceable Area"&&(this.isAddressInvalid=!0)})}onCancelSelection(){this.cancelled.emit()}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}getSavedAddressesByCurrentUser(){this.addressSelectionService.getSavedAddressesByCurrentUser().pipe(O(this.ngUnsubscribe$)).subscribe(e=>{if(e.length){this.savedAddresses=e;let t=e.find(i=>i.label===Lt.HOME);t=t||e[0],this.selectedAddress=this.addressSelectionService.mapUserAddressToAddress(t)}else this.selectedAddress=this.addressSelectionService.getDefaultAddress();this.initialAddress=this.selectedAddress.fullAddress??"",this.isLoading=!1,this.isInitialShimmer=!1,this.cdr.detectChanges()},()=>{var e;this.selectedAddress=this.addressSelectionService.getDefaultAddress(),this.initialAddress=((e=this.selectedAddress)==null?void 0:e.fullAddress)||"",this.isLoading=!1,this.isInitialShimmer=!1,this.cdr.detectChanges()})}_configureTranslation(){this.translate.use(this.dataService.currentUserLang)}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-address-selection"]],outputs:{addressConfirmed:"addressConfirmed",cancelled:"cancelled"},features:[Mt([Ze])],decls:39,vars:47,consts:[[1,"flex","flex-col","items-center","h-full"],[1,"flex","w-full","h-[90%]","justify-center","flex-1"],[1,"flex","address-setter-container"],[1,"address-setter","flex","flex-col"],[1,"address-setter--title","hidden","md:block"],[3,"addressUpdate","zoom","isLoading","iconUrl","latitude","longitude","disableDefaultUI"],[1,"address-setter__address-container","flex","flex-col"],[1,"address-setter__address-container__details"],[1,"flex","items-center","justify-between","md:hidden"],[1,"address-setter__address-container__details--title"],[1,"address-setter__address-container__details--change-btn"],["type","button",1,"border-none","bg-[transparent]","p-0","flex","items-center",3,"click","dataTestId"],["src","/assets/svg/ic-search-primary.svg","alt","search","loading","lazy",1,"address-setter__address-container__details__search-icon","flex"],[1,"address-setter__address-container__details__address-title","truncate","flex","justify-between","items-center",3,"title"],[1,"address-setter__address-container__details__address-title--address"],["type","button",1,"address-setter__address-container__details__address-title--btn","border-none","bg-[transparent]","p-0","flex","items-center","gap-1","xs:hidden",3,"click","dataTestId"],["src","/assets/svg/ic-search-primary.svg","alt","search","loading","lazy",1,"address-setter__address-container__details__search-icon"],[1,"address-setter__address-container__details__address",3,"title"],[3,"rowCount","
2isLastRowHalf"],[1,"w-full","address-setter__address-container__details--note"],[1,"address-setter__warning"],[1,"address-setter__address-container__confirm","flex","flex-col","items-center","justify-start","w-full"],["type","button",1,"border-none","bg-[#e0004d]","address-setter__address-container__confirm--btn",3,"click","disabled","dataTestId"],[1,"address-search-container","overflow-y-auto"],[1,"address-search"],[1,"flex","items-center","address-search__title"],[1,"icon","flex",3,"click","iconType","icon"],[1,"address-search__title--text"],[3,"handleSelectAddress","handleAddressPanelClose","selectedAddress","savedAddresses","isSearchTabOpen"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","viewBox","0 0 16 16",1,"address-setter__warning__icon"],["fill","#E0340B","d","M8 16c-4.418 0-8-3.582-8-8s3.582-8 8-8 8 3.582 8 8-3.582 8-8 8zM7 7.25v5.5c0 .69.448 1.25 1 1.25.551 0 1-.56 1-1.25v-5.5C9 6.56 8.552 6 8 6c-.551 0-1 .56-1 1.25zM8 5c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448 1 1 1z"],[1,"address-setter__warning__description"]],template:function(t,i){t&1&&(d(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),m(5,"Pilih Alamat"),c(),d(6,"magneto-address-picker",5),g("addressUpdate",function(l){return i.onAddressUpdateViaMap(l)}),c(),d(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9),m(11,"Konfirmasi Lokasi"),c(),d(12,"div",10)(13,"button",11),g("click",function(){return i.onChangeAddress()}),m(14),A(15,"translate"),S(16,"img",12),c()()(),d(17,"div")(18,"p",13),h(19,qn,2,1,"span",14),d(20,"button",15),g("click",function(){return i.onChangeAddress()}),m(21),A(22,"translate"),S(23,"img",16),c()(),d(24,"p",17),h(25,Jn,2,1,"span")(26,eo,1,2,"magneto-shimmer-multi-line",18),c()(),h(27,to,2,1,"p",19),c(),h(28,io,5,0,"div",20),d(29,"div",21)(30,"button",22),g("click",function(){return i.onClickOk()}),m(31," Gunakan Alamat Ini "),c()()()(),d(32,"div",23)(33,"div",24)(34,"div",25)(35,"hd-base-icon",26),g("click",function(){return i.onCloseAddressSearchPanel()}),c(),d(36,"h3",27),m(37,"Pilih Alamat"),c()(),d(38,"magneto-address-search",28),g("handleSelectAddress",function(l){return i.onSelectAddressViaSearchPanel(l)})("handleAddressPanelClose",function(){return i.onCloseAddressSearchPanel()}),c()()()()()()),t&2&&(r(),de("ghost-card",i.isInitialShimmer),r(),$(G(41,Zn,!i.isChangeAddress||i.isChangeAddress&&!i.isDesktop)),de("ghost-card",i.isLoading),r(4),_("zoom",i.zoom)("isLoading",i.isInitialShimmer)("iconUrl",i.locateMeIconUrl)("latitude",i.selectedAddress==null?null:i.selectedAddress.latitude)("longitude",i.selectedAddress==null?null:i.selectedAddress.longitude)("disableDefaultUI",i.disableDefaultMapUI),r(),$(G(43,Yn,i.isAddressInvalid)),r(6),_("dataTestId","change-address"),r(),v(" ",w(15,37,"ADDRESS.CHANGE")," "),r(4),_("title",Ue(i.selectedAddress==null?null:i.selectedAddress.premise)),r(),T(i.isLoading?-1:19),r(),$(i.isLoading?"align-right":""),_("dataTestId","change-address-desktop"),r(),v(" ",w(22,39,"ADDRESS.CHANGE")," "),r(3),_("title",Ue(i.selectedAddress==null?null:i.selectedAddress.fullAddress)),r(),T(i.isLoading?26:25),r(2),T(i.selectedAddress!=null&&i.selectedAddress.note&&!i.isLoading?27:-1),r(),T(i.isAddressInvalid?28:-1),r(2),_("disabled",i.isAddressInvalid||i.isLoading)("dataTestId","address-selected"),r(2),$(G(45,$n,i.isChangeAddress)),r(3),_("iconType","hospital")("icon","icon-ic-left"),r(3),_("selectedAddress",i.selectedAddress)("savedAddresses",i.savedAddresses)("isSearchTabOpen",i.isChangeAddress))},dependencies:[F,ei,ti,kt,Gt,ce,q],styles:[".step-indicator[_ngcontent-%COMP%]{z-index:2;background-color:#fff}.overflow-y-hidden[_ngcontent-%COMP%]{overflow-y:hidden}.address-setter-container[_ngcontent-%COMP%] magneto-address-picker[_ngcontent-%COMP%]{flex:1}.address-setter-container[_ngcontent-%COMP%]{overflow-x:hidden}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%]{width:570px;margin-top:33px;margin-bottom:56px;border-radius:4px;border:solid 1px #dfdfdf}}.address-setter-container[_ngcontent-%COMP%] .address-setter[_ngcontent-%COMP%]{font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;min-width:100%;overflow:auto}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter[_ngcontent-%COMP%]{width:570px;min-width:570px;border-radius:4px}}.address-setter-container[_ngcontent-%COMP%] .address-setter--title[_ngcontent-%COMP%]{font-size:20px;font-family:Inter,sans-serif;font-weight:700;line-height:1.5;color:#424242;padding:31px 40px 19px}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container[_ngcontent-%COMP%]{flex:0 0 min-content;padding:20px 16px;border-top-left-radius:12px;border-top-right-radius:12px;box-shadow:0 -2px 8px #c4c4c4;background-color:var(--white)}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container[_ngcontent-%COMP%]{border-radius:0 0 4px 4px;box-shadow:none;padding:20px 40px 40px!important}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--title[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;font-size:16px;text-align:center;color:#53565a}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--change-btn[_ngcontent-%COMP%]{min-width:72px;min-height:32px;display:flex;justify-content:center;border-radius:4px}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--change-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;font-size:14px;color:#e0004d}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;font-size:14px;color:#53565a;margin-top:10px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title[_ngcontent-%COMP%]{font-size:18px;margin-top:9px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title--address[_ngcontent-%COMP%]{overflow:hidden;font-weight:700}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title--btn[_ngcontent-%COMP%]{min-width:76px;min-height:32px;font-family:Inter,sans-serif;font-weight:700;font-size:14px;color:#e0004d;text-align:end}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title--btn[_ngcontent-%COMP%]{font-size:16px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__search-icon[_ngcontent-%COMP%]{margin-left:4px}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;font-size:12px;color:#53565a;margin-top:4px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address[_ngcontent-%COMP%]{font-size:16px;margin-top:12px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--note[_ngcontent-%COMP%]{font-size:12px;font-family:Inter,sans-serif;font-weight:400;line-height:1.17;color:#999;margin-top:10px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--note[_ngcontent-%COMP%]{font-size:16px;line-height:1.13}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm[_ngcontent-%COMP%]{flex:1;margin-top:12px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm[_ngcontent-%COMP%]{margin-top:16px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm--btn[_ngcontent-%COMP%]{width:100%;border-radius:4px;font-family:Inter,sans-serif;font-weight:700;font-size:16px;text-align:center;color:var(--white);background-color:#e0004d;min-height:48px;color:#fff}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm--btn[_ngcontent-%COMP%]{padding:5px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm--btn[_ngcontent-%COMP%]:disabled{color:#9e9e9e;background-color:#d8d8d8}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error[_ngcontent-%COMP%]{margin-top:12px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error[_ngcontent-%COMP%]{margin-top:20px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error--img[_ngcontent-%COMP%]{height:16px;width:16px;margin-right:10px;border-radius:20px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error--img[_ngcontent-%COMP%]{min-height:20px;min-width:20px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error--message[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;font-size:12px;color:#f20522}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm__error--message[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:400;font-size:16px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__warning[_ngcontent-%COMP%]{background-color:#fdefeb;border-radius:4px;
2height:60px;display:flex;flex-direction:row;align-items:center;margin:18px 0 0;padding:10px 16px 10px 3px}@media screen and (max-width:600px){.address-setter-container[_ngcontent-%COMP%] .address-setter__warning[_ngcontent-%COMP%]{margin:12px 0 0}}@media screen and (max-width:333px){.address-setter-container[_ngcontent-%COMP%] .address-setter__warning[_ngcontent-%COMP%]{margin:12px 10px 0 0}}.address-setter-container[_ngcontent-%COMP%] .address-setter__warning__icon[_ngcontent-%COMP%]{width:22px;height:22px;margin:0 8px 0 12px;color:#e0340b}@media screen and (max-width:414px){.address-setter-container[_ngcontent-%COMP%] .address-setter__warning__icon[_ngcontent-%COMP%]{margin:0 8px 0 12px;width:30px;height:30px}}.address-setter-container[_ngcontent-%COMP%] .address-setter__warning__description[_ngcontent-%COMP%]{color:#a12508;font-style:normal;font-weight:400;font-size:14px;line-height:130%;display:flex;justify-content:center;align-items:center}@media screen and (max-width:600px){.address-setter-container[_ngcontent-%COMP%] .address-setter__warning__description[_ngcontent-%COMP%]{margin:6px 0}}.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%]{min-width:100%;z-index:1;background-color:#fff;transition:transform .5s;transform:translate(0);padding:0 16px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%]{padding:0 40px;border-radius:4px;min-width:572px}}.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title[_ngcontent-%COMP%]{padding:20px 0 16px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title[_ngcontent-%COMP%]{padding:33px 0 20px;margin-bottom:24px;border-bottom:solid 1px #f0f0f0}}.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title[_ngcontent-%COMP%] magneto-icon[_ngcontent-%COMP%]{cursor:pointer}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title[_ngcontent-%COMP%] magneto-icon[_ngcontent-%COMP%]{margin-left:6px}}.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title--text[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-weight:700;font-size:16px;font-stretch:normal;font-style:normal;line-height:normal;letter-spacing:normal;text-align:center;color:#424242;margin-left:10px}@media(min-width:768px){.address-setter-container[_ngcontent-%COMP%] .address-search-container[_ngcontent-%COMP%] .address-search__title--text[_ngcontent-%COMP%]{font-size:20px;margin-left:18px}}.show-address-search-panel[_ngcontent-%COMP%]{transform:translate(-100%)!important}.flex-1[_ngcontent-%COMP%], .align-right[_ngcontent-%COMP%]{flex:1}","@keyframes _ngcontent-%COMP%_ghost-lines{0%{background-position:-100px}40%{background-position:40vw}to{background-position:60vw}}@keyframes _ngcontent-%COMP%_ghost-avatar{0%{background-position:-32px}40%,to{background-position:208px}}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter--title[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:27px;width:200px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:5px;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;margin:31px 40px 19px;padding:15px}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--title[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:22px;width:65%;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--change-btn[_ngcontent-%COMP%]{border-radius:12.5px;border:none}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--change-btn[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:23px;width:70px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:18px;width:65%;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}@media(min-width:768px){.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:24px;width:65%;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address-title--btn[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:24px;width:90px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address[_ngcontent-%COMP%]{margin-top:10px}@media(min-width:768px){.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details__address[_ngcontent-%COMP%]{margin-top:16px}}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--note[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:14px;width:100px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear;max-width:100px}@media(min-width:768px){.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__details--note[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:6px;height:16px;width:150px;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm[_ngcontent-%COMP%]{flex:1;margin-top:12px}@media(min-width:768px){.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm[_ngcontent-%COMP%]{margin-top:20px}}.ghost-card[_ngcontent-%COMP%] .address-setter-container[_ngcontent-%COMP%] .address-setter__address-container__confirm--btn[_ngcontent-%COMP%]{background-color:#e4e4e5;color:#e5e5e5;border-radius:4px;
2height:48px;width:100%;text-indent:-9999px;white-space:nowrap;overflow:hidden;line-height:normal;margin-block-end:0;display:block;border:none;cursor:initial!important;outline:none;pointer-events:none!important;background-image:linear-gradient(90deg,#dddddda4,#ecebebf1,#dddddda4 80px);background-size:80vw;animation:_ngcontent-%COMP%_ghost-lines 1s infinite linear}"]});let n=a;return n})();var Pi=(()=>{let a=class a{constructor(){this.imageUrl=P.required(),this.closed=M()}onClose(){this.closed.emit()}onOverlayClick(e){e.target.classList.contains("image-viewer__overlay")&&this.onClose()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-prescription-image-viewer"]],inputs:{imageUrl:[1,"imageUrl"]},outputs:{closed:"closed"},decls:5,vars:1,consts:[["data-testid","image-viewer-overlay",1,"image-viewer__overlay",3,"click"],[1,"image-viewer__container"],["id","image-viewer-close-btn","data-testid","image-viewer-close-btn","aria-label","Close image viewer",1,"image-viewer__close-btn",3,"click"],["src","/hd-assets/images/svg/close-icon.svg","alt","Close"],["alt","Prescription image","data-testid","image-viewer-expanded-img",1,"image-viewer__image",3,"src"]],template:function(t,i){t&1&&(H(0,"div",0),be("click",function(l){return i.onOverlayClick(l)}),H(1,"div",1)(2,"button",2),be("click",function(){return i.onClose()}),pe(3,"img",3),N(),pe(4,"img",4),N()()),t&2&&(r(4),bt("src",i.imageUrl(),K))},styles:[".image-viewer__overlay[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:100%;background:#000000d9;z-index:1000;display:flex;align-items:center;justify-content:center}.image-viewer__container[_ngcontent-%COMP%]{position:relative;max-width:90vw;max-height:90vh;display:flex;align-items:center;justify-content:center}.image-viewer__close-btn[_ngcontent-%COMP%]{position:absolute;top:-40px;right:0;background:none;border:none;cursor:pointer;padding:8px;z-index:1001}.image-viewer__close-btn[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:24px;height:24px;filter:brightness(0) invert(1)}.image-viewer__image[_ngcontent-%COMP%]{max-width:90vw;max-height:85vh;object-fit:contain;border-radius:8px}"]});let n=a;return n})();var no=["scrollSentinel"],oo=n=>({duration:n}),ao=n=>({count:n}),ro=(n,a)=>a.external_id;function so(n,a){if(n&1&&(d(0,"p",17),m(1),c()),n&2){let o=p().$implicit,e=p();r(),D(e.getLeadMedicineSummary(o))}}function co(n,a){if(n&1&&(d(0,"span",18),m(1),A(2,"translate"),c()),n&2){let o=p().$implicit,e=p();r(),v(" ",Se(2,1,"AI_PRESCRIPTION.ITEMS_MORE",G(4,ao,e.getAdditionalItemsCount(o)))," ")}}function lo(n,a){if(n&1){let o=E();d(0,"div",20),g("click",function(t){C(o);let i=p().$implicit,s=p();return b(s.onImageClick(i,t))}),S(1,"img",21),d(2,"span",22),m(3),A(4,"translate"),c()()}if(n&2){let o=p().$implicit,e=p();r(),_("src",e.getLeadThumbnailUrl(o),K),r(2),v(" ",w(4,2,"AI_PRESCRIPTION.THUMBNAIL_LABEL")," ")}}function po(n,a){if(n&1){let o=E();d(0,"div",11),g("click",function(){let t=C(o).$implicit,i=p();return b(i.onCardClick(t))}),d(1,"div",12)(2,"div",13)(3,"h3",14),m(4),c(),d(5,"span",15),m(6),c()(),d(7,"span",16),m(8),c()(),h(9,so,2,1,"p",17),h(10,co,3,6,"span",18),h(11,lo,5,4,"div",19),c()}if(n&2){let o=a.$implicit,e=a.$index,t=p();r(4),D(t.getLeadTitle(o,e)),r(2),D(t.getLeadTime(o)),r(),V("background-color",t.getDisplayStatus(o).bgColor)("color",t.getDisplayStatus(o).textColor),r(),v(" ",t.getStatusLabel(o)," "),r(),T(t.getLeadMedicineSummary(o)?9:-1),r(),T(t.getAdditionalItemsCount(o)>0?10:-1),r(),T(t.getLeadThumbnailUrl(o)?11:-1)}}function mo(n,a){n&1&&(d(0,"div",23),S(1,"span",24),c())}function _o(n,a){if(n&1&&(d(0,"div",7,0),h(2,mo,2,0,"div",23),c()),n&2){let o=p();r(2),T(o.isLoadingMore()?2:-1)}}function uo(n,a){if(n&1){let o=E();d(0,"app-prescription-image-viewer",25),g("closed",function(){C(o);let t=p();return b(t.closeImageViewer())}),c()}if(n&2){let o=p();_("imageUrl",o.expandedImageUrl())}}var Mi=(()=>{let a=class a{constructor(){this.translate=x(W),this.leads=P.required(),this.uploadDurationSeconds=P(604800),this.hasMore=P(!1),this.isLoadingMore=P(!1),this.leadSelected=M(),this.newUploadRequested=M(),this.backPressed=M(),this.loadMore=M(),this.expandedImageUrl=f(null),this.observer=null,this.statusConfig=$t}
2ngOnInit(){this.setupIntersectionObserver()}ngOnDestroy(){var e;(e=this.observer)==null||e.disconnect(),this.observer=null}setupIntersectionObserver(){typeof IntersectionObserver>"u"||(this.observer=new IntersectionObserver(e=>{let t=e[0];t!=null&&t.isIntersecting&&this.hasMore()&&!this.isLoadingMore()&&this.loadMore.emit()},{threshold:a.SCROLL_THRESHOLD}),setTimeout(()=>this.observeSentinel()))}observeSentinel(){var e;(e=this.scrollSentinel)!=null&&e.nativeElement&&this.observer&&this.observer.observe(this.scrollSentinel.nativeElement)}get uploadDurationDisplay(){let e=this.uploadDurationSeconds(),t=Math.floor(e/86400),i=Math.floor(e%86400/3600);return t>0?`${t} hari`:`${i} jam`}getDisplayStatus(e){let t=Ie(e);return this.statusConfig[t]}getStatusLabel(e){let t=this.getDisplayStatus(e);return this.translate.instant(t.translationKey)}getLeadTitle(e,t){return`Resep ${t+1}`}getLeadTime(e){return new Date(e.created_at).toLocaleTimeString("id-ID",{hour:"2-digit",minute:"2-digit"})}getLeadMedicineSummary(e){var i;let t=(i=e.document_content)==null?void 0:i[0];return t?`${t.item} ${t.quantity??""}`.trim():""}getAdditionalItemsCount(e){var i;let t=((i=e.document_content)==null?void 0:i.length)??0;return t>1?t-1:0}getLeadThumbnailUrl(e){var t,i;return((i=(t=e.documents)==null?void 0:t[0])==null?void 0:i.url)||null}onImageClick(e,t){var s,l;t.stopPropagation();let i=(l=(s=e.documents)==null?void 0:s[0])==null?void 0:l.url;i&&this.expandedImageUrl.set(i)}closeImageViewer(){this.expandedImageUrl.set(null)}onCardClick(e){this.leadSelected.emit(e)}onNewUpload(){this.newUploadRequested.emit()}onBack(){this.backPressed.emit()}};a.SCROLL_THRESHOLD=.1,a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-history-list"]],viewQuery:function(t,i){if(t&1&&St(no,5),t&2){let s;ft(s=Pt())&&(i.scrollSentinel=s.first)}},inputs:{leads:[1,"leads"],uploadDurationSeconds:[1,"uploadDurationSeconds"],hasMore:[1,"hasMore"],isLoadingMore:[1,"isLoadingMore"]},outputs:{leadSelected:"leadSelected",newUploadRequested:"newUploadRequested",backPressed:"backPressed",loadMore:"loadMore"},decls:15,vars:11,consts:[["scrollSentinel",""],["data-testid","erx-history-container",1,"erx-history"],["data-testid","erx-history-info-banner",1,"erx-history__info-banner"],["src","/assets/icon/blue_rx.svg","alt","rx",1,"erx-history__info-icon"],["data-testid","erx-history-info-text",1,"erx-history__info-text"],["data-testid","erx-history-list",1,"erx-history__list"],["data-testid","erx-history-card",1,"erx-history__card"],["data-testid","erx-history-scroll-sentinel",1,"erx-history__scroll-sentinel"],[1,"erx-history__footer"],["id","erx-history-upload-btn","data-testid","erx-history-upload-btn",1,"erx-history__upload-btn",3,"click"],[3,"imageUrl"],["data-testid","erx-history-card",1,"erx-history__card",3,"click"],[1,"erx-history__card-header"],[1,"erx-history__card-title-group"],["data-testid","erx-card-title",1,"erx-history__card-title"],["data-testid","erx-card-time",1,"erx-history__card-time"],["data-testid","erx-card-status-badge",1,"status-badge"],["data-testid","erx-card-medicine",1,"erx-history__card-medicine"],["data-testid","erx-card-more-items",1,"erx-history__card-more"],["data-testid","erx-card-thumbnail",1,"erx-history__card-thumbnail"],["data-testid","erx-card-thumbnail",1,"erx-history__card-thumbnail",3,"click"],["alt","Prescription thumbnail","data-testid","erx-card-thumbnail-img","loading","lazy",1,"erx-history__card-thumbnail-img",3,"src"],[1,"erx-history__card-thumbnail-label"],["data-testid","erx-history-loading-more",1,"erx-history__loading-more"],[1,"erx-history__loading-spinner"],[3,"closed","imageUrl"]],template:function(t,i){t&1&&(d(0,"div",1)(1,"div",2),S(2,"img",3),d(3,"p",4),m(4),A(5,"translate"),c()(),d(6,"div",5),Z(7,po,12,10,"div",6,ro),h(9,_o,3,1,"div",7),c(),d(10,"div",8)(11,"button",9),g("click",function(){return i.onNewUpload()}),m(12),A(13,"translate"),c()()(),h(14,uo,1,1,"app-prescription-image-viewer",10)),t&2&&(r(4),v(" ",Se(5,4,"AI_PRESCRIPTION.INFO_BANNER",G(9,oo,i.uploadDurationDisplay))," "),r(3),Y(i.leads()),r(2),T(i.hasMore()?9:-1),r(3),v(" ",w(13,7,"AI_PRESCRIPTION.UPLOAD_BTN")," "),r(2),T(i.expandedImageUrl()?14:-1))},dependencies:[F,Pi,q],styles:[".erx-history[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-height:100vh;background-color:var(--hd-color-background, #f5f5f5)}.erx-history__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#fff;border-bottom:1px solid #eee}.erx-history__back-btn[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;padding:0;display:flex;align-items:center}.erx-history__back-btn[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:20px;height:20px}.erx-history__header-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--hd-color-text-primary, #222)}.erx-history__info-banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:12px 16px;margin:16px;background:var(--hd-color-info-light, #e8f4fd);border-radius:8px}.erx-history__info-icon[_ngcontent-%COMP%]{width:20px;height:20px;flex-shrink:0;margin-top:8px}.erx-history__info-text[_ngcontent-%COMP%]{font-size:13px;line-height:1.4;color:var(--hd-color-text-secondary, #555);margin:0}.erx-history__list[_ngcontent-%COMP%]{flex:1;padding:0 16px 80px;
2display:flex;flex-direction:column;gap:12px}.erx-history__card[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:16px;border:1px solid #d9d9d9;cursor:pointer;transition:background-color .2s ease}.erx-history__card[_ngcontent-%COMP%]:active{background:#fafafa}.erx-history__card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:8px}.erx-history__card-title-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.erx-history__card-title[_ngcontent-%COMP%]{font-size:16px;font-weight:600;color:var(--hd-color-text-primary, #222);margin:0}.erx-history__card-time[_ngcontent-%COMP%]{font-size:13px;color:var(--hd-color-text-tertiary, #999)}.erx-history__card-medicine[_ngcontent-%COMP%]{font-size:14px;color:var(--hd-color-text-secondary, #555);margin:4px 0 0}.erx-history__card-more[_ngcontent-%COMP%]{font-size:13px;color:var(--hd-color-text-tertiary, #999);display:block;margin-top:2px}.erx-history__card-thumbnail[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;margin-top:12px;cursor:pointer}.erx-history__card-thumbnail-img[_ngcontent-%COMP%]{width:48px;height:48px;object-fit:cover;border-radius:4px;border:1px solid #eee}.erx-history__card-thumbnail-label[_ngcontent-%COMP%]{font-size:12px;color:var(--hd-color-text-tertiary, #999)}.erx-history__footer[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:12px 16px;background:#fff;box-shadow:0 -2px 8px #0000001a;z-index:10}.erx-history__upload-btn[_ngcontent-%COMP%]{width:100%;padding:14px;border:2px solid var(--hd-color-error, #e53935);border-radius:8px;background:transparent;color:var(--hd-color-error, #e53935);font-size:16px;font-weight:600;cursor:pointer;transition:background-color .2s ease}.erx-history__upload-btn[_ngcontent-%COMP%]:active{background:#e539350f}.erx-history__scroll-sentinel[_ngcontent-%COMP%]{min-height:1px}.erx-history__loading-more[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:16px 0}.erx-history__loading-spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:3px solid #e0e0e0;border-top-color:var(--hd-color-primary, #e53935);border-radius:50%;animation:_ngcontent-%COMP%_erx-spin .8s linear infinite}@keyframes _ngcontent-%COMP%_erx-spin{to{transform:rotate(360deg)}}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 10px;border-radius:4px;font-size:12px;font-weight:500;white-space:nowrap;flex-shrink:0}"]});let n=a;return n})();var xi=(()=>{let a=class a{constructor(){this.translate=x(W),this.rejectionReason=P(""),this.understood=M(),this.backPressed=M()}get displayReason(){let e=this.translate.instant("AI_PRESCRIPTION.REJECTION.DESCRIPTION_DEFAULT_REASON"),t=this.rejectionReason()||e;return this.translate.instant("AI_PRESCRIPTION.REJECTION.DESCRIPTION",{reason:t})}onUnderstood(){this.understood.emit()}onBack(){this.backPressed.emit()}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-rejection"]],inputs:{rejectionReason:[1,"rejectionReason"]},outputs:{understood:"understood",backPressed:"backPressed"},decls:14,vars:7,consts:[["data-testid","rejection-page",1,"rejection-page"],[1,"rejection-page__content"],["data-testid","rejection-illustration",1,"rejection-page__illustration"],["src","/assets/icon/cs_rejected_doc.webp","alt","Prescription document","data-testid","rejection-doc-illustration",1,"rejection-page__illustration-doc"],["src","/assets/icon/cs_rejected_cross.webp","alt","Rejected","data-testid","rejection-cross-illustration",1,"rejection-page__illustration-cross"],["data-testid","rejection-title",1,"rejection-page__title"],["data-testid","rejection-description",1,"rejection-page__description"],[1,"rejection-page__footer"],["id","rejection-page-cta-btn","data-testid","rejection-cta-btn",1,"rejection-page__cta",3,"click"]],template:function(t,i){t&1&&(H(0,"div",0)(1,"div",1)(2,"div",2),pe(3,"img",3)(4,"img",4),N(),H(5,"h2",5),m(6),A(7,"translate"),N(),H(8,"p",6),m(9),N()(),H(10,"div",7)(11,"button",8),be("click",function(){return i.onUnderstood()}),m(12),A(13,"translate"),N()()()),t&2&&(r(6),v(" ",w(7,3,"AI_PRESCRIPTION.REJECTION.TITLE")," "),r(3),D(i.displayReason),r(3),v(" ",w(13,5,"AI_PRESCRIPTION.REJECTION.CTA")," "))},dependencies:[F,q],styles:[".rejection-page[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;background:#fff}.rejection-page__content[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px 80px;text-align:center}.rejection-page__illustration[_ngcontent-%COMP%]{position:relative;display:inline-block;margin-bottom:32px}.rejection-page__illustration-doc[_ngcontent-%COMP%]{width:140px;height:auto;display:block}.rejection-page__illustration-cross[_ngcontent-%COMP%]{width:52px;height:52px;position:absolute;top:-35px;right:-40px}.rejection-page__title[_ngcontent-%COMP%]{font-size:22px;font-weight:700;color:#222;margin:0 0 16px}.rejection-page__description[_ngcontent-%COMP%]{font-size:15px;line-height:1.5;color:#666;margin:0;max-width:320px}.rejection-page__footer[_ngcontent-%COMP%]{position:fixed;bottom:0;left:0;right:0;padding:12px 16px;background:#fff;box-shadow:0 -2px 8px #0000001a}.rejection-page__cta[_ngcontent-%COMP%]{width:100%;padding:14px;border:none;border-radius:4px;background:#e0004d;color:#fff;font-size:16px;font-weight:600;cursor:pointer}.rejection-page__cta[_ngcontent-%COMP%]:active{opacity:.9}"]});let n=a;return n})();function go(n,a){n&1&&S(0,"magneto-full-screen-loader")}function ho(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-upload",5),g("fileUploaded",function(t){C(o);let i=p(2);return b(i.onFileUploaded(t))})("backBtnClick",function(){C(o);let t=p(2);return b(t.routeTo(["/obat-dan-vitamin"]))}),c()}}function To(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-history-list",6),g("leadSelected",function(t){C(o);let i=p(2);return b(i.onLeadSelected(t))})("newUploadRequested",function(){C(o);let t=p(2);return b(t.onNewPrescriptionUpload())})("backPressed",function(){C(o);let t=p(2);return b(t.routeTo(["/obat-dan-vitamin"]))}
2)("loadMore",function(){C(o);let t=p(2);return b(t.onLoadMore())}),c()}if(n&2){let o=p(2);_("leads",o.allLeads())("uploadDurationSeconds",o.uploadDurationSeconds())("hasMore",o.hasMoreLeads())("isLoadingMore",o.isLoadingMore())}}function Co(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-rejection",7),g("understood",function(){C(o);let t=p(2);return b(t.onRejectionUnderstood())})("backPressed",function(){C(o);let t=p(2);return b(t.onRejectionUnderstood())}),c()}if(n&2){let o=p(2);_("rejectionReason",o.csRejectionReason())}}function bo(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-address-selection",8),g("addressConfirmed",function(t){C(o);let i=p(2);return b(i.onAddressConfirmed(t))})("cancelled",function(){C(o);let t=p(2);return b(t.onAddressSelectionCancelled())}),c()}}function So(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-validation",9),g("cancelled",function(){C(o);let t=p(2);return b(t.onCancel())}),c()}if(n&2){let o=p(2);_("currentState",o.currentState())}}function fo(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-validation",9),g("cancelled",function(){C(o);let t=p(2);return b(t.onCancel())}),c()}if(n&2){let o=p(2);_("currentState",o.currentState())}}function Po(n,a){if(n&1){let o=E();d(0,"app-manual-prescription-screen",10),g("routeTo",function(t){C(o);let i=p(2);return b(i.routeTo(t))}),c()}}function Mo(n,a){if(n&1){let o=E();d(0,"app-ai-prescription-confirmation",11),g("addToCart",function(){C(o);let t=p(2);return b(t.onAddRecommendedProductsToCart())}),c()}if(n&2){let o=p(2);_("leadData",o.leadData())("nonHalodocDocumentItems",o.nonHalodocDocumentItems)("halodocProductDetails",o.halodocProductDetails())("rejectReason",o.rejectionReason())}}function xo(n,a){if(n&1&&h(0,ho,1,0,"app-ai-prescription-upload",0)(1,To,1,4,"app-ai-prescription-history-list",1)(2,Co,1,1,"app-ai-prescription-rejection",2)(3,bo,1,0,"app-ai-prescription-address-selection")(4,So,1,1,"app-ai-prescription-validation",3)(5,fo,1,1,"app-ai-prescription-validation",3)(6,Po,1,0,"app-manual-prescription-screen")(7,Mo,1,4,"app-ai-prescription-confirmation",4),n&2){let o,e=p();T((o=e.currentState())==="upload"?0:o==="leads_list"?1:o==="cs_rejected"?2:o==="address_selection"?3:o==="document_uploaded"?4:o==="validation_started"?5:o==="manual_processing_required"?6:o==="validation_rejected"?7:-1)}}var at="ai_prescription_uploaded_file",vi="/obat-dan-vitamin/checkout",Ai="Ai_prescription_journey_seen_by",lr=(()=>{let a=class a{runWithExitSuppressed(e){this.suppressExitPrompt=!0,e(),setTimeout(()=>{this.suppressExitPrompt=!1})}constructor(){this.leadsService=x(Jt),this.router=x(Ot),this.cartCheckoutFacade=x(Kt),this.cartFacade=x(Ft),this.productFetchService=x(zt),this.dataService=x(ve),this.utilitiesService=x(Ae),this.userService=x(Ht),this.loginModalService=x(Wt),this.loginService=x(Ut),this.breadCrumbService=x(Qt),this.layoutVisibilityService=x(Xt),this.aiBottomSheetService=x(ni),this.configService=x(Nt),this.gtmService=x(Bt),this.translateService=x(W),this.unsubscribe$=new Ce,this.stopPolling$=new Ce,this.userProfile=f(null),this.currentState=f("upload"),this.selectedAddress=f(null),this.productsInHalodoc=[],this.productsNotInHalodoc=[],this.halodocProductDetails=f([]),this.halodocDocumentItems=[],this.nonHalodocDocumentItems=[],this.medicalRecommendations=[],this.leadData=f(null),this.allLeads=f([]),this.csRejectionReason=f(""),this.uploadDurationSeconds=f(604800),this.rejectionReason=f(""),this.currentPage=f(1),this.hasMoreLeads=f(!1),this.isLoadingMore=f(!1),this.isInitializing=f(!1),this.aiPrescriptionConfigEnabled=f(!1),this.pendingFile=null,this.suppressExitPrompt=!1,this.hasShownFtue=!1,this.channel="deeplink",this.lastFiredRxPageState=null,re(()=>{let e=this.currentState();setTimeout(()=>{e==="upload"?this.layoutVisibilityService.setOverride({showHeader:!1,showFooter:!1,showBreadcrumb:!1}):this.layoutVisibilityService.setOverride({showHeader:!0,showFooter:!1,showBreadcrumb:!0})})}),re(()=>{var s;let e=this.currentState();if(["upload","address_selection"].includes(e)||e===this.lastFiredRxPageState)return;this.lastFiredRxPageState=e;let i=this.halodocProductDetails();this.gtmService.trackGaEvent({event:"uploaded_rx_page",eventProperties:{leads_id:((s=We(()=>this.leadData()))==null?void 0:s.external_id)??"",order_items:i.map(l=>
2l.name).filter(Boolean).join(";"),pd_class:i.map(l=>l.product_class).filter(Boolean).join(";"),status:e}})})}ngOnInit(){var e;this.channel=this.utilitiesService.isBrowser()&&((e=history.state)==null?void 0:e.channel)==="search_bar"?"search_bar":"deeplink",this.currentState.set("upload"),this.isInitializing.set(!0),this.translateService.use(this.dataService.currentUserLang||"id"),this.configService.getPdConfiguration().pipe(O(this.unsubscribe$)).subscribe(t=>{let i=!!t.ai_prescription_enabled;if(this.aiPrescriptionConfigEnabled.set(i),!i){this.isInitializing.set(!1),this.routeTo(["/obat-dan-vitamin"]);return}this.utilitiesService.isBrowser()&&this.utilitiesService.deviceMode.pipe(O(this.unsubscribe$)).subscribe(l=>{l.isDesktop&&this.routeTo(["/obat-dan-vitamin"])});let s=this.dataService.getCurrentUser();this.userProfile.set(s),s?this.utilitiesService.isBrowser()?this.leadsService.fetchAllLeads().pipe(O(this.unsubscribe$)).subscribe(l=>{var u;((u=l.result)==null?void 0:u.length)>0?(this.allLeads.set(l.result.filter(I=>I.sub_status!=="product_package_detected")),this.hasMoreLeads.set(l.next_page??!1),this.currentPage.set(1),this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")):(this.currentState.set("upload"),this.showPrescriptionGuideOnFirstVisit()),this.isInitializing.set(!1)},()=>{this.isInitializing.set(!1),this.currentState.set("upload")}):this.isInitializing.set(!1):(this.isInitializing.set(!1),this.showPrescriptionGuideOnFirstVisit())},()=>{this.isInitializing.set(!1),this.routeTo(["/obat-dan-vitamin"])}),this.onLoginSubscription=this.loginService.onLoginSuccess().pipe(O(this.unsubscribe$)).subscribe(t=>{this.hdOnLogin(t)})}hdOnLogin(e){this.userProfile.set(e==null?void 0:e.profile),this.userProfile()&&e&&e.loginSource===Qe.PHARMACY_DELIVERY&&this.processFileFromSession()}processFileFromSession(){let e=sessionStorage.getItem(at);if(e){sessionStorage.removeItem(at);try{let{name:t,type:i,data:s}=JSON.parse(e),l=this.base64ToBlob(s,i),u=new File([l],t,{type:i});this.onFileUploaded(u);return}catch(t){this.currentState.set("upload");return}}}showPrescriptionGuideOnFirstVisit(){var s;if(!this.utilitiesService.isBrowser()||this.hasShownFtue||(s=history.state)!=null&&s.ftueShown)return;let e=this.dataService.getCurrentUser(),t=e==null?void 0:e.self_patient_id;if(t&&this.userService.getGuidedWalkthroughStatusFromLS(Ai).includes(t))return;this.hasShownFtue=!0;let i=["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.TITLE","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CORRECT_LABEL","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CORRECT_DESC","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.INCORRECT_LABEL","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.INCORRECT_DESC","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CLOSE","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CTA","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP1_TITLE","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP1_BODY","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP2_TITLE","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP2_BODY","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP3_TITLE","AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP3_BODY"];this.translateService.get(i).pipe(O(this.unsubscribe$)).subscribe(l=>{this.aiBottomSheetService.openJourneySheet({title:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.TITLE"],correctLabel:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CORRECT_LABEL"],correctDesc:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CORRECT_DESC"],incorrectLabel:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.INCORRECT_LABEL"],incorrectDesc:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.INCORRECT_DESC"],closeLabel:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CLOSE"],cta:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.CTA"],infoItems:[{icon:"assets/svg/prepare-rx.svg",title:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP1_TITLE"],body:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP1_BODY"]},{icon:"assets/svg/clear-picture.svg",title:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP2_TITLE"],body:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP2_BODY"]},{icon:"assets/svg/confirm-rx.svg",title:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP3_TITLE"],body:l["AI_PRESCRIPTION.PRESCRIPTION_GUIDE.STEP3_BODY"]}]}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(()=>{t&&this.userService.setGuidedWalkthroughStatusInLS(Ai,t)}
2)})}onAddressSelectionCancelled(){this.pendingFile=null,this.currentState.set("upload")}onAddressConfirmed(e){if(this.selectedAddress.set(e),!this.pendingFile){this.currentState.set("upload");return}this.createLeadWithAddress(this.pendingFile,e)}existingActiveLead(e){if(!Array.isArray(e)||e.length===0)return;let t=["document_uploaded","validation_started","validation_approved","validation_rejected"],i=e[0];return i.status=="pending"&&t.includes(i.sub_status)?i:void 0}updateBreadcrumbDetail(e){let t={step:e};this.breadCrumbService.updateBreadcrumbLabels(t)}startPolling(e){st(0,5e3).pipe(Re(()=>this.leadsService.getLeadsDetails(e)),O(this.stopPolling$),O(this.unsubscribe$)).subscribe({next:t=>{var i;if(this.leadData.update(s=>k(k({},s),t)),t.status=="pending")this.handleState(t.sub_status);else if(t.status=="processed"&&t.sub_status=="product_package_detected")this.stopPolling(),this.handleProductPackageDetected(t);else if(t.status=="rejected"){let s=(i=t.attributes)==null?void 0:i.processing_error;if(s=="invalid_prescription"||s=="product_or_package_image"){this.inCorrectImageCaptured(),this.currentState.set("upload"),this.stopPolling();return}else if(s=="multiple_product_or_package_image"){this.multipleProductsDetected(),this.currentState.set("upload"),this.stopPolling();return}else if(s=="blurred_prescription"){this.blurredPrescription(),this.currentState.set("upload"),this.stopPolling();return}else if(s=="compounding_product"||s=="restricted_product"){this.restrictedProduct(),this.currentState.set("upload"),this.stopPolling();return}else this.stopPolling(),this.currentState.set("upload")}else this.stopPolling(),this.currentState.set("upload");this.isInitializing.set(!1)},error:()=>{this.stopPolling(),this.showGenericApiError()}})}handleState(e){switch(this.currentState.set(e),e){case"document_uploaded":this.updateBreadcrumbDetail("Tebus Resep");break;case"validation_started":this.updateBreadcrumbDetail("Tebus Resep");break;case"validation_approved":this.currentState.set("validation_started"),this.stopPolling(),this.handleValidationApproved();break;case"manual_processing_required":this.updateBreadcrumbDetail("Foto Sedang Ditinjau"),this.stopPolling();break;case"validation_rejected":this.currentState.set("validation_started"),this.stopPolling(),this.handleValidationRejected();break;case"order_created":this.stopPolling(),this.currentState.set("upload"),this.handleOrderCreated();break;default:this.currentState.set("upload");break}}routeTo(e){this.runWithExitSuppressed(()=>this.router.navigate(e))}onFileUploaded(e){if(e){if(!this.userProfile()){this.utilitiesService.isBrowser()?this.fileToBase64(e).then(t=>{let i=JSON.stringify({name:e.name,type:e.type,data:t});sessionStorage.setItem(at,i),this.runWithExitSuppressed(()=>{let s={loginSource:Qe.PHARMACY_DELIVERY,redirect_url:this.router.url};this.loginModalService.login(s)})}):this.runWithExitSuppressed(()=>this.router.navigate(["/obat-dan-vitamin"]));return}this.pendingFile=e,this.currentState.set("address_selection"),this.updateBreadcrumbDetail("Alamat")}}fireValidationApprovedRxPageEvent(e){var t;this.gtmService.trackGaEvent({event:"uploaded_rx_page",eventProperties:{leads_id:((t=We(()=>this.leadData()))==null?void 0:t.external_id)??"",order_items:e.map(i=>i.name).filter(Boolean).join(";"),pd_class:e.map(i=>i.product_class).filter(Boolean).join(";"),status:"validation_approved"}})}handleValidationApproved(){var t,i;let e=(i=(t=this.leadData())==null?void 0:t.attributes)==null?void 0:i.validation_id;e&&this.loadValidationDetails(e,!0)}handleValidationRejected(){var t,i;let e=(i=(t=this.leadData())==null?void 0:t.attributes)==null?void 0:i.validation_id;e&&(this.updateBreadcrumbDetail("Halaman Konfirmasi"),this.loadValidationDetails(e))}createLeadWithAddress(e,t){this.currentState.set("document_uploaded"),this.updateBreadcrumbDetail("Tebus Resep"),this.leadsService.uploadLeadDocument(e).pipe(Re(i=>{let s=Yt(this.userProfile(),i.document_id,this.mapAddressToLeadPayload(t));return this.leadsService.createLeads(s)}),O(this.unsubscribe$)).subscribe({next:i=>{this.leadData.set(i),this.pendingFile=null,this.gtmService.trackGaEvent({event:"document_captured",eventProperties:{leads_id:i.external_id,source:"camera",channel:this.channel}}),this.startPolling(i.external_id)},error:i=>{var s;console.error("Failed to create lead",i),this.pendingFile=null,((s=i==null?void 0:i.error)==null?void 0:s.code)==3107?(this.allLeads().length>0?(this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")):this.currentState.set("upload"),this.tooManyUploadAttemps()):this.showGenericApiError()}})}mapAddressToLeadPayload(e){var t,i;return{address:e.fullAddress||((t=e.formattedAddress)==null?void 0:t.premise)||e.route||"",name:((i=e.formattedAddress)==null?void 0:i.premise)||e.premise||"Alamat Utama",latitude:e.latitude,longitude:e.longitude}}fetchValidationDocument(e){return this.leadsService.fetchLeadsProductsWithValidationId(e).pipe(O(this.unsubscribe$))}
2loadValidationDetails(e,t=!1){this.fetchValidationDocument(e).pipe(O(this.unsubscribe$)).subscribe({next:i=>{var s,l,u,I,B,oe,ae;if(this.leadCart={validation_type:i.type,validation_id:i.external_id,validation_result:((s=this.leadData())==null?void 0:s.attributes.validation_result)??((l=this.leadData())==null?void 0:l.sub_status)==="validation_approved"?"approved":"rejected",lead_id:i.reference_id,prescription_id:((B=(I=(u=i==null?void 0:i.notes)==null?void 0:u.prescription)==null?void 0:I[0])==null?void 0:B.id)??null},this.rejectionReason.set(((oe=i==null?void 0:i.attributes)==null?void 0:oe.rejection_reason)??""),t){let z=((ae=i==null?void 0:i.notes)==null?void 0:ae.medical_recommendation)??[];this.medicalRecommendations=z;let{halodocProducts:U}=qt(z);this.productsInHalodoc=U}else{let z=(i==null?void 0:i.document_content)??[],U=[],j=[];z.forEach(R=>{R!=null&&R.product_id&&R.product_id.trim().length>0?U.push(R):j.push(R)}),this.halodocDocumentItems=U,this.nonHalodocDocumentItems=j,this.productsInHalodoc=U.map(R=>{var L;return(L=R.product_id)==null?void 0:L.trim()}).filter(R=>!!R),this.productsNotInHalodoc=j.map(R=>{var L;return(L=R.item)==null?void 0:L.trim()}).filter(R=>!!R)}this.fetchHalodocProductDetails(t)},error:i=>{console.error("Failed to load validation recommendations",i),this.showGenericApiError()}})}onAddRecommendedProductsToCart(){var t;let e=this.halodocProductDetails();if(this.gtmService.trackGaEvent({event:"confirmed_prescription",eventProperties:{source:"ai_prescription",leads_id:((t=this.leadData())==null?void 0:t.external_id)??"",order_items:e.map(i=>i.name).filter(Boolean).join(";"),pd_class:e.map(i=>i.product_class).filter(Boolean).join(";")}}),this.halodocProductDetails().length){this.createCartFromValidatedProducts(this.halodocProductDetails());return}this.fetchHalodocProductDetails(!0)}fetchHalodocProductDetails(e=!1){if(!this.productsInHalodoc.length){this.halodocProductDetails.set([]),e&&(this.fireValidationApprovedRxPageEvent([]),this.routeTo(["/obat-dan-vitamin"]));return}this.productFetchService.fetchProductDetailsById(this.productsInHalodoc).pipe(O(this.unsubscribe$)).subscribe({next:t=>{this.halodocProductDetails.set(t??[]),e?(this.fireValidationApprovedRxPageEvent(t??[]),this.createCartFromValidatedProducts(this.halodocProductDetails())):this.currentState.set("validation_rejected")},error:t=>{console.error("Failed to fetch Halodoc product details",t),e?this.navigateToCheckout():this.showGenericApiError()}})}createCartFromValidatedProducts(e){let t=(e??[]).map(s=>{var oe,ae,z,U;let l=this.medicalRecommendations.find(j=>j.product_id===s.product_id),u=this.halodocDocumentItems.find(j=>j.product_id===s.product_id);if(!l&&!u)return null;let I=l?l.quantity:Number(u.quantity),B=Number.isFinite(I)&&I>0?I:1;return{id:s.product_id,name:s.name,price:s.price??s.min_price??s.base_price??0,quantity:B,description:s.description,sellingUnit:s.selling_unit,thumbnailUrl:s.thumbnail_url??s.image_url??"",currency:s.currency??"IDR",prescriptionRequired:((ae=(oe=s.product_details)==null?void 0:oe.product_attributes)==null?void 0:ae.prescription_required)??!1,controlled_substance_type:(U=(z=s.product_details)==null?void 0:z.product_attributes)==null?void 0:U.controlled_substance_type}}).filter(s=>!!s);if(!t.length){this.routeTo(["/obat-dan-vitamin"]);return}this.cartCheckoutFacade.clearCartAndOrderState(),this.cartFacade.createNewCartUsingCartItems(t)&&(this.cartCheckoutFacade.setOrderState(void 0),this.leadCart&&this.cartFacade.storeLeadDataInCart(this.leadCart)),this.navigateToCheckout()}navigateToCheckout(){this.runWithExitSuppressed(()=>this.router.navigateByUrl(vi))}handleOrderCreated(){this.routeTo(["/obat-dan-vitamin"])}showGenericApiError(){this.allLeads().length>0?(this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")):this.currentState.set("upload"),this.aiBottomSheetService.openActionSheet({primaryText:"Terjadi Kesalahan",supportingText:"Mohon coba lagi.",primaryCta:"Kembali",illustrationUrl:"/assets/png/too-many-rx-attempts.png",type:"too_many_attempts",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&(this.allLeads().length>0?(this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")):this.routeTo(["/obat-dan-vitamin"]))})}tooManyUploadAttemps(){this.aiBottomSheetService.openActionSheet({primaryText:"Terlalu Banyak Percobaan",supportingText:"Kamu mencapai batas percobaan foto resep. Mohon tunggu 1 jam sebelum mencoba kembali.",primaryCta:"Kembali",illustrationUrl:"/assets/png/too-many-rx-attempts.png",type:"too_many_attempts",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&(this.allLeads().length>0?(this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")):this.routeTo(["/obat-dan-vitamin"]))})}inCorrectImageCaptured(){this.gtmService.trackGaEvent({event:"pagescreen_view",eventProperties:{pagescreen_name:"processing_error",error_type:"invalid_image"}}),this.aiBottomSheetService.openActionSheet({primaryText:"Gambar yang diambil tidak benar.",supportingText:"Hanya gambar resep yang akan diterima. Foto selfie atau gambar barang lain tidak akan diproses.",primaryCta:"Kembali",illustrationUrl:"/assets/png/too-many-rx-attempts.png",type:"too_many_attempts",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&this.routeTo(["/obat-dan-vitamin"])})}blurredPrescription(){this.gtmService.trackGaEvent({event:"pagescreen_view",eventProperties:{pagescreen_name:"processing_error",error_type:"image_blur"}}),this.aiBottomSheetService.openActionSheet({primaryText:"Foto Terlalu Buram",supportingText:"Pegang ponsel kamu dengan stabil dan pastikan pencahayaan cukup. Silahkan coba lagi.",primaryCta:"Baik, Mengerti",illustrationUrl:"/assets/png/too-many-rx-attempts.png",type:"blurred_prescription",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&this.routeTo(["/obat-dan-vitamin"])})}
2restrictedProduct(){this.gtmService.trackGaEvent({event:"pagescreen_view",eventProperties:{pagescreen_name:"processing_error",error_type:"NAPZA_compounding_meds"}}),this.aiBottomSheetService.openActionSheet({primaryText:"Resep Berisi Produk yang Tidak Dapat Dibeli di Halodoc",supportingText:"Pada resep yang diunggah terdapat produk yang tidak dapat kami proses di platform kami, seperti obat yang dibatasi atau obat racikan.",primaryCta:"Baik, Mengerti",illustrationUrl:"/assets/png/too-many-rx-attempts.png",type:"restricted_product",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&this.routeTo(["/obat-dan-vitamin"])})}handleProductPackageDetected(e){var s;let t=(s=e.attributes)==null?void 0:s.validation_id,i=e.external_id;this.fetchValidationDocument(t).subscribe({next:l=>{var I,B;let u=((B=(I=l.document_content)==null?void 0:I[0])==null?void 0:B.search_product_name)??"";this.productPackageImageCaptured(u,i)},error:()=>{this.currentState.set("upload"),this.showGenericApiError()}})}productPackageImageCaptured(e,t){let i=s=>this.translateService.instant(s);this.aiBottomSheetService.openProductPackageSheet({keyword:e,title:i("AI_PRESCRIPTION.PRODUCT_PACKAGE.TITLE"),body:i("AI_PRESCRIPTION.PRODUCT_PACKAGE.BODY"),searchCta:i("AI_PRESCRIPTION.PRODUCT_PACKAGE.SEARCH_CTA")}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(s=>{s==="search"?(this.gtmService.trackGaEvent({event:"button_click",eventProperties:{button_name:"search_product",leads_id:t,source:"ai_prescription_bottomsheet"}}),this.runWithExitSuppressed(()=>this.router.navigate(["/obat-dan-vitamin/search",e],{queryParams:{productPackageLeadId:t}}))):this.runWithExitSuppressed(()=>this.router.navigate(["/obat-dan-vitamin"]))})}multipleProductsDetected(){this.gtmService.trackGaEvent({event:"pagescreen_view",eventProperties:{pagescreen_name:"processing_error",error_type:"product_or_product_package"}}),this.aiBottomSheetService.openActionSheet({primaryText:this.translateService.instant("AI_PRESCRIPTION.MULTIPLE_PRODUCTS.TITLE"),supportingText:this.translateService.instant("AI_PRESCRIPTION.MULTIPLE_PRODUCTS.BODY"),primaryCta:this.translateService.instant("AI_PRESCRIPTION.MULTIPLE_PRODUCTS.CTA"),illustrationUrl:"assets/images/bottomsheet-multiple-products.webp",type:"multiple_products",showClose:!0}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="dismissed"&&this.routeTo(["/obat-dan-vitamin"])})}onLeadSelected(e){switch(this.leadData.set(e),Ie(e)){case"reading_prescription":case"validating":this.startPolling(e.external_id);break;case"in_progress":this.currentState.set("manual_processing_required");break;case"rejected":this.navigateToRejectionPage(e);break;case"processed":this.currentState.set("manual_processing_required");break;case"prescription_approved":this.handleValidationApproved();break;case"needs_follow_up":this.handleValidationRejected();break}}onNewPrescriptionUpload(){this.leadsService.fetchUploadCount().pipe(O(this.unsubscribe$)).subscribe({next:e=>{e.upload_count>=e.allowed_upload_count?this.tooManyUploadAttemps():this.currentState.set("upload")},error:()=>{this.currentState.set("upload")}})}navigateToRejectionPage(e){var i;let t=(i=e.notes)==null?void 0:i.find(s=>s.type==="rejection_reason");this.csRejectionReason.set((t==null?void 0:t.comments)||""),this.currentState.set("cs_rejected"),this.updateBreadcrumbDetail("Tebus Resep")}onLoadMore(){if(this.isLoadingMore()||!this.hasMoreLeads())return;this.isLoadingMore.set(!0);let e=this.currentPage()+1;this.leadsService.fetchAllLeads(e).pipe(O(this.unsubscribe$)).subscribe({next:t=>{var i;((i=t.result)==null?void 0:i.length)>0&&(this.allLeads.update(s=>[...s,...t.result]),this.currentPage.set(e)),this.hasMoreLeads.set(t.next_page??!1),this.isLoadingMore.set(!1)},error:()=>{this.isLoadingMore.set(!1)}})}onRejectionUnderstood(){this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat")}onCancel(){this.gtmService.trackGaEvent({event:"cancel_upload",eventProperties:{service_type:"PD",source:"search bar"}}),this.aiBottomSheetService.openActionSheet({title:"Apakah Anda yakin ingin membatalkan proses ini?",description:"Apakah Anda ingin membatalkan proses membaca resep?",illustrationUrl:"/assets/png/too-many-rx-attempts.png",primaryCta:"Ya, Batalkan",secondaryCta:"Teruskan Proses"}).afterDismissed().pipe(O(this.unsubscribe$)).subscribe(e=>{e==="primary"&&this.cancelLeadRequest()})}cancelLeadRequest(){let e=this.leadData();if(!(e!=null&&e.external_id)){this.currentState.set("upload");return}this.leadsService.cancelLead(e.external_id).pipe(O(this.unsubscribe$)).subscribe({next:()=>{this.currentState.set("upload"),this.leadData.set(null),this.stopPolling()},error:t=>{console.error("Failed to cancel lead",t),this.showGenericApiError()}})}stopPolling(){this.stopPolling$.next()}clearUrlParams(){this.utilitiesService.isBrowser()&&this.runWithExitSuppressed(()=>this.router.navigate([],{queryParams:{},replaceUrl:!0,queryParamsHandling:""}))}fileToBase64(e){return new Promise((t,i)=>{let s=new FileReader;s.onerror=i,s.onload=()=>{let l=s.result.split(",")[1];t(l)},s.readAsDataURL(e)})}base64ToBlob(e,t){let i=atob(e),s=new Array(i.length);for(let u=0;u<i.length;u++)s[u]=i.charCodeAt(u);let l=new Uint8Array(s);return new Blob([l],{type:t})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete(),this.stopPolling$.complete(),this.onLoginSubscription&&this.onLoginSubscription.unsubscribe(),this.stopPolling(),this.layoutVisibilityService.setOverride(null)}canDeactivate(e,t){var i;return this.suppressExitPrompt?!0:this.allLeads().length>0&&this.isSubFlowState()?(this.stopPolling(),this.currentState.set("leads_list"),this.updateBreadcrumbDetail("Riwayat"),!1):!this.shouldGuardNavigation()||(i=t==null?void 0:t.url)!=null&&i.startsWith(vi)?!0:this.confirmExit()}isSubFlowState(){return["cs_rejected","manual_processing_required","document_uploaded","validation_started","validation_rejected"].includes(this.currentState())}shouldGuardNavigation(){return["address_selection","document_uploaded","validation_started","manual_processing_required","validation_rejected"].includes(this.currentState())}confirmExit(){return this.aiBottomSheetService.openActionSheet({title:"Sistem akan terus memproses hingga pembacaan selesai.",description:"Kami akan terus memproses hingga pemindaian selesai. Silakan ketuk tombol \u201CTebus Resep\u201D untuk melihat hasilnya.",illustrationUrl:"/assets/png/too-many-rx-attempts.png",primaryCta:"Dimengerti."}).afterDismissed().pipe(rt(e=>e==="primary"))}};a.\u0275fac=function(t){return new(t||a)},a.\u0275cmp=y({type:a,selectors:[["app-ai-prescription-upload-container"]],decls:3,vars:1,consts:[[1,"h-[100%]"],[3,"leads","uploadDurationSeconds","hasMore","isLoadingMore"],[3,"rejectionReason"],[3,"currentState"],[3,"lead
2Data","nonHalodocDocumentItems","halodocProductDetails","rejectReason"],[1,"h-[100%]",3,"fileUploaded","backBtnClick"],[3,"leadSelected","newUploadRequested","backPressed","loadMore","leads","uploadDurationSeconds","hasMore","isLoadingMore"],[3,"understood","backPressed","rejectionReason"],[3,"addressConfirmed","cancelled"],[3,"cancelled","currentState"],[3,"routeTo"],[3,"addToCart","leadData","nonHalodocDocumentItems","halodocProductDetails","rejectReason"]],template:function(t,i){t&1&&(d(0,"div",0),h(1,go,1,0,"magneto-full-screen-loader")(2,xo,8,1),c()),t&2&&(r(),T(i.isInitializing()?1:2))},dependencies:[ui,Ci,bi,Si,fi,Mi,xi,Vt,Rt,F],encapsulation:2});let n=a;return n})();export{lr as AiPrescriptionUploadContainerComponent};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.