text:
<file_sep>#include<stdio.h>
#include<stdlib.h>
#include<time.h>

int main()
{
    int number,guess,nguesses=1;
    srand(time(0));
    number=rand()%100 +1;
    do
    {
        printf("======Guess a number between 1 to 100=====\n");
        scanf("%d", &guess);
        if (guess>number)
        {
            printf("Lower number please\n");
        }
        else if (guess<number)
        {
             printf("Higher number please\n");
        }
        else
        {
            printf("You guessed it correctly in %d attempts\n", nguesses);
        }
        nguesses++;

    } while (guess!=number);

    return 0;
}

branch_name: refs/heads/main

repo_language: C


text:
<repo_name>crankycoder/learn-react<file_sep>/Makefile
all: webpack

webpack:
	webpack -d

babelify:
	babel --plugins babel-plugin-transform-react-jsx src/index.jsx > build/index.js

<file_sep>/src/index.jsx
import React from 'react';
import ReactDOM from 'react-dom';
require('./index.css');

function handleClick(wishlist, index) {
    // This is basically a delete operation
    // Copy, splice and set the new list if item is clicked
    const items = wishlist.state.items.slice();
    items.splice(index, 1);
    wishlist.setState({items: items});
}

class WishlistItem extends React.Component {
    constructor() {
        super();
    }

    render() {
        return React.createElement(
            'li',
            null,
            React.createElement(
                'div',
                {className: 'wishlist-item'},
                [
                    React.createElement(
                        'h3',
                        {className: 'item-description'},
                        React.createElement(
                            'a',
                            {href: this.props.url},
                            this.props.description,
                        )
                    ),
                    React.createElement(
                        'div',
                        {
                            className: 'delete_button',
                            onClick: () => this.props.handleClick(this.props.wishlist, this.props.item_index),
                        },
                        "X",
                    ),
                    React.createElement(
                        'p',
                        {className: 'item-price'},
                        this.props.price,
                    ),
                    React.createElement(
                        'img',
                        {src: this.props.image,
                            width: '200',
                            height: '200',
                        },
                        null,
                    ),

                ],
            )
        );
    }
}

class Wishlist extends React.Component {
    constructor() {
        super();

        this.state = {
            items: [
                {
                    description: "Vantrue N2 Dashcam",
                    price: "$200",
                    url: "https://www.amazon.ca/Vantrue-N2-Dual-Dash-Cam/dp/B01IHLKZ0I",
                    image: "https://images-na.ssl-images-amazon.com/images/I/617lYhsy%2BJL._AC_UL115_.jpg",
                },
                {
                    description: "NETGEAR Orbi Home WiFi System: AC3000 Tri Band Home Network with Router & Satellite Extender for up to 5000sqft of WiFi coverage (RBK50-100CNS)",
                    price: "$549.80",
                    url: "https://www.amazon.ca/NETGEAR-High-Performance-AC3000-Tri-Band-RBK50-100CNS/dp/B01LY964U3",
                    image: "https://images-na.ssl-images-amazon.com/images/I/51MrEm%2BeFfL._SL1350_.jpg",
                },
            ],
        };

        // TODO: register listeners here
    }

    renderItem(i) {
        var items = this.state.items.slice();
        var wish_item = items[i];
        return React.createElement(WishlistItem,
            {
                description: wish_item.description,
                price: wish_item.price,
                url: wish_item.url,
                image: wish_item.image,
                item_index: i,
                handleClick: handleClick,
                wishlist: this,
            });
    }

    render() {
        var itemElements = [];

        for (var index in this.state.items) {
            var item = this.renderItem(index);
            itemElements.push(item);
        }

        return React.createElement(
            'div',
            { className: 'wishlist' },
            React.createElement('ul',
                {className: 'some-list'},
                itemElements,
            )
        );
    }

}

// ========================================

ReactDOM.render(React.createElement(Wishlist, null), document.getElementById('app'));

branch_name: refs/heads/master

languages: Makefile JavaScript

repo_language: Makefile

repo_name: crankycoder/learn-react


text:
<file_sep>#!/usr/bin/env bash
set -e
npx standard
<file_sep>import Base from './Base'
import { createData } from '../../utils'

export default function Today (props) {
  const rows = [
    createData(0, 1, '<NAME>', 'http://example.com'),
    createData(1, 2, '<NAME>', 'http://example.com'),
    createData(2, 3, '<NAME>', 'http://example.com'),
    createData(3, 4, '<NAME>', 'http://example.com'),
    createData(4, 5, '<NAME>', 'http://example.com')
  ]

  return <Base rows={rows} duration='Today' />
}
<file_sep>import Base from './Base'
import { createData } from '../../utils'

export default function Today (props) {
  const rows = [
    createData(0, 1, '<NAME>', 'http://example.com'),
    createData(1, 2, '<NAME>', 'http://example.com'),
    createData(2, 3, '<NAME>', 'http://example.com'),
    createData(3, 4, '<NAME>', 'http://example.com'),
    createData(4, 5, '<NAME> of Arathon', 'http://example.com')
  ]

  return <Base rows={rows} duration='Month' />
}
<file_sep># React Template

Template to get started with ReactJS development.

## Installation
Run the following to start the Docker container:

```
./scripts/env.sh
```

Once inside the container, run the project by doing:

```
npm install
npm start
```

## Linters
Run the linter by doing:

```
./scripts/env.sh
./scripts/lint.sh
```
<file_sep>import Base from './Base'
import { createData } from '../../utils'

export default function Week (props) {
  const rows = [
    createData(0, 1, '<NAME>', 'http://example.com'),
    createData(1, 2, '<NAME>', 'http://example.com'),
    createData(2, 3, '<NAME>', 'http://example.com'),
    createData(3, 4, '<NAME>', 'http://example.com'),
    createData(4, 5, '<NAME>', 'http://example.com')
  ]

  return <Base rows={rows} duration='Week' />
}
<file_sep>export function createData (id, rank, title, link) {
  return { id, rank, title, link }
}
<file_sep>#!/usr/bin/env bash
set -e
docker build --tag react-template .
docker run --rm -it -v $(pwd):/opt/source -p 3000:3000 react-template bash
<file_sep>FROM node:16-slim
WORKDIR /opt/source/
RUN npm install --global standard
COPY . ./
<file_sep>import Today from './components/Scoops/Today'
import Week from './components/Scoops/Week'
import Month from './components/Scoops/Month'

export const routes = [
  {
    path: '/',
    text: 'Today',
    Content: () => <Today />
  },
  {
    path: '/week/',
    text: 'This Week',
    Content: () => <Week />
  },
  {
    path: '/month/',
    text: 'This Month',
    Content: () => <Month />
  }
]
<file_sep>import React from 'react'
import { makeStyles } from '@material-ui/core/styles'
import CssBaseline from '@material-ui/core/CssBaseline'
import Main from './Main'
import SideMenu from './SideMenu'
import TopBar from './TopBar'
import { BrowserRouter as Router } from 'react-router-dom'

const useStyles = makeStyles((theme) => ({
  root: {
    display: 'flex'
  }
}))

export default function App () {
  const classes = useStyles()
  const [open, setOpen] = React.useState(true)
  const handleDrawerOpen = () => {
    setOpen(true)
  }
  const handleDrawerClose = () => {
    setOpen(false)
  }
  return (

      <CssBaseline />
      <TopBar open={open} handleDrawerOpen={handleDrawerOpen} />
      <Router>
        <SideMenu open={open} handleDrawerClose={handleDrawerClose} />

      </Router>

  )
}
<file_sep>import React from 'react'
import Link from '@material-ui/core/Link'
import { makeStyles } from '@material-ui/core/styles'
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
import TableCell from '@material-ui/core/TableCell'
import TableHead from '@material-ui/core/TableHead'
import TableRow from '@material-ui/core/TableRow'
import Title from '../Title'

function preventDefault (event) {
  event.preventDefault()
}

const useStyles = makeStyles((theme) => ({
  seeMore: {
    marginTop: theme.spacing(3)
  }
}))

export default function Scoops (props) {
  const classes = useStyles()
  const rows = props.rows

  return (
    <>
      <Title>{props.duration}</Title>

        <TableHead>
          <TableRow>
            <TableCell>Rank</TableCell>
            <TableCell>Title</TableCell>
          </TableRow>
        </TableHead>
        <TableBody>
          {rows.map((row) => (
            <TableRow key={row.id}>
              <TableCell>{row.rank}</TableCell>
              <TableCell>{row.title}</TableCell>
            </TableRow>
          ))}
        </TableBody>

        <Link color='primary' href='#' onClick={preventDefault}>
          See more scoops
        </Link>

    </>
  )
}

languages: Markdown Shell JavaScript Dockerfile

repo_language: Markdown

repo_name: prixite/react-mui


text:
<repo_name>msdotnetclr/midemoapp<file_sep>/sql/script.sql
CREATE USER midemoapp FROM EXTERNAL PROVIDER

ALTER ROLE db_datareader ADD MEMBER midemoapp -- gives permission for normal app read to database
ALTER ROLE db_datawriter ADD MEMBER midemoapp -- gives permission for normal app write to database
<file_sep>/midemofunc.cs
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
using Microsoft.Azure.Services.AppAuthentication;
using System.Data.SqlClient;
using Microsoft.Azure.WebJobs.Extensions.Http;
using System;

namespace midemoapp
{
    public static class midemofunc
    {
        [FunctionName("midemofunc")]
        public static async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
            ILogger log)
        {
            log.LogInformation("C# HTTP trigger function processed a request.");

            var token = await new AzureServiceTokenProvider().GetAccessTokenAsync("https://database.windows.net/");
            var connectionstring = Environment.GetEnvironmentVariable("dbconnection");
            using (var connection = new SqlConnection(connectionstring))
            {
                try
                {
                    connection.AccessToken = token;
                    connection.Open();
                    var cmd = connection.CreateCommand();
                    cmd.CommandText = "SELECT GETDATE()";
                    using (var sr = cmd.ExecuteReader())
                    {
                        sr.Read();
                        string responseMessage = sr.GetDateTime(0).ToString();

                        return new OkObjectResult(responseMessage);

                    }
                }
                catch(Exception ex)
                {
                    log.LogError(ex, ex.Message);
                    return new BadRequestObjectResult(ex);
                }
            }
        }
    }
}

languages: C# SQL

repo_language: C#

repo_name: msdotnetclr/midemoapp


text:
<repo_name>Jasmeet97/Blood-Bank<file_sep>/README.md
# Blood Bank App
In this app there are two apps combined. The one is for simple searching the donor searching the blood bank based on the latitude and longtitute LOCATION MANAGER class is there in android we have used that

The server codes u have to upload befre running the app..i used ftp cute professional to upload code Database should be accordingly The range of the app to serch is only 2to5 km u can see the php code and increase the range accordingly. My subscription to cloud has ended so it may not run just chnage the cloud configurations and upload the server code and make chnages i database according to the range it will work fine

The second app which is there is lyk it wil work without network ..means if u switch to tat mode u can use without network and u can send message to the server for asking the blood group wich u want..range 100m For that run the gossip server code on command prompt instructions given!!
<file_sep>/Team_15/BloodDonor_latest/src/com/project/BloodDonor/RegisterDonor.java
package com.project.BloodDonor;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLEncoder;

import android.app.Activity;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;

public class RegisterDonor extends Activity {
    /** Called when the activity is first created. */
	String uid,phone;
	EditText txtPhone,txtBG;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.register);
        txtPhone=(EditText)findViewById(R.id.txtRPhone);
        txtBG=(EditText)findViewById(R.id.txtBloodGroup);

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);
    }

    public void save(View v){
  		String phone,bg;
  		String totaldata="",inputline="";
  		phone=URLEncoder.encode(txtPhone.getText().toString());
  		bg=URLEncoder.encode(txtBG.getText().toString());

  		try{
  			URL u=new URL("http://myspace.belgaumonline.com/ayesha/savedonor.php?phone="+ phone + "&bg=" + bg);
  			BufferedReader br=new BufferedReader(new InputStreamReader(u.openStream()));
  			while((inputline=br.readLine())!=null){
  				totaldata=totaldata + inputline;
  			}
  		}catch (Exception e) {
			Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show();
		}
  		if(totaldata.contains("already exists")){
  			Toast.makeText(getApplicationContext(), totaldata, Toast.LENGTH_LONG).show();
  		}else{
  			Toast.makeText(getApplicationContext(), totaldata, Toast.LENGTH_LONG).show();
  			SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
	    	 SharedPreferences.Editor editor = preferences.edit();
	    	 editor.putString("phone",phone);
	    	 editor.commit();
  		}
  	}
  }<file_sep>/gossip servefr/GossipServer.java
import java.io.*;
import java.net.*;
class GossipServer
{
	public static void main(String[] args) throws Exception
	{
		ServerSocket sersock = new ServerSocket(4444);
		System.out.println("Server  ready for chatting");
		Socket sock = sersock.accept( );
		// reading from keyboard (keyRead object)
		BufferedReader keyRead = new BufferedReader(new InputStreamReader(System.in));
		// sending to client (pwrite object)
		OutputStream ostream = sock.getOutputStream();
		PrintWriter pwrite = new PrintWriter(ostream, true);
		String a,b;

		// receiving from server ( receiveRead  object)
		InputStream istream = sock.getInputStream();
		BufferedReader receiveRead = new BufferedReader(new InputStreamReader(istream));

		String receiveMessage, sendMessage;
		while(true)
		{
		    pwrite.println("gsg");
			a=receiveRead.readLine();
			b=receiveRead.readLine();

			System.out.println(a+""+b);
			pwrite.flush();
		}
    }
}

<file_sep>/Team_15/BloodDonor_latest/src/com/project/BloodDonor/BloodDonorActivity.java
package com.project.BloodDonor;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.URL;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.os.StrictMode;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

public class BloodDonorActivity extends Activity {
    /** Called when the activity is first created. */
	String lngVal;
	String latVal;
	String uid,phone;
	LocationManager lm;
	TextView txtLat,txtLng,txtPhone;
	Button btn11;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        btn11=(Button)findViewById(R.id.bbbb);
        txtLat=(TextView)findViewById(R.id.txtLat);
        txtLng=(TextView)findViewById(R.id.txtLng);
        txtPhone=(TextView)findViewById(R.id.txtHomePhone);

        btn11.setOnClickListener(new OnClickListener() {
			public void onClick(View arg0) {

				// Start NewActivity.class
				Intent myIntent = new Intent(BloodDonorActivity.this,
						adhoc_chat.class);
				startActivity(myIntent);
			}

		});

        StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
        StrictMode.setThreadPolicy(policy);

        MyLocationListener mll=new MyLocationListener();

        lm=(LocationManager)getSystemService(Context.LOCATION_SERVICE);
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 2000, 2, mll);

        //..........Check if details saved
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
        phone=preferences.getString("phone","");

        if(phone.compareTo("")==0){
        	Toast.makeText(getApplicationContext(), "Please register to use the Application", Toast.LENGTH_LONG).show();
        }else{
        	txtPhone.setText(phone);
        }
    }

    //...Menu
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.mainmenu, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	switch (item.getItemId()) {
            case R.id.mnuRegister:
            	//..Open Configure Activity
            	Intent i=new Intent(BloodDonorActivity.this,RegisterDonor.class);
            	startActivity(i);
            	return true;

		    case R.id.mnuSearchDonor:
		    	//..Open Configure Activity
		    	Intent i1=new Intent(BloodDonorActivity.this,SearchDonor.class);
		    	startActivity(i1);
		    	return true;

		    case R.id.mnuSearchBank:
		    	//..Open Configure Activity
		    	Intent i2=new Intent(BloodDonorActivity.this,SearchBloodBank.class);
		    	startActivity(i2);
		    	return true;
    	}
		return false;
    }

    private class MyLocationListener implements LocationListener{
		public void onLocationChanged(Location lcn) {
			lngVal = String.format("%1$s",lcn.getLongitude());
    		latVal = String.format("%1$s",lcn.getLatitude());
			txtLat.setText(latVal);
			txtLng.setText(lngVal);
			//.......Update the location in the cloud server
			if(latVal.compareTo("")==0 || lngVal.compareTo("")==0 || phone.compareTo("")==0){
	       		 //Toast.makeText(getApplicationContext(), "Please register before we update your location", Toast.LENGTH_LONG).show();
	       	}else{
	       		String inputline="",totaldata="";
	       		try{
	    			URL u=new URL("http://myspace.belgaumonline.com/ayesha/updatelocation.php?lat="+ latVal + "&lng=" + lngVal + "&phone=" + phone);
				 	BufferedReader br=new BufferedReader(new InputStreamReader(u.openStream()));
	    	  		while((inputline=br.readLine())!=null){
	    	  			totaldata=totaldata + inputline;
	    	  		}
	    	  		SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
	    	  		SharedPreferences.Editor editor1 = preferences.edit();
	    	  		editor1.putString("lat",latVal);
	    	  		editor1.putString("lng",lngVal);
	    	  		editor1.commit();
	    	  		//Toast.makeText(getApplicationContext(), totaldata, Toast.LENGTH_LONG).show();
	       		}catch (Exception e) {
	       			Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_LONG).show();
			 	}
	       	}
		}
    	public void onStatusChanged(String s, int i, Bundle b) {}
    	public void onProviderDisabled(String s) {}
    	public void onProviderEnabled(String s) {}
	}
}<file_sep>/Team_15/BloodDonor_latest/src/com/project/BloodDonor/adhoc_chat.java
package com.project.BloodDonor;

import android.app.*;
import android.os.*;
import java.io.IOException;
import java.io.PrintWriter;
import java.net.Socket;
import java.net.UnknownHostException;
import android.util.Log;
import android.content.Context;
import android.widget.*;
import android.os.*;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.util.Log;
import android.content.Context;
import android.widget.*;
import android.os.*;

public class adhoc_chat extends Activity implements LocationListener
{

	@Override
	public void onLocationChanged(Location p1)
	{
		latitude=p1.getLatitude();
		longitude=p1.getLongitude();
		// TODO: Implement this method
	}

	@Override
	public void onStatusChanged(String p1, int p2, Bundle p3)
	{
		// TODO: Implement this method
		Log.d("Latitude","status");
	}

	@Override
	public void onProviderEnabled(String p1)
	{
		// TODO: Implement this method
		Log.d("Latitude","enable");
	}

	@Override
	public void onProviderDisabled(String p1)
	{
		// TODO: Implement this method
		Log.d("Latitude","disable");
	}
	protected double latitude,longitude,flag=0;
	private Socket client;
	private PrintWriter printwriter;
	private EditText textField,dd;
	private Button button;
	private String messsage,ip;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.adhoc_chat);
		textField = (EditText) findViewById(R.id.editText1); // reference to the text field
		button = (Button) findViewById(R.id.button1); // reference to the send button
		dd = (EditText) findViewById(R.id.editText2);
		// Button press event listener
		button.setOnClickListener(new View.OnClickListener() {

				public void onClick(View v) {
					ip=dd.getText().toString();
					messsage = textField.getText().toString(); // get the text message on the text field
					textField.setText(""); // Reset the text field to blank
					SendMessage sendMessageTask = new SendMessage();
					sendMessageTask.execute();
				}
			});
	}

	private class SendMessage extends AsyncTask<Void, Void, Void> {

		@Override
		protected Void doInBackground(Void... params) {
			try {

				String l=Double.toString(latitude);
				String x=Double.toString(longitude);
				client = new Socket(ip, 4444); // connect to the server
				printwriter = new PrintWriter(client.getOutputStream(), true);
				printwriter.write(messsage); // write the message to output stream
                printwriter.write(l);
				printwriter.write(x);
				printwriter.flush();
				printwriter.close();
				client.close(); // closing the connection

			} catch (UnknownHostException e) {
				e.printStackTrace();
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		//getMenuInflater().inflate(R.menu.slimple_text_client, menu);
		return true;
    }
}

languages: Java Markdown

repo_language: Java


text:
<file_sep>{{#link-to "card.detail" card.id}}
    {{card.name}} ({{count}})
{{/link-to}}

{{#if imageUrl}}

{{/if}}
<file_sep>

                <button {{action createNewDeck}} class="btn btn-default">
                    Create New Deck
                </button>

                {{#each deck in content}}
                    {{#link-to "deck.detail" deck.id classNames="list-group-item"}}
                        {{deck.title}}
                    {{/link-to}}
                {{/each}}

        {{outlet}}

<file_sep>MTG.DeckEditController = Ember.ObjectController.extend(MTG.WebSocketMixin, {
    joined: false,

    selectedCards: [],

    actions: {
        selectCard: function (card) {
            var self = this;
            var deck = this.get('content');
            var path = deck.get('path');

            var data = [
                {
                    card: card.get('id')
                }
            ];

            var postData = {
                data: JSON.stringify(data)
            };

            MTG.Ajax.post(path + 'update_cards/', postData).then(function () {
                self.get('selectedCards').addObject(card);
                MTG.socket('deck').emit('deck_update', deck.get('id'));
            });
        },

        revertDeck: function () {
            this.get('selectedCards').clear();
        }
    },

    init: function () {
        this._super();
    },

    cardList: function () {
        return this.store.find('card');
    }.property(),

    deckLoaded: function () {
        if(this.get('content.id') && !this.get('joined')) {
            MTG.socket('deck').emit('join', this.get('content.id'));
            this.toggleProperty('joined');
        }
    }.observes('content.id'),

    deckUpdated: function () {
        this.get('content').reload();
    }.onEvent('deck', 'deck_update')
});
<file_sep>

    <form class="form-horizontal col-sm-12">

            Deck name

                {{input value=content.name class="form-control" placeholder="Name"}}

            Private?

                {{input type="checkbox" value=content.private class="form-control"}}

    </form>

<file_sep>

        {{render "card.list" content}}

        {{view MTG.CardDetailView}}

<file_sep>@import '../../vendor/bootstrap/less/bootstrap';
@import (inline) '../../vendor/ionicons/css/ionicons.css';

html, body {
    height: 100%;
    min-height: 100%;

    .container, .ember-view {
        height: 100%;
        min-height: 100%;
    }

    h2, h3, h4 {
        margin-top: 0;
        padding-top: 0;
    }

    .clickable {
        cursor: pointer;
    }
}

@import 'card-list';
@import 'card-detail';

@import 'deck';
@import 'deck-edit';

@import 'register';
<file_sep>

            {{title}}
            {{size}} cards

        {{#if canEdit}}
            {{#link-to "deck.edit" id classNames="btn btn-default"}}
                Edit
            {{/link-to}}

                Delete

        {{/if}}

            Creatures ({{collection-count creatures}})

            {{deck-card-list collection=creatures}}

            Enchantments ({{collection-count enchantments}})

            {{deck-card-list collection=enchantments}}

            Instants ({{collection-count instants}})

            {{deck-card-list collection=instants}}

            Sorceries ({{collection-count sorceries}})

            {{deck-card-list collection=sorceries}}

            Lands ({{collection-count lands}})

            {{deck-card-list collection=lands}}

<file_sep>Ember.TEMPLATES["application"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashTypes, hashContexts, self=this, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

function program1(depth0,data) {

  var buffer = '', stack1, stack2, hashTypes, hashContexts, options;
  data.buffer.push("\n
\n                        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(2, program2, data),contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "deck", options) : helperMissing.call(depth0, "link-to", "deck", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n
\n                        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(4, program4, data),contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "search", options) : helperMissing.call(depth0, "link-to", "search", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n                ");
  return buffer;
  }
function program2(depth0,data) {

  data.buffer.push("Decks");
  }

function program4(depth0,data) {

  data.buffer.push("Search");
  }

function program6(depth0,data) {

  var buffer = '', stack1, stack2, hashTypes, hashContexts, options;
  data.buffer.push("\n
\n                        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(7, program7, data),contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "login", options) : helperMissing.call(depth0, "link-to", "login", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n
\n                        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(9, program9, data),contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "register", options) : helperMissing.call(depth0, "link-to", "register", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n                ");
  return buffer;
  }
function program7(depth0,data) {

  data.buffer.push("Login");
  }

function program9(depth0,data) {

  data.buffer.push("Register");
  }

function program11(depth0,data) {

  var buffer = '', stack1, stack2, hashTypes, hashContexts, options;
  data.buffer.push("\n
\n                        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(12, program12, data),contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "logout", options) : helperMissing.call(depth0, "link-to", "logout", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n                ");
  return buffer;
  }
function program12(depth0,data) {

  data.buffer.push("Logout");
  }

  data.buffer.push("
\n
\n
\n            mtgapp\n
\n\n
\n
\n                ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "session.isAuthenticated", {hash:{},inverse:self.program(6, program6, data),fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n
\n\n
\n                ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "session.isAuthenticated", {hash:{},inverse:self.noop,fn:self.program(11, program11, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n
\n
\n
\n
\n\n
\n    ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "outlet", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n
\n");
  return buffer;

});

Ember.TEMPLATES["card"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var hashTypes, hashContexts, escapeExpression=this.escapeExpression;

  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "outlet", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));

});

Ember.TEMPLATES["card/card-detail"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashContexts, hashTypes, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

  data.buffer.push("
\n
\n        \n
\n\n
\n
");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "card.name", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("
\n\n
\n            ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.breaklines || (depth0 && depth0.breaklines)),stack1 ? stack1.call(depth0, "card.text", options) : helperMissing.call(depth0, "breaklines", "card.text", options))));
  data.buffer.push("\n
\n
\n
\n\n");
  return buffer;

});

Ember.TEMPLATES["card/card-list"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, stack2, hashContexts, hashTypes, options, escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this;

function program1(depth0,data) {

  var buffer = '', stack1, hashTypes, hashContexts, options;
  data.buffer.push("\n        <a href=\"#\" ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "selectCard", "card", {hash:{},contexts:[depth0,depth0],types:["ID","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(" ");
  hashContexts = {'id': depth0};
  hashTypes = {'id': "ID"};
  options = {hash:{
    'id': ("card.id")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['bind-attr'] || (depth0 && depth0['bind-attr'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bind-attr", options))));
  data.buffer.push(">\n
");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.unbound.call(depth0, "card.name", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("
\n        \n    ");
  return buffer;
  }

  data.buffer.push("
\n
\n        ");
  hashContexts = {'value': depth0,'classNames': depth0,'placeholder': depth0};
  hashTypes = {'value': "ID",'classNames': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'value': ("searchQuery"),
    'classNames': ("form-control"),
    'placeholder': ("Search...")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n\n
\n        <button class=\"btn btn-default\" ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "toggleFilters", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(">\n            Filters\n        </button>\n
\n
\n\n
\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["STRING"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.render || (depth0 && depth0.render)),stack1 ? stack1.call(depth0, "filter", options) : helperMissing.call(depth0, "render", "filter", options))));
  data.buffer.push("\n
\n
\n\n
\n    ");
  hashTypes = {};
  hashContexts = {};
  stack2 = helpers.each.call(depth0, "card", "in", "content", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0,depth0,depth0],types:["ID","ID","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n");
  return buffer;

});

Ember.TEMPLATES["components/deck-card-detail"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, stack2, hashTypes, hashContexts, options, escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this;

function program1(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n    ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "card.name", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(" (");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "count", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(")\n");
  return buffer;
  }

function program3(depth0,data) {

  var buffer = '', stack1, hashContexts, hashTypes, options;
  data.buffer.push("\n    \n");
  return buffer;
  }

  hashTypes = {};
  hashContexts = {};
  options = {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "card.detail", "card.id", options) : helperMissing.call(depth0, "link-to", "card.detail", "card.id", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n\n");
  hashTypes = {};
  hashContexts = {};
  stack2 = helpers['if'].call(depth0, "imageUrl", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n");
  return buffer;

});

Ember.TEMPLATES["components/deck-card-list"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;

function program1(depth0,data) {

  var buffer = '', stack1, hashTypes, hashContexts, options;
  data.buffer.push("\n
\n            ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "edit", {hash:{},inverse:self.noop,fn:self.program(2, program2, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n\n            ");
  hashContexts = {'card': depth0,'count': depth0};
  hashTypes = {'card': "ID",'count': "ID"};
  options = {hash:{
    'card': ("detail.card"),
    'count': ("detail.count")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-detail'] || (depth0 && depth0['deck-card-detail'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-detail", options))));
  data.buffer.push("\n
\n    ");
  return buffer;
  }
function program2(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n                \n                    \n                    \n                \n            ");
  return buffer;
  }

function program4(depth0,data) {

  data.buffer.push("\n        None\n    ");
  }

  data.buffer.push("
\n    ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers.each.call(depth0, "detail", "in", "collection", {hash:{},inverse:self.program(4, program4, data),fn:self.program(1, program1, data),contexts:[depth0,depth0,depth0],types:["ID","ID","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n
\n");
  return buffer;

});

Ember.TEMPLATES["components/modal"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashTypes, hashContexts, escapeExpression=this.escapeExpression, self=this;

function program1(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n                <button type=\"button\" class=\"btn btn-primary\" ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "confirm", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(">\n                    ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "confirmText", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n                </button>\n            ");
  return buffer;
  }

function program3(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n                <button type=\"button\" class=\"btn btn-default\" ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "cancel", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(">\n                    ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "cancelText", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n                </button>\n            ");
  return buffer;
  }

  data.buffer.push("
\n
\n
\n            <button type=\"button\" class=\"close\" ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "cancel", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(">×</button>\n
");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "headerText", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("
\n
\n
\n            ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "contentViewClass", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n
\n
\n            ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "confirmText", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n\n            ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "cancelText", {hash:{},inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n
\n
\n
\n");
  return buffer;

});

Ember.TEMPLATES["deck"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, stack2, hashContexts, hashTypes, options, escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;

function program1(depth0,data) {

  var buffer = '', stack1, stack2, hashContexts, hashTypes, options;
  data.buffer.push("\n                    ");
  hashContexts = {'classNames': depth0};
  hashTypes = {'classNames': "STRING"};
  options = {hash:{
    'classNames': ("list-group-item")
  },inverse:self.noop,fn:self.program(2, program2, data),contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "deck.detail", "deck.id", options) : helperMissing.call(depth0, "link-to", "deck.detail", "deck.id", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n                ");
  return buffer;
  }
function program2(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n                        ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "deck.title", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n                    ");
  return buffer;
  }

  data.buffer.push("
\n
\n
\n
\n                <button ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.action.call(depth0, "createNewDeck", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(" class=\"btn btn-default\">\n                    Create New Deck\n                </button>\n
\n
\n\n
\n
\n                ");
  hashTypes = {};
  hashContexts = {};
  stack2 = helpers.each.call(depth0, "deck", "in", "content", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0,depth0,depth0],types:["ID","ID","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n
\n
\n\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "outlet", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n
\n
\n");
  return buffer;

});

Ember.TEMPLATES["deck/deck-create"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashContexts, hashTypes, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

  data.buffer.push("
\n    <form class=\"form-horizontal col-sm-12\">\n
\n            Deck name\n
\n                ");
  hashContexts = {'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'value': ("content.name"),
    'class': ("form-control"),
    'placeholder': ("Name")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n            Private?\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING"};
  options = {hash:{
    'type': ("checkbox"),
    'value': ("content.private"),
    'class': ("form-control")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n    </form>\n
\n");
  return buffer;

});

Ember.TEMPLATES["deck/deck-detail"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashTypes, hashContexts, options, self=this, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

function program1(depth0,data) {

  var buffer = '', stack1, stack2, hashContexts, hashTypes, options;
  data.buffer.push("\n            ");
  hashContexts = {'classNames': depth0};
  hashTypes = {'classNames': "STRING"};
  options = {hash:{
    'classNames': ("btn btn-default")
  },inverse:self.noop,fn:self.program(2, program2, data),contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "deck.edit", "id", options) : helperMissing.call(depth0, "link-to", "deck.edit", "id", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n\n            \n                Delete\n            \n        ");
  return buffer;
  }
function program2(depth0,data) {

  data.buffer.push("\n                Edit\n            ");
  }

  data.buffer.push("
\n
\n
\n            ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "title", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n            ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "size", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push(" cards\n
\n
\n\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "canEdit", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n
\n
\n\n
\n
\n
\n            Creatures (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "creatures", options) : helperMissing.call(depth0, "collection-count", "creatures", options))));
  data.buffer.push(")\n\n            ");
  hashContexts = {'collection': depth0};
  hashTypes = {'collection': "ID"};
  options = {hash:{
    'collection': ("creatures")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n\n
\n            Enchantments (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "enchantments", options) : helperMissing.call(depth0, "collection-count", "enchantments", options))));
  data.buffer.push(")\n\n            ");
  hashContexts = {'collection': depth0};
  hashTypes = {'collection': "ID"};
  options = {hash:{
    'collection': ("enchantments")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n            Instants (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "instants", options) : helperMissing.call(depth0, "collection-count", "instants", options))));
  data.buffer.push(")\n\n            ");
  hashContexts = {'collection': depth0};
  hashTypes = {'collection': "ID"};
  options = {hash:{
    'collection': ("instants")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n\n
\n            Sorceries (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "sorceries", options) : helperMissing.call(depth0, "collection-count", "sorceries", options))));
  data.buffer.push(")\n\n            ");
  hashContexts = {'collection': depth0};
  hashTypes = {'collection': "ID"};
  options = {hash:{
    'collection': ("sorceries")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n            Lands (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "lands", options) : helperMissing.call(depth0, "collection-count", "lands", options))));
  data.buffer.push(")\n\n            ");
  hashContexts = {'collection': depth0};
  hashTypes = {'collection': "ID"};
  options = {hash:{
    'collection': ("lands")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n\n
\n\n
\n
\n");
  return buffer;

});

Ember.TEMPLATES["deck/deck-edit"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, stack2, hashTypes, hashContexts, options, escapeExpression=this.escapeExpression, helperMissing=helpers.helperMissing, self=this;

function program1(depth0,data) {

  var buffer = '', hashTypes, hashContexts;
  data.buffer.push("\n                    \n                ");
  return buffer;
  }

function program3(depth0,data) {

  data.buffer.push("\n                    Done\n                ");
  }

  data.buffer.push("
\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.render || (depth0 && depth0.render)),stack1 ? stack1.call(depth0, "card.list", "cardList", options) : helperMissing.call(depth0, "render", "card.list", "cardList", options))));
  data.buffer.push("\n
\n\n
\n
\n
\n
\n                    ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers._triageMustache.call(depth0, "title", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n
\n
\n\n
\n                ");
  hashTypes = {};
  hashContexts = {};
  stack2 = helpers['if'].call(depth0, "selectedCards.length", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n\n                ");
  hashContexts = {'classNames': depth0};
  hashTypes = {'classNames': "STRING"};
  options = {hash:{
    'classNames': ("btn btn-primary")
  },inverse:self.noop,fn:self.program(3, program3, data),contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  stack2 = ((stack1 = helpers['link-to'] || (depth0 && depth0['link-to'])),stack1 ? stack1.call(depth0, "deck.detail", "id", options) : helperMissing.call(depth0, "link-to", "deck.detail", "id", options));
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n
\n\n
\n
\n
\n                    Creatures (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "creatures", options) : helperMissing.call(depth0, "collection-count", "creatures", options))));
  data.buffer.push(")\n\n                    ");
  hashContexts = {'deck': depth0,'collection': depth0,'edit': depth0};
  hashTypes = {'deck': "ID",'collection': "ID",'edit': "BOOLEAN"};
  options = {hash:{
    'deck': ("content"),
    'collection': ("creatures"),
    'edit': (true)
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n\n
\n                    Enchantments (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "enchantments", options) : helperMissing.call(depth0, "collection-count", "enchantments", options))));
  data.buffer.push(")\n\n                    ");
  hashContexts = {'deck': depth0,'collection': depth0,'edit': depth0};
  hashTypes = {'deck': "ID",'collection': "ID",'edit': "BOOLEAN"};
  options = {hash:{
    'deck': ("content"),
    'collection': ("enchantments"),
    'edit': (true)
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n                    Instants (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "instants", options) : helperMissing.call(depth0, "collection-count", "instants", options))));
  data.buffer.push(")\n\n                    ");
  hashContexts = {'deck': depth0,'collection': depth0,'edit': depth0};
  hashTypes = {'deck': "ID",'collection': "ID",'edit': "BOOLEAN"};
  options = {hash:{
    'deck': ("content"),
    'collection': ("instants"),
    'edit': (true)
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n\n
\n                    Sorceries (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "sorceries", options) : helperMissing.call(depth0, "collection-count", "sorceries", options))));
  data.buffer.push(")\n\n                    ");
  hashContexts = {'deck': depth0,'collection': depth0,'edit': depth0};
  hashTypes = {'deck': "ID",'collection': "ID",'edit': "BOOLEAN"};
  options = {hash:{
    'deck': ("content"),
    'collection': ("sorceries"),
    'edit': (true)
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n                    Lands (");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['collection-count'] || (depth0 && depth0['collection-count'])),stack1 ? stack1.call(depth0, "lands", options) : helperMissing.call(depth0, "collection-count", "lands", options))));
  data.buffer.push(")\n\n                    ");
  hashContexts = {'deck': depth0,'collection': depth0,'edit': depth0};
  hashTypes = {'deck': "ID",'collection': "ID",'edit': "BOOLEAN"};
  options = {hash:{
    'deck': ("content"),
    'collection': ("lands"),
    'edit': (true)
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['deck-card-list'] || (depth0 && depth0['deck-card-list'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "deck-card-list", options))));
  data.buffer.push("\n
\n
\n
\n
\n
\n");
  return buffer;

});

Ember.TEMPLATES["filter"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashContexts, hashTypes, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

  data.buffer.push("
\n
\n        CMC\n
\n\n
\n        ");
  hashContexts = {'value': depth0,'classNames': depth0};
  hashTypes = {'value': "ID",'classNames': "STRING"};
  options = {hash:{
    'value': ("cmc"),
    'classNames': ("form-control")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n");
  return buffer;

});

Ember.TEMPLATES["index"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};

  data.buffer.push("Welcome to MTG App\n");

});

Ember.TEMPLATES["login/login"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashContexts, hashTypes, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

  data.buffer.push("
\n    <form class=\"form-horizontal col-sm-6 col-sm-offset-3\">\n
\n            Username\n
\n                ");
  hashContexts = {'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'value': ("username"),
    'class': ("form-control"),
    'placeholder': ("Username")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n            Password\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'type': ("password"),
    'value': ("password"),
    'class': ("form-control"),
    'placeholder': ("Password")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n                <button class=\"btn btn-primary\">Login</button>\n
\n
\n    </form>\n
\n");
  return buffer;

});

Ember.TEMPLATES["register/register"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, stack2, hashTypes, hashContexts, options, self=this, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

function program1(depth0,data) {

  data.buffer.push("\n
\n
\n
Error!
\n
I'm sorry, but something went wrong with registration! Please try again later!
\n
\n
\n");
  }

function program3(depth0,data) {

  data.buffer.push("\n                    \n                ");
  }

function program5(depth0,data) {

  var buffer = '', stack1, hashTypes, hashContexts;
  data.buffer.push("\n                    ");
  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "username", {hash:{},inverse:self.noop,fn:self.program(6, program6, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n                ");
  return buffer;
  }
function program6(depth0,data) {

  data.buffer.push("\n                        \n                    ");
  }

  hashTypes = {};
  hashContexts = {};
  stack1 = helpers['if'].call(depth0, "registrationError", {hash:{},inverse:self.noop,fn:self.program(1, program1, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack1 || stack1 === 0) { data.buffer.push(stack1); }
  data.buffer.push("\n\n
\n    <form class=\"form-horizontal col-sm-6 col-sm-offset-3\">\n
\n            Username\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'type': ("text"),
    'value': ("username"),
    'class': ("form-control"),
    'placeholder': ("Username")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n\n
\n                ");
  hashTypes = {};
  hashContexts = {};
  stack2 = helpers['if'].call(depth0, "usernameCheckPassed", {hash:{},inverse:self.program(5, program5, data),fn:self.program(3, program3, data),contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data});
  if(stack2 || stack2 === 0) { data.buffer.push(stack2); }
  data.buffer.push("\n
\n
\n\n
\n            Email\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'type': ("email"),
    'value': ("email"),
    'class': ("form-control"),
    'placeholder': ("Email")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n            Password\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'type': ("password"),
    'value': ("password"),
    'class': ("form-control"),
    'placeholder': ("Password")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n            Password (repeat)\n
\n                ");
  hashContexts = {'type': depth0,'value': depth0,'class': depth0,'placeholder': depth0};
  hashTypes = {'type': "STRING",'value': "ID",'class': "STRING",'placeholder': "STRING"};
  options = {hash:{
    'type': ("password"),
    'value': ("passwordRepeat"),
    'class': ("form-control"),
    'placeholder': ("Password (repeat)")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.input || (depth0 && depth0.input)),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "input", options))));
  data.buffer.push("\n
\n
\n\n
\n
\n                <button class=\"btn btn-primary\" ");
  hashContexts = {'disabled': depth0};
  hashTypes = {'disabled': "ID"};
  options = {hash:{
    'disabled': ("formNotComplete")
  },contexts:[],types:[],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers['bind-attr'] || (depth0 && depth0['bind-attr'])),stack1 ? stack1.call(depth0, options) : helperMissing.call(depth0, "bind-attr", options))));
  data.buffer.push(">Register</button>\n
\n
\n    </form>\n
\n");
  return buffer;

});

Ember.TEMPLATES["search/search"] = Ember.Handlebars.template(function anonymous(Handlebars,depth0,helpers,partials,data) {
this.compilerInfo = [4,'>= 1.0.0'];
helpers = this.merge(helpers, Ember.Handlebars.helpers); data = data || {};
  var buffer = '', stack1, hashTypes, hashContexts, options, helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression;

  data.buffer.push("
\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  options = {hash:{},contexts:[depth0,depth0],types:["STRING","ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data};
  data.buffer.push(escapeExpression(((stack1 = helpers.render || (depth0 && depth0.render)),stack1 ? stack1.call(depth0, "card.list", "content", options) : helperMissing.call(depth0, "render", "card.list", "content", options))));
  data.buffer.push("\n
\n\n
\n        ");
  hashTypes = {};
  hashContexts = {};
  data.buffer.push(escapeExpression(helpers.view.call(depth0, "MTG.CardDetailView", {hash:{},contexts:[depth0],types:["ID"],hashContexts:hashContexts,hashTypes:hashTypes,data:data})));
  data.buffer.push("\n
\n
\n");
  return buffer;

});<file_sep>

        {{render "card.list" cardList}}

                    {{title}}

                {{#if selectedCards.length}}

                {{/if}}

                {{#link-to "deck.detail" id classNames="btn btn-primary"}}
                    Done
                {{/link-to}}

                    Creatures ({{collection-count creatures}})

                    {{deck-card-list deck=content collection=creatures edit=true}}

                    Enchantments ({{collection-count enchantments}})

                    {{deck-card-list deck=content collection=enchantments edit=true}}

                    Instants ({{collection-count instants}})

                    {{deck-card-list deck=content collection=instants edit=true}}

                    Sorceries ({{collection-count sorceries}})

                    {{deck-card-list deck=content collection=sorceries edit=true}}

                    Lands ({{collection-count lands}})

                    {{deck-card-list deck=content collection=lands edit=true}}

<file_sep>

{{card.name}}

            {{breaklines card.text}}

<file_sep>MTG.DeckRoute = Ember.Route.extend({
    model: function () {
        return this.store.find('deck');
    }
});
<file_sep>

    {{#each detail in collection}}

            {{#if edit}}

            {{/if}}

            {{deck-card-detail card=detail.card count=detail.count}}

    {{else}}
        None
    {{/each}}

<file_sep>MTG.Deck = DS.Model.extend({
    title: DS.attr(),
    private: DS.attr(),
    cards: DS.attr(),
    edit_group: DS.attr(),

    path: function () {
        return '/deck/' + this.get('id') + '/';
    }.property('id'),

    size: function () {
        var counts = this.get('cards').mapProperty('count');

        if (!counts || counts.length === 0) {
            return 0;
        }

        return _.reduce(counts, function (sum, num) {
            return sum + num;
        });
    }.property('cards.[]'),

    creatures: function () {
        return this.filterCardsOnType('Creature');
    }.property('cards.[]'),

    instants: function () {
        return this.filterCardsOnType('Instant');
    }.property('cards.[]'),

    sorceries: function () {
        return this.filterCardsOnType('Sorcery');
    }.property('cards.[]'),

    enchantments: function () {
        return this.filterCardsOnType('Enchantment');
    }.property('cards.[]'),

    lands: function () {
        return this.filterCardsOnType('Land');
    }.property('lands.[]'),

    canEdit: function () {
        var user = MTG.get('session.user.id');
        return this.get('edit_group').indexOf(user) > -1;
    }.property('MTG.session.user'),

    filterCardsOnType: function (type) {
        var cards = this.get('cards');
        var filtered = cards.filter(function (detail) {
            return _.contains(detail.card.types, type);
        });

        return _.sortBy(filtered, function (data) {
            return data.card.name;
        });
    }
});
<file_sep>MTG.ApplicationRoute = Ember.Route.extend({
    actions: {
        transition: function () {
            if(!this.session.get('isAuthenticated')) {
                this.transitionTo('login');
            }
        },

        logout: function () {
            var route = this;
            var session = MTG.get('session');
            session.logout().then(function () {
                route.transitionTo('login');
            });
        }
    },

    beforeModel: function (transition) {
        var self = this;

        return this.session.authenticateWithToken()
            .catch(function () {
                if(!self.session.get('isAuthenticated') && transition.targetName !== 'register') {
                    self.transitionTo('login');
                }
            });

    }
});
<file_sep>MTG.RegisterController = Ember.Controller.extend({
    username: null,
    email: null,
    password: <PASSWORD>,
    passwordRepeat: null,

    registrationError: false,

    usernameFree: false,

    actions: {
        register: function () {
            var username = this.get('username'),
                email = this.get('email'),
                password = this.get('<PASSWORD>'),
                passwordRepeat = this.get('passwordRepeat');

            if (username && email && password && password === passwordRepeat) {
                var self = this;
                var data = {
                    username: username,
                    password: <PASSWORD>,
                    email: email
                };

                MTG.Ajax.post('/auth/register/', data)
                    .then(function () {
                        self.set('registrationError', false);

                        self.session.authenticateWithCredentials(username, password)
                            .then(function () {
                                self.transitionTo('index');
                            });
                    })
                    .catch(function () {
                        self.set('registrationError', true);
                    });
            }
        }
    },

    formNotComplete: function () {
        var username = this.get('username'),
            email = this.get('email'),
            password = this.get('<PASSWORD>'),
            passwordRepeat = this.get('<PASSWORD>');

        return !(username && email && password && <PASSWORD> === <PASSWORD>);
    }.property('username', 'email', 'password', '<PASSWORD>'),

    passwordsNoMatch: function () {
        return this.get('password') !== this.get('password<PASSWORD>');
    }.property('password', '<PASSWORD>'),

    usernameCheckPassed: function () {
        var username = this.get('username'),
            free = this.get('usernameFree');

        return username && free;
    }.property('username', 'usernameFree'),

    checkUsername: function () {
        var self = this;
        var data = {
            username: this.get('username')
        };

        MTG.Ajax.get('/auth/register/', data)
            .then(function (res) {
                self.set('usernameFree', false);
            })
            .catch(function (res) {
                self.set('usernameFree', true);
            });
    }.observes('username')
});
<file_sep>MTG.LoginView = Ember.View.extend({
    classNames: ['login'],
    templateName: ['login/login'],

    submit: function () {
        this.get('controller').send('login');
    }
});
<file_sep>var port = process.env.PORT || 3000;

module.exports = function (grunt) {
    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-ember-templates');
    grunt.loadNpmTasks('grunt-es6-module-transpiler');

    grunt.registerTask('default', '', ['transpile', 'uglify:thirdParty', 'uglify:main', 'connect', 'watch']);
    grunt.registerTask('server', '', ['connect', 'watch']);

    grunt.initConfig({
        watch: {
            scripts: {
                files: ['app/javascripts/**/*.js'],
                tasks: ['transpile', 'uglify:main'],
                options: {
                    spawn: false
                },
            },

            thirdParty: {
                files: ['vendor/**/*.js'],
                tasks: ['uglify:thirdParty']
            },

            styles: {
                files: ['app/styles/**/*.less'],
                tasks: ['less'],
                options: {
                    spawn: false
                }
            },

            templates: {
                files: 'app/templates/**/*.hbs',
                tasks: ['emberTemplates']
            },
        },

        less: {
            development: {
                options: {
                    paths: ['app/styles'],
                    cleancss: true
                },
                files: {
                    'app/build/style.css': 'app/styles/app.less'
                }
            }
        },

        emberTemplates: {
            compile: {
                options: {
                    templateBasePath: /app\/templates\//
                },
                files: {
                    'app/build/templates.js': ['app/templates/**/*.hbs']
                }
            }
        },

        uglify: {
            main: {
                files: {
                    'app/build/app.js': ['app/tmp/js/**/*.js']
                }
            },

            thirdParty: {
                files: {
                    'app/build/third_party.js': [
                        'vendor/jquery/jquery.js',
                        'vendor/jquery.cookie/jquery.cookie.js',
                        'vendor/handlebars/handlebars.js',
                        'vendor/ember/ember.js',
                        'vendor/ember-data-shim/ember-data.js',
                        'vendor/lodash/dist/lodash.js',
                        'vendor/socket.io-client/dist/socket.io.js',
                        'vendor/requirejs/require.js'
                    ]
                }
            },

            options: {
                mangle: false,
                compress: false,
                beautify: true
            }
        },

        connect: {
            server: {
                options: {
                    port: port,
                    base: 'app'
                }
            }
        },

        transpile: {
            main: {
                type: 'globals', // or "amd" or "yui"
                files: [{
                    expand: true,
                    cwd: 'app/',
                    src: ['javascripts/**/*.js'],
                    dest: 'app/tmp/js'
                }]
            }
        }
    });
};
<file_sep>MTG.DeckView = Ember.View.extend({
    templateName: 'deck',
    classNames: ['deck']
});
<file_sep>

        {{input value=searchQuery classNames="form-control" placeholder="Search..."}}

        <button class="btn btn-default" {{action toggleFilters}}>
            Filters
        </button>

        {{render "filter"}}

    {{#each card in content}}

{{unbound card.name}}

    {{/each}}

<file_sep>MTG.Card = DS.Model.extend({
    name: DS.attr(),
    text: DS.attr(),
    card_set: DS.attr(),
    cmc: DS.attr(),
    type_name: DS.attr(),
    types: DS.attr(),
    subtypes: DS.attr(),
    colors: DS.attr(),
    layout: DS.attr(),
    power: DS.attr(),
    toughness: DS.attr(),
    image_name: DS.attr(),
    multiverse_id: DS.attr(),

    shortSet: function () {
        var set = this.get('card_set');
        if(set) {
            return set.match(/\(\w+\)/)[0].match(/\w+/)[0];
        }

        return '';
    }.property('card_set'),

    mtgImage: function () {
        var url = 'http://mtgimage.com/set/%@/%@.jpg';
        var setName = this.get('shortSet');
        return url.fmt(setName, this.get('name').toLowerCase());
    }.property('image_name'),

    gathererImage: function () {
        var url = 'http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=%@&type=card';
        return url.fmt(this.get('multiverse_id'));
    }.property('multiverse_id')
});
<file_sep>MTG.ModalComponent = Ember.Component.extend({
    layoutName: 'components/modal',
    classNameBindings: [':modal', 'isVisible:in:', ':fade'],

    isVisible: false,

    delegate: null,

    headerText: 'Modal',
    confirmText: 'Confirm',
    cancelText: 'Cancel',

    contentViewClass: null,

    actions: {
        confirm: function () {
            this.hide();

            var delegate = this.get('delegate');
            delegate.send('confirm');
        },

        cancel: function () {
            this.hide();

            var delegate = this.get('delegate');
            delegate.send('cancel');
        }
    },

    init: function () {
        this._super();

        this.set('content', this.get('delegate'));
    },

    showModal: function () {
        var background = '

';
        var $background = Ember.$(background);
        $background.appendTo('body');
        Ember.run.scheduleOnce('afterRender', this, function () {
            Ember.$('body').addClass('modal-open');

            $background.addClass('in');

            this.set('isVisible', true);
        });

        this.set('$background', $background);
    }.on('didInsertElement'),

    hidingModal: function () {
        this.set('isVisible', false);
    }.on('willDestroyElement'),

    hide: function () {
        var self = this;
        var $background = this.get('$background');

        Ember.$('body').removeClass('modal-open');

        $background.removeClass('in');

        if (!$.support.transition) { // IE...
            $background.remove();
            this.destroy();
        } else {
            this.$().one($.support.transition.end, function () {
                $background.remove();
                self.destroy();
            });
        }
    },

    click: Ember.K
});

MTG.ModalComponent.reopenClass({
    show: function (options) {
        var modal = this.create(options);
        modal.container = modal.get('delegate.container');
        modal.appendTo('.ember-application');
        return modal;
    }
});
<file_sep>Ember.RSVP.configure('onerror', function(error) {
    if (error instanceof Error) {
        Ember.Logger.error(error.stack);
    }
});

var sockets = {};

var connect = function (namespace) {
    return io.connect('http://localhost:9000/' + namespace);
};

var socket = function (namespace) {
    var socket = sockets[namespace];
    if(!socket) {
        socket = connect(namespace);
        sockets[namespace] = socket;
    }

    return socket;
};

Function.prototype.onEvent = function (namespace, eventName) {
    this.__socket_events = [namespace, eventName];
    return this;
};

var MTG = Ember.Application.create({
    LOG_ACTIVE_GENERATION: true,
    LOG_MODULE_RESOLVER: true,
    LOG_TRANSITIONS: true,
    LOG_TRANSITIONS_INTERNAL: true,
    LOG_VIEW_LOOKUPS: true,
    modulePrefix: 'mtg',

    connect: connect,
    socket: socket,

    lookupController: function (name) {
        return this.container.lookup('controller:' + name);
    }
});

MTG.initializer({
    name: 'mtg',

    initialize: function (container, application) {
        application.set('container', container);
        application.set('store', container.lookup('store:main'));
        application.set('router', container.lookup('router:main'));

        application.register('session:application', MTG.Session);
        application.set('session', container.lookup('session:application'));

        application.inject('route', 'session', 'session:application');
        application.inject('controller', 'session', 'session:application');
    }
});

Ember.Handlebars.registerBoundHelper('breaklines', function(text) {
    text = Handlebars.Utils.escapeExpression(text);
    text = text.toString();
    text = text.replace(/(\r\n|\n|\r)/gm, '
');
    return new Handlebars.SafeString(text);
});

export default MTG;
<file_sep>MTG.DeckEditRoute = Ember.Route.extend({
    beforeModel: function () {
        var controller = this.controllerFor('deck');
        controller.set('editMode', true);
    },

    model: function (params) {
        return this.store.find('deck', params.id);
    },

    afterModel: function (model) {
        if(!model.get('canEdit')) {
            this.transitionTo('deck.detail', model.get('id'));
        }
    }
});
<file_sep>MTG.CardController = Ember.ObjectController.extend({
    cardBinding: 'model'
});
<file_sep>MTG.DeckDetailController = Ember.ObjectController.extend({

});

Ember.Handlebars.registerBoundHelper('collection-count', function (collection) {
    if(collection && !_.isEmpty(collection)) {
        var sums = collection.mapProperty('count');
        return _.reduce(sums, function (sum, num) {
            return sum + num;
        });
    }

    return 0;
});
<file_sep>MTG.DeckController = Ember.Controller.extend({
    editMode: false,

    name: null,
    private: false,

    actions: {
        createNewDeck: function () {
            var createDeckModal = MTG.ModalComponent.show({
                delegate: this,
                headerText: 'Create Deck',
                contentViewClass: MTG.CreateDeckView
            });
        },

        confirm: function () {
            var self = this;
            var name = this.get('name'),
                privateDeck = this.get('private');

            var data = {
                title: name,
                private: privateDeck,
                user: MTG.get('session.user.id')
            };

            MTG.Ajax.post('/deck/', data)
                .then(function (data) {
                    if (data.id) {
                        self.transitionToRoute('deck.edit', data.id);
                    }
                })
                .catch(function () {
                    Ember.logger.error('Create deck error');
                });
        },

        cancel: Ember.K
    }
});
<file_sep>MTG.DeckDetailView = Ember.View.extend({
    templateName: 'deck/deck-detail',
    classNames: ['deck-detail']
});
<file_sep>MTG.RegisterView = Ember.View.extend({
    templateName: 'register/register',
    classNames: ['register'],

    submit: function () {
        this.get('controller').send('register');
    }
});
<file_sep>MTG.ApplicationSerializer = DS.RESTSerializer.extend({
    extractSingle: function (store, type, payload, id, requestType) {
        var data = {},
            dataKey = type.typeKey;

        data[dataKey] = payload;

        return this._super(store, type, data, id, requestType);
    },

    extractArray: function (store, type, payload) {
        var data = {},
            dataKey = Ember.String.pluralize(type.typeKey);

        data[dataKey] = payload.results;

        return this._super(store, type, data);
    },

    rootJSON: function (json, type, pluralize) {
        var root = this.rootForType(type);

        if (pluralize === 'pluralize') {
            root = this.pluralize(root);
        }

        var rootedJSON = {};
        rootedJSON[root] = json;

        return rootedJSON;
    },

    normalize: function (type, payload, property) {
        for(var prop in payload) {
            if (payload.hasOwnProperty(prop)) {
                payload[prop.camelize()] = payload[prop];
            }
        }

        return this._super(type, payload, property);
    },

    extractMeta: function(store, type, payload) {
        if (payload && payload.next) {
            var nextUrl = payload.next;
            store.metaForType(type, { next: payload.next.split('=')[1] });
            delete payload.next;
        }

        if (payload && payload.prev) {
            var prevUrl = payload.prev;
            store.metaForType(type, { next: payload.prev.split('=')[1] });
            delete payload.prev;
        }
    }
});
<file_sep>MTG.CardListView = Ember.View.extend({
    classNames: ['card-list'],
    templateName: 'card/card-list',

    adjustHeight: function () {
        this.setHeight();
        $(window).on('resize', _.bind(this.setHeight, this));
    }.on('didInsertElement'),

    removeBindings: function () {
        $(window).off('resize');
    }.on('willDestroyElement'),

    setHeight: function () {
        var height = window.innerHeight;
        this.$().css('height', height);
    }
});
<file_sep>MTG.LogoutRoute = Ember.Route.extend({
    activate: function () {
        this.send('logout');
    }
});
<file_sep>MTG.ApplicationView = Ember.View.extend({
    routeChanged: function () {
        Ember.run.scheduleOnce('afterRender', this, this.updateActiveNavbar);
    }.observes('MTG.router.url'),

    updateActiveNavbar: function () {
        // Handle the situation where you have an active item
        var activeListItem = this.$('.nav li.active');
        activeListItem.removeClass('active');

        var activeLink = this.$('.nav a.active');
        activeLink.parent().addClass('active');
    }
});
<file_sep>Welcome to MTG App
<file_sep>var location = (function () {
    if(window.location.hostname === 'localhost') {
         return 'http://localhost:9000';
    }

    return 'http://gatheringapi.herokuapp.com';
}());

function setAjaxPreflight (data) {
    $.cookie('token', data.token);
    var csrftoken = $.cookie('csrftoken');

    function csrfSafeMethod(method) {
        // these HTTP methods do not require CSRF protection
        return (/^(GET|HEAD|OPTIONS|TRACE)$/.test(method));
    }

    Ember.$.ajaxPrefilter(function(options, originalOptions, xhr) {
        options.xhrFields = {
            withCredentials: true
        };

        xhr.setRequestHeader('Authorization', 'Token %@'.fmt(data.token));

        if (!csrfSafeMethod(options.type)) {
            xhr.setRequestHeader('X-CSRFToken', csrftoken);
        }
    });
}

MTG.Session = Ember.Object.extend({
    user: null,
    token: null,

    init: function () {
        Ember.$.ajaxPrefilter(function(options, originalOptions, xhr) {
            options.xhrFields = {
                withCredentials: true
            };
        });
    },

    tokenCookie: function () {
        return $.cookie('token');
    }.property(),

    isAuthenticated: function () {
        return this.get('token') !== null && this.get('tokenCookie');
    }.property('token'),

    authenticateWithToken: function () {
        var self = this;
        var token = $.cookie('token');

        return new Ember.RSVP.Promise(function (resolve, reject) {
            if(!token) {
                reject();
            }

            var path = '%@/auth/'.fmt(location);
            var data = {
                token: token
            };

            $.post(path, data).then(
                function (data, status, xhr) {
                    self.handleAuthentication(data);

                    resolve(data, xhr);
                },
                function (data, status, xhr) {
                    reject(data, xhr);
                }
            )
        });
    },

    authenticateWithCredentials: function (username, password) {
        var self = this;

        return new Ember.RSVP.Promise(function (resolve, reject) {
            var path = '%@/auth/'.fmt(location);
            var data = {
                username: username,
                password: <PASSWORD>
            };

            $.post(path, data).then(
                function (data, status, xhr) {
                    if(data.token) {
                        self.handleAuthentication(data);

                        resolve(data, xhr);
                    } else {
                        reject(data, xhr);
                    }

                },
                function (data, status, xhr) {
                    reject(data, xhr);
                }
            )
        });
    },

    handleAuthentication: function (data) {
        this.set('token', data.token);
        this.set('user', data.user);
        setAjaxPreflight(data);
    },

    logout: function () {
        var self = this;

        return new Ember.RSVP.Promise(function (resolve, reject) {
            var path = '%@/auth/logout/'.fmt(location);
            $.post(path, {}).then(
                function () {
                    $.removeCookie('token');

                    self.set('token', null);
                    self.set('user', null);

                    resolve();
                },

                function () {
                    Ember.Logger.error('Logout error');
                    reject()
                }
            )
        });
    }
});
<file_sep>MTG.CardListController = Ember.Controller.extend({
    needs: ['filter'],

    delegate: null,

    searching: false,
    searchQuery: null,

    showFilters: false,

    actions: {
        toggleFilters: function () {
            this.toggleProperty('showFilters');
        }
    },

    searchQueryChanged: function () {
        this.set('controllers.filter.searchQuery', this.get('searchQuery'));
    }.observes('searchQuery'),

    searchContentChanged: function () {
        this.set('content', this.get('controllers.filter.content'));
    }.observes('controllers.filter.content')
});
<file_sep>{{#if registrationError}}

Error!

I'm sorry, but something went wrong with registration! Please try again later!

{{/if}}

    <form class="form-horizontal col-sm-6 col-sm-offset-3">

            Username

                {{input type="text" value=username class="form-control" placeholder="Username"}}

                {{#if usernameCheckPassed}}

                {{else}}
                    {{#if username}}

                    {{/if}}
                {{/if}}

            Email

                {{input type="email" value=email class="form-control" placeholder="Email"}}

            Password

                {{input type="<PASSWORD>" value=password class="form-control" placeholder="<PASSWORD>"}}

            Password (repeat)

                {{input type="password" value=passwordRepeat class="form-control" placeholder="Password (repeat)"}}

                <button class="btn btn-primary" {{bind-attr disabled=formNotComplete}}>Register</button>

    </form>

<file_sep>MTG.CreateDeckView = Ember.View.extend({
    templateName: 'deck/deck-create',
    classNames: ['create-deck']
});

languages: Handlebars JavaScript Less

repo_language: Handlebars

repo_name: omarestrella/mtgclient-old


text:
<repo_name>gpkmajeti/CQRS<file_sep>/README.md
# CQRS
Playing around with CQRS

repo_name: gpkmajeti/CQRS