var fs=require("fs"),path=require("path"),fileURLToPath=require("file-uri-to-path"),join=path.join,dirname=path.dirname,exists=fs.accessSync&&function(e){try{fs.accessSync(e)}catch(e){return!1}return!0}||fs.existsSync||path.existsSync,defaults={arrow:process.env.NODE_BINDINGS_ARROW||" → ",compiled:process.env.NODE_BINDINGS_COMPILED_DIR||"compiled",platform:process.platform,arch:process.arch,nodePreGyp:"node-v"+process.versions.modules+"-"+process.platform+"-"+process.arch,version:process.versions.node,bindings:"bindings.node",try:[["module_root","build","bindings"],["module_root","build","Debug","bindings"],["module_root","build","Release","bindings"],["module_root","out","Debug","bindings"],["module_root","Debug","bindings"],["module_root","out","Release","bindings"],["module_root","Release","bindings"],["module_root","build","default","bindings"],["module_root","compiled","version","platform","arch","bindings"],["module_root","addon-build","release","install-root","bindings"],["module_root","addon-build","debug","install-root","bindings"],["module_root","addon-build","default","install-root","bindings"],["module_root","lib","binding","nodePreGyp","bindings"]]};function bindings(e){"string"==typeof e?e={bindings:e}:e||(e={}),Object.keys(defaults).map(function(o){o in e||(e[o]=defaults[o])}),e.module_root||(e.module_root=exports.getRoot(exports.getFileName())),".node"!=path.extname(e.bindings)&&(e.bindings+=".node");for(var o,r,n,i="function"==typeof __webpack_require__?__non_webpack_require__:require,t=[],s=0,a=e.try.length;s<a;s++){o=join.apply(null,e.try[s].map(function(o){return e[o]||o})),t.push(o);try{return r=e.path?i.resolve(o):i(o),e.path||(r.path=o),r}catch(e){if("MODULE_NOT_FOUND"!==e.code&&"QUALIFIED_PATH_RESOLUTION_FAILED"!==e.code&&!/not find/i.test(e.message))throw e}}throw(n=new Error("Could not locate the bindings file. Tried:\n"+t.map(function(o){return e.arrow+o}).join("\n"))).tries=t,n}module.exports=exports=bindings,exports.getFileName=function(e){var o,r=Error.prepareStackTrace,n=Error.stackTraceLimit;return Error.stackTraceLimit=10,Error.prepareStackTrace=function(r,n){for(var i=0,t=n.length;i<t;i++)if((o=n[i].getFileName())!==__filename){if(!e)return;if(o!==e)return}},Error.captureStackTrace({}),Error.prepareStackTrace=r,Error.stackTraceLimit=n,0===o.indexOf("file://")&&(o=fileURLToPath(o)),o},exports.getRoot=function(e){for(var o,r=dirname(e);;){if("."===r&&(r=process.cwd()),exists(join(r,"package.json"))||exists(join(r,"node_modules")))return r;if(o===r)throw new Error('Could not find module root given file: "'+e+'". Do you have a `package.json` file? ');o=r,r=join(r,"..")}};