452e38c3b8dc19fe96fdf0c908e350b6.json
3.71 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _ExecutionEnvironment=require(\"fbjs/lib/ExecutionEnvironment\");var _invariant=_interopRequireDefault(require(\"fbjs/lib/invariant\"));var initialURL=_ExecutionEnvironment.canUseDOM?window.location.href:'';var Linking={addEventListener:function addEventListener(){},removeEventListener:function removeEventListener(){},canOpenURL:function canOpenURL(){return Promise.resolve(true);},getInitialURL:function getInitialURL(){return Promise.resolve(initialURL);},openURL:function openURL(url){try{open(url);return Promise.resolve();}catch(e){return Promise.reject(e);}},_validateURL:function _validateURL(url){(0,_invariant.default)(typeof url==='string','Invalid URL: should be a string. Was: '+url);(0,_invariant.default)(url,'Invalid URL: cannot be empty');}};var open=function open(url){if(_ExecutionEnvironment.canUseDOM){window.location=new URL(url,window.location).toString();}};var _default=Linking;exports.default=_default;","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/Linking/index.js"],"names":["initialURL","canUseDOM","window","location","href","Linking","addEventListener","removeEventListener","canOpenURL","Promise","resolve","getInitialURL","openURL","url","open","e","reject","_validateURL","URL","toString"],"mappings":"mKASA,mEACA,qEACA,GAAIA,CAAAA,UAAU,CAAGC,gCAAYC,MAAM,CAACC,QAAP,CAAgBC,IAA5B,CAAmC,EAApD,CACA,GAAIC,CAAAA,OAAO,CAAG,CACZC,gBAAgB,CAAE,QAASA,CAAAA,gBAAT,EAA4B,CAAE,CADpC,CAEZC,mBAAmB,CAAE,QAASA,CAAAA,mBAAT,EAA+B,CAAE,CAF1C,CAGZC,UAAU,CAAE,QAASA,CAAAA,UAAT,EAAsB,CAChC,MAAOC,CAAAA,OAAO,CAACC,OAAR,CAAgB,IAAhB,CAAP,CACD,CALW,CAMZC,aAAa,CAAE,QAASA,CAAAA,aAAT,EAAyB,CACtC,MAAOF,CAAAA,OAAO,CAACC,OAAR,CAAgBV,UAAhB,CAAP,CACD,CARW,CASZY,OAAO,CAAE,QAASA,CAAAA,OAAT,CAAiBC,GAAjB,CAAsB,CAC7B,GAAI,CACFC,IAAI,CAACD,GAAD,CAAJ,CACA,MAAOJ,CAAAA,OAAO,CAACC,OAAR,EAAP,CACD,CAAC,MAAOK,CAAP,CAAU,CACV,MAAON,CAAAA,OAAO,CAACO,MAAR,CAAeD,CAAf,CAAP,CACD,CACF,CAhBW,CAiBZE,YAAY,CAAE,QAASA,CAAAA,YAAT,CAAsBJ,GAAtB,CAA2B,CACvC,uBAAU,MAAOA,CAAAA,GAAP,GAAe,QAAzB,CAAmC,yCAA2CA,GAA9E,EACA,uBAAUA,GAAV,CAAe,8BAAf,EACD,CApBW,CAAd,CAuBA,GAAIC,CAAAA,IAAI,CAAG,QAASA,CAAAA,IAAT,CAAcD,GAAd,CAAmB,CAC5B,GAAIZ,+BAAJ,CAAe,CACbC,MAAM,CAACC,QAAP,CAAkB,GAAIe,CAAAA,GAAJ,CAAQL,GAAR,CAAaX,MAAM,CAACC,QAApB,EAA8BgB,QAA9B,EAAlB,CACD,CACF,CAJD,C,aAMed,O","sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';\nimport invariant from 'fbjs/lib/invariant';\nvar initialURL = canUseDOM ? window.location.href : '';\nvar Linking = {\n addEventListener: function addEventListener() {},\n removeEventListener: function removeEventListener() {},\n canOpenURL: function canOpenURL() {\n return Promise.resolve(true);\n },\n getInitialURL: function getInitialURL() {\n return Promise.resolve(initialURL);\n },\n openURL: function openURL(url) {\n try {\n open(url);\n return Promise.resolve();\n } catch (e) {\n return Promise.reject(e);\n }\n },\n _validateURL: function _validateURL(url) {\n invariant(typeof url === 'string', 'Invalid URL: should be a string. Was: ' + url);\n invariant(url, 'Invalid URL: cannot be empty');\n }\n};\n\nvar open = function open(url) {\n if (canUseDOM) {\n window.location = new URL(url, window.location).toString();\n }\n};\n\nexport default Linking;"]},"metadata":{},"sourceType":"script"}