-
Notifications
You must be signed in to change notification settings - Fork 0
/
0e98a5a89c221a3c7a572572cf006ba2c475aed4-b5caaabd5347f4056d26.js.map
1 lines (1 loc) · 121 KB
/
0e98a5a89c221a3c7a572572cf006ba2c475aed4-b5caaabd5347f4056d26.js.map
1
{"version":3,"sources":["webpack:///./node_modules/core-js/internals/to-indexed-object.js","webpack:///./node_modules/core-js/internals/use-symbol-as-uid.js","webpack:///./node_modules/core-js/internals/hidden-keys.js","webpack:///./node_modules/core-js/internals/fails.js","webpack:///./node_modules/core-js/internals/get-built-in.js","webpack:///./node_modules/core-js/internals/object-property-is-enumerable.js","webpack:///./node_modules/core-js/internals/global.js","webpack:///./node_modules/core-js/internals/object-keys.js","webpack:///./node_modules/core-js/internals/copy-constructor-properties.js","webpack:///./node_modules/core-js/internals/is-array.js","webpack:///./node_modules/core-js/internals/shared-key.js","webpack:///./node_modules/core-js/internals/function-bind-context.js","webpack:///./node_modules/core-js/modules/es.array.flat.js","webpack:///./node_modules/core-js/internals/object-get-own-property-descriptor.js","webpack:///./node_modules/core-js/internals/ie8-dom-define.js","webpack:///./node_modules/core-js/internals/html.js","webpack:///./node_modules/core-js/internals/a-function.js","webpack:///./node_modules/core-js/internals/require-object-coercible.js","webpack:///./src/components/scp.module.css","webpack:///./node_modules/core-js/internals/export.js","webpack:///./node_modules/core-js/internals/to-absolute-index.js","webpack:///./node_modules/core-js/internals/object-get-own-property-names.js","webpack:///./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack:///./src/scp/quadtree_template/class.js","webpack:///./src/scp/quadtree_template/index.js","webpack:///./src/components/scp.js","webpack:///./node_modules/core-js/internals/object-define-properties.js","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat.js","webpack:///./node_modules/core-js/internals/path.js","webpack:///./node_modules/core-js/internals/indexed-object.js","webpack:///./node_modules/core-js/internals/add-to-unscopables.js","webpack:///./src/scp/gif_creator/class.js","webpack:///./src/scp/gif_creator/index.js","webpack:///./node_modules/core-js/internals/native-symbol.js","webpack:///./node_modules/core-js/internals/array-includes.js","webpack:///./node_modules/core-js/internals/to-length.js","webpack:///./node_modules/core-js/internals/has.js","webpack:///./src/scp/quadtree/class.js","webpack:///./src/scp/quadtree/index.js","webpack:///./node_modules/core-js/internals/shared.js","webpack:///./node_modules/core-js/internals/own-keys.js","webpack:///./node_modules/core-js/internals/create-property-descriptor.js","webpack:///./node_modules/core-js/internals/array-species-create.js","webpack:///./node_modules/core-js/internals/internal-state.js","webpack:///./node_modules/core-js/internals/redefine.js","webpack:///./node_modules/core-js/internals/object-get-own-property-symbols.js","webpack:///./src/scp/bresenham/index.js","webpack:///./node_modules/core-js/internals/enum-bug-keys.js","webpack:///./node_modules/core-js/internals/to-object.js","webpack:///./node_modules/core-js/internals/native-weak-map.js","webpack:///./node_modules/core-js/internals/object-create.js","webpack:///./node_modules/core-js/internals/descriptors.js","webpack:///./node_modules/core-js/internals/an-object.js","webpack:///./node_modules/core-js/internals/is-object.js","webpack:///./node_modules/core-js/internals/inspect-source.js","webpack:///./node_modules/core-js/internals/uid.js","webpack:///./node_modules/core-js/internals/create-non-enumerable-property.js","webpack:///./node_modules/core-js/internals/is-forced.js","webpack:///./node_modules/core-js/internals/object-define-property.js","webpack:///./node_modules/core-js/internals/flatten-into-array.js","webpack:///./node_modules/core-js/internals/to-integer.js","webpack:///./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack:///./src/scp/utils.js","webpack:///./node_modules/core-js/internals/well-known-symbol.js","webpack:///./node_modules/core-js/internals/to-primitive.js","webpack:///./node_modules/core-js/internals/is-pure.js","webpack:///./node_modules/core-js/internals/classof-raw.js","webpack:///./node_modules/core-js/internals/shared-store.js","webpack:///./node_modules/core-js/internals/object-keys-internal.js","webpack:///./node_modules/core-js/internals/document-create-element.js","webpack:///./node_modules/core-js/internals/set-global.js"],"names":["IndexedObject","requireObjectCoercible","module","exports","it","NATIVE_SYMBOL","Symbol","sham","iterator","exec","error","path","global","aFunction","variable","undefined","namespace","method","arguments","length","nativePropertyIsEnumerable","propertyIsEnumerable","getOwnPropertyDescriptor","Object","NASHORN_BUG","call","1","f","V","descriptor","this","enumerable","Math","check","globalThis","window","self","Function","internalObjectKeys","enumBugKeys","keys","O","has","ownKeys","getOwnPropertyDescriptorModule","definePropertyModule","target","source","defineProperty","i","key","classof","Array","isArray","arg","shared","uid","fn","that","a","b","c","apply","$","flattenIntoArray","toObject","toLength","toInteger","arraySpeciesCreate","proto","flat","depthArg","sourceLen","A","DESCRIPTORS","propertyIsEnumerableModule","createPropertyDescriptor","toIndexedObject","toPrimitive","IE8_DOM_DEFINE","nativeGetOwnPropertyDescriptor","P","fails","createElement","get","getBuiltIn","TypeError","String","createNonEnumerableProperty","redefine","setGlobal","copyConstructorProperties","isForced","options","targetProperty","sourceProperty","TARGET","GLOBAL","STATIC","stat","prototype","noTargetGet","value","forced","max","min","index","integer","hiddenKeys","concat","getOwnPropertyNames","_assertThisInitialized","ReferenceError","Quadtree","boundary","approximateResolution","northeast","northwest","southeast","southwest","references","divided","averageLength","width","height","maxDeph","round","log2","smallestBoundary","Rect","resolution","insertPolygon","object","vertices","push","insertPointSequence","point1","point2","pointNearFirstLine","Point","x","y","maxX","map","v","rect","numberOfEdgesCrossing","queryLeaves","filter","qTree","arr","nextTree","fillEmptyArea","point","direction","find","ref","left","right","top","bottom","insert","pointA","pointB","bresenham","forEach","contains","includes","subdivide","ne","nw","se","sw","foundedLeaves","intersects","query","reference","indexOf","show","ctx","isMeshShowed","drawAreaX","drawAreaY","drawArea","points","strokeStyle","lineWidth","strokeRect","fillStyle","fillRect","clear","splice","resolutionX","resolutionY","xA","yA","xB","yB","coordinates","minRes","x1","floorToDivisible","y1","x2","y2","deltaX","abs","deltaY","stepX","stepY","err","doubledErr","number","divider","floor","title","en","pl","description","Component","mouse","downX","downY","pressed","rectSideLength","objects","langKey","props","handleRef","canvas","parentElement","clientWidth","clientHeight","getContext","createQTree","handlePointerMove","e","nativeEvent","layerX","layerY","beginPath","moveTo","lineTo","stroke","handlePointerDown","arc","PI","handlePointerUp","pointUp","pointDown","equal","obj","type","startPoint","endPoint","handleChangeWidth","handleToggleMesh","checked","clearRect","reset","render","className","uiClass","onClick","defaultValue","onChange","defaultChecked","canvasClass","onPointerMove","onPointerDown","onPointerUp","React","scpPackage","name","scp","styles","wrapper","item","neumorphizmTransformFix","link","to","anObject","objectKeys","defineProperties","Properties","addToUnscopables","split","wellKnownSymbol","create","UNSCOPABLES","ArrayPrototype","configurable","Gif","colorsDefinitions","imageData","colorsAliases","globalColorDefinitions","get2ByteCode","toString","globalColorTableFlag","colorResolution","sortColorsFlag","sizeOfGlobalColorTable","backgroundColorIndex","get1ByteCode","pixelAspectRatio","delay","bufferData","parseInt","getNumberInRadix","toUpperCase","alias","data","addFrame","replace","realGlobalColorTableSize","flattedImage","codeTable","codeStream","sequence","code","founded","k","nextSequence","slice","join","byteCode","reduce","padStart","hexCode","temp","byte","getSrc","charCodes","btoa","fromCharCode","getImgTag","img","document","src","radix","gif","w","r","style","textAlign","alt","imageRendering","fontSize","fontFamily","whiteSpace","letterSpacing","getOwnPropertySymbols","toAbsoluteIndex","createMethod","IS_INCLUDES","$this","el","fromIndex","argument","hasOwnProperty","pointsOnlyInLeaves","capacity","startX","startY","foundedPoints","queryRect","state","canLeavesStorePoints","draw","newPoint","testingRect","handleLeavesModeChange","setState","old","generate","amount","random","fill","IS_PURE","store","version","mode","copyright","getOwnPropertyNamesModule","getOwnPropertySymbolsModule","bitmap","writable","isObject","SPECIES","originalArray","C","constructor","set","NATIVE_WEAK_MAP","objectHas","sharedKey","WeakMap","wmget","wmhas","wmset","metadata","STATE","enforce","getterFor","TYPE","inspectSource","InternalStateModule","getInternalState","enforceInternalState","TEMPLATE","unsafe","simple","lines","color","test","activeXDocument","html","documentCreateElement","IE_PROTO","EmptyConstructor","scriptTag","content","LT","NullProtoObject","domain","ActiveXObject","iframeDocument","iframe","write","close","parentWindow","NullProtoObjectViaActiveX","display","appendChild","contentWindow","open","F","result","functionToString","id","postfix","replacement","feature","detection","normalize","POLYFILL","NATIVE","string","toLowerCase","nativeDefineProperty","Attributes","bind","original","start","depth","mapper","thisArg","element","targetIndex","sourceIndex","mapFn","ceil","isNaN","_defineProperties","Constructor","protoProps","staticProps","distanceTo","sqrt","alwaysInteger","USE_SYMBOL_AS_UID","WellKnownSymbolsStore","createWellKnownSymbol","withoutSetter","input","PREFERRED_STRING","val","valueOf","names","EXISTS"],"mappings":"gFACA,IAAIA,EAAgB,EAAQ,QACxBC,EAAyB,EAAQ,QAErCC,EAAOC,QAAU,SAAUC,GACzB,OAAOJ,EAAcC,EAAuBG,M,uBCL9C,IAAIC,EAAgB,EAAQ,QAE5BH,EAAOC,QAAUE,IAEXC,OAAOC,MAEkB,iBAAnBD,OAAOE,U,qBCNnBN,EAAOC,QAAU,I,qBCAjBD,EAAOC,QAAU,SAAUM,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,K,uBCJX,IAAIC,EAAO,EAAQ,QACfC,EAAS,EAAQ,QAEjBC,EAAY,SAAUC,GACxB,MAA0B,mBAAZA,EAAyBA,OAAWC,GAGpDb,EAAOC,QAAU,SAAUa,EAAWC,GACpC,OAAOC,UAAUC,OAAS,EAAIN,EAAUF,EAAKK,KAAeH,EAAUD,EAAOI,IACzEL,EAAKK,IAAcL,EAAKK,GAAWC,IAAWL,EAAOI,IAAcJ,EAAOI,GAAWC,K,oCCR3F,IAAIG,EAA6B,GAAGC,qBAChCC,EAA2BC,OAAOD,yBAGlCE,EAAcF,IAA6BF,EAA2BK,KAAK,CAAEC,EAAG,GAAK,GAIzFvB,EAAQwB,EAAIH,EAAc,SAA8BI,GACtD,IAAIC,EAAaP,EAAyBQ,KAAMF,GAChD,QAASC,GAAcA,EAAWE,YAChCX,G,wBCZJ,8BACE,OAAOhB,GAAMA,EAAG4B,MAAQA,MAAQ5B,GAIlCF,EAAOC,QAEL8B,EAA2B,iBAAdC,YAA0BA,aACvCD,EAAuB,iBAAVE,QAAsBA,SACnCF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,SAC7CgI,EAAQqQ,EAAQpY,IAAQoY,EAAOhT,KAAKpF,IAEvC,OAAOoY,I,qBCfT,IAAI1a,EAAS,EAAQ,QACjBwX,EAAW,EAAQ,QAEnBlD,EAAWtU,EAAOsU,SAElB8I,EAAS5F,EAASlD,IAAakD,EAASlD,EAAS/P,eAErDjF,EAAOC,QAAU,SAAUC,GACzB,OAAO4d,EAAS9I,EAAS/P,cAAc/E,GAAM,K,qBCR/C,IAAIQ,EAAS,EAAQ,QACjB4E,EAA8B,EAAQ,QAE1CtF,EAAOC,QAAU,SAAU+C,EAAKoD,GAC9B,IACEd,EAA4B5E,EAAQsC,EAAKoD,GACzC,MAAO5F,GACPE,EAAOsC,GAAOoD,EACd,OAAOA","file":"0e98a5a89c221a3c7a572572cf006ba2c475aed4-b5caaabd5347f4056d26.js","sourcesContent":["// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n","var NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n // eslint-disable-next-line no-undef\n && !Symbol.sham\n // eslint-disable-next-line no-undef\n && typeof Symbol.iterator == 'symbol';\n","module.exports = {};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n","var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n","'use strict';\nvar nativePropertyIsEnumerable = {}.propertyIsEnumerable;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : nativePropertyIsEnumerable;\n","var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line no-undef\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func\n Function('return this')();\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.github.io/ecma262/#sec-object.keys\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n","var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n","var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.github.io/ecma262/#sec-isarray\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n","var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n","var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar toInteger = require('../internals/to-integer');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://github.com/tc39/proposal-flatMap\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = toLength(O.length);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));\n return A;\n }\n});\n","var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\nvar nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return nativeGetOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n","var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n","module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n","// `RequireObjectCoercible` abstract operation\n// https://tc39.github.io/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"wrapper\":\"scp-module--wrapper--15NyO\",\"item\":\"scp-module--item--3-s1a\",\"neumorphizmTransformFix\":\"scp-module--neumorphizmTransformFix--2-AGR\",\"title\":\"scp-module--title--3KU6r\",\"link\":\"scp-module--link--QME_3\",\"thumbnail\":\"scp-module--thumbnail--1F1Hn\"};","var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n","var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n","var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.github.io/ecma262/#sec-object.getownpropertynames\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import { Point, Rect } from \"../utils.js\"\r\n\r\nexport default class Quadtree {\r\n /** @type {Quadtree} */\r\n northeast = null\r\n /** @type {Quadtree} */\r\n northwest = null\r\n /** @type {Quadtree} */\r\n southeast = null\r\n /** @type {Quadtree} */\r\n southwest = null\r\n\r\n references = []\r\n divided = false\r\n\r\n /**\r\n * @param {Rect} boundary\r\n * @param {number} resolution\r\n */\r\n constructor( boundary, approximateResolution=2 ) {\r\n this.boundary = boundary\r\n this.averageLength = (boundary.width + boundary.height) / 2\r\n this.maxDeph = Math.round( Math.log2( this.averageLength / approximateResolution ) )\r\n this.smallestBoundary = new Rect( 0, 0, boundary.width / (2 ** this.maxDeph), boundary.height / (2 ** this.maxDeph) )\r\n this.resolution = approximateResolution//(boundary.width > boundary.height ? boundary.width : boundary.height) / (2 ** this.maxDeph)\r\n }\r\n\r\n /**\r\n * @param {Point[]} vertices\r\n */\r\n insertPolygon( object, ...vertices ) {\r\n if (vertices.length < 3) return\r\n\r\n vertices.push( vertices[ 0 ] )\r\n\r\n this.insertPointSequence( object, ...vertices )\r\n\r\n const point1 = vertices[ 0 ]\r\n const point2 = vertices[ 1 ]\r\n const pointNearFirstLine = new Point(\r\n point1.x + (point2.x - point1.x) / 2 + (point1.y !== point2.y ? this.resolution : 0),\r\n point1.y + (point2.y - point1.y) / 2 + (point1.y === point2.y ? this.resolution : 0),\r\n )\r\n\r\n const maxX = Math.max( ...vertices.map( v => v.x ) )\r\n const rect = new Rect( pointNearFirstLine.x, pointNearFirstLine.y, maxX - pointNearFirstLine.x, 1 )\r\n const numberOfEdgesCrossing = this.queryLeaves( rect ).filter( (qTree, i, arr) => {\r\n if (qTree.references.length === 0) return false\r\n\r\n const nextTree = arr[ i + 1 ]\r\n\r\n return !nextTree || qTree.boundary.x + this.resolution !== nextTree.boundary.x\r\n\r\n } ).length\r\n\r\n if (numberOfEdgesCrossing % 2 === 1) this.fillEmptyArea( object, pointNearFirstLine )\r\n }\r\n\r\n fillEmptyArea( object, point, direction=null ) {\r\n if (!this.divided) {\r\n\r\n if (this.references.find( ref => ref === object )) return { left:false, right:false, top:false, bottom:false }\r\n\r\n this.references.push( object )\r\n\r\n return { left:true, right:true, top:true, bottom:true }\r\n\r\n // sprawdzam czy zajęty czy nie\r\n // jeśli nie, to wypełniam referencją i zwracam tablicę punktów wskazujących na każdego sąsiada\r\n // w przeciwnym razie zwracam pustą tablicę\r\n\r\n } else {\r\n // const siblingstoTest = this.fillEmptyArea( object, point )\r\n\r\n // iteruję punkty i sprawdzam pasujace potomki\r\n // otrzymane tablice filtruję względem położenia potomka w strukturze\r\n // np północne nie mogą wskazać na południe (bo w strukturze mają na południu sąsiada)\r\n // wschodnie nie moga wskazać na zachodnie\r\n\r\n // po otrzymaniu wszystkich odpowiedni i przefiltrowaniu tablicy wysyłam ją do rodzica na dalsze sprawdzanie\r\n }\r\n }\r\n\r\n /**\r\n * @param {Point[]} points\r\n */\r\n insertPointSequence( object, ...points ) {\r\n if (!points.length) return\r\n\r\n if (points.length === 1) this.insert( object, points[ 0 ] )\r\n else for (let i = 1; i < points.length; i++) {\r\n const pointA = points[ i - 1 ]\r\n const pointB = points[ i ]\r\n\r\n Quadtree.bresenham( pointA, pointB, this.smallestBoundary.width, this.smallestBoundary.height ).forEach( point => this.insert( object, point ) )\r\n }\r\n }\r\n\r\n /**\r\n * @param {Point} point\r\n */\r\n insert( object, point ) {\r\n if (!this.boundary.contains( point )) return false\r\n\r\n const { references, divided, boundary, smallestBoundary } = this\r\n\r\n if (boundary.width <= smallestBoundary.width) {\r\n if (!references.includes( object )) references.push( object )\r\n\r\n return true\r\n } else {\r\n if (!divided) this.subdivide()\r\n\r\n return this.northeast.insert( object, point )\r\n || this.northwest.insert( object, point )\r\n || this.southeast.insert( object, point )\r\n || this.southwest.insert( object, point )\r\n }\r\n }\r\n\r\n subdivide() {\r\n const { x, y, width, height } = this.boundary\r\n const { resolution } = this\r\n\r\n const ne = new Rect( x + width / 2, y, width / 2, height / 2 )\r\n const nw = new Rect( x, y, width / 2, height / 2 )\r\n const se = new Rect( x + width / 2, y + height / 2, width / 2, height / 2 )\r\n const sw = new Rect( x, y + height / 2, width / 2, height / 2 )\r\n\r\n this.northeast = new Quadtree( ne, resolution )\r\n this.northwest = new Quadtree( nw, resolution )\r\n this.southeast = new Quadtree( se, resolution )\r\n this.southwest = new Quadtree( sw, resolution )\r\n\r\n this.divided = true\r\n\r\n this.references.forEach( point => this.insert( point ) )\r\n this.references = []\r\n }\r\n\r\n /**\r\n * @param {Rect} rect\r\n */\r\n queryLeaves( rect ) {\r\n /** @type {Quadtree[]} */\r\n const foundedLeaves = []\r\n const { boundary } = this\r\n\r\n if (!this.boundary.intersects( rect )) return foundedLeaves\r\n\r\n const { divided, northeast, northwest, southeast, southwest, resolution } = this\r\n\r\n if (rect.intersects( new Rect( boundary.x, boundary.y, resolution, resolution ) )) foundedLeaves.push( this )\r\n\r\n if (divided) foundedLeaves.push(\r\n ...northeast.queryLeaves( rect ),\r\n ...northwest.queryLeaves( rect ),\r\n ...southeast.queryLeaves( rect ),\r\n ...southwest.queryLeaves( rect ),\r\n )\r\n\r\n return foundedLeaves\r\n }\r\n\r\n query( rect ) {\r\n return this.queryLeaves( rect )\r\n .map( qTree => qTree.references )\r\n .filter( (reference, i, arr) => arr.indexOf( reference ) === i )\r\n }\r\n\r\n /**\r\n *\r\n * @param {CanvasRenderingContext2D} ctx\r\n * @param {object} param1\r\n * @param {number} param1.drawAreaX\r\n * @param {number} param1.drawAreaY\r\n * @param {Rect} param1.drawArea\r\n */\r\n show( ctx, { isMeshShowed=true, drawAreaX=0, drawAreaY=0, drawArea } ) {\r\n const { x, y, width, height } = this.boundary\r\n const { references:points } = this\r\n\r\n ctx.strokeStyle = `#aaa`\r\n ctx.lineWidth = 1\r\n\r\n if (drawArea) {\r\n drawAreaX = drawArea.x\r\n drawAreaY = drawArea.y\r\n }\r\n\r\n if (isMeshShowed) ctx.strokeRect( drawAreaX + x, drawAreaY + y, width, height )\r\n\r\n if (this.divided) {\r\n this.northeast.show( ctx, { isMeshShowed, drawAreaX, drawAreaY } )\r\n this.northwest.show( ctx, { isMeshShowed, drawAreaX, drawAreaY } )\r\n this.southeast.show( ctx, { isMeshShowed, drawAreaX, drawAreaY } )\r\n this.southwest.show( ctx, { isMeshShowed, drawAreaX, drawAreaY } )\r\n }\r\n\r\n ctx.fillStyle = '#0b0'\r\n\r\n if (points.length) {\r\n ctx.fillRect( ( drawAreaX + x ), ( drawAreaY + y ), ( width ), ( height ) )\r\n }\r\n }\r\n\r\n clear() {\r\n this.references.splice( 0 )\r\n\r\n if (this.divided) {\r\n this.northeast = null\r\n this.northwest = null\r\n this.southeast = null\r\n this.southwest = null\r\n\r\n this.divided = false\r\n }\r\n }\r\n\r\n static bresenham( { x:xA, y:yA }, { x:xB, y:yB }, resolutionX=1, resolutionY=resolutionX ) {\r\n const coordinates = []\r\n\r\n const minRes = Math.min( resolutionX, resolutionY )\r\n\r\n let x1 = this.floorToDivisible( xA, minRes )\r\n let y1 = this.floorToDivisible( yA, minRes )\r\n const x2 = this.floorToDivisible( xB, minRes )\r\n const y2 = this.floorToDivisible( yB, minRes )\r\n\r\n const deltaX = Math.abs( x1 - x2 )\r\n const deltaY = Math.abs( y1 - y2 )\r\n\r\n const stepX = (x1 < x2 ? 1 : -1) * minRes\r\n const stepY = (y1 < y2 ? 1 : -1) * minRes\r\n\r\n let err = deltaX - deltaY\r\n\r\n do {\r\n coordinates.push( new Point( x1 + minRes / 2, y1 + minRes / 2 ) )\r\n\r\n const doubledErr = err * 2\r\n\r\n if (doubledErr > -deltaY) {\r\n err -= deltaY\r\n if (x1 !== x2) x1 += stepX\r\n }\r\n if (doubledErr < deltaX) {\r\n err += deltaX\r\n if (y1 !== y2) y1 += stepY\r\n }\r\n } while (x1 !== x2 || y1 !== y2)\r\n\r\n coordinates.push( new Point( x1 + minRes / 2, y1 + minRes / 2 ) )\r\n\r\n return coordinates\r\n }\r\n\r\n static floorToDivisible( number, divider ) {\r\n return Math.floor( number / divider ) * divider\r\n }\r\n}","import React from \"react\"\r\nimport { Point, Rect } from \"../utils.js\"\r\n\r\nimport Quadtree from \"./class.js\"\r\n\r\nexport const title = {\r\n en: `Quadtree template`,\r\n pl: `Drzewo czwórkowe dla płaszczyzn`,\r\n}\r\n\r\nexport const description = {\r\n pl: `Struktura przechowujaca referencje do figur geometrycznych (w obecnej implementacji jedynie linii)`,\r\n en: `The structure that stores references to geometric figures (in current implementation only points)`,\r\n}\r\n\r\nexport class Component extends React.Component {\r\n mouse = { downX:0, downY:0, x:0, y:0, pressed:false }\r\n /** @type {Quadtree} */\r\n qTree = null\r\n rectSideLength = 5\r\n isMeshShowed = true\r\n objects = []\r\n\r\n langKey = this.props.langKey\r\n\r\n /** @param {HTMLCanvasElement} canvas */\r\n handleRef = canvas => {\r\n if (!canvas) return\r\n\r\n canvas.width = canvas.parentElement.clientWidth - 42\r\n canvas.height = canvas.parentElement.clientHeight - 42\r\n\r\n this.ctx = canvas.getContext( `2d` )\r\n this.createQTree()\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerMove = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n\r\n const { ctx, qTree } = this\r\n const { downX, downY, x, y, pressed } = this.mouse\r\n\r\n if (pressed) {\r\n // console.log( this.mouse )\r\n this.clear()\r\n\r\n ctx.strokeStyle = `red`\r\n\r\n ctx.beginPath()\r\n ctx.moveTo( downX, downY )\r\n ctx.lineTo( x, y )\r\n ctx.stroke()\r\n\r\n qTree.show( ctx, { isMeshShowed:this.isMeshShowed } )\r\n }\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerDown = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n const { ctx } = this\r\n this.mouse.pressed = true\r\n this.mouse.downX = layerX\r\n this.mouse.downY = layerY\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n\r\n const { downX:x, downY:y } = this.mouse\r\n\r\n this.clear()\r\n this.qTree.show( ctx, { isMeshShowed:this.isMeshShowed } )\r\n\r\n ctx.strokeStyle = '#b00'\r\n ctx.beginPath()\r\n ctx.arc( x, y, 3, 0, 2 * Math.PI )\r\n ctx.stroke()\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerUp = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n const { ctx } = this\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n\r\n const { downX, downY, x, y, pressed } = this.mouse\r\n\r\n const pointUp = new Point( x, y )\r\n const pointDown = new Point( downX, downY )\r\n\r\n if (!pressed || !this.qTree.boundary.contains( pointUp )) return\r\n\r\n if (pointUp.equal( pointDown )) {\r\n const obj = { type:'point', ...pointUp }\r\n\r\n this.objects.push( obj )\r\n this.qTree.insert( obj, pointUp )\r\n } else {\r\n const obj = {\r\n type: 'line',\r\n startPoint: new Point( pointDown.x, pointDown.y ),\r\n endPoint: new Point( pointUp.x, pointUp.y )\r\n }\r\n\r\n this.objects.push( obj )\r\n this.qTree.insertPointSequence( obj, pointDown, pointUp )\r\n }\r\n\r\n this.clear()\r\n this.qTree.show( ctx, { isMeshShowed:this.isMeshShowed } )\r\n\r\n this.mouse.pressed = false\r\n }\r\n /** @param {React.ChangeEvent} param0 */\r\n handleChangeWidth = ({ target }) => {\r\n this.rectSideLength = target.value\r\n this.clear()\r\n this.createQTree()\r\n }\r\n /** @param {React.ChangeEvent} param0 */\r\n handleToggleMesh = ({ target }) => {\r\n this.isMeshShowed = target.checked\r\n this.clear()\r\n this.qTree.show( this.ctx, { isMeshShowed:this.isMeshShowed } )\r\n }\r\n\r\n createQTree() {\r\n this.qTree = new Quadtree( new Rect( 0, 0, this.ctx.canvas.width, this.ctx.canvas.height ), this.rectSideLength )\r\n\r\n return this.qTree\r\n }\r\n clear = () => {\r\n const { ctx } = this\r\n\r\n ctx.clearRect( 0, 0, ctx.canvas.width, ctx.canvas.height )\r\n }\r\n reset = () => {\r\n this.createQTree()\r\n this.clear()\r\n }\r\n\r\n render = () =>\r\n <>\r\n <article className={this.props.uiClass}>\r\n <button className=\"neumorphizm-white\" onClick={this.reset}>\r\n {this.langKey === `pl` ? `Wyczyść` : `Clear`}\r\n </button>\r\n <label>\r\n Resolution {` `}\r\n <input type=\"number\" defaultValue={this.rectSideLength} onChange={this.handleChangeWidth} min={1} max={30} />\r\n </label>\r\n <label>\r\n Mesh {` `}\r\n <input type=\"checkbox\" defaultChecked={true} onChange={this.handleToggleMesh} />\r\n </label>\r\n <p>\r\n {\r\n this.langKey === `pl` ?\r\n `Narysuj linię na poniższej wyznaczonej przestrzni.`\r\n :\r\n `Draw a line on highlighted area below.`\r\n }\r\n </p>\r\n </article>\r\n <canvas\r\n ref={this.handleRef}\r\n className={this.props.canvasClass}\r\n onPointerMove={this.handlePointerMove}\r\n onPointerDown={this.handlePointerDown}\r\n onPointerUp={this.handlePointerUp}\r\n />\r\n </>\r\n}","import React from \"react\"\r\n\r\nimport styles from \"./scp.module.css\"\r\n\r\nimport Link from \"./link\"\r\n\r\nimport * as scp_gifCreator from \"../scp/gif_creator\"\r\nimport * as scp_bresenham from \"../scp/bresenham\"\r\nimport * as scp_quadtree from \"../scp/quadtree\"\r\nimport * as scp_quadtreeTemplate from \"../scp/quadtree_template\"\r\n\r\nconst scpPackage = [\r\n { name:`gif_creator`, scp:scp_gifCreator },\r\n { name:`bresenham`, scp:scp_bresenham },\r\n { name:`quadtree`, scp:scp_quadtree },\r\n { name:`quadtree_template`, scp:scp_quadtreeTemplate },\r\n]\r\n\r\nexport default ({ langKey }) =>\r\n <section>\r\n <h2 className={`h2 boxed-title is-blue`}>\r\n {langKey === `pl` ? `Małe i proste różności` : `Small and trivial miscellaneous`}\r\n </h2>\r\n <div className={styles.wrapper}>\r\n {\r\n scpPackage.map( ({ name, scp:{ title, description } }) =>\r\n <article className={`neumorphizm ${styles.item} is-hoverable`} key={name}>\r\n <div className={styles.neumorphizmTransformFix}>\r\n <h3 className={styles.title}>\r\n {/* <img className={styles.thumbnail} /> */}\r\n <Link langKey={langKey} className={`is-not-focus ${styles.link}`} to={`/scp/${name}`}>{title[ langKey ]}</Link>\r\n </h3>\r\n <p>{description[ langKey ]}</p>\r\n </div>\r\n </article>\r\n )\r\n }\r\n </div>\r\n </section>","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperties\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\naddToUnscopables('flat');\n","var global = require('../internals/global');\n\nmodule.exports = global;\n","var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n","var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n","export default class Gif {\r\n /*\\\r\n * ,,,----------,\r\n * ||| |\r\n * 10010001 |\r\n * -------- |\r\n * | v\r\n * v 2^(N+1) colors\r\n * GIF := 47 49 46 38 39 61 0A 00 0A 00 91 00 00 FF FF FF FF 00 00 00 00 FF 00 00 00 21 F9 04 00 00 00 00 00 2C 00 00 00 00 0A 00 0A 00 00 02 16 8C 2D 99 87 2A 1C DC 33 A0 02 75 EC 95 FA A8 DE 60 8C 04 91 4C 01 00 3B\r\n * ----------------- -------------------- ----------------------------------- ----------------------- ----------------------------- -------------------------------------------------------------------------- --\r\n * HEADER LOGICAL SCREEN GLOBAL COLOR TABLE GRAPHICS CONTROL IMAGE DESCRIPTOR IMAGE DATA 02 TRAILER\r\n * EXTENSION\r\n \\*/\r\n\r\n /**\r\n * @param {Any} colorsDefinitions object with properties ised in imageData meaning colors in hex; { r:\"FF 00 00\" }\r\n * @param {string[][][]} imageData userfriendly gif frames data\r\n */\r\n constructor( colorsDefinitions, imageData ) {\r\n const colorsAliases = Object.keys( colorsDefinitions )\r\n\r\n this.globalColorDefinitions = colorsDefinitions\r\n\r\n this.width = Gif.get2ByteCode( imageData[ 0 ][ 0 ].length )\r\n this.height = Gif.get2ByteCode( imageData[ 0 ].length.toString( 16 ) )\r\n this.globalColorTableFlag = 1\r\n this.colorResolution = (this.globalColorTableFlag ? ~~Math.log2( colorsAliases.length ) - 1 : 0)\r\n this.sortColorsFlag = 0\r\n this.sizeOfGlobalColorTable = this.colorResolution // i don't know the difference ;/\r\n this.backgroundColorIndex = Gif.get1ByteCode( this.globalColorTableFlag ? 0 : 0 )\r\n this.pixelAspectRatio = Gif.get1ByteCode( 0 )\r\n this.delay = Gif.get2ByteCode( 0 )\r\n\r\n // HEADER\r\n this.bufferData = `47 49 46 38 39 61 `\r\n\r\n // LOGICAL SCREEN\r\n this.bufferData += `${this.width} ${this.height} `\r\n this.bufferData += parseInt( ``\r\n + this.globalColorTableFlag\r\n + Gif.getNumberInRadix( this.colorResolution, 2, 3 )\r\n + this.sortColorsFlag\r\n + Gif.getNumberInRadix( this.sizeOfGlobalColorTable, 2, 3 )\r\n , 2 ).toString( 16 ).toUpperCase()\r\n this.bufferData += ` ${this.backgroundColorIndex} ${this.pixelAspectRatio}`\r\n\r\n // GLOBAL COLOR TABLE\r\n colorsAliases.forEach( alias => this.bufferData += ` ${colorsDefinitions[ alias ]}` )\r\n\r\n // APPLICATION EXTENSION\r\n if ( imageData.length > 1 ) {\r\n const loops = Infinity\r\n this.bufferData += ` 21 FF 0B 4E 45 54 53 43 41 50 45 32 2E 30 03 01 ${loops === Infinity ? \"00 00\" : Gif.get2ByteCode( loops )} 00`\r\n }\r\n\r\n imageData.forEach( data => {\r\n // GRAPHICS CONTROL EXTENSION\r\n // BITS: 1-3:(future) 4-6:(what happens to the current image data when you move onto the next) 7:(user input flag, 0 recommended) 8:transparency\r\n // 0 - no disposal method - no animations\r\n // 1 - draw on previus frame\r\n // 2 - clear to background color\r\n // 3 - back to state before that frame\r\n // 4-7 are yet to be defined\r\n //\r\n // ^\r\n // | 000 001 0 0\r\n this.bufferData += ` 21 F9 04 ${imageData.length > 1 ? \"04\" : \"00\"} ${this.delay} 00 00`\r\n\r\n // IMAGE DESCRIPTOR\r\n this.bufferData += ` 2C 00 00 00 00 ${this.width} ${this.height} 00`\r\n\r\n // IMAGE DATA\r\n this.addFrame( data )\r\n } )\r\n\r\n // TRAILER\r\n this.bufferData += ` 3B`\r\n this.bufferData = this.bufferData.replace( / /g, `` )\r\n }\r\n /**\r\n * @param {string[][]} imageData userfriendly image data\r\n */\r\n addFrame( imageData ) {\r\n const colorsAliases = Object.keys( this.globalColorDefinitions )\r\n const realGlobalColorTableSize = this.sizeOfGlobalColorTable + 1\r\n const flattedImage = [ ...imageData.flat(), `EiO` ]\r\n const codeTable = colorsAliases.concat( [`CLEAR`, `EiO` ] )\r\n const codeStream = [ { length:3, index:(2 ** realGlobalColorTableSize) } ]\r\n\r\n let sequence = flattedImage[ 0 ]\r\n let length = 2 ** realGlobalColorTableSize - 1\r\n\r\n for (let code = 0; flattedImage[ code ] !== `EiO`;) {\r\n let founded = true\r\n let k = code + 1\r\n\r\n while (founded && k <= flattedImage.length) {\r\n const nextSequence = flattedImage.slice( code, k ).join( `` )\r\n\r\n if (codeTable.indexOf( nextSequence ) !== -1) {\r\n sequence = nextSequence\r\n k += 1\r\n } else {\r\n const index = codeTable.indexOf( sequence )\r\n\r\n if (codeTable.length > 2 ** length && codeStream[ codeStream.length - 1 ].index !== index ) length++\r\n\r\n codeTable.push( nextSequence )\r\n codeStream.push( { length, index } )\r\n\r\n sequence = \"\"\r\n founded = false\r\n }\r\n }\r\n\r\n code = k - 1\r\n }\r\n codeStream.push( { length, index:(2 ** realGlobalColorTableSize + 1) } )\r\n\r\n // const indexCode = codeStream.reduce( (code, { length, index }) => `${code}#${index} `, `` )\r\n const byteCode = codeStream.reduce( (code, { length, index }) => ` ${index.toString( 2 ).padStart( length, `0` )}${code} `, `` )\r\n const hexCode = (function(){\r\n let length = 0\r\n let data = ``\r\n let temp = byteCode.replace( / /g, `` )\r\n\r\n while (temp.length) {\r\n const byte = temp.slice( -8 )\r\n\r\n data += `${parseInt( byte, 2 ).toString( 16 ).padStart( 2, `0` )} `\r\n temp = temp.slice( 0, -8 )\r\n length++\r\n }\r\n\r\n return { data:data.toUpperCase(), length }\r\n }())\r\n\r\n this.bufferData += ` 0${realGlobalColorTableSize} ${Gif.getNumberInRadix( hexCode.length, 16, 2)} ${hexCode.data}00`\r\n }\r\n getSrc() {\r\n const charCodes = this.bufferData\r\n .replace( /\\r|\\n/g, `` )\r\n .replace( /([\\da-fA-F]{2}) ?/g, `0x$1 `)\r\n .replace( / +$/, `` )\r\n .split( ` ` )\r\n\r\n return `data:image/gif;base64,${btoa( String.fromCharCode( ...charCodes ) )}`\r\n }\r\n getImgTag( width, height ) {\r\n const img = document.createElement( `img` )\r\n\r\n img.src = this.getSrc()\r\n\r\n if (width && height) {\r\n img.width = width\r\n img.height = height\r\n }\r\n\r\n return img\r\n }\r\n\r\n /**\r\n * @param {number} number\r\n */\r\n static get1ByteCode( number ) {\r\n return number.toString( 16 ).toUpperCase().padStart( 2, `0` )\r\n }\r\n /**\r\n * @param {number} number\r\n */\r\n static get2ByteCode( number ) {\r\n const code = number.toString( 16 ).toUpperCase().padStart( 4, `0` )\r\n\r\n return `${code.slice( 2 )} ${code.slice( 0, 2 )}`\r\n }\r\n /**\r\n * @param {number} number\r\n * @param {number} radix\r\n * @param {number} length\r\n */\r\n static getNumberInRadix( number, radix, length ) {\r\n return number.toString( radix ).padStart( length, `0` )\r\n }\r\n}\r\nexport class Png {\r\n /**\r\n * @param {Buffer} buffer\r\n */\r\n constructor( buffer ) {\r\n this.signature = buffer.slice( 0, 8 )\r\n this.header = {}\r\n this.data = {}\r\n this.end = null\r\n\r\n let i = 8\r\n while (i < buffer.length) {\r\n const length = Png.bufferToNum( buffer.slice( i, i + 4 ) )\r\n const type = buffer.slice( i + 4, i + 8 ).toString()\r\n const data = buffer.slice( i + 8, i + 8 + length )\r\n // const crc = buffer.slice( i + 8 + length, i + 8 + length + 4 )\r\n\r\n if (type === `IHDR`) {\r\n this.header.width = Png.bufferToNum( data.slice( 0, 4 ) )\r\n this.header.height = Png.bufferToNum( data.slice( 4, 8 ) )\r\n this.header.bitDepth = buffer[ 8 ]\r\n this.header.color = buffer[ 9 ]\r\n this.header.compression = buffer[ 10 ]\r\n this.header.filter = buffer[ 11 ]\r\n this.header.interlace = buffer[ 12 ]\r\n } else if (type === `IDAT`) {\r\n this.data.windowSize = data[ 0 ] >> 4\r\n this.data.method = data[ 0 ] & 15\r\n this.data.level = data[ 1 ] >> 6\r\n this.data.dict = (data[ 1 ] >> 5) & 1\r\n this.data.checksum = Png.bufferToNum( data.slice( 0, 2 ) ) % 31\r\n this.data.lastBlock = data[ 3 ] & 1\r\n this.data.blockType = (data[ 3 ] >> 1) & 3\r\n this.data.dataLength = Png.bufferToNum( data.slice( 3, 5 ).reverse() )\r\n this.data.length = Png.bufferToNum( data.slice( 5, 7 ).reverse() )\r\n this.data.lineFilter = data[ 7 ]\r\n\r\n //...and problem, because I have weird values in buffer\r\n // console.log( data )\r\n // <Buffer 18 57 63 cf f8 f0 c0 1f 00 05 00 01 ff>\r\n } else if (type === `IEND`) {\r\n }\r\n\r\n i += 8 + length + 4\r\n }\r\n }\r\n\r\n /**\r\n * @param {Buffer} buffer\r\n */\r\n static bufferToNum( buffer ) {\r\n return buffer.reduceRight( (a, b, i, { length }) => a + b * 256 ** (length - 1 - i) )\r\n }\r\n}","import React from \"react\"\r\n\r\nimport Gif from \"./class\"\r\n\r\nexport const title = {\r\n en: `Gif creator`,\r\n pl: `Kreator gifów`,\r\n}\r\n\r\nexport const description = {\r\n pl: `Prosty kreator gifów stworzony gdy chciałem zrozumieć jak zbudowany jest format plików .gif`,\r\n en: `Simple GIFs creator made when I wanted to learn how are built .gif files formats`,\r\n}\r\n\r\nexport const Component = ({ langKey }) => {\r\n const gif = new Gif( { w:`FF FF FF`, r:`FF 00 00`, b:`00 00 FF`, k:`00 00 00` }, [\r\n [\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`w`,`w`,`w`,`w`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`w`,`w`,`w`,`w`,`b`,`b`,`b` ],\r\n [ `b`,`b`,`b`,`w`,`w`,`w`,`w`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`w`,`w`,`w`,`w`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n ], [\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`r`,`r`,`b`,`b`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`k`,`k`,`k`,`k`,`b`,`b`,`b` ],\r\n [ `r`,`r`,`r`,`k`,`k`,`k`,`k`,`b`,`b`,`b` ],\r\n [ `b`,`b`,`b`,`k`,`k`,`k`,`k`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`k`,`k`,`k`,`k`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n [ `b`,`b`,`b`,`b`,`b`,`r`,`r`,`r`,`r`,`r` ],\r\n ]\r\n ] )\r\n\r\n const pStyle = {\r\n fontSize: `10px`,\r\n fontFamily: `monospace`,\r\n whiteSpace: `break-spaces`,\r\n letterSpacing: `1px`\r\n }\r\n\r\n return <>\r\n <p style={{ width:`100%`, textAlign:`center` }}>\r\n {\r\n langKey === `pl` ?\r\n `Gif ten został stworzony z kodu obok.`\r\n :\r\n `This gif, was created from code beside.`\r\n }\r\n </p>\r\n <img src={gif.getSrc()} alt=\"Generated from array GIF\" width={100} height={100} style={{ imageRendering:`pixelated` }} />\r\n <p style={pStyle}>\r\n {\r\n `\r\n const gif = new Gif( { w:\"FF FF FF\", r:\"FF 00 00\", b:\"00 00 FF\", k:\"00 00 00\" }, [\r\n [\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"w\",\"w\",\"w\",\"w\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"w\",\"w\",\"w\",\"w\",\"b\",\"b\",\"b\" ],\r\n [ \"b\",\"b\",\"b\",\"w\",\"w\",\"w\",\"w\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"w\",\"w\",\"w\",\"w\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n ], [\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"r\",\"r\",\"b\",\"b\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"k\",\"k\",\"k\",\"k\",\"b\",\"b\",\"b\" ],\r\n [ \"r\",\"r\",\"r\",\"k\",\"k\",\"k\",\"k\",\"b\",\"b\",\"b\" ],\r\n [ \"b\",\"b\",\"b\",\"k\",\"k\",\"k\",\"k\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"k\",\"k\",\"k\",\"k\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n [ \"b\",\"b\",\"b\",\"b\",\"b\",\"r\",\"r\",\"r\",\"r\",\"r\" ],\r\n ]\r\n ]\r\n `\r\n }\r\n </p>\r\n </>\r\n}","var fails = require('../internals/fails');\n\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n // Chrome 38 Symbol has incorrect toString conversion\n // eslint-disable-next-line no-undef\n return !String(Symbol());\n});\n","var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.github.io/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n","var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.github.io/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n","var hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","import { Rect } from \"../utils.js\"\r\nexport default class Quadtree {\r\n /** @type {Quadtree} */\r\n northeast = null\r\n /** @type {Quadtree} */\r\n northwest = null\r\n /** @type {Quadtree} */\r\n southeast = null\r\n /** @type {Quadtree} */\r\n southwest = null\r\n\r\n points = []\r\n divided = false\r\n\r\n /**\r\n * @param {Rect} boundary\r\n * @param {number} capacity\r\n */\r\n constructor( boundary, pointsOnlyInLeaves=true, capacity=4 ) {\r\n this.boundary = boundary\r\n this.pointsOnlyInLeaves = pointsOnlyInLeaves\r\n this.capacity = capacity\r\n }\r\n\r\n /**\r\n * @param {Point} point\r\n */\r\n insert( point ) {\r\n if (!this.boundary.contains( point )) return false\r\n\r\n const { points, capacity, divided } = this\r\n\r\n if (points.length < capacity && !divided) {\r\n points.push( point )\r\n\r\n return true\r\n }\r\n else {\r\n if (!divided) this.subdivide()\r\n\r\n return this.northeast.insert( point ) ||\r\n this.northwest.insert( point ) ||\r\n this.southeast.insert( point ) ||\r\n this.southwest.insert( point )\r\n }\r\n }\r\n\r\n subdivide() {\r\n const { x, y, width, height } = this.boundary\r\n const { capacity, pointsOnlyInLeaves } = this\r\n\r\n const ne = new Rect( x + width / 2, y, width / 2, height / 2 )\r\n const nw = new Rect( x, y, width / 2, height / 2 )\r\n const se = new Rect( x + width / 2, y + height / 2, width / 2, height / 2 )\r\n const sw = new Rect( x, y + height / 2, width / 2, height / 2 )\r\n\r\n this.northeast = new Quadtree( ne, capacity )\r\n this.northwest = new Quadtree( nw, capacity )\r\n this.southeast = new Quadtree( se, capacity )\r\n this.southwest = new Quadtree( sw, capacity )\r\n\r\n this.divided = true\r\n\r\n if (pointsOnlyInLeaves) {\r\n this.points.forEach( point => this.insert( point ) )\r\n this.points = []\r\n }\r\n }\r\n\r\n /**\r\n * @param {CanvasRenderingContext2D} ctx\r\n */\r\n show( ctx, startX=0, startY=0 ) {\r\n const { x, y, width, height } = this.boundary\r\n\r\n ctx.strokeStyle = `#444`\r\n\r\n ctx.strokeRect( startX + x, startY + y, width, height )\r\n\r\n if (this.divided) {\r\n this.northeast.show( ctx, startX, startY )\r\n this.northwest.show( ctx, startX, startY )\r\n this.southeast.show( ctx, startX, startY )\r\n this.southwest.show( ctx, startX, startY )\r\n }\r\n\r\n ctx.strokeStyle = '#f00'\r\n\r\n this.points.forEach( ({ x, y }) => {\r\n ctx.beginPath()\r\n ctx.arc( startX + x, startY + y, 2, 0, Math.PI * 2 )\r\n ctx.stroke()\r\n } )\r\n }\r\n\r\n /**\r\n * @param {Rect} rect\r\n */\r\n query( rect ) {\r\n /** @type {Point[]} */\r\n const foundedPoints = []\r\n\r\n if (!this.boundary.intersects( rect )) return foundedPoints\r\n\r\n const { points, divided, northeast, northwest, southeast, southwest } = this\r\n\r\n for (const point of points) if (rect.contains( point )) foundedPoints.push( point )\r\n\r\n if (divided) foundedPoints.push(\r\n ...northeast.query( rect ),\r\n ...northwest.query( rect ),\r\n ...southeast.query( rect ),\r\n ...southwest.query( rect )\r\n )\r\n\r\n return foundedPoints\r\n }\r\n\r\n clear() {\r\n this.points.splice( 0 )\r\n\r\n if (this.divided) {\r\n this.northeast = null\r\n this.northwest = null\r\n this.southeast = null\r\n this.southwest = null\r\n\r\n this.divided = false\r\n }\r\n }\r\n}","import React from \"react\"\r\n\r\nimport Quadtree from \"./class.js\"\r\nimport { Point, Rect, random } from \"../utils.js\"\r\n\r\nexport const title = {\r\n en: `Quadtree`,\r\n pl: `Drzewo czwórkowe`,\r\n}\r\n\r\nexport const description = {\r\n pl: `Struktura potrafiąca przechowywać ogrom punktów i potrafiaca je zwórcić z wielkiej przestrzeni z wydajnością O(log(n))`,\r\n en: `The structure able to store huge amount of points and able to return them from big area with an eficiency of O(log(n))`,\r\n}\r\n\r\nexport class Component extends React.Component {\r\n /** @type {Quadtree} */\r\n qTree = null\r\n /** @type {CanvasRenderingContext2D} */\r\n ctx = null\r\n queryRect = new Rect( 100, 100, 100, 75 )\r\n langKey = this.props.langKey\r\n\r\n state = {\r\n canLeavesStorePoints: true\r\n }\r\n\r\n /** @param {HTMLCanvasElement} canvas */\r\n handleRef = canvas => {\r\n if (!canvas) return\r\n\r\n canvas.width = canvas.parentElement.clientWidth - 42\r\n canvas.height = canvas.parentElement.clientHeight - 42\r\n\r\n this.ctx = canvas.getContext( `2d` )\r\n this.createQTree()\r\n this.draw()\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerUp = e => {\r\n const { layerX:x, layerY:y } = e.nativeEvent\r\n const { qTree } = this\r\n\r\n const newPoint = new Point( x, y )\r\n\r\n if (!qTree.boundary.contains( newPoint )) return\r\n\r\n qTree.insert( newPoint )\r\n\r\n this.draw()\r\n }\r\n /** @param {PointerEvent} e */\r\n handlePointerMove = e => {\r\n const { layerX:x, layerY:y } = e.nativeEvent\r\n const { queryRect } = this\r\n const testingRect = new Rect(\r\n x - queryRect.width / 2,\r\n y - queryRect.height / 2,\r\n queryRect.width,\r\n queryRect.height\r\n )\r\n\r\n if (!this.qTree.boundary.contains( testingRect )) return\r\n\r\n queryRect.x = testingRect.x\r\n queryRect.y = testingRect.y\r\n\r\n this.draw()\r\n }\r\n handleLeavesModeChange = () => {\r\n this.setState( old => ({ canLeavesStorePoints:!old.canLeavesStorePoints }) )\r\n this.createQTree()\r\n this.draw()\r\n }\r\n\r\n createQTree() {\r\n this.qTree = new Quadtree( new Rect( 0, 0, this.ctx.canvas.width, this.ctx.canvas.height ), this.state.canLeavesStorePoints )\r\n\r\n return this.qTree\r\n }\r\n /** @param {number} amount */\r\n generate = amount => {\r\n const { width, height } = this.ctx.canvas\r\n\r\n for (let i = 0; i < amount; i++) {\r\n this.qTree.insert( new Point( random( width ), random( height ) ) )\r\n }\r\n\r\n this.draw()\r\n }\r\n clear = () => {\r\n const { qTree, ctx } = this\r\n\r\n if (!qTree || !ctx) return\r\n\r\n qTree.clear()\r\n\r\n this.draw()\r\n }\r\n draw() {\r\n const { qTree, ctx, queryRect } = this\r\n const { x, y, width, height } = queryRect\r\n\r\n if (!qTree || !ctx) return\r\n\r\n ctx.clearRect( 0, 0, ctx.canvas.width, ctx.canvas.height )\r\n\r\n qTree.show( ctx )\r\n\r\n ctx.strokeStyle = '#0f0'\r\n ctx.strokeRect( x, y, width, height )\r\n\r\n ctx.fillStyle = '#0f0'\r\n qTree.query( queryRect ).forEach( ({ x, y }) => {\r\n ctx.beginPath()\r\n ctx.arc( x, y, 2, 0, Math.PI * 2 )\r\n ctx.fill()\r\n } )\r\n }\r\n\r\n render = () =>\r\n <>\r\n <article className={this.props.uiClass}>\r\n <button className=\"neumorphizm-white\" onClick={this.clear}>\r\n {this.langKey === `pl` ? `Wyczyść` : `Clear`}\r\n </button>\r\n <button className=\"neumorphizm-white\" onClick={() => this.generate( 100 )}>\r\n {this.langKey === `pl` ? `Dogeneruj 100 punktów` : `Generate 100 points`}\r\n </button>\r\n <button className=\"neumorphizm-white\" onClick={() => this.generate( 1000 )}>\r\n {this.langKey === `pl` ? `Dogeneruj 1000 punktów` : `Generate 1000 points`}\r\n </button>\r\n <button className=\"neumorphizm-white\" onClick={this.handleLeavesModeChange}>\r\n {this.langKey === `pl` ? `Zmień tryb przechowywania liści` : `Switch leaves store mode`}\r\n </button>\r\n <p>\r\n {\r\n this.langKey === `pl` ? <>\r\n Tryb przechowywania liści (obecnie <b>{this.state.canLeavesStorePoints ? `włączony` : `wyłączony`}</b>)\r\n mówi o zdolności do przechocywania do 4 punktów każdego z prostokatów (nie tylko najgłębszych).\r\n </> : <>\r\n Leaves mode (currently <b>{this.state.canLeavesStorePoints ? `on` : `off`}</b>)\r\n says about posibility to store 4 points inside each rectangle (not only the deepest).\r\n </>\r\n }\r\n </p>\r\n <p>\r\n {\r\n this.langKey === `pl` ?\r\n `Ustaw punkt na poniższej wyznaczonej przestrzni.`\r\n :\r\n `Set a point on highlighted area below.`\r\n }\r\n </p>\r\n </article>\r\n <canvas\r\n ref={this.handleRef}\r\n className={this.props.canvasClass}\r\n onPointerUp={this.handlePointerUp}\r\n onPointerMove={this.handlePointerMove}\r\n />\r\n </>\r\n}","var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.6.5',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '© 2020 Denis Pushkarev (zloirock.ru)'\n});\n","var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.github.io/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n","var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP) {\n var store = new WeakMap();\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);\n enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n","exports.f = Object.getOwnPropertySymbols;\n","import React from \"react\"\r\n\r\nimport { Point } from \"../utils.js\"\r\n\r\nconst floorToDivisible = (number, divider) => Math.floor( number / divider ) * divider\r\nfunction bresenham( ctx, rectSideLength, { x:xA, y:yA }, { x:xB, y:yB } ) {\r\n let x1 = floorToDivisible( xA, rectSideLength )\r\n let y1 = floorToDivisible( yA, rectSideLength )\r\n const x2 = floorToDivisible( xB, rectSideLength )\r\n const y2 = floorToDivisible( yB, rectSideLength )\r\n\r\n if (!x1 || !x2 || !y1 || !y2) return false\r\n\r\n const deltaX = Math.abs( x1 - x2 )\r\n const deltaY = Math.abs( y1 - y2 )\r\n\r\n const stepX = (x1 < x2 ? 1 : -1) * rectSideLength\r\n const stepY = (y1 < y2 ? 1 : -1) * rectSideLength\r\n\r\n let err = deltaX - deltaY\r\n\r\n do {\r\n ctx.fillRect( x1, y1, rectSideLength, rectSideLength )\r\n\r\n const doubledErr = err * 2\r\n\r\n if (doubledErr > -deltaY) {\r\n err -= deltaY\r\n x1 += stepX\r\n }\r\n if (doubledErr < deltaX) {\r\n err += deltaX\r\n y1 += stepY\r\n }\r\n } while (x1 !== x2 || y1 !== y2)\r\n\r\n ctx.fillRect( x1, y1, rectSideLength, rectSideLength )\r\n}\r\nexport const title = {\r\n pl: `Algorytm Bresenhama`,\r\n en: `Bresenham algorithm`,\r\n}\r\n\r\nexport const description = {\r\n pl: `Algorytm z którego pomocą w prosty sposób można przeprowadzić proces rasteryzacji`,\r\n en: `The algorithm with which you can easily perform the rasterization process`,\r\n}\r\n\r\nexport class Component extends React.Component {\r\n mouse = { x:null, y:null, downX:null, downY:null, pressed:false }\r\n canvas = null\r\n rectSideLength = 2\r\n lines = [\r\n { pointA:new Point( 150, 100 ), pointB:new Point( 400, 200 ) },\r\n ]\r\n\r\n /** @param {HTMLCanvasElement} canvas */\r\n handleRef = canvas => {\r\n if (!canvas) return\r\n\r\n canvas.width = canvas.parentElement.clientWidth - 42\r\n canvas.height = canvas.parentElement.clientHeight - 42\r\n\r\n this.ctx = canvas.getContext( `2d` )\r\n this.draw()\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerMove = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n\r\n const { ctx } = this\r\n const { downX, downY, x, y, pressed } = this.mouse\r\n\r\n this.draw()\r\n\r\n if (!pressed) return\r\n\r\n ctx.lineWidth = 5\r\n ctx.strokeStyle = '#b00'\r\n ctx.beginPath()\r\n ctx.moveTo( downX, downY )\r\n ctx.lineTo( x, y )\r\n ctx.stroke()\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerDown = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n\r\n this.mouse.pressed = true\r\n this.mouse.downX = layerX\r\n this.mouse.downY = layerY\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n }\r\n /** @param {React.PointerEvent} e */\r\n handlePointerUp = e => {\r\n const { layerX, layerY } = e.nativeEvent\r\n\r\n this.mouse.x = layerX\r\n this.mouse.y = layerY\r\n\r\n const { downX, downY, x, y } = this.mouse\r\n\r\n this.lines.push( {\r\n pointA: new Point( downX, downY, true ),\r\n pointB: new Point( x, y, true )\r\n } )\r\n\r\n this.draw()\r\n\r\n this.mouse.pressed = false\r\n }\r\n /** @param {React.ChangeEvent} e */\r\n handleChangeWidth = ({ target }) => {\r\n this.rectSideLength = target.value\r\n this.draw()\r\n }\r\n\r\n clear = () => {\r\n this.lines.splice( 0 )\r\n this.draw()\r\n }\r\n draw() {\r\n const { ctx, rectSideLength, lines } = this\r\n\r\n if (!ctx) return\r\n\r\n ctx.clearRect( 0, 0, ctx.canvas.width, ctx.canvas.height )\r\n\r\n for (const { pointA, pointB, color='#0b0' } of lines) {\r\n ctx.fillStyle = color\r\n\r\n bresenham( ctx, rectSideLength, pointA, pointB )\r\n }\r\n }\r\n\r\n render = () =>\r\n <>\r\n <article className={this.props.uiClass}>\r\n <button className=\"neumorphizm-white\" onClick={this.clear}>Clear</button>\r\n <label>\r\n Resolution {` `}\r\n <input type=\"number\" defaultValue={this.rectSideLength} onChange={this.handleChangeWidth} min={1} max={30} />\r\n </label>\r\n <p>\r\n {\r\n this.langKey === `pl` ?\r\n `Narysuj linię na poniższej wyznaczonej przestrzni.`\r\n :\r\n `Draw a line on highlighted area below.`\r\n }\r\n </p>\r\n </article>\r\n <canvas\r\n ref={this.handleRef}\r\n className={this.props.canvasClass}\r\n onPointerMove={this.handlePointerMove}\r\n onPointerDown={this.handlePointerDown}\r\n onPointerUp={this.handlePointerUp}\r\n />\r\n </>\r\n}","// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n","var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.github.io/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n","var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n","var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.github.io/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n","var fails = require('../internals/fails');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !fails(function () {\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n","var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n","var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n","var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n","var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\nvar nativeDefineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.github.io/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return nativeDefineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg, 3) : false;\n var element;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;\n } else {\n if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.github.io/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","export class Point {\r\n /**\r\n * @param {number} x\r\n * @param {number} y\r\n */\r\n constructor( x, y ) {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n /**\r\n * @param {number} x\r\n */\r\n set newX( x ) {\r\n this.x = this.alwaysInteger ? x | 1 : x\r\n }\r\n /**\r\n * @param {number} y\r\n */\r\n set newY( y ) {\r\n this.y = this.alwaysInteger ? y | 1 : y\r\n }\r\n\r\n /** Get distance to point\r\n * @param {Point} param0\r\n */\r\n distanceTo({ x, y }) {\r\n return Math.sqrt( (this.x - x) ** 2 + (this.y - y) ** 2 )\r\n }\r\n /**\r\n * @param {Point} point\r\n */\r\n equal( { x, y } ) {\r\n return this.x === x && this.y === y\r\n }\r\n}\r\nexport class MovingCircle extends Point {\r\n /** @type {Point} */\r\n pointToMove = null\r\n angle = 0\r\n maxAnglePerTick = 2\r\n\r\n /**\r\n * @param {number} x\r\n * @param {number} y\r\n */\r\n constructor( x, y, { color=`#fff`, speed=3, size=5 } ) {\r\n super( x, y )\r\n\r\n this.color = color\r\n this.speed = speed\r\n this.size = size\r\n }\r\n\r\n tick() {\r\n const { x, y, pointToMove, size, maxAnglePerTick, speed } = this\r\n\r\n if (this.pointToMove) if (this.distanceTo( pointToMove ) > size) {\r\n const angle = Math.atan2( pointToMove.y - y, pointToMove.x - x ) * 180 / Math.PI\r\n const positiveAngle = angle > 0 ? angle : 360 + angle\r\n const angleToRotate = MovingCircle.clockwiseAngle( this.angle, positiveAngle )\r\n\r\n this.angle += MovingCircle.rangedCeilFloor( angleToRotate, maxAnglePerTick, -maxAnglePerTick )\r\n this.x += Math.cos( this.angle * Math.PI / 180 ) * Math.sqrt( speed * .1 )\r\n this.y += Math.sin( this.angle * Math.PI / 180 ) * Math.sqrt( speed * .1 )\r\n } else this.pointToMove = null\r\n }\r\n\r\n\r\n static clockwiseAngle( angleA, angleB ) {\r\n let biggerAngle, smallerAngle, sign\r\n\r\n if (angleA > angleB) {\r\n biggerAngle = angleA\r\n smallerAngle = angleB\r\n sign = 1\r\n } else {\r\n biggerAngle = angleB\r\n smallerAngle = angleA\r\n sign = -1\r\n }\r\n\r\n const clockwiseMove = biggerAngle - smallerAngle\r\n const anticlockwiseMove = smallerAngle + 360 - biggerAngle\r\n\r\n if (anticlockwiseMove < clockwiseMove) return anticlockwiseMove * sign\r\n else return clockwiseMove * -sign\r\n }\r\n static rangedCeilFloor( num, max, min=0 ) {\r\n return num < min ? min\r\n : num > max ? max\r\n : num\r\n }\r\n}\r\nexport class Rect {\r\n /**\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n */\r\n constructor( x, y, width, height ) {\r\n this.x = x\r\n this.y = y\r\n this.width = width\r\n this.height = height\r\n }\r\n\r\n /**\r\n * @param {Point|Rect} param0\r\n */\r\n contains( { x, y, width=0, height=0 } ) {\r\n return (\r\n x > this.x && x + width < this.x + this.width &&\r\n y > this.y && y + height < this.y + this.height\r\n )\r\n }\r\n\r\n intersects( { x, y, width, height } ) {\r\n return !(\r\n x > this.x + this.width ||\r\n x + width < this.x ||\r\n y > this.y + this.height ||\r\n y + height < this.y\r\n )\r\n }\r\n}\r\n\r\nexport function random( max, min=0 ) {\r\n return Math.floor( Math.random() * (max - min + 1) ) + min\r\n}","var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name)) {\n if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];\n else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n } return WellKnownSymbolsStore[name];\n};\n","var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.github.io/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","module.exports = false;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n","var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n","var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n","var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n"],"sourceRoot":""}