UNPKG

react-ui-mat

Version:

- ANIMATE - BADGES ( success, danger, info, light, primary, green ) - BEHAVIOR - BUTTONS - CHECKBOX - COLLAPSE - CONTEXT PANEL - DATE PICKER - DATEPICKER - DATEUTIL - DIVIDER - DRAGABLE MODAL - INCORRECT_ENTRY - INPUT - INPUT_FIELDS - MULTISELECT - MUPLAY

1 lines 12.5 kB
'use strict';var a0_0x3a3196=this&&this['__importDefault']||function(_0x179f65){return _0x179f65&&_0x179f65['__esModule']?_0x179f65:{'default':_0x179f65};};const a0_0x1ec903={};a0_0x1ec903['value']=!![],Object['defineProperty'](exports,'__esModule',a0_0x1ec903),exports['ReceiptCapture']=void 0x0;const a0_0x523b23=require('react/jsx-runtime'),a0_0xfd4f3=a0_0x3a3196(require('react')),a0_0x456fb3='\x0a\x20\x20@keyframes\x20rct-spin\x20{\x0a\x20\x20\x20\x200%\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20rotate(0deg);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x2050%\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20rotate(180deg);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x2051%\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20rotate(180deg);\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20\x20\x20100%\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20transform:\x20rotate(360deg);\x0a\x20\x20\x20\x20}\x0a\x20\x20}\x0a\x0a\x20\x20.rct-spinner\x20{\x0a\x20\x20\x20\x20border-radius:\x2050%;\x0a\x20\x20\x20\x20animation:\x20rct-spin\x204s\x20ease-in-out\x20infinite;\x0a\x20\x20}\x0a\x0a\x20\x20.rct-spinner-wp\x20{\x0a\x20\x20\x20\x20position:\x20absolute;\x0a\x20\x20\x20\x20left:\x2050%;\x0a\x20\x20\x20\x20bottom:\x2015px;\x0a\x20\x20\x20\x20font-size:\x2021px;\x0a\x20\x20\x20\x20transform:\x20translate(-50%,\x20-50%);\x0a\x20\x20\x20\x20display:\x20flex;\x0a\x20\x20\x20\x20border:\x201px\x20solid\x20#ccc;\x0a\x20\x20\x20\x20box-shadow:\x200px\x200px\x203px\x20#a4a4a4;\x0a\x20\x20\x20\x20width:\x202.5rem;\x0a\x20\x20\x20\x20height:\x202.5rem;\x0a\x20\x20\x20\x20justify-content:\x20center;\x0a\x20\x20\x20\x20align-items:\x20center;\x0a\x20\x20\x20\x20background:\x20#91919180;\x0a\x20\x20\x20\x20z-index:\x20999;\x0a\x20\x20}\x0a';function a0_0x1fbdf0(_0x4566c3){try{return _0x4566c3();}catch(_0x2f38d6){return null;}}function a0_0x34c582(){return new Promise((_0x415d35,_0x3210fd)=>{window?.['setTimeout'](()=>{_0x415d35(null);},0x1f4);});}var a0_0x5a31d1;(function(_0x522235){_0x522235[_0x522235['loading']=0x1]='loading',_0x522235[_0x522235['loaded']=0x2]='loaded',_0x522235[_0x522235['error']=0x3]='error';}(a0_0x5a31d1||(a0_0x5a31d1={})));function a0_0x19917e(_0x411d2a){const _0x496deb=a0_0xfd4f3['default']['useRef'](null),_0x1170fc=a0_0xfd4f3['default']['useRef'](null),_0x52ec7e=a0_0xfd4f3['default']['useRef'](null),_0x5e1112=a0_0xfd4f3['default']['useRef'](null),_0x28c856=a0_0xfd4f3['default']['useRef'](null),[_0x17c645,_0x4e4b79]=a0_0xfd4f3['default']['useState'](![]),[_0x661830,_0x2366f9]=a0_0xfd4f3['default']['useState']('pending'),[_0x57b636,_0xff45e8]=a0_0xfd4f3['default']['useState'](a0_0x5a31d1['loading']),[_0x35f541,_0x10343d]=a0_0xfd4f3['default']['useState']();function _0x3340d5(){const _0x36ff9c=Number(_0x411d2a['dm']?.['width'])||0x356,_0x59f658=Number(_0x411d2a['dm']?.['height'])||0x1e0,_0x27758e=_0x411d2a['position']==='front'?'user':'environment',_0x335945={};_0x335945['ideal']=_0x36ff9c;const _0x2f82f8={};_0x2f82f8['ideal']=_0x59f658;const _0x235a20={};_0x235a20['facingMode']=_0x27758e||'user',_0x235a20['width']=_0x335945,_0x235a20['height']=_0x2f82f8;const _0x560a37={};return _0x560a37['video']=_0x235a20,_0x560a37['audio']=![],_0x560a37;}async function _0x49ade3(){try{if(window&&document){const _0x445fcd=navigator['mediaDevices'],_0x4f9326=_0x445fcd['getUserMedia']||_0x445fcd['webkitGetUserMedia']||_0x445fcd['mozGetUserMedia']||_0x445fcd['msGetUserMedia'],_0x3b258a={};return _0x3b258a['video']=!![],_0x3b258a['audio']=![],await _0x4f9326(_0x3b258a),_0x2366f9('granted'),Promise['resolve']();}else return _0x2366f9('denied'),Promise['reject']();}catch(_0xc688d5){return _0x2366f9('denied'),Promise['reject']();}};async function _0x351cbf(){try{try{_0x496deb['current']&&(_0x496deb['current']['srcObject']=null);}catch(_0x2b935b){}_0x5e1112['current']?.['getTracks']()['forEach'](_0x3270b3=>{_0x3270b3['enabled']=![],_0x3270b3['stop'](),_0x3270b3['enabled']=![];}),_0x5e1112['current']=null;}catch(_0x565afd){}return Promise['resolve']();}async function _0x46c08a(){try{if(window){const _0x39bf25=_0x3340d5();_0x5e1112['current']=await navigator['mediaDevices']['getUserMedia'](_0x39bf25),_0x496deb['current']['srcObject']=_0x5e1112['current'],_0x496deb['current']['style']['display']='block',_0x1170fc['current']['style']['display']='none';}return _0x2366f9('granted'),Promise['resolve']();}catch(_0x3fb5df){return _0x2366f9('denied'),Promise['reject']();}}async function _0x55f80d(){try{_0xff45e8(a0_0x5a31d1['loading']),_0x17c645&&!_0x411d2a['inprogress']&&_0x35f541!=a0_0x5a31d1['loaded']&&(await _0x351cbf(),await a0_0x34c582(),await _0x46c08a()),_0xff45e8(a0_0x5a31d1['loaded']);}catch(_0x1a5e7e){_0xff45e8(a0_0x5a31d1['error']);}}const _0x62d537=a0_0xfd4f3['default']['useCallback'](()=>{window?.['clearTimeout'](_0x28c856['current']),_0x28c856['current']=window?.['setTimeout'](()=>{_0x55f80d();},0x1f4);},[]),_0x342f43=a0_0xfd4f3['default']['useCallback'](()=>{document?.['hidden']&&_0x57b636!=a0_0x5a31d1['loaded']&&_0x351cbf();},[]);function _0x430f12(){try{_0x10343d(a0_0x5a31d1['loading']),_0x1170fc['current']['width']=_0x496deb['current']['videoWidth'],_0x1170fc['current']['height']=_0x496deb['current']['videoHeight'],_0x52ec7e['current']['width']=_0x496deb['current']['videoWidth'],_0x52ec7e['current']['height']=_0x496deb['current']['videoHeight'];const _0x1c1b18=_0x1170fc['current']['getContext']('2d');_0x1c1b18['drawImage'](_0x496deb['current'],0x0,0x0,_0x1170fc['current']['width'],_0x1170fc['current']['height']);const _0x4be552=_0x52ec7e['current']['getContext']('2d');_0x4be552['drawImage'](_0x496deb['current'],0x0,0x0,_0x52ec7e['current']['width'],_0x52ec7e['current']['height']),_0x496deb['current']['style']['display']='none',_0x1170fc['current']['style']['display']='block',_0x5e1112['current']&&_0x5e1112['current']['getTracks']()['forEach'](_0x345bb7=>_0x345bb7['stop']()),_0x52ec7e['current']['toBlob'](_0x48f2bd=>{a0_0x1fbdf0(()=>{const _0x353b01={};_0x353b01['type']='image/png';const _0x1a3ea5=new File([_0x48f2bd],'image.png',_0x353b01);_0x10343d(a0_0x5a31d1['loaded']),_0x411d2a['onCapture'](_0x48f2bd,_0x1a3ea5);});},'image/png',0x1);}catch(_0x3aa583){_0x10343d(a0_0x5a31d1['error']);}}function _0x250f59(){a0_0x1fbdf0(()=>{_0x10343d(undefined),_0x55f80d();});}function _0x19eaaf(){a0_0x1fbdf0(()=>_0x411d2a['onCancel']()),a0_0x1fbdf0(()=>_0x351cbf());}a0_0xfd4f3['default']['useEffect'](()=>{return _0x17c645?(_0x55f80d(),window?.['removeEventListener']('deviceorientation',_0x62d537),document?.['removeEventListener']('visibilitychange',_0x342f43),window?.['addEventListener']('orientationchange',_0x62d537),document?.['addEventListener']('visibilitychange',_0x342f43)):window?.['setTimeout'](()=>_0x4e4b79(!![]),0x3e8),()=>{window?.['removeEventListener']('deviceorientation',_0x62d537),document?.['removeEventListener']('visibilitychange',_0x342f43),window?.['clearTimeout'](_0x28c856['current']);};},[_0x17c645,_0x411d2a['dm'],_0x411d2a['dm']]),a0_0xfd4f3['default']['useEffect'](()=>{return()=>{_0x351cbf();};},[]);const _0x3381e3={};_0x3381e3['position']='relative',_0x3381e3['overflow']='hidden';const _0x336828={};_0x336828['margin']='auto',_0x336828['maxWidth']='100%',_0x336828['maxHeight']='100%';const _0x288282={};_0x288282['ref']=_0x496deb,_0x288282['autoPlay']=!![],_0x288282['playsInline']=!![],_0x288282['muted']=!![],_0x288282['style']=_0x336828;const _0x9b0085={};_0x9b0085['margin']='auto',_0x9b0085['display']='none',_0x9b0085['maxWidth']='100%',_0x9b0085['maxHeight']='100%',_0x9b0085['objectFit']='contain';const _0x54b16a={};_0x54b16a['ref']=_0x1170fc,_0x54b16a['style']=_0x9b0085;const _0x3f60a6={};_0x3f60a6['margin']='auto',_0x3f60a6['display']='none';const _0x2b0e25={};_0x2b0e25['ref']=_0x52ec7e,_0x2b0e25['style']=_0x3f60a6;const _0x1e4f3a={};_0x1e4f3a['children']=a0_0x456fb3;const _0x5141b1={};_0x5141b1['className']='rct-spinner',_0x5141b1['children']='⏳';const _0x34cfb1={};_0x34cfb1['display']='flex',_0x34cfb1['flexDirection']='column',_0x34cfb1['position']='absolute',_0x34cfb1['bottom']=0x5,_0x34cfb1['right']=0x5,_0x34cfb1['gap']=0x5;const _0x28bb50={};_0x28bb50['background']='white',_0x28bb50['color']='#333',_0x28bb50['fontSize']='19px',_0x28bb50['border']='1px\x20solid\x20#ccc',_0x28bb50['borderRadius']='5px',_0x28bb50['padding']='5px\x207px',_0x28bb50['cursor']='pointer',_0x28bb50['zIndex']=0xf,_0x28bb50['lineHeight']='21px',_0x28bb50['transition']='all\x200.3s\x20ease',_0x28bb50['boxShadow']='0px\x200px\x2015px\x20black';const _0x2629b6={};_0x2629b6['background']='white',_0x2629b6['color']='#333',_0x2629b6['fontSize']='19px',_0x2629b6['border']='1px\x20solid\x20#ccc',_0x2629b6['borderRadius']='5px',_0x2629b6['padding']='5px\x207px',_0x2629b6['cursor']='pointer',_0x2629b6['zIndex']=0xf,_0x2629b6['lineHeight']='21px',_0x2629b6['transition']='all\x200.3s\x20ease',_0x2629b6['boxShadow']='0px\x200px\x2015px\x20black';const _0x1c9bc1={};_0x1c9bc1['background']='white',_0x1c9bc1['color']='#333',_0x1c9bc1['fontSize']='19px',_0x1c9bc1['border']='1px\x20solid\x20#ccc',_0x1c9bc1['borderRadius']='5px',_0x1c9bc1['padding']='5px\x207px',_0x1c9bc1['cursor']='pointer',_0x1c9bc1['zIndex']=0xf,_0x1c9bc1['lineHeight']='21px',_0x1c9bc1['transition']='all\x200.3s\x20ease';const _0x5d408a={};_0x5d408a['position']='absolute',_0x5d408a['left']='50%',_0x5d408a['transform']='translateX(-50%)',_0x5d408a['zIndex']=0xa,_0x5d408a['color']='white',_0x5d408a['fontSize']='12px',_0x5d408a['backgroundColor']='#91919180',_0x5d408a['padding']='3px\x209px',_0x5d408a['borderRadius']='8px',_0x5d408a['bottom']=0x5;const _0x4bdaab={};_0x4bdaab['color']='red',_0x4bdaab['textAlign']='center';const _0x40a951={};_0x40a951['style']=_0x4bdaab,_0x40a951['children']='Kamera\x20başlatılırken\x20bir\x20hata\x20oluştu.';const _0x3c3bda={};_0x3c3bda['textAlign']='center';const _0x60cc5f={};_0x60cc5f['style']=_0x3c3bda,_0x60cc5f['children']='Yükleniyor...';const _0x5551cb={};_0x5551cb['textAlign']='center';const _0x25db5b={};_0x25db5b['style']=_0x5551cb,_0x25db5b['children']='İzin\x20alınıyor...';const _0x39e208={};_0x39e208['color']='red',_0x39e208['textAlign']='center';const _0x20f3c1={};_0x20f3c1['style']=_0x39e208,_0x20f3c1['children']='Kamera\x20izni\x20verilmedi.';const _0x1cad05={};_0x1cad05['textAlign']='center';const _0x4b1e53={};return _0x4b1e53['style']=_0x1cad05,_0x4b1e53['children']='Kamera\x20görüntüleniyor...',(0x0,a0_0x523b23['jsxs'])('div',{'style':_0x3381e3,'children':[(0x0,a0_0x523b23['jsx'])('video',_0x288282),(0x0,a0_0x523b23['jsx'])('canvas',_0x54b16a),(0x0,a0_0x523b23['jsx'])('canvas',_0x2b0e25),(0x0,a0_0x523b23['jsx'])('style',_0x1e4f3a),_0x411d2a['inprogress']||_0x35f541===a0_0x5a31d1['loading']?(0x0,a0_0x523b23['jsx'])('div',{'className':'rct-spinner-wp','children':(0x0,a0_0x523b23['jsx'])('span',_0x5141b1)}):(0x0,a0_0x523b23['jsx'])(a0_0x523b23['Fragment'],{}),(0x0,a0_0x523b23['jsxs'])('div',{'style':_0x34cfb1,'children':[(0x0,a0_0x523b23['jsx'])('button',{'style':_0x28bb50,'onMouseOver':_0x1734d1=>{_0x1734d1['currentTarget']['style']['background']='#ddd';},'onMouseOut':_0x228056=>{_0x228056['currentTarget']['style']['background']='white';},'onClick':_0x19eaaf,'disabled':_0x411d2a['inprogress'],'children':'❌'}),!_0x35f541?(0x0,a0_0x523b23['jsx'])('button',{'style':_0x2629b6,'onMouseOver':_0x3ff8b8=>{_0x3ff8b8['currentTarget']['style']['background']='#ddd';},'onMouseOut':_0x541a73=>{_0x541a73['currentTarget']['style']['background']='white';},'onClick':_0x430f12,'disabled':_0x411d2a['inprogress']||_0x35f541===a0_0x5a31d1['loaded']||_0x57b636!==a0_0x5a31d1['loaded'],'children':'📷'}):(0x0,a0_0x523b23['jsx'])(a0_0x523b23['Fragment'],{}),_0x35f541===a0_0x5a31d1['loaded']?(0x0,a0_0x523b23['jsx'])('button',{'style':_0x1c9bc1,'onMouseOver':_0x4b895e=>{_0x4b895e['currentTarget']['style']['background']='#ddd';},'onMouseOut':_0x2c4a72=>{_0x2c4a72['currentTarget']['style']['background']='white';},'onClick':_0x250f59,'disabled':_0x411d2a['inprogress'],'children':'🔁'}):(0x0,a0_0x523b23['jsx'])(a0_0x523b23['Fragment'],{})]}),(0x0,a0_0x523b23['jsx'])('div',{'style':_0x5d408a,'children':_0x57b636===a0_0x5a31d1['error']?(0x0,a0_0x523b23['jsx'])('p',_0x40a951):_0x57b636===a0_0x5a31d1['loading']?(0x0,a0_0x523b23['jsx'])('p',_0x60cc5f):_0x661830==='pending'?(0x0,a0_0x523b23['jsx'])('p',_0x25db5b):_0x661830==='denied'?(0x0,a0_0x523b23['jsx'])('p',_0x20f3c1):(0x0,a0_0x523b23['jsx'])('p',_0x4b1e53)})]});}function a0_0x548179(_0x22d090){return a0_0x19917e(_0x22d090);}exports['ReceiptCapture']=a0_0x548179;