-
Notifications
You must be signed in to change notification settings - Fork 3
/
aframe-colorwheel-component.js.map
1 lines (1 loc) · 85.1 KB
/
aframe-colorwheel-component.js.map
1
{"version":3,"sources":["webpack:///webpack/bootstrap 9434c4cca8cc3b33eb6f","webpack:///./index.js","webpack:///./~/copy-to-clipboard/index.js","webpack:///./~/copy-to-clipboard/~/toggle-selection/index.js","webpack:///./~/lodash.difference/index.js","webpack:///./src/utils.js"],"names":["Event","require","AFRAME","registerComponent","dependencies","tweenDuration","tweenEasing","TWEEN","Easing","Cubic","Out","padding","hsv","h","s","v","defaultMaterial","color","flatShading","transparent","shader","fog","side","schema","disabled","type","default","backgroundColor","wheelSize","showSelection","selectionSize","showHexValue","showSwatches","swatches","init","that","swatchReady","backgroundWidth","backgroundHeight","data","brightnessSliderHeight","brightnessSliderWidth","components","hasOwnProperty","background","document","createElement","setAttribute","x","y","z","el","appendChild","swatchContainer","addEventListener","onSwatchReady","bind","hexValueHeight","hexValueWidth","hexValueText","primitive","width","height","align","baseline","wrapCount","onHexValueClicked","colorWheel","brightnessSlider","selectionEl","colorCursorOptions","cursorRadius","cursorSegments","cursorColor","THREE","Color","cursorMaterial","MeshBasicMaterial","colorCursor","brightnessCursor","geometry","TorusBufferGeometry","setObject3D","Mesh","bindMethods","setTimeout","initColorWheel","initBrightnessSlider","refreshRaycaster","generateSwatches","onColorWheelClicked","onBrightnessSliderClicked","setPositionTween","item","fromPosition","toPosition","tween","Tween","to","onUpdate","position","easing","start","setColorTween","fromColor","toColor","r","g","b","evt","onHueDown","detail","intersection","point","onBrightnessDown","getAttribute","value","swatchData","undefined","containerWidth","containerHeight","swatchWidth","length","i","swatch","onSwatchClicked","updateColor","clearSwatches","firstChild","removeChild","raycasterEl","scenes","querySelector","raycaster","refreshObjects","vertexShader","fragmentShader","material","ShaderMaterial","uniforms","color1","color2","getObject3D","needsUpdate","brightness","rgb","hexToRgb","rgbToHsv","angle","Math","PI","radius","cos","sin","colorPosition","Vector3","localToWorld","offset","bY","brightnessPosition","updateMatrixWorld","worldToLocal","cursorOffset","updatedPosition","polarPosition","sqrt","theta","atan2","hsvToRgb","hex","getHexString","eventDetail","style","emit","body","replace","m","substring","match","map","parseInt","max","min","d","arguments","f","p","q","t","clamp","floor","round","update","oldData","swatchesChanged","filter","tick","remove","removeEventListener","children","forEach","child","pause","play","registerPrimitive","defaultComponents","colorwheel","mappings","backgroundcolor","showselection","wheelsize","selectionsize","showhexvalue","showswatches","module","exports","name","dispatchEvent","CustomEvent"],"mappings":";AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;;;;;;;;;;AC/BA;;;;AACA;;;;;;AARA;;;;;AAKA,KAAMA,QAAQ,mBAAAC,CAAQ,CAAR,CAAd;;AAKAC,QAAOC,iBAAP,CAAyB,YAAzB,EAAuC;AACrCC,iBAAc,CAAC,WAAD,CADuB;AAErCC,kBAAe,GAFsB;AAGrCC,gBAAaC,MAAMC,MAAN,CAAaC,KAAb,CAAmBC,GAHK;AAIrCC,YAAS,IAJ4B;AAKrCC,QAAK;AACHC,QAAG,GADA;AAEHC,QAAG,GAFA;AAGHC,QAAG;AAHA,IALgC;AAUrCC,oBAAiB;AACfC,YAAO,SADQ;AAEfC,kBAAa,IAFE;AAGfC,kBAAa,IAHE;AAIfC,aAAQ,MAJO;AAKfC,UAAK,KALU;AAMfC,WAAM;AANS,IAVoB;AAkBrCL,UAAO,SAlB8B;AAmBrCM,WAAQ;AACNC,eAAU;AACRC,aAAM,SADE;AAERC,gBAAS;AAFD,MADJ;AAKNC,sBAAiB;AACfF,aAAM,OADS;AAEfC,gBAAS;AAFM,MALX;AASN;AACAE,gBAAW;AACTH,aAAM,QADG;AAETC,gBAAS;AAFA,MAVL;AAcN;AACAG,oBAAe;AACbJ,aAAM,SADO;AAEbC,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,CAA0B,OAA1B,EAAmCnK,IAAnC,CAAT;AAAA,MAA1D;AAE3B,IAhoBoC;AAioBrCuK,UAAO,iBAAW,CAAE,CAjoBiB;AAkoBrCC,SAAM,gBAAW,CAAE;AAloBkB,EAAvC;;AAqoBAzM,QAAO0M,iBAAP,CAAyB,cAAzB,EAAyC;AACvCC,sBAAmB;AACjBC,iBAAY;AADK,IADoB;AAIvCC,aAAU;AACRvL,eAAU,qBADF;AAERwL,sBAAiB,4BAFT;AAGRC,oBAAe,0BAHP;AAIRC,gBAAW,sBAJH;AAKRC,oBAAe,0BALP;AAMRC,mBAAc,yBANN;AAORC,mBAAc,yBAPN;AAQRpL,eAAU;AARF;AAJ6B,EAAzC,E;;;;;;AC/oBA;;AAEA;;AAEA,4CAA2C,IAAI;;AAE/C;AACA;AACA,6BAA4B,UAAU;AACtC;;AAEA;AACA;AACA,kBAAiB,cAAc;AAC/B;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA,QAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;AC5EA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,kBAAiB,0BAA0B;AAC3C;AACA;;AAEA,0CAAyC;AACzC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,QAAO;AACP;;AAEA;AACA;AACA;AACA;;;;;;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,qCAAoC;;AAEpC;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,EAAE;AACb,YAAW,MAAM;AACjB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,EAAE;AACb,YAAW,SAAS;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,SAAS;AACpB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,MAAM;AACjB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB,YAAW,QAAQ;AACnB,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,EAAE;AACb,YAAW,OAAO;AAClB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,EAAE;AACb,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,MAAM;AACjB,YAAW,SAAS;AACpB,YAAW,SAAS;AACpB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,OAAO;AAClB,YAAW,QAAQ;AACnB,YAAW,QAAQ;AACnB,YAAW,MAAM;AACjB,cAAa,MAAM;AACnB;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAO;AACP;AACA;AACA,MAAK;AACL;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,YAAW,OAAO;AAClB,cAAa,SAAS;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,OAAO;AAClB,YAAW,OAAO;AAClB,cAAa,EAAE;AACf;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,cAAa,QAAQ;AACrB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,YAAW,SAAS;AACpB,cAAa,OAAO;AACpB;AACA;AACA;AACA;AACA;AACA,MAAK;AACL;AACA;AACA,MAAK;AACL;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,MAAM;AACjB,YAAW,SAAS;AACpB,cAAa,MAAM;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,kBAAiB;AACjB,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA,8BAA6B,kBAAkB,EAAE;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,iBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAW,EAAE;AACb,cAAa,QAAQ;AACrB;AACA;AACA,qBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;ACjpCAqL,QAAOC,OAAP,GAAiB;AACf1C,SAAM,cAAC1H,EAAD,EAAKqK,IAAL,EAAWjL,IAAX,EAAmB;AACvBY,QAAGsK,aAAH,CAAkB,IAAIC,WAAJ,CAAgBF,IAAhB,EAAsB,EAACzG,QAAQxE,IAAT,EAAtB,CAAlB;AACD;AAHc,EAAjB,C","file":"aframe-colorwheel-component.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 9434c4cca8cc3b33eb6f","/**\n * Colorwheel for A-FRAME Material\n * @author Mo Kargas (DEVLAD) [email protected]\n */\n\nconst Event = require('./src/utils')\n\nimport copy from 'copy-to-clipboard'\nimport difference from 'lodash.difference'\n\nAFRAME.registerComponent('colorwheel', {\n dependencies: ['raycaster'],\n tweenDuration: 280,\n tweenEasing: TWEEN.Easing.Cubic.Out,\n padding: 0.15,\n hsv: {\n h: 0.0,\n s: 0.0,\n v: 1.0\n },\n defaultMaterial: {\n color: '#ffffff',\n flatShading: true,\n transparent: true,\n shader: 'flat',\n fog: false,\n side: 'double'\n },\n color: '#ffffff',\n schema: {\n disabled: {\n type: 'boolean',\n default: false\n },\n backgroundColor: {\n type: 'color',\n default: '#FFF'\n },\n //Size of the colorWheel. NOTE: Assumed in metres.\n wheelSize: {\n type: 'number',\n default: 0.4\n },\n //Show color choice in an element\n showSelection: {\n type: 'boolean',\n default: true\n },\n selectionSize: {\n type: 'number',\n default: 0.10\n },\n showHexValue: {\n type: 'boolean',\n default: false\n },\n showSwatches: {\n type: 'boolean',\n default: false\n },\n swatches: {\n type: 'array',\n default: ['#000000', '#FFFFFF', '#ff0045', '#2aa8dc', '#ffed00', '#4c881d', '#b14bff']\n }\n },\n\n init: function() {\n const that = this,\n padding = this.padding,\n defaultMaterial = this.defaultMaterial\n\n this.swatchReady = false\n\n //Background color of this interface\n //TODO: Expose sizing for deeper customisation?\n this.backgroundWidth = this.backgroundHeight = this.data.wheelSize * 2\n this.brightnessSliderHeight = (this.data.wheelSize + padding) * 2\n this.brightnessSliderWidth = 0.10\n\n //Check if we have the a-rounded component\n if (AFRAME.components.hasOwnProperty('rounded')) {\n this.background = document.createElement('a-rounded')\n this.background.setAttribute('radius', 0.02)\n this.background.setAttribute('position', {\n x: -(this.data.wheelSize + padding),\n y: -(this.data.wheelSize + padding),\n z: -0.001\n })\n } else {\n this.background = document.createElement('a-plane')\n this.background.setAttribute('position', {\n x: 0,\n y: 0,\n z: -0.001\n })\n }\n this.background.setAttribute('width', this.backgroundWidth + 2 * padding)\n this.background.setAttribute('height', this.backgroundHeight + 2 * padding)\n this.background.setAttribute('material', 'shader', 'flat')\n this.background.setAttribute('side', 'double')\n this.el.appendChild(this.background)\n\n //Show Swatches\n this.swatchContainer = document.createElement('a-plane')\n this.swatchContainer.setAttribute('class', 'swatch-container')\n this.swatchContainer.setAttribute('material', this.defaultMaterial)\n this.swatchContainer.addEventListener('loaded', this.onSwatchReady.bind(this))\n\n //Give swatch panel a rakish angle\n this.swatchContainer.setAttribute('rotation', {\n x: -30,\n y: 0,\n z: 0\n })\n this.el.appendChild(this.swatchContainer)\n\n //Show hex value display\n if (this.data.showHexValue) {\n let hexValueHeight = 0.1,\n hexValueWidth = 2 * (this.data.wheelSize + padding)\n\n this.hexValueText = document.createElement('a-entity')\n\n //A basic geo is required for interactions\n this.hexValueText.setAttribute('geometry', {\n primitive: 'plane',\n width: hexValueWidth - this.brightnessSliderWidth,\n height: hexValueHeight\n })\n\n this.hexValueText.setAttribute('material', defaultMaterial)\n this.hexValueText.setAttribute('position', {\n x: -this.brightnessSliderWidth,\n y: this.data.wheelSize + hexValueHeight,\n z: 0.0\n })\n\n this.hexValueText.setAttribute('material', 'opacity', 0)\n this.hexValueText.setAttribute('text', {\n width: hexValueWidth,\n height: hexValueHeight,\n align: 'right',\n baseline: 'center',\n wrapCount: 20.4,\n color: '#666'\n })\n\n //Copy value to clipboard on click\n this.hexValueText.addEventListener('click', this.onHexValueClicked.bind(this))\n this.el.appendChild(this.hexValueText)\n }\n\n //Circle for colorwheel\n this.colorWheel = document.createElement('a-circle')\n this.colorWheel.setAttribute('radius', this.data.wheelSize)\n this.colorWheel.setAttribute('material', defaultMaterial)\n this.colorWheel.setAttribute('position', {\n x: 0,\n y: 0,\n z: 0.001\n })\n this.el.appendChild(this.colorWheel)\n\n //Plane for the brightness slider\n this.brightnessSlider = document.createElement('a-plane')\n this.brightnessSlider.setAttribute('width', this.brightnessSliderWidth)\n this.brightnessSlider.setAttribute('height', this.brightnessSliderHeight)\n this.brightnessSlider.setAttribute('material', defaultMaterial)\n this.brightnessSlider.setAttribute('position', {\n x: this.data.wheelSize + this.brightnessSliderWidth,\n y: 0,\n z: 0.001\n })\n this.el.appendChild(this.brightnessSlider)\n\n //Plane the color selection element will inhabit\n if (this.data.showSelection) {\n this.selectionEl = document.createElement('a-circle')\n this.selectionEl.setAttribute('radius', this.data.selectionSize)\n this.selectionEl.setAttribute('material', defaultMaterial)\n\n //Place in top left, lift slightly\n this.selectionEl.setAttribute('position', {\n x: -this.data.wheelSize,\n y: this.data.wheelSize,\n z: 0.001\n })\n this.el.appendChild(this.selectionEl)\n }\n\n //Color 'cursor'. We'll use this to indicate a rough color selection\n this.colorCursorOptions = {\n cursorRadius: 0.025,\n cursorSegments: 32,\n cursorColor: new THREE.Color(0x000000)\n }\n\n this.colorCursorOptions.cursorMaterial = new THREE.MeshBasicMaterial({\n color: this.colorCursorOptions.cursorColor,\n transparent: true\n });\n\n this.colorCursor = document.createElement('a-entity')\n this.brightnessCursor = document.createElement('a-entity')\n\n let geometry = new THREE.TorusBufferGeometry(this.colorCursorOptions.cursorRadius, this.colorCursorOptions.cursorRadius - 0.02, this.colorCursorOptions.cursorSegments, this.colorCursorOptions.cursorSegments / 4)\n this.colorCursor.setObject3D('mesh', new THREE.Mesh(geometry, this.colorCursorOptions.cursorMaterial))\n this.brightnessCursor.setObject3D('mesh', new THREE.Mesh(geometry, this.colorCursorOptions.cursorMaterial))\n\n this.el.appendChild(this.colorCursor)\n this.brightnessSlider.appendChild(this.brightnessCursor)\n this.brightnessCursor.setAttribute('position', {\n x: 0,\n y: this.brightnessSliderHeight / 2,\n z: 0\n })\n\n //Handlers\n this.bindMethods()\n\n //TODO: Replace setTimeout as it can be unreliable\n setTimeout(() => {\n that.el.initColorWheel()\n that.el.initBrightnessSlider()\n that.el.refreshRaycaster()\n if (that.data.showSwatches) that.el.generateSwatches(that.data.swatches)\n that.colorWheel.addEventListener('click', this.onColorWheelClicked.bind(this))\n that.brightnessSlider.addEventListener('click', this.onBrightnessSliderClicked.bind(this))\n }, 5)\n },\n //Util to animate between positions. Item represents a mesh or object containing a position\n setPositionTween: function(item, fromPosition, toPosition) {\n this.tween = new TWEEN.Tween(fromPosition).to(toPosition, this.tweenDuration).onUpdate(function() {\n item.position.x = this.x\n item.position.y = this.y\n item.position.z = this.z\n }).easing(this.tweenEasing).start()\n\n return this.tween\n },\n //Util to animate between colors. Item represents a mesh or object's material\n setColorTween: function(item, fromColor, toColor) {\n this.tween = new TWEEN.Tween(new THREE.Color(fromColor)).to(toColor, this.tweenDuration).onUpdate(function() {\n item.color.r = this.r\n item.color.g = this.g\n item.color.b = this.b\n }).easing(this.tweenEasing).start()\n\n return this.tween\n },\n onColorWheelClicked: function(evt) {\n if (this.data.disabled) return;\n this.el.onHueDown(evt.detail.intersection.point)\n },\n onBrightnessSliderClicked: function(evt) {\n if (this.data.disabled) return;\n this.el.onBrightnessDown(evt.detail.intersection.point)\n },\n onHexValueClicked: function() {\n copy(this.hexValueText.getAttribute('text').value)\n },\n generateSwatches: function(swatchData) {\n //Generate clickable swatch elements from a given array\n if (swatchData === undefined) return\n\n const containerWidth = (this.data.wheelSize + this.padding) * 2,\n containerHeight = 0.15,\n swatchWidth = containerWidth / swatchData.length\n\n this.swatchContainer.setAttribute('width', containerWidth)\n this.swatchContainer.setAttribute('height', containerHeight)\n this.swatchContainer.setAttribute('position', {\n x: 0,\n y: -this.backgroundHeight + containerHeight,\n z: 0.03\n })\n\n //Loop through swatches and create elements\n for (let i = 0; i < swatchData.length; i++) {\n const color = swatchData[i]\n let swatch = document.createElement('a-plane')\n\n swatch.setAttribute('material', this.defaultMaterial)\n swatch.setAttribute('width', swatchWidth)\n swatch.setAttribute('height', containerHeight)\n swatch.setAttribute('color', color)\n swatch.setAttribute('class', 'swatch')\n swatch.setAttribute('position', {\n x: -(containerWidth - swatchWidth) / 2 + i * swatchWidth,\n y: 0,\n z: 0.001 //prevent z-fighting\n })\n swatch.addEventListener('click', this.onSwatchClicked.bind(this, color))\n this.swatchContainer.appendChild(swatch)\n }\n this.el.refreshRaycaster()\n },\n bindMethods: function() {\n this.el.generateSwatches = this.generateSwatches.bind(this)\n this.el.initColorWheel = this.initColorWheel.bind(this)\n this.el.initBrightnessSlider = this.initBrightnessSlider.bind(this)\n this.el.updateColor = this.updateColor.bind(this)\n this.el.onHueDown = this.onHueDown.bind(this)\n this.el.onBrightnessDown = this.onBrightnessDown.bind(this)\n this.el.refreshRaycaster = this.refreshRaycaster.bind(this)\n this.el.clearSwatches = this.clearSwatches.bind(this)\n },\n onSwatchReady: function() {\n this.swatchReady = true\n },\n clearSwatches: function() {\n if (this.swatchReady) while (this.swatchContainer.firstChild) this.swatchContainer.removeChild(this.swatchContainer.firstChild)\n },\n refreshRaycaster: function() {\n const raycasterEl = AFRAME.scenes[0].querySelector('[raycaster]')\n raycasterEl.components.raycaster.refreshObjects()\n },\n initBrightnessSlider: function() {\n /*\n * NOTE:\n *\n * In A-Painter, the brightness slider is actually a model submesh / element.\n * Here we generate it using GLSL and add it to our plane material\n */\n\n const vertexShader = `\n varying vec2 vUv;\n void main(){\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n }\n `\n\n const fragmentShader = `\n uniform vec3 color1;\n uniform vec3 color2;\n varying vec2 vUv;\n\n void main(){\n vec4 c1 = vec4(color1, 1.0);\n \t vec4 c2 = vec4(color2, 1.0);\n\n vec4 color = mix(c2, c1, smoothstep(0.0, 1.0, vUv.y));\n gl_FragColor = color;\n }\n `\n\n let material = new THREE.ShaderMaterial({\n uniforms: {\n color1: {\n type: 'c',\n value: new THREE.Color(0xFFFFFF)\n },\n color2: {\n type: 'c',\n value: new THREE.Color(0x000000)\n }\n },\n vertexShader: vertexShader,\n fragmentShader: fragmentShader\n })\n\n this.brightnessSlider.getObject3D('mesh').material = material;\n this.brightnessSlider.getObject3D('mesh').material.needsUpdate = true;\n\n },\n initColorWheel: function() {\n const colorWheel = this.colorWheel.getObject3D('mesh')\n const vertexShader = `\n\n varying vec2 vUv;\n void main() {\n vUv = uv;\n vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);\n gl_Position = projectionMatrix * mvPosition;\n }\n `;\n\n const fragmentShader = `\n #define M_PI2 6.28318530718\n uniform float brightness;\n varying vec2 vUv;\n vec3 hsb2rgb(in vec3 c){\n vec3 rgb = clamp(abs(mod(c.x * 6.0 + vec3(0.0, 4.0, 2.0), 6.0) - 3.0) - 1.0, 0.0, 1.0 );\n rgb = rgb * rgb * (3.0 - 2.0 * rgb);\n return c.z * mix( vec3(1.0), rgb, c.y);\n }\n\n void main() {\n vec2 toCenter = vec2(0.5) - vUv;\n float angle = atan(toCenter.y, toCenter.x);\n float radius = length(toCenter) * 2.0;\n vec3 color = hsb2rgb(vec3((angle / M_PI2) + 0.5, radius, brightness));\n gl_FragColor = vec4(color, 1.0);\n }\n `;\n\n let material = new THREE.ShaderMaterial({\n uniforms: {\n brightness: {\n type: 'f',\n value: this.hsv.v\n }\n },\n vertexShader: vertexShader,\n fragmentShader: fragmentShader\n });\n\n colorWheel.material = material\n colorWheel.material.needsUpdate = true\n },\n onSwatchClicked: function(color) {\n const colorWheel = this.colorWheel.getObject3D('mesh'),\n brightnessCursor = this.brightnessCursor.getObject3D('mesh'),\n brightnessSlider = this.brightnessSlider.getObject3D('mesh')\n\n let rgb = this.hexToRgb(color)\n this.hsv = this.rgbToHsv(rgb.r, rgb.g, rgb.b)\n\n let angle = this.hsv.h * 2 * Math.PI,\n radius = this.hsv.s * this.data.wheelSize\n\n let x = radius * Math.cos(angle),\n y = radius * Math.sin(angle),\n z = colorWheel.position.z\n\n let colorPosition = new THREE.Vector3(x, y, z)\n colorWheel.localToWorld(colorPosition)\n //We can reuse hueDown for this\n this.onHueDown(colorPosition)\n\n //Need to do the reverse of onbrightnessdown\n let offset = this.hsv.v * this.brightnessSliderHeight\n let bY = offset - this.brightnessSliderHeight\n let brightnessPosition = new THREE.Vector3(0, bY, 0)\n this.setPositionTween(brightnessCursor, brightnessCursor.position, brightnessPosition)\n colorWheel.material.uniforms['brightness'].value = this.hsv.v\n\n },\n onBrightnessDown: function(position) {\n const brightnessSlider = this.brightnessSlider.getObject3D('mesh'),\n brightnessCursor = this.brightnessCursor.getObject3D('mesh'),\n colorWheel = this.colorWheel.getObject3D('mesh')\n\n brightnessSlider.updateMatrixWorld()\n brightnessSlider.worldToLocal(position)\n\n //Brightness is a value between 0 and 1. The parent plane is centre registered, hence offset\n let cursorOffset = position.y + this.brightnessSliderHeight / 2\n let brightness = cursorOffset / this.brightnessSliderHeight\n let updatedPosition = {\n x: 0,\n y: position.y - this.brightnessSliderHeight / 2,\n z: 0\n }\n\n //Set brightness cursor position to offset position\n // Uncomment to remove anims: brightnessCursor.position.copy(updatedPosition)\n this.setPositionTween(brightnessCursor, brightnessCursor.position, updatedPosition)\n\n //Update material brightness\n colorWheel.material.uniforms['brightness'].value = brightness\n this.hsv.v = brightness\n this.el.updateColor()\n },\n onHueDown: function(position) {\n const colorWheel = this.colorWheel.getObject3D('mesh'),\n colorCursor = this.colorCursor.getObject3D('mesh'),\n radius = this.data.wheelSize\n\n colorWheel.updateMatrixWorld()\n colorWheel.worldToLocal(position)\n\n // Uncomment to remove anims: this.colorCursor.getObject3D('mesh').position.copy(position)\n this.setPositionTween(colorCursor, colorCursor.position, position)\n\n //Determine Hue and Saturation value from polar co-ordinates\n let polarPosition = {\n r: Math.sqrt(position.x * position.x + position.y * position.y),\n theta: Math.PI + Math.atan2(position.y, position.x)\n }\n\n let angle = ((polarPosition.theta * (180 / Math.PI)) + 180) % 360\n this.hsv.h = angle / 360\n this.hsv.s = polarPosition.r / radius\n\n this.el.updateColor()\n },\n\n updateColor: function() {\n\n let rgb = this.hsvToRgb(this.hsv),\n color = `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`,\n hex = `#${new THREE.Color( color ).getHexString()}`\n\n const selectionEl = this.selectionEl.getObject3D('mesh'),\n colorCursor = this.colorCursor.getObject3D('mesh'),\n brightnessCursor = this.brightnessCursor.getObject3D('mesh')\n\n //Update indicator element of selected color\n if (this.data.showSelection) {\n //Uncomment for no tweens: selectionEl.material.color.set(color)\n this.setColorTween(selectionEl.material, selectionEl.material.color, new THREE.Color(color))\n selectionEl.material.needsUpdate = true\n }\n\n //Change cursor colors based on brightness\n if (this.hsv.v >= 0.5) {\n this.setColorTween(colorCursor.material, colorCursor.material.color, new THREE.Color(0x000000))\n this.setColorTween(brightnessCursor.material, brightnessCursor.material.color, new THREE.Color(0x000000))\n } else {\n this.setColorTween(colorCursor.material, colorCursor.material.color, new THREE.Color(0xFFFFFF))\n this.setColorTween(brightnessCursor.material, brightnessCursor.material.color, new THREE.Color(0xFFFFFF))\n }\n\n //showHexValue set to true, update text\n if (this.data.showHexValue) this.hexValueText.setAttribute('text', 'value', hex)\n\n //Notify listeners the color has changed.\n let eventDetail = {\n style: color,\n rgb: rgb,\n hsv: this.hsv,\n hex: hex\n };\n\n Event.emit(this.el, 'changecolor', eventDetail)\n Event.emit(document.body, 'didchangecolor', eventDetail)\n\n },\n hexToRgb: function(hex) {\n let rgb = hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, (m, r, g, b) => '#' + r + r + g + g + b + b)\n .substring(1).match(/.{2}/g)\n .map(x => parseInt(x, 16))\n\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2]\n }\n },\n rgbToHsv: function(r, g, b) {\n var max = Math.max(r, g, b);\n var min = Math.min(r, g, b);\n var d = max - min;\n var h;\n var s = (max === 0 ? 0 : d / max);\n var v = max;\n\n if (arguments.length === 1) {\n g = r.g;\n b = r.b;\n r = r.r;\n }\n\n switch (max) {\n case min:\n h = 0;\n break;\n case r:\n h = (g - b) + d * (g < b ? 6 : 0);\n h /= 6 * d;\n break;\n case g:\n h = (b - r) + d * 2;\n h /= 6 * d;\n break;\n case b:\n h = (r - g) + d * 4;\n h /= 6 * d;\n break;\n }\n return {\n h: h,\n s: s,\n v: v / 255\n };\n },\n hsvToRgb: function(hsv) {\n var r, g, b, i, f, p, q, t;\n var h = THREE.Math.clamp(hsv.h, 0, 1);\n var s = THREE.Math.clamp(hsv.s, 0, 1);\n var v = hsv.v;\n\n i = Math.floor(h * 6);\n f = h * 6 - i;\n p = v * (1 - s);\n q = v * (1 - f * s);\n t = v * (1 - (1 - f) * s);\n switch (i % 6) {\n case 0:\n r = v;\n g = t;\n b = p;\n break;\n case 1:\n r = q;\n g = v;\n b = p;\n break;\n case 2:\n r = p;\n g = v;\n b = t;\n break;\n case 3:\n r = p;\n g = q;\n b = v;\n break;\n case 4:\n r = t;\n g = p;\n b = v;\n break;\n case 5:\n r = v;\n g = p;\n b = q;\n break;\n }\n return {\n r: Math.round(r * 255),\n g: Math.round(g * 255),\n b: Math.round(b * 255)\n };\n },\n update: function(oldData) {\n if (!oldData) return\n if (this.data.backgroundColor !== oldData.backgroundColor) this.background.setAttribute('color', this.data.backgroundColor)\n\n let swatchesChanged = difference(oldData.swatches, this.data.swatches).length > 0\n if (swatchesChanged && this.data.showSwatches && this.data.swatches.filter(item => item.length === 7).length === this.data.swatches.length) {\n if (this.swatchReady) {\n this.el.clearSwatches()\n this.el.generateSwatches(this.data.swatches)\n }\n }\n },\n tick: function() {},\n remove: function() {\n const that = this\n //Kill any listeners\n this.colorWheel.removeEventListener('click', this.onColorWheelClicked)\n this.brightnessSlider.removeEventListener('click', this.onBrightnessSliderClicked)\n this.swatchContainer.removeEventListener('loaded', this.onSwatchReady)\n this.hexValueText.removeEventListener('click', this.onHexValueClicked)\n\n if (this.swatchContainer) this.swatchContainer.getObject3D('mesh').children.forEach(child => child.removeEventListener('click', that))\n\n },\n pause: function() {},\n play: function() {}\n});\n\nAFRAME.registerPrimitive('a-colorwheel', {\n defaultComponents: {\n colorwheel: {}\n },\n mappings: {\n disabled: 'colorwheel.disabled',\n backgroundcolor: 'colorwheel.backgroundColor',\n showselection: 'colorwheel.showSelection',\n wheelsize: 'colorwheel.wheelSize',\n selectionsize: 'colorwheel.selectionSize',\n showhexvalue: 'colorwheel.showHexValue',\n showswatches: 'colorwheel.showSwatches',\n swatches: 'colorwheel.swatches'\n }\n});\n\n\n\n// WEBPACK FOOTER //\n// ./index.js","'use strict';\n\nvar deselectCurrent = require('toggle-selection');\n\nvar defaultMessage = 'Copy to clipboard: #{key}, Enter';\n\nfunction format(message) {\n var copyKey = (/mac os x/i.test(navigator.userAgent) ? '⌘' : 'Ctrl') + '+C';\n return message.replace(/#{\\s*key\\s*}/g, copyKey);\n}\n\nfunction copy(text, options) {\n var debug, message, reselectPrevious, range, selection, mark, success = false;\n if (!options) { options = {}; }\n debug = options.debug || false;\n try {\n reselectPrevious = deselectCurrent();\n\n range = document.createRange();\n selection = document.getSelection();\n\n mark = document.createElement('span');\n mark.textContent = text;\n // reset user styles for span element\n mark.style.all = 'unset';\n // prevents scrolling to the end of the page\n mark.style.position = 'fixed';\n mark.style.top = 0;\n mark.style.clip = 'rect(0, 0, 0, 0)';\n // used to preserve spaces and line breaks\n mark.style.whiteSpace = 'pre';\n // do not inherit user-select (it may be `none`)\n mark.style.webkitUserSelect = 'text';\n mark.style.MozUserSelect = 'text';\n mark.style.msUserSelect = 'text';\n mark.style.userSelect = 'text';\n\n document.body.appendChild(mark);\n\n range.selectNode(mark);\n selection.addRange(range);\n\n var successful = document.execCommand('copy');\n if (!successful) {\n throw new Error('copy command was unsuccessful');\n }\n success = true;\n } catch (err) {\n debug && console.error('unable to copy using execCommand: ', err);\n debug && console.warn('trying IE specific stuff');\n try {\n window.clipboardData.setData('text', text);\n success = true;\n } catch (err) {\n debug && console.error('unable to copy using clipboardData: ', err);\n debug && console.error('falling back to prompt');\n message = format('message' in options ? options.message : defaultMessage);\n window.prompt(message, text);\n }\n } finally {\n if (selection) {\n if (typeof selection.removeRange == 'function') {\n selection.removeRange(range);\n } else {\n selection.removeAllRanges();\n }\n }\n\n if (mark) {\n document.body.removeChild(mark);\n }\n reselectPrevious();\n }\n\n return success;\n}\n\nmodule.exports = copy;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/copy-to-clipboard/index.js\n// module id = 2\n// module chunks = 0","\nmodule.exports = function () {\n var selection = document.getSelection();\n if (!selection.rangeCount) {\n return function () {};\n }\n var active = document.activeElement;\n\n var ranges = [];\n for (var i = 0; i < selection.rangeCount; i++) {\n ranges.push(selection.getRangeAt(i));\n }\n\n switch (active.tagName.toUpperCase()) { // .toUpperCase handles XHTML\n case 'INPUT':\n case 'TEXTAREA':\n active.blur();\n break;\n\n default:\n active = null;\n break;\n }\n\n selection.removeAllRanges();\n return function () {\n selection.type === 'Caret' &&\n selection.removeAllRanges();\n\n if (!selection.rangeCount) {\n ranges.forEach(function(range) {\n selection.addRange(range);\n });\n }\n\n active &&\n active.focus();\n };\n};\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/copy-to-clipboard/~/toggle-selection/index.js\n// module id = 3\n// module chunks = 0","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array ? array.length : 0;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\n/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array ? array.length : 0;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\n/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array ? array.length : 0,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\n/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\n/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n if (value !== value) {\n return baseFindIndex(array, baseIsNaN, fromIndex);\n }\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Checks if a cache value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values ? values.length : 0;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\n/**\n * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of methods like `_.difference` without support\n * for excluding multiple arrays or iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Array} values The values to exclude.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new array of filtered values.\n */\nfunction baseDifference(array, values, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n isCommon = true,\n length = array.length,\n result = [],\n valuesLength = values.length;\n\n if (!length) {\n return result;\n }\n if (iteratee) {\n values = arrayMap(values, baseUnary(iteratee));\n }\n if (comparator) {\n includes = arrayIncludesWith;\n isCommon = false;\n }\n else if (values.length >= LARGE_ARRAY_SIZE) {\n includes = cacheHas;\n isCommon = false;\n values = new SetCache(values);\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var valuesIndex = valuesLength;\n while (valuesIndex--) {\n if (values[valuesIndex] === computed) {\n continue outer;\n }\n }\n result.push(value);\n }\n else if (!includes(values, computed, comparator)) {\n result.push(value);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates an array of `array` values not included in the other given arrays\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons. The order of result values is determined by the\n * order they occur in the first array.\n *\n * **Note:** Unlike `_.pullAll`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...Array} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.without, _.xor\n * @example\n *\n * _.difference([2, 1], [2, 3]);\n * // => [1]\n */\nvar difference = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))\n : [];\n});\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nfunction isArguments(value) {\n // Safari 8.1 makes `arguments.callee` enumerable in strict mode.\n return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&\n (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\nmodule.exports = difference;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./~/lodash.difference/index.js\n// module id = 4\n// module chunks = 0","module.exports = {\n emit: (el, name, data)=> {\n el.dispatchEvent( new CustomEvent(name, {detail: data}) );\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/utils.js"],"sourceRoot":""}