text: var mockdata1 = [
    {
      "type": "bucket",
      "name": "bucket-58d4fc760628d1f5a468ac54",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc767898210bbcc5f187.png",
          "size": 4584260,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76bcae9117049f63c6.png",
          "size": 8748267,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d4d3dd2e8937980e.jpg",
          "size": 5266385,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76842f600e86b14f87.jpg",
          "size": 8387505,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76c201a9af1074b27e.avi",
          "size": 3902127,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760a3d723c9c2040e5.mov",
          "size": 6673956,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc769f33cd79d9b95750",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc7660f5b0d8f3a09900.avi",
          "size": 3731344,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76803ace725ca558ca.avi",
          "size": 4801393,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc763e10649a6cec7576.png",
          "size": 8459979,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc767da6b30f9e1e0b80.mov",
          "size": 4770539,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76a86e3d90811f9233.mov",
          "size": 1059041,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76632316e119c29af6.avi",
          "size": 1576930,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76bb875880eaca55f7.avi",
          "size": 4364926,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76686b859b04f88f3d.mov",
          "size": 5835083,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76bd8fba15dce4eb10.avi",
          "size": 5638573,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7630b638b50cc44bbc.mov",
          "size": 9197123,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc76da9d2c312a7e1c82",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc7639eba798a2206aee.mov",
          "size": 5915213,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc765cab7962f4c0d7b4.png",
          "size": 2835521,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7689427f23b478e7ea.jpg",
          "size": 6127042,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc768e1de7fb0bf3a918.avi",
          "size": 9771487,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76024d6c816037d39e.png",
          "size": 8913185,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76aa8cc24fa44a89f6.png",
          "size": 3054222,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76aad8a7c021f4828e.png",
          "size": 6700848,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76dcc730ef31a81c54.mov",
          "size": 4205982,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc7628cbb48ce04c9851",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc76fee581c6f9b5c353.avi",
          "size": 7886081,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc767e9b1b74ebbfc41c.png",
          "size": 8420297,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc764c305f6857827fe8.mov",
          "size": 5975646,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76dd488c656c63c6ea.avi",
          "size": 8731051,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76ea6e77dfe2f589a9.mov",
          "size": 5427785,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc761a9c2070189aee09.jpg",
          "size": 8873980,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760d10388da2d4c707.jpg",
          "size": 2922376,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76919289ab06dce822.avi",
          "size": 2157699,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76c9196c7d9933700f.jpg",
          "size": 2784763,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760b4b766ae6e1727e.mov",
          "size": 4551579,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc76d5f380888910d85d",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc76de51ad73d27db5b7.mov",
          "size": 9332336,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7661f2ca29c3db075d.mov",
          "size": 5827454,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc763dc7345032f67b5e.jpg",
          "size": 9998931,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76a6678a4397dfc5a2.png",
          "size": 9740902,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76f7be7a0d34d781be.mov",
          "size": 7111944,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76b6f2b6f302d11cc1.jpg",
          "size": 1795555,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc766d2b5a7e23d9fcd4.png",
          "size": 4701955,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7623f8466add1a8c5e.png",
          "size": 1186153,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760b6986b30d137d3d.jpg",
          "size": 3969917,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc7683fd32baabdd8c52",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc768bf07f392daf34f7.mov",
          "size": 2928225,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76f92d2f673811fb6e.png",
          "size": 7106176,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76eb62402fa789e776.mov",
          "size": 4941889,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc763732601da0e83172.jpg",
          "size": 8351682,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d4a2050084bf6839.avi",
          "size": 2250228,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d9c420133cf752e2.avi",
          "size": 8985364,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76468866682ebc772d.avi",
          "size": 2204630,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc763339022ab62ff7bb.png",
          "size": 6003768,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc76beeed68c775f0f58",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc7696dba06634b08ed7.mov",
          "size": 2210148,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7659c172880ffd2c7b.avi",
          "size": 3304858,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc761098e7c1d4167e70.avi",
          "size": 3736355,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76614200aa49b3463f.png",
          "size": 5437809,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76988e2cfd9b36bdc1.avi",
          "size": 6145520,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76fde112225a760ec9.png",
          "size": 9074121,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7694e6fce56d76fd13.avi",
          "size": 6223015,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76975e9a5d90167350.mov",
          "size": 2973728,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76c18b9f5dc2342f6d.mov",
          "size": 4805059,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76413f3894d377ff8c.png",
          "size": 7092238,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc76dad0025d0013b269",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc76bed6fef724b0111b.png",
          "size": 4741922,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7653c106f3ff94d4a6.png",
          "size": 1815577,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76e5a39d29dd754073.png",
          "size": 8841326,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76dd18f31381b83ca0.mov",
          "size": 5645008,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76823e206f021f2a62.png",
          "size": 9657609,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76ff8d75423faae9b7.png",
          "size": 2661152,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc764b57b976a8975c0e.jpg",
          "size": 6296482,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc7665173f0b205bd4d5",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc76acb45b3ff7857d2c.avi",
          "size": 1730212,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7663b75cd419b2d28d.mov",
          "size": 6699074,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc763e9141b381431486.jpg",
          "size": 4136134,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc7698438a6307c0db65.png",
          "size": 6845093,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc769beac43ce65e182b.png",
          "size": 4815072,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76eea53bc9cfb2cca9.mov",
          "size": 4040611,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76f68e3a96be2e8f61.jpg",
          "size": 3186803,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760555b5284a4947d8.jpg",
          "size": 7079751,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d397fee3ab6e6e85.mov",
          "size": 7054497,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fc762eaaad4ab6bb5290",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fc766f214ae8c65f4fe6.mov",
          "size": 7548232,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc761a4d5a739b2905ae.png",
          "size": 3722975,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc767ad4c460f83bc529.jpg",
          "size": 2614292,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d6313e789c972733.mov",
          "size": 9912341,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76d7249f0172d6782e.mov",
          "size": 9584263,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76f684669fa5ccf920.jpg",
          "size": 9886322,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc767f4c4509a1f32685.mov",
          "size": 6817628,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76ca53c16ea9ed54ba.mov",
          "size": 1025941,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc760b2ba5217e88f4c7.png",
          "size": 4730790,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fc76a367cf78de606c06.png",
          "size": 5977986,
          "collapsed": true
        }
      ]
    }
  ];
  
  var mockdata2 = [
    {
      "type": "bucket",
      "name": "EMPTY_bucket-58d4fcd89b736f08e8ea3125",
      "collapsed": true,
      "children": []
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fcd8494b2f253f52966c",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fcd80d7a723121c21474.avi",
          "size": 8116463,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd867da5827fa761adc.mov",
          "size": 2091091,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8af5c028e2811ec4e.mov",
          "size": 4722094,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd81a48b5d56a85fe62.png",
          "size": 4236823,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd857de51894199432b.png",
          "size": 8741326,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8a6255b2f9668f1a9.avi",
          "size": 5126110,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd891bb8d97eb52aa74.png",
          "size": 8522780,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd879b95c879922656e.jpg",
          "size": 3305342,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8674debbaafc6caec.png",
          "size": 1120719,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd84174df3d3c5bb72d.avi",
          "size": 9116678,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fcd872ac01d39f020f33",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fcd8321d9d07a7162515.mov",
          "size": 4498105,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd87fb18dadbd6faa43.png",
          "size": 2846764,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd876e63aab2d216e4d.mov",
          "size": 2599874,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd86c8bb68f72f40770.jpg",
          "size": 3139103,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8141468d5397e73ba.jpg",
          "size": 8221966,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8de62d2818442f91c.png",
          "size": 9493551,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd852f4d5229d01236c.png",
          "size": 2330279,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd809ee32ce1871b45d.avi",
          "size": 9674616,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd88192211c4da0a28a.mov",
          "size": 8843897,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fcd8a8aefc1c76fa8deb",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fcd864f8987c6a655598.avi",
          "size": 5983839,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8045aa62dc819091e.jpg",
          "size": 9091400,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8cc07b69eb278cf54.jpg",
          "size": 1765466,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8058e8c25715c27dd.jpg",
          "size": 3341577,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8ae2a97f1981882d1.jpg",
          "size": 5468242,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd87173e19d0a0fb119.jpg",
          "size": 4843859,
          "collapsed": true
        }
      ]
    },
    {
      "type": "bucket",
      "name": "bucket-58d4fcd89f27b721bae030f3",
      "collapsed": true,
      "children": [
        {
          "type": "file",
          "name": "file-58d4fcd8879a445208abdbcd.mov",
          "size": 8459745,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd84b146f221287e6d8.jpg",
          "size": 3371696,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8ee7652d5b3c3d0b1.jpg",
          "size": 2159724,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd80a5776ca24ac3678.mov",
          "size": 2159120,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd8d40f8b6d47706de2.png",
          "size": 9406138,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd88d01d0d61db12077.avi",
          "size": 8216616,
          "collapsed": true
        },
        {
          "type": "file",
          "name": "file-58d4fcd87237154dd04f8d68.avi",
          "size": 4674960,
          "collapsed": true
        }
      ]
    }
  ];
  