text: "use strict";
  
  function _typeof(obj) { return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj; }
  
  define(function () {
      var exports = {
          color: function color(r, g, b) {
              return "rgb(" + r + "," + g + "," + b + ")";
          },
          find_index: function find_index(array, key, value) {
              for (var i in array) {
                  if (array[i][key] == value) {
                      return i;
                  }
              }
          },
          clone: clone,
          load_object: load_object,
          save_object: save_object
      };
  
      function clone(myObj) {
          if ((typeof myObj === "undefined" ? "undefined" : _typeof(myObj)) != 'object') return myObj;
          if (myObj == null) return myObj;
          var myNewObj = new Object();
          for (var i in myObj) {
              myNewObj[i] = clone(myObj[i]);
          }return myNewObj;
      }
      exports.g = function (str) {
          return "res/" + str;
      };
  
      function save_object(key, obj) {
          localStorage.removeItem(key);
          localStorage.setItem(key, JSON.stringify(obj));
      }
  
      function load_object(key) {
          return JSON.parse(localStorage.getItem(key));
      }
      exports.local = {
          set: function set(a, b) {
              if ((typeof b === "undefined" ? "undefined" : _typeof(b)) == "object") localStorage.setItem(a, JSON.stringify(b));else localStorage.setItem(a, b);
          },
          get: function get(a) {
              var item = localStorage.getItem(a);
              var ret = item;
  
              if (item) {
                  try {
                      ret = JSON.parse(item);
                  } catch (e) {
                      //whatever
                  }
              }
  
              return ret;
          },
          rm: function rm(a) {
              localStorage.removeItem(a);
          }
      };
      return exports;
  });