{"version":3,"sources":["webpack://mfModules.[name]/./src/mobile.special.nearby.scripts/LocationProvider.js","webpack://mfModules.[name]/./src/mobile.special.nearby.scripts/NearbyGateway.js","webpack://mfModules.[name]/./src/mobile.special.nearby.scripts/mobile.special.nearby.scripts.js","webpack://mfModules.[name]/./src/mobile.special.nearby.scripts/nearbyErrorMessage.js"],"names":["LocationProvider","browser","require","getSingleton","util","isAvailable","supportsGeoLocation","getCurrentPosition","result","Deferred","navigator","geolocation","geo","resolve","latitude","coords","longitude","err","error","code","PERMISSION_DENIED","TIMEOUT","POSITION_UNAVAILABLE","reject","timeout","enableHighAccuracy","module","exports","pageJSONParser","ns","mw","config","get","extendSearchParams","NearbyGateway","options","this","api","prototype","_distanceMessage","d","Math","ceil","msg","language","convertNumber","toFixed","getPages","range","exclude","_search","ggscoord","getPagesAroundPage","page","ggspage","params","requestParams","self","colimit","prop","generator","ggsradius","ggsnamespace","ggslimit","codistancefrompoint","codistancefrompage","ajax","then","resp","pages","query","map","i","p","parse","anchor","coordinates","dist","lat","lon","proximity","title","filter","sort","a","b","length","Api","nearbyErrorMessage","promisedView","router","loader","$nearby","$","WatchstarPageList","$infoContainer","nearbyGateway","render","view","hide","removeClass","empty","append","$el","show","nearbyPageList","errorType","on","getPath","route","pageTitle","Uri","decode","catch","checkRoute","navigateTo","path","MessageBox","nearbyErrors","permission","hasHeading","location","heading","http","incompatible","key","message","extend","className"],"mappings":"qNAAA,IAAIA,EACHC,EAAUC,EAAS,mCAA8BC,eACjDC,EAAOF,EAAS,gCAOjBF,EAAmB,CAQlBK,YAAa,WACZ,OAAOJ,EAAQK,uBAYhBC,mBAAoB,WACnB,IAAIC,EAASJ,EAAKK,WAkClB,OAjCKT,EAAiBK,cACrBK,UAAUC,YAAYJ,oBACrB,SAAWK,GACVJ,EAAOK,QAAS,CACfC,SAAUF,EAAIG,OAAOD,SACrBE,UAAWJ,EAAIG,OAAOC,eAGxB,SAAWC,GACV,IAAIC,EACJ,OAASD,EAAIE,MACZ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AO,CACNqB,QAAS5F,GAAGa,IAAK,oCACjB6E,YAAY,EACZ7E,IAAKb,GAAGa,IAAK,8CAEdgF,KAAM,CACLD,QAAS5F,GAAGa,IAAK,gCACjB6E,YAAY,EACZ7E,IAAKb,GAAGa,IAAK,0CAEdiF,aAAc,CACbF,QAAS5F,GAAGa,IAAK,uCACjB6E,YAAY,EACZ7E,IAAKb,GAAGa,IAAK,kDAShBjB,EAAOC,QAAU,SAA6BkG,GAC7C,IAAIC,EAAUR,EAAcO,IAASP,EAAaK,KAElD,OAAO,IAAIN,EACVjH,EAAK2H,OAAQ,CACZC,UAAW,YACTF,O","file":"mobile.special.nearby.scripts.js","sourcesContent":["var LocationProvider,\n\tbrowser = require( '../mobile.startup/Browser' ).getSingleton(),\n\tutil = require( '../mobile.startup/util' );\n\n/**\n * API for retrieving location from user device\n *\n * @class LocationProvider\n */\nLocationProvider = {\n\t/**\n\t * Detect if browser supports geolocation\n\t *\n\t * @memberof LocationProvider\n\t * @instance\n\t * @return {boolean}\n\t */\n\tisAvailable: function () {\n\t\treturn browser.supportsGeoLocation();\n\t},\n\n\t/**\n\t * Obtain users current location and return a deferred object with the\n\t * longitude and latitude values\n\t * Resolve return object with 'incompatible' if browser doesn't support geo location\n\t *\n\t * @memberof LocationProvider\n\t * @instance\n\t * @return {jQuery.Deferred}\n\t */\n\tgetCurrentPosition: function () {\n\t\tvar result = util.Deferred();\n\t\tif ( LocationProvider.isAvailable() ) {\n\t\t\tnavigator.geolocation.getCurrentPosition(\n\t\t\t\tfunction ( geo ) {\n\t\t\t\t\tresult.resolve( {\n\t\t\t\t\t\tlatitude: geo.coords.latitude,\n\t\t\t\t\t\tlongitude: geo.coords.longitude\n\t\t\t\t\t} );\n\t\t\t\t},\n\t\t\t\tfunction ( err ) {\n\t\t\t\t\tvar error;\n\t\t\t\t\tswitch ( err.code ) {\n\t\t\t\t\t\tcase err.PERMISSION_DENIED:\n\t\t\t\t\t\t\terror = 'permission';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase err.TIMEOUT:\n\t\t\t\t\t\t\terror = 'timeout';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase err.POSITION_UNAVAILABLE:\n\t\t\t\t\t\t\terror = 'location';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\terror = 'unknown';\n\t\t\t\t\t}\n\t\t\t\t\tresult.reject( error );\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttimeout: 10000,\n\t\t\t\t\tenableHighAccuracy: true\n\t\t\t\t}\n\t\t\t);\n\t\t} else {\n\t\t\tresult.reject( 'incompatible' );\n\t\t}\n\t\treturn result;\n\t}\n};\n\nmodule.exports = LocationProvider;\n","var limit = 50,\n\tpageJSONParser = require( '../mobile.startup/page/pageJSONParser' ),\n\tns = mw.config.get( 'wgContentNamespaces' ),\n\tutil = require( '../mobile.startup/util' ),\n\textendSearchParams = require( '../mobile.startup/extendSearchParams' );\n\n/**\n * API for retrieving nearby pages\n *\n * @class NearbyGateway\n * @param {Object} options Configuration options\n * @param {mw.Api} options.api\n */\nfunction NearbyGateway( options ) {\n\tthis.api = options.api;\n}\n\nNearbyGateway.prototype = {\n\t/**\n\t * Returns a human readable string stating the distance in meters or kilometers\n\t * depending on size.\n\t *\n\t * @memberof NearbyGateway\n\t * @instance\n\t * @private\n\t * @param {number} d The distance in meters.\n\t * @return {string} message stating how far the user is from the point of interest.\n\t */\n\t_distanceMessage: function ( d ) {\n\t\tif ( d < 1 ) {\n\t\t\td *= 100;\n\t\t\td = Math.ceil( d ) * 10;\n\t\t\tif ( d === 1000 ) {\n\t\t\t\td = 1;\n\t\t\t} else {\n\t\t\t\treturn mw.msg( 'mobile-frontend-nearby-distance-meters', mw.language.convertNumber( d ) );\n\t\t\t}\n\t\t} else {\n\t\t\tif ( d > 2 ) {\n\t\t\t\td *= 10;\n\t\t\t\td = Math.ceil( d ) / 10;\n\t\t\t\td = d.toFixed( 1 );\n\t\t\t} else {\n\t\t\t\td *= 100;\n\t\t\t\td = Math.ceil( d ) / 100;\n\t\t\t\td = d.toFixed( 2 );\n\t\t\t}\n\t\t}\n\t\treturn mw.msg( 'mobile-frontend-nearby-distance', mw.language.convertNumber( d ) );\n\t},\n\t/**\n\t * Returns a list of pages around a given point\n\t *\n\t * @memberof NearbyGateway\n\t * @instance\n\t * @param {Object} coords In form { latitude: 0, longitude: 2 }\n\t * @param {number} range Number of meters to perform a geosearch for\n\t * @param {string} exclude Name of a title to exclude from the list of results\n\t * @return {jQuery.Deferred} Object taking list of pages as argument\n\t */\n\tgetPages: function ( coords, range, exclude ) {\n\t\treturn this._search( {\n\t\t\tggscoord: [ coords.latitude, coords.longitude ]\n\t\t}, range, exclude );\n\t},\n\n\t/**\n\t * Gets the pages around a page. It excludes itself from the search\n\t *\n\t * @memberof NearbyGateway\n\t * @instance\n\t * @param {string} page Page title like \"W_San_Francisco\"\n\t * @param {number} range Number of meters to perform a geosearch for\n\t * @return {jQuery.Deferred} Object taking list of pages as argument\n\t */\n\tgetPagesAroundPage: function ( page, range ) {\n\t\treturn this._search( {\n\t\t\tggspage: page\n\t\t}, range, page );\n\t},\n\n\t/**\n\t * Searches for pages nearby\n\t *\n\t * @memberof NearbyGateway\n\t * @instance\n\t * @private\n\t * @param {Object} params Parameters to use for searching\n\t * @param {number} range Number of meters to perform a geosearch for\n\t * @param {string} [exclude] Name of a title to exclude from the list of results\n\t * @return {jQuery.Deferred} Object taking list of pages as argument\n\t */\n\t_search: function ( params, range, exclude ) {\n\t\tvar requestParams,\n\t\t\td = util.Deferred(),\n\t\t\tself = this;\n\n\t\trequestParams = extendSearchParams( 'nearby', {\n\t\t\tcolimit: 'max',\n\t\t\tprop: [ 'coordinates' ],\n\t\t\tgenerator: 'geosearch',\n\t\t\tggsradius: range,\n\t\t\tggsnamespace: ns,\n\t\t\tggslimit: limit\n\t\t}, params );\n\n\t\tif ( params.ggscoord ) {\n\t\t\trequestParams.codistancefrompoint = params.ggscoord;\n\t\t} else if ( params.ggspage ) {\n\t\t\trequestParams.codistancefrompage = params.ggspage;\n\t\t}\n\n\t\tthis.api.ajax( requestParams ).then( function ( resp ) {\n\t\t\tvar pages;\n\n\t\t\t// resp.query.pages is an Array<Page> instead of a map like in other\n\t\t\t// API requests\n\t\t\tif ( resp.query ) {\n\t\t\t\tpages = resp.query.pages || [];\n\t\t\t} else {\n\t\t\t\tpages = [];\n\t\t\t}\n\n\t\t\tpages = pages.map( function ( page, i ) {\n\t\t\t\tvar coords, p;\n\t\t\t\tp = pageJSONParser.parse( page );\n\t\t\t\tp.anchor = 'item_' + i;\n\n\t\t\t\t// protect against declined bug T49133\n\t\t\t\tif ( page.coordinates ) {\n\t\t\t\t\tcoords = page.coordinates[0];\n\t\t\t\t\t// FIXME: Make part of the Page object\n\t\t\t\t\tp.dist = coords.dist / 1000;\n\t\t\t\t\tp.latitude = coords.lat;\n\t\t\t\t\tp.longitude = coords.lon;\n\t\t\t\t\tp.proximity = self._distanceMessage( p.dist );\n\t\t\t\t} else {\n\t\t\t\t\tp.dist = 0;\n\t\t\t\t}\n\t\t\t\tif ( exclude !== page.title ) {\n\t\t\t\t\treturn p;\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} ).filter( function ( page ) { return !!page; } );\n\n\t\t\tpages.sort( function ( a, b ) {\n\t\t\t\treturn a.dist > b.dist ? 1 : -1;\n\t\t\t} );\n\t\t\tif ( pages.length === 0 ) {\n\t\t\t\td.reject( 'empty' );\n\t\t\t} else {\n\t\t\t\td.resolve( pages );\n\t\t\t}\n\t\t}, function ( error ) {\n\t\t\td.reject( error );\n\t\t} );\n\t\treturn d;\n\t}\n};\n\nmodule.exports = NearbyGateway;\n","/* global $ */\nvar\n\tapi = new mw.Api(),\n\tnearbyErrorMessage = require( './nearbyErrorMessage' ),\n\tLocationProvider = require( './LocationProvider' ),\n\trange = mw.config.get( 'wgMFNearbyRange' ) || 1000,\n\tpromisedView = require( './../mobile.startup/promisedView' ),\n\trouter = mw.loader.require( 'mediawiki.router' ),\n\t$nearby = $( '#mw-mf-nearby' ),\n\tWatchstarPageList = require( '../mobile.startup/watchstar/WatchstarPageList' ),\n\t$infoContainer = $( '#mf-nearby-info-holder' ),\n\tNearbyGateway = require( './NearbyGateway' ),\n\tnearbyGateway = new NearbyGateway( { api } );\n\n/**\n * Show the title and hide the info container\n */\nfunction hideInitialScreen() {\n\t$infoContainer.hide();\n\t$( 'body' ).removeClass( 'nearby-accept-pending' );\n}\n\n/**\n * @param {View} view to render\n * @param {jQuery.Object} $nearby where to render\n */\nfunction render( view, $nearby ) {\n\thideInitialScreen();\n\t$nearby.empty().append( view.$el ).show();\n}\n\nrouter.on( 'hashchange', function () {\n\tif ( router.getPath() === '' ) {\n\t\t$infoContainer.show();\n\t\t$nearby.hide();\n\t} else {\n\t\t$infoContainer.hide();\n\t\t$nearby.show();\n\t}\n} );\n\n/**\n * @param {number} latitude\n * @param {number} longitude\n * @return {View} that will resolve to a WatchstarPageList or the result of nearbyErrorMessage\n */\nfunction nearbyPageList( latitude, longitude ) {\n\tconst coordinates = {\n\t\tlatitude,\n\t\tlongitude\n\t};\n\treturn promisedView(\n\t\tnearbyGateway.getPages( coordinates, range ).then( function ( pages ) {\n\t\t\treturn new WatchstarPageList( {\n\t\t\t\tpages,\n\t\t\t\tapi\n\t\t\t} );\n\t\t}, function ( errorType ) {\n\t\t\treturn nearbyErrorMessage( errorType );\n\t\t} )\n\t);\n}\n/*\n * #/coords/lat,long\n */\nrouter.route( /^\\/coord\\/(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)/, function ( latitude, longitude ) {\n\trender( nearbyPageList( latitude, longitude ), $nearby );\n} );\n\n/*\n * #/page/PageTitle\n */\nrouter.route( /^\\/page\\/(.+)$/, function ( pageTitle ) {\n\tconst view = promisedView(\n\t\tnearbyGateway.getPagesAroundPage( mw.Uri.decode( pageTitle ), range )\n\t\t\t.then( function ( pages ) {\n\t\t\t\treturn new WatchstarPageList( {\n\t\t\t\t\tpages,\n\t\t\t\t\tapi\n\t\t\t\t} );\n\t\t\t} ).catch( function ( errorType ) {\n\t\t\t\treturn nearbyErrorMessage( errorType );\n\t\t\t} )\n\t);\n\trender( view, $nearby );\n} );\n\nrouter.checkRoute();\n$( function () {\n\t$( '#showArticles' ).prop( 'disabled', false ).on( 'click', function () {\n\t\tconst view = promisedView(\n\t\t\tLocationProvider.getCurrentPosition().then( function ( geo ) {\n\t\t\t\tconst { latitude, longitude } = geo;\n\t\t\t\trouter.navigateTo( null, { path: `#/coord/${latitude},${longitude}` } );\n\t\t\t\treturn nearbyPageList( latitude, longitude );\n\t\t\t} ).catch( function ( errorType ) {\n\t\t\t\treturn nearbyErrorMessage( errorType );\n\t\t\t} )\n\t\t);\n\t\trender( view, $nearby );\n\t} );\n} );\n","const util = require( '../mobile.startup/util' ),\n\tMessageBox = require( '../mobile.startup/MessageBox' ),\n\tnearbyErrors = {\n\t\tpermission: {\n\t\t\thasHeading: false,\n\t\t\tmsg: mw.msg( 'mobile-frontend-nearby-permission-denied' )\n\t\t},\n\t\tlocation: {\n\t\t\thasHeading: false,\n\t\t\tmsg: mw.msg( 'mobile-frontend-nearby-location-unavailable' )\n\t\t},\n\t\tempty: {\n\t\t\theading: mw.msg( 'mobile-frontend-nearby-noresults' ),\n\t\t\thasHeading: true,\n\t\t\tmsg: mw.msg( 'mobile-frontend-nearby-noresults-guidance' )\n\t\t},\n\t\thttp: {\n\t\t\theading: mw.msg( 'mobile-frontend-nearby-error' ),\n\t\t\thasHeading: true,\n\t\t\tmsg: mw.msg( 'mobile-frontend-nearby-error-guidance' )\n\t\t},\n\t\tincompatible: {\n\t\t\theading: mw.msg( 'mobile-frontend-nearby-requirements' ),\n\t\t\thasHeading: true,\n\t\t\tmsg: mw.msg( 'mobile-frontend-nearby-requirements-guidance' )\n\t\t}\n\t};\n\n/**\n * @param {string} key of the error that occurred.\n * @return {MessageBox} of a related error. If no match for error key, a generic HTTP error will\n * be displayed.\n */\nmodule.exports = function nearbyErrorMessage( key ) {\n\tvar message = nearbyErrors[ key ] || nearbyErrors.http;\n\n\treturn new MessageBox(\n\t\tutil.extend( {\n\t\t\tclassName: 'errorbox'\n\t\t}, message )\n\t);\n};\n"],"sourceRoot":""}