PageSourceSearch

https://priorise.fr/chunk-TADH742E.js

js priorise.fr collected 2026-10-04 17:12:14 UTC 2,464 bytes, 1 lines download raw bytes

1import{d as m}from"./chunk-YQADWLLS.js";import{j as s}from"./chunk-KUCED5OY.js";var g=class extends m{constructor(){if(super(),this.latestOrientation=null,typeof window<"u"){let i=window;"ondeviceorientationabsolute"in i?i.addEventListener("deviceorientationabsolute",t=>this.updateOrientation(t,!0),!0):"ondeviceorientation"in i&&i.addEventListener("deviceorientation",t=>this.updateOrientation(t,!1),!0)}}updateOrientation(i,t){let a=null,e=null,l=null;t&&i.alpha!==null?a=(360-i.alpha)%360:i.webkitCompassHeading!==void 0&&i.webkitCompassHeading!==null?(e=i.webkitCompassHeading,l=i.webkitCompassAccuracy):i.alpha!==null&&i.absolute===!0?a=(360-i.alpha)%360:i.alpha!==null&&(e=(360-i.alpha)%360),(a!==null||e!==null)&&(this.latestOrientation={trueHeading:a,magneticHeading:e,headingAccuracy:l})}augmentPosition(i,t=!1){var a,e,l,u,r,d,c;let o=i.coords,n=t?this.latestOrientation:null,h=(l=(e=(a=n?.trueHeading)!==null&&a!==void 0?a:n?.magneticHeading)!==null&&e!==void 0?e:t?o.heading:null)!==null&&l!==void 0?l:null;return{timestamp:i.timestamp,coords:{latitude:o.latitude,longitude:o.longitude,accuracy:o.accuracy,altitude:o.altitude,altitudeAccuracy:o.altitudeAccuracy,speed:o.speed,heading:h,magneticHeading:(u=n?.magneticHeading)!==null&&u!==void 0?u:null,trueHeading:(r=n?.trueHeading)!==null&&r!==void 0?r:null,headingAccuracy:(d=n?.headingAccuracy)!==null&&d!==void 0?d:null,course:(c=t?o.heading:null)!==null&&c!==void 0?c:null}}}getCurrentPosition(i){return s(this,null,function*(){return new Promise((t,a)=>{navigator.geolocation.getCurrentPosition(e=>{t(this.augmentPosition(e,!1))},e=>{a(e)},Object.assign({enableHighAccuracy:!1,timeout:1e4,maximumAge:0},i))})})}watchPosition(i,t){return s(this,null,function*(){return`${navigator.geolocation.watchPosition(e=>{t(this.augmentPosition(e,!0))},e=>{t(null,e)},Object.assign({enableHighAccuracy:!1,timeout:1e4,maximumAge:0,minimumUpdateInterval:5e3},i))}`})}clearWatch(i){return s(this,null,function*(){navigator.geolocation.clearWatch(parseInt(i.id,10))})}checkPermissions(){return s(this,null,function*(){if(typeof navigator>"u"||!navigator.permissions)throw this.unavailable("Permissions API not available in this browser");let i=yield navigator.permissions.query({name:"geolocation"});return{location:i.state,coarseLocation:i.state}})}requestPermissions(){return s(this,null,function*(){throw this.unimplemented("Not implemented on web.")})}},f=new g;export{f as Geolocation,g as GeolocationWeb};

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.