{# djlint:off #}
[
	{% for x in usage_events %}
	{
		{% if personal_schedule %}
			"title": "{{ x.tool.name }} ({{ x.user.username }})\n {{ x.project }}",
		{% else %}
			"title": "{{ x.tool.name }} ({% if x.operator.id != x.user.id %}{{ x.operator }} on behalf of {% endif %}{{ x.user.username }})\n {{ x.project }}",
		{% endif %}
		{% if x.operator.id == x.user.id %}
			"tooltip": "{{ x.tool.name }} usage for {{ x.user }} billed to project {{ x.project }}",
		{% else %}
			"tooltip": "{{ x.tool.name }} usage for {{ x.user }}, operated by {{ x.operator }} and billed to project {{ x.project }}",
		{% endif %}
		"id": {{ x.id }},
		"start": "{{ x.start|date:"c" }}",
		{# Usage events that are less than 15 minutes are artificially lengthened for display purposes. #}
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'usage_details' x.id %}",
		"color": "{{ x.tool.tool_calendar_color|default:'#33ad33'|escapejs }}"

	}{% if not forloop.last %},{% elif area_access_events or missed_reservations %},{% endif %}
	{% endfor %}
	{% for x in area_access_events %}
	{
		"title": "{{ x.area }} access billed to project {{ x.project }} {% if x.staff_charge %}by {{ x.staff_charge.staff_member }}{% endif %}",
		"tooltip": "{{ x.area }} access for {{ x.customer }} billed to project {{ x.project }} {% if x.staff_charge %}by {{ x.staff_charge.staff_member }}{% endif %}",
		"id": {{ x.id }},
		"start": "{{ x.start|date:"c" }}",
		{# Area access events that are less than 15 minutes are artificially lengthened for display purposes. #}
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'area_access_details' x.id %}",
		"color": "{{ x.area.area_calendar_color|default:'#e68a00'|escapejs }}"
	}{% if not forloop.last %},{% elif missed_reservations %},{% endif %}
	{% endfor %}
	{% for x in missed_reservations %}
	{
		{% if personal_schedule %}
			"title": "Missed reservation for the {{ x.reservation_item }} \n {{ x.project }}",
		{% else %}
			"title": "Missed reservation by {{ x.user }} \n {{ x.project }}",
		{% endif %}
		{% if x.creator.id == x.user.id %}
			"tooltip": "Missed {{ x.reservation_item.name }} reservation for {{ x.user }} billed to project {{ x.project }}",
		{% else %}
			"tooltip": "Missed {{ x.reservation_item.name }} reservation for {{ x.user }} billed to project {{ x.project }}, created by {{ x.creator }}",
		{% endif %}
		"id": {{ x.id }},
		"color": "#ff0000",
		"start": "{{ x.start|date:"c" }}",
		"end": "{{ x.end|date:"c" }}",
		"details_url": "{% url 'reservation_details' x.id %}"
	}{% if not forloop.last %},{% endif %}
	{% endfor %}
]
